Skip to content

Instantly share code, notes, and snippets.

View keithchambers's full-sized avatar

Keith Chambers keithchambers

View GitHub Profile
@ryanuber
ryanuber / packer.json
Created March 7, 2015 17:19
QEMU Headless
{
"builders":
[
{
"type": "qemu",
"iso_url": "http://releases.ubuntu.com/14.04.1/ubuntu-14.04.1-server-amd64.iso",
"iso_checksum": "ca2531b8cd79ea5b778ede3a524779b9",
"iso_checksum_type": "md5",
"output_directory": "out",
"shutdown_command": "sudo shutdown -P now",
@3v1n0
3v1n0 / gpControl.json
Last active November 2, 2020 22:05
GoPro Hero4 Remote tools
{
"version":2.0,
"display_hints":[
{
"key":"GPCAMERA_GROUP_VIDEO",
"display_name":"Video Settings",
"settings":[
{
"setting_id":5,
"widget_type":"select",
@porterjamesj
porterjamesj / hello_mesos.py
Last active March 6, 2018 20:43
the tiniest mesos scheduler
import logging
import uuid
import time
from mesos.interface import Scheduler
from mesos.native import MesosSchedulerDriver
from mesos.interface import mesos_pb2
logging.basicConfig(level=logging.INFO)
@chanj
chanj / AWS Security Resources
Last active June 21, 2021 09:49
AWS Security Resources
INTRO
I get asked regularly for good resources on AWS security. This gist collects some of these resources (docs, blogs, talks, open source tools, etc.). Feel free to suggest and contribute.
Short Link: http://tiny.cc/awssecurity
Official AWS Security Resources
* Security Blog - http://blogs.aws.amazon.com/security/
* Security Advisories - http://aws.amazon.com/security/security-bulletins/
* Security Whitepaper (AWS Security Processes/Practices) - http://media.amazonwebservices.com/pdf/AWS_Security_Whitepaper.pdf
* Security Best Practices Whitepaper - http://media.amazonwebservices.com/AWS_Security_Best_Practices.pdf
@samdoran
samdoran / es-cluster-restart.yml
Last active December 23, 2021 00:00
Elasticsearch Playbooks
---
- name: Rolling elasticsearch cluster restart
hosts: es
serial: 1
sudo: yes
vars:
uribody_true: '{"transient":{"cluster.routing.allocation.enable":"none"}}'
uribody_false: '{"transient":{"cluster.routing.allocation.enable":"all"}}'
es_http_port: 9200
@porjo
porjo / README.md
Last active August 29, 2015 14:03 — forked from mmoulton/README.md
Docker stats collection for collectd

Forked from: https://gist.github.com/mmoulton/6224509

Docker stats collection for collectd

This script can be used to feed collectd with cpu and memory usage statistics for running docker containers using the collectd exec plugin.

This script will report the used and cached memory as well as the user and system cpu usage by inspecting the appropriate cgroup stat file for each running container.

Usage

@pixie79
pixie79 / consul
Created July 7, 2014 06:06
Consul Service module for Ansible
# -*- coding: utf-8 -*-
# -*- mode: python -*-
DOCUMENTATION = '''
---
module: consul
short_description: Consul Agent API interaction with Docker
description:
- This module wraps the Consul API making calls to the Agent end points
to register and unregister services.
@ijin
ijin / consul_dynamic_inventory.rb
Created June 22, 2014 15:22
dynamic inventory script for ansible using consul
#!/usr/bin/env ruby
require 'net/http'
require 'uri'
require 'json'
output = {}
s_json = JSON.parse(Net::HTTP.get_response(URI.parse('http://localhost:8500/v1/catalog/services')).body)
services = s_json.keys.reject{|k| k == 'consul'}
services.each do |srv|
@ramcq
ramcq / blocksync.py
Last active July 6, 2021 15:03 — forked from rcoup/blocksync.py
#!/usr/bin/env python
"""
Synchronise block devices over the network
Copyright 2006-2008 Justin Azoff <justin@bouncybouncy.net>
Copyright 2011 Robert Coup <robert@coup.net.nz>
Copyright 2012 Holger Ernst <info@ernstdatenmedien.de>
Copyright 2014 Robert McQueen <robert.mcqueen@collabora.co.uk>
License: GPL
@ekristen
ekristen / check_docker_container.sh
Last active January 16, 2024 16:15
Bash Script for Nagios to Check Status of Docker Container
#!/bin/bash
# Author: Erik Kristensen
# Email: erik@erikkristensen.com
# License: MIT
# Nagios Usage: check_nrpe!check_docker_container!_container_id_
# Usage: ./check_docker_container.sh _container_id_
#
# Depending on your docker configuration, root might be required. If your nrpe user has rights
# to talk to the docker daemon, then root is not required. This is why root privileges are not