Skip to content

Instantly share code, notes, and snippets.

View tobert's full-sized avatar
💭
🏳️‍🌈 💻 🏳️‍🌈

Amy Tobey tobert

💭
🏳️‍🌈 💻 🏳️‍🌈
View GitHub Profile
@tobert
tobert / gradients.pl
Created July 3, 2018 21:52
An old perl hack for generating a colored grid of cluster load from load averages collected by collectd in RRD files.
#!/usr/bin/perl
# this needs a serious cleanup/rewrite - it was hacked together
# very quickly for a completely different purpose many years ago
# and has grown in the worst organic way since
# but ... it does work fairly well so it persists
# Copyright 2007-2011 A Tobey <tobert@gmail.com>
use strict;
use warnings;
@tobert
tobert / yamlpath.py
Created February 6, 2018 20:31
a quick & dirty yaml path printer for embedding in shell scripts
#!/bin/env python3
#
# this is NOT a human-facing tool
#
# This is to replace the legacy data files being used to populate
# variables in a shell script and instead get them from the vars
# files even though that still feels weird.
#
# Example:
# azs=$(yamlpath.py roles/cassandra/vars/clusters.yml clusters/multitenant-us-east-1/availability_zones)
@tobert
tobert / LinuxMIDISynth.md
Created November 28, 2017 23:31
MPKmini2 MIDI + fluidsynth CLI only

Akai MPK Mini 2 + Fluidsynth + Linux synthesizer

This is a quick & dirty way to attach an Akai MPK mini 2 USB MIDI controller to Linux so the Linux machine can act as its synthesizer. This approach should work for any modern USB MIDI instrument.

Rationale

I looked around on the web and, surprisingly, I didn't find any simple options for quickly starting Fluidsynth up and wiring it to a MIDI controller for simple keyboard usage. There are a few out there that involve using Qsynth which is cool but I didn't want a GUI for something relatively simple.

Shell Session

@tobert
tobert / copilot.pl
Created September 8, 2017 20:37
copilot.pl - homegrown CI from 2004
#!/usr/local/bin/perl
use warnings;
use strict;
use Config::ApacheFormat;
use Getopt::Long;
use File::Path;
use File::Basename;
use Net::SSH::Perl;
use Data::Dumper; # for debugging
@tobert
tobert / linux-dnsmasq-mitm.sh
Created June 15, 2017 20:54
Instructions + iptables script for MITM laptop for tcpdump and/or wireshark
#!/bin/bash
# put this in /etc/dnsmasq.conf then start/restart it
# modify the interface= to point at the ethernet port the device is connected to
# optionally, set MAC address in the dhcp-host line to be the MAC of the device
#interface=enp0s31f6
#dhcp-range=192.168.102.9,192.168.102.20,255.255.255.0,12h
#dhcp-host=70:58:12:a8:e5:35,192.168.102.10
# set INTERNET_INTERFACE to the laptop's internet access interface, e.g. wifi interfaces
@tobert
tobert / reclaimWin10.ps1
Created April 3, 2017 19:49
locally customized version of the Win10 setup script
##########
# Win10 Initial Setup Script
# Author: Disassembler <disassembler@dasm.cz>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1
package hal
import (
"regexp"
"time"
"github.com/netflix/hal-9001/hal"
)
/* hal.Cmd, hal.Param, hal.CmdInst, and hal.ParamInst are handles for hal's

Keybase proof

I hereby claim:

  • I am tobert on github.
  • I am tobert (https://keybase.io/tobert) on keybase.
  • I have a public key whose fingerprint is AF40 7321 06AA 750B 287F 5265 A241 73D6 A6B8 5735

To claim this, I am signing this object:

gadget xen # xl create -c /etc/xen/archlinux.cfg
Parsing config from /etc/xen/archlinux.cfg
libxl: warning: libxl_dm.c:350:libxl__domain_device_construct_rdm: Ignoring RDM conflict at 0x7c4bf000.
libxl: error: libxl_device.c:952:device_backend_callback: unable to add device with path /local/domain/0/backend/vbd/12/51712
libxl: error: libxl_create.c:1174:domcreate_launch_dm: unable to add disk devices
libxl: error: libxl_dm.c:2004:libxl__destroy_device_model: xs_rm failed for /local/domain/0/device-model/12
libxl: error: libxl_dm.c:1956:kill_device_model: unable to find device model pid in /local/domain/12/image/device-model-pid
libxl: error: libxl.c:1628:libxl__destroy_domid: libxl__destroy_device_model failed for 12
libxl: error: libxl_device.c:952:device_backend_callback: unable to remove device with path /local/domain/0/backend/vbd/12/51712