Alex Collins – Blog

Things I'm learning; lessons or otherwise…

A Web front-end for Docker Registry

by atc on June 17, 2014, one comment

I’ve built a grails application for local docker registry installations. It’s called “docker registry web” and is containerized, so simply run the following in a bash shell (assuming docker’s installed): docker run -p 8080:8080 atcol/docker-registry-web and add your registry location and API version and you’re all set up! Easy deleting, viewing and searching of docker […]

Bitcoin Mining with Amazon EC2

by atc on April 7, 2013, 30 comments

My curiosity got the better of me and I decided to start playing with Bitcoins, which inevitably led to mining and then using Amazon’s High Performance Computing EC2 instances to do the brunt of the work. It’s actually very easy to get up and running. Once you’ve found a mining pool — e.g. Slush’s or […]

Automatically lock your Linux machine via bluetooth

by atc on April 2, 2013, 7 comments

I had a requirement to lock my laptop at work automatically without having to touch it. The way devised by a friend was to enable the screensaver and its locking mechanism every time my phone’s bluetooth was out of range i.e. could not be seen via hcitool scan. It works *really well*! Now my laptop […]

Holiday Hack: reading Java class files

by atc on March 24, 2013, 2 comments

I spent a week by the pool in Egypt with my girlfriend, relaxing and…hacking. The lack of WiFi meant I had to rely on instinct and intellect to get me through my pet project and it proved a worthy exercise in problem solving and perseverance… I had the crazy idea of practicing my C programing […]

Hacking with JDK8 Lambda

by atc on March 15, 2013, no comments

So being a functional programming fan I ventured into the JDK 8 binaries and started playing with the myriad of changes relating to the introduction of Lambdas in JDK 8. All my code’s now on github and it’s work in progress, but take a look and contribute/comment if you care to.

The final keyword in Java

by atc on January 16, 2013, 3 comments

Whilst many will frown at the use of the final keyword in Java code, I find it a breath of fresh air. Perhaps it’s that I tend to lean on the side of caution, conservatism and safety when it comes to code: immutability being one of many examples of such. In this post I argue […]

Hackers sit down too much

by atc on August 21, 2012, 2 comments

Being a hacker means one tends to sit down too much. The hunch-backed hacker image complete with screen glow isn’t too far from the truth for some of us. I hate this! We sit so much! So I’ve devised a simple plan for reducing the amount I sit on a daily basis. I picked one […]

Server Backup with Spider Oak

by atc on August 12, 2012, one comment

I’m a SpiderOak fan. It’s secure, easy and well documented. Some really good traits. Their support is fantastic too. After using it on my Laptop, I thought I’d start using it for my Debian server’s backup. It makes sense to use something that bundles encryption and zero-knowledge to satisfy offsite backup. The same client you […]

Clojure’s Concurrency: easy atoms

by atc on August 5, 2012, no comments

Clojure’s atoms let one transactionally and atomically store values. When one uses an atom, Clojure manages the mutation of the value and guarantees atomicity. Such a feature is very useful in a highly concurrent application. Much like Java’s Atomic* classes, but somewhat more powerful. This is a brief introduction. Atomic Values To define an atom, […]

Clojure’s Concurrency: Futures and Agents in Harmony

by atc on July 29, 2012, no comments

I’ve previously written on the wonders of Clojure’s agents, giving the programmer a wonderfully easy way of writing asynchronous code with very little effort. Here’s a slightly more complex example for those wanting more context. Combining Futures and Agents We’ll use this (deliberately poor) inefficient find-primes in a (future) to allow for asynchronous processing in […]