Skip to content

Instantly share code, notes, and snippets.

View eighteyes's full-sized avatar
💭
Building the Future With Friends

Sean Canton eighteyes

💭
Building the Future With Friends
  • Eight Eyes Creations
  • Earth (Sol)
  • 12:53 (UTC -07:00)
View GitHub Profile
@eighteyes
eighteyes / grid.styl
Last active August 29, 2015 13:56
Stylus Generated Grid System
makeGridWidth(a, b)
c=round((b/a)*10000)/100
unit(c,'%')
// partial are the column sizes
// whole is the entire column width size
// so to do a 50% > .g-1-2, a 33% > .g-1-3
// feel free to modify these numbers as needed
.grid
width:100%
@eighteyes
eighteyes / pianowig.js
Created March 12, 2014 19:18
Transform Velocity from PianoTeq to use in BitWig setVelocityTranslationTable
var input = "Velocity = [0, 48, 57, 65, 108, 127; 0, 32, 64, 96, 127, 127]";
input = input.replace(/[a-z\]\[=]/ig, '');
var special = input.split(';')[0].split(',');
var normal = input.split(';')[1].split(',');
var special = [0, 48, 57, 65, 108, 127];
var normal = [ 0, 32, 64, 96, 127, 127];
console.log(special,normal);
@eighteyes
eighteyes / auth.js
Created May 15, 2015 14:48
Express Auth 1 Liner
app.use(require('basic-auth-connect')('admin', '1234'));
@eighteyes
eighteyes / LICENSE.txt
Created May 24, 2011 15:44 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@eighteyes
eighteyes / 0_reuse_code.js
Created October 19, 2015 18:42
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@eighteyes
eighteyes / gist:4498558
Created January 10, 2013 01:13
Media query to load phone size CSS for phablets ( phone + tablet ) Nexus 7, Note 800px wide Viewport tag included.
<meta name="viewport" content="initial-scale=1.0, width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, target-densityDpi=medium-dpi">
@media only screen and (min-width:240px) and (max-width: 720px), screen and (-webkit-min-device-pixel-ratio : 1.5 ) and (max-device-width:800px)
@eighteyes
eighteyes / Git Sublime Sweetness
Last active December 15, 2015 05:19
Bash scripts to leverage the power of git to open working files. Grep supports line numbers!
# Open log files x number of times back : glo 1
function __glo(){
subl `git log --name-only -n $1 --format=format: | xargs`;
}
alias glo='__glo'
# Open and grep log files x number of times back : glgo 1 query
function __glgo(){
subl `git log --name-only -n $1 --grep '$2' --format=format: | xargs`;
}
@eighteyes
eighteyes / mondoGit.sh
Created April 5, 2013 21:12
Mondo Git Bash Aliases & Functions
# Show files in log
alias glf='git log --oneline --name-only'
alias glg='git log --graph --oneline --decorate --all'
alias gls='git log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate'
# What files were touched x number of times back : glfn 3
alias glfn='git log --oneline --name-only -n'
# Open log files x number of times back : glo 1
@eighteyes
eighteyes / MakeTest.sublime-build
Last active December 16, 2015 22:09
Make one test in Sublime
{
"working_dir" : "$file_path/../",
"cmd": ["make", "test", "test=$file_base_name"]
}
@eighteyes
eighteyes / GeekNode.sh
Last active December 18, 2015 12:48
Node.js status indicator with GeekTool
limit=3;
num=$(ps -a | grep -c "node");
if [[ $num -lt $limit ]];
then
exit 1;
fi
echo $num;