Skip to content

Instantly share code, notes, and snippets.

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost db001 db002 db003 db004 web030 web048
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost

Poor Man's Deploy

  • Start a Sinatra server on port 4000
  • GET / to that server triggers a git pull and mod_rails restart
  • Hit port 4000 locally after pushing

Why?

# put this in ~/.bash_profile or whatever
ruby_or_irb () {
if [ "$1" == "" ]; then
irb
else
ruby "$@"
fi
}
alias ruby="ruby_or_irb"
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
#!/bin/sh
#
# Will append the current Lighthouse ticket number to the commit message automatically
# when you use the 1234-foo-bar branch naming convention.
#
# Drop into .git/hooks/commit-msg
# chmod +x .git/hooks/commit-msg
exec < /dev/tty
@miketierney
miketierney / gist:69768
Created February 24, 2009 20:36 — forked from loe/gist:69444
class Group < ActiveRecord::Base
belongs_to :location
validates_presence_of :name, :location_id
def self.sort(page, order)
options = {}
if order == 'location'
options[:order] = 'location_id'
#!/bin/sh
#
# Will append the current Lighthouse ticket number to the commit message automatically
# when you use the 1234-foo-bar branch naming convention.
#
# Drop into .git/hooks/commit-msg
# chmod +x .git/hooks/commit-msg
exec < /dev/tty