Skip to content

Instantly share code, notes, and snippets.

View DanielFGray's full-sized avatar

Daniel Gray DanielFGray

View GitHub Profile
var globals = {
naturals: ['C', 'D', 'E', 'F', 'G', 'A', 'B'],
degrees: ['R', 'm2', 'M2', 'm3', 'M3', 'P4', ['A4', 'D5'], 'P5', 'm6', 'M6', 'm7', 'M7'],
modeNames: ['Ionian', 'Dorian', 'Phrygian', 'Lydian', 'Mixolydian', 'Aeolian', 'Locrian'],
accidentals: {'-1': '♭', 0: '', 1: '♯'},
scales: {
'Major': [2, 2, 1, 2, 2, 2, 1],
'Minor': [2, 1, 2, 2, 1, 2, 2],
'Harmonic Minor': [2, 1, 2, 2, 1, 3, 1],
'Diminished Arpeggio': [3, 3, 3, 3]
#!/usr/bin/env node
var fs = require('fs'),
path = require('path'),
http = require('http'),
exec = require('child_process').exec;
var globals = {
apiKey: ''
};
#!/usr/bin/env bash
if [[ -z $1 ]]; then
echo "Needs an argument for file name."
exit
fi
RES=$(xdpyinfo | awk '/dimensions/{print $2}')
FPS="60"
#!/usr/bin/env node
const Promise = require('bluebird')
const http = require('http')
const url = require('url')
const path = require('path')
const fs = require('fs')
const port = process.argv[2] || 6969
const readDir = Promise.promisify(fs.readdir)
#!/usr/bin/env node
'use strict';
var prompt = require('prompt');
var argv = require('minimist')(process.argv.slice(2), {
alias: {
h: 'help',
v: 'version',
s: 'string',
}
#!/usr/bin/env bash
declare player=''
declare -a supported=( 'mpc' )
for x in "${supported[@]}"; do
if command -v "$x" &> /dev/null; then
player="$x"
break
fi
#!/usr/bin/env node
var fs = require('fs');
var mkdirp = function(path) {
// TODO: handle non-UNIX paths
// TODO: optional trailing /
// TODO: as an array
var dirs = [];
if(arguments.length > 1) {
dirs = Array.prototype.slice.call(arguments, 0);
#!/usr/bin/env node
'use strict';
var fs = require('fs'),
moment = require('moment'),
underscore = require('underscore'),
child_process = require('child_process'),
spawn = child_process.spawn,
exec = child_process.exec;
@DanielFGray
DanielFGray / theme.lua
Created September 20, 2014 02:41
AwesomeWM theme.lua
theme = {}
themes_dir = os.getenv("HOME") .. "/.config/awesome/themes/darkness"
theme.font = "Tewi 11"
theme.fg_normal = "#ffffff"
theme.fg_focus = "#596875"
theme.fg_urgent = "#6e464b"
theme.bg_normal = "#292929"
theme.bg_focus = "#252525"
@DanielFGray
DanielFGray / bands.md
Created December 30, 2013 02:35
instrumental prog rock/metal bands