Skip to content

Instantly share code, notes, and snippets.

View nobuti's full-sized avatar
Stop me

Buti nobuti

Stop me
View GitHub Profile
@mixin image-2x($image, $width, $height) {
@media (min--moz-device-pixel-ratio: 1.3),
(-o-min-device-pixel-ratio: 2.6/2),
(-webkit-min-device-pixel-ratio: 1.3),
(min-device-pixel-ratio: 1.3),
(min-resolution: 1.3dppx) {
background-image: image-url($image);
background-size: $width $height;
}
@nobuti
nobuti / load.js
Created September 5, 2012 08:47 — forked from judofyr/load.js
function loadScript(path, fn) {
var el = document.createElement('script'),
loaded = 0,
onreadystatechange = 'onreadystatechange',
readyState = 'readyState';
el.onload = el.onerror = el[onreadystatechange] = function () {
if (loaded || (el[readyState] && !(/^c|loade/.test(el[readyState])))) return;
el.onload = el.onerror = el[onreadystatechange] = null;
loaded = 1;