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)
  • 19:28 (UTC -07:00)
View GitHub Profile
@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 / Default (OSX).sublime-mousemap
Created September 18, 2012 17:20
Enable Mouse Wheel Zoom in SublimeText 2 on MacOSX (Place in User Folder)
[
{ "button": "scroll_down", "modifiers": ["ctrl"], "command": "increase_font_size" },
{ "button": "scroll_up", "modifiers": ["ctrl"], "command": "decrease_font_size" }
]
@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 / hashhaduken.js
Last active May 9, 2018 22:40
Hash Haduken - Execute in browser.
document.addEventListener("hashchange", function(e) { e.preventDefault(); });
var str = "|/-\\";
var i = 0;
var interval = setInterval( function() { add = "";
for ( j=0; j<i; j++) { add += " "; }
window.location.hash = add + str[i % 4];
i++;
if (i > 100) { clearInterval(interval); }
} , 100);
@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;
@eighteyes
eighteyes / _.md
Created July 11, 2013 03:49
Tributary inlet
@eighteyes
eighteyes / mp3.js
Created August 6, 2013 23:38 — forked from dtrce/mp3.js
var http = require('http'),
fileSystem = require('fs'),
path = require('path')
util = require('util');
http.createServer(function(request, response) {
var filePath = 'path_to_file.mp3';
var stat = fileSystem.statSync(filePath);
response.writeHead(200, {