Skip to content

Instantly share code, notes, and snippets.

@chrisberkhout
Created June 21, 2013 05:33

Revisions

  1. chrisberkhout created this gist Jun 21, 2013.
    3 changes: 3 additions & 0 deletions with_credentials.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    require "json"

    JSON.parse(`. /etc/credentials.sh; ruby -rjson -e'puts ENV.to_hash.to_json'`).each_pair { |k,v| ENV[k] = v }