Skip to content

Instantly share code, notes, and snippets.

@adamjspooner
adamjspooner / _config.yml
Created May 24, 2011 06:08
A Jekyll plugin to convert .styl to .css.
stylus:
compress: true
path: ./path/to/styl
require 'rake/clean'
STYLUS = FileList['./**/*.styl']
COFFEE = FileList['./**/*.coffee']
CSS = STYLUS.ext('css')
JS = COFFEE.ext('js')
CLOBBER.include(CSS, JS)
@adamjspooner
adamjspooner / gist:1370040
Created November 16, 2011 13:05
Casting an NSString to an int
NSString *string = [[NSString alloc] initWithString:@"Ladies Love Cool James"];
NSLog(@"%@", string);
NSLog(@"%d", (int)string); // the string's value
NSLog(@"%d", (int)&string); // the string's pointer
@adamjspooner
adamjspooner / gist:1665152
Created January 23, 2012 19:40
Duck punching JavaScript's Number for toString() typos.
Number.prototype.yoString = function() {
return 'Yo, ' + this + '!';
};
var num = 3;
console.log(num.yoString());
var my_array = [];
if (my_array instanceof Array) {
console.log('Congrats, you have an array!');
}

Keybase proof

I hereby claim:

  • I am adamjspooner on github.
  • I am adamjspooner (https://keybase.io/adamjspooner) on keybase.
  • I have a public key whose fingerprint is 9E60 7BFF 4501 A04B 9A22 2977 6359 9586 14FB 86FC

To claim this, I am signing this object:

@adamjspooner
adamjspooner / 0_reuse_code.js
Created June 9, 2014 13:05
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Keybase proof

I hereby claim:

  • I am adamjspooner on github.
  • I am spojo3 (https://keybase.io/spojo3) on keybase.
  • I have a public key ASAy0Jr4qKuNDqt7XSVaq2HyfN0kUgjuomC5PoMH6HUO3Ao

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am adamjspooner on github.
  • I am zpooner (https://keybase.io/zpooner) on keybase.
  • I have a public key ASDOuRk3yMBz0xOeeUTUIiSYCdfchITG--wEAwGti6TOHwo

To claim this, I am signing this object: