Skip to content

Instantly share code, notes, and snippets.

class ModelSeeder
attr_reader :logger, :seeded
def initialize(logger: STDOUT)
@logger = logger
@seeded ||= Hash.new
end
def make(klass, id, opts)
@csexton
csexton / database.yml
Created July 8, 2014 02:17
Database Yaml for Corporate Tool
default: &default
adapter: postgresql
encoding: unicode
pool: 5
username: <%= ENV['USER'] %>
password:
host: localhost
development:
<<: *default
$board = [
%w(# # # # # # # # # # # # # # # # # # # # # # # # # # #),
%w(~ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ #),
%w(# _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ #),
%w(# _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ #),
%w(# _ _ _ _ _ _ _ _ _ # # # # _ _ _ _ _ _ _ _ _ _ _ _ #),
%w(# _ _ _ _ _ _ _ _ _ # # # # _ _ _ _ _ _ _ _ _ _ _ _ #),
%w(# _ _ _ _ _ _ _ _ _ # # # # _ _ _ _ _ _ _ _ _ _ _ _ #),
%w(# # # # # # # # # # # # # # # # # # # # # # # # # # #)
]
################################
~ #
# #### #
### #### ##
### #### ####
####### ####### ######
####### ########### ######
################################

Keybase proof

I hereby claim:

  • I am csexton on github.
  • I am csexton (https://keybase.io/csexton) on keybase.
  • I have a public key whose fingerprint is DC11 A2A6 5478 2BD0 2C4D 453F 5727 C003 D0D8 98EB

To claim this, I am signing this object:

@csexton
csexton / database.yml
Created July 17, 2014 17:35
Generic Rails Database Config for Heroku and Postgres
<%
user = ENV['USER']
app = ENV['RAILS_DB_APP_NAME'] || 'myapp'
%>
base: &generic
adapter: postgresql
encoding: unicode
pool: 5
username: <%= user %>
password:
.ios {
font-family: 'HelveticaNeue-UltraLight', 'Helvetica Neue UltraLight', 'Helvetica Neue', Arial, Helvetica, sans-serif;
font-size: 24px;
font-weight: 100;
}
var bleno = require('bleno');
var uuid = '2F234454-CF6D-4A0F-ADF2-F4911BA9FFA6';
var major = 0;
var minor = 0;
var measuredPower = -59
bleno.startAdvertisingIBeacon(uuid, major, minor, measuredPower, function(err){process.stdout.write(err);});
get 'uploads/*path', to: proc { [404, {}, ['']] }