Skip to content

Instantly share code, notes, and snippets.

@notepadwebdev
notepadwebdev / background cover video
Last active August 29, 2015 13:57
background cover video
// background cover for position:fixed video
// aspectRatio = original aspect ratio of video
var ww = $(window).width(),
wh = $(window).height(),
wAR = ww / wh,
newW = (wAR < aspectRatio) ? 'auto' : ww,
newH = (wAR < aspectRatio) ? wh : 'auto',
mT = (wAR < aspectRatio) ? 0 : Math.round((el.height() - wh) / 2) * -1,
@notepadwebdev
notepadwebdev / Front end dev chat
Created October 28, 2013 10:59
Interview notes for prospective front end dev role @epiphanysearch
/*
* Front end dev chat
*/
/* TOOLS */
- dev browser of choice. why?
- dev editor of choice. why?
- other tools?
/* HTML */
@notepadwebdev
notepadwebdev / gist:4229950
Created December 7, 2012 01:18
Dee Dee in the kitchen
Fuckin...
I was in my kitchen right
checking to see if my T-shirt was dry right
and I just burst out laughing
cos on the label of my T-shirt
it said George
cos I got it fae Asda
and it was as if
every time I leave the kitchen
everything in the kitchen
@notepadwebdev
notepadwebdev / Belowfold plugin
Created July 4, 2012 08:39
Check if element is below the fold
$.belowfold = function(el) {
var fold = $(window).height() + $(window).scrollTop();
return fold <= $(el).offset().top;
};