(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
:
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 |
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" |