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
# install the command line utilities by following the instructions here | |
# http://docs.aws.amazon.com/cli/latest/userguide/awscli-install-bundle.html | |
# Note that we will need to provide you with the credentials or access key/secret before you can | |
# execute these commands, if you try to run these commands and get access denied | |
# that is ok for now. | |
# list the contents of a bucket | |
aws s3 --profile=sr ls s3://yp-test-rob | |
# upload test.txt file from /tmp to the yp-test-rob bucket |
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
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$1 | |
file=$2 |
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
description "graylog2 server" | |
author "Mick Pollard <[email protected]>" | |
start on runlevel [2345] | |
stop on runlevel [06] | |
# tell upstart we're creating a daemon | |
# upstart manages PID creation for you. | |
expect fork |
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 | |
# WARNING: Don't use this in production since all passwords are kept at their default. | |
# mongodb | |
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 | |
echo -e "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen\n" > /etc/apt/sources.list.d/mongodb-10gen.list | |
apt-get update | |
apt-get install -y mongodb-10gen |
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
// This gist is helpful in determining if the dns resolution is the bottleneck when making | |
// outbound http request | |
var dns, http, util; | |
util = require('util'); | |
dns = require('dns'); | |
function outputMs() | |
{ | |
var d = new Date(); | |
var n = d.getUTCMilliseconds(); |
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
// requires request, measured, optimist and microtime npm modules | |
var util = require('util') | |
, request = require('request') | |
, microtime = require('microtime') | |
, measured = require('measured') | |
, collection = new measured.Collection('http') | |
, argv = require('optimist').usage('node load.js -c [concurrent] -n [total] url').argv; | |
var c = argv.c || 1 | |
, n = argv.n || 1, uri = argv._[0] |