Skip to content

Instantly share code, notes, and snippets.

View freshyill's full-sized avatar
💭
😎 Cool

Chris Coleman freshyill

💭
😎 Cool
View GitHub Profile
@freshyill
freshyill / jQuery 2.0 --> 1.9 fallback for IE.html
Last active December 17, 2015 03:39
So it looks like people are confused about how to fallback from jQuery 2 to 1.9 for IE. Is there any reason why this wouldn't work?
<!--[if lte IE 8]>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/jquery-1.9.1.min.js"><\/script>')</script>
<![endif]-->
<!--[if gt IE 8]><!-->
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/jquery-2.0.0.min.js"><\/script>')</script>
<!--<![endif]-->
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the branch/status of the current git repository
# * the branch of the current subversion repository
# * the return value of the previous command
#
# USAGE:
@freshyill
freshyill / mediaquery.js
Created November 29, 2012 23:01
Media Queries in jQuery
// Media queries in jQuery
var delay = (function(){
var timer = 0;
return function(callback, ms){
clearTimeout (timer);
timer = setTimeout(callback, ms);
};
})();
@freshyill
freshyill / index.html
Created November 20, 2012 23:26
A CodePen by Chris Coleman. Mario in CSS - I'm the last person on Earth to do one of these, I'm sure. I feel like this is ripe for a SASS mixin. Maybe that'll be next.
<div class="mario"></div>
@freshyill
freshyill / mario.html
Created November 20, 2012 23:18
Mario in CSS
<!doctype html>
<html>
<head>
<style>
body {padding: 100px;}
@freshyill
freshyill / _link-color.scss
Created October 26, 2012 13:55
Simpler link color mixin
@freshyill
freshyill / index.html
Created October 26, 2012 05:18
A CodePen by Chris Coleman. iOS Style toggle mixin - There's a lot of these things out there and I don't like any of them. I see so many people trying to prove how they can do this with just one element or something like that. Well that's just great. You'
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="css/toggle.css"
</head>
<body style="padding: 50px;">
@freshyill
freshyill / link-mixin.scss
Created October 22, 2012 17:37
Link color mixin... this might be either really useful or really stupid.
@freshyill
freshyill / css-stats-ack.sh
Created September 28, 2012 20:34 — forked from pjkix/css-stats-ack.sh
shell script to generate some css file statistics
#!/bin/bash
## v1.0.6
## this script will gernerate css stats
### example output
# CSS STATS
# ----------
# Floats: 132
@freshyill
freshyill / Keyframe Animation Mixin
Created September 28, 2012 14:34
A simple mixin to create keyframe animation. Bourbon doesn't currently have a mixin for this. Requires SASS 3.2
// Mixin
@mixin keyframes($name) {
@-moz-keyframes #{$name} { @content; }
@-webkit-keyframes #{$name} { @content; }
@-o-keyframes #{$name} { @content; }
@-ms-keyframes #{$name} { @content; }
@-khtml-keyframes #{$name} { @content; }
@keyframes #{$name} { @content; }
}