(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| start on starting <%= app %>-<%= name %> | |
| stop on stopping <%= app %>-<%= name %> | |
| respawn | |
| exec su - <%= user %> --session-command 'cd <%= engine.root %>; export PORT=<%= port %>;<% engine.env.each_pair do |var,env| %> export <%= var.upcase %>=<%= shell_quote(env) %>; <% end %> <%= process.command %> >> <%= log %>/<%=name%>-<%=num%>.log 2>&1' |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2
| # Install http://pygments.org/download/ to use this improved cat! | |
| cat() { | |
| if command -v pygmentize > /dev/null; then | |
| pygmentize $1 > /dev/null 2>&1 | |
| if [ $? -eq 0 ]; then | |
| pygmentize $1 | |
| else | |
| command cat $1 | |
| fi | |
| else |
| [ | |
| { "command": "toggle_comment", "args": { "block": false } }, | |
| { "command": "move", "args": {"by": "lines", "forward": true } } | |
| ] |
| [ | |
| { "keys": ["super+shift+'"], "command": "reindent" }, | |
| { "keys": ["alt+f1"], "command": "reveal_in_side_bar" }, | |
| { "keys": ["ctrl+t"], "command": "side_bar_new_file2" }, | |
| { "keys": ["f2"], "command": "side_bar_rename" }, | |
| { "keys": ["shift+super+up"], "command": "swap_line_up" }, | |
| { "keys": ["shift+super+down"], "command": "swap_line_down" }, | |
| { "keys": ["super+backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} }, | |
| { "keys": ["super+/"], "command": "run_macro_file", "args": {"file": "Packages/User/Comment Line.sublime-macro"} }, | |
| { "keys": ["super+shift+r"], "command": "goto_symbol_in_project" }, |
| { | |
| "bold_folder_labels": true, | |
| "color_scheme": "Packages/Phix Color Scheme/Phix Dark.tmTheme", | |
| "default_line_ending": "unix", | |
| "detect_indentation": false, | |
| "dictionary": "Packages/Language - English/en_US.dic", | |
| "draw_indent_guides": true, | |
| "ensure_newline_at_eof_on_save": false, | |
| "fade_fold_buttons": false, | |
| "file_exclude_patterns": |
In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)
| # Add ’alias key='~/key.sh'’ to .bashrc or .zshrc | |
| case "$1" in | |
| "off") sudo kextunload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/ > /dev/null 2>&1 | |
| echo "Keyboard is temporary disabled" | |
| ;; | |
| "on") sudo kextload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/ > /dev/null 2>&1 | |
| echo "Keyboard is enabled again" | |
| ;; | |
| "easy") sudo -K |
| # Add ’alias key='~/key.sh'’ to .bashrc or .zshrc | |
| case "$1" in | |
| "off") echo "Keyboard is temporary disabled" | |
| sudo kextunload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/ > /dev/null 2>&1 | |
| ;; | |
| "on") echo "Keyboard is enabled again" | |
| sudo kextload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/ > /dev/null 2>&1 | |
| ;; | |
| "easy") echo "Keyboard is temporary disabled. Press ’any key’ ;) to enable" |