| ||||||||||||
Scripts and Source CodeIntroductionI've written quite a lot of bits of software: this page collects them in one page. Linux Utilities:
Hardware control:
Physics PhD:
Fun stuff (toys):
Odds and Ends (one-off hacks):
All of this is Free Software, which you are welcome to use, repackage and distribute. It's mostly GNU GPL v3+, though some are GPL2 or GPL2+; check the relevant README. Linux Utilitieshelp_to_man (generate man pages from -h)Introduction: Manpages are really important and frequently neglected. This script makes it really really easy to automatically generate well-formatted man pages in your Makefile. This is an "improved" version of help2man. Download: help_to_man has the full details, an example, and a howto. cn (a trashCaN script)Introduction: How many times have you typed 'rm somefile', and then wished you hadn't? Do you want something more helpful than merely the advice to keep regular backups? Download: cn-1.21.tar.bz2, then untar, make, sudo make install. Invoke as cn and see man cn. Update: you can achieve almost the same effect by adding this line to your Hardware ControlPulseBlasterIntroduction: this is a driver, utilities, and parser for the SpinCore PulseBlaster digital timing PCI device. The PulseBlaster can drive 24 TTL lines with very high precision with pulse lengths from 90ns to 2 years. Download: full details are here. NI 4462Introduction: The National Instruments NI4462 is a 4-channel 24-bit 200 ksps data-capture device. Here's how to drive it in C under Linux. Data-capture code and lots of experimental notes. Download: full details are here. Arduino delayIntroduction: This is the interface between the Linux command-line and some hardware (a variable-length FIFO delay-line) via an Arduino. Download: full details are here. FTDI245 moduleIntroduction: the DLP-USB245M module is a USB 8-bit parallel port, which can be bit-banged from Linux. (Most of the work is done by libftdi). Download: full details are here. QuickUSB moduleIntroduction: the QuickUSB module is a fast USB 2.0 16-bit parallel-port (with additional GPIO). This is a kernel driver to drive it from Linux. Download: full details are here. Physics PhDMathsIntroduction: some Python programs to plot data to graphs: dataplot, fftplot (does FFT) and linregplot (does OLS linear-regression). Download: full details are here. IRCameraIntroduction: These are control utilities for my PhD camera (not widely useful elsewhere). Download: full details are here. Cam2TiffIntroduction: convert the .cam format to a .tiff file (may be useful as an example of using libtiff). Download: full details are here. FilterctlIntroduction: control the filterwheel in a dewar (purely for documentation of my PhD camera system, no use to anyone else!) Download: full details are here. Hawaii simulationIntroduction: simulate the Hawaii sensor (purely for documentation of my PhD camera system, no use to anyone else!) Download: full details are here. Hawaii sensorIntroduction: characterise the Hawaii sensor (purely for documentation of my PhD camera system, no use to anyone else!) Download: full details are here. Fun stuff (toys)Mealtime announcer (Dinner Dog Daemon)Introduction: What do you get when you cross a Raspberry Pi with a Bliso, and a smartphone? Answer: a wireless desktop gadget that announces when meals are ready. This complete project was originally designed as a birthday gift; now you can make your own... Download: dinnerdog describes the project, with photos, and the source-code. Odds and Ends (one-off hacks)rio-playlist-fix.sh - fix the playlists for a Rio KarmaIntroduction: The otherwise excellent Rio Karma music player has a bug in playlist handling causing it to look in the wrong directory. Download: rio-playlist-fix.sh then chmod +x and run it. Read the source first: it's straightforward, but it does hardcode "MUSIC_DIR" in the script, and it assumes that you do not have spaces in any of your filenames. adsl_watchdog.sh - automatically reboot a router via the telnet interfaceIntroduction: The Comtrend Nexuslink 5631 (line bonding ADSL router) can get stuck; it's useful to monitor and automatically reboot it. The problem is explained here. Download: adsl_watchdog.sh then change the "ROUTER_PASSWD" value, chmod +x and run it.
To invoke it from cron, add a line such as this to your crontab: | ||||||||||||
|