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
{ | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:GetObject", | |
"s3:PutObject", | |
"s3:GetObjectAcl", | |
"s3:PutObjectAcl", | |
"s3:ListBucket", |
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 | |
NOW=$(date +"%m-%d-%Y") | |
file="$NOW.appname.tar.gz" | |
sourcedir='/var/www/appname/public_html' | |
bucketname="s3://bucketname/$file" | |
echo "backing up $sourcedir to /tmp/$file & then to s3 bucket $bucketname" | |
tar -zcvf /tmp/$file $sourcedir | |
echo 'all backed up now s3 move' |
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
// aws cloudformation describe-stacks --region ap-southeast-2 | jq '.Stacks[] | select( .Parameters[0].ParameterValue == "s3://" ) | { StackId }' | |
{ | |
"StackId": "arn:aws:cloudformation:ap-southeast-2:xxxxxxx", | |
"Description": "Cache Cluster", | |
"Parameters": [ | |
{ | |
"ParameterValue": "SecurityGroupWebCacheCluster", | |
"ParameterKey": "SecurityGroup" | |
}, |
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
# ubuntu 14.10 server | |
sudo apt-get update | |
#sudo apt-get install node | |
#sudo apt-get install nodejs | |
#sudo apt-get install npm | |
# set up rest http://www.getrailo.org/index.cfm/whats-up/railo-40-beta-released/features/rest-services/ | |
# set up ngrok on mac https://www.twilio.com/blog/2013/10/test-your-webhooks-locally-with-ngrok.html |
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
wget -r -nc --user="username" --password="password" ftp://server/folder/folder |
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
<cfscript> | |
queue = createobject('component', 'ecgateway.owi.business.services.queue'); | |
folderName = createUUID(); | |
</cfscript> | |
<cfdirectory action="create" directory="/tmp/#folderName#" mode="777"> | |
<cffile action="copy" source="/tmp/msns_50k.txt" destination="/tmp/#folderName#/" /> | |
<cfexecute name="split" arguments="-l 500 /tmp/#folderName#/msns_50k.txt /tmp/#folderName#/" /> |
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
# get homebrew http://mxcl.github.com/homebrew/ | |
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" | |
# use homebrew to install rbenv and ruby-build | |
brew update | |
brew install rbenv | |
brew install ruby-build | |
# view available rubies | |
rbenv install --list |
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 rails app - option allows you to write test suite in rspec instead of default | |
rails new demo_app --skip-test-unit | |
# production only gems located in gemfile (pg = postgres) | |
group :production do | |
gem 'pg', '0.12.2' | |
end | |
# dev and test env | |
group :development, :test do |
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 ssh key https://help.github.com/articles/generating-ssh-keys | |
# create repo https://github.com/new | |
git init | |
git add . | |
git commit -m "Initial commit" | |
git mv README.rdoc README.md | |
git commit -a -m "Improve the README" |
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
#gem file config | |
group :development, :test do | |
gem 'sqlite3', '1.3.5' | |
gem 'rspec-rails', '2.11.0' | |
gem 'guard-rspec', '1.2.1' | |
end | |
group :test do | |
gem 'capybara', '1.1.2' |
OlderNewer