Skip to content

Instantly share code, notes, and snippets.

View wizardishungry's full-sized avatar
🐫
Copyright 1987-2013, Larry Wall

Jon Williams wizardishungry

🐫
Copyright 1987-2013, Larry Wall
View GitHub Profile
#!/bin/sh
VERS='master 1.0 1.1 1.2'
source ~/.bashrc
cd ~/Projects/symfony
for ver in $VERS
do
echo $ver;
git checkout $ver || exit
sleep 2;
@wizardishungry
wizardishungry / post-receive.php
Created December 29, 2008 22:01
GitHub post receive hook example -- secret support off
<?php /*
example post receive hook for github
url: http://example.com/post-receive.php?secret=amazingpasswordgoeshere
setup sudo using visudo -- these are my defaults on openbsd, YMMV
Cmnd_Alias GIT = /usr/local/bin/git
Defaults:www !authenticate
www ALL=(usernamehere) NOPASSWD: GIT
*/
@wizardishungry
wizardishungry / my-macports.sh
Created January 8, 2009 03:59
I should probably keep this utd
port install apache2 +darwin_9
port install apr
port install apr-util
port install autoconf
port install autoconf213
port install automake
port install bash-completion
port install bitchx
port install bzip2
port install cclient
@wizardishungry
wizardishungry / x-mixed-replace.php
Created January 22, 2009 19:26
Server push solution
<?php
@apache_setenv('no-gzip', 1);
@ini_set('zlib.output_compression', 0);
@ini_set('implicit_flush', 1);
function hardFlush() {
flush();
ob_flush();
}
header('Content-type: multipart/x-mixed-replace;boundary="rn9012"');
for($i=0;$i<=10;$i++)
@wizardishungry
wizardishungry / databases.yml
Created January 28, 2009 17:14
sflimetracker databases.yml modified to use mysql
all:
propel:
class: sfPropelDatabase
param:
encoding: binary
persistent: true
# mysql
param:
dsn: mysql://user:password@localhost/limetracker
@wizardishungry
wizardishungry / limetracker-assert.php
Created March 12, 2009 16:23
shared webhost sanity check for sflimetracker
<?php
/**
This continually evolving script can be dropped into a LimeTracker install and used to diagnose problems.
**/
if(isset($_GET['phpinfo'])) { phpinfo(); exit(); }
function assert_callcack($file, $line, $message) {
echo "assert failed: <code>$message</code><br>\n";
}
#!/bin/sh
# foreach argument runs git pull
for arg in $@; do
cd $arg &&
if [ -d ".git" ] ; then
/bin/echo -n "$arg: "
BRANCH=`git branch --no-color 2> /dev/null | sed -e 's/* \(.*\)/\1/'`
if [ "$BRANCH" == "master" ] ; then
git pull
#!/bin/sh
user='WIZARDISHUNGRY'
password='youdidntreallythinksodidyou'
path=~/path/to/data/delicious.xml
cd `dirname $path`
curl --user $user:$password -fsS -o $path 'https://api.del.icio.us/v1/posts/all'
git add $path
git commit -m 'automated delicious backup' > /dev/null
@wizardishungry
wizardishungry / fixtures.yml
Created March 31, 2009 19:18
Symfony on OpenBSD 4.4 seems to be having problems making fixtures work
Setting:
password:
key: password
vendor: <?php echo trackerUser::crypt('LimeTracker'),"\n"; ?>
intent:
key: intent
vendor: false
# How do I get the first "echo" to output a tab character? Using ^V in bash to get a literal control character.
find Music/{iTunes/iTunes\ Music,Mp3\ Dump} -type f -exec echo -n {} " " \; -exec md5 -q {} \; >> music-md5sums.txt