Skip to content

Instantly share code, notes, and snippets.

View suprememoocow's full-sized avatar

Andrew Newdigate suprememoocow

View GitHub Profile

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 October 13, 2020 07:45
Dashboard for the Victron Exporter for Prometheus
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@suprememoocow
suprememoocow / index.js
Created January 19, 2015 17:12
requirebin sketch
// 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 July 29, 2024 07:27
Testing Redis Lua Scripts
●●
2 successes / 0 failures / 0 errors / 0 pending : 0.008108 seconds
@suprememoocow
suprememoocow / nodeserver.conf
Created October 22, 2014 14:11
Node upstart script
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 October 9, 2014 15:10
Use Ansible to Manage Cloudwatch Volume Alarms in AWS EC2
---
- 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 08:30
Redis sentinel failover workout script
#!/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 April 28, 2014 16:32
Setup and initialise a RAID10 array of EC2 EBS volumes using an Ansible playbook
- 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 April 7, 2014 22:33
Update OpenSSL to 1.0.1g using Ansible
#!/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 August 29, 2015 13:56
Upgrade npm to 1.4.4 with Salt
# 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