Skip to content

Instantly share code, notes, and snippets.

Jesse Chan-Norris jcn

Block or report user

Report or block jcn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:10098871
### Keybase proof
I hereby claim:
* I am jcn on github.
* I am jcn ( on keybase.
* I have a public key whose fingerprint is 8D3B 04F7 AE5F 3DDB 30C2 6491 A5F7 A010 1B1A 1CE5
To claim this, I am signing this object:
jcn / gist:7345965
Created Nov 6, 2013
Ruby alternatives setup for debian squeeze
View gist:7345965
sudo update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.9.1 500 \
--slave /usr/bin/ri ri /usr/bin/ri1.9.1 \
--slave /usr/bin/irb irb /usr/bin/irb1.9.1 \
--slave /usr/bin/gem gem /usr/bin/gem1.9.1 \
--slave /usr/bin/rake rake /usr/bin/rake1.9.1 \
--slave /usr/bin/bundle bundle /var/lib/gems/1.9.1/bin/bundle \
--slave /usr/share/man/man1/ruby.1.gz ruby.1.gz /usr/share/man/man1/ruby1.9.1.1.gz \
--slave /usr/share/man/man1/irb.1.gz irb.1.gz /usr/share/man/man1/irb1.9.1.1.gz \
--slave /usr/share/man/man1/gem.1.gz gem.1.gz /usr/share/man/man1/gem1.9.1.1.gz \
--slave /usr/share/man/man1/ri.1.gz ri.1.gz /usr/share/man/man1/ri1.9.1.1.gz \
View bash prompt with git repository
function parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1) /'
function breadcrumb()
echo $1 | sed "s|^$HOME|~|" | awk -v n=$2 '{
# Split the path into components
count = split($0, components, "/")
View gist:183735
=> nil
>> require 'vlad'
=> true
Vlad::ConfigurationError: Please specify the repository path via the :repository variable
from /opt/local/lib/ruby/gems/1.8/gems/vlad-1.3.2/lib/rake_remote_task.rb:353:in `mandatory'
from /opt/local/lib/ruby/gems/1.8/gems/vlad-1.3.2/lib/rake_remote_task.rb:310:in `call'
from /opt/local/lib/ruby/gems/1.8/gems/vlad-1.3.2/lib/rake_remote_task.rb:310:in `fetch'
from /opt/local/lib/ruby/gems/1.8/gems/vlad-1.3.2/lib/rake_remote_task.rb:363:in `protect_env'
jcn / gist:107810
Created May 6, 2009
rake vlad:deploy:pending for git
View gist:107810
namespace :deploy do
remote_task :pending, :roles => :app do
output = run ["cd #{scm_path}", "cd repo", "echo #{source.revision(revision)}"].join(" && ")
revisions = `git log #{output.strip}..#{source.revision(revision)}`
puts "undeployed revisions:\n#{revisions}"
You can’t perform that action at this time.