I hereby claim:
- I am joeyrobert on github.
- I am joeyrobert (https://keybase.io/joeyrobert) on keybase.
- I have a public key whose fingerprint is 8603 8B3C 3BE1 5587 1E31 42C7 5C54 64B0 A9E6 B2EE
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
# gem install xml-simple psych | |
require 'xmlsimple' | |
require 'psych' | |
require 'open-uri' | |
require 'fileutils' | |
require 'yaml' | |
require 'thread' |
I hereby claim:
To claim this, I am signing this object:
On local machine: | |
sudo apt-get install python-dev python-pip python-setuptools ruby virtualbox build-essential nfs-common nfs-kernel-server | |
mkdir ~/Boxes | |
cd ~/Boxes | |
git clone git@github.com:clusterflunk/clusterstack.git | |
easy_install pip | |
pip install ansible | |
cp ~/.ssh/id_rsa.pub ~/Boxes/clusterstack/roles/common/files/.ssh/ | |
cp ~/.ssh/id_rsa ~/Boxes/clusterstack/roles/common/files/.ssh/ |
#!/usr/bin/env ruby | |
if ARGV[0] | |
Dir.glob(ARGV[0]+"**/*.js").each do |file| | |
puts "Beautifying JS file: #{file}" | |
puts `js-beautify -s 2 -j -o "#{file}.pretty" "#{file}"` | |
puts `mv "#{file}.pretty" #{file}` | |
end | |
else | |
puts "Usage: #{__FILE__} directory" | |
end |
require 'win32ole' | |
require 'net/http' | |
require 'rexml/document' | |
class FindSongs | |
def initialize(user, api_key) | |
@username = user | |
@api_key = api_key | |
@mediamonkey = WIN32OLE.new('SongsDB.SDBApplication') | |
end |
# spam.rb - Creates spam logfiles from an example. Rates are approximate. | |
if ARGV[2] !~ /^\d+$/ || !File.exists?(ARGV[0]) | |
puts "USAGE: ruby #{__FILE__} [source] [dest.] [rate in mb/s]" | |
puts "i.e.: ruby #{__FILE__} example.log spam.log 3" | |
exit | |
end | |
trap("INT") { exit } |
require 'zlib' | |
class BloomFilter | |
def initialize(length = 100, hashes = 3, data = []) | |
@hashes = hashes | |
@length = length | |
@bits = Array.new(@length) | |
@inserted = 0 | |
add(data) |
# Blackjack | |
# Author: Joey Robert <joey@joeyrobert.org> | |
module Blackjack | |
class Player | |
attr_accessor :name, :money, :cards, :bets, :pushed | |
def initialize(name) | |
@name = name | |
@money = 1000 |