Skip to content

Instantly share code, notes, and snippets.

View AntJanus's full-sized avatar

Antonin Januska AntJanus

View GitHub Profile
@AntJanus
AntJanus / 0_reuse_code.js
Created August 6, 2014 19:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@AntJanus
AntJanus / gist:3070178a2594ad301b14
Last active August 29, 2015 14:03
Using currying to build an assertion library
var assert = function(evaluateFn, variadic) {
return function() {
var args = [].slice.call(arguments, 0, arguments.length - 1);
var msg = arguments[arguments.length - 1];
if(variadic) {
var evaluation = evaluateFn(args);
} else {
var evaluation = evaluateFn(args[0], args[1]);
}
if(evaluation === true ) { return true; }
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Image Selector</title>
<style>
.centered-row {
width: 1024px;
margin: 1.5em 0;
}