Skip to content

Instantly share code, notes, and snippets.

View obmarg's full-sized avatar

Graeme Coupar obmarg

  • London
  • 22:07 (UTC +01:00)
View GitHub Profile
@obmarg
obmarg / README.md
Last active August 29, 2015 14:18 — forked from joakimk/README.md

This runs a build for a small elixir (phoenix) project in about 40 seconds by caching as much of the compiled files as possible. It's not been run for very long so I don't know if it caches too much or of there is any other issues.

It should be generic enough to work on any elixir app using mix.

@obmarg
obmarg / get.py
Last active January 2, 2016 20:59 — forked from honza/get.py
"""
Clojure-inspired ``get_in`` function which gets value from nested dicts,
returning ``None`` if a key is not found.
"""
import operator
def get_in(obj, *keys):
try:
return reduce(operator.getitem, keys, obj)
except (KeyError, IndexError):