Skip to content

Instantly share code, notes, and snippets.

@yarinb
yarinb / ubuntu-11.10-gems.erb
Created October 18, 2011 23:33 — forked from kashif/ubuntu-11.10-gems.erb
Chef bootstrap With rvm and ruby 1.9.2 on ubuntu 11.10
bash -c '
<% if knife_config[:bootstrap_proxy] -%>
(
cat <<'EOP'
<%= "proxy = #{knife_config[:bootstrap_proxy]}" %>
EOP
) > ~/.curlrc
<% end -%>
if [ ! -f /usr/bin/chef-client ]; then
@yarinb
yarinb / rbenv-install-system-wide.sh
Created October 11, 2011 12:51
rbenv install and system wide install on Ubuntu 10.04 LTS.
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Extras for RubyGems and Rails:
apt-get -y install zlib1g-dev
apt-get -y install libssl-dev libsqlite3-dev
apt-get -y install libreadline5-dev
@yarinb
yarinb / env
Created September 27, 2011 18:19
current env
# This loads some niceties for irb, courtesy of rvm.
# It also loads your custom ~/.irbrc if it exists.
# If you want to customize the irbrc for ONLY this version of
# ruby then edit this file. It will only be deleted if you do
# an "rvm install" over this ruby version.
if ENV["rvm_path"].nil?
require File.join(ENV["HOME"], "irbrc")
else
@yarinb
yarinb / jirb
Created September 27, 2011 18:09
Jirb doesn't work properly without JRUBY_OPTS
➜ ~ rvm use jruby
Using /Users/yarinb/.rvm/gems/jruby-1.6.4
➜ ~ which jirb (jruby-1.6.4)
/Users/yarinb/.rvm/rubies/jruby-1.6.4/bin/jirb
➜ ~ jirb (jruby-1.6.4)
Object.new
Object.new
#<Object:0x62565cf8>
1+1
1+1
@yarinb
yarinb / git-setup.sh
Created August 16, 2011 16:28
Git setup niceties
# via https://gist.github.com/419201#file_gitconfig.bash
# Install (from Matt's gist) these useful Git aliases & configurations with the following command:
# $ bash <(curl -s https://raw.github.com/gist/419201/gitconfig.bash)
git config --global color.ui auto # colorize output (Git 1.5.5 or later)
git config --global color.interactive auto # and from 1.5.4 onwards, this will works:
echo "Set your name & email to be added to your commits."
echo -n "Please enter your name: "