This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Local | |
def method_missing(*args) | |
"hello world" | |
end | |
end | |
def my_val | |
raise "goodbye cruel world" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Blog::Application.routes.draw do | |
get "pages/about" | |
get "pages/contact" | |
resources :portfolios | |
resources :links | |
resources :posts do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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 %> |