Skip to content

Instantly share code, notes, and snippets.

@derrickreimer
derrickreimer / rbenv-install-system-wide.sh
Created January 15, 2012 17:17
rbenv install and system wide install on Ubuntu 10.04 LTS.
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
@derrickreimer
derrickreimer / db.rake
Created July 14, 2012 20:43 — forked from xaviershay/db.rake
db:structure:load for Rails 3.1
# Adapter from http://pivotallabs.com/users/jdean/blog/articles/1707-using-mysql-foreign-keys-procedures-and-triggers-with-rails
namespace :db do
namespace :structure do |schema|
schema[:dump].abandon
desc "OVERWRITTEN - shell out to mysqldump"
task :dump => :environment do
cmd = "mysqldump #{mysql_options} -d --routines --triggers --skip-comments > db/development_structure.sql"
system cmd
File.open("#{Rails.root}/db/#{Rails.env}_structure.sql", "a") { |f| f << ActiveRecord::Base.connection.dump_schema_information }
end
- I wrote this on the train after a long day with a heavy head cold. I haven't run it,
but regardless of likely errors I think it expresses the design well enough.
- Segment and ConditionSet look close to identical, but that's likely due to the simplified
nature of the outline you provided
- I don't like attaching components to classes unless they're `js-`, as it's coupling
your styling and behaviour layers. We excelusively use data attributes for JS-DOM coupling
and I've quickly grown fond of the approach.