Skip to content

Instantly share code, notes, and snippets.

View bofrede's full-sized avatar

Bo Frederiksen bofrede

View GitHub Profile
@bofrede
bofrede / chef_solo_bootstrap.sh
Last active December 17, 2015 12:08 — forked from ryanb/chef_solo_bootstrap.sh
Script to run on a new Linux server, to prepare for Chef.
#!/usr/bin/env bash
# Run this script, as root, on a prestine server, with:
# sudo su
# curl -L https://gist.githubusercontent.com/bofrede/5607048/raw/chef_solo_bootstrap.sh | bash
apt-get -y update
apt-get -y install software-properties-common lib64readline-gplv2-dev
apt-get -y install build-essential zlib1g-dev lib64z1-dev libssl-dev libyaml-dev libxml2-dev libxslt1-dev libffi-dev
echo 'gem: --no-rdoc --no-ri' > /etc/gemrc
ln -s /etc/gemrc ~/.gemrc
add-apt-repository ppa:brightbox/ruby-ng
@bofrede
bofrede / hack.sh
Created April 10, 2012 20:33 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env bash
##
# This is a script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# Download and auto-run with:
# $ curl -sL https://raw.github.com/gist/2108403/hack.sh | bash
#
# or download and prompt before change defaults:
@bofrede
bofrede / sl_gems_update.rb
Created December 28, 2009 16:24 — forked from mattetti/sl_gems_update.rb
List gems using C extensions
#!/usr/bin/env ruby
puts "looking for the gems to upgrade..."
gem_info = Struct.new(:name, :version)
to_reinstall = []
Dir.glob('/Library/Ruby/Gems/**/*.bundle').map do |path|
path =~ /.*1.8\/gems\/(.*)-(.*?)\/.*/
name, version = $1, $2
bundle_info = `file path`
to_reinstall << gem_info.new(name, version) unless bundle_info =~ /bundle x86_64/
end