Skip to content

Instantly share code, notes, and snippets.

@igrep
Last active December 16, 2015 11:38
Show Gist options
  • Select an option

  • Save igrep/5428360 to your computer and use it in GitHub Desktop.

Select an option

Save igrep/5428360 to your computer and use it in GitHub Desktop.
#!/bin/env ruby
# GistID: 5428360
require 'termcolor'
$KCODE = 'u' if RUBY_VERSION < '1.9'
$VERBOSE = true
unless Array.method_defined? :sample
class Array # reopen
def sample # not complete implementation!
self[ rand self.length ]
end
end
end
colored = ARGV.any? {|arg| arg.start_with? '--color' }
message = %w[
ポッポー!
ぽっぽー!
やっほー!
Yahoo!
しゅっぽしゅっぽしゅっぽしゅっぽ・・・
焦るなよ。これは"ls"じゃない、"sl"だ
m9(^Д^)プギャーwwwwww
].sample
colored_message = colored ? "<red>#{message}</red>".termcolor : message
puts colored_message
@igrep
Copy link
Copy Markdown
Author

igrep commented Apr 21, 2013

何か実行したら和むようなよい言葉があれば僕に教えてください。

@igrep
Copy link
Copy Markdown
Author

igrep commented Apr 21, 2013

気が向いたので--colorオプションに対応しました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment