Skip to content

Instantly share code, notes, and snippets.

View clstokes's full-sized avatar
☁️

Cameron Stokes clstokes

☁️
View GitHub Profile
@clstokes
clstokes / Not working
Last active August 29, 2015 14:16
consul-template debugging
mac-c02nx126g5rp:consul-poc clstokes$ cat consul-template/ingest.ctmpl
{{range $key, $pairs := tree "databases" | byKey}}
{{ $key }}:{{with $url := printf "databases/%s/url" $key }}
url: {{ key $url }}
#urlPath: {{ $url }} <- for troubleshooting purposes
{{end}}{{end}}
mac-c02nx126g5rp:consul-poc clstokes$ ~/cc/other/consul-template/bin/consul-template -consul 127.0.0.1:8500 -template "consul-template/ingest.ctmpl:build/out" -dry -once -log-level debug
2015/03/09 10:11:26 [INFO] (runner) creating new runner (dry: true, once: true)
2015/03/09 10:11:26 [INFO] (runner) creating consul/api client
2015/03/09 10:11:26 [DEBUG] (runner) setting address to 127.0.0.1:8500
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 October 2, 2014 18:01
ping while uploading to s3
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
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
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]
#!/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
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

How can I combine these two JSON documents...

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

{

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.

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