Skip to content

Instantly share code, notes, and snippets.

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];
@pencilcheck
pencilcheck / gist:1339626
Created November 4, 2011 15:42 — forked from mudge/gist:124170
Add vim Ruby syntax highlighting to .prawn files.
au BufNewFile,BufRead *.prawn set filetype=ruby
@pencilcheck
pencilcheck / _README.md
Last active March 18, 2023 13:15 — forked from shime/_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 / autoSizr.js
Created July 10, 2017 04:56 — 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
$.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) {