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
worker: QUEUE=* bundle exec rake environment resque:work | |
scheduler: bundle exec rake environment resque:scheduler |
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
### BEGIN INIT INFO | |
# Provides: Xvfb | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: | |
# X-Start-Before: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Loads X Virtual Frame Buffer | |
### END INIT INFO | |
# To automatically run on startup use command: |
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
config.action_mailer.perform_deliveries = true | |
config.action_mailer.smtp_settings = { | |
address: ENV['SMTP_SERVER'], | |
authentication: :login, | |
domain: 'example.com', | |
port: 25, | |
password: ENV['SMTP_PASSWORD'], | |
user_name: ENV['SMTP_USERNAME'], | |
enable_starttls_auto: true | |
} |
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
{ with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i } | |
pwd | |
{ with: /\A(?=.*[a-zA-Z])(?=.*[0-9]).{6,}\z/ } |
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
var extend = function(child) { | |
var base = this; | |
if(child) { | |
for(var prop in child) { | |
base[prop] = child[prop]; | |
} | |
for(var prop in child) { | |
base.prototype[prop] = child[prop]; |
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
require "watir-webdriver" | |
caps = Selenium::WebDriver::Remote::Capabilities.firefox | |
caps.platform = :LINUX | |
caps[:name] = "WebDriver" | |
browser = Watir::Browser.new(:remote, url: "http://192.168.119.118:4444/wd/hub", desired_capabilities: caps) | |
browser.goto "http://www.google.com" | |
browser.quit |
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
def multi_db_commit(tx_id, dbs) | |
prepared = [] | |
dbs.each do |db, pr| | |
db.transaction(:prepare=>tx_id, &pr) | |
prepared << db | |
end | |
rescue | |
prepared.each do |db| | |
begin |
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
cd | |
git clone git://github.com/sstephenson/rbenv.git .rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
exec $SHELL | |
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc | |
exec $SHELL |
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
CREATE TABLE `COM_AUDIT_TRAIL` ( | |
`AUD_USER` varchar(100) NOT NULL , | |
`AUD_CLIENT_IP` VARCHAR(15) NOT NULL , | |
`AUD_SERVER_IP` VARCHAR(15) NOT NULL , | |
`AUD_RESOURCE` varchar(100) NOT NULL , | |
`AUD_ACTION` varchar(100) NOT NULL , | |
`APPLIC_CD` varchar(5) NOT NULL , | |
`AUD_DATE` TIMESTAMP NOT NULL | |
); | |
ALTER TABLE `COM_AUDIT_TRAIL` |
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 MultipleIO | |
def initialize(*targets) | |
@targets = targets | |
end | |
def write(*args) | |
@targets.each { |t| t.write(*args) } | |
end | |
def close |