Openmediavault (omv), squid3 and webmin

July 7, 2017 Comments off

Need a proxy in addition to OpenDNS for kids to provide some additional parental control.

1) Install webmin as per latest instructions. Webmin has “unused plugin” for squid3. Check it runs on http://localohost:10000. Edit /etc/webmin/config to allow for unknown referers if you get xss warnings in the UI – “referers_none=0”

2) Install squid3. I had to chown proxy:proxy on the cache dir I wanted and add it to the cache config. (not essential). Edit /etc/squid3/squid.conf

#allow localnet access
 http_access allow localnet
 acl localnet src
 #allow webmin access
 acl SSL_ports 10000
 #add blacklisted URL keywords reference file
 acl blockkeywords regex_url /etc/squid3/keywords.txt
 #add MAC addresses to apply to
 acl sysmacs arp /etc/squid3/mac_addrs.txt
 #combine keywords and MAC for denial
 https_access deny blockkeywords sysmacs

Now, restart (sudo service squid3 restart) or apply the config in webmin.

3) Test – you should get a squid3 access denied page when you use your keywords on the machines with the configured MAC addresses. If you have trouble, back things out and start to test one-by-one. Dont forget to add the proxy config to your browser, or the wifi connection in android (long press -> modify ->manual proxy config).

Categories: technology

KDE Plasma 5 Icons

March 4, 2017 Comments off

Or launchers, or applications, or shortcuts.

As a reminder to myself, to add an application shortcut to your desktop (not a folder view) you can either

  1. drag from Dolphin to the desktop
  2. Right click the application (K) launcher -> Edit Applications. Choose a category to put your shortcut in then click “New Item” from the toolbar and fill in the details. Save.
  3. Now, back in the K menu, you should see your new application menu item.
  4. Right click and choose add to Desktop

If you want to move or resize your new icon, do a long-click on it until you get the KDE icon widgets showing you on the right hand side.

Bit of a palaver….

Categories: technology

Pineapple and Sweetcorn Ketchup

February 11, 2017 2 comments

Maybe not a ketchup, maybe a relish, maybe something else pasty and tasty !

(You’ll be swizzing at the end so dont bother with the extreme chopping or fake mortaring.)

Salt, chili, garlic, pineapple, sweetcorn kernels, star anise, water, sugar.

Saute salt and garlic to taste. Add a chili – I used a red one, and should have used a half instead I think, but I like it hot – don’t you?

Add pineapple and sweetcorn – I started with equal parts but added more sweetcorn in the end. Some water, or if you are using canned pineapple like I was (that Hawaiian pizza was nice too), add some juice. If not, I suppose some sugar might be good (white not brown or you’ll be overwhelmed. Add a star anise. Simmer until soft, and then some. Swizz a lot with your handheld swizzer.



Categories: food and recipes Tags: ,

Don’t shallow fry Falaffels

January 30, 2017 Comments off

Because they crumble and die…..

Categories: food and recipes

Firefox sync limits

January 30, 2017 Comments off

Firefox on mobile seems to have a hard limit on the number of URLs it will sync. So, I have to dedupe and test my thousands of bookmarks somehow. A previous Check Links plugin has stopped working, and with the move to WebExtensions probably won’t be updated again. Nothing else in the add-ons store seems to meet the bill so I am going to have write some code. Makes a welcome change from the day job….

Sync docs seem a little behind the times too.

Thought I’d tackle it by exporting and manipulating the bookmark files as json and then re-importing, but the data is a bunch of nested children, immutable, and not all are bookmarks. After some coding it all starts to get a bit messy. Surely there is an easier way? Eh, probably: For a hint at accessing Firefox sqlite database see [] and for the sqlite bookmark schema see []. 

The schema keeps changing it seems, and “tags” don’t seem to be in the tables any more (even tho they still exist) .  I seem to have lots of triplicate entries in moz_bookmarks too. And Sqllite doesnt support sensitive type or concurrent connection types, so it looks like a case of going through each entry in moz_bookmarks (17000 odd), checking/pinging each URL, recording the id of each fail and then using a preparedStatement to delete these rows. Better make a backup first!

Code on Github at Depends on another project alink-utils (with Mockito, Powermock tests). Tests for bookmark checker are a WIP for now, as is documentation.

Categories: technology

Boonex Dolphin – non default port

November 19, 2016 Comments off

Not using port 80 on my install and want to change to another – eg 8888 – for https/ssl/tls access. Support forums say change $site[‘url’] in to https from http – but the port number is also hardcoded in the redirect url config where it sets the Location http header, further down the config file. So for now, I have changed this to also hardcode the port to 8888 instead of 80.

if ( isset($_SERVER[‘HTTP_HOST’]) and 0 != strcasecmp($_SERVER[‘HTTP_HOST’], $aUrl[‘host’]) and 0 != strcasecmp($_SERVER[‘HTTP_HOST’], $aUrl[‘host’] . ‘:8081’) ) {

To get modules to install I also had to chmod 775 the lot !

Categories: technology Tags: ,

Parsing m3u file for curl checks using AWK

July 28, 2016 Comments off

I recently had reason to make use of an m3u playlist file for an IPTV device. I found one on, a great resource for all kinds of sat and IPTV issues. IIRC I came across this after finding a post about a plugin at

In any case the m3u file contained lots of links to IPTV stations that were no longer available of not responding anymore so I wrote an awk script to parse the m3u and based on an expression execute and action that was a system() call. AWK is a great tool to use search expressions and logic on records in files but is a PITA to debug – and my other attempts at using getline didnt help either. M3U files are a sequence of paired records which makes grep and shell scripting innappropriate I think (which I did try firstly) and awk seems a better way, even if it needs a bunch of calls out to another process/shell.

See my post on for more ( but heres the script if you need it to parse/validate any other kind of m3u playlist from time to time.

#!/usr/bin/awk -f
 print "#EXTM3U"
 if ( $0 ~ /^#EXTINF/ ) {
 #reset URL so it doesnt print the same one twice
 } else if ( $0 !~ /^#EXTINF/ ) {
 #print "Found "URL

#print ITM"\n"URL
 # curl --connect-timeout $SLEEP --output /dev/null --silent $u
 #RC=system("curl --connect-timeout 5 --output /dev/null -silent" URL)

if ( URL != "" ) {
 cmd = "curl --head --location --fail --max-time 10 --connect-timeout 5 --head --output /dev/null -silent " URL
 #print "Calling : "cmd
 RC = system( cmd )
 #print "Return code : "RC
 if ( RC == 0 ) {
 print ITM"\n"URL