Skip to content

Instantly share code, notes, and snippets.

Avatar
☁️

Cameron Stokes clstokes

☁️
View GitHub Profile
View gist:3ef05d086df3e2f039d5
class ec2-metadata-fail () {
if $ec2_instance_id == undef {
fail('EC2 metadata service is unavailable (ec2_instance_id is undef), failing puppet run.')
}
}
@clstokes
clstokes / gist:584c0375957799d08422
Created Oct 2, 2014
ping while uploading to s3
View gist:584c0375957799d08422
clstokes-ml:grid-api clstokes$ ping google.com
PING google.com (74.125.225.197): 56 data bytes
64 bytes from 74.125.225.197: icmp_seq=0 ttl=54 time=92.114 ms
Request timeout for icmp_seq 1
64 bytes from 74.125.225.197: icmp_seq=1 ttl=54 time=1091.632 ms
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6
64 bytes from 74.125.225.197: icmp_seq=2 ttl=54 time=5663.153 ms
View gist:48e36230d5f993347caf
Every 2.0s: nodetool status Thu Sep 4 23:56:40 2014
Datacenter: us-west-2
=====================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID Rack
UN 54.186.126.123 50.9 KB 256 50.8% 070af76c-a8db-49cd-a2f4-977e35ad68d2 2a
UN 54.191.165.145 60.89 KB 256 50.6% 9e334ffb-2a02-41e4-b9a2-32e4ca84abe0 2a
Datacenter: us-east
View gist:be8e5b0d4ab40ccd08a7
ERROR [2014-09-02 21:02:28,671] com.yammer.dropwizard.jersey.LoggingExceptionMapper: Error handling a request: f5640bf918940ca9
! java.lang.VerifyError: class org.dasein.cloud.aws.compute.EC2Instance overrides final method listProducts.(Lorg/dasein/cloud/compute/Architecture;)Ljava/lan
g/Iterable;
! at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.7.0_65]
! at java.lang.ClassLoader.defineClass(ClassLoader.java:800) ~[na:1.7.0_65]
! at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[na:1.7.0_65]
! at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) ~[na:1.7.0_65]
! at java.net.URLClassLoader.access$100(URLClassLoader.java:71) ~[na:1.7.0_65]
! at java.net.URLClassLoader$1.run(URLClassLoader.java:361) ~[na:1.7.0_65]
! at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[na:1.7.0_65]
View boundary-import-rss.sh
#!/bin/bash
#
# Reads a CSV file in the form <name>,<rss> and adds the RSS feed
# as a new datasource if it doesn't already exist in Boundary and then
# enables the ingestor for the feed.
#
# Requires http://stedolan.github.io/jq/ in your path.
#
# Example usage:
# ./import-rss.sh -o BOUNDARY_ORG_ID -k BOUNDARY_KEY -f CSV_FILENAME
View gist:4ac2681aaa48fe35fe07
clstokes-ml:~ clstokes$ akamaiheaders http://www.zappos.com/
HTTP/1.1 200 OK
Cache-Control: max-age=508
Connection: keep-alive
Content-Encoding: gzip
Content-Length: 22636
Content-Type: text/html; charset=utf-8
Date: Sun, 03 Aug 2014 17:39:15 GMT
Server: nginx
Vary: Accept-Encoding
View gist:7602673

How can I combine these two JSON documents...

{
  variables: {
    frontendPort: "80",
    backendPort: "8080"
  }
}

{
View senior-platform-engineer.md

Senior Platform Engineer

Send questions, resumes, referrals, etc. to cameron.stokes@weather.com.

The Senior Platform Engineer will be part of a group of advanced technologists building a next-generation computing platform, providing assistance and input to other developers, architects and system administrators. He or she will develop internal services, APIs, tools, and user interfaces as well as researching new trends in software design, development tools and operational techniques to maximize our performance and ability to deliver new features to customers and partners.

The tools and services developed by this position will be used by all major products and divisions of The Weather Channel - weather.com, wunderground.com, mobile apps, professional services, etc.

Experience

  • Experience designing and developing highly available, distributed systems.
View airport-extreme-iperf-results.md

ASUS RT-N16 vs. Apple Airport Extreme (2013)

test setup

Everything running 802.11n - a 13-inch, Mid 2012 Macbook Air running iperf to a hard-wired iMac. Latest firmware on both the ASUS and Airport.

Run iperf with -d Do a bidirectional test simultaneously.

sitting next to router

ASUS RT-N16                                         Apple Airport Extreme (2013)
[  5]  0.0-10.0 sec  76.1 MBytes  63.8 Mbits/sec    [  5]  0.0-10.0 sec   175 MBytes   147 Mbits/sec
View airport-extreme-iperf-full-results.md

ASUS RT-N16 vs. Apple Airport Extreme (2013)

test setup

Tested with 13-inch, Mid 2012 Macbook Air running 802.11n. Latest firmware on both devices.

Run iperf with -d Do a bidirectional test simultaneously.

asus rt-n16 wifi (sitting next to router)

cstokes-ml:~ clstokes$ iperf -c 192.168.1.24 -d