Skip to content

Instantly share code, notes, and snippets.

View cmartin81's full-sized avatar

Christian Martin cmartin81

  • Transponder / Martin Consulting
  • Hvalstad
View GitHub Profile
@kmile
kmile / xml_parser.rb
Created February 15, 2011 12:53
A small nokogiri xml reader DSL.
# A small DSL for helping parsing documents using Nokogiri::XML::Reader. The
# XML Reader is a good way to move a cursor through a (large) XML document fast,
# but is not as cumbersome as writing a full SAX document handler. Read about
# it here: http://nokogiri.org/Nokogiri/XML/Reader.html
#
# Just pass the reader in this parser and specificy the nodes that you are interested
# in in a block. You can just parse every node or only look inside certain nodes.
#
# A small example:
#
@larsar
larsar / heroku_deployment_workflow
Created October 11, 2012 18:24
Heroku deployment workflow
Gjenskape produksjon:
Backup av staging og prod database:
heroku pgbackups:capture --remote staging
heroku pgbackups:capture --remote production
Clean staging-database:
heroku pg:reset DATABASE_URL --remote staging
# Checkout
git tag # List tagged versions
git checkout -b prodfix <version> # Checkout specific version into prodfix branch
# Fix code and commit
# Test in staging (requires compatible database state)
git push staging +HEAD:master # Push to staging
# Put in producton
@jeffmo
jeffmo / gist:054df782c05639da2adb
Last active January 11, 2024 06:05
ES Class Property Declarations
@staltz
staltz / introrx.md
Last active April 20, 2024 14:15
The introduction to Reactive Programming you've been missing