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
# Task has the following dependencies | |
# net/ssh gem [gem install net-ssh] | |
# net/sftp gem [gem install net-sftp] | |
# rsync command line utility | |
# yamb_db rails plugin [ruby script/plugin install git://github.com/adamwiggins/yaml_db.git] | |
desc "This task will make your development environment download and import a fresh copy of your staging database and also sync any folders such as image uploads so you can quickly replicate your staging/production server content locally" | |
task :sync_with_staging => :environment do | |
@remote_host = 'yourremoteserver.com' | |
@remote_user = 'yoursshuser' |
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/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon |
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
names: | |
aaliyah: | |
genders: "f" | |
aapeli: | |
genders: "m" | |
aapo: | |
genders: "m" | |
aaren: | |
genders: "mf" | |
aarne: |
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
"country_id","affiliate_id","competition_id","date_of_aquasition","title","first_name","lastname","password","email_address","mobile_number","NMS Terms","Promotions" | |
"UK",4,113,04/12/09,"Mr","Matt","Fawcett","mypass123","matt@bolseragency.com","447703001060","Yes","Yes" | |
"IT",5,114,04/12/09,"Dr","Sam","Levy","samspass123","sam@bolseragency.com","sdsdsddsd","Yes","Yes" | |
"UK",4,"Invalid","Invalid","Invalid","Invalid","Invalid","Invalid","Invalid","Invalid","Invalid","Invalid" |
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
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; | |
-- -------------------------------------------------------- | |
-- | |
-- Table structure for table `dialing_codes` | |
-- | |
CREATE TABLE IF NOT EXISTS `dialing_codes` ( | |
`Country` varchar(128) NOT NULL, |
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 'rubygems' | |
gem 'activesupport', :version => "2.3.4" | |
require 'activesupport' | |
gem 'mongo_mapper', :version => "0.6.0" | |
require 'mongo_mapper' | |
MongoMapper.database = "mongo_mapper_issue_test" | |
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 'net/http' | |
require 'net/https' | |
url = URI.parse('https://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/1234567890') | |
req = Net::HTTP::Post.new(url.path) | |
req.set_form_data({'my'=>'params'}) | |
res = Net::HTTP.new(url.host, url.port) | |
res.use_ssl = 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
require 'rubygems' | |
require 'sinatra' | |
get "/" do | |
file_name = '20100108-095851-BSMsgLog.csv' | |
if File.exists?(file_name) | |
file = File.open(file_name, "r") | |
contents = file.read | |
file.close | |
FileUtils.rm(file_name) |
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 "rubygems" | |
require "sinatra" | |
get "/" do | |
"Hello World" | |
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
find . -name '*.rb' | xargs egrep -lRZ '\.make' | xargs -0 sed -i -e '/make!/!s/\.make/\.make_unsaved/g' | grep make_unsaved | |
find . -name '*.rb' | xargs egrep -lRZ '\.make' | xargs -0 sed -i -e 's/\.make!/\.make/g' | grep make |
OlderNewer