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 git-flow-release.md

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
sadams / party-cookies.md
Created May 21, 2015
understanding first/third party cookie behaviour
View party-cookies.md

understanding first/third party cookie behaviour

scenario 1

  1. set cookie from foo.example.com with no domain
  2. is it readable by foo.example.com?
  3. is it readable by bar.example.com?
  4. is it overwritable by bar.example.com?

scenario 2

@sadams
sadams / sudoers-notes.md
Last active Aug 29, 2015
notes on *nix sudoers file
View sudoers-notes.md

notes on sudoers

to view/edit:

/etc/sudoers

or

visudo
@sadams
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
<?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
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): http://osxdaily.com/2012/07/05/copy-keychain-login-passwords-between-macs/

SSH

  • 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.