Skip to content

Instantly share code, notes, and snippets.

View assaf's full-sized avatar

Assaf Arkin assaf

View GitHub Profile
@assaf
assaf / deploy.sh
Created February 16, 2012 00:02
Deploy using chef-solo
# Run command(s) over SSH
run() {
ssh deploy@${HOST} -t $* || exit 1
}
# Transfer all the specified files/directories to working directory
upload() {
tar czf - $* | ssh deploy@${HOST} tar xzf - -C /etc/chef || exit 1
}
@assaf
assaf / gist:2002917
Created March 8, 2012 19:40
.gitconfig
[color]
branch = auto
diff = auto
status = auto
sh = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
@assaf
assaf / gist:2002956
Created March 8, 2012 19:47
.gitignore
*.swp
*~
*.DS_Store
.svn
tags
CVS/
@assaf
assaf / gist:2002967
Created March 8, 2012 19:49
.tmux.conf
# Set the prefix to Alt-A, also support Ctrl-B
set -g prefix M-a
set -g prefix2 C-b
bind-key M-a send-prefix
set -g mode-keys vi
# Switch windows using Alt-Left/Right/Number
# Select window by name using Alt-Down
# Open new window using Alt-N
bind -n M-Left prev
bind -n M-Right next
@assaf
assaf / .bashrc
Created May 21, 2013 19:45
.bashrc
# ----------------------------------------------------------------------
# SHELL OPTIONS
# ----------------------------------------------------------------------
# notify of bg job completion immediately
set -o notify
# Prevents history expansion, so commit -m "Yay!" will work.
set +o histexpand
# Warn when trying to overwrite file.
set -o noclobber
@assaf
assaf / .inputrc
Created May 21, 2013 19:46
.inputrc
set horizontal-scroll-mode off
set mark-modified-lines on
"\C-J": menu-complete
"\C-r": redraw-current-line
# By default up/down are bound to previous-history
# and next-history respectively. The following does the
# same but gives the extra functionality where if you
# type any text (or more accurately, if there is any text
# between the start of the line and the cursor),
@assaf
assaf / .vimrc
Created May 21, 2013 19:50
.vimrc
version 7.0
if &cp | set nocp | endif
let s:cpo_save=&cpo
set cpo&vim
let &cpo=s:cpo_save
unlet s:cpo_save
set cscopeprg=/usr/bin/cscope
set cscopetag
set cscopeverbose
set fileencodings=utf-8,latin1
@assaf
assaf / gist:9674758
Last active August 29, 2015 13:57
Mix use
// Liberally adapted from our test suites, which uses generators for complex steps (before/after/etc).
describe("With new customer", function() {
let business;
let customer1, customer2, customer3;
before(function*() {
// We have many tests, but you can only call listen() once
// on an HTTP server, so this is a case for resolve-once, and
// we use a promise.
yield Server.listen();
@assaf
assaf / gist:6bc56255459aa75f27b3
Created July 9, 2014 00:43
.git/hook/pre-commit
#!/bin/sh
#
# Run npm shrinkwrap on every commit, make sure we have the most recent
# dependencies checked into git.
DEPTH=10 # Set this to N to include more descendants in shrinkwrap
PATH=/usr/local/bin:$PATH
# Success or error, npm shrinkwrap will output to both stdout and stderr.
# We're only interested in what stderr has to say when it fails.

Keybase proof

I hereby claim:

  • I am assaf on github.
  • I am assaf (https://keybase.io/assaf) on keybase.
  • I have a public key whose fingerprint is E318 FD85 22D4 CBAE 142D F811 43A7 A5CA 24D1 FDF5

To claim this, I am signing this object: