Skip to content

Instantly share code, notes, and snippets.

View jessedearing's full-sized avatar

Jesse Dearing jessedearing

View GitHub Profile
@jessedearing
jessedearing / cleanup.sh
Created April 12, 2012 17:48 — forked from mdp/cleanup.sh
Git branch cleanup
#!/bin/bash
# This must be run from master
git checkout master
# Update our list of remotes
git fetch
git remote prune origin
# Remove local fully merged branches
git branch --merged master | grep -v 'master$' | xargs git branch -d
# Show remote fully merged branches
@jessedearing
jessedearing / gist:2351836
Created April 10, 2012 14:44 — forked from twoism-dev/gist:1183437
Create self-signed SSL certificate for Nginx
#!/bin/bash
echo "Generating an SSL private key to sign your certificate..."
openssl genrsa -des3 -out myssl.key 1024
echo "Generating a Certificate Signing Request..."
openssl req -new -key myssl.key -out myssl.csr
echo "Removing passphrase from key (for nginx)..."
cp myssl.key myssl.key.org
openssl rsa -in myssl.key.org -out myssl.key
# unicorn_rails -c /data/github/current/config/unicorn.rb -E production -D
# Need this for Capistrano or Capistrano-like deploys
# Running working directory will always be the hard
# coded directory instead of the symlink
working_directory '/data/github/current'
rails_env = ENV['RAILS_ENV'] || 'production'
# 16 workers and 1 master
module Scopes
attr_writer :church_id
# evaluates to
# instance_eval do
# def church_id
# @church_id
# end
# def church_id=(value)
# @church_id = value
# end