Skip to content

Instantly share code, notes, and snippets.

View darron's full-sized avatar
🎯
Focusing

darron froese darron

🎯
Focusing
View GitHub Profile
@darron
darron / darron.keys
Last active February 11, 2017 01:28
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDbU5HNPsAXa09LT7CdLneuX7VcGqr5AhWo/ADi7zH0J574+dHo/66BuvY3s6/Ea3Tqy3LTAGKpKGJYEEmlsyrPTyissx+YZ1jS2idwj1YxYLzivLsV3GTIfbcA3UrfoZQEqhjrEA+p7TXQMtHwK5yVaMzA+dubJNQhxBo/Bc0SVhFFXr3Vf7brLe78/yDAulMwtLd3HgYj6RVRpzDImE76R2D9pfr2n3eTzR+iCnCRSXEmyJdyTM4535x0pMre2FVp87S4F09Y3l8sZ52coReUNCVOApKVoqyNxEuoFsXeeeZRUdjHWEXHPFEE57Z5LstsOJW53qVaLX+d0qhFbg4KczCqtUZJPkptxoq+FoUNe5lX90Gq8H4rCmsx31dcdy5DF7a4UBpN0kkkjgjAAoZnRvQRyQqiMGE6WD9SvHxkTopQga5zIstTeAyZJUKzK8xAkCCMtJiVBSy5VNUBy77skyaASEo8JvBRVFEnV151vQei2uPeEcWNYEeJo1ch8UuMzOtR49qsiOTNcUfTmTHJ4sB2500wQH1CfTDyJuK59XYBxMmGbhSk/BkTfFdHn6mnpDMmqOmupaeUp2PLWZFGRJIi8xiXxufMf8kZE1TaJKc/C9KU7QxY7csRy84VA885vtpT8Cu42LTRbj2gFqfF02sVIXHQ/NGa2XEOuk1TZQ==
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCVcjo7fd9Zu0PFxJGyfv787cWOea4FPXvBAw/9JEhAhN14EJqtYAvZAprKXbZhaf9uXeb5phED4mDFPgLzROtzIq9xzWl4a4AFCb6QlPhVoSOKUeJdXxCN3cVMUJ4spGe3iW24HohUHhGdzAA1+6Fd0yi4hyxlY7Mpp/27iqkQBFY6rCOFr2rHFOJvRcURssPlJLXSf/xHWehbqSpNic41yayRbhY+X1a9lFSl+MXDtDcGAUC1cr7pp1+uvOrsNoJH+BG
@darron
darron / rename.go
Created October 28, 2016 15:48
Rename a bunch of files that were downloaded from S3 with really long names.
package main
import (
"fmt"
"io/ioutil"
"log"
"os"
"strings"
)
@darron
darron / main.go
Last active October 12, 2016 16:40
Adjust a bunch of JSON files in a folder.
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"os"
)
@darron
darron / consul-sg-sync.sh
Created August 11, 2016 21:08
If you've got a lot of security groups and you need Consul to connect to each - here's the brute force way to do it.
#!/bin/bash
# Make a list of all security groups - one on each line.
# Save as `security-groups.txt`
# Yes this would be easier in VPC or by launching with multiple Security Groups
# but you might not have that option and you might have to do this.
SGROUPS=$(cat security-groups.txt)
instances:
- host: localhost
port: 9990 # This is the JMX port on which Kafka exposes its metrics (usually 9999)
tags:
kafka: broker
# env: stage
name: server0
- host: localhost
port: 9991 # This is the JMX port on which Kafka exposes its metrics (usually 9999)
tags:
@darron
darron / goshe-dns.json
Created April 8, 2016 10:33
Datadog metrics JSON for selected metrics in kvexpress demo.
{
"viz": "timeseries",
"requests": [
{
"q": "sum:goshe.dnsmasq.queries{*} by {query}.as_count()",
"conditional_formats": [],
"type": "bars",
"aggregator": "avg"
}
]
package main
import (
"fmt"
"github.com/miekg/dns"
"log"
"net"
"os"
)
{
"watches": [
{
"type": "service",
"service": "redis",
"handler": "put the handler here"
}
]
}
FROM octohost/node-python-git-docker
RUN mkdir -p /srv/www
ADD . /srv/www
WORKDIR /srv/www
RUN npm install --unsafe-perm
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis eros odio, vehicula eu tincidunt vel, fringilla a massa. In pharetra nunc et massa placerat finibus. Sed ligula nunc, porttitor id sodales vitae, vehicula vitae urna. Aenean ut justo est. Fusce in felis a nibh aliquet tincidunt ultrices non enim. Vestibulum vitae egestas risus. Phasellus est ex, condimentum et lectus ac, egestas consectetur turpis. Cras sit amet massa et nisl tristique lacinia vel quis diam. Etiam feugiat magna vitae ornare rutrum. Phasellus quis iaculis nisi, at placerat quam. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut ex ante, fringilla vel euismod in, gravida a nunc. Donec laoreet, metus id vulputate aliquam, sem massa semper mi, at viverra mi lectus nec erat. Morbi sapien tellus, laoreet ac tempor at, efficitur in eros.
Interdum et malesuada fames ac ante ipsum primis in faucibus. Proin commodo odio ligula, ut pretium quam rutrum ac. Cras sodales tortor erat, id hendrerit lec