This file contains hidden or 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 | |
if [ -n $1 ]; then | |
echo "Usage: $0 <username>" | |
fi | |
for mfaserial in $(aws iam list-mfa-devices --user-name $user --query MFADevices[].SerialNumber --output text); do | |
aws iam deactivate-mfa-device --serial-number $mfaserial --user-name $user | |
aws iam delete-virtual-mfa-device --serial-number $mfaserial | |
done |
This file contains hidden or 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 -e | |
# Script to build a base CentOS 7 Pre-release docker image | |
# Tested under CentOS 6 | |
BUILDROOT="/centos7" | |
if [ $(id -u) -ne 0 ]; then | |
echo "Must be run as root" | |
exit 1 |
This file contains hidden or 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
# Docker image to use with Vagrant | |
# Aims to be as similar to normal Vagrant usage as possible | |
# Adds Puppet, SSH daemon | |
FROM centos | |
MAINTAINER Sam Bashton <[email protected]> | |
RUN yum -y install openssh-server | |
RUN yum -y install MAKEDEV | |
# Workaround needed for bad libselinux-ruby deps | |
RUN yum -y downgrade libselinux-2.0.94-5.3.el6_4.1 libselinux-utils |
This file contains hidden or 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
aws ec2 describe-instances --filters Name=tag:aws:cloudformation:stack-name,Values=${STACKNAME} --output text --query 'Reservations[*].Instances[*].PrivateIpAddress' |
This file contains hidden or 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
aws ec2 describe-images --filters Name=image-type,Values=kernel --filters Name=manifest-location,Values='*pv-grub-hd0_*x86_64*' --owners amazon |
This file contains hidden or 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 'json' | |
require 'net/http' | |
SCHEDULER.every '30s', :first_in => 5 do |job| | |
resp = Net::HTTP.get_response(URI.parse('http://cdnedge.bbc.co.uk/feeds/hi/english/static/cricket/statistics/scorecards/2013/07/87719/live_scorecard.json')) | |
data = resp.body | |
result = JSON.parse(data) | |
text = "<p>" + result["scorecard"]["teamASummary"] + "</p><p>" + result["scorecard"]["teamBSummary"] + "</p>" |
NewerOlder