Skip to content

Instantly share code, notes, and snippets.

View sax's full-sized avatar

Eric Saxby sax

View GitHub Profile
@sax
sax / rmagick-install.sh
Created February 8, 2010 18:50
install imagemagick + dependencies
#!/bin/sh
cd ~/Downloads
echo ":::::::::: WGET"
# install wget, which is cleverer than curl
curl -O http://ftp.gnu.org/gnu/wget/wget-1.11.tar.gz
tar zxvf wget-1.11.tar.gz
cd wget-1.11
./configure --prefix=/usr/local
@sax
sax / partials.rb
Created April 6, 2010 16:38 — forked from lenary/partials.rb
partials for sinatra
# stolen from http://github.com/cschneid/irclogger/blob/master/lib/partials.rb
# and made a lot more robust by me
# this implementation uses erb by default. if you want to use any other template mechanism
# then replace `erb` on line 13 and line 17 with `haml` or whatever
require 'sinatra/base'
module Sinatra
module Partials
def partial(template, *args)
@sax
sax / gitconfig
Created July 6, 2010 23:46
git config
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
@sax
sax / nginx conf
Created July 13, 2010 20:27
nginx passenger config
#user nobody;
worker_processes 1;
daemon off;
error_log /var/log/nginx/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
pid /var/run/nginx.pid;
@sax
sax / nginx.plist
Created July 13, 2010 21:23
like apachectl, but for nginx
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key><string>nginx</string>
<key>Program</key><string>/usr/local/sbin/nginx</string>
<key>KeepAlive</key><true/>
<key>NetworkState</key><true/>
<key>StandardErrorPath</key><string>/var/log/nginx/error.log</string>
@sax
sax / eclipse3.media.tmTheme
Created July 15, 2010 01:03
textmate theme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>eclips3.media (ECLM)</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@sax
sax / nginx.conf
Created September 7, 2010 22:49
unicorn + nginx on launchd
user sax staff;
worker_processes 1;
daemon off;
error_log /var/log/nginx/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
pid /var/run/nginx.pid;
@sax
sax / gist:3113693
Created July 14, 2012 22:24
set up basic zone in SmartOS within VirtualBox
## Set up SmartOS in VirtualBox
# http://www.perkin.org.uk/posts/automated-virtualbox-smartos-installs.html
# set up global zone with Joyent datasets
if [[ ! -e /var/db/imgadm/sources.list || `grep -v "https://datasets.joyent.com/datasets" /var/db/imgadm/sources.list` ]]; then
echo "https://datasets.joyent.com/datasets" >> /var/db/imgadm/sources.list
fi
imgadm update
@sax
sax / gist:3887466
Created October 14, 2012 05:17
vagrant omnios
gem install vagrant
vagrant box add omnios http://omnios.omniti.com/media/omnios-latest.box
vagrant init omnios
vagrant up
{
 "brand": "joyent",
 "dataset_uuid": "60a3b1fa-0674-11e2-abf5-cb82934a8e24",
 "alias": "base64",
 "hostname": "base64",
 "max_physical_memory": 512,
 "quota": 20,
 "nics": [
  {
    "interface": "net0",