Skip to content

Instantly share code, notes, and snippets.

View thirdknife's full-sized avatar

Shakeel thirdknife

  • Waterloo, Ontario
View GitHub Profile
@thirdknife
thirdknife / 0_reuse_code.js
Created November 28, 2013 17:52
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@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 | (