Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
One clipboard to rule them all. Requires tmux >= 1.8. Thanks @thoughtbot
Tell vim to use the system clipboard:
" ~/.vimrc
set clipboard=unnamed " use the system clipboard
# put this in your .bash_profile | |
if [ $ITERM_SESSION_ID ]; then | |
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"; ':"$PROMPT_COMMAND"; | |
fi | |
# Piece-by-Piece Explanation: | |
# the if condition makes sure we only screw with $PROMPT_COMMAND if we're in an iTerm environment | |
# iTerm happens to give each session a unique $ITERM_SESSION_ID we can use, $ITERM_PROFILE is an option too | |
# the $PROMPT_COMMAND environment variable is executed every time a command is run | |
# see: ss64.com/bash/syntax-prompt.html |
/* Example: | |
var someUnsafeStr = '<img>'; | |
var result = escapeHTMLTag`<input value="${someUnsafeStr}">`; | |
console.log(result); // <input value="<img>"> | |
// Questions? rob {at} robwu.nl | |
// */ | |
function escapeHTML(str) { | |
// Note: string cast using String; may throw if `str` is non-serializable, e.g. a Symbol. |
#!/bin/sh | |
PROXY_INTERFACE="Wi-Fi" | |
PROXY_HOST=127.0.0.1 | |
PROXY_PORT=1080 | |
# A host where ssh can login without interaction, with a key-based | |
# authentication. | |
SOCKS_PROC_USER="username" | |
SOCKS_PROC_HOST="example.com" |
" Set the title of the Terminal to the currently open file | |
function! SetTerminalTitle() | |
let titleString = expand('%:t') | |
if len(titleString) > 0 | |
let &titlestring = expand('%:t') | |
" this is the format iTerm2 expects when setting the window title | |
let args = "\033];".&titlestring."\007" | |
let cmd = 'silent !echo -e "'.args.'"' | |
execute cmd | |
redraw! |
import gtk | |
import gio | |
import nautilus | |
# Diff browsers in priority order | |
diff_browsers = ("meld",) | |
# Version control history browsers in priority order | |
vc_browsers = ("giggle", "gitg") | |
def scan_apps(): |