⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains 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
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
This file contains 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
// http://www.slideshare.net/nzakas/high-performance-javascript-amazon-devcon-2011 | |
var list = document.getElementsByClassName('items')[0], | |
fragment = document.createDocumentFragment(), | |
i, item; | |
for (i=0; i < 10; i++) { | |
item = document.createElement('li'); | |
item.innerHTML = 'item #'+i; | |
fragment.appenChild(item); | |
} |
This file contains 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
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
This file contains 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/bash | |
# MacRuby | |
rm -rf /Library/Frameworks/MacRuby.framework | |
XCODE_DIR=`xcode-select -print-path` | |
# tool | |
rm -f "$XCODE_DIR"/usr/bin/rb_nibtool | |
rm -f "$XCODE_DIR"/Tools/rb_nibtool |
This file contains 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/bash | |
# Might as well ask for password up-front, right? | |
sudo -v | |
# Keep-alive: update existing sudo time stamp if set, otherwise do nothing. | |
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & | |
# Example: do stuff over the next 30+ mins that requires sudo here or there. | |
function wait() { |
- Install Python from DSM Package Center
- Enable SSH
- SSH in
- Enable and switch to user shell (optional, requres user homes to be enabled)
- set shell to
/bin/ash
in/etc/passwd
su - <user>
- set shell to
- Create directory to store all of this (optional)
mkdir gmvault&&cd gmvault
- Get virtualenv
wget https://raw.github.com/pypa/virtualenv/develop/virtualenv.py
See https://en.bitcoin.it/wiki/BIP_0070 for the latest version of this document; I'll keep this document so the process of discussion/revision isn't lost.
This document proposes protocol buffer-based formats for a simple payment protocol between a customer's bitcoin client software and a merchant.
This file contains 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
/* | |
Migrated to: https://github.com/jdarling/Object.observe | |
Tested against Chromium build with Object.observe and acts EXACTLY the same, | |
though Chromium build is MUCH faster | |
Trying to stay as close to the spec as possible, | |
this is a work in progress, feel free to comment/update | |
http://wiki.ecmascript.org/doku.php?id=harmony:observe |
This file contains 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/sh | |
# | |
# g - Yet Another Alternative to 'grep find' using mdfind(a.k.a. Spotlight) on Mac OS X | |
# | |
# usage: | |
# $g hoge | |
# $g hoge dir | |
USAGE="usage:\n\ | |
\$g hoge\n\ |
OlderNewer