Skip to content

Instantly share code, notes, and snippets.

Jeremy Worboys jeremyworboys

Block or report user

Report or block jeremyworboys

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View PushId.php
* Fancy ID generator that creates 20-character string identifiers with the following properties:
* 1. They're based on timestamp so that they sort *after* any existing ids.
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs.
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly).
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the
* latter ones will sort after the former ones. We do this by using the previous random bits
View Vagrantfile
$provision_v8js = <<SCRIPT
apt-get install -y libv8-dev
yes | pecl install v8js-0.1.3
echo "" > /etc/php5/mods-available/v8js.ini
php5enmod v8js
config.vm.provision "shell", inline: $provision_v8js

Keybase proof

I hereby claim:

  • I am jeremyworboys on github.
  • I am jeremyworboys ( on keybase.
  • I have a public key whose fingerprint is 0736 97FD 69CB 1DE3 53FE F640 3EE1 8861 E834 E7AE

To claim this, I am signing this object:

View AnnotatedEntityTrait.php
namespace Domain\Entities\Traits;
* Annotated entity trait
trait AnnotatedEntityTrait
/** @var array */
jeremyworboys / .zshrc
Last active Aug 29, 2015
Personal Vagrant Provisions
View .zshrc
export ZSH=$HOME/.oh-my-zsh
plugins=(bower composer cp git laravel4 npm common-aliases pip python virtualenv)
source $ZSH/
View .zalias
alias c='clear'
alias l="ls -FlAGh"
alias lo="ls -FlAGh | awk '{k=0;for(i=0;i<=8;i++)k+=((substr(\$1,i+2,1)~/[rwx]/)*2^(8-i));if(k)printf(\"%0o \",k);print}'"
alias server="php -S"
alias clearcache="sudo killall -HUP mDNSResponder"
alias pubkey="/bin/cat ~/.ssh/ | pbcopy"
alias name="uname -n | tee /dev/ttys001 | pbcopy"
alias art="php artisan"
alias test="clear && phpunit"
jeremyworboys / laravel
Last active Aug 29, 2015
Personal Laravel project bootstrapper
View laravel
# Get project name
if [[ $1 == "" ]]
echo -n "Enter project name (or domain): "
if [[ $PROJECT_NAME == "" ]]
jeremyworboys /
Created Jan 28, 2014
Domain Independent wp-config.php

Dynamic Wordpress Config

This makes Wordpress play super friendly with Git :)


  1. Copy and paste this snippet in wp-config.php
  2. Enter the hostname of your production server on line 24
  3. Setup your database credentials for production and development (you can add more environments by adding a new case using that server's hostname)
  4. Replace the keys and salts block with the contents of
jeremyworboys / Data only.html
Created Oct 27, 2013
Separation of concerns with MVVM EE Stash
View Data only.html
{!-- model.html --}
{exp:stash:set_list name="images"}
View DefaultsModel.php
trait DefaultsModel {
* Default values to seed the model with
* @var Array
protected $defaults = array();
You can’t perform that action at this time.