Skip to content

Instantly share code, notes, and snippets.

View gvn's full-sized avatar
🥀
technopagan is the term

Gavin Suntop gvn

🥀
technopagan is the term
View GitHub Profile
@gvn
gvn / echo.js
Last active January 4, 2016 09:58
Echo (Proof of concept)
window.echo = function (message, namespace) {
if (namespace && !echo.namespaces[namespace]) {
return;
}
console.log(message);
};
// TODO : DRY
echo.warn = function (message, namespace) {
@gvn
gvn / freshmaker.sh
Created December 6, 2013 19:31
The Freshmaker
#!/bin/bash
rm -rf node_modules
rm -rf bower_components
npm cache clean
npm install
echo "freshmaker" | say -v cello
@gvn
gvn / gvn-sinewave-duet-1.js
Last active December 28, 2015 23:18
gvn - "Sinewave Duet"
// @gvn - "sinewave duet"
var Context = window.AudioContext || window.webkitAudioContext;
var context = new Context();
var basePitch = 120;
var phraseCount = 12;
var osc = context.createOscillator();
osc.frequency.value = 0;
osc.connect(context.destination);
@gvn
gvn / .jsbeautifyrc
Last active December 23, 2015 13:49
.jsbeautifyrc
{
"html": {
"brace_style": "collapse",
"indent_char": " ",
"indent_scripts": "normal",
"indent_size": 2,
"max_preserve_newlines": 1,
"preserve_newlines": true,
"unformatted": ["sub", "sup", "p", "span", "h1", "h2", "h3", "h4", "h5", "h6", "label"],
"wrap_line_length": 0
@gvn
gvn / .jshintrc
Last active December 21, 2015 07:59
My standard jshintrc.
{
"globals": {
"module": false,
"define": false,
"requirejs": false,
"require": false
},
"bitwise": true,
"browser": true,
"curly": true,
@gvn
gvn / less-to-sass.md
Last active December 19, 2015 20:59
Converting Less to Sass (.scss)

Converting Less to Sass (.scss)

Variables

Less

@variable

Scss

$variable
@gvn
gvn / gist:5731810
Last active December 18, 2015 05:19
Mac / OSX Optimizations

Mac / OSX Optimizations

CPU

Disable Window Animations

defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false

2D Dock

@gvn
gvn / gist:5427031
Last active December 16, 2015 11:19
How To Join Multiple Video Files (OSX)

How To Join Multiple Video Files (OSX)

Dependencies

  • Homebrew
  • mencoder (brew install mplayer --use-gcc)
cat video1.avi video2.avi > output.avi
mencoder -forceidx -oac copy -ovc copy output.avi -o output_final.avi
@gvn
gvn / onehandword.js
Last active December 15, 2015 11:09
Generate random words that can be typed with one hand.
function randomWord(hand, length) {
var chooseVowel = !!Math.round(Math.random()),
word = '';
while (length) {
if (chooseVowel) {
word += hand.vowels[Math.floor(Math.random() * hand.vowels.length)];
} else {
word += hand.consonants[Math.floor(Math.random() * hand.consonants.length)];
}