This file contains hidden or 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
html{ | |
background: url(https://source.unsplash.com/daily) no-repeat center center fixed; | |
background-size: cover; | |
height: 100%; | |
overflow: hidden; | |
} |
This file contains hidden or 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 filename = "/imagename.jpg"; | |
var url = "http://imageurl.jpg"; | |
http.get(url , function(res){ | |
var headers = { | |
'Content-Length': res.headers['content-length'] | |
, 'Content-Type': res.headers['content-type'] | |
}; | |
client.putStream(res, filename, headers, function(err, res){ | |
var expires = new Date(); | |
expires.setMinutes(expires.getMinutes() + 10); |
This file contains hidden or 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
// Changes XML to JSON | |
// Modified version from here: http://davidwalsh.name/convert-xml-json | |
function xmlToJson(xml) { | |
// Create the return object | |
var obj = {}; | |
if (xml.nodeType == 1) { // element | |
// do attributes | |
if (xml.attributes.length > 0) { |
This file contains hidden or 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
/** | |
* Originally from http://davidwalsh.name/convert-xml-json | |
* This is a version that provides a JSON object without the attributes and places textNodes as values | |
* rather than an object with the textNode in it. | |
* 27/11/2012 | |
* Ben Chidgey | |
* | |
* @param xml | |
* @return {*} | |
*/ |
This file contains hidden or 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
// 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 ); |
This file contains hidden or 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
//-filter is not required | |
{ | |
"application_id":"your app id", | |
"src":"https://s3.amazonaws.com/img.blitline/sky.jpg", | |
"functions":[ | |
{ | |
"name":"convert_command", | |
"params":{ | |
"-resize" : "200%", |
This file contains hidden or 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
//magnify doubles image size | |
{ | |
"application_id":"your app id", | |
"src":"http://cdn.blitline.com/filters/boys.jpeg", | |
"functions":[ | |
{ | |
"name":"convert_command", | |
"params":{ | |
"-magnify" : "" |
This file contains hidden or 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
{ | |
"application_id": "your id", | |
"pre_process": [ | |
{ | |
"job": { | |
"pre_process": [ | |
{ | |
"job": { |
This file contains hidden or 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
{ | |
"application_id":"yourappid", | |
"src":"http://cdn.blitline.com/filters/boys.jpeg", | |
"functions":[ | |
{ | |
"name":"convert_command", | |
"params":{ | |
"-color-matrix" : ".6 0.3 -0.3 0 47 -0 .9 .2 0 -37 .2 -.1 .4 0 -7.5 0 0 0 1 0" | |
}, | |
"save":{ |
This file contains hidden or 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
{ | |
"application_id":"your app id", | |
"src":"http://cdn.blitline.com/filters/boys.jpeg", | |
"functions":[ | |
{ | |
"name":"convert_command", | |
"params":{ | |
"-color-matrix" : "0.5 0 0 0 1 0 0 0 1" | |
}, | |
"save":{ |
NewerOlder