This file contains 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
/** | |
* A Javascript test runner in 20 lines of code | |
* From http://joakimbeng.eu01.aws.af.cm/a-javascript-test-runner-in-20-lines/ | |
*/ | |
(function () { | |
// The test queue: | |
var tests = []; | |
// Function to add tests: | |
this.test = function test (name, cb) { |
This file contains 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
http://kolodny.github.io/bookmarklet.html | |
document.body.addEventListener('click', go); | |
alert('click on a form element to get a bookmarklet of the saved form'); | |
function go(event) { | |
var form = event.target; | |
while (form && form.tagName !== 'FORM') { | |
form = form.parentNode; | |
} |
This file contains 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 fs = require('fs'); | |
var vips = require('../index'); | |
var imagemagick = require("imagemagick"); | |
var gm = require("gm"); | |
var epeg = require("epeg"); | |
var async = require("async"); | |
var assert = require("assert"); | |
var Benchmark = require("benchmark"); | |
var cv = require("opencv"); |
This file contains 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
$('*').each(function () { | |
var colors = ['aqua', 'blue', 'fuchsia', 'gray', 'green', 'lime', 'maroon', 'navy', 'olive', 'orange', 'purple', 'red', 'silver', 'teal', 'yellow']; | |
$(this).css('background-color', colors[Math.floor(Math.random()*colors.length)]); | |
$(this).css('font-family', 'Comic Sans MS'); | |
}); | |
$('img').each(function () { | |
var imgs = [ | |
'http://www.animatedgif.net/devilish/coolskul.gif', | |
'http://www.animatedgif.net/devilish/devildance_e0.gif', |
NewerOlder