Skip to content

Instantly share code, notes, and snippets.

%w[rubygems ncurses xmpp4r].each {|dep| require dep }
Ncurses.keypad(@window = Ncurses.initscr, true)
Ncurses.cbreak
Ncurses.refresh
at_exit { Ncurses.endwin }
Jabber::logger = Logger.new('jabberlog.txt')
Jabber::debug = true
SAS Domain 0:
Vendor: APPLE
Product: RAID Card
Revision: 312E3030
Bus: PCI
Slot: Slot-4
Initiator Identifier: 0
SAS Address: 50:08:00:07:00:1F:6C:AC
Status: Link Established
- Re-size displays
- Name computer and drive if not already done
- Set Network connection settings (default host 222 for primary system)
- Turn on all appropriate Sharing settings
- Start processes that will take a while:
- Start downloading latest Xcode package
- Start Software Update
- Start Time Machine's first backup to Time Capsule
- Start downloading latest EVE Online client
- Create /usr/local/src
"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)
# Arrays all currently kown bars, returning a two-dimensional array of
# lines and bars on lines, sorting the bars as defined by #<=>, and
# splitting the bars into groups of as many as can fit within max_width.
def self.array max_width
@@bars.sort!
@@bars.each {|b| b.reindex! }
total = 0
arr = [[]]
#!/opt/bin/ruby
# print "Status: 404\r\n"
print "Status: 200 OK\r\n"
print "Content-Type: text/html\r\n"
print "Server: \r\n"
print "Date: \r\n"
print "\r\n"
print %!<title>femto google<body onload='document.all.q.focus()'><form action=s><input style='width:99%;font:48"";border:0;background:#ddd'name=q>!
# Text::Format doesn't work, see EOF.
require 'rubygems'
require 'text/format'
Formatter = Text::Format.new
Test = "\
0123456789ABCDEF 0123456789ABCDEF 0123456789ABCDEF 0123456789ABCDEF 0123456789ABCDEF 0123456789ABCDEF
abcdefghi
"".scan(/.{1,10}\b?\s*/)
# => [""]
"1".scan(/.{1,10}\b?\s*/)
# => ["1", ""]
"12".scan(/.{1,10}\b?\s*/)
# => ["12", ""]
"123".scan(/.{1,10}\b?\s*/)
# => ["123", ""]
"1234".scan(/.{1,10}\b?\s*/)
# => ["1234", ""]
Doctor Horrible!
Doctor Horrible-r!