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
#!bash | |
echo 'Applying ~/.git-completion.bash code-completion stuff...' | |
# | |
# bash/zsh completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. |
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
# remap prefix to Control + q | |
set -g prefix C-q | |
unbind C-b | |
bind C-a send-prefix | |
# force a reload of the config file | |
unbind r | |
bind r source-file ~/.tmux.conf | |
# quick pane cycling |
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
" Install Vundle first: | |
" git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim | |
" | |
" Launch vim and run :PluginInstall | |
" http://stackoverflow.com/questions/10778078/vim-colorscheme-executing-but-not-changing-colors | |
set t_Co=256 | |
" https://github.com/tpope/vim-pathogen |
Use this script to automatically find where a SPEC fail was introduced. You can add it to .bash_profile
.
Syntax: run_git_bisect <bad SHA> <good SHA> <failing test file:number>
function run_git_bisect() {
[ "$#" -eq 3 ] || die "You must provide the bad SHA, good SHA and the failing test filename[:number]"
git bisect reset
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
class Outer | |
puts Module.nesting | |
A = 'outer' | |
end | |
puts Outer::A #=> outer | |
class Outer | |
class Inner | |
puts Module.nesting | |
puts A #=> outer |
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
namespace :msc do | |
namespace :db do | |
APP = 'fake-app-namer' | |
desc 'Backup the Postgres db' | |
task :backup => :environment do | |
`heroku pgbackups:capture --app #{APP}` | |
`curl -o #{backup_filename} \`heroku pgbackups:url --app #{APP}\`` | |
end |