Skip to content

Instantly share code, notes, and snippets.

View chriswburke's full-sized avatar
🕹️
ᕙ(⇀‸↼‶)ᕗ

Chris W. Burke chriswburke

🕹️
ᕙ(⇀‸↼‶)ᕗ
View GitHub Profile
@chriswburke
chriswburke / IE Conditional classes
Created June 3, 2013 14:03
Now you can write IE specific styles in a regular stylesheet, by prefacing the CSS selectors with .ie
<!DOCTYPE html>
<!--[if IEMobile 7 ]> <html dir="ltr" lang="en-US"class="no-js iem7"> <![endif]-->
<!--[if lt IE 7 ]> <html dir="ltr" lang="en-US" class="no-js ie6 oldie"> <![endif]-->
<!--[if IE 7 ]> <html dir="ltr" lang="en-US" class="no-js ie7 oldie"> <![endif]-->
<!--[if IE 8 ]> <html dir="ltr" lang="en-US" class="no-js ie8 oldie"> <![endif]-->
<!--[if (gte IE 9)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html dir="ltr" lang="en-US" class="no-js"><!--<![endif]-->
// Modified Isotope methods for gutters in masonry
$.Isotope.prototype._getMasonryGutterColumns = function() {
var gutter = this.options.masonry && this.options.masonry.gutterWidth || 0;
containerWidth = this.element.width();
this.masonry.columnWidth = this.options.masonry && this.options.masonry.columnWidth ||
// Or use the size of the first item
this.$filteredAtoms.outerWidth(true) ||
// If there's no items, use size of container
containerWidth;
var app = angular.module('app', ['ngResource']);
app.config(function($locationProvider, $routeProvider) {
// $locationProvider.html5Mode(true);
$routeProvider
.when('/', { templateUrl: 'partials/index', controller: 'ctrl' })
.when('/about', { templateUrl: 'partials/about', controller: 'ctrl' })
.otherwise({redirectTo:'/'});
});
@chriswburke
chriswburke / gist:758a1fab01eb5d551848
Created February 23, 2015 18:26
Create bootable install media for OSX
sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/[diskname] --applicationpath /Applications/Install\ OS\ X\ Yosemite.app --nointeraction
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@chriswburke
chriswburke / SassMeister-input.scss
Created April 16, 2015 01:14
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
$colors: (
'gold': (
0: #a49262,
1: #c5bb9d,
2: #dfdac9,
@chriswburke
chriswburke / gist:18473831b95ae1090db7
Created June 8, 2015 18:05
Create Yosemite Install USB
sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Yosemite.app --nointeraction
@chriswburke
chriswburke / latest.sh
Created October 7, 2015 13:50
Archive the latest in the local repository
git archive -o latest.zip HEAD
@chriswburke
chriswburke / gist:2b5dc1a1ea750182019c
Created November 2, 2015 00:10
Preload images in css
<style>
:root {content:url(logo.png) url(banner-header.jpg) url(social-sprite.png) url(conception-design.jpg) url(bkgnd.png)}
</style>
http://informoid.com/en/conception-design/preload-css.html
@chriswburke
chriswburke / loader.js
Created November 3, 2015 22:18
Async Loader
var loader = {
script: function ( url ) {
var script = document.createElement( 'script' );
script.src = url;
return script;
},
css: function ( url ) {
var link = document.createElement( 'link' );
link.rel = "stylesheet";
link.type = "text/css";