- No
<>
or</>
- Significant Indentation
.stuff
.things
#header
.many.classes.and#an_id
%h1.foo
I ((a verb, past tense)) to the sandwich shop across the street for lunch | |
yesterday. I go there at least ((a number)) times a week. They have the best | |
Philly Cheesesteak, full of ((a plural noun)) and ((a plural noun)) and gooey, | |
stringy ((a noun)). They prepare it just right, ((a verb ending in ing)) it | |
until the meat breaks up and browns, but is still ((an adjective)) and juicy. | |
Then they add special ((a plural noun)) and place two pieces of delicious ((a | |
color)) provolone cheese on top of the meat. As soon as it melts, they scoop the | |
whole thing up and plop it on a ((an adverb)) toasted bun. The juice ((a verb | |
ending in s)) into the bread and runs down your ((a body part)) when you bite | |
into it. Perfect! My mouth was watering just thinking about it. I ((an adverb)) |
dir = ARGV.shift.strip | |
sum = 0 | |
Dir.glob(dir + "/*.txt").each do |file| | |
vals = IO.read(file).scan(/\(([0-9]+)\//).flatten.map(&:to_i) | |
puts "Values extracted: ", vals | |
s = vals.inject(:+) | |
puts "File Sum: #{s}" | |
sum += s | |
puts "Total Sum: #{sum}" | |
end |
watch( '.*\.rb' ) {|md| system("ruby path_to_enlightenment.rb") } |
# Shuffles all the unused cards in the shoe. Uses the | |
# Fisher-Yates shuffling algorithm. | |
# Returns nil. | |
def shuffle! | |
(@contents.size-1).downto(2) { |n| | |
m = rand(n+1) | |
@contents[n], @contents[m] = @contents[m], @contents[n] | |
} | |
nil | |
end |
#!/bin/env ruby | |
have_ap = require 'awesome_print' | |
if have_ap | |
def fancy_print(s) | |
ap s | |
end | |
else | |
def fancy_print(s) |
public interface Instruction { | |
/** Executes an instruction on the Machine. | |
* @param m The machine upon which to execute the instruction. | |
* @return true if the executed instruction modified a general purpose register. | |
*/ | |
public boolean execute(Machine m); | |
} |
[alias] | |
lg = !git --no-pager log | |
df = !git --no-pager diff | |
hist = !git --no-pager log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short |
# terminal color constants! | |
unless defined?(IRB_CONSTS_LOADED) | |
ANSI_BLACK = "\033[0;30m" | |
ANSI_GRAY = "\033[1;30m" | |
ANSI_LGRAY = "\033[0;37m" | |
ANSI_WHITE = "\033[1;37m" | |
ANSI_RED = "\033[0;31m" | |
ANSI_LRED = "\033[1;31m" | |
ANSI_GREEN = "\033[0;32m" | |
ANSI_LGREEN = "\033[1;32m" |