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 [http://myexps.blogspot.ie/search/label/Firefox] and for the sqlite bookmark schema see [https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Places/Database]. 

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 https://github.com/uoccou/firefoxbookmarks. 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 header.inc.php 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 http://www.sattvhelp.com, a great resource for all kinds of sat and IPTV issues. IIRC I came across this after finding a post about a filmon.tv plugin at http://iptvlivestream.com/iptv/filmon-tv/.

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 sattvhelp.com for more (http://www.sattvhelp.com/forum/technomate-non-linux-chat/54223-iptv-channels-tm-f3-5-tm5402-m3-33.html#post149601) 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


Pork and Noodles

June 11, 2016 Comments off

Marinade (or coat if you dont have time) minced pork in a mixture of 2 tablespoons each of cornflour, fish sauce, soy sauce (dark and light to give it some colour), oyster sauce; a chopped chili, a couple of cloves of garlic, some chopped ginger – it should be fairly wet and not too thick, perhaps like consistency of single cream.

Boil water for noodles.

Wok on high, starting cooking mince – it will clump together because of the cornflour. Add some thinly sliced white cabbage/bean-sprouts/brocolli even – whatever you like with pork. Garnish with chopped redpepper, coriander, sesame seed and oil, lime juice.

Mix with noodles, serve.