Skip to content

Instantly share code, notes, and snippets.


Josh Butts jimbojsb

View GitHub Profile
jimbojsb / Bash script for remote PHP Debugging
Created Feb 11, 2010
Simple Bash script to enable remote debugging of PHP Scripts in Eclipse
View Bash script for remote PHP Debugging
CMD_ARGS = "$@"
View Doctrine CLI with ZF Bootstrapper
define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
View Zend Framework Doctrine Resource
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH "/../library"
View Git Bash Prompt
PS1='[\u@\h \w\[\033[32m\]$(__git_ps1)\[\033[0m\]]$ '
jimbojsb / SwitchLayout.php
Created Jul 1, 2011
Module-specific layouts in Zend Framework
View SwitchLayout.php
class Genoa_Controller_Plugin_SwitchLayout extends Zend_Controller_Plugin_Abstract
public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)
$module = $request->getModuleName();
$layoutName = $module;
$layoutPath = APPLICATION_PATH . "/modules/$module/views/layouts";
$layout = Zend_Layout::getMvcInstance();
jimbojsb / gist:1630790
Created Jan 18, 2012
Code highlighting for Keynote presentations
View gist:1630790

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

jimbojsb / gist:1665191
Created Jan 23, 2012
Delete local / remote hotfix and RC branches
View gist:1665191
for i in $(git branch -a | grep "rc-"); do git push origin :${i#remotes/origin/}; done
jimbojsb / gist:1665345
Created Jan 23, 2012
Delete resolved jira ticket branches
View gist:1665345
for i in $(git branch | grep "OFR-"); do
xml="`wget -qO-$i/$i.xml`"
closed=`echo $xml | grep ">Closed</status"`
if [ ! $strlen == "0" ]
echo "Deleting $i"
git branch -D $i
jimbojsb / gist:1749610
Created Feb 6, 2012
How to Re-Download everything from iTunes Match
View gist:1749610
1) Create a smart playlist
2) Set the settings on the smart playlist to be "date added greater than or equal to" and choose a ridiculously early date, like 1/1/1995
3) Click the cloud download button on the playlist
4) Wait
View header
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<link href="/css/bootstrap.css" rel="stylesheet">
<link href="/css/bootstrap-responsive.css" rel="stylesheet">
You can’t perform that action at this time.