This file contains hidden or 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
for remote in `git remote` ; do | |
echo "==> ${remote}" | |
git ls-remote ${remote} 2>/dev/null | |
echo | |
done |
This file contains hidden or 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 | |
# | |
# I hate ManaWiz KVMs. That is all. | |
# | |
# Create a file in your home directory called ".kvmcfg" with the following: | |
# :kvm_user: yourusername | |
# :kvm_passwd: yourpassword | |
# | |
# Then run this marvelous script: | |
# $ ./kvm.rb servername-oob.whatever.com |
This file contains hidden or 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
feed_hash = feed.to_hash | |
puts Benchmark.bm(20) { |x| | |
x.report('yaml') { (1..1000).each { feed_hash.to_yaml } } | |
x.report('yaml+zlib') { (1..1000).each { Zlib::Deflate.deflate(feed_hash.to_yaml) } } | |
x.report('json') { (1..1000).each { feed_hash.to_json } } | |
x.report('json+zlib') { (1..1000).each { Zlib::Deflate.deflate(feed_hash.to_json) } } | |
x.report('bson') { (1..1000).each { BSON.serialize feed_hash } } | |
x.report('marshal') { (1..1000).each { Marshal::dump(feed_hash) } } | |
x.report('marshal+zlib') { (1..1000).each { Zlib::Deflate.deflate(Marshal::dump(feed_hash)) } } | |
x.report('yajl') { (1..1000).each { Yajl::Encoder.encode(feed_hash) } } |
This file contains hidden or 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
roadrunner:~ oogali$ sudo gem install redcar | |
Password: | |
------------------------------------------------------------------------------- | |
Please now run: | |
$ redcar install | |
to complete the installation. (NB. do NOT use sudo. In previous versions, |
This file contains hidden or 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 | |
require 'rubygems' | |
require 'nokogiri' | |
require 'net/http' | |
require 'uri' | |
GATETIMES_URL = 'http://www.aa.com/travelInformation/gatesTimesSubmit.do' | |
RESULTS_HEADER = 3 |
This file contains hidden or 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
#!/bin/bash | |
x=$[RANDOM % 8] | |
y=$[RANDOM % 8] | |
i=0 | |
j=0 | |
while [ $i != $x ]; do | |
while [ $j != $y ]; do | |
/bin/echo -n "nyan " |
This file contains hidden or 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
#!/bin/sh | |
## PoC: Validate CentOS mirrors using a set of release data | |
## - ISO image sizes | |
## - ISO image digests of bytes 32768-65535 | |
## - Torrent digests | |
## - Enumerate repo XML files to verify SHA-256 hash | |
## | |
## @oogali | |
## |
This file contains hidden or 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 | |
require 'rubygems' | |
require 'isaac' | |
require 'net/http' | |
require 'nokogiri' | |
require 'open-uri' | |
CACHE_EXPIRATION = 3600 | |
cache = {} |
This file contains hidden or 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 | |
require 'rubygems' | |
require 'yaml' | |
require 'json' | |
require 'net/http' | |
require 'uri' | |
class Jira | |
@base |
This file contains hidden or 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/ruby | |
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
document = Nokogiri::HTML open('http://www.engadget.com') | |
document.xpath('//div[@class="headline"]//a[not(@class)]').each do |topic| | |
puts topic.text | |
end |