$ cat /etc/apache2/sites-enabled/mms-test
Listen 50690
LogLevel debug
DumpIOInput On
# DumpIOOutput On
$ sudo tail -f /var/log/apache2/error.log | grep "mod_dumpio.c(74)" | sed "s/.*HEAP.: //"
.bundle | |
db/*.sqlite3 | |
log/*.log | |
tmp/**/* |
require 'test/unit' | |
require 'rubygems' | |
require 'mocha' | |
class Foo | |
def self.say_hello_to(name) | |
Bar.hello(name) | |
end | |
end |
git log --pretty=format: --numstat | sed '/files changed/d' | sed '/^$/d' | cut -f3 | sort | uniq -c | sort |
def Resque.next_delayed_timestamp | |
timestamp = redis.zrangebyscore(:delayed_queue_schedule, '-inf', 100.days.from_now.to_i, 'limit', 0, 1).first | |
timestamp.to_i unless timestamp.nil? | |
end | |
jobs = (0..99).map do |index| | |
timestamp = Resque.next_delayed_timestamp | |
if timestamp | |
Resque.next_item_for_timestamp(timestamp) | |
end |
rvm install ree-1.8.7-2010.02 -C --enable-shared,--with-readline-dir=`brew --prefix` |
RUBY_PATH = File.expand_path('../../lib/ruby/1.8', `which ruby`) | |
module Leakygems | |
class << self | |
def method_metadata(method) | |
begin | |
file = method.__file__ | |
line = method.__line__ | |
if File.expand_path(file).include?(RUBY_PATH) | |
type = "ruby" |
class Jobs::IncomingMessage | |
class << self | |
def encode(content) | |
content = content.gsub(/\215./) { |match| GSM_ESCAPED_CHARACTERS[match[1]] } | |
content = Iconv.conv("UTF-8", "HP-ROMAN8", content) | |
content.gsub!(EURO_TOKEN, "\342\202\254") | |
content | |
end | |
def decode(content) |
<html> | |
<head> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.5.2.min.js"></script> | |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
<script type="text/javascript"> | |
var map = null; | |
function initializeMap() { | |
$.getJSON("http://www.ombord.info/api/jsonp/position/?callback=?", function(gpsData) { | |
var currentPosition = new google.maps.LatLng(gpsData.latitude, gpsData.longitude); | |
map = new google.maps.Map(document.getElementById("map_canvas"), { |
$ ruby -v # => ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-darwin10.4.0], MBARI 0x6770, Ruby Enterprise Edition 2010.02 | |
$ rails -v # => Rails 3.0.7 | |
$ cd /tmp | |
$ rails new mocha-issue-18 | |
$ cd mocha-issue-18 | |
$ cat <<EOF >>Gemfile | |
group :test do | |
gem 'mocha', :require => false |