Skip to content

Instantly share code, notes, and snippets.

View ryanwilsonperkin's full-sized avatar

Ryan Wilson-Perkin ryanwilsonperkin

View GitHub Profile
@ryanwilsonperkin
ryanwilsonperkin / deep_get.py
Last active March 8, 2016 17:22
Python method for fetching deeply nested dict keys à la ImmutableJS.getIn
def deep_get(o, keys):
return reduce(lambda prev, current: prev.get(current, {}), keys, o) or None
@ryanwilsonperkin
ryanwilsonperkin / react_links.md
Last active September 25, 2025 20:45
Useful links for those new to the react ecosystem
@ryanwilsonperkin
ryanwilsonperkin / ldapuser.sh
Created September 13, 2014 02:06
Register a shell function called ldapuser to search the University of Guelph's LDAP server for a record with the given username.
# Use as `ldapuser username` to lookup ldap record for "username"
function ldapuser {
ldapsearch -x -H ldap://directory.uoguelph.ca -b "ou=People,o=uoguelph.ca" "uid=$1"
}
@ryanwilsonperkin
ryanwilsonperkin / git_up_git_out.sh
Created June 3, 2014 17:18
Version control the way OutKast intended.
# http://www.youtube.com/watch?v=CssC-DY4lO8
git config alias.up commit
git config alias.out push
git config alias.something pull