This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// loop through the 'paper' variable from Raphael JS and build up the JSON object describing all images and paths within it. | |
buildJSON = function(paper) { | |
var svgdata = []; | |
svgdata.push({ | |
width: 390, | |
height: 400 | |
}); | |
$.each(paper, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadImgs(urls, doneCallback) { | |
var remaining = total = urls.length; | |
var imgs = []; | |
function imgLoad(url) { | |
if (!--remaining) { | |
doneCallback(imgs); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function translation(elem) { | |
var cssPrefixes = ["", "-webkit-", "-moz-", "-o-"], | |
cStyle = window.getComputedStyle(elem, null), | |
translation = { | |
x: 0, | |
y: 0 | |
}; | |
for (var i = cssPrefixes.length - 1; i >= 0; i--){ | |
var transform = cStyle.getPropertyValue(cssPrefixes[i] + "transform"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fun times with @mrnickharvey https://vine.co/v/b29EtOb6nw6 | |
Quick message of thanks to everyone for the Vine feedback https://vine.co/v/b2EHtJTpvYv | |
Vining for the sake of vining https://vine.co/v/b20lwHiPzHD | |
The truth about my Vines https://vine.co/v/b20xKdM6Xxm | |
Tough love (the outtake) https://vine.co/v/b20Up1QvJXX | |
Tough love https://vine.co/v/b20U7ipjZlA | |
Bus face https://vine.co/v/b211O6QxnE6 | |
I don't like cheesy poofs https://vine.co/v/bQPBI5x5MdK | |
I don't like cheesy poofs https://vine.co/v/bQPBibOj17A | |
Wake up! https://vine.co/v/bQHQAjLMUPi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('button#start').click(function() { | |
var results = $('p#results').html("Animating..."), | |
button = $(this).attr('disabled', 'disabled'); | |
// CSS3 Container | |
$('.target-css').animate({left: "+=200px", width:320 }, 1500, function() { | |
results.html('first callback() fired, reversing...'); | |
$(this).animate({left: "-=200px", width:280 }, 1500, function() { | |
results.html("second callback() fired"); | |
button.removeAttr('disabled'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#target photoshop | |
var sizes = { | |
'xlarge': [1490, 730], | |
'large': [1160, 568], | |
'medium': [890, 436], | |
'small': [760, 372] | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948) --> | |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | |
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" | |
width="2988.895px" height="1885.335px" viewBox="0 0 2988.895 1885.335" enable-background="new 0 0 2988.895 1885.335" | |
xml:space="preserve"> | |
<text transform="matrix(1 0 0 1 117.5674 193.3823)" fill="#1C3F94" font-family="'ArialMT'" font-size="13.7317">Amersham</text> | |
<text transform="matrix(1 0 0 1 285.0654 207.4351)" fill="#1C3F94" font-family="'ArialMT'" font-size="13.7317">Chorleywood</text> | |
<text transform="matrix(1 0 0 1 1316.9741 261.0347)" fill="#1C3F94" font-family="'ArialMT'" font-size="13.7317">Mill Hill East</text> | |
<text transform="matrix(1 0 0 1 306.2056 236.7271)" fill="#1C3F94" font-family="'ArialMT'" font-size="13.7317">Rickmansworth</t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cookieSessions = require('./modules/cookieSessions'); | |
app.configure(function() { | |
app.use(express.cookieParser('a9e687e0-a1e0-11e2-9e96-0800200c9a66')); | |
app.use(cookieSessions('ucheckout')); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="http://twitter.com/benpbarnett" rel="contact">@benpbarnett on Twitter</a> |
NewerOlder