Skip to content

Instantly share code, notes, and snippets.

// Parses:
//
// C7, C Major, Cm (as a Chord)
// 1 b3 5 (as Degrees)
// C E F (as Notes)
//
//
// Notes:
//
// `-` denotes only a minor chord.

Keybase proof

I hereby claim:

  • I am bgerm on github.
  • I am bgerm (https://keybase.io/bgerm) on keybase.
  • I have a public key ASA_7_dXXvqF4ke6WgR3j9CC4vNyBABwB4FzGOtkG4JMlAo

To claim this, I am signing this object:

@bgerm
bgerm / dnd.js
Last active August 29, 2015 14:08
Drag and drop with baconjs
$(function() {
var grid = $("#box-container");
/*--------------------------------------------------------------------------
* Constants
*--------------------------------------------------------------------------*/
var REQUIRED_MOUSE_MOVE_DISTANCE = 4;
var GRID_HEIGHT = 900; // from the css, just hard-coded for now
var MIN_CELL_HEIGHT = 15;
@bgerm
bgerm / record.sh
Created June 19, 2013 14:58
Record web camera activity in a cron job using VLC.
#!/bin/sh
# Record web camera activity in a cron job using VLC.
# This is in a script so that I don't have to go through
# the vlc man pages again. Plus, somethings have unexpected
# behavior, such as requiring --run-time and --stop-time
# to be run together so it doesn't hang.
# Camera used: Foscam FI8910W camer
@bgerm
bgerm / barman_setup.md
Created June 19, 2013 14:49
Likely outdated instructions on how to do PostgreSQL 9.1 logical and physical backups on Ubuntu. No guarantees for production use. This was for experimenting with barman and postgres backups.

PostgreSQL Barman Backups

Install PostgreSQL and the Barman dependencies

On the Barman server

sudo apt-get install build-essential postgresql-9.1 postgresql-server-dev-9.1 python-dev python-pip vim
sudo pip install argh psycopg2 python-dateutil==1.5

Setup the Barman user

@bgerm
bgerm / timelapse.sh
Created June 19, 2013 14:40
Create time-lapse videos with my Foscam FI8910W camera.
#!/bin/sh
# This script will make a timelapse video from a Foscam FI8910W camera by
# downloading the snapshot image every 2 seconds, watermarking it with the
# current time, and then using ffmpeg on those images to make the movie.
#
# Capturing stops on Ctrl-C or 10 hours of elapsed time.
# Note: This was put together hastily and I'm sure the ffmpeg
# options or framerate could be improved.