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
def what_is_gist | |
Sex::Pure | |
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
This is my gist. | |
There are many like it, but this one is mine. | |
It is my life. | |
I must master it as I must master my life. | |
Without me, gist is sad. | |
Without gist, I am sad. |
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
It is more than a pastie clone - it's a versioned pastie! Through the eversexy git! <3 |
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
# Translation note: | |
# init() will not be needed. Our input is already ready to be read. (Alliteration :D) | |
# Translated from http://compilers.iecc.com/crenshaw/tutor1.txt | |
TAB = "\t" | |
class scanner: | |
def __init__(self): | |
self.input = list(raw_input()) |
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
find . -name ".git" -exec rm -rf {} \; |
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
require 'benchmark' | |
TIMES = 10_000_000 | |
:foo # Anal-retentivity | |
def thrice_yield | |
3.times { yield } | |
end | |
def thrice_block &block | |
3.times &block |
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
"1.8.6" | |
"2008-03-03" | |
user system total real | |
block 35.650000 0.050000 35.700000 ( 35.717756) | |
symbol106.290000 3.940000 110.230000 (111.735975) | |
"1.8.6" | |
"2008-03-03" | |
user system total real | |
block 35.230000 0.020000 35.250000 ( 35.282963) |
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
# ---- -- ---- stringray.rb ---- -- ---- | |
module StringRay | |
VERSION = 2 | |
# Splits a string into words. Not using the obvious names (+#split+, +#words+) | |
# because I want compatibility for inclusion into +String+. | |
def enumerate | |
ray = [] | |
self.each_byte do |byte| |
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
#!/bin/env ruby | |
############################################################################ | |
# textilewc: Count words in a Textile file, if somewhat crudely. | |
# By Tammy Cravit, [email protected] | |
# | |
# $Revision$ $Date$ | |
# | |
# If a single file is provided on the command line, it displays the number | |
# of words in the file. If multiple files are given on the command line, it | |
# generates a listing similar to the output of wc(1), except that directories |
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 Foo | |
def initialize &block | |
p instance_eval &block if block_given? # !> `&' interpreted as argument prefix | |
end | |
def const_missing const | |
"foobar" | |
end | |
end | |
Foo.new {self} # => #<Foo:0x27204> |
OlderNewer