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 / 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 / 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 / .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 / .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 / code-smell.md
Last active June 16, 2021 09:02
Eliminating Code Smell With Grunt

Eliminating Code Smell With Grunt

by Gavin Lazar Suntop @gvn

Intro

I love clean code. There, I said it. I pride myself on passing strict linting standards and keeping my code easy to read. It's not just a personal proclivity, but a choice I hope benefits other developers.

My general experience with teams has been that code style is something people care about and have strong personal preferences. Typically, at some point people get tired of dealing with inconsistency and a standardization meeting is called. This is, of course, an important discussion to have. The problem that tends to occur is either lack of documentation or lack of enforcement of the agreed upon style. Additionally, new team members or contributors may not have access to a clear set of rules.

@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 / 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 / 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 / geometric-js.md
Created February 14, 2014 19:18
Geometric Functions in Javascript

Geometric Functions in Javascript

Distance between 2 points

function distance(x1, y1, x2, y2) {
  return Math.sqrt(Math.pow((x2 - x1), 2) + Math.pow((y2 - y1), 2));
}