Skip to content

Instantly share code, notes, and snippets.

View nicksieger's full-sized avatar

Nick Sieger nicksieger

View GitHub Profile

Download and build connect.c

cd /tmp
curl -O http://www.meadowy.org/~gotoh/ssh/connect.c
gcc connect.c -o connect -lresolv
sudo mv connect /usr/local/bin

Add proxy command to ~/.ssh/config

Edit host:port as necessary

1) Failure:
test_any_should_not_load_results(NamedScopeTest)
[./test/cases/../../lib/active_record/test_case.rb:40:in `assert_queries'
./test/cases/named_scope_test.rb:189:in `test_any_should_not_load_results'
./test/cases/../../lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:94:in `__send__'
./test/cases/../../lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:94:in `run']:
0 instead of 1 queries were executed.
<1> expected but was
<0>.
# Warbler web application assembly configuration file
Warbler::Config.new do |config|
# Temporary directory where the application is staged
# config.staging_dir = "tmp/war"
# Application directories to be included in the webapp.
config.dirs = %w(app config lib log vendor tmp)
# Additional files/directories to include, above those in config.dirs
# config.includes = FileList["db"]
<plugin>
<groupId>org.jruby.plugins</groupId>
<artifactId>jruby-rake-plugin</artifactId>
<executions>
<execution>
<id>runtests</id>
<phase>test</phase>
<goals><goal>rake</goal></goals>
<configuration>
<script>
require 'java'
class SafeSequence
def initialize
@mutex = java.lang.Object.new
@count = -1
end
def next
@mutex.synchronized { @count += 1}
end
jruby --debug ./script/performance/profiler "Project.alphabetical.publicly_visible" 5000 2> jruby-projects-prof.txt
./script/performance/profiler "Project.alphabetical.publicly_visible" 5000 2> ruby-projects-prof.txt
java.lang.NullPointerException
at org.jruby.parser.Parser.parse(Parser.java:128)
at org.jruby.Ruby.parseEval(Ruby.java:1849)
at org.jruby.Ruby.evalScriptlet(Ruby.java:223)
at org.jruby.javasupport.JavaEmbedUtils$2.eval(JavaEmbedUtils.java:157)
at org.jruby.rack.jms.DefaultQueueManager$RubyObjectMessageListener.onMessage(DefaultQueueManager.java:112)
at com.sun.messaging.jms.ra.DirectSession._deliverMessage(DirectSession.java:1889)
at com.sun.messaging.jms.ra.DirectConsumer.deliver(DirectConsumer.java:368)
at com.sun.messaging.jmq.jmsserver.service.imq.SessionListener.process(IMQDirectService.java:2917)
at com.sun.messaging.jmq.jmsserver.service.imq.SessionListener.run(IMQDirectService.java:2855)
$ ab -n 1000 -c 4 http://localhost:8080/sillytestapp/greetings
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
/*
* Copyright 2007-2008 Sun Microsystems, Inc.
* This source code is available under the MIT license.
* See the file LICENSE.txt for details.
*/
package org.jruby.rack;
import java.io.IOException;
import javax.servlet.ServletConfig;
it "should allow assignable equivalents to be passed to a method" do
impl = DescendantOfSingleMethodInterface.impl {|name| name}
impl.should be_kind_of(SingleMethodInterface)
DescendantOfSingleMethodInterface.should === impl
UsesSingleMethodInterface.callIt(impl).should == :callIt
end