This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var gulp = require("gulp"), | |
sourcemaps = require("gulp-sourcemaps"), | |
babel = require("gulp-babel"), | |
concat = require("gulp-concat"), | |
uglify = require("gulp-uglify"), | |
rename = require("gulp-rename"), | |
del = require("del"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
usage() { | |
cat <<'HELP' | |
v [OPTIONS] [FILES] | |
create a new vim server or interact with an existing one | |
-h show this help | |
-d disable focusing on vim | |
-s associate tmux pane in vim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var modes = ['Ionian', 'Dorian', 'Phrygian', 'Lydian', 'Mixolydian', 'Aeolian', 'Locrian']; | |
var steps = [2, 2, 1, 2, 2, 2, 1]; | |
var notes = ['C', 'C#/Db', 'D', 'D#/Eb', 'E', 'F', 'F#/Gb', 'G', 'G#/Ab', 'A', 'A#/Bb', 'B']; | |
var noteRoots = ['C', 'D', 'E', 'F', 'G', 'A', 'B']; | |
function getNotes(scale, mode) { | |
if(mode === 'Major') { | |
mode = 'Ionian'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# pomf.se uploader | |
# https://gist.github.com/KittyKatt/5818701 | |
# requires: curl | |
if ! type 'curl' &> /dev/null; then | |
err 'requires curl to upload' | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
declare -a output | |
declare -A values | |
usage() { | |
echo "$0 INITIALSPEED ENDSPEED INCREMENT [files]" | |
} | |
if (( $# < 3 )); then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
select_cmd_in_tmux() { | |
list_cmds_in_panes=$(IFS=$'\n'; set -f; for p in $(tmux list-windows); do | |
tmux list-panes -t "${p%%:*}" -F "#{window_index}.#{pane_index} #{pane_current_command}" | |
done) | |
pane_with_cmd=$(awk "/$1/{print \$1; exit}" <<< "$list_cmds_in_panes") | |
if [[ -n "$pane_with_cmd" ]]; then | |
pane=${pane_with_cmd#.*} | |
window=${pane_with_cmd%%.*} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! Togglegjgk() | |
if !exists("g:togglegjgk") || g:togglegjgk==0 | |
let g:togglegjgk=1 | |
nnoremap j gj | |
nnoremap k gk | |
nnoremap gk k | |
nnoremap gj j | |
else | |
let g:togglegjgk=0 | |
unmap j |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call plug#begin() | |
"" ... | |
if executable('clang') | |
Plug 'Valloric/YouCompleteMe', { 'do': './install.sh' } | |
let g:completionEngine = 'ycm' | |
else | |
if has('lua') && (version >= 704 || version == 703 && has('patch885')) | |
Plug 'Shougo/neocomplete.vim' | |
let g:completionEngine = 'neocomplete' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
'use strict'; | |
// todo: | |
// ignore user's snatched list | |
// ask user to confirm/change list | |
// download .torrents | |
var whatcd = require('whatcd'); | |
var prompt = require('prompt'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: '♯'}, | |
sharpScales: ['G', 'D', 'A', 'E', 'B', 'F♯'], | |
flatScales: ['F', 'B♭', 'E♭', 'A♭', 'D♭', 'G♭'], | |
scales: { | |
'Major': [2, 2, 1, 2, 2, 2, 1], | |
'Minor': [2, 1, 2, 2, 1, 2, 2], |