Skip to content

Instantly share code, notes, and snippets.

View afryer's full-sized avatar

Anthony afryer

  • Between a rock and a hard place
View GitHub Profile
@afryer
afryer / gist:9110628
Last active August 29, 2015 13:56
start of image to indexDB
function getBase64Image(img) {
// Create an empty canvas element
var canvas = document.createElement("canvas");
var canvasImg = new Image();
$(canvasImg).attr('src',img.src);
console.log(img);
console.log(canvasImg);
// Copy the image contents to the canvas
var ctx = canvas.getContext("2d");
@afryer
afryer / gist:063cbdb3a68f39ae86df
Created February 10, 2016 11:31
preferences.sublime
{
"tab_size": 2,
"translate_tabs_to_spaces": false,
"trim_trailing_white_space_on_save": true,
}
@afryer
afryer / 0_reuse_code.js
Created August 9, 2017 16:43
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console