- Is there appropriate test coverage? (e.g. ChefSpec, Mocha/Chai, Python, etc.)
- Does this PR require a Selenium test? (e.g. Browser-specific bugs or complicated UI bugs)
- Does this PR require a regression test? All fixes require a regression test.
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:
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
# 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 |
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 'zlib' | |
class BloomFilter | |
def initialize(length = 100, hashes = 3, data = []) | |
@hashes = hashes | |
@length = length | |
@bits = Array.new(@length) | |
@inserted = 0 | |
add(data) |
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
# 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 } |
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 '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 |
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
#!/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 |
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
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/ |
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
#!/usr/bin/env ruby | |
# gem install xml-simple psych | |
require 'xmlsimple' | |
require 'psych' | |
require 'open-uri' | |
require 'fileutils' | |
require 'yaml' | |
require 'thread' |