The code contained here consists of a module for manipulating PDF objects (pdf.fs), and a very simple parser for Adobe Font Metrics files and glyph-lists (afm.fs).
This program is a utility which takes host and parasite trees (in NEXUS format), and a link matrix (in CSV format), and generates an input file for the Jane cophylogeny reconstruction software.
Implementing a realtime AFSK receiver in software.
Given the set of all bitstrings of length n with exactly k bits set, you can arrange them in lexicographical order. You can then convert between bitstrings and indices into this list. Can you do this efficiently when n is large and the list is too large to fit into memory?
Rund is a lightweight stand-alone process supervisor for Linux. It takes an ordinary process and makes it into a supervised daemon, with automatic restart, rotating logs, and safe synchronized shutdown and startup. It doesn't require any installation, configuration files or special directory structures.
This document explains how I, with some assistance and quite a bit of background research by Simon Guest at TracMap, got the PowerVR SGX drivers (3_01_00_03) working with Android 4.3 on the Gumstix Overo. What's described here isn't a finished product, but it's enough to get SurfaceFlinger up and running with hardware acceleration.
uFAT is small but feature-complete VFAT/FAT32 implementation. It supports all basic filesystem operations and has minimal memory requirements.
MSPDebug is a free debugger for use with MSP430 MCUs. It supports FET430UIF, eZ430, RF2500 and Olimex MSP-JTAG-TINY programmers. It can be used as a proxy for gdb or as an independent debugger with support for programming, disassembly and reverse engineering.
This document explains how to build, on a POSIX system, a cross-compiling GCC targeting both 32 and 64 bit Windows systems, with C++11 threads support. It uses MinGW-w64.
Although the tslib library is often used on embedded Linux systems for touch-screen filtering, it can be done in a flexible and effective way in just a hundred or so lines of C++. The method described here has been tested on both a resistive touch-screen and a capacitative touch-pad.
This pair of files implement a very lightweight wrapper for the public-domain SQLite3 database library. There are no external dependencies, apart from the SQLite3 library itself.
Some time ago, I implemented a very simple Perl script for the removal of HTML boilerplate (advertising, comments and other clutter surrounding the content on commercial websites). The script is less than 300 lines long, and uses very simple a series of tree-processing algorithms which can be customized and tuned.
This article describes a method of implementing fixed-size bit-queues, or shift registers, for very fast real-time operation. The method described is far faster and more flexible than shifting through multiple machine words.
This package contains portable public-domain implementations of Daniel J. Bernstein's Curve25519 Diffie-Hellman function, and of the Ed25519 signature system. The memory consumption is low enough that they could be reasonably considered for most microcontroller applications. In particular, Curve25519 scalar multiplication uses less than half a kB of peak stack usage.
This package implements a simple and effective shadow-paging scheme for use with NOR flash or EEPROM. It allows small sets of data (such as configuration) to be stored atomically and reliably in the face of power and programming failures.
These are NaCl-compatible primitives optimized for use on small (8 and 16-bit) MCUs. They use a very small amount of stack space, at a modest performance penalty. The implementation is in the public domain.
Dhara is a small flash translation layer designed to be used in resource-constrained systems for managing NAND flash. It provides a mutable block interface with standard read and write operations.
Anuweb is a Totem plugin which provides a simple web interface. Via the interface, you can control playback (play, pause, toggle full-screen, seek, etc.) and browse for files.
A static stack analysis tool for AVR-GCC (but portable to other architectures.
This article serves as an introduction to asynchronous programming, explaining the differences between asynchronous and event-based programming, and describing some basic techniques.
G.H. Hardy's autobiography, has been made available in PDF format by the University of Alberta's Mathematical Science Society. Attempts to convert the document to HTML using tools like pdftotext or pdftohtml yield poor results -- out-of-order text, missing paragraph breaks, unwanted page numbers and inconveniently placed footnotes. By extracting and examining all available typesetting information in a PDF, we can do a better job than this.
Saraswati is a text-mode EPUB reader for Linux. It is fast, small and easy to use.
QR codes are a type of high-density matrix barcodes, and quirc is a library for extracting and decoding them from images.
A summary map is a drop-in replacement for std::map with the additional property that it supports efficient computation of aggregate functions over contiguous ranges.
Katcat is a tool for extracting media files from a Sanyo 6650 CDMA phone (also known as Katana II) via the USB data cable.
Calcudoku is a sudoku-like game invented by Tetsuya Miyamoto (marketed under the trademarked name "KenKen"). This program can be used to examine, print, solve and generate Calcudoku problems of any size up to 16x16.
Many peripherals still use raw UART-based protocols like RS-232 and RS-485, particularly in industrial electronics. Any protocol for communication over one of these serial lines needs to be able to cope with transmission errors and garbage.
This script is a simple tool for managing podcast subscriptions. It doesn't use any global configuration or database. Instead, each subscribed podcast is kept in its own directory, which contains the downloaded media files. This is referred to as a podcast repository.
Often, libraries need to be modified before they can be used in an embedded system. These patches add or fix functionality for specific uses of various popular open source software packages.
There are a lot of FFT-based audio visualizations available, but they usually make the mistake of displaying a raw FFT-based bar graph. This leads to a display which flickers wildly and doesn't appear to move in time with the audio. This problem can be fixed though, with a few simple modifications.
I2C is a popular two-wire serial bus protocol for communicating between devices. Most MCUs support it, so it's a good choice of interface for many chips. This article shows how to implement an I2C slave interface without the use of a bus sampling clock.
This article explains a simple method to quickly estimate the difficulty of a Sudoku puzzle which correlates reasonably well with human estimates of difficulty. It also gives an algorithm which can be used to generate difficult puzzles reliably and efficiently. Source code for an implementation of this algorithm is also provided.
PDM is a method of continuously varying the average value of a digital signal, but without having a fixed modulation period, as in PWM. It allows generation of a time-varying signal in software with less CPU load than an equivalent PWM scheme.
This article describes an enhancement to the B+Tree data structure which enables certain types of summaries to be computed on arbitrary contiguous subsets of a B+ tree in O(log n) time. The time complexities of the usual B+Tree operations for insertion and deletion are not affected, and still run in O(log n) time.