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 | |
# this sucks, but I want my devices enumerated the way I want them | |
declare -A mac_devices | |
mac_devices["aa:bb:cc:dd:ee:f1"]="eth0" | |
mac_devices["aa:bb:cc:dd:ee:f2"]="eth1" | |
mac_devices["aa:bb:cc:dd:ee:f3"]="eth2" | |
mac_devices["aa:bb:cc:dd:ee:f4"]="eth3" |
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
import requests | |
import json | |
API_KEY = <your meetup api key here> | |
EVENT_IDS = [ 98235712, 99553192 ] | |
attendees = set() | |
for event_id in EVENT_IDS: | |
r = requests.get("https://api.meetup.com/rsvps?key=%s&sign=true&event_id=%d" % (API_KEY, event_id)) |
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 'facter' | |
def get_xen_ephemeral_device(index) | |
dev = Facter.value("ec2_block_device_mapping_ephemeral#{index}") | |
if !dev.nil? | |
xendev = "xvd",(dev[2] + 4).chr | |
if dev.length > 3 | |
xendev = format("%s%s", xendev, dev[3, dev.length]) | |
end | |
return xendev |
NewerOlder