Skip to content

Instantly share code, notes, and snippets.

sadams / gist:4066708
Created November 13, 2012 16:17
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)
sadams / strange.php
Last active December 29, 2015 17:29
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 /
Last active August 29, 2015 14:20
notes on *nix sudoers file

notes on sudoers

to view/edit:



sadams /
Created May 21, 2015 09:56
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 /
Created May 21, 2015 16:25
git flow release

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:

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.

View splash_crawlera.lua
function use_crawlera(splash)
local password = ''
local host = ''
local port = 8011
local session_header = 'X-Crawlera-Session'
local session_id = 'create'
splash:on_request(function (request)
request:set_proxy(host, port, 'PUT_CRAWLERA_AUTH_HERE', password)
request:set_header('X-Crawlera-Profile', 'desktop')