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
### Keybase proof | |
I hereby claim: | |
* I am pdt256 on github. | |
* I am pdt256 (https://keybase.io/pdt256) on keybase. | |
* I have a public key ASBrAG7Qlw1I_IRWVcziZjByzxVzFoojqxjsMSZMr3ybuAo | |
To claim this, I am signing this object: |
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 | |
namespace path\to\Lib; | |
use Doctrine; | |
use path\to\Doctrine\Extensions\TablePrefix; | |
class DoctrineHelper | |
{ | |
protected $tablePrefix = 'yourprefix_'; | |
protected $eventManager; |
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 | |
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` | |
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php` | |
# Determine if a file list is passed | |
if [ "$#" -eq 1 ] | |
then | |
oIFS=$IFS | |
IFS=' |
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
convert *.jpg -quality 25 -resize 50% -adjoin -rotate 90 -colorspace Gray output.pdf |
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
sudo apt-get update | |
sudo apt-get install build-essential libapr1-dev libconfuse-dev libexpat1-dev python-dev libpcre3-dev pkg-config | |
GANGLIA_VER=ganglia-3.3.7 | |
cd /usr/local/src && \ | |
sudo chown ubuntu . && \ | |
wget --user ahl --password auto4fun http://ganglia.auto.com/$GANGLIA_VER.tar.gz && \ | |
tar zxf $GANGLIA_VER.tar.gz && \ | |
cd $GANGLIA_VER && \ |
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
# brew install bash-git-prompt | |
# get full path: $(brew --prefix bash-git-prompt)/share/gitprompt.sh | |
if [ -f /usr/local/opt/bash-git-prompt/share/gitprompt.sh ]; then | |
GIT_PROMPT_THEME=Default | |
source /usr/local/opt/bash-git-prompt/share/gitprompt.sh | |
fi | |
# brew install bash-completion | |
# get full path: $(brew --prefix)/etc/bash_completion | |
if [ -f /usr/local/etc/bash_completion ]; then |
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/env php | |
<?php | |
/** | |
* Converts command line output into an html file for any browser | |
* | |
* @author Jamie Isaacs | |
* @package default | |
**/ | |
/** |
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/env php | |
<?php | |
/** | |
* Converts grep and ack output (file:line:matching text) into TextMate links so | |
* you can click them to open the file. | |
* | |
* @author Anthony Bush | |
* @copyright Anthony Bush (http://anthonybush.com/), 12 February, 2010 | |
* @package default | |
**/ |
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 | |
tmpAckm="$@"; | |
ack "$@" | mack --cmd="ack $tmpAckm" |
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 | |
$now = time(); | |
$live_date = strtotime('2012-03-20 00:00:00'); | |
echo $now . ' - ' . $live_date; | |
echo "\n"; | |
echo date('c', $now) . ' - ' . date('c', $live_date); | |
echo "\n"; |
NewerOlder