Skip to content

Instantly share code, notes, and snippets.

View stevenjack's full-sized avatar
📝
Available for contracting

Steven Jack stevenjack

📝
Available for contracting
View GitHub Profile
require 'formula'
class Composer < Formula
homepage 'http://getcomposer.org'
url 'https://getcomposer.org/composer.phar'
sha1 'f10b5a52c34a46986bf84dca31176aa29174d089'
version 'HEAD'
def install
bin.install "composer.phar" => "composer"
panic: Failed to write data, buffer full for stream 22
goroutine 29 [running]:
runtime.panic(0x646fe0, 0xc21034f520)
/usr/local/go/src/pkg/runtime/panic.c:266 +0xb6
github.com/mitchellh/packer/packer/rpc.(*MuxConn).loop(0xc2100dad90)
/home/vagrant/go/src/github.com/mitchellh/packer/packer/rpc/muxconn.go:401 +0x1284
created by github.com/mitchellh/packer/packer/rpc.NewMuxConn
/home/vagrant/go/src/github.com/mitchellh/packer/packer/rpc/muxconn.go:72 +0xf4
# == WHAT
# Simple script for irssi to trigger Mac OS X 10.8's Notification Center
#
# == WHO
# Patrick Kontschak 2012
#
# Forked from Nate Murray's irssi-growl: https://github.com/jashmenn/irssi-growl
#
# == CONFIG
# /SET notifier_on_regex [regex]
curl -L http://pkgs.repoforge.org/htop/htop-1.0.2-1.el6.rf.x86_64.rpm -o /tmp/test.rpm && sudo rpm -i /tmp/test.rpm && htop
#Install lsof
sudo yum install lsof -y
#Grab the top tomcat process and list out the number of open files
sudo lsof -p $(ps aux | grep -m1 tomcat | cut -d ' ' -f6) | wc -l
  1. Login to the instance you want the access credentials for
  2. run curl http://169.254.169.254/latest/meta-data/iam/security-credentials/
  3. Get the name of the role returned by this endpoint, and append it to the end: curl http://169.254.169.254/latest/meta-data/iam/security-credentials/ROLE_NAME/
  4. The response will include the access key, security key and session token
module AOP
def around(fn_name)
old_method = instance_method(fn_name)
define_method(fn_name) do |*args|
yield :before, args if block_given?
old_method.bind(self).call *args
yield :after, args if block_given?
end
end
end
--color --format=doc --format=Nc
sqs = AWS::SQS.new
queue = sqs.queues.create('test-queue')
#The name of the queue above should be the same name as dfined in the app.json
message = '{"some" : "key"}'
msg = queue.send_message(message)
echo "Removing file.."
rm -rf $1
while [ ! -f $1 ]
do
echo "File not available, sleeping..."
sleep 1
done
echo "File available, output below: \n"
tail -f $1