Skip to content

Instantly share code, notes, and snippets.

View tonycoco's full-sized avatar

Tony Coconate tonycoco

View GitHub Profile
@tonycoco
tonycoco / My IRBRC
Created April 1, 2011 15:21
Just a few good things to do for your Rails 3 applications in IRBRC
%w[rubygems wirble pp ap].each do |gem_name|
begin
require gem_name
rescue LoadError => err
warn "Please do: gem install #{gem_name.sub(/\/.*/,'')}"
end
end
Wirble.init
Wirble.colorize
@tonycoco
tonycoco / jmeterxmltocsv.rb
Created November 3, 2010 19:58
A quick script to convert JMeter log XML files to CSV files for Excel imports (Since, Excel can't import XML data... wow.)
#!/usr/bin/env ruby
require 'rubygems'
require 'nokogiri'
XML_FILE = ARGV[0]
CSV_FILE = ARGV[1]
if XML_FILE.nil? || CSV_FILE.nil?
puts 'usage: ruby jmeterxmltocsv.rb source_file target_file'
# Get this working in an initializer...
%w(zipcode, city, designated_market_area, core_based_statistical_area).each do |t|
Zips::<t's classified name here>.set_schema("")
Zips::<t's classified name here>.set_table_name("zips_#{t.pluralize}")
end