Skip to content

Instantly share code, notes, and snippets.

Avatar
☁️

Cameron Stokes clstokes

☁️
View GitHub Profile
@clstokes
clstokes / pasteboard_scrubber.lua
Last active November 17, 2022 21:30
A Hammerspoon (https://www.hammerspoon.org/) script to scrub tracking variables from Twitter share links in your pasteboard (clipboard).
View pasteboard_scrubber.lua
function pasteboard_scrubber(copied_value)
local t_match = "^(https://twitter.com/[a-zA-Z0-9_]+/status/[0-9a-zA-Z]+)[?]+.+$"
local _, _, matched_value = string.find(copied_value, t_match)
if matched_value ~= nil then
-- Replace URL in pasteboard
hs.pasteboard.writeObjects(matched_value)
end
end
@clstokes
clstokes / assume-role-policy.json
Last active September 1, 2022 20:15
Example: Terraform IAM Role
View assume-role-policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
@clstokes
clstokes / index.ts
Created March 26, 2020 00:04 — forked from kevink/index.ts
Test Script for AWS infra
View index.ts
// Copyright 2016-2019, Pulumi Corporation. All rights reserved.
import * as aws from "@pulumi/aws";
import * as awsx from "@pulumi/awsx";
import * as pulumi from "@pulumi/pulumi";
//import { VpcEndpointService } from "@pulumi/aws/ec2";
// ****************************************************************************************************************************************
// Grab some secrets from our config file
// ****************************************************************************************************************************************
@clstokes
clstokes / index.ts
Created December 3, 2018 22:43
Pulumi Example: Create multiple AWS IAM Roles.
View index.ts
import * as aws from "@pulumi/aws";
const assumeRolePolicyDocument = JSON.stringify({
Version: "2012-10-17",
Statement: [{
Action: "sts:AssumeRole",
Principal: {
Service: "ec2.amazonaws.com"
},
Effect: "Allow",
@clstokes
clstokes / iam.tf
Last active December 3, 2017 15:31
View iam.tf
variable "role_name" {}
variable "role_policy_file" {}
resource "aws_iam_role" "role" {
name = "${var.role_name}"
assume_role_policy = "${file("${path.module}/policies/${var.role_policy_file}")}"
}
output "role_arn" {
value = "${aws_iam_role.role.arn}"
@clstokes
clstokes / tomcat7
Created September 25, 2012 21:06
Enable JMX in Tomcat 7 on Ubuntu
View tomcat7
#
# Since I have to look this up every time...
#
# Add the following in /etc/default/tomcat7
#
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote"
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.port=9991"
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.ssl=false"
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 gist:3d157e784b1d60af283d
### Keybase proof
I hereby claim:
* I am clstokes on github.
* I am clstokes (https://keybase.io/clstokes) on keybase.
* I have a public key whose fingerprint is B970 5386 3BE3 EAE8 446A 1FA8 AAC4 B68D A32C 32D4
To claim this, I am signing this object:
View gist:7602673

How can I combine these two JSON documents...

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

{
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