- Login to the instance you want the access credentials for
- run
curl http://169.254.169.254/latest/meta-data/iam/security-credentials/
- 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/
- The response will include the access key, security key and session token
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 '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" |
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
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 |
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
# == 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] |
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
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 |
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 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 |
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
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 |
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
--color --format=doc --format=Nc |
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
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) |
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
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 |
OlderNewer