Skip to content

Instantly share code, notes, and snippets.

View jbuck's full-sized avatar

Jon Buckley jbuck

  • Mozilla
  • Toronto, ON
View GitHub Profile
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@brendandahl
brendandahl / proxyctx.js
Created July 25, 2012 18:33
Proxy Canvas
var Proxy2dContext = function() {
this.actions = [];
this.deps = {};
};
Proxy2dContext.prototype = {
callFunction: function(method, args) {
// convert args to real array
args = Array.prototype.slice.call(args);
this.actions.push([0, method, args]);
},
@mostlygeek
mostlygeek / requirements.txt
Last active November 27, 2018 19:59
Interview Question - Build a Thumbnail Generator
Describe how you would build this thumbnail web service:
- Accept a JPEG via an anonymous HTTP request from the client
- Create a scaled down, 25% thumbnail of it
- Return a text/plain response, with URLs to the original and thumbnail, i.e:
https://i.mozilla.org/abc123.original.jpeg
https://i.mozilla.org/abc123.thumb.jpeg
- Images (original + thumbnails) automatically deleted after 7 days