Skip to content

Instantly share code, notes, and snippets.

@j05h
j05h / gist:469681
Created July 9, 2010 16:27
awk script to parse access logs
awk '{ sub(/([0-9]+\.?)+/, ":id", $3);
sub(/[0-9]+/, ":id", $3);
sub(/=.*&/, "=:param\\&", $3);
sub(/=.*$/, "=:param", $3);
sub(/\?[:a-z0-9]+$/, "", $3);
print $1, $2, $3, $4
}' | sort | uniq -c | sort
@j05h
j05h / test.rake
Created July 2, 2010 14:33
Test Dependency Task
namespace :test do
desc "Ensures there are no dependencies between test classes."
task :each => %w(each:functional each:unit each:integration)
namespace :each do
def each_test(tests)
# This is where the magic happens
ENV['TESTOPTS'] = '--verbose=progress' unless ENV['TESTOPTS']
tests.each do |path|
puts "\n#{path}"