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
server { | |
index index.html index.php index.htm; | |
server_name ~^(www\.)?(?P<domain>.+)$; | |
root /var/www; | |
location @notfound { | |
root /home/websites/Websites; | |
access_log on; | |
rewrite ^ /404.html last; | |
} |
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
Handlebars.registerHelper("foreach",function(arr,options) { | |
if(options.inverse && !arr.length) | |
return options.inverse(this); | |
return arr.map(function(item,index) { | |
item.$index = index; | |
item.$first = index === 0; | |
item.$last = index === arr.length-1; | |
return options.fn(item); | |
}).join(''); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
const API_KEY = 'SOME_KEY'; | |
/** | |
* Use HTML5 Canvas to get the image data | |
* @param {HTMLImageElement} img An Image Tag |
NewerOlder