Skip to content

Instantly share code, notes, and snippets.

View geemus's full-sized avatar

Wesley Beary geemus

View GitHub Profile
require 'excon'
require 'securerandom'
def multipart_form_data(buildpack_file_path)
body = ''
boundary = SecureRandom.hex(4)
data = File.open(buildpack_file_path)
data.binmode if data.respond_to?(:binmode)
data.pos = 0 if data.respond_to?(:pos=)
@geemus
geemus / fog_virtualbox.rb
Created March 14, 2011 21:08
simple example of using virtualbox
require 'fog'
compute = Fog::Compute.new(:provider => 'VirtualBox')
server = compute.servers.create(:name => 'lucid', :os => 'Ubuntu')
medium = compute.mediums.create(:device_type => :hard_disk, :location => '/Users/geemus/geemus/virtualbox_poc/lucid.vmdk', :read_only => false)
storage_controller = server.storage_controllers.create(:bus => :sata, :name => 'sata')
storage_controller.attach(medium, 0)
@geemus
geemus / addendum.markdown
Created September 1, 2011 20:26
API - Assumptions Probably Incorrect

Hacking Exercise for Health

Intervals

  • A majority of the exercise benefit is seen from the first set, though further sets can help optimize.
    • It's much better to do something (anything) than nothing.
  • High intensity seems to matter more that duration, weight, etc in terms of overall efficacy.

Cardio

@geemus
geemus / heroku.md
Created October 12, 2011 22:17
heroku style guide

TODO empty arrays and/or nil values (see apps:info)

General Guidelines

  • Use full sentences, including punctuation.
  • Labels should be provided where needed in the form of 'Labels labels:'.
  • Commands should have one newline between the header and body and another after the body.
  • Alpha-sort arrays before display and display labeled data in alpha-sorted key order.

Open Source

Less Obvious Lessons

Herding Cats 101

newbs

 

newbs

API Hack-a-thon

heroku

API Team

brandur mfine pedro sclasen geemus

$ heroku help apps:create
Usage:
  heroku apps:create [NAME]
Description:
  create a new app
Options:
  --addons ADDONS
    a comma-delimited list of addons to install
  -b, --buildpack BUILDPACK

a buildpack url to use for this app

@geemus
geemus / compact.md
Created April 3, 2012 13:33
dx/cli-style-guide.md styled
$ heroku help apps:create
= usage: heroku apps:create [NAME]
= description: create a new app
= options:
  --addons ADDONS
    a comma-delimited list of addons to install
  -b, --buildpack BUILDPACK
    a buildpack url to use for this app
  -r, --remote REMOTE

the git remote to create, default "heroku"

@geemus
geemus / compact.md
Created April 3, 2012 13:20
markdownish styleguide
$ heroku help apps:create
## Usage:
   heroku apps:create [NAME]
## Description:
   create a new app
## Options:
   --addons ADDONS
      a comma-delimited list of addons to install
   -b, --buildpack BUILDPACK

a buildpack url to use for this app