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/sh | |
GIT_WORK_TREE=/home/username/webapps/django/myproject git checkout -f | |
GIT_WORK_TREE=/home/username/webapps/django/myproject git reset --hard |
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://mesmor.com/2012/03/18/akamai-pragma-debug-headers/ | |
alias akacurl='curl -v -s -o /dev/null -H "accept-encoding: gzip" -H "Pragma: akamai-x-get-cache-key" -H "Pragma: akamai-x-cache-on" -H "Pragma: akamai-x-cache-remote-on" -H "Pragma: akamai-x-get-true-cache-key" '; | |
akacurl http://example.com/akamai-test-object.html; |
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
# Push changes from development branch into production | |
# Add to .git/config | |
[alias] | |
deploy = !sh -c 'git checkout master && git merge development && git checkout development && git push --all' |
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
# add .tpl for smarty files | |
--type-set=smarty=.tpl | |
--type-set=tpl=.tpl | |
# plain text CSV files | |
--type-set=csv=.txt,.csv,.tsv | |
# CSS/LESS | |
--type-set=css=.css,.less |
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/expect | |
# set variables | |
set username example@example.com | |
set password changeme | |
set certificate_accept y | |
spawn mount -t davfs https://www.box.com/dav/ /mnt/box.net/ | |
# Look for username prompt | |
expect "username:" |
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
for w in 320 640 960; | |
do webkit2png -Fs 1 -W $w -o $w$(date +%Y%m%d-%H%M%S) "http://mediaqueri.es"; | |
done |
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
<?php | |
// return host name from server for debugging purposes | |
header('X-App-Host: served from ' . php_uname('n')); |
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/sh | |
cd /path/to/project/ || exit | |
unset GIT_DIR | |
LOGFILE=deployments.log | |
echo $(date) >> $LOGFILE | |
git pull origin master >> $LOGFILE | |
git update-server-info | |
echo $(git rev-parse --short HEAD) > VERSION |
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
{ | |
"firebase": "example-site", | |
"public": "public", | |
"redirects": [ | |
{ | |
"source" : "/blog/**/**", | |
"destination" : "http://blog.example-site.com/$1", | |
"type" : 302 | |
} | |
] |
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/sh | |
PROJECTPATH=$(git rev-parse --show-toplevel) | |
echo $(git rev-parse --short HEAD) > $PROJECTPATH/VERSION |