Skip to content

Instantly share code, notes, and snippets.

View mdodsworth's full-sized avatar

Michael Dodsworth mdodsworth

View GitHub Profile

Keybase proof

I hereby claim:

  • I am mdodsworth on github.
  • I am mdodsworth (https://keybase.io/mdodsworth) on keybase.
  • I have a public key whose fingerprint is 856A DA22 FF37 CAFC 2508 8995 CD94 AE6A C6AB E04B

To claim this, I am signing this object:

@mdodsworth
mdodsworth / create-ec2-keys.sh
Created November 29, 2014 04:28
script for importing key pairs for all ec2 regions
#!/bin/bash
# Imports a key across all regions
regions=$(aws ec2 describe-regions --output text | cut -f 2 | cut -d . -f 2)
OPTIND=1
usage() {
cat << EOF >&2
usage: $0 -k <key name> -f <public key>
EOF
@mdodsworth
mdodsworth / gist:3490042
Created August 27, 2012 16:23
node: multicast example
var dgram = require('dgram');
var socket = dgram.createSocket('udp4');
var testMessage = "[hello world] pid: " + process.pid;
var multicastAddress = '239.1.2.3';
var multicastPort = 5554;
socket.bind(multicastPort, '0.0.0.0');
socket.addMembership(multicastAddress);