Skip to content

Instantly share code, notes, and snippets.

@fredrick
fredrick / couchdb.conf
Created November 28, 2011 01:43 — forked from kowsik/couchdb.conf
Upstart script for CouchDB
# Upstart file at /etc/init/couchdb.conf
# CouchDB
start on runlevel [2345]
stop on runlevel [06]
pre-start script
chown -R couchdb /usr/local/etc/couchdb
chown -R couchdb /usr/local/lib/couchdb
chown -R couchdb /usr/local/var/log/couchdb
var gistPrefix = 'https://gist.github.com/',
cachedWrite = document.write,
body = $('body'),
gists = $('p.gist').map(function(n, p) {
p = $(p);
var a = $('a', p),
href = a.attr('href');
if (a.length && href.indexOf(gistPrefix) == 0) {
@fredrick
fredrick / gist:1082811
Created July 14, 2011 16:31 — forked from tpitale/gist:162954
MongoDB init script
#! /bin/sh
### BEGIN INIT INFO
# Provides: mongodb
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the mongodb data-store
# Description: starts mongodb using start-stop-daemon
@fredrick
fredrick / ec2-manage-snapshots.rb
Created June 28, 2011 21:21 — forked from corck/AWS - EBS Snapshot Management
Simple script for creating snapshots of an EBS volume and keeping a certain number of those
#!/usr/local/bin/ruby
require 'AWS'
require 'yaml'
class SnapshotManagement
# initalize class, optional override path to yml file
# * options [String] :path ('')
#
def initialize(params = {})