Skip to content

Instantly share code, notes, and snippets.

View DanielFGray's full-sized avatar

Daniel Gray DanielFGray

View GitHub Profile
let g:airline#themes#dan#palette = {}
function! s:generate()
let s:file = airline#themes#get_highlight('Constant')
let s:N1 = airline#themes#get_highlight2(['PmenuSel', 'fg'], ['User3', 'bg'])
let s:N2 = airline#themes#get_highlight('Pmenu')
let s:N3 = airline#themes#get_highlight('CursorLine')
let g:airline#themes#dan#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3, s:file)
@DanielFGray
DanielFGray / pomf
Created November 13, 2013 23:07 — forked from KittyKatt/pomf
#!/usr/bin/env bash
# pomf.se uploader
# requires: curl
dest_url='http://pomf.se/upload.php'
return_url='http://a.pomf.se'
if [[ -n "${1}" ]]; then
file="${1}"
if [ -f "${file}" ]; then
Array.range = function(start, count) {
return Array.apply(null, { length: count })
.map(function(v,i){
return start + i;
});
}
Array.prototype.clone = function() {
return this.slice(0);
};
@DanielFGray
DanielFGray / bands.md
Created December 30, 2013 02:35
instrumental prog rock/metal bands
@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"
#!/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;
#!/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 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
'use strict';
var prompt = require('prompt');
var argv = require('minimist')(process.argv.slice(2), {
alias: {
h: 'help',
v: 'version',
s: 'string',
}
#!/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)