Skip to content

Instantly share code, notes, and snippets.

View thirdknife's full-sized avatar

Shakeel thirdknife

  • Waterloo, Ontario
View GitHub Profile
@thirdknife
thirdknife / drupal-quick-dump.sh
Created November 16, 2012 15:17 — forked from timmillwood/drupal-quick-dump.sh
Script to dump Drupal database structure, but exclude data from massive/unneeded tables.
#!/bin/bash
# usage: drupal-quick-dump user host database
USER="$1"
HOST="$2"
DB="$3"
DATE=`date +%Y%m%d`
# Get User Password
echo "Please provide the password for ${USER} on db ${DB} hosted at ${HOST}:"
@thirdknife
thirdknife / pre-receive.sh
Created March 30, 2012 14:35
My pre-receive hook to update my website when I "git push origin master:live"
#!/bin/sh
while read old new branch
do
case "$new-$branch" in
000000000000000000*)
: echo "ignore deleted"
;;
*-refs/heads/live )
echo "UPDATING LIVE SITE";
git archive $new | (
stdin: is not a tty
@thirdknife
thirdknife / npm install on node v0.4.12
Created September 20, 2011 21:54
npm installation failed
/node$ sudo curl http://npmjs.org/install.sh | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5100 100 5100 0 0 4100 0 0:00:01 0:00:01 --:--:-- 8793
fetching: http://registry.npmjs.org/npm/-/npm-1.0.30.tgz
0.4.12
1.0.30
cleanup prefix=/usr/local
All clean!