Skip to content

Instantly share code, notes, and snippets.

Sam Adams sadams

  • London
Block or report user

Report or block sadams

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 ECS - Cars Web Dev

Cars Web Dev Test

Cars API

Please create a new git repo and follow the instructions below.

Once you have finished, please email us the URL to your repo.

Please make commits as you go (> 1 and < 100) and provide instructions to run the application.


releasing with git flow

git checkout develop
git pull

start the release branch off develop (assuming we have a current version of '1.0.0-SNAPSHOT');

git flow release start 1.0.0

in the code, update your version to '1.0.0', and commit your changes:

sadams /
Created May 21, 2015
understanding first/third party cookie behaviour

understanding first/third party cookie behaviour

scenario 1

  1. set cookie from with no domain
  2. is it readable by
  3. is it readable by
  4. is it overwritable by

scenario 2

sadams /
Last active Aug 29, 2015
notes on *nix sudoers file

notes on sudoers

to view/edit:



sadams / strange.php
Last active Dec 29, 2015
A very edge case in PHP 5.4 regarding passing objects by reference and using reflection.
View strange.php
* A very edge case in PHP 5.4 regarding passing objects by reference.
* It seems to be a compound effect of using reflection to set an inherited method as 'available',
* AND that method taking an explicitly referential argument (&argument sig)
* AND then invoking it with func_get_args() as opposed to constructing the array of args manually.
* No idea why these things all cause this behaviour or if they should.
* Important to note that this effect isn't present in PHP 5.5.
sadams / gist:4066708
Created Nov 13, 2012
OSX Mountain Lion TagMan MAMP (not "MAMP" the bundle) Notes
View gist:4066708

OSX Mountain Lion LAMP pear etc Install

If you are really lazy

Install your existing keychains on new mac (there are some files you can just copy, but i can't remember which so maybe give this a go):


  • turn on Remote Login from Sharing in System Preferences
  • Run ssh localhost, the ctrl+c to cancel (cheap way to create the .ssh directory in home dir)
  • Copy private key into .ssh dir and call it id_rsa (make sure perms are 600 or similar)
You can’t perform that action at this time.