Secure Docker ambassador

As part of my work at Sojourn Labs (more about this at a later time), I’ve recently been working with creating a secure private cloud based on CoreOS, Docker (basically, a lightweight virtualization system), and some decade-old (or older) hardware. Different applications within the cloud need to communicate with each other securely. For example, our wiki needs to communicate with our database server. To link two Docker containers on the same machine together, one need only instruct Docker to create a link between the two. Things get more interesting when the communicating containers reside on different machines.

Continue reading “Secure Docker ambassador”

ScoutFS: Choppy LAN videos begone!

Have you ever tried playing a video from your local network using software such as VLC or MPlayer and had the video stop every few seconds? I have a solution (currently only available on Mac)! ScoutFS is a file system that will pre-fetch data to avoid this locking-up. Once a network share is loaded (or, indeed, any file system including a DVD or your own hard drive), ScoutFS creates a read-only copy of the drive in memory from which you can open the files without the choppy playback. Once it’s installed (I hope a fairly straightforward process), just drag a folder or disk onto the application in your /Applications folder and load the file from the newly mounted disk!

I will be working on a few more iterations of this software over the next week or so. Hopefully I will have this running on Linux machines soon. Check it out at!

Inflo macros

Last week, I added support for client-side macros to Inflo. While I had previously reengineered the custom autocomplete widget (used for entering content) in anticipation of additions such as this, I hadn’t really thought about how the macros would actually work. In the end, I was surprised at how simple it was to add, although some of my previous changes were helpful (most notably the parser I had written the day before); it took just under one hundred lines of new/changed code. Also nice is how everything is falls back when a macro hasn’t been defined.

    "stopping time", // Name of the macro
    "stopping time ( <i>velocity</i> , <i>deceleration</i> )", // Autocomplete help
    // The function itself; its parameters come in directly from Inflo and one needn't worry about nodes;
    // they're automatically converted to their values.
    function (v1, decel) {
       /* Assumes velocity in m/s and deceleration is in m/s^2 */
       return (v1 / decel).toString() + " s";

The macros behave exactly like a built-in Inflo function, except they’re all currently prefix notation, don’t support sub-expressions in their arguments, need to be user-loaded when viewing the graph (easy with Creammonkey and Greasemonkey), and, for simplicity, ignore units coming into the macro. Anyone that knows some Javascript can write an Inflo macro!

Atomic conditional inserts with complex conditions

I was going to blog about the software I’m currently writing, but that’s not happening, yet (although it’s been beta-test-ready for about a week and, given that I’ve made just under 100 subversion larger-than-ideal check-ins in the last seven days, it’s been getting refinements literally almost by the hour).  Instead, I’m going to share a little trick I came up with to do atomic conditional insertions into a database without using triggers or conflicts.  Indeed, I’m using little old sqlite3, so there’s nothing fancy going on in this database at all.  Sure, the software I’m currently working on is probably going to be open sourced at some point, but this would just get buried in there.

Continue reading “Atomic conditional inserts with complex conditions”