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
####<Jul 25, 2008 5:04:19 PM EDT> <Error> <HTTP> <nclwebdevapp02> <NCLWEBDEVAPP02> <ExecuteThread: '12' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-101019> <[ServletContext(id=67489679,name=myncl,context-path=/myncl)] Servlet failed with IOException | |
java.io.FileNotFoundException: /home/weblogic/bea/user_projects/domains/NCLWEBDEVdom/./NCLWEBDEVAPP02/.wlnotdelete/extract/NCLWEBDEVAPP02_myncl_myncl/jsp_servlet/_common/_layout/__home_template.java (No such file or directory) | |
at java.io.FileOutputStream.open(Native Method) | |
at java.io.FileOutputStream.<init>(FileOutputStream.java:179) | |
at java.io.FileOutputStream.<init>(FileOutputStream.java:131) | |
at java.io.FileWriter.<init>(FileWriter.java:73) | |
at weblogic.servlet.jsp.Jsp2Java.makeOutputStream(Jsp2Java.java:301) | |
at weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:337) | |
at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:286) | |
at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:388) |
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
# Only fixes the structural stupidity, not the retardedness | |
# of the underlying method of package finding | |
def get_cruise_package(cruise_package_code) | |
returning(package = nil) do |pack| | |
[ | |
:getPreHotelPackage, :getPostHotelPackage, :getShorexPackage, | |
:getPreTransfersPackage, :getPostTransfersPackage, getMotorcoachPackage | |
].detect do |find_by_package_type| | |
pack = send(find_by_package_type, cruise_package_code) | |
end |
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
--- /Users/christian/Desktop/abe.txt 2008-08-13 13:28:39.000000000 -0400 | |
+++ /Users/christian/Desktop/cbe.txt 2008-08-13 13:28:55.000000000 -0400 | |
@@ -1,16 +1,20 @@ | |
. | |
.. | |
+.DS_Store | |
README.txt | |
TimeAndMoney | |
ant-contrib-1.0b1 |
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
#!/bin/bash | |
# Backup existing JAR | |
cp user_projects/domains/NCLWEBDEVdom/applications/CS/WEB-INF/lib/cms-dependencies.jar backups/cms/cms-dependencies.jar.`date -u +%Y-%m-%dT%H:%M:%SZ` | |
# Copy latest from cruise control | |
scp [email protected]:/var/cruisecontrolrb/projects/cms/work/dist/cms-dependencies.jar user_projects/domains/NCLWEBDEVdom/applications/CS/WEB-INF/lib/ | |
# Make sure we own the file | |
chown weblogik:ncldevadm user_projects/domains/NCLWEBDEVdom/applications/CS/WEB-INF/lib/cms-dependencies.jar | |
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 -w | |
require 'fileutils' | |
include FileUtils | |
Version = ARGV.first | |
Downloads = File.join(ENV['HOME'], "Downloads") | |
BashCompletion = File.join(ENV['HOME'], ".bash_completion", "git_bash_completion") | |
# Create src download directory, if needed | |
mkdir_p(Downloads) unless File.exists?(Downloads) |
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
[ | |
'rubygems', | |
'irb/completion', | |
'net/http', | |
'wirble', | |
'map_by_method', | |
'what_methods' | |
].each {|lib| require lib} | |
def log |
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
# Need to handle all of these.... | |
# [x] Reservation.find(123) | |
# [ ] Reservation.find(123,456,769) | |
# [ ] Reservation.find(:all) | |
# [ ] Reservation.find(:all, :conditions => ['foo = ?', 'bar']) | |
module Cacheable | |
@@store = 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 PersonalInfo < Section | |
immutable_fields :title, :birthdate, :country_of_birth, | |
:citizenship, :language, :email, :first_time_cruiser | |
validates_presence_of *(ImmutableFields - [:email]) | |
end |
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
mapper = Hash.new do |h,k| | |
[k.upcase, lambda {|x| x}] | |
end |
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
# One of the coolest things about lambdas is that they allow you to create your | |
# own control-flow structures. Of course, we often want control flow structures | |
# to branch. The built-in if/else control flow mechanism has branching. But, in Ruby, | |
# there's no way to specify that a method accepts two blocks | |
# and still retain the do..end syntactic sugar. Here's how you accept (and use) two blocks: | |
def odd(number, is_odd, is_even) | |
if number % 2 != 0 | |
is_odd.call if is_odd.respond_to?(:call) | |
else |
OlderNewer