Skip to content

Instantly share code, notes, and snippets.

View bbhoss's full-sized avatar
🎯
Focusing

Preston bbhoss

🎯
Focusing
View GitHub Profile
{
"schedule": "R\/2014-09-25T17:22:00Z\/PT2M",
"name": "dockerjob",
"container": {
"type": "DOCKER",
"image": "libmesos/ubuntu",
},
"cpus": "0.5",
"mem": "512",
"command": "while sleep 10; do date =u %T; done"
@bbhoss
bbhoss / ubuntu-12.04-lts.erb.sh
Created July 16, 2012 22:39 — forked from nkg/ubuntu-12.04-lts.erb.sh
chef ubuntu 12.04 LTS bootstrap
bash -c '
if [ ! -f /usr/bin/chef-client ]; then
apt-get update
apt-get -y upgrade
apt-get install -y build-essential wget zlib1g-dev libssl-dev libffi-dev libncurses-dev libreadline-dev libyaml-dev libffi6 libssl0.9.8
wget https://s3.amazonaws.com/dev.ops/ruby-1.9.3-p194-perf_without_psych_no_warnings_amd64.deb
dpkg -i ruby-1.9.3-p194-perf_without_psych_no_warnings_amd64.deb
wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz
@bbhoss
bbhoss / example.rb
Created February 8, 2012 04:31 — forked from jkutner/example.rb
Possible alternative approach?
class Local
def method_missing(*args)
"hello world"
end
end
def my_val
raise "goodbye cruel world"
end
Blog::Application.routes.draw do
get "pages/about"
get "pages/contact"
resources :portfolios
resources :links
resources :posts do
# event.rb
def format_day
self.day.strftime("%B %d, %Y (%A)")
end
def day_types
OpenStruct.new(:day => self.day, :format => self.format_day)
end
# view
<h1>Register</h1>
<% form_for(@user) do |f| %>
<%= f.error_messages %>
<% f.fields_for :person do |g| %>
<p>
<%= g.label :firstname %><br />
<%= g.text_field :firstname %>
</p>
<% end %>