Archive for July, 2008

nutridb.org

Saturday, July 12th, 2008

Sometime back in 2002 I started writing a nutrition database in PHP that was based on data from the USDA Nutrient Data Laboratory. In 2003 I left the U.S. for a Peace Corps assignment in Belize, then stayed in Central America for about another year and half before returning to the States. When I came back I rewrote the whole thing and registered the domain nutridb.org. It doesn’t really get used, but the code is there under an MIT (X11) license.

Ceiling Cat

Friday, July 11th, 2008

There has been some mention on the #cc (irc.freenode.net) IRC channel about Ceiling Cat and Basement Cat. In that spirit I share the following image (found on catmas.com posted by Joey DeVilla). NOTE: I’m not necessarily an atheist and the following image is not a slight to any religion, I just thought it was funny:

Ceiling Cat

lolnkinkade

Friday, July 4th, 2008

http://lol.nkinka.de

Below is the bit of javascript that handles the text transitioning at the above URL. More than anything this was a way for me to explore the use of setInterval(), a javascript builtin function which I didn’t previously know about.

setInterval('lolme()', 1000);
i = 0;
function lolme() {
	var ar_lol = new Array(
		"nath@nkinka.de?",
		"lol",
		"rofl",
		"omg wtf bbq",
		":-)",
		";-)"
	);
	var ar_cnt = ar_lol.length;
	(i == 0) ? pi = ar_cnt - 1 : pi = i - 1;
	var loldiv = document.getElementById('lol');
	if ( loldiv.childNodes[0] ) {
		loldiv.removeChild(loldiv.childNodes[0]);
	}
	loldiv.appendChild(document.createTextNode(ar_lol[i]));
	(i == ar_cnt - 1) ? i = 0 : i++;
}