Skip to content

Instantly share code, notes, and snippets.

View MikeMcChillin's full-sized avatar

Michael McMillan MikeMcChillin

View GitHub Profile
@julianshapiro
julianshapiro / RAF.js
Last active May 11, 2024 15:21
requestAnimationFrame Polyfill
var requestAnimationFrame = window.requestAnimationFrame || (function() {
var timeLast = 0;
return window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) {
var timeCurrent = (new Date()).getTime(),
timeDelta;
/* Dynamically set the delay on a per-tick basis to more closely match 60fps. */
/* Technique by Erik Moller. MIT license: https://gist.github.com/paulirish/1579671. */
timeDelta = Math.max(0, 16 - (timeCurrent - timeLast));
@jfloff
jfloff / gist:4750950
Last active May 18, 2019 10:12
Virtual Hosts for MAMP
  1. Open hosts file:

    $ sudo subl /private/etc/hosts
    
  2. Place the following line at the end of the file:

    127.0.0.1 link
    
  3. Open MAMP's vhosts file:

@bpainter
bpainter / arrows.scss
Created July 15, 2011 19:08
Sass mixin for arrows based on The Shapes of CSS from Chris Coyier http://css-tricks.com/examples/ShapesOfCSS/
// --------------------------------------------------------
// arrows
// --------------------------------------------------------
// $direction: top, left, right, bottom, top-left, top-right, bottom-left, bottom-right
// $color: hex, rgb or rbga
// $size: px or em
// @example
// .element{
// @include arrow(top, #000, 50px);
// }
@balupton
balupton / README.md
Last active July 13, 2024 17:32
Ajaxify a Website with the HTML5 History API using History.js, jQuery and ScrollTo