... Will update this page soon ...
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
module.exports = function (grunt) { | |
grunt.initConfig({ | |
// as usual, just make sure that – for multitasks – there always needs to be | |
// an `options`-entry to correctly detect them | |
copy: { | |
options: {}, | |
dist: { | |
files: [{ | |
// .... | |
}] |
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
#!/usr/bin/env node | |
var fs = require('fs'), | |
util = require('util'), | |
spawn = require('child_process').spawn, | |
stream = require('stream'); | |
function dateString(date) { return date.toISOString().split('T')[0]; } | |
function timeString(date) { return date.toTimeString().slice(0,5); } |
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
function encodeFrame(frame, idx) { | |
// RLE: MSB indicates a run-length (2-127) for the subsequent character | |
return frame.replace(/(.)\1{2,127}/g, function(s) { | |
return String.fromCharCode(128 + s.length) + s[0]; | |
}); | |
} | |
var decodeCache = {}; | |
function decodeFrame(frame) { | |
return frame.replace(/[\u0080-\u00FF]./g, function replaceCallback(s) { |
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
// this is an anonymized but otherwise unmodified copy from the | |
// documentation of a renowned tracking-provider. | |
var toSleep = true; | |
function stopTimer(){toSleep=false;} | |
function clickTracker(LinkName){ | |
var secureID="XXX"; | |
var redirectUrl="http://wehave.teh-trackingz.com/1px.gif"; |
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
class Node | |
constructor: (@p, @value, @childs=[]) -> | |
class HuffmanTreeBuilder | |
_nodes: [] | |
_rootNode: null | |
# probabilities = value1: probability1, value2: probability2, ... | |
constructor: (probabilities = {}) -> | |
(@_add new Node p, value) for value, p of probabilities |
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
RewriteEngine On | |
# alles, was keine datei ist, auf .html endet und nicht index.html ist... | |
RewriteCond ${REQUEST_FILENAME} !-f | |
RewriteCond ${REQUEST_FILENAME} \.html$ | |
RewriteCond ${REQUEST_FILENAME} !^index\.html$ | |
# ... umschreiben zu /.../ und redirecten | |
RewriteRule ^(.*)\.html$ /$1/ [R=301,QSA,L] | |
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 _queue = []; | |
function enqueue(data, itemProcessor, callback) { | |
for(var i=0, n=data.length; i<n; i++) { | |
(function(item) { | |
_queue.push(function(next) { | |
itemProcessor(item, function() { | |
window.setTimeout(next, 0); | |
}); | |
}); | |
} (data[i])); |
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
# searches a combination of the given elements that matches toMatch | |
# @param c array - initially empty, carries the current combination throught | |
# the recursion | |
# @param els array - the predefined set of elements | |
# @param toMatch string - the rest-string to be matched with the elements | |
# | |
# @return an array of combinations that recursively match | |
searchCombination = (c, els, rest) -> | |
return c if rest.length==0 |
OlderNewer