Skip to content

Instantly share code, notes, and snippets.

View anotherjesse's full-sized avatar

Jesse Andrews anotherjesse

View GitHub Profile
@henrik
henrik / rules.md
Last active May 23, 2022 12:31
Sandi Metz' four rules from Ruby Rogues episode 87. Listen or read the transcript: http://rubyrogues.com/087-rr-book-clubpractical-object-oriented-design-in-ruby-with-sandi-metz/
  1. Your class can be no longer than 100 lines of code.
  2. Your methods can be no longer than five lines of code.
  3. You can pass no more than four parameters and you can’t just make it one big hash.
  4. When a call comes into your Rails controller, you can only instantiate one object to do whatever it is that needs to be done. And your view can only know about one instance variable.

You can break these rules if you can talk your pair into agreeing with you.

@anotherjesse
anotherjesse / openstack.sh
Created October 11, 2011 18:59
devstack userdata for uec-oneiric images
#!/bin/sh
apt-get update
apt-get install git -y
git clone https://github.com/cloudbuilders/devstack.git
cd devstack
echo ADMIN_PASSWORD=stack4eva >> localrc
echo MYSQL_PASSWORD=mysql4eva >> localrc
echo RABBIT_PASSWORD=rabbit4eva >> localrc
echo SERVICE_TOKEN=12345678901234567890 >> localrc
./stack.sh
# major version in package, like: nova-vncproxy_2011.1-dev-670_all
major_version: 2011.3-rcb
# ssh user
user: root
# use sudo for above user?
use_sudo: true
# base directory for package building
build_to: /srv/packages/build
# base directory for package serving
serve_to: /srv/packages/serve