Skip to content

Instantly share code, notes, and snippets.

View robertlmullen74's full-sized avatar

Rob Mullen robertlmullen74

  • Pearson
  • Denver, CO
View GitHub Profile
# 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
# 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
@robertlmullen74
robertlmullen74 / gist:5623420
Last active December 17, 2015 14:19
copy of graylog conf, but needed different file path
description "graylog2 server"
author "Mick Pollard <aussielunix@gmail.com>"
start on runlevel [2345]
stop on runlevel [06]
# tell upstart we're creating a daemon
# upstart manages PID creation for you.
expect fork
#!/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
@robertlmullen74
robertlmullen74 / nodejs-dns-vs-ip-lookup-test.js
Created October 4, 2012 15:31
Node.js tester of dns lookup vs ip using the dns module
// 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();
@robertlmullen74
robertlmullen74 / load.js
Created March 19, 2012 15:23 — forked from mbrevoort/load.js
Simple ab style load generator
// 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]