The following is a non-exhaustive compendium of HTML5 related scripts, frameworks and templates/boilerplates alongside suggested best practices to be used for any HTML5-type project.
Feel free to add to the list and edit as you see fit.
| /usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-data -g www-data -f /usr/bin/php5-cgi -P /var/run/fastcgi-php.pid |
| var fs = require('fs'), | |
| sys = require('sys'), | |
| base64 = require('base64'); // this module is installed. | |
| var foo = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAKIAeYDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+kxbCMxpmNRGIwRyf9o5OCxyRtzuBfDE5Jzm/b6dA5JVFVwxJKkgEMzsApAUlgOPmBCgqx |
| // Variable usage: (* marks globals, all other variables are used for various purposes by various parts of the code) | |
| // a = calculator | |
| // b* = random data | |
| // c* = main canvas | |
| // d* = main canvas style / main canvas context | |
| // e = calculator | |
| // f = | |
| // g* = main canvas composite operations | |
| // h* = 300 (height) | |
| // i = counter |
| /*! | |
| * JavaScript Core Object v0.53 | |
| * | |
| * Licensed under the new BSD License. | |
| * Copyright 2008-2009, Bram Stein | |
| * All rights reserved. | |
| */ | |
| (function() { | |
| function getInternalType(value) { | |
| return Object.prototype.toString.apply(value); |
| WebFontConfig = { | |
| google: { families: [ 'Droid Sans' ] } | |
| }; | |
| (function() { | |
| var wf = document.createElement('script'); | |
| wf.src = ('https:' == document.location.protocol ? 'https' : 'http') + | |
| '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js'; | |
| wf.type = 'text/javascript'; | |
| wf.async = 'true'; | |
| var s = document.getElementsByTagName('script')[0]; |
| (function($) { | |
| $.fn.konami = function(callback, code) { | |
| if (code == undefined) code = "38,38,40,40,37,39,37,39,66,65"; | |
| return this.each(function() { | |
| var kkeys = []; | |
| $(this).keydown(function(e) { | |
| kkeys.push(e.keyCode); | |
| if (kkeys.toString().indexOf(code) >= 0) { |
| // Does not work in Safari 5 | |
| // Technique one: | |
| var lastSheet = document.styleSheets[document.styleSheets.length - 1]; | |
| var newName = 'foo'; | |
| lastSheet.insertRule("@-webkit-keyframes " + newName + "{ 0% { -webkit-transform: rotateY(0) translate3D(0,0,0); } 25% { -webkit-transform: rotateY(45) translate3D(0,0,-1000px); } 50% { -webkit-transform: rotateY(90) translate3D(0,0,-2500px);} 75% { -webkit-transform: rotateY(135) translate3D(0,0,-1000px);} 100% { -webkit-transform: rotateY(180) translate3D(0,0,0px);} }", lastSheet.cssRules.length); | |
| document.getElementById('#foo').style.webkitAnimationName = newName; | |
| (function (exports) { | |
| if (typeof JSON === "undefined") { | |
| throw new Error("JSON is required. Plesae include json2.js if you are running this in the browser"); | |
| } | |
| var | |
| Q = require("promised-io/promise"), | |
| HttpClient = require("promised-io/http-client").Client, | |
| Trait = require("traits").Trait, | |
| base64 = require("./base64"), |
| var sys = require("sys"), | |
| fs = require("fs"); | |
| function processImageDir(path, outFilename, cb) { | |
| fs.readdir(path, function(err, files) { | |
| var imgfiles = []; | |
| // Check for images and push on the array if it's a match. | |
| files.forEach(function(name) { |
The following is a non-exhaustive compendium of HTML5 related scripts, frameworks and templates/boilerplates alongside suggested best practices to be used for any HTML5-type project.
Feel free to add to the list and edit as you see fit.