Skip to content

Instantly share code, notes, and snippets.

Joey Robert joeyrobert

Block or report user

Report or block joeyrobert

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View podcasts.rb
#!/usr/bin/env ruby
# gem install xml-simple psych
require 'xmlsimple'
require 'psych'
require 'open-uri'
require 'fileutils'
require 'yaml'
require 'thread'
View keybase.md

Keybase proof

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:

View pr-template.md

What's this PR do?

Where should the reviewer start?

How should this be manually tested?

Any background context you want to provide?

What are the relevant tickets?

Screenshots (if appropriate)

Definition of Done:

  • 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.
@joeyrobert
joeyrobert / gist:6245784
Last active Dec 21, 2015 — forked from jayd3e/gist:6196323
Install instructions for a base Ubuntu box
View gist:6245784
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/
@joeyrobert
joeyrobert / beautify.rb
Created Jun 7, 2012
beautify javascript directory
View beautify.rb
#!/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
View lastfm_mediamonkey.rb
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
View spam.rb
# 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 }
@joeyrobert
joeyrobert / benchmarking.md
Created Oct 14, 2010
info for system benchmarking
View benchmarking.md

Benchmarking

CPU

wget http://www.tux.org/~mayer/linux/nbench-byte-2.2.2.tar.gz  
tar fxz nbench-byte-2.2.2.tar.gz  
cd nbench-byte-2.2.2  
make  
View bloomfilter.rb
require 'zlib'
class BloomFilter
def initialize(length = 100, hashes = 3, data = [])
@hashes = hashes
@length = length
@bits = Array.new(@length)
@inserted = 0
add(data)
View blackjack.rb
# 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
You can’t perform that action at this time.