Skip to content

Instantly share code, notes, and snippets.

View jonchretien's full-sized avatar
📷

Jon C. jonchretien

📷
View GitHub Profile
@jonchretien
jonchretien / .bash_profile
Last active September 26, 2015 16:28
My Bash Profile
# Apache
alias config="mate /etc/apache2/httpd.conf"
alias webstart="sudo apachectl start"
alias webstop="sudo apachectl stop"
alias webrestart="sudo apachectl restart"
alias vhosts="mate /etc/apache2/extra/httpd-vhosts.conf"
# Git
alias add="git add"
alias branch="git branch"
@jonchretien
jonchretien / gist:1127727
Created August 5, 2011 15:06
New Project Bash Script
#!/bin/bash
# creates a new project template
# http://linuxdevcenter.com/pub/a/linux/lpt/18_15.html
# usage:
# $ ~/bin/project.sh projectname
# copy project directory
mkdir $1
@jonchretien
jonchretien / gitignore
Created August 17, 2011 20:34
What to leave out.
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@jonchretien
jonchretien / gist:3913820
Created October 18, 2012 18:07 — forked from paulirish/gist:3910471
page visibility API : tribulations with prefixes
// this is the least sucky way i could think of to
// detect and deal with a cross-browser impl of the page visibility api
// forks welcome.
function getHiddenProp(){
var prefixes = ['webkit','moz','ms','o'];
if ('hidden' in document) return 'hidden';
@jonchretien
jonchretien / fullScreenToggler.html
Last active October 13, 2015 05:57
Full Screen Toggler
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8">
<style type="text/css" media="screen">
.shell:-moz-full-screen,
.shell:-webkit-full-screen {
width: 100% !important;
}
@jonchretien
jonchretien / regionParser.html
Last active October 13, 2015 23:07
Parser that extracts region names from data stream and pushes to sorted array.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Region Parser</title>
<meta charset="UTF-8">
</head>
<body>
<button id="js-button">Filter Data</button>
<ol id="js-container"></ol>
@jonchretien
jonchretien / gist:4381572
Created December 26, 2012 17:13
CSS3 LESS Mixins
.text-shadow (@string: 0 1px 3px rgba(0, 0, 0, 0.25)) {
text-shadow: @string;
}
.box-shadow (@string) {
-webkit-box-shadow: @string;
-moz-box-shadow: @string;
box-shadow: @string;
}
.drop-shadow (@x: 0, @y: 1px, @blur: 2px, @spread: 0, @alpha: 0.25) {
-webkit-box-shadow: @x @y @blur @spread rgba(0, 0, 0, @alpha);
@jonchretien
jonchretien / rAF.js
Created January 2, 2013 18:54 — forked from paulirish/rAF.js
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller
// fixes from Paul Irish and Tino Zijdel
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
(function() {
if ( typeof document.ontouchmove === 'object' || location.hash.indexOf('isTouch') > 0 ) {
window.addEventListener('load', function() {
setTimeout(function(){
window.scrollTo(0, 1);
}, 0);
});
}
})();
@jonchretien
jonchretien / settings.js
Last active December 6, 2016 15:29
Sublime Text 2 Settings (User)
{
"bold_folder_labels": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"draw_white_space": "selection",
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
"CVS",