This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Enable Vim mode in ZSH | |
bindkey -v | |
autoload -U edit-command-line | |
zle -N edit-command-line | |
bindkey '^E' edit-command-line # Opens Vim to edit current command line | |
bindkey '^R' history-incremental-search-backward # Perform backward search in command line history | |
bindkey '^S' history-incremental-search-forward # Perform forward search in command line history | |
bindkey '^P' history-search-backward # Go back/search in history (autocomplete) | |
bindkey '^N' history-search-forward # Go forward/search in history (autocomplete) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* Setup this script to run when a "Pomodoro" activity has finished. It will start either "Pomodoro Break" or "Pomodoro Long Break" when finished *) | |
set activity1 to "Pomodoro Break" | |
set activity2 to "Pomodoro Long Break" | |
set button3 to "Stop Working" | |
set dialogText to "What do you want to do now?" | |
set dialogTitle to "Choose your next step..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create new remote branch | |
git push origin origin:refs/heads/new_branch_name | |
# Make sure everything is updated | |
git fetch origin | |
# Check your branch has been created | |
git branch -r | |
# Track a remote branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git status | grep deleted | cut -f2 | sed -e 's/deleted:\s*//g' | xargs git rm -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
DEFAULT_VIM_PATH='/workspace/tools/vim' | |
if [[ ! -z $1 ]]; then | |
DEFAULT_VIM_PATH=$1 | |
fi | |
rm ~/.vimrc | |
rm ~/.vim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
startup_message off | |
defscrollback 5000 | |
defutf8 on | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// includes bindings for fetching/fetched | |
var PaginatedCollection = Backbone.Collection.extend({ | |
initialize: function() { | |
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage'); | |
typeof(options) != 'undefined' || (options = {}); | |
this.page = 1; | |
typeof(this.perPage) != 'undefined' || (this.perPage = 10); | |
}, | |
fetch: function(options) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vmap <Leader>! :call ExecuteVLines()<CR> | |
function! NumSort(a, b) | |
return a:a>a:b ? 1 : a:a==a:b ? 0 : -1 | |
endfunction | |
function! ExecuteVLines() | |
let [firstline, lastline]=sort([line('v'), line('.')], 'NumSort') | |
let lines = getline(firstline, lastline) | |
exec ":!".join(lines, " && ") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ruby String Concatenation Benchmarks | |
require 'benchmark' | |
n = 100000 | |
a = "a" | |
b = "b" | |
c = "c" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update to the latest version | |
sudo apt-get update && sudo apt-get upgrade && sudo shutdown -r now | |
# Install SSH server | |
sudo apt-get install openssh-server | |
# Install basic tools | |
sudo apt-get install build-essential vim-nox curl git-core subversion | |
# Install RVM (as root, system wide) |
NewerOlder