Skip to content

Instantly share code, notes, and snippets.

@joshvermaire
joshvermaire / requestAnimationFrame.js
Created June 17, 2014 22:06
ThisLife rAF polyfill
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame']
|| window[vendors[x]+'CancelRequestAnimationFrame'];
}
if (!window.requestAnimationFrame)
@joshvermaire
joshvermaire / arc.html
Created June 17, 2014 22:03
Animate Canvas Arc
<!DOCTYPE HTML>
<html>
<head>
<style>
body {
margin: 0px;
padding: 0px;
}
</style>
</head>

Keybase proof

I hereby claim:

  • I am joshvermaire on github.
  • I am joshvermaire (https://keybase.io/joshvermaire) on keybase.
  • I have a public key whose fingerprint is 3A56 5A70 94F6 B11B C3EF E2FE D0E5 3724 C4FD D988

To claim this, I am signing this object:

@joshvermaire
joshvermaire / scroll.html
Created May 20, 2014 18:46
Carousel Demo
<html>
<head>
<title></title>
</head>
<body>
<div id='click' style='position: fixed; right: 50px; height: 50px; top: 50px; z-index: 2;'>Click Me</div>
<div id='container' style='height:200px;overflow-x:scroll; overflow-y:hidden;'>
<div class="scroll" style='height: 200px;'></div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
@joshvermaire
joshvermaire / proxino-no-jquery.js
Created January 28, 2014 18:19
Unminified version of proxino-no-jquery.js
Proxino = {
key : null,
log : function(obj) {
if ( typeof(obj) === "string" ) {
obj = {
type : "Message",
body : obj
}
}
@joshvermaire
joshvermaire / gist:7894904
Created December 10, 2013 17:48
Little helpers: a tweet-sized JavaScript templating engine - Thomas Fuchs http://mir.aculo.us/2011/03/09/little-helpers-a-tweet-sized-javascript-templating-engine
function t(s,d){
for(var p in d)
s=s.replace(new RegExp('{'+p+'}','g'), d[p]);
return s;
}
// t("Hello {who}!", { who: "JavaScript" });
// "Hello JavaScript!"
// t("Hello {who}! It's {time} ms since epoch.", { who: "JavaScript", time: Date.now });
Sr. Software Engineer - Web Presentation
Does an opportunity to work with cutting-edge web technologies to serve millions of enthusiastic users excite you? Are you passionate about designing and building products that are visually and technically cool? If so, the Shutterfly team is looking for an outstanding web presentation engineer to join our team.
We are looking for a self-motivated, outstanding web presentation engineer who will join a team that will work closely with our experienced Product Marketing, User Experience and creative teams to deliver next generation features and services to expand our customer base.
Responsibilities:
• Collaborate with product managers, interaction designers, operations, and other members of the project team in requirements specification, feasibility analysis, detailed engineering analysis and launch planning
• Design and development of highly dynamic and interactive web-based UIs
• Design and development of the Shutterfly front-end for our next-generation sharing
@joshvermaire
joshvermaire / gist:6820695
Created October 4, 2013 03:46
object properties are indexed by the order in which they are added to the object
var object = {};
object.b = 'b';
object.a = 'a';
object.c = 'c'
console.log(object);
// Object {b: "b", a: "a", c: "c"}
var key, item;
var request = require('request')
growl = require('growl');
var interval;
var makeRequest = function () {
request.get(
'https://status.github.com/api/status.json',
function (error, response, body) {
var json;
if (!error && response.statusCode == 200) {
@joshvermaire
joshvermaire / coversion.coffee
Created October 10, 2012 21:09
Conversion of Photos and Videos to Moments
# subscription being the subscription DTO returned from the API
numPhotos = subscription.num_photos
secVideos = subscription.sec_videos
numVideos = secVideos / 60000 * subscription.plan.photos_per_min_video
total = subscription.total_storage
# Change to a string with commas
photosComma = numberWithCommas(numPhotos)
# Ensure numVideos and numPhotos are integers
allMoments = parseInt(numVideos, 10) + parseInt(numPhotos, 10)
# Make the time prettified