Install hub
$ vim ~/.oh-my-zsh/lib/aliases.zsh (in my case)
alias pr='hub pull-request -m "$(git reflog -1 | sed '\''s/^.*: //'\'')" | xargs open'
$ vim ~/.oh-my-zsh/lib/aliases.zsh (in my case)
alias pr='hub pull-request -m "$(git reflog -1 | sed '\''s/^.*: //'\'')" | xargs open'
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash # update to nvm@0.32.1 | |
nvm install stable # v8.9.2 is LTS | |
nvm alias default stable # default -> stable (-> v8.9.2) |
function product() { | |
var args = Array.prototype.slice.call(arguments); // makes array from arguments | |
return args.reduce(function tl (accumulator, value) { | |
var tmp = []; | |
accumulator.forEach(function (a0) { | |
value.forEach(function (a1) { | |
tmp.push(a0.concat(a1)); | |
}); | |
}); | |
return tmp; |
# put this in your .bash_profile | |
if [ $ITERM_SESSION_ID ]; then | |
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"; ':"$PROMPT_COMMAND"; | |
fi | |
########################### | |
# ~/.zshrc | |
precmd() { | |
# sets the tab title to current dir |
# $Id: screen-keys.conf,v 1.7 2010-07-31 11:39:13 nicm Exp $ | |
# | |
# By Nicholas Marriott. Public domain. | |
# | |
# This configuration file binds many of the common GNU screen key bindings to | |
# appropriate tmux key bindings. Note that for some key bindings there is no | |
# tmux analogue and also that this set omits binding some commands available in | |
# tmux but not in screen. | |
# | |
# Note this is only a selection of key bindings and they are in addition to the |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>Seti_Monokai</string> | |
<key>settings</key> | |
<array> | |
<dict> | |
<key>settings</key> |
{ | |
"Seti_pad_5": true, | |
"Seti_tabs_med": true, | |
"auto_upgrade_ignore": | |
[ | |
"Seti_UI" | |
], | |
"caret_extra_width": 0, | |
"color_scheme": "Packages/JavaScriptNext - ES6 Syntax/Monokai Phoenix.tmTheme", | |
"fade_fold_buttons": false, |
function compareNumbers(x, y) { | |
return x-y; | |
} | |
var numbers = [1,4,3,2]; | |
numbers.sort(compareNumbers); |