Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
// Changes XML to JSON | |
// fixed some bugs from http://davidwalsh.name/convert-xml-json | |
// October 9, 2012 | |
// Brian Hurlow | |
function xmlToJson(xml) { | |
// Create the return object | |
var obj = {}; | |
// console.log(xml.nodeType, xml.nodeName ); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<script src="http://code.jquery.com/jquery.min.js"></script> | |
<script> | |
;(function($) { | |
$.fn.textfill = function(options) { | |
var fontSize = options.maxFontPixels; |
function getCartData(callback) { | |
Shopify.getCart(function(cart){ | |
callback(cart); | |
}); | |
} | |
function updateCartAttributes(data, callback) { | |
var params = { | |
type: 'POST', | |
url: '/cart/update.js', |
var url = "http://cdn1.giltcdn.com/images/share/uploads/0000/0001/7250/172502872/420x560.jpg"; | |
var encoded = new Buffer(url).toString('base64'); | |
var decoded = new Buffer(encoded, 'base64').toString('ascii') | |
console.log(encoded); | |
console.log(decoded); |
var svg = document.getElementById('graph'), | |
xml = new XMLSerializer().serializeToString(svg), | |
data = "data:image/svg+xml;base64," + btoa(xml), | |
img = new Image() | |
img.setAttribute('src', data) | |
document.body.appendChild(img) |
{ | |
"application_id":"YOUR_APP_ID", | |
"src":"https://s3.amazonaws.com/img.blitline/Boston+City+Flow.jpg", | |
"pre_process":[ | |
{ | |
"job":{ | |
"src":"https://s3.amazonaws.com/web.blitline/css_text.html", | |
"src_type":"screen_shot_url", | |
"src_data" : {"delay" : 0}, | |
"functions":[ |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
{ | |
"application_id": "YOUR_APP_ID", | |
"pre_process": [ | |
{ | |
"job": { | |
"pre_process": [ | |
{ | |
"job": { | |
"pre_process": [ | |
{ |
// clear canvas | |
canvas.clear(); | |
// add red rectangl | |
canvas.add(new fabric.Rect({ | |
width: 50, height: 50, left: 50, top: 50, fill: 'rgb(255,0,0)' | |
})); | |
canvas.add(new fabric.Rect({ | |
width: 50, height: 50, left: 110, top: 50, fill: 'rgb(255,0,0)' |
{ | |
"application_id":"YOUR_APP_ID", | |
"src":"http://cdn.blitline.com/filters/boys.jpeg", | |
"functions":[ | |
{ | |
"name":"convert_command", | |
"params":{ | |
"-function":"polynomial 3.5,-5.05,2.05,0.3", | |
"-channel":"R" | |
}, |