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
package Analumic::Jotr; | |
# * | |
# * Analumic - Analytics Statistics Logger "Jot". | |
# * Perl (mod_perl module) pixel server stored to Scribe and enhanced by GeoIP. | |
# * See web server config info (web_server_config.conf). | |
# * http://analumic.com | |
# * | |
use strict; | |
#these modules are now loaded in apache config |
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 LOGGING = 'debug'; // debug, alert, silent. | |
function _log(a,b){"debug"===LOGGING&&void 0!==b?console.log("debug - "+a+" > "+require("util").inspect(b,!0,99,!0)):"debug"===LOGGING&&void 0===b?console.log(a):"alert"===LOGGING&&console.log(a)}; |
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
// require these modules: 'msgpack' (binding), 'msgpack-js' (pure javascript), JSON node.js built in function. | |
// config | |
var config = []; | |
config["messenger_codec"] = 'json'; // json, msgpack, msgpack-js | |
// codec for messenger to use: json, msgpack, msgpack-js. | |
var Codec = function() { }; |
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
// | |
// Kurunt Launch | |
// | |
// Launches node.js apps through /etc/init.d/. | |
// Version: 0.1 | |
// Author: Mark W. B. Ashcroft | |
// | |
// Copyright (c) 2013 Mark W. B. Ashcroft. | |
// Copyright (c) 2013 Kurunt. | |
// |
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 works | |
function loadXMLDoc(url) { | |
if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari | |
xmlhttp=new XMLHttpRequest(); | |
} else { // code for IE6, IE5 | |
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); | |
} | |
xmlhttp.onreadystatechange = function() { | |
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { |
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
$.getJSON('http://localhost:8888/data.json', function(data) { | |
var items = []; | |
$.each(data, function(key, val) { | |
items.push('<li id="' + key + '">' + val + '</li>'); | |
}); | |
$('<ul/>', { | |
'class': 'my-new-list', | |
html: items.join('') |
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
// logging, dump, function. Can set: gconfig['loggin'] = 'quiet' || 'benchmarking' || 'debug' | |
var log = function(txt, benchmarking, dump) { | |
if ( dump != undefined ) { | |
console.log(txt + ' >> ' + require('util').inspect(dump, true, 99, true)); | |
} else if ( gconfig['loging'] === 'benchmarking' ) { | |
if ( benchmarking === true ) { | |
console.log(txt); | |
} | |
} else if ( gconfig['loging'] === 'debug' ) { |
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 util = require('util'); | |
var x = 0; | |
setInterval(function() { | |
process.stdout.write('hello: ' + x + '\r'); // needs return '/r' | |
// util.print('hello: ' + x + '\r'); // could use this too | |
x++; | |
}, 1000); |
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 Byte2Bits(octet) { | |
var bits = []; | |
var i = 0; | |
for ( i = 0; i < 8; i++ ) { | |
bits.push(octet >> 7 - i & 1); | |
} | |
return bits; | |
} |
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
"use strict"; | |
// | |
// Benchmark speed and standard deviation between md5 (2 bytes of) and crc for a hash key. | |
// | |
// Version: 0.0.1 | |
// Author: Mark W. B. Ashcroft (mark [at] fluidecho [dot] com) | |
// License: MIT or Apache 2.0. | |
// | |
// Copyright (c) 2017 Mark W. B. Ashcroft. | |
// Copyright (c) 2017 FluidEcho. |
OlderNewer