Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew Newdigate suprememoocow

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am suprememoocow on github.
  • I am suprememoocow (https://keybase.io/suprememoocow) on keybase.
  • I have a public key ASArGob_MP2p2mMUwBx511-U9kESxEi7i7Oaci1KVBhjXQo

To claim this, I am signing this object:

@suprememoocow
suprememoocow / prometheus_exporter_dashboard.json
Created Oct 13, 2020
Dashboard for the Victron Exporter for Prometheus
View prometheus_exporter_dashboard.json
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@suprememoocow
suprememoocow / index.js
Created Jan 19, 2015
requirebin sketch
View index.js
// require() some stuff from npm (like you were using browserify)
// and then hit Rebuild to run it on the right
var b = require('backbone')
@suprememoocow
suprememoocow / busted-output.txt
Last active Dec 29, 2020
Testing Redis Lua Scripts
View busted-output.txt
●●
2 successes / 0 failures / 0 errors / 0 pending : 0.008108 seconds
View nodeserver.conf
start on starting gitter-web ## The parent upstart service, so we can start and stop groups together
stop on stopping gitter-web
# Respawn, but no too much
respawn
respawn limit 10 5
# Give the process 20 seconds to shutdown properly before resorting to SIGKILL
kill timeout 20
@suprememoocow
suprememoocow / play.yml
Created Oct 9, 2014
Use Ansible to Manage Cloudwatch Volume Alarms in AWS EC2
View play.yml
---
- action: ec2_facts
- name: "list volumes"
command: 'aws ec2 describe-volumes --filter Name=attachment.instance-id,Values={{ ansible_ec2_instance_id }}'
register: ec2_volumes_output
- set_fact:
ec2_volumes: "{{ ec2_volumes_output.stdout | from_json }}"
@suprememoocow
suprememoocow / redis-sentinel-workout.sh
Created May 8, 2014
Redis sentinel failover workout script
View redis-sentinel-workout.sh
#!/bin/bash
set -e
TIME=30
# trap ctrl-c and call ctrl_c()
trap ctrl_c INT
function ctrl_c() {
echo + Stopping service 1
@suprememoocow
suprememoocow / raid.yml
Created Apr 28, 2014
Setup and initialise a RAID10 array of EC2 EBS volumes using an Ansible playbook
View raid.yml
- action: ec2_facts
- apt: pkg=lvm2 state=present
- apt: pkg=mdadm state=present
- pip: name=boto state=latest
- ec2_vol: instance="{{ hostvars[inventory_hostname]['ansible_ec2_instance-id'] }}"
volume_size=20
device_name="{{ item }}"
@suprememoocow
suprememoocow / install.sh
Created Apr 7, 2014
Update OpenSSL to 1.0.1g using Ansible
View install.sh
#!/bin/bash
# roles/openssl/files/install.sh
wget https://www.openssl.org/source/openssl-1.0.1g.tar.gz -O /tmp/openssl-1.0.1g.tar.gz
cd /tmp
tar -xvzf openssl-1.0.1g.tar.gz
cd openssl-1.0.1g
@suprememoocow
suprememoocow / init.sls
Last active Aug 29, 2015
Upgrade npm to 1.4.4 with Salt
View init.sls
# git is needed for npm if you have git references
build-essential:
pkg:
- installed
npm-custom:
git.latest:
- name: https://github.com/isaacs/npm.git
- target: /opt/npm
- rev: v1.4.4