How good are these random numbers anyway? I generated 100,000 random numbers between 1 and 10, and then had a look at their frequency: 1: 9964 2: 10009 3: 9978 4: 10015 5: 9997 6: 10020 7: 10011 8: 10008 9: 10006 10: 9992 I would say that this is probably close enough to random…
The challenge and the result
So, I was at a CLUG meeting last night, and one of the speakers had a whole bunch of bash scripts for XDM theming. Anyway, he was using a perl script to generate the random selection of the theme elements, and me and my big mouth offered that it could be done in bash itself….
Getting an arbitary item from a list
This script gets the specified element form the list on the command line… #!/bin/bash # Select a specified item from a list. Copyright (c) Michael Still 2002 # Released under the terms of the GNU GPL # $1 is the number to get, $* except for $1 is the list of options, delimited # by…
Getting a random number in bash
This script generates a bounded random number: #!/bin/bash # Generate a random number. Copyright (c) Michael Still 2002 # Released under the terms of the GNU GPL # # (Is it possible to copyright a single line of code?) # To quote from the rand manpage as to why we bound the random number this…
Example of DES encryption code
/****************************************************************************** desex.c, an example of how to use the openssl DES implementation… Data is input on stdin, and the enrypted information is output to stdout. Prompts appear on stderr… This is an example of the Electronic Code Book mode, which is predictable for known input, and is not recommended. Copyright (c) Michael Still 2001 Released…
Example of DES decryption code
/****************************************************************************** desex.c, an example of how to use the openssl DES implementation… Data is input on stdin, and the enrypted information is output to stdout. Prompts appear on stderr… This is an example of the Electronic Code Book mode, which is predictable for known input, and is not recommended. Copyright (c) Michael Still 2001 Released…
DES examples
This page contains some DES example code I wrote in reaction to a crypto tutorial I attended a while ago. I finally got around to putting the code online… The basic point of the code is it shows you how to use the DES calls within openssl. It also shows how the electronic code book…
Graphics programming with libtiff: black and white
My first online article, an introduction to programming with libtiff for IBM DeveloperWorks. [tags: libtiff tiff graphics]
My AOSS III Talk
The slides for my Australian Open Source Symposium talk are now available online. This talk covers Panda, PandaLex, PandaScript, PNGTools, and stuff like that. A historical note from November 2020: these presentations are no longer useful due to their age and are no longer online due to hosting changes.
Initial public release
In line with the maxim “release early, release often”, here is the initial public viewing of my work on pngtools. At the moment, the only command that is implemented is pnginfo, which is pretty much there (apart from the command line options, which are rarely used). I would welcome comments on the code, which can…