Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# NOTE: for pushd and popd to work either change the line above to #!/bin/bash
# or make sure that /bin/sh points to /bin/bash
#
# To enable this hook, rename this file to "post-update".
WORKDIR="/home/kevin/houses"
export GIT_DIR="$WORKDIR/.git"
pushd $WORKDIR > /dev/null
git pull
#!/bin/bash
THE_DATE="$(date '+%Y-%m-%d')"
BACKUP_DIR="/Users/`whoami`/Desktop/db-backups/"
MYSQL_HOST="localhost"
MYSQL_USER="root"
MYSQL_PASS=""
MYSQL_BACKUP_DIR="$BACKUP_DIR"
MYSQL_PATH="$(which mysql)"
@kevinold
kevinold / .bashrc
Created May 22, 2009 00:17 — forked from henrik/.bashrc
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# username@Machine ~/dev/dir[master]$ # clean working directory
# username@Machine ~/dev/dir[master*]$ # dirty working directory
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
@kevinold
kevinold / base58.rb
Created June 24, 2009 17:01 — forked from jou/base58.rb
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
#
# Copyright (C) 2004 Sam Hocevar
# 14 rue de Plaisance, 75014 Paris, France
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long
# as the name is changed.
#
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
##
# Calendar helper with proper events
# http://www.cuppadev.co.uk/webdev/making-a-real-calendar-in-rails/
#
# (C) 2009 James S Urquhart (jamesu at gmail dot com)
# Derived from calendar_helper
# (C) Jeremy Voorhis, Geoffrey Grosenbach, Jarkko Laine, Tom Armitage, Bryan Larsen
# Licensed under MIT. http://www.opensource.org/licenses/mit-license.php
##
@kevinold
kevinold / gist:189318
Created September 18, 2009 21:56
jquery.droppy patch to keep item "sticky"
# Patch to keep top menu item "sticky" if when you want it to be so
# <li class="hover sticky"><a href="#"></a></li>
diff --git a/public/javascripts/jquery.droppy.js b/public/javascripts/jquery.droppy.js
index 13fda9c..ed85e25 100644
--- a/public/javascripts/jquery.droppy.js
+++ b/public/javascripts/jquery.droppy.js
@@ -64,7 +64,7 @@
$('li', this).hover(
@kevinold
kevinold / gist:191368
Created September 22, 2009 20:04 — forked from peterc/gist:33337
Fully featured Rails template (for Rails 2.3)
# SUPER DARING APP TEMPLATE 1.0
# By Peter Cooper
# Link to local copy of edge rails
inside('vendor') { run 'ln -s ~/dev/rails/rails rails' }
# Delete unnecessary files
run "rm README"
run "rm public/index.html"
run "rm public/favicon.ico"
@kevinold
kevinold / VPS Setup Shell Script
Created October 22, 2009 16:48 — forked from traviskroberts/gist:151026
CentOS 5.3 VPS Setup Shell Script
#!/bin/bash
# You must run as root!!! (or sudo)
#####################
##### IMPORTANT #####
#####################
# Add the following entry to /etc/yum.repos.d/rubyworks.repo:
#
# [rubyworks]
@kevinold
kevinold / prawn_term_sheet.rb
Created October 22, 2009 19:25 — forked from mileszs/prawn_term_sheet.rb
Testing Prawn PDF generation
#!/usr/bin/ruby -w
#
# Testing Prawn PDF generation
require 'rubygems'
require 'prawn'
require 'prawn/layout'
require 'prawn/format'
class TermSheet < Prawn::Document
Commit ID 3402539563b03641dcf3ded704f546f7ad13d649
Fetching Transfer.pm v 1.167.2.4
Update Transfer.pm: 174668 bytes
Delete i/oa/deOpenAirIntacct.gif
Fetching i/oa/deOpenAirIntacct2.gif v 1.1.2.1
Update i/oa/deOpenAirIntacct2.gif: 1096 bytes
Tree ID 082dec35de1964fb8501005e746abf23c31b4216
Parent ID d57d33c95c3573b3cda63b6fe30d3b375703b426
Committed patch 7735 (release_062101_branch +0000 2001-06-28 17:41:19)
Commit ID 40cabbf7e3d1e4fd7148538ff557a14220d0b657