Skip to content

Instantly share code, notes, and snippets.

Penn Su pencilcheck

Block or report user

Report or block pencilcheck

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
pencilcheck / autoSizr.js
Created Jul 10, 2017 — forked from iamkirkbater/autoSizr.js
Simple jQuery Plugin that auto resizes text to fill a specific sized div (great for responsive slideshows that utilize large banner text with variable lengths), derived from
View autoSizr.js
$.fn.autoSizr = function () {
var el, elements, _i, _len, _results;
elements = $(this);
if (elements.length < 0) {
_results = [];
for (_i = 0, _len = elements.length; _i < _len; _i++) {
el = elements[_i];
_results.push((function(el) {

What is this?

How do you compare date/times in RSpec?

If you do this

expect( eq, 4, 2).to_i
pencilcheck / gist:1339626
Created Nov 4, 2011 — forked from mudge/gist:124170
Add vim Ruby syntax highlighting to .prawn files.
View gist:1339626
au BufNewFile,BufRead *.prawn set filetype=ruby
View gist:510681
NSNumber *windowLevelIndex = [[NSUserDefaults standardUserDefaults] objectForKey:@"DesktopBackgroundLevel"];
if (windowLevelIndex != nil) {
switch ([windowLevelIndex integerValue]) {
case 0: // Show behind the desktop icons, but on the desktop - ignored by Exposé
[window setLevel:kCGDesktopWindowLevel];
[window setIgnoresMouseEvents:YES];
[window orderBack:self];
case 1: // Show above the desktop icons - still ignored by Exposé
[window setLevel:kCGDesktopIconWindowLevel];
You can’t perform that action at this time.