View post-update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
View dump-all-dbs.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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)" |
View .bashrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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)]/" |
View base58.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
View Making a Real Calendar in Rails.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# 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 | |
## | |
View gist:189318
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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( |
View gist:191368
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
View VPS Setup Shell Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# You must run as root!!! (or sudo) | |
##################### | |
##### IMPORTANT ##### | |
##################### | |
# Add the following entry to /etc/yum.repos.d/rubyworks.repo: | |
# | |
# [rubyworks] |
View prawn_term_sheet.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby -w | |
# | |
# Testing Prawn PDF generation | |
require 'rubygems' | |
require 'prawn' | |
require 'prawn/layout' | |
require 'prawn/format' | |
class TermSheet < Prawn::Document |
View gist:222600
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
OlderNewer