This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * ## Merging mixin views in backbone.js ## | |
| * | |
| * really just more a test for tumblr gistr | |
| */ | |
| /** | |
| * Merge the mixin (a Backbone.View) into another Backbone.View. Automatically merge events, defaults, and call the parent initializer. | |
| **/ | |
| function mergeMixin(view, mixin) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Drop in replace functions for setTimeout() & setInterval() that | |
| make use of requestAnimationFrame() for performance where available | |
| http://www.joelambert.co.uk | |
| Copyright 2011, Joe Lambert. | |
| Free to use under the MIT license. | |
| http://www.opensource.org/licenses/mit-license.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/zsh | |
| source ${HOME}/.zshrc | |
| mkdir -p ${HOME}/perl5/perlbrew | |
| curl -L http://xrl.us/perlbrew > ${HOME}/perl5/perlbrew/perlbrew | |
| perl ${HOME}/perl5/perlbrew/perlbrew install > /dev/null | |
| ${HOME}/perl5/perlbrew/bin/perlbrew init > /dev/null | |
| perlbrew install perl-5.14.0 | |
| curl -L http://xrl.us/cpanm > ${HOME}/perl5/perlbrew/bin/cpanm | |
| chmod +x ${HOME}/perl5/perlbrew/bin/cpanm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This is the Android version of the Tweetie-like pull to refresh table: | |
| // http://developer.appcelerator.com/blog/2010/05/how-to-create-a-tweetie-like-pull-to-refresh-table.html | |
| var win = Ti.UI.currentWindow; | |
| var alertDialog = Titanium.UI.createAlertDialog({ | |
| title: 'System Message', | |
| buttonNames: ['OK'] | |
| }); | |
| var scrollView = Ti.UI.createScrollView({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * object.watch polyfill | |
| * | |
| * 2012-04-03 | |
| * | |
| * By Eli Grey, http://eligrey.com | |
| * Public Domain. | |
| * NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Alternative JavaScript Syntax | |
| Person = :(name, address) { @name!, @address! } | |
| Person::inspect = :{ <: "{@name} lives at {@address}" } | |
| tj := Person('TJ', '314 Bessborough ave') | |
| bob := Person('Bob', 'Some place') | |
| [tj, bob].each(:(person){ print(person.inspect()) }) |
NewerOlder