This file contains 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
chris-mowforths-macbook-pro:~ chris$ share -s 'my stuff' -p 8787 | |
[2009-01-28 21:06:50] INFO WEBrick 1.3.1 | |
[2009-01-28 21:06:50] INFO ruby 1.8.6 (2008-03-03) [universal-darwin9.0] | |
[2009-01-28 21:06:50] INFO WEBrick::HTTPServer#start: pid=2526 port=8787 | |
Registering Service my stuff._http._tcp port 8787 TXT path=/ | |
21:06:51.634 Got a reply for service my stuff._http._tcp.local.: Name now registered and active | |
This file contains 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
wget http://xruby.googlecode.com/files/xruby-0.3.3a-src.zip | |
unzip xruby-0.3.3a-src.zip | |
chmod +x build.sh; ./!$ | |
java -jar xruby-0.3.3.jar -c sample/test.rb | |
java -jar test.jar |
This file contains 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
# A few examples | |
open ~/Music/David\ Holmes\ -\ Essential\ Mix\ 98-01/03\ -\ California\ Soul.m4a | |
# Try cloning edge rails and run this in the root folder | |
mdfind —onlyin . "def find" | |
# Really EARN that count injunction | |
“osascript -e ‘set volume 100’” && say "I know where you live" | |
This file contains 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
wget http://megaui.net/fukuchi/works/qrencode/qrencode-3.0.3.tar.bz2 | |
tar -xjvf qrencode-3.0.3.tar.bz2 && cd qrencode-3.0.3 | |
./configure | |
make | |
sudo make install |
This file contains 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
# With rQRcode | |
require "rubygems" | |
require "rqrcode" | |
# With rQRcode | |
100.times do |i| | |
RQRCode::QRCode.new("iteration number #{i}", :size => 4, :level => :h) | |
end | |
# With libqrencode |
This file contains 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
GOOGLE.COM.ZZZZZ.GET.LAID.AT.WWW.SWINGINGCOMMUNITY.COM | |
GOOGLE.COM.ZZZZZ.DOWNLOAD.MOVIE.ONLINE.ZML2.COM | |
GOOGLE.COM.ZOMBIED.AND.HACKED.BY.WWW.WEB-HACK.COM | |
GOOGLE.COM.YAHOO.COM.MYSPACE.COM.YOUTUBE.COM.FACEBOOK.COM.THEYSUCK.DNSABOUT.COM | |
GOOGLE.COM.WORDT.DOOR.VEEL.WHTERS.GEBRUIKT.SERVERTJE.NET | |
GOOGLE.COM.VN | |
GOOGLE.COM.UY | |
GOOGLE.COM.UA | |
GOOGLE.COM.TW | |
GOOGLE.COM.TR |
This file contains 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 "cups" | |
# Create new print job. Specify local file path and printer/class | |
pj = PrintJob.new("/Users/chris/Documents/hash_server.rb", "EPSON_Stylus_Pro_4800") | |
pj.print | |
# New: | |
pj.cancel # => true if print has been called, otherwise false | |
pj.job_id # => @job_id || nil | |
This file contains 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
# Returns true if run on a big-endian architecture | |
"Test".unpack("i").first != 1953719636 ? true : false |
This file contains 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
<?xml version="1.0" standalone='no'?><!--*-nxml-*--> | |
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"> | |
<service-group> | |
<name replace-wildcards="no">Enigmatic Server</name> | |
<service> | |
<type>_ssh._tcp</type> | |
<port>22</port> |
This file contains 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 "bcrypt" | |
password = BCrypt::Password.new("$2a$06$VHbKdt7CK1z91T3KC66RL.ezGSUTz4qW3FzpNJdPNCr0iiTLlefJC") | |
plist = File.open("/usr/share/dict/words") do |newline| | |
while line = newline.gets | |
lc = line.chomp | |
if password == lc | |
p lc | |
break |