- Indent with 2 spaces and expandtabon (With exceptions like Java).
- Use underscores in long method names, like this:
| ninja: Entering directory `buildrelease' | |
| [1/3] Compiling C++ object ps3netsrv.p/src_main.cpp.o | |
| FAILED: ps3netsrv.p/src_main.cpp.o | |
| c++ -Ips3netsrv.p -I. -I.. -I../include -Xclang -fcolor-diagnostics -pipe -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Wpedantic -std=c++11 -O3 -MD -MQ ps3netsrv.p/src_main.cpp.o -MF ps3netsrv.p/src_main.cpp.o.d -o ps3netsrv.p/src_main.cpp.o -c ../src/main.cpp | |
| In file included from ../src/main.cpp:25: | |
| ../include/VIsoFile.h:17:2: error: unknown type name 'off64_t'; did you mean 'off_t'? | |
| off64_t size; | |
| ^~~~~~~ | |
| off_t | |
| /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_off_t.h:31:33: note: 'off_t' declared here | 
| # hyacinth -- a simple decorator framework | |
| # Written by weddingcakes | |
| # > So in future, when people ask you what you have for breakfast, don't say cornflakes. Tell them, quite truthfully, that you eat an exclusive European high fibre breakfast cereal. | |
| # -- Hyacinth Bucket | |
| # | |
| # License: | |
| # | |
| # Eiffel Forum License, version 2 | |
| # | |
| # 1. Permission is hereby granted to use, copy, modify and/or | 
| # Method I -- Recursive | |
| def factorial_recursive(x) | |
| return 1 if x <= 1 | |
| x * factorial1(x - 1) | |
| end | |
| # Method II -- Elegance | |
| def factorial_elegant(x) | |
| (1..x).inject(:*) | |
| end | 
| class Bouquet < Rails::AppBuilder | |
| include FileUtils | |
| def test | |
| test_gems | |
| install_rspec | |
| factories | |
| end | |
| def leftovers | |
| if yes? "Are your using an API?" | 
| class Bouquet < Rails::AppBuilder | |
| include FileUtils | |
| def test | |
| test_gems | |
| install_rspec | |
| factories | |
| end | |
| def leftovers | |
| if yes? "Are your using an API?" | 
| class Bouquet < Rails::AppBuilder | |
| include FileUtils | |
| def test | |
| test_gems | |
| install_rspec | |
| factories | |
| end | |
| def leftovers | |
| if yes? "Are your using an API?" | 
| (defun factorial (n) | |
| (if (<= n 0) | |
| 1 | |
| (* n (factorial (- n 1))))) | |
| (if (= (factorial 3) 6) | |
| (write-line "Yay!")) | 
| 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}" | 
| #! /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 |