Skip to content

Instantly share code, notes, and snippets.

View clstokes's full-sized avatar
☁️

Cameron Stokes clstokes

☁️
View GitHub Profile
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
#!/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
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]
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
@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
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 / 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
@clstokes
clstokes / gist:5a107c30f88eac4057de
Created May 18, 2015 20:23
terraform variables and split function
variable "subnet_cidr_blocks" {
default = "192.168.0.0/24,192.168.1.0/24,192.168.2.0/24"
}
@clstokes
clstokes / output
Last active August 29, 2015 14:23
main.tf
provider "aws" {
access_key = "ASDF"
secret_key = "ASDF"
region = "us-east-1"
}
resource "aws_security_group" "no_modifications_single_ingress" {
name = "no_modifications_single_ingress"
description = "this security group causes NO modifications each run"
@clstokes
clstokes / slideshow-javascript.html
Created January 23, 2011 15:51
A solution to the JavaScript problem posed in observation 3 at http://bit.ly/gCmjbR.
<!doctype html>
<head>
<meta charset="utf-8">
<title></title>
</head>