Miscellaneous Code Snippets

runon

Just a few lines of C which emulate IRIX' runon command on multi cpu machines running Sun Solaris. runon binds a process to the cpu specified on the command line. For example, the following command would run netscape only on the second cpu (where the first cpu would be 0):

runon 1 netscape http://www.google.de/

Download: runon.c

range2mask

Takes two IPv4 addresses which specify some subnet range as it's arguments and spits out the CIDR network address and netmask. For example, the following command would return "net: 217.197.84.160/29 mask: 255.255.255.248":

range2mask 217.197.84.160 217.197.84.167

Download: range2mask.c

nextssh.sh

Bourne shell script that automagically downloads, patches, builds and installs ZLib 1.1.4, OpenSSL 0.9.7b and OpenSSH 3.6.1p2 on NeXTStep (tested on NeXTStep 3.3). You need, of course, a C compiler installed (tested with GCC 2.5.8), you need Perl (tested with Perl 5.004) and you need Patch (tested with GNU Patch 2.1). Simply download nextssh, have a look at the variables at the top of the script and run:

chmod 755 nextssh.sh
./nextssh.sh

Download: nextssh.sh


Valid XHTML 1.1!  Valid CSS!  Powered by Debian GNU/Linux

Last modified: $Date: 2007/06/16 16:35:50 $ by Holger Weiß