Skip to content

Instantly share code, notes, and snippets.

Malte Ubl cramforce

Block or report user

Report or block cramforce

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cramforce
cramforce / gist:3431703
Created Aug 23, 2012
speaker-apps-script.js
View gist:3431703
var COLS = {
name: 0,
title: 11,
summary: 12,
imageSrc: 10
};
var TEMPLATE = '---\n\
layout: main\n\
View gist:1936805
final boolean[] ok = new boolean[]{true};
final int[] returnCount = new int[]{0};
NodeTraversal.traverse(compiler, block, new AbstractShallowCallback() {
@Override
public void visit(NodeTraversal t, Node n, Node parent) {
if (n.isName() && "arguments".equals(n.getString())) {
ok[0] = false;
}
if(n.isReturn()) {
returnCount[0]++;
View safer-hash.js
var seed = Math.random() + '';
/**
* Call this early in your program and only once and only if you are
* paranoid about the amount of entropy in Math.random().
*/
exports.srand = function(newSeed) {
seed = newSeed + '';
}
View gist:1501898
JS:
function makeDoubler() {
var a = 1
return function() {
a = a * 2;
return a;
}
}
Java:
View gist:1424936
var e = {}, f = require.m || function() {
};
if(!f("dojo-has-api")) {
var g = "undefined" != typeof window && "undefined" != typeof location && "undefined" != typeof document && window.location == location && window.document == document, h = this, i = g && document, k = i && i.createElement("DiV"), l = {}, f = function(a) {
return l[a] = "function" == typeof l[a] ? l[a](h, i, k) : l[a]
};
f.b = l;
f.add = function(a, b, c, d) {
("undefined" == typeof l[a] || d) && (l[a] = b);
return c && f(a)
View floodit-solver.js
(function() {
var MAX_ROUNDS = 25;
var MAX_RECURSION_DEPTH = 4;
var cheatCount = 0;
(function cheat() {
function asArray(arraylike) {
return Array.prototype.slice.call(arraylike);
}
function gameField() {
@cramforce
cramforce / javascript_will_listen.txt
Created Oct 9, 2011 — forked from joemccann/javascript_will_listen.md
JavaScript Will Listen - By Bella Morningstar
View javascript_will_listen.txt
Artist: https://twitter.com/mandylauderdale
I wouldn't be so alone
If my Github followers lived in my home
Alex Russell would send a pull request
But I'd be too busy
Return to San Francisco by nine
That guy Brendan Eich, did he see my sign
He makes me smile all the time
His lines of code would compliment mine
@cramforce
cramforce / lyrics.txt
Created Oct 3, 2011
I Will Code and JavaScript Will Listen
View lyrics.txt
Artist: https://twitter.com/mandylauderdale
I wouldn't be so alone
If my Github followers lived in my home
Alex Russell would send a pull request
But I'd be too busy
Return to San Francisco by nine
That guy Brendan Eich, did he see my sign
He makes me smile all the time
His lines of code would compliment mine
View gist:1228770
javascript:(function(){var style=document.createElement('style');style.textContent='.popupContent{display:none}';document.body.appendChild(style);})()
You can’t perform that action at this time.