| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
| <? | |
| function aes128_cbc_encrypt($key, $data, $iv) { | |
| if(16 !== strlen($key)) $key = hash('MD5', $key, true); | |
| if(16 !== strlen($iv)) $iv = hash('MD5', $iv, true); | |
| $padding = 16 - (strlen($data) % 16); | |
| $data .= str_repeat(chr($padding), $padding); | |
| return mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $data, MCRYPT_MODE_CBC, $iv); | |
| } |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| wget -q -O - https://raw.github.com/gist/2204072/install_tmux_1.6_on_ubuntu_10.04.sh | sudo bash |
| <!-- copy this to YOUR_THEME.tmTheme--> | |
| <dict> | |
| <key>name</key> | |
| <string>diff: deleted</string> | |
| <key>scope</key> | |
| <string>markup.deleted</string> | |
| <key>settings</key> | |
| <dict> | |
| <key>background</key> | |
| <string>#EAE3CA</string> |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.
| #!/usr/bin/env bash | |
| export TMUX_INSTALL_VERSION=1.6 | |
| wget -q -O - "https://gist.github.com/raw/4561674/install_tmux_${TMUX_INSTALL_VERSION}_on_ubuntu_10.04.sh" | sudo bash |
| /* Side notes for calling out things | |
| -------------------------------------------------- */ | |
| /* Base styles (regardless of theme) */ | |
| .bs-callout { | |
| margin: 20px 0; | |
| padding: 15px 30px 15px 15px; | |
| border-left: 5px solid #eee; |
Command Line
pry -r ./config/app_init_file.rb- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb- load your rails into a pry session
Debugger