MavEtJu's Distorted View of the World - Coding

Exchange / Outlook compatible ICal files
Funny GCC error messages
Interesting numbers
Perl voodoo
DHCPDUMP 1.6 released
LogReport

Back to index

Exchange / Outlook compatible ICal files

Posted on 2006-03-11 17:03:15, modified on 2006-03-11 17:04:37
Tags: Coding, ICal

Just finished a project on which we needed to have Exchange / Outlook compatible ICal files. My experiences, with full code to reproduce it, are written down at http://www.mavetju.org/programming/outlook-ics.php


No comments

Funny GCC error messages

Posted on 2006-02-16 22:27:51, modified on 2006-02-16 22:28:58
Tags: Coding

fc4-zaptel.png

This is while compiling zaptel on a FC4 linux machine with gcc 4.0.0.


No comments

Interesting numbers

Posted on 2005-03-24 16:38:41, modified on 2006-01-09 16:29:23
Tags: Coding, Numbers

If you're coding, interesting numbers will show up sometimes!

This application stops running after 49 days

49 days = 49 days * 24 hours per day * 60 minutes per hour * 60 seconds per minute * 1000 ms = 4,233,600,000, or 0xFC579C00, or close to 0xFFFFFFFF. In other words, some unsigned 64 bit millisecond counter just overflowed.

This application stops running after 24 days

Same story here, except that is an signed 64 bit millisecond counter.

NumberSignificance
86400Number of seconds per day

No comments

Perl voodoo

Posted on 2004-01-19 22:55:53, modified on 2006-01-09 16:29:21
Tags: Coding, Perl

A friend of me came up with this piece of code: (click on URL later). If you run it (with 5.6.1 or 5.8) it will complain that $c isn't specified. But then, if you rename the *c and $c to *b and $b, the program suddenly works.

This is even worse than black magic....

#!/usr/bin/perl -w
use strict;

package testexport;
sub testing {
    my $KEY = shift;
    print "KEY=[$KEY]\n";

    my $a = $::TEST_SINGLE;
    print "a=[$a]\n";

#   my $b = eval "\$::$KEY";
#   print "b=[$b]\n";

    no strict 'refs';
    local *c = $::{$KEY};
    use strict 'refs';
    print "c=[$c]\n";
}

package main;
$main::TEST_SINGLE = "hallo";
#my $TEST_SINGLE = "hallo";
testexport::testing("TEST_SINGLE");

(now rename the "local *c" to "local *b" and "$c" to "$b"...)


Show comments


DHCPDUMP 1.6 released

Posted on 2003-11-21 23:47:26, modified on 2006-01-09 16:29:20
Tags: Coding, Networking, DHCP, DHCPDUMP

DHCPDUMP version 1.6 is released.

Fixed are:
- display of pad options
Added are:
- display of option 83 (and others)
- flushing of stdout after printing one packet.

Available via http://www.mavetju.org/unix/general.php.


No comments

LogReport

Posted on 2002-07-18 19:07:15, modified on 2006-01-09 16:29:21
Tags: Coding

lire.gif

In the past I've setup a project called LogReport. It's for analyzing logfiles from mail-servers, DNS-servers, web-servers etc. Actually all what is producing logfiles.

In the last year I haven't really helped them, more because I wasn't really in a position for it: I didn't have access to real systems, only small logfiles of myself. And that doesn't really help.

But times are changing! I do contract work for BarNet, an ISP for barristers and chambers in Sydney. With about 14 class C networks, they transport a lot of email, do lots of DNS requests and have lots of traffic on their websites. It looks like the good days are coming back again!

Right now I've created two new super-services (see the LogReport website for explanation on what a super-service is): dnszone for DNS logfile analysis and radius for Radius logfile analysis. They are not submitted to Lire yet (see the LogReport website for explanation on what Lire is), but I have faith!


No comments