Skip to content

Instantly share code, notes, and snippets.

yum install -y http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
yum install -y ansible
cat << 'EOF' > /tmp/bootstrap.yaml
---
- name: Install and configure basic GlusterFS setup on Centos 6
hosts: localhost
connection: local
tasks:
- name: add the glusterfs yum repository
# use ctrl+a instead of ctrl+b
unbind C-b
set -g prefix C-a
bind a send-prefix
# allow tmux to be reloaded
unbind r
bind r source-file ~/.tmux.conf
# set colours
@bdenning
bdenning / .emacs
Last active February 23, 2016 12:14
(setq backup-directory-alist `(("." . "~/.saves")))
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(menu-bar-mode -1)
(load-theme 'wombat)
(set-frame-parameter nil 'font "DejaVu Sans Mono-10")
@bdenning
bdenning / aws-workstations-boot.sh
Last active February 23, 2016 12:16
A script to configure a development environment on Fedora 23
#!/bin/bash
cd /root/
## Configure golang development software
dnf update -y
dnf install -y git emacs-nox golang make tmux
mkdir src lib bin
echo "export GOPATH=/root/" >> /root/.bashrc
source /root/.bashrc
@bdenning
bdenning / check-delivery.sh
Last active March 3, 2016 02:43
Check Toll Online Delivery Status
#!/bin/bash
## A "one-liner hack job" to check the delivery status of my new Galaxy Tab S2 (consignment note changed to hide my address)
## Just running this with "watch -n 1800 check-delivery.sh" will send a notification to my Pebble watch with the delivery status every 30 minutes.
curl -s --data '{"connoteIds":"ATHY214635","systemId":null}' 'https://online.toll.com.au/v1/trackAndTrace/searchConsignments' \
-H 'Host: online.toll.com.au' -H 'Accept: application/json' -H 'Content-Type: application/json' \
| python -c 'import sys,json; print json.load(sys.stdin)["tatConnotes"][0]["progressStatusDesc"]' \
| pushover
#cloud-config
password: atomic
ssh_pwauth: True
chpasswd: { expire: False }
write_files:
- path: /etc/sysconfig/docker
content: |
OPTIONS='--selinux-enabled --log-driver=journald --registry-mirror=http://k8s.example.local:5000'
DOCKER_CERT_PATH=/etc/docker
- path: /etc/sysconfig/flanneld
#!/bin/bash
yum install -y https://download.splunk.com/products/splunk/releases/6.4.1/linux/splunk-6.4.1-debde650d26e-linux-2.6-x86_64.rpm
/opt/splunk/bin/splunk enable boot-start --accept-license
service splunk start
@bdenning
bdenning / samhainrc
Created June 11, 2016 13:53
Test Samhain Configuration
#####################################################################
#
# Configuration file template for samhain.
#
#####################################################################
#
# -- empty lines and lines starting with '#', ';' or '//' are ignored
# -- boolean options can be Yes/No or True/False or 1/0
# -- you can PGP clearsign this file -- samhain will check (if compiled
# with support) or otherwise ignore the signature
@bdenning
bdenning / aws-lambda-golang.example
Created February 22, 2016 02:58
AWS Lambda : Calling golang from python
## lambda.py
import json
from sys import argv, stdin, stdout
from subprocess import Popen, PIPE
def lambda_handler(event, context):
proc = Popen('./main', stdin=PIPE, stdout=PIPE)
stdout, stderr = proc.communicate(json.dumps(event))
if stderr != None:
@bdenning
bdenning / Dockerfile
Last active May 26, 2021 13:17
Dockerfile for creating Splunk container
FROM docker.io/centos:latest
MAINTAINER Bowen Denning <bdenning@gmail.com>
ENV PATH=$PATH:/opt/splunk/bin
RUN yum update -y
## Download and install Splunk
RUN curl https://download.splunk.com/products/splunk/releases/6.4.1/linux/splunk-6.4.1-debde650d26e-linux-2.6-x86_64.rpm -O && \
yum install -y splunk*.rpm && \