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
| cd /tmp | |
| git clone git://git.kernel.org/pub/scm/git/git.git | |
| cd git | |
| git checkout v`git --version | awk '{print $3}'` | |
| cp contrib/completion/git-completion.bash ~/.git-completion.bash | |
| cd ~ | |
| rm -rf /tmp/git | |
| echo -e "source ~/.git-completion.bash" >> .profile |
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
| /* Use this to cause a function to fire no more than once every 'ms' milliseconds. | |
| For example, an expensive mousemove handler: | |
| $('body').mouseover(ratelimit(function(ev) { | |
| // ... | |
| }, 250)); | |
| */ | |
| function ratelimit(fn, ms) { | |
| var last = (new Date()).getTime(); |
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
| # bash/zsh completion support for core Git. | |
| # | |
| # Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
| # Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
| # Distributed under the GNU General Public License, version 2.0. | |
| # | |
| # The contained completion routines provide support for completing: | |
| # | |
| # *) local and remote branch names | |
| # *) local and remote tag names |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Ansi 0 Color</key> | |
| <dict> | |
| <key>Blue Component</key> | |
| <real>0.078821629285812378</real> | |
| <key>Green Component</key> | |
| <real>0.07883714884519577</real> |
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
| var $ = require('./') | |
| $.import('Foundation') | |
| $.import('Cocoa') | |
| var pool = $.NSAutoreleasePool('alloc')('init') | |
| var app = $.NSApplication('sharedApplication') | |
| var style = $.NSClosableWindowMask | $.NSResizableWindowMask | |
| | $.NSTexturedBackgroundWindowMask | $.NSTitledWindowMask | |
| | $.NSMiniaturizableWindowMask |
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 example adapted from Matt Gallagher's "Minimalist Cocoa Programming" | |
| // blog article: | |
| // http://cocoawithlove.com/2010/09/minimalist-cocoa-programming.html | |
| var $ = require('NodObjC') | |
| $.import('Cocoa') | |
| var pool = $.NSAutoreleasePool('alloc')('init') | |
| , app = $.NSApplication('sharedApplication') |
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
| var $ = require('NodObjC') | |
| $.import('MobileDevice'); | |
| $.import('CoreFoundation') | |
| // Callback function that's invoked when a device is plugged in | |
| function callback (i, foo) { | |
| try { | |
| console.log('inside callback!') | |
| var info = new $.am_device_notification_callback_info(i) |
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 example adapted from Matt Gallagher's "Minimalist Cocoa Programming" | |
| // blog article: | |
| // http://cocoawithlove.com/2010/09/minimalist-cocoa-programming.html | |
| var $ = require('NodObjC') | |
| $.import('Cocoa') | |
| $.import('WebKit') | |
| var pool = $.NSAutoreleasePool('alloc')('init') | |
| , app = $.NSApplication('sharedApplication') |
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
| <?php | |
| require_once 'Slim/Slim.php'; | |
| class Custom_Route extends Slim_Route { | |
| public function dispatch() { | |
| $this->setCallable(require $this->getCallable()); | |
| return parent::dispatch(); | |
| } | |
| } |
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
| var net = require('net') | |
| var sock = net.connect(1337) | |
| process.stdin.pipe(sock) | |
| sock.pipe(process.stdout) | |
| sock.on('connect', function () { | |
| process.stdin.resume(); | |
| process.stdin.setRawMode(true) |
OlderNewer