Skip to content

Instantly share code, notes, and snippets.

View travisdahlke's full-sized avatar

Travis Dahlke travisdahlke

View GitHub Profile
@mterwill
mterwill / USAGE.md
Last active February 16, 2024 09:23
Beancount importers, scripts, etc.

Note: everything here is pretty specific to my usage/accounts and not written for public use... You'll probably have to tweak a bunch of stuff.

$ bean-extract config.py ~/Downloads # the csvs should be in here
@jphenow
jphenow / aliased_attributes.rb
Last active December 17, 2015 13:09
Get the attributes of a mongoid object with their aliased names as the keys
class Game
include Mongoid::Document
def aliased_attributes
attributes.inject({}) { |attrs, (raw_key, raw_value)|
attrs[Game.aliased_fields.invert.fetch(raw_key) { raw_key }] = raw_value
attrs
}
end
end
@flomotlik
flomotlik / Gemfile
Created May 6, 2012 09:46 — forked from leshill/Procfile
Unicorn config for cedar stack on Heroku.
gem 'unicorn'