Skip to content

Instantly share code, notes, and snippets.

View thisismitch's full-sized avatar

Mitchell Anicas thisismitch

View GitHub Profile
@thisismitch
thisismitch / gist:4cf44e866e5fdfccef3b
Created July 31, 2014 16:46
terraform build error
Mitchells-MBP:terraform userguy$ make updatedeps
rm -rf vendor/libucl
mkdir -p vendor/libucl
git clone https://github.com/hashicorp/libucl.git vendor/libucl
Cloning into 'vendor/libucl'...
remote: Counting objects: 1950, done.
remote: Compressing objects: 100% (563/563), done.
remote: Total 1950 (delta 1276), reused 1950 (delta 1276)
Receiving objects: 100% (1950/1950), 2.32 MiB | 429.00 KiB/s, done.
Resolving deltas: 100% (1276/1276), done.
@thisismitch
thisismitch / haproxy-www.tf
Last active March 6, 2020 02:22
How To Use Terraform with DigitalOcean
resource "digitalocean_droplet" "haproxy-www" {
image = "ubuntu-14-04-x64"
name = "haproxy-www"
region = "nyc2"
size = "512mb"
private_networking = true
ssh_keys = [
"${var.ssh_fingerprint}"
]
connection {
@thisismitch
thisismitch / nginx.conf
Created October 6, 2014 20:48
Nginx server block for Kibana
#
# Nginx proxy for Elasticsearch + Kibana
#
# In this setup, we are password protecting the saving of dashboards. You may
# wish to extend the password protection to all paths.
#
# Even though these paths are being called as the result of an ajax request, the
# browser will prompt for a username/password on the first request
#
# If you use this, you'll want to point config.js at http://FQDN:80/ instead of
@thisismitch
thisismitch / user-data
Last active August 29, 2015 14:07
Deis user-data
#cloud-config
---
coreos:
etcd:
# generate a new token for each unique cluster from https://discovery.etcd.io/new
# uncomment the following line and replace it with your discovery URL
discovery: https://discovery.etcd.io/<DISCOVERY_TOKEN>
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
# give etcd more time if it's under heavy load - prevent leader election thrashing
@thisismitch
thisismitch / kibana-4.x-default
Last active December 30, 2020 00:07
ELK Kibana4
user="kibana"
group="root"
chroot="/"
chdir="/"
nice=""
@thisismitch
thisismitch / openssl.cnf
Created June 24, 2015 17:27
Example openssl.cnf for IP SAN certificate
#
# OpenSSL example configuration file.
# This is mostly being used for generation of certificate requests.
#
# This definition stops the following lines choking if HOME isn't
# defined.
HOME = .
RANDFILE = $ENV::HOME/.rnd
@thisismitch
thisismitch / floatip-ocf
Created October 16, 2015 21:37
FloatIP OCF Agent (for Pacemaker)
#!/bin/bash
param=$1
export DO_TOKEN=$OCF_RESKEY_do_token
IP=$OCF_RESKEY_floating_ip
ID=$(curl -s http://169.254.169.254/metadata/v1/id)
HAS_FLOATING_IP=`curl -s http://169.254.169.254/metadata/v1/floating_ip/ipv4/active`
meta_data() {
@thisismitch
thisismitch / corridors_of_code.rb
Created November 18, 2015 05:36
Sonic Pi Songs
# Chrono Trigger Soundtrack - Corridors of Time
# plug this into http://sonic-pi.net/
# still needs synth pads
# global config
use_bpm 112
def play_legato_note(note_value, duration)
release_duration = duration
@thisismitch
thisismitch / filebeat-index-template.json
Last active February 28, 2020 21:11
Filebeat configuration with comments removed
{
"mappings": {
"_default_": {
"_all": {
"enabled": true,
"norms": {
"enabled": false
}
},
"dynamic_templates": [
@thisismitch
thisismitch / le-renew-webroot
Last active September 5, 2024 01:55
Let's Encrypt Auto-Renewal using the Webroot Plugin (Nginx)
#!/bin/bash
web_service='nginx'
config_file="/usr/local/etc/le-renew-webroot.ini"
le_path='/opt/letsencrypt'
exp_limit=30;
if [ ! -f $config_file ]; then
echo "[ERROR] config file does not exist: $config_file"