Skip to content

Instantly share code, notes, and snippets.

View m0wfo's full-sized avatar

Chris Mowforth m0wfo

  • Planet Earth
View GitHub Profile
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
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
@m0wfo
m0wfo / gist:58415
Created February 4, 2009 23:09
A few examples
# 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"
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
# 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
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
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
# Returns true if run on a big-endian architecture
"Test".unpack("i").first != 1953719636 ? true : false
<?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>
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