Skip to content

Instantly share code, notes, and snippets.

Avatar

Jimmy Le Thai jlthai

  • Batch
  • Saint Augustine, Fl
  • Twitter @jlthai
View GitHub Profile
@jlthai
jlthai / app_config.rb
Last active Jan 28, 2019
Quick way to use ENVs from Heroku config while using Rails 5.2 style credentials for development.
View app_config.rb
module AppConfig
def self.get(key)
env_val = ENV[key.to_s]
return env_val if env_val.present?
rails_credentials = Rails.application.credentials
# Tries finding a key with the first part being nested first.
# :aws_access_key_id will attempt to grab
# { aws: { access_key_id: 'val' } }
View keybase.md

Keybase proof

I hereby claim:

  • I am jlthai on github.
  • I am jlthai (https://keybase.io/jlthai) on keybase.
  • I have a public key ASATtXHznXlbRw7deVF1U_CjZoZrDb_w6fR02a4YFXWu4Ao

To claim this, I am signing this object: