- Indent with 2 spaces and
expandtabon (With exceptions like Java).
- Use underscores in long method names, like this:
| source :rubygems;['sqlite3','json','jquery-rails'].each {|gem| gem "#{gem}"};group :assets do;gem 'sass-rails';gem 'coffee-rails';gem 'uglifier';end;gem "rails", "3.2.9" |
| user system total real | |
| Excon 0.050000 0.030000 0.080000 ( 5.392849) | |
| Typhoeus 0.040000 0.010000 0.050000 ( 2.189296) | |
| Typhoeus::Hydra 0.040000 0.010000 0.050000 ( 3.153995) | |
| Net::HTTP 0.050000 0.030000 0.080000 ( 2.503522) | |
| Curb 0.030000 0.040000 0.070000 ( 4.071390) |
| class Drink | |
| def name | |
| "Drink" | |
| end | |
| def ingredients | |
| %w() | |
| end | |
| end |
| #!/bin/sh -e | |
| # Usage: license | |
| # Prints an MIT license appropriate for totin' around. | |
| # | |
| # $ license > COPYING | |
| #!/bin/sh | |
| echo "Copyright (c) `date +%Y` weddingcakes | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. |
| #! /usr/bin/env ruby | |
| require "nokogiri" | |
| require "open-uri" | |
| subject = Nokogiri::HTML(open("http://#{ARGV[0]}.craigslist.org/zip/")) | |
| subject.css('#toc_rows a').each do |listing| | |
| puts "#{listing.content}" | |
| end |
| date = Time.now.yday | |
| if date < 359 | |
| a = 359 - date | |
| puts "#{a}" | |
| elsif date == 360 | |
| a = date - -1 | |
| puts "#{a}" | |
| elsif date == 361 | |
| a = date - -2 | |
| puts "#{a}" |