2011-10-17 01:10:43
No Comments
I've been modifying an existing nodejs extension, that wraps libcwiid (a C library written to interface with a Wiimote). This extension uses polling to check if the state of the Wiimote has changed (such as a button being pressed). Libcwiid however provides a callback mechanism to be alerted as soon as a state change occurs. This ...
2011-09-23 00:55:57
No Comments
Today I needed to work out the MD5 Digest hash for SIP authorisation. A quick search on Google revealed instructions on how to generate the hash, and then I made this simple PHP script.
<?php
$username = '1234';
$realm = 'asterisk';
$password = 'PASSWORD';
$uri = 'sip:1.2.3.4';
$nonce = 'abcdef01';
$str1 = md5("$username:$realm:$password");
$str2 = md5("REGISTER:$uri");
...
2011-08-07 18:30:39
3 Comments
2011-08-02 01:17:49
No Comments
I recently stumbled across this issue while debugging some Javascript. Take the following example code:
var array = [1,2,3,4,5,6,7,8,9,10];
var i = 0;
while(array.length > 0) {
console.log(i++, array);
//alert("pause");
array.pop();
}
If you run it in your browser you would expect to see the following printed (in your Javascript console):
0 [1, 2, 3, 4, ...
2011-07-27 01:29:51
4 Comments


