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
# this is a DSL example, anonymized from a production usecase, showing | |
# deployment to an A/B shared server system from multiple sources. | |
# note that in this example that while there are many servers to restart, | |
# the code is deployed to a shared drive. | |
application 'example' do | |
server_set = environment.example_test_server | |
cgi_bin_dir = environment.example_dir + '/cgi_bin' + server_set | |
web_dir = environment.example_dir + '/web' | |
# remove some paths in the destination |
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
# in config/environments/production.rb | |
config.after_initialize do | |
SshTunnel.establish | |
end | |
# in lib/ssh_tunnel.rb | |
class SshTunnel | |
@@process_id = nil | |
COMMAND = "ssh [email protected] -R 9988:localhost:3000 -N -T -o PasswordAuthentication=no" | |
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
[2010-11-09 11:42:08] ./installer -a /Users/mpearson/.rvm/rubies/ree-1.8.7-2010.02 --dont-install-useful-gems | |
./configure: line 4633: : command not found | |
rm: conftest.dSYM: is a directory | |
rm: conftest.dSYM: is a directory | |
configure: WARNING: Could not find the PC. Will not output failed addresses... | |
In file included from src/base/commandlineflags.h:55, | |
from src/tcmalloc.cc:114: | |
./src/base/basictypes.h: In constructor ‘AssignAttributeStartEnd::AssignAttributeStartEnd(const char*, char**, char**)’: | |
./src/base/basictypes.h:251: warning: ‘_dyld_present’ is deprecated (declared at /usr/include/mach-o/dyld.h:237) | |
./src/base/basictypes.h:251: warning: ‘_dyld_present’ is deprecated (declared at /usr/include/mach-o/dyld.h:237) |
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
# See https://github.com/dchelimsky/rspec/wiki/Custom-Formatters for info on how to use custom formatters in rspec 1.x | |
require 'spec/runner/formatter/progress_bar_formatter' | |
class ProgressEmoFormatter < Spec::Runner::Formatter::ProgressBarFormatter | |
@@num_consecutive_failures = 0 | |
FAILURES_BEFORE_EMO = 4 | |
def example_failed(example, counter, failure) |
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
I am looking for a Senior Ruby Developer with a Java background to | |
start as soon as possible, you will be working in a paired agile | |
environment developing Ruby coding. Using Selenium/Cucumber for | |
automation testing. | |
Immediate Start | |
3 Month Contract | |
Competitive Rate circa $600 per day including Super (PAYG/ABN: PTY | |
LTD) |
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 | |
require 'fileutils' | |
def last_committer | |
@last_committer ||= `git log --format="%an" -1`.strip | |
end | |
INSULTS = %{ | |
%s is a bad programmer and |
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
log4j:ERROR setFile(null,true) call failed. | |
java.io.FileNotFoundException: /var/log/puge/puge.log (Permission denied) | |
at java.io.FileOutputStream.openAppend(Native Method) | |
at java.io.FileOutputStream.<init>(FileOutputStream.java:207) | |
at java.io.FileOutputStream.<init>(FileOutputStream.java:131) | |
at org.apache.log4j.FileAppender.setFile(FileAppender.java:290) | |
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:164) | |
at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:216) | |
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:257) | |
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:133) |
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
# Based on half of https://s3.amazonaws.com/cloudformation-templates-us-east-1/WordPress-1.0.0.template | |
# Methods beginning with a lowercase letter are 'native' and have special behaviour. | |
# Methods beginning with an uppercase letter get literally transformed into JSON | |
templates do | |
Alarm do | |
EvaluationPeriods 1 | |
Statistic 'Average' | |
Period 60 | |
AlarmActions: ref('AlarmTopic') |
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_spec.rb | |
require 'spec_helper' | |
describe Configuration do | |
context "with the configuration variable set " do | |
before do | |
@config = Configuration.new(:key => 'hello', :value => 'goodbye') | |
mock(Configuration).find_by_key('hello') { @config } | |
end |
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 Match | |
include Mongoid::Document | |
include Mongoid::Timestamps # adds created_at and updated_at fields | |
field :scheduled_start, :type => Date | |
field :status | |
embeds_one :home_team | |
embeds_one :away_team | |
end |
OlderNewer