PNGtools 0.4

  • Post author:
  • Post category:Pngtools

Wow, this is a blast from the past. When I wrote the pngchunks command in 2003, I had never seen a 64 bit machine, and knew enough to check that an int was the right size, but not enough to just use the guaranteed-to-be-32-bit version from day 1. I'd pretty much forgotten about this code until I got pinged about this Debian bug. The bug reporter is entirely right, this was lame. PNGtools 0.4 should be 64 bit safe. The pngchunks command works on my 64 bit machines at least. A historical note from November 2020: this code is quite old, but still actively used. I have therefore converted the old subversion repository to git and it is hosted at https://github.com/mikalstill/pngtools. I will monitor there for issues and patches and try my best to remember what I was thinking 20 years ago...

Continue ReadingPNGtools 0.4

Isaac Asimov’s Robot City: Odyssey

  • Post author:
  • Post category:Book

This is the first in a series of robot stories endorsed by Isaac Asimov. I enjoyed the first third of the book more than the last two thirds, mainly because I found the second two thirds a little hard to believe. Interestingly they were hard to believe in a similar manner to some of the Stainless Steel Rat books (such as The Stainless Steel Rat Saves the World, The Stainless Steel Rat Wants You, and The Stainless Steel Rat Goes to Hell). I wont get too specific, because I don't want to spoil the plot. This book felt kinda juvenile as well -- the plot lacked depth in my opinion. On the other hand, I did enjoy reading it, and it was better than I expected it to be.

Continue ReadingIsaac Asimov’s Robot City: Odyssey

Packet capture in python

  • Post author:
  • Post category:Python

I'm home sick with a cold today and got bored. I wanted to play with packet capture in python, and the documentation for pcapy is a little sparse. I therefore wrote this simple little sample script: #!/usr/bin/python # A simple example of how to use pcapy. This needs to be run as root. import datetime import gflags import pcapy import sys FLAGS = gflags.FLAGS gflags.DEFINE_string('i', 'eth1', 'The name of the interface to monitor') def main(argv): # Parse flags try: argv = FLAGS(argv) except gflags.FlagsError, e: print FLAGS print 'Opening %s' % FLAGS.i # Arguments here are: # device # snaplen (maximum number of bytes to capture _per_packet_) # promiscious mode (1 for true) # timeout (in milliseconds) cap = pcapy.open_live(FLAGS.i, 100, 1, 0) # Read packets -- header contains information about the data from pcap, # payload is the actual packet as a string (header, payload) = cap.next() while header: print ('%s: captured %d bytes, truncated to %d bytes' %(datetime.datetime.now(), header.getlen(), header.getcaplen())) (header, payload) = cap.next() if __name__ == "__main__": main(sys.argv) Which outputs something like this: 2008-11-25 10:09:53.308310: captured 98 bytes, truncated to 98 bytes 2008-11-25 10:09:53.308336: captured 66 bytes, truncated to 66 bytes 2008-11-25 10:09:53.315028: captured 66 bytes, truncated…

Continue ReadingPacket capture in python

Daggerspell

  • Post author:
  • Post category:Book

This is yet another book I read as a kid and liked. I must admit that I find the Celtic names used through out the book to be quite confusing, especially when there are multiple similar names in use at the same time. Despite that, I really enjoyed this book -- even though its a pretty classic formula story. [isbn: 0553565214;0586073159]

Continue ReadingDaggerspell

Foundation and Earth

  • Post author:
  • Post category:Book

I really like how Asimov wraps up the extended Foundation series. Specifically, I'd previously complained while reading Pebble in the Sky that it was hard to believe that everyone simply forgets that they originated on Earth -- this book and Foundation's Edge go a long way to resolving that annoyance for me. Its also good to find out what happened to Aurora and Solaria finally -- especially given the Solaria mystery has been bothering me since Robots and Empire. Speaking just about this book so a moment, I do find the use of sex as a plot development method quite odd. There are three examples that bother me -- when Bliss is slipped through interstellar customs with the explanation that she's just a whore and therefore not important enough to make an issue of; the second is when Trevize basically shags his way out of an awkward situation, despite the other protagonist being quite hostile initially; and finally where he bonks someone on a rural world. I find all three of those incidents a little out of place with the rest of the book, and in fact the rest of the series. Other authors use those kinds of plot elements,…

Continue ReadingFoundation and Earth

Foundation’s Edge

  • Post author:
  • Post category:Book

I'm back to reading Foundation Series books actually written by Isaac Asimov. This one is the fourth in the Foundation Series if you count them in the order they were written, but is the second last in chronological terms. Its set 500 years after the failure of the first galactic empire, and follows the first Foundation's attempt to discover if the second Foundation still exists. Well, its a bit more complicated than that, but I don't want to ruin it for you. As an aside, the user interface described for the ship's computer is really cool. Its a bit like augmented reality, mixed with gesture control, mixed with a direct interface into the brain. I'm not saying I want one in my house, but its cool that a book written in 1983 still has a user interface description which isn't dated, and still seems plausible. This book has minor inconsistencies with the story presented in the second foundation trilogy (Foundation's Fear, Foundation and Chaos and Foundation's Triumph), but I see that more as a failure in those followup authors than in this book. In fact, I've already complained about how untrue to Asimov's vision some of those books are elsewhere.…

Continue ReadingFoundation’s Edge

Automatically creating folders for mailing lists

  • Post author:
  • Post category:Procmail

I've been using some simple procmail rules to automatically create folders for mailing lists for ages. Tony asked me for those rules today, so I figured I'd just put them online. ########################################################################## # Mailman :0: * List-Id:.*]* $MATCH :0: * List-Post: ]* $MATCH ########################################################################## # Majordomo lists (sometimes don't have 's around the address :0: * X-Mailing-List:.*]* $MATCH :0: * X-Mailing-List:.*\/.* $MATCH ########################################################################## # Ezmlm :0: * Mailing-List: .* \/[^ ;]* $MATCH ########################################################################## # I'm not sure what creates this one... :0: * X-Loop: \/.* $MATCH

Continue ReadingAutomatically creating folders for mailing lists

Wanted: someone to edit / review some MythTV stuff for me

  • Post author:
  • Post category:Mythtv

I'm looking for someone with solid MythTV experience and a good grasp of the English language to help me out with a project. All I can promise in return is glory, and that will be proportional to the eventual success of the project. If you're interested in spending some time (probably around 40 hours or so, spread over a couple of months) on such a project drop me a line.

Continue ReadingWanted: someone to edit / review some MythTV stuff for me

The Riftwar Series

  • Post author:
  • Post category:Book

This series follows to young kids who grow up in a rural castle on the edge of an empire. Pug ends up being the greatest Magician to ever live, and Thomas ends up being merged with an ancient being of massive power. Its a good series, even if people accuse it of being steeped in cliche. 1982: Magician (later sold as Magician: Apprentice and Magician: Master) 1985: Silverthorn 1986: A Darkness at Sethanon

Continue ReadingThe Riftwar Series

A Darkness at Sethanon

  • Post author:
  • Post category:Book

This book took longer to read that I would have liked, because I have been busy with other things. Its a good book though, and a fine conclusion to the Riftwar Series. I liked this book a lot, although I do think that Magician (Apprentice and Master) was a better book. [isbn: 0553263285]

Continue ReadingA Darkness at Sethanon

End of content

No more pages to load