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) |
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
sudo apt-get install libdjvulibre-dev libjpeg-dev libtiff-dev libwmf-dev libmagickcore-dev libmagickwand-dev libmagick++-dev rvm | |
sudo gem install rmagick | |
ok! | |
Fetching: rmagick-2.13.1.gem (100%) Building native extensions. This could take a while ... Successfully installed rmagick-2.13.1 1 gem installed | |
require 'RMagick' #=> true |
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 Chromium | |
sudo apt-add-repository ppa:chromium-daily/dev | |
sudo apt-get update && sudo apt-get install chromium-browser | |
# Install basic tools | |
sudo apt-get install build-essential vim-nox curl git-core subversion openssh-server |
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
require 'benchmark' | |
# Defined method | |
class ExampleA | |
def test | |
10000 * 10000 | |
end | |
end | |
# Method lookup |
NewerOlder