Skip to content

Instantly share code, notes, and snippets.

View dillera's full-sized avatar

Andrew Diller dillera

View GitHub Profile
PROFILE=~/.bash_profile
sudo yum --enablerepo=rpmforge,epel,remi -y install gcc make zlib zlib-devel openssl-devel zsh
cd ~
test -d ~/.rbenv || git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
grep 'rbenv/bin' $PROFILE &>/dev/null || echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> $PROFILE
grep 'rbenv init' $PROFILE &>/dev/null || echo 'eval "$(rbenv init -)"' >> $PROFILE
grep 'unset RUBYLIB' $PROFILE &>/dev/null || echo 'unset RUBYLIB' >> $PROFILE
test -d ~/ruby-build || git clone https://github.com/sstephenson/ruby-build.git ~/ruby-build
cd ~/ruby-build && sudo ./install.sh
source $PROFILE

Setup a swap file in the stateful partition

Run these commands as root to create a 512 megabyte swap.

fallocate -l 512m /media/state/512MiB.swap
chmod 600 /media/state/512MiB.swap
mkswap /media/state/512MiB.swap
@dillera
dillera / bash
Created May 19, 2012 17:30 — forked from haf/bash
Installing graphite Ubuntu 11.10
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 10/13/2011
####################################
sudo apt-get update
sudo apt-get upgrade
@dillera
dillera / boss_me.sh
Last active October 2, 2015 15:28 — forked from erikh/hack.sh
OSX like a boss
#!/usr/bin/env sh
# Note- most of this is lifed from http://mths.be/osx - dotfiles
# 2013
###########################################################################
# Ask for the administrator password upfront
sudo -v
@dillera
dillera / bootstrap-ruby.sh
Created February 10, 2012 20:44
Install Ruby with rbenv/ruby-build on Centos6 with openssl
#!/bin/bash
set -e # exit on error
### README
# * installs your desired ruby versions using rbenv
# ** including openssl (needed by bundler)
# ** including sqlite (probably needed for rails apps)
#
# Before you start:
# * put ssh-keys in place