This file contains hidden or 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 | |
# encoding: utf-8 | |
# setup | |
# | |
require 'fileutils' | |
script = File.expand_path(__FILE__).gsub(%r|\breleases/\d+\b|, 'current') | |
script_dir = File.dirname(script) | |
rails_root = File.dirname(script_dir) |
This file contains hidden or 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
dirs = ["output/test/deepdir", "testdir", "another"] | |
task :default => dirs | |
dirs.each do |dir| | |
directory dir | |
end | |
# fjean@Prometheus ~/dev/gist-806422 | |
# master* $ rake -t -v [13:22:23] |
This file contains hidden or 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 Object | |
# An object is blank if it's false, empty, or a whitespace string. | |
# For example, "", " ", +nil+, [], and {} are blank. | |
# | |
# This simplifies | |
# | |
# if !address.nil? && !address.empty? | |
# | |
# to | |
# |
This file contains hidden or 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
>> x = java.lang.reflect.Array.newInstance(java.lang.Class.forName("java.lang.String"), 0) | |
=> #<#<Class:01x4657104d>:0x7def534e @java_object=#<Java::JavaArray:0x6b466679>> | |
>> x.blank? | |
=> false | |
>> x.length | |
=> 0 | |
>> x[0] | |
ArgumentError: index out of bounds for java array (0 for length 0) | |
from (irb):5:in `[]' | |
from (irb):5 |
This file contains hidden or 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
(setq ruby-deep-indent-paren nil) | |
(setq ruby-deep-arglist nil) |
This file contains hidden or 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
config = ['kestrel-1:22133', 'kestrel-2:22133'] | |
config << {:pool_name => 'async'} | |
client = MemCache.new(config) |
This file contains hidden or 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
if RUBY_PLATFORM =~ /java/i | |
# Based on instructions from http://www.mikeperham.com/2009/03/03/using-memcache-client-16x-in-rails-23/ | |
# Brain surgery to use our own version of memcache-client without | |
# having to modify activesupport directly. | |
# Unload any previous instance of the class | |
if Object.const_defined? :MemCache | |
Object.instance_eval { remove_const :MemCache } | |
end | |
# Ensure that the memcache-client path is at the front of the loadpath |
This file contains hidden or 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
init: | |
No ivy:settings found for the default reference 'ivy.instance'. A default instance will be used | |
[ivy:info] :: Ivy 2.0.0-beta1 - 20071206070608 :: http://ant.apache.org/ivy/ :: | |
:: loading settings :: file = /Users/fjean/Projects/kestrel/ivy/ivysettings.xml | |
[ivy:info] [xml parsing: file:/Users/fjean/Projects/kestrel/ivy/ivy.xml:9:5: cvc-complex-type.3.2.2: Attribute 'e:testclass' is not allowed to appear in element 'info'. in file:/Users/fjean/Projects/kestrel/ivy/ivy.xml | |
[ivy:info] , xml parsing: file:/Users/fjean/Projects/kestrel/ivy/ivy.xml:9:5: cvc-complex-type.3.2.2: Attribute 'e:jarclassname' is not allowed to appear in element 'info'. in file:/Users/fjean/Projects/kestrel/ivy/ivy.xml | |
[ivy:info] , xml parsing: file:/Users/fjean/Projects/kestrel/ivy/ivy.xml:9:5: cvc-complex-type.3.2.2: Attribute 'e:buildpackage' is not allowed to appear in element 'info'. in file:/Users/fjean/Projects/kestrel/ivy/ivy.xml | |
[ivy:info] ] | |
BUILD FAILED |
This file contains hidden or 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
[05/29/09 12:03:37 (15063)] ERROR : Caught exception undefined method `[]' for nil:NilClass try | |
ing to get connection to DB for explain. Config: | |
[05/29/09 12:03:37 (15063)] ERROR : /export/glassfish/domains/domain1/applications/j2ee-modules | |
/junction2/WEB-INF/vendor/plugins/newrelic_rpm/lib/new_relic/transaction_sample.rb:256:in `get_ | |
connection' | |
/export/glassfish/domains/domain1/applications/j2ee-modules/junction2/WEB-INF/vendor/plugins/ne | |
wrelic_rpm/lib/new_relic/transaction_sample.rb:160:in `explain_sql' | |
/export/glassfish/domains/domain1/applications/j2ee-modules/junction2/WEB-INF/vendor/plugins/ne | |
wrelic_rpm/lib/new_relic/transaction_sample.rb:156:in `each' | |
/export/glassfish/domains/domain1/applications/j2ee-modules/junction2/WEB-INF/vendor/plugins/ne |
This file contains hidden or 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
# Configuration file for "pkg-get" | |
# man pkg-get for details on the program | |
url=http://kenai.com/downloads/kenai-packages/dist | |
# If you are behind a firewall, set one of these as appropriate | |
ftp_proxy=http://mailin02:3128 | |
http_proxy=http://mailin02:3128 | |
export http_proxy ftp_proxy |