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
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 https://gist.github.com/iam4x/5015270
View autoSizr.js
$.fn.autoSizr = function () {
var el, elements, _i, _len, _results;
elements = $(this);
if (elements.length < 0) {
return;
}
_results = [];
for (_i = 0, _len = elements.length; _i < _len; _i++) {
el = elements[_i];
_results.push((function(el) {
View _README.md

What is this?

How do you compare date/times in RSpec?

If you do this

expect(Time.now.to_i).to eq Time.new(2014, 4, 2).to_i
@pencilcheck
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];
break;
case 1: // Show above the desktop icons - still ignored by Exposé
[window setLevel:kCGDesktopIconWindowLevel];
You can’t perform that action at this time.