RSSAmplifier

Blog

The Journals of Tarn Barford

Infrequent blog posts

tarnbarford.netRSS feed ↗104 posts

Latest posts

debugProxy

Tarn Barford From the Journals of Tarn Barford debugProxy Nov 02, 2023 debugProxy was a project I worked on with David in 2017, I hosted and supported the service at debugproxy.com for several years. I did a "Show HN" thread when we released it which was on the front page for a few hours, this gave us plenty of initial users. Despite it working quite well once setup, configuring devices to use it…

Creating Debian virtual machines

Tarn Barford From the Journals of Tarn Barford Creating Debian virtual machines Oct 27, 2023 Creating virtual machines is one of the few things in my personal computer infrastructure I don't configure directly with Ansible. However, I have tried to make the process as fast and simple as possible. For generic Debian based virtual machines, I base new virtual machines off a base disk image . I shell…

Building a Debian 12 base image

Tarn Barford From the Journals of Tarn Barford Building a Debian 12 base image Oct 27, 2023 I need a new Debian-based image to create new virtual machines since the old one is now two major versions out of date. I previously created the base images using a script that creates a disk image, mounts it as a block device and installs Debian with debootstrap. This process is somewhat tricky because it…

Building NixOS qcow2 images with flakes

Tarn Barford From the Journals of Tarn Barford Building NixOS qcow2 images with flakes Sep 25, 2023 I've been thinking again about using NixOS to build bootable disk images I can run on a remote qemu/KVM host. I worked out how to build bootable qcow2 disk images a few years back, which still seems to work, but I wanted something that worked with flakes which I've since adopted. I initially found a…

Using libvirtd VNC Remotely

Tarn Barford From the Journals of Tarn Barford Using libvirtd VNC Remotely Sep 20, 2023 Continuing on this foolish path to manage some virtual machines on a remote host with TLS and peer authentication , here I'm going to configure VNC. The trick here is we're really configuring qemu not libvirtd as qemu itself provides the VNC server. On my Debian system the default configuration file is…

Using libvirtd Remotely

Tarn Barford From the Journals of Tarn Barford Using libvirtd Remotely Sep 18, 2023 I have a headless server running libvirtd with a KVM / qemu backend and I wanted to securely connect to it with virsh and virt-manager on my laptop. There are several ways to do this , I decided to try TLS with a private PKI for transport encryption and peer authentication. I wrote a script to generate a…

Securing TCP Sockets with TLS

Tarn Barford From the Journals of Tarn Barford Securing TCP Sockets with TLS Sep 14, 2023 Using a simple private Public Key Infrastructure (PKI), plain TCP sockets can be secured with TLS. This can be demonstrated with trivial examples that run locally on a loopback device. A simple echo TCP socket server that listens on port 7000 can be created with socat . $ socat PIPE TCP-LISTEN:7000,fork When…

Simple Private Public Key Infrastructure

Tarn Barford From the Journals of Tarn Barford Simple Private Public Key Infrastructure Sep 14, 2023 In this private Public Key Infrastructure (PKI) a secret key and a self signed certificate pair is the Certificate Authority (CA) root. The CA can sign certificates containing identity information with its secret key. Anyone can verify a certificate was signed by the CA using the CA root…

Linux One-Liner for Monitoring File Changes

Tarn Barford From the Journals of Tarn Barford Linux One-Liner for Monitoring File Changes Sep 10, 2023 A Linux one-liner to run a command when a file in a directory tree is created, modified or deleted. Uses inotifywait from the inotify-tools package. while inotifywait -e modify,create,delete -r .; do echo "file changed"; done This is easy but annoying to look up. When I asked an LLM, it omitted…

Static virtual bridge IP addresses with DHCP

Tarn Barford From the Journals of Tarn Barford Static virtual bridge IP addresses with DHCP Nov 27, 2018 It's sometimes desirable to be able to specify a static IP address for a virtual machine that is using a virtual network bridge. For example, this can be useful when you have additional iptables rules for a specific virtual machines on the host. With libvirt networks, one way to do this is by…

Virtual bridge networking with libvirt

Tarn Barford From the Journals of Tarn Barford Virtual bridge networking with libvirt Nov 26, 2018 The virtual bridged networking provided by libvirt is the easiest way to enable networking on KVM virtual machines. In most cases it should be as simple as starting the default network and specifying the network when defining new virtual machines. The default libvirt network creates a virtual bridge…

Cheap root servers from Hetzner auctions

Tarn Barford From the Journals of Tarn Barford Cheap root servers from Hetzner auctions Nov 25, 2018 I rent a couple of root servers from Hetzner that run various services I host. You can rent standard and custom configurations but these have an initial setup cost and setup time. For impatient hobbyists like myself, Hetzner also allows you to rent unused servers from their server auctions . These…

Techbikers 2016 and World Bicyle Relief

Tarn Barford From the Journals of Tarn Barford Techbikers 2016 and World Bicyle Relief Jun 13, 2016 On July 1st, I will join Techbikers Germany for a charity bike ride from Poznan to Berlin to raise money for World Bicycle Relief . The ride relies on donations, so I hope to explain why the ride is important to me, that the charity is not only a good cause but also effective, and hopefully convince…

Cross-compiling with Rust

Tarn Barford From the Journals of Tarn Barford Cross-compiling with Rust Dec 29, 2015 I found a guide for cross-compiling Rust which basically involves configuring it with a --target option. The target needs to include the cross-compile target and the host target. $ wget https://static.rust-lang.org/dist/rustc-1.5.0-src.tar.gz $ tar xf rustc-1.5.0-src.tar.gz $ ./configure --target =…

Building Linux and BusyBox for ARM and emulating it on QEMU

Tarn Barford From the Journals of Tarn Barford Building Linux and BusyBox for ARM and emulating it on QEMU Dec 27, 2015 Cross compiling a minimal Linux sytem for the ARM architecture and emulating it in QEMU. Almost all the information from this and my previous post can be found in this nice tutorial by Kamel Messaoudi, which also includes debugging user programs. I'm posting my notes as I go…

Compiling an arm-unkown-linux-gnueabi toolchain with crosstool-ng

Tarn Barford From the Journals of Tarn Barford Compiling an arm-unkown-linux-gnueabi toolchain with crosstool-ng Dec 27, 2015 Building an arm-unkown-linux-gnueabi GNU cross-compiler toolchain using crosstool-ng in order to compile code from an x86_64 GNU/Linux system to an ARM GNU/Linux system. Building cross-compiler toolchains is complicated and in some cases using a prebuilt one might be…

Securing my Raspberry Pi backup server

Tarn Barford From the Journals of Tarn Barford Securing my Raspberry Pi backup server Jul 30, 2015 I run my own email server, ownCloud server, this blog and git server on a VM running on a physical machine we rent from Hetzner. I depend on not losing data from these servers so I setup my Raspberry Pi as a backup server. Here are some thoughts on how I have tried to secure everything, perhaps it is…

How I delivered a million spam emails

Tarn Barford From the Journals of Tarn Barford How I delivered a million spam emails Jun 02, 2015 I've been running my own personal mail server for almost two years. On Friday May 15, I tried to send an email and immediately received a undeliverable mail response from my mail server. This is the mail system at host tarnbarford.net. I'm sorry to have to inform you that your message could not be…

Packaging a Flask Application

Tarn Barford From the Journals of Tarn Barford Packaging a Flask Application Sep 09, 2014 Packages are not very exciting but the only sane way to deploy. I've tried to git clone and make install on the servers with Puppet , that was silly. It's about time I learnt how to build packages. I run a few Flask applications (including this site) that I would like to package for Debian linux, so packaging…

Running of the Bulls

Tarn Barford From the Journals of Tarn Barford Running of the Bulls Aug 17, 2014 I'm going to Scoopcamp for the hackathon again this year as I had a lot of fun last year. I'm joining the Henri-Nannen-Schule team who to want to make some news games. To help ensure I can help with their ideas and not get bogged down in boring technical details, I decided to have a look at what tools, resources,…

Chess

Tarn Barford From the Journals of Tarn Barford Chess Apr 20, 2014 This week's post is a playable chess engine that runs in modern browsers that have support for websockets. The engine is my fork of the chess-at-nite engine which is written in C++. The engine is compiled with clang to LLVM byte code and then to asmjs with Emscripten . The engine runs in a web worker and the UI is built with a…

Haste Web Workers

Tarn Barford From the Journals of Tarn Barford Haste Web Workers Apr 13, 2014 This week I learnt of Haste , a Haskell to Javascript compiler intended to be used to build web applications. I have been trying to learn Haskell as a side project for a while and have previously looked into options for compiling it to Javascript . I was very happy that after a little playing around I was able to get an…

Swipe Keyboard

Tarn Barford From the Journals of Tarn Barford Swipe Keyboard Apr 06, 2014 When I first tried a Swype keyboard I was impressed how effective it was. Even though I don't use the feature on my phone I was interested in how it could be built, so I implemented this otherwise useless swipe-able keyboard below. It probably doesn't work on mobile devices, but works on modern browsers with mouse pointers…

Mozilla Persona

Tarn Barford From the Journals of Tarn Barford Mozilla Persona Aug 10, 2013 I added the ability to sign into this site to comment with Mozilla Persona . Not that I'm expecting people to use it, I've only had a handful of genuine comments since I started the site some years ago. I was just interested in trying it out, which is why I have this site. It was pretty straight forward as I already only…

Prague to Berlin

Tarn Barford From the Journals of Tarn Barford Prague to Berlin Aug 08, 2013 On July 26-28 I joined 32 other entrepreneurs, VCs and engineers to cycle from Prague to Berlin and raise money for dotHIV . It all started on Thursday a week before; our communications manager, Agnes, emailed me a link to the techbikers.de site and made some joke about how I should do it on my hipster bike. Very funny,…

PGP/GPG

Tarn Barford From the Journals of Tarn Barford PGP/GPG Aug 06, 2013 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I just learnt how to use PGP/GPG to sign messages, encrypt message for people and decrypt messages encrypted for me! If you haven't learnt about PGP yet, maybe you should. It's fun, easy and very useful if you want some Pretty Good Privacy. -----BEGIN PGP SIGNATURE----- Version: GnuPG…

Setting up a pair programming environment on Amazon EC2

Tarn Barford From the Journals of Tarn Barford Setting up a pair programming environment on Amazon EC2 Apr 01, 2012 Arch Linux is a great distribution for a programming environment and there is an Arch AMI for Amazon EC2 . I choose to run it on a Large EC2 instance in Tokyo, I downloaded the generated key-pair and copied its public domain name. Connecting to the instance The EC2 security group…

vim-slime

Tarn Barford From the Journals of Tarn Barford vim-slime Mar 26, 2012 Today I found the awesomeness that is vim-slime , it's been an exciting day for me. Slime is the "The Superior Lisp Interaction Mode for Emacs", I can almost hear the emacs crowd laughing. For those that use vim and haven't used Slime, vim-slime or something similar , this is why it's awesome: Text can be sent from any process…

UHC: Haskell to JavaScript

Tarn Barford From the Journals of Tarn Barford UHC: Haskell to JavaScript Feb 05, 2012 If all goes well some JavaScript included on this page should have generated a list of all the primes numbers between 1 and 100 and printed them below. To generate these primes I wrote simple Primes module. module Primes where factors :: Int -> [ Int ] factors n = [ x | x <- [ 1 .. n ], n ` mod ` x == 0 ] prime…

Basic long polling chat with Manos de Mono

Tarn Barford From the Journals of Tarn Barford Basic long polling chat with Manos de Mono Jul 22, 2011 I fucking love the Manos do Mono manifesto . It has very grand ideals and a philosophy of simplicity which I really dig, it is also excellently illustrated with pictures of cats. I've wanted try it since listening to Jackson Harper talking about it on a Herding Code podcast last year . Installing…

Play by Play with Zed Shaw

Tarn Barford From the Journals of Tarn Barford Play by Play with Zed Shaw Jul 11, 2011 I watched the Zed Shaw episode from the Peepcode "Play by Play" series last night. Each episode in the series follows a different gun programmer doing their stuff solving a problem. Like "Coders at work" it has some interesting insights into how people go about it. I became interested in Zed after reading his…

Actor Model

Tarn Barford From the Journals of Tarn Barford Actor Model Jul 01, 2011 A couple of months back Andrew Bienert organised a Melbourne Alt.NET meeting on functional programming . Andrew Browne and myself put our hands up to do mini talks on Scala and Erlang and Andrew Bienert was keen to talk about F#. A few days before the meeting was originally scheduled Andrew Browne and I caught up on Skype to…

Cube

Tarn Barford From the Journals of Tarn Barford Cube Jun 30, 2011 WebGL has recently seen extra attention caused by banter between the major browser players, which seems to becoming pretty common. Microsoft called it harmful , a developer from Mozilla raised an issue on Microsoft's connect showing the same risk in Silverlight 5 and Opera and Google bloggers weighed in . This week it seems to be…

Tile Land

Tarn Barford From the Journals of Tarn Barford Tile Land Jun 18, 2011 I was originally trying build an effect that pans and rotates around an infinite world of repeating background images. To do this I was using an image the size of the viewing area, of course to panning around will often require drawing parts of several images. If we are panning along the x and y axis we will need to display, at…

Asteroids

Tarn Barford From the Journals of Tarn Barford Asteroids Jun 13, 2011 As threatened , Asteroids! Sorry, you need a browser that supports canvas to play. You should probably upgrade anyway, you're missing out. Update: You don't need coins, you can press [f] to start. Apparently I should have made that more clear. Sorry no sounds, shields or extra weapons, there are already other good asteroid games…

Canvas Transforms

Tarn Barford From the Journals of Tarn Barford Canvas Transforms Jun 04, 2011 I've been playing with HTML canvas transforms and have had to brush up on how transforms work. It's really just matrices math; eigenvalues, dot products, triple products etc. I should know this stuff pretty well as it was extensively covered in my Engineering undergrad studies and I've previously played with them to do…

Fridge Magnets and the GAE Channel API

Tarn Barford From the Journals of Tarn Barford Fridge Magnets and the GAE Channel API May 15, 2011 Fridge magnets have been my playground web application while learning Erlang. The basic idea is some letters which you can drag around to form words or whatever. It is made a little more interesting as users all use the same set of letters, and so users see letters being moved by other users. The…

Old school, for fun

Tarn Barford From the Journals of Tarn Barford Old school, for fun Apr 23, 2011 I used to love 4k demos and I learned to program in Pascal, C and Assembler trying to implement effects like this. Good times. It appears your browser doesn't support canvas. That is quite sad, you should get one that does. Questions, comments, suggestions? Email me, tarn@tarnbarford.net ( public key )

Oh, Screen. Where have you been?

Tarn Barford From the Journals of Tarn Barford Oh, Screen. Where have you been? Jan 08, 2011 So GNU Screen has been around for a while (initially released in 1987!), but it was only recently at Yow! Brisbane 2010 that @rioter kindly suggested I check it out. For the last year or so I've used Linux exclusively for my personal computing where I play with a little Python, Ruby, Lisp, JavaScript and…

Selenium on a Windows CI Server

Tarn Barford From the Journals of Tarn Barford Selenium on a Windows CI Server Oct 15, 2010 I've been wanting to post about using Selenium and TeamCity to build and test .NET websites on Windows for a while. Unfortunately it hasn't been forthcoming as I only really use Windows/.NET at work these days. I decided I would get my shit together today and write, what may be my last post on .NET for a…

RxJs - Capture

Tarn Barford From the Journals of Tarn Barford RxJs - Capture Aug 15, 2010 This is the presentation for Composing Events with RxJS an Alt.Net Melbourne Lightning Talk . An observable that yields for every capture click after the start button and before the stop button has been clicked. // Setup observables var buttonStart = $ ( "#buttonStart" ). toObservable ( "click" ); var buttonCapture = $ (…

RxJs - Merge

Tarn Barford From the Journals of Tarn Barford RxJs - Merge Aug 15, 2010 This is the presentation for Composing Events with RxJS an Alt.Net Melbourne Lightning Talk . An observable that yields when either button is clicked // Setup observables var button1 = $ ( "#button1" ). toObservable ( "click" ). Select ( function () { return "Button 1" }); var button2 = $ ( "#button2" ). toObservable (…

RxJs - Zip

Tarn Barford From the Journals of Tarn Barford RxJs - Zip Aug 15, 2010 This is the presentation for Composing Events with RxJS an Alt.Net Melbourne Lightning Talk . An observable that yields and event for consecutive clicks. This can be useful when the change since last event is required. // Setup observables var button1 = $ ( "#button1" ). toObservable ( "click" ). Select ( function () { return…

Composing events wit RxJs

Tarn Barford From the Journals of Tarn Barford Composing events wit RxJs Aug 15, 2010 This is the presentation for Composing Events with RxJS an Alt.Net Melbourne Lightning Talk . *** Reactive Extensions *** Reactive Extensions for JavaScript. There is also Reactive Extensions for C#. Reactive Extensions come from Microsoft Labs. *** What is IEnumerable? *** Provides Enumerator, allows lazy…

The Mouse is Dead, Long Live the Keyboard

Tarn Barford From the Journals of Tarn Barford The Mouse is Dead, Long Live the Keyboard Jun 16, 2010 First up a disclaimer, this is how I like to role. I enjoy it. I'm not saying you shouldn't use a mouse or I'll never use one again. I spend a lot of time programming on my netbook development environment because I enjoy it. Without all the visual tooling I feel can focus on working with the…

Revisiting dragging and inertia with RxJs

Tarn Barford From the Journals of Tarn Barford Revisiting dragging and inertia with RxJs Jun 07, 2010 This is my first look at RxJs the Reactive Extensions for Javascript . The demo isn't remotely useful or practical but it was complicated enough to get a feel for a range of Rx constructs and how they can be used in the Javascript language. The excellent articles by Matthew Podwysocki at…

Map-Reduce on Mongo

Tarn Barford From the Journals of Tarn Barford Map-Reduce on Mongo May 12, 2010 I'm doing a presentation on non-relational databases at DDD Melbourne this weekend where I am going to demonstrate a map-reduce example with MongoDB and server side Javascript. I've been interested in both independently recently and it's been fun getting them to working together with some Javascript TDD to boot. I…

DevEvening NoSql/MongoDB Presentation

Tarn Barford From the Journals of Tarn Barford DevEvening NoSql/MongoDB Presentation Apr 07, 2010 The slides and demo I'll show in my NoSql presentation for tomorrows DevEvenings Melbourne ORM Smackdown. I hope to take the time and write a more considered post of my findings and opinions as I've found it very interesting. Here is a link to the slides . First I'll use some Python and the PyMongo…

Scraping this blog

Tarn Barford From the Journals of Tarn Barford Scraping this blog Mar 18, 2010 I have created a monster and this post is about killing it off by scraping the contents of this blog into structured Python objects. Sometime later I will convert the HTML content to markdown and download the images and other resources locally. I want to put the contents into a ZODB object database to get a feel for…

OMG. It's a JavaScript Rhino

Tarn Barford From the Journals of Tarn Barford OMG. It's a JavaScript Rhino Mar 17, 2010 JavaScript is a slightly flawed language but it's got elegant parts too. All languages do to some degree, it's just JavaScript seems to have both in extremes. Whatever you think of it, history has made it the language for scripting the client-side web. It has become a mainstream language that shows no sign of…