2007-04-04

Few more thermal images

In front is a table. Behind it, a radiator (glowing white slate with two pipes connected to it in the left). Top part (black) is a glass window - it's daytime, but you can't see thru it.

Interesting stuff, to some

Some misc equipment. A few (cathode ray tube) video monitors, on top of them some analog video cameras. Rightmost is an old Toshiba laptop.

Interesting stuff, to some pt. 2

2007-04-02

Thermographic imaging

It's me, holding a lighter, "seen" thru the germanium lens of a thermal camera. Red cross marks the hot spot. Kind of looks like Boaz the Cydberg Assassin :)

Thermographic image

2007-03-23

JSLog

"..a lightweight, self-contained logging panel which takes the place of alert() boxes for your AJAX and DHTML applications."

2007-03-12

Javascipt: cross-browser event registration

var mozilla =document.getElementById && !document.all;
var ie =document.all;

function addevent( id, event, callback)
{
  if( ie)
      document.getElementById( id).attachEvent( 'on' +event, callback);
  else if( mozilla)
      document.getElementById( id).addEventListener( event, callback, true);
  else
    {
      // XXX???
    }
}

2007-02-22

Sniffing

Need a "sniffer" type device that can be put between two network interfaces transparently. For example when an embedded device is not behaving and you need to monitor traffic between it and a switch (and don't have access to the switch monitoring functions).
Ingredients:

  • Ubuntu
  • A network card
  • Another network card
  • bridge-utils
  • tcpdump

Set the machine up as a bridge:

sudo ifconfig eth0 promisc 0.0.0.0 up
sudo ifconfig eth1 promisc 0.0.0.0 up
sudo brctl addbr br0
sudo brctl addif br0 eth0
sudo brctl addif br0 eth1
sudo ip link set br0 up

To watch packets go between eth0 and eth1:

sudo tcpdump -i br0

2007-02-16

Parallels/Macbook and {}[]|\ etc.

From: http://forum.parallels.com/showpost.php?s=4be86dd8ac6ad4b23d937d556aecc920&p=27651&postcount=2

"If you want Right Enter to operate as AltGr key in VM:

1. Stop any running VMs, close all instances of Parallels Desktop for Mac.
2. Launch “Macintosh HD” - “Applications” – “Utilities” – “Terminal”.
3. Type the following commands in Terminal (without quotes), please mind that the system might ask you for the Administrator password after each command – type it and hit Enter:
4. “sudo touch /Library/Parallels/.keyboard_config”
5. “sudo chmod 666 /Library/Parallels/.keyboard_config”
6. “sudo echo "numenterisaltgr" > /Library/Parallels/.keyboard_config”
7. Close the Terminal.
8. Launch Parallels Desktop for Mac and check Right Enter key behavior in VM – everything should work as you’ve set."

2007-02-08

Cygwin, how kewl

It works..!

Installed Cygwin (have been using it for couple of years mainly because of the shell as a superior substitute for Windows cmd.exe but never actually compiled anything) on a new computer, and with it gcc and friends. Opened a shell and did:

$ cat >foo.c
#include <stdio.h>

int main( int argc, char **argv)
{
    printf( "Hello, world!\n");

    return 0;
}
(Ctrl-d)

$ gcc foo.c -o foo.exe -mno-cygwin

$ ./foo.exe
Hello, world!

The -mno-cygwin flag links againts native Windows libs so that there is no need for a Cygwin installation to be present in a computer that the program is being run on. Gdb worked fine too. How sw33t. Next step is to "port" a program that has been developed with Visual Studio.. should work ok I think.