Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

darron froese darron

🎯
Focusing
View GitHub Profile
@philips
philips / users.md
Last active Jan 28, 2021
Kubernetes Third-Party Resource Users
View users.md
View vault-ec2-auth.sh
#!/bin/bash
#
# vault-ec2-auth.sh
# Authenticates an EC2 instance to Hashicorp Vault
#
# configuration stored in environment variables in /etc/vault/client.conf
# expected configuration (defaults are selected below if none is specified):
# VAULT_ADDR = url of vault server
# VAULT_ROLE = role name to authenticate as
@lewisd32
lewisd32 / iptableflip.sh
Created Apr 15, 2015
Snippet of Unbounce script for restarting HAProxy with zero downtime
View iptableflip.sh
echo "Flipping tables! (╯°□°)╯︵ ┻━┻"
num_rules=3
real=3 # exposed to the ELB as port 443
test=4 # used to install test certs for domain verification
health=5 # used by the ELB healthcheck
blue_prefix=855
green_prefix=866
@vgeshel
vgeshel / function.js
Last active Feb 9, 2022
AWS Lambda function for forwarding SNS notifications to Slack
View function.js
console.log('Loading function');
const https = require('https');
const url = require('url');
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration
const slack_url = 'https://hooks.slack.com/services/...';
const slack_req_opts = url.parse(slack_url);
slack_req_opts.method = 'POST';
slack_req_opts.headers = {'Content-Type': 'application/json'};
@dysinger
dysinger / coreos-kubernetes-vpc-playbook.yml
Created Nov 14, 2014
CoreOS Kubernetes AWS VPC Playbook
View coreos-kubernetes-vpc-playbook.yml
---
- connection: local
hosts: 127.0.0.1
tasks:
- local_action:
description: Kubernetes Security Group
module: ec2_group
name: kubernetes
region: '{{ aws.region }}'
rules:
@bketelsen
bketelsen / ddagent.json
Last active Aug 29, 2015
DataDog agent as privileged Pod with Service - collects info on host, and all docker containers. Accepts statsd on port 8125 on every machine.
View ddagent.json
{
"id": "ddagent",
"kind": "ReplicationController",
"apiVersion": "v1beta1",
"desiredState": {
"replicas": 3,
"replicaSelector": {"name": "ddagent"},
"podTemplate": {
"desiredState": {
"manifest": {
@gmr
gmr / consul.lua
Created Jul 14, 2014
Dynamic Nginx upstream nodes using Consul
View consul.lua
module("resty.consul", package.seeall)
_VERSION = '0.1.0'
function service_nodes(service)
local http = require "resty.http"
local json = require "cjson"
local hc = http:new()
local upstream = ""
View heroku-deploy.sh
#!/bin/bash
# Usage:
# $ ./heroku-deploy.sh <app name> <git repo url> <heroku api key>
APP="$1"
REPO="$2"
APIKEY="$3"
echo "-----> Creating application $APP"
curl -u ":$APIKEY" -d "app[name]=$APP" -X POST https://api.heroku.com/apps -s > /dev/null
View gist:4496942
#
# PRODUCTION
#
production:
adapter: mysql2
encoding: utf8
reconnect: false
database: gitlabhq_production
pool: 5
username: <%= ENV['PROD_DB_USER'] %>