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
/^([\d.]+) (\S+) (\S+) \[([\w:\/]+\s[+\-]\d{4})\] "(.+?)" (\d{3}) (\d+) "([^"]+)" "([^"]+)"/ |
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
cat access_logs.20090319_1000.log | ./access_log_parser.rb | sed 's/19\/Mar\/2009:\(10:[0-9]*\).*/\1/' | sort -k 2,1| uniq -c | egrep -v '\s*1 ' | less |
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
// ==UserScript== | |
// @name Fix Chat ViewPort width | |
// @namespace http://blog.codeeg.com | |
// @description Fix clipping of campfire chats | |
// @include * | |
// @author Calvin Yu | |
// ==/UserScript== | |
(function () { | |
if (window.fluid) { |
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
map.reports 'report/:year/:month/:day', :controller => 'report', :action => 'show', | |
:year => nil, :month => nil, :day => nil |
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
class ReportController < ApplicationController | |
after_filter :cache_weekly_report, :only => :show | |
def show | |
if params[:year] | |
@year = params[:year] | |
@month = params[:month] | |
@day = params[:day] | |
if File.exist?("#{Rails.root}/public/report/#{@year}/#{@month}/#{@day}.html") | |
redirect_to reports_path(:year => @year, :month => @month, :day => @day) |
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
task :symlink_reports do | |
run "mkdir -p #{shared_path}/report; ln -nfs #{shared_path}/report #{release_path}/public/report" | |
end | |
after 'deploy:update_code', 'deploy:symlink_reports' |
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
sudo env PATH="/opt/curl/bin:$PATH" gem install toland-patron -v "0.4.1" --source http://gems.github.com -- --with-ldflags="-Wl,-R/opt/curl/lib" |
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
"define metadata"; | |
({ | |
"dependencies": { | |
"settings": "0.0.0" | |
} | |
}); | |
"end"; | |
var console = require('bespin:console').console; | |
var Trace = require('bespin:util/stacktrace').Trace; |
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 | |
require 'rubygems' | |
require 'flickr' | |
require 'ftools' | |
require 'yaml' | |
API_KEY = "flickr_api_key" | |
SHARED_SECRET = "flickr_shared_secret" |
OlderNewer