Skip to content

Instantly share code, notes, and snippets.

@smoser
smoser / mdserv
Created October 11, 2011 16:48
simple python web server that mimicks ec2 instance metadata service
#!/usr/bin/python
"""
To use this to mimic the EC2 metadata service entirely, run it like:
# where 'eth0' is *some* interface. if i used 'lo:0' i got 5 second or so delays on response.
sudo ifconfig eth0:0 169.254.169.254 netmask 255.255.255.255
sudo ./mdserv 169.254.169.254:80
Then:
wget -q http://169.254.169.254/latest/meta-data/instance-id -O -; echo
curl --silent http://169.254.169.254/latest/meta-data/instance-id ; echo
@ralphbean
ralphbean / .taskrc
Created February 13, 2012 18:20
taskrc
# Files
data.location=/home/threebean/.task
#include /home/threebean/.task/solarized-dark-256.theme
_forcecolor=yes
defaultwidth=160
include /usr/local/share/doc/task/rc/dark-violets-256.theme
report.work_report.description=now
@dustymabe
dustymabe / gist:3d53cfe6b9ae32c5e2fb
Created October 30, 2014 04:52
ec2makeimage.txt
# Using ec2-api-tools cli to create ebs backed AMI
# get the cli from https://aws.amazon.com/developertools/Amazon-EC2/351
# Download image
wget https://kojipkgs.fedoraproject.org//work/tasks/8933/7978933/Fedora-Cloud-Base-20141029-21_Beta.i386.raw.xz --no-check-certificate
# Uncompress image
unxz Fedora-Cloud-Base-20141029-21_Beta.i386.raw.xz
# export keys to env