Skip to content

Instantly share code, notes, and snippets.

View chuckbergeron's full-sized avatar
🎯
pooltogether.com

Chuck Bergeron chuckbergeron

🎯
pooltogether.com
View GitHub Profile
@chuckbergeron
chuckbergeron / boot.rb
Created March 15, 2012 17:37
One Database Per Branch, Per Environment
CURRENT_BRANCH = `git status | head -1`.to_s.gsub('# On branch ','').chomp
@chuckbergeron
chuckbergeron / gist:3645718
Created September 5, 2012 21:57
Tricked Python Lesson. Hijinx!
#Assign `True` or `False` as appropriate on the lines below!
# 17 < 118 % 100
# They're asking for this:
bool_one = True
# I gave them this:
bool_one = 17 < 118 % 100
@chuckbergeron
chuckbergeron / import.rb
Created November 1, 2012 19:19
Simple Import w/ Exceptions
class Import
# Mixins
include ImportExceptions
# 0: is the Film Festival we want to relate to a Tab
# 1: the Regionalmovie ID
attr_accessor :attributes
attr_accessor :regionalmovie
attr_accessor :tab
#! /usr/local/bin/zsh
echo "You probably want to run this from your master branch..."
# Remove any existing LATEST_CHANGES.md files:
rm LATEST_CHANGES.md
# Get the latest tag from the git index
LATEST_TAG=`git describe --abbrev=0`
require 'rubygems'
require 'active_shipping'
include ActiveMerchant::Shipping
####### START: STORE THIS IN A CONFIG FILE
MyApp::Application.config.fedex_credentials = {
account: '1234567890',
password: '1234567890abcdefgh1234567890',
key: '1234567890abcde',
login: '12345678'
4..30.each do |x|
puts x * 2
end
1. Was receiving this strange error:
undefined method 'action_view' for #<Rails::Railtie::Configuration...
Had to add this to the top of `config/application.rb`:
require "action_view/railtie"
2. ActionMailer URL host config not being setup correctly:
config.action_mailer.default_url_options = {host: "s.caliper.io"}
Rails.application.config.action_mailer.default_url_options
@chuckbergeron
chuckbergeron / gist:411bd75d6caa189848be
Last active August 29, 2015 14:02
orm_adapter not available during staging deploy / devise
Just ran into the following while deploying `LoadError: cannot load such file -- orm_adapter`
Fixed it by reverting Devise back from 3.2.4 to 3.2.3. Could be a gem dependency issue, specific to my gemset. Thought I'd document it here for anyone else who may run into it.
* executing "cd -- /apps/appname/releases/20140620072245 && RAILS_ENV=staging RAILS_GROUPS=assets bundle exec rake assets:precompile"
servers: ["server.com"]
[server.com] executing command
*** [err :: server.com] rake aborted!
@chuckbergeron
chuckbergeron / keybase.md
Created November 6, 2014 19:45
keybase.md

Keybase proof

I hereby claim:

  • I am chuckbergeron on github.
  • I am chuckbergeron (https://keybase.io/chuckbergeron) on keybase.
  • I have a public key whose fingerprint is 5FFA 5CB7 C469 A068 67EF C0FD 5E65 4F76 1C1D 7F0E

To claim this, I am signing this object: