Click Technology Linux, Windows, Macs – it's all good!

Open source file sharing..

January 25

Happy New Year to all. Here’s to a great New Year! Really! 🙂

This is pretty awesome. I just found a piece of open source file sharing web software called Bozon for when you want to host your own web files, but just make it simple and not have any admin overhead. Once running, all you need to do is upload the files you want to share to your server and then email the link. It’s that simple. Setup takes about five minutes, end to end.

To install Bozon, on your Linux box, assuming you have apache or nginx running and in operation, just do this..

cd /var/www
sudo su
git clone bozon

It pulls the git repository down. If you need to install git, it’s just sudo apt install git.

[sudo] password for username:
Cloning into 'bozon'...
remote: Counting objects: 1478, done.
remote: Total 1478 (delta 0), reused 0 (delta 0), pack-reused 1478
Receiving objects: 100% (1478/1478), 1.95 MiB | 567 KiB/s, done.
Resolving deltas: 100% (783/783), done.

You now have /var/www/bozon/ with all the relevant files therein. Set the privs.

sudo chown www-data -R bozon/

Now link to this directory from your server. Let’s say you have a site structure like this and you want to put bozon in site03.

|-- var
     `-- www
     |-- bozon
     |-- site01
     |-- site02
     |-- site03
     |   |-- images
     |   |-- code
     |   |-- js
     |   `-- html
     `-- site04

Lets add a link.

cd /var/www/site03
sudo ln -s /var/www/bozon/

Right, that should be everything. Install is complete. Surf to and create a first time user and just begin using it. Upload the files you want and when they upload, click the link share icon to reveal the URL to the file. Mail your friends the link. Simple.

Naturally, you are strongly advised to use https for reasons that should be fairly obvious.

First post best post.

Linux Tips  |  Comments Off on Open source file sharing..

Programming Best Practices Tidbits

October 21

While writing some Python code to calculate PAYE and publish it to GutHub, I found this absolutely awesome set of advisory snippets that have really enlightened me on the crux of development work.


Linux Tips  |  Comments Off on Programming Best Practices Tidbits

Which version of Linux am I running?

June 15

How many times have I tried to find out _exactly_ which version of Linux I’m running when installing something?  I either get the kernel version (no good for adding debs etc) when I want to find out what the Debian underlying codename is and so on. Here then is the solution. All of it.

uname -a && cat /etc/*release
Linux Tips  |  Comments Off on Which version of Linux am I running?

Happy Ed Balls day

April 28

Happy Ed Balls day

General  |  Comments Off on Happy Ed Balls day

UK postcode regular expressions

March 17

I found these two regexps expressions for UK postcodes today. The first is check if the number and letter sequence is correct. I’ve modified it slightly to look for one or two spaces between the groups of letters and numbers. Worked pretty well under PCRE. Noice. The second regex is to validate the postcode in its entirety. It worked for all the postcodes I had, but this is a constantly changing situation.

Just the basics – format is valid?

Here it is and requires the g(lobal) switch.


Sample data…

UB11 1FW
This is a B73 6AZ postcode
WF16 0HL
London too, EC2A 2BB, nice.
RG21 4EA
BA15 1AJ
AB10 1XL

And a PHP snippet of the above..

    $re = "/([A-Z]{1,2}[0-9][0-9A-Z]?\\s{1,2}?[0-9][A-Z]{2})/"; 
    $str = "BA2 3BH\nUB11 1FW\nCR0 4ZS\nThis is a B73 6AZ postcode\nSW1E 5JD\nLS1 2JZ\nW1W 8AG\nWF16 0HL\nLondon too, EC2A 2BB, nice.\nRG21 4EA\nBA15 1AJ\nCB4 0FW\nEC4M 9HH\nAB10 1XL\nEH2 2BY\nEC4M 9HH\nEH2 2BY"; 
    preg_match_all($re, $str, $matches);

Full Monty – Postcode itself is valid?

This regexp should be able to validate most postcodes. Worked well on all the data I had.


And here then is the code snipped in Python, the most flexible scripting language there is. By far.

    import re
    test_str = u"BA2 3BH\nUB11 1FW\nCR0 4ZS\nB73 6AZ\nSW1E 5JD\nLS1 2JZ\nW1W 8AG\nWF16 0HL\nEC2A 2BB\nRG21 4EA\nBA15 1AJ\nCB4 0FW\nEC4M 9HH\nAB10 1XL\nEH2 2BY\nEC4M 9HH\nEC4M 9HH\nEC4M 9HH\nEH2 2BY\nEH3 7NS\nEH3 7NS\nCB22 3AT\nGU2 7AH\nEC1M 6EH\nRG10 9NN\nSL4 1BE\nKT10 9AD\nW1W 8DH\nBA1 5BB\nTN4 8BS\nCF10 2EH\nCW7 3RT\nW1U 6HP\nEC2N 2AN\nW1W 7PA\nEC3A 7NH\nGU6 8TB\nB60 4JE\nW1S 2LG\nG2 7JS\nRH6 0PA\nWF5 0AN\nHA1 1BQ\nEC2R 7AF\nEC2R 7AF\nEC2R 7AF\nEC2R 7AF\nRG1 1AX\nWC2R 1DJ\nW1J 0DW\n"
    re.findall(p, test_str)

By the way, some awesome regex testing websites are…

Linux Tips  |  Comments Off on UK postcode regular expressions

IT summarized

March 16

I sometimes feel like information technology is just exactly like this.

View post on

There’s loads of great (open source) software out there but connecting it together to streamline it and thence make it really effective is the killer.

General  |  Comments Off on IT summarized
« Older Entries

I used to run Click Technology from 1995 to 2010.  Now no longer, I maintain the site with things I find interesting or are noteworthy or have some handy-tip value.