Skip to content

Instantly share code, notes, and snippets.

View nicksieger's full-sized avatar

Nick Sieger nicksieger

View GitHub Profile
diff --git a/railties/configs/databases/jdbcmysql.yml b/railties/configs/databases/jdbcmysql.yml
new file mode 100644
index 0000000..a680d10
--- /dev/null
+++ b/railties/configs/databases/jdbcmysql.yml
@@ -0,0 +1,55 @@
+# MySQL. Versions 4.1 and 5.0 are recommended.
+#
+# Install the MySQL driver:
+# gem install mysql
diff --git a/railties/configs/databases/jdbcmysql.yml b/railties/configs/databases/jdbcmysql.yml
new file mode 100644
index 0000000..a680d10
--- /dev/null
+++ b/railties/configs/databases/jdbcmysql.yml
@@ -0,0 +1,55 @@
+# MySQL. Versions 4.1 and 5.0 are recommended.
+#
+# Install the MySQL driver:
+# gem install mysql
class JRuby::Rack::RailsSetup
def call(env)
env['rails.session_options'] = @servlet_helper.session_options_for_request(env)
env['HTTPS'] = 'on' if env['rack.url_scheme'] == 'https'
# relative_url_root = env['java.servlet_request'].getContextPath
# if relative_url_root && !relative_url_root.empty?
# env['RAILS_RELATIVE_URL_ROOT'] = relative_url_root
# ActionController::Base.relative_url_root = relative_url_root if ActionController::Base.respond_to?(:relative_url_root=)
# end
@app.call(env)
module ActionView::Helpers::AssetTagHelper
def compute_public_path_with_skip_context_path(*args)
path = compute_public_path_without_skip_context_path(*args)
path.sub(%r{/meeho/}, '/')
end
alias_method_chain :compute_public_path, :skip_context_path
end
class HTTPStreamHandler < StreamHandler
include SOAP
# begin
# require 'http-access2'
# if HTTPAccess2::VERSION < "2.0"
# raise LoadError.new("http-access/2.0 or later is required.")
# end
# Client = HTTPAccess2::Client
# RETRYABLE = true
#!/usr/bin/ruby
#
# Copyright 2008 Nick Sieger
#
# Replacement for growlnotify on Leopard, until the Growl folks fix it.
# Based on a script from http://www.silverchairsolutions.com/blog/?p=19, which
# was based on http://growl.info/documentation/applescript-support.php.
require 'optparse'
require 'ostruct'
module AutoGrowl
def self.growl(title, msg, pri = 0)
system "/usr/local/bin/growlnotify -n autotest --image /Applications/Mail.app/Contents/Resources/Caution.tiff -p #{pri} -m #{pt msg.inspect} #{pt title.inspect}"
end
Autotest.add_hook :initialize do |at|
growl "autotest", "autotest was started"
at.add_exception(/(public|log|tmp|coverage|script|.(svn|hg|git))/)
# $v = true
end
[11:40:20][~/Projects/jruby/trunk/jruby (gemjar)]
$ java -jar lib/jruby-complete.jar -S gem list
*** LOCAL GEMS ***
rake (0.8.3)
rspec (1.1.11)
sources (0.0.1)
[11:41:32][~/Projects/jruby/trunk/jruby (gemjar)]
$ java -jar lib/jruby-complete.jar -S rake -T
From 421ab22afc28889fc847048081652307c37129be Mon Sep 17 00:00:00 2001
From: Nick Sieger <[email protected]>
Date: Fri, 7 Nov 2008 17:02:57 -0500
Subject: [PATCH] Simplify dispatcher callbacks to eliminate unnecessary stale thread purging
---
actionpack/lib/action_controller/dispatcher.rb | 1 -
.../abstract/connection_pool.rb | 5 +----
2 files changed, 1 insertions(+), 5 deletions(-)
[11:17:58][~/Projects/jruby/trunk/gems]
$ java -jar jruby-complete.jar -S gem install -i ./chronic chronic --no-rdoc --no-ri
JRuby limited openssl loaded. gem install jruby-openssl for full support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
Successfully installed chronic-0.2.3
1 gem installed
[11:18:15][~/Projects/jruby/trunk/gems]
$ jar cf chronic.jar -C chronic .
[11:18:28][~/Projects/jruby/trunk/gems]
$ jar tf chronic.jar | head -10