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 Object | |
| def say_ho | |
| "Ho!" | |
| end | |
| def ho_ho | |
| "Ho Ho!" | |
| end | |
| def ho_ho_ho |
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 Array | |
| def chain m | |
| r = shift | |
| each{|n| r = r.send(m, n)} | |
| r | |
| end | |
| end | |
| class Range | |
| def chain m |
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
| #!/usr/bin/ruby | |
| require 'fileutils' | |
| require 'open-uri' | |
| require 'uri' | |
| require 'digest/md5' | |
| require 'rubygems' | |
| require 'RMagick' | |
| require 'simple-rss' |
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
| module Enumerable | |
| def random | |
| ary = self.to_a | |
| ary[rand(ary.size)] | |
| end | |
| 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
| module Kernel | |
| def random arg | |
| arg = arg.to_a if arg.class == Range | |
| arg[rand(arg.size)] | |
| end | |
| end | |
| class Range | |
| def random | |
| Kernel.random self |
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
| #!/usr/bun/ruby | |
| require "fileutils" | |
| require "pathname" | |
| include FileUtils | |
| SRC_BASE= Pathname.new ARGV.shift | |
| DEST_BASE = Pathname.new ARGV.shift |
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
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
| <link rel="icon" href="{Favicon}"/> | |
| <link rel="alternate" type="application/rss+xml" title="RSS" href="{RSS}"/> | |
| <title>{Title}{block:PostSummary} - {PostSummary}{/block:PostSummary}</title> | |
| <style type="text/css"> | |
| * { | |
| font-size:100%; |
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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
| <title>Tumblr Cascade</title> | |
| <style type="text/css"> | |
| * { | |
| font-size:100%; | |
| } |
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
| #!/usr/bin/env ruby | |
| require "kconv" | |
| require "rubygems" | |
| require "twitter" | |
| require "mixi" | |
| username = '' | |
| password = '' |
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
| #!/usr/bin/ruby | |
| # iTunes | |
| require "rubygems" | |
| require "rbosa" | |
| class ControlliTunes | |
| @@app = OSA.app('iTunes') | |