Recent posts (max 20) - Browse or Archive for more

Trac FullBlogPlugin comment spam

Even though I have enabled spam filtering the blog get swarmed with blog comment spam for some reason.

Since their are no user generated comments, time to start fresh again:

$ sudo -u www sqlite3 trac.db
sqlite> DELETE from fullblog_comments;

Next job, find out how the comments get here in the first place.


UPDATE 1 dec 2020:
Seems like Recaptcha2 is being automated or abused somehow:

Captcha (15): Human verified via CAPTCHA (Recaptcha2)

Deleted it in favor of my own running my own version... to be continued.

Fixing Medion GPU replacement issues

Got myself a old(er) MEDION "PC Medion Erazer X5308 F / B551 EU" with specs:

Model: MT 20
Type: MET MT 8047N
MSN: 1002 0291

on which I would like to downgrade the GPU since the installed one (NVIDIA GTX 970) was overspected and more useful somewhere else. Hoping to install an old ATI Radeon HD7870 card.

Trying to boot the machine resulted in a beeping system (long - short - short), this BIOS error code means something is wrong with the GPU.

Made sure PSU and GPU were both functioning as expected by plugging them into an alternative system, leaves me with a bit of a puzzle. Since the mainboard (type MS-7848) is custom made no manual could be found for good debugging.

After some searching around I stumbled on a similar error, how-ever the use-case is completely different. Thanks to Dragna at the MEDION Cummunity forum for answering his own question I found the hint I was looking for.

  - In the BIOS > Advanced > OS Settings -> Select Win7/Other.
  - Go in the CSM menu which just appeared and set everything to UEFI except "Launch Video OpROM policy" which should be set "Legacy".

Root cause pretty simple after all,the Sapphire HD 7870 does not support UEFI at all. Hence the modification of the BIOS settings to support the old legacy stuff.

Voila, problem solved. Yet another piece of hardware saved from the e-waste.

Testing 3 different USB ethernet dongles

Intro

I sometimes need extra ethernet connectivity for debugging and development. Lets have a look at some I have around. All dongles are tested with USB3 host system, unless otherwise stated. Testing is done with iperf3.

Linksys USB3GIG-EJ

Box says Linksys USB Ethernet adapter gigabit USB 3.0, works like a charm:

rick@WINNIE:~$ iperf3 -c 192.168.88.1
Connecting to host 192.168.88.1, port 5201
[  5] local 172.22.29.135 port 51080 connected to 192.168.88.1 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   112 MBytes   943 Mbits/sec    0   3.15 MBytes       
[  5]   1.00-2.00   sec   112 MBytes   944 Mbits/sec    0   3.15 MBytes       
[  5]   2.00-3.00   sec   111 MBytes   933 Mbits/sec    0   3.15 MBytes       
[  5]   3.00-4.00   sec   112 MBytes   944 Mbits/sec    0   3.15 MBytes       
[  5]   4.00-5.00   sec   112 MBytes   944 Mbits/sec    0   3.15 MBytes       
[  5]   5.00-6.00   sec   112 MBytes   943 Mbits/sec    0   3.15 MBytes       
[  5]   6.00-7.00   sec   112 MBytes   944 Mbits/sec    0   3.15 MBytes       
[  5]   7.00-8.00   sec   111 MBytes   933 Mbits/sec    0   3.15 MBytes       
[  5]   8.00-9.00   sec   112 MBytes   943 Mbits/sec    0   3.15 MBytes       
[  5]   9.00-10.00  sec   112 MBytes   944 Mbits/sec    0   3.15 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  1.10 GBytes   942 Mbits/sec    0             sender
[  5]   0.00-10.06  sec  1.10 GBytes   935 Mbits/sec                  receiver

iperf Done.

Wavlink NWU220G

The Wavlink WL-NWU220G is a USB 2.0 to Gigabit Ethernet Adapter. It's using the axe(4) driver under FreeBSD.

rick@WINNIE:~$ iperf3 -c 192.168.88.1
Connecting to host 192.168.88.1, port 5201
[  5] local 172.22.29.135 port 51086 connected to 192.168.88.1 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  34.0 MBytes   285 Mbits/sec    0   1.56 MBytes       
[  5]   1.00-2.00   sec  31.2 MBytes   262 Mbits/sec    0   3.00 MBytes       
[  5]   2.00-3.00   sec  30.0 MBytes   252 Mbits/sec    0   3.00 MBytes       
[  5]   3.00-4.00   sec  31.2 MBytes   262 Mbits/sec    0   3.00 MBytes       
[  5]   4.00-5.00   sec  31.2 MBytes   262 Mbits/sec    0   3.00 MBytes       
[  5]   5.00-6.00   sec  30.0 MBytes   252 Mbits/sec    0   3.00 MBytes       
[  5]   6.00-7.00   sec  31.2 MBytes   262 Mbits/sec    0   3.00 MBytes       
[  5]   7.00-8.00   sec  31.2 MBytes   262 Mbits/sec    0   3.00 MBytes       
[  5]   8.00-9.00   sec  30.0 MBytes   252 Mbits/sec    0   3.00 MBytes       
[  5]   9.00-10.00  sec  31.2 MBytes   262 Mbits/sec    0   3.00 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   312 MBytes   261 Mbits/sec    0             sender
[  5]   0.00-10.13  sec   311 MBytes   258 Mbits/sec                  receiver

iperf Done.

Still impressive, it's almost maxing out the maximum transfer speed of USB2.0 protocol, but by far not the gigabit port.

Sitecom LN-030v3

Also have a old Sitecom LN-030v3 adapter lying around. It is a USB 2.0 adapter with 100 Mbit ethernet speed. It's using the ure(4) driver under FreeBSD.

rick@WINNIE:~$ iperf3 -c 192.168.88.1
Connecting to host 192.168.88.1, port 5201
[  5] local 172.22.29.135 port 51094 connected to 192.168.88.1 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  14.1 MBytes   118 Mbits/sec    0    595 KBytes       
[  5]   1.00-2.00   sec  11.2 MBytes  94.3 Mbits/sec    0   1.14 MBytes       
[  5]   2.00-3.00   sec  11.2 MBytes  94.4 Mbits/sec    0   1.70 MBytes       
[  5]   3.00-4.00   sec  11.2 MBytes  94.4 Mbits/sec    0   2.26 MBytes       
[  5]   4.00-5.00   sec  11.2 MBytes  94.4 Mbits/sec    0   2.83 MBytes       
[  5]   5.00-6.00   sec  11.2 MBytes  94.4 Mbits/sec    0   3.00 MBytes       
[  5]   6.00-7.00   sec  11.2 MBytes  94.4 Mbits/sec    0   3.00 MBytes       
[  5]   7.00-8.00   sec  10.0 MBytes  83.9 Mbits/sec    0   3.00 MBytes       
[  5]   8.00-9.00   sec  0.00 Bytes  0.00 bits/sec    1   1.41 KBytes       

iperf3: error - unable to receive control message: Connection reset by peer

Using USB3 ports is causing the module to 'choke' and resets itself, which is highly unwanted. Trying on an (old) USB2 port:

rick@WINNIE:~$ iperf3 -c 192.168.88.1
Connecting to host 192.168.88.1, port 5201
[  5] local 172.22.29.135 port 51106 connected to 192.168.88.1 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  13.6 MBytes   114 Mbits/sec    0    601 KBytes       
[  5]   1.00-2.00   sec  12.4 MBytes   104 Mbits/sec    0   1.15 MBytes       
[  5]   2.00-3.00   sec  11.2 MBytes  94.4 Mbits/sec    0   1.71 MBytes       
[  5]   3.00-4.00   sec  11.2 MBytes  94.3 Mbits/sec    0   2.27 MBytes       
[  5]   4.00-5.00   sec  10.0 MBytes  83.9 Mbits/sec    0   2.83 MBytes       
[  5]   5.00-6.00   sec  11.2 MBytes  94.4 Mbits/sec    0   3.02 MBytes       
[  5]   6.00-7.00   sec  11.2 MBytes  94.4 Mbits/sec    0   3.02 MBytes       
[  5]   7.00-8.00   sec  11.2 MBytes  94.4 Mbits/sec    0   3.02 MBytes       
[  5]   8.00-9.00   sec  11.2 MBytes  94.4 Mbits/sec    0   3.02 MBytes       
[  5]   9.00-10.00  sec  11.2 MBytes  94.4 Mbits/sec    0   3.02 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   115 MBytes  96.3 Mbits/sec    0             sender
[  5]   0.00-10.27  sec   115 MBytes  93.7 Mbits/sec                  receiver

iperf Done.

Excellent speed, how-ever 10x slower of course then the Linksys alternative.

Conclusion

If you need maximum performance, use the adapter suited for the job, how-ever when performance is not critical the older adapter are also still well suited for the job, how-ever bear in mind potential issues with USB devices dropping out, so (stress-)test your hardware before using it.

Fun fact: All USB Ethernet dongles roughly costed 20-25 EUR the moment I bought them, which makes interesting to see that technology really ages quickly, since the old dongles are basically worth-less :-).

UNIX programming under Windows 10: Dead key issue

Typing the shortcuts to your home directory with the tilde (~) sign, requires an extra space after the character when using an 'US International keyboard' layout which could be rather annoying since I type a lot.

Setting keyboards and languages is a mess under windows GUI settings, luckaly powershell to the rescue (thanks to this reddit post for the suggestion):

# Set some sane defaults (for NL programmer)
Set-WinUserLanguageList en-NL -Force

PS C:\Users\info> Get-WinUserLanguageList
LanguageTag     : en-NL
Autonym         : English (Netherlands)
EnglishName     : English
LocalizedName   : English (Netherlands)
ScriptName      : Latin
InputMethodTips : {2000:00000409}
Spellchecking   : True
Handwriting     : False


# Default keyboard layout of en-NL is 'US International', which includes dead keys
# really annoying for (UNIX) programming input.
PS C:\Users\info> Set-WinUserLanguageList en-NL -Force
PS C:\Users\info> Get-WinUserLanguageList


LanguageTag     : en-NL
Autonym         : English (Netherlands)
EnglishName     : English
LocalizedName   : English (Netherlands)
ScriptName      : Latin
InputMethodTips : {2000:00020409}
Spellchecking   : True
Handwriting     : False


# Change to 'US' to get rid of dead-keys
PS C:\Users\info> $someVar = Get-WinUserLanguageList
PS C:\Users\info> $someVar[0].InputMethodTips.Remove('2000:00020409')
True
PS C:\Users\info> $someVar[0].InputMethodTips.Add('2000:00000409')
PS C:\Users\info> Set-WinUserLanguageList $someVar -Force

PS C:\Users\info> Get-WinUserLanguageList


LanguageTag     : en-NL
Autonym         : English (Netherlands)
EnglishName     : English
LocalizedName   : English (Netherlands)
ScriptName      : Latin
InputMethodTips : {2000:00000409}
Spellchecking   : True
Handwriting     : False

Missing EXIF tags could make your android gallery look bad

I recently helped migration to an new android phone. One part of the process was to store old (WhatsApp) stored images on internal storage towards the external storage SD Card.

Installing the new phone revealed an unexpected fall-out of having all the old pictures being sorted as being taken today.

Close inspection revieved Android Media Store uses the EXIF CreateDate to store the moment the picture was taken, missing the tag, it will use the file modification date as backup. How-ever this modification date of course was reset, because the file was copied from internal storage, without preserving the file modification dates.

The first attempt of fixing the issue was by turning off the phone, removing the SD card and fix the modification time of every file, based on the date identifier found in the file e.g. $ touch -a -m -t 201906230000 IMG-20190623-WA001.jpg.

After an re-insert of SD and turning the phone back on, it was not fixing anything. Basically the re-indexing needed to be forced. This is best done by removing all data from the 'Media Storage' System App. Go to Settings -> Apps -> "3 dots button" -> "Show System Apps" -> "Media Storage" -> Storage -> "Clear Data" -> OK. And next reboot the phone and open the images overview on the SD card using Settings -> "Device Care" -> Storage -> "SD Card" -> "Images". Depending on the amount of pictures this could take a while before your device is responsive again.

So finally all pictures and videos are indexed again and the Gallery shows pictures and videos in good order again. All happy right? ... but wait what about Facebook App ... personally I would nuke it and never look back, how-ever some people do not care about being 'the product' and will happily 'pay' for the service by providing lots of personal data. Having this said, I like a good engineering puzzle, so let's get started.

Facebook App (and maybe others) are still showing pictures garbled, which is annoying when for example wanting to upload older pictures, since you have to scroll down a long while before getting to the good stuff again. Apparently facebook does not rely on the metadata generated by the "MediaStore" and generates it's own, how-ever it blindly ignores the file modified date if EXIF data is missing and simply tags the picture as being taken the moment it is indexed. So how-to fix it?

First and foremost we need help, by some very powerful software EXIFTool, this will help us create the required EXIF tags based on the date string found in the filename. So turn off the phone again and plug the SD Card into a computer ones more.

We are going to use this magic:

$ exiftool \  
    "-datetimeoriginal-=" \
    '-datetimeoriginal<${filename;$_=substr($_,4,8)} 00:00' \
    "-createdate-=" \
    '-createdate<${filename;$_=substr($_,4,8)} 00:00' \
    '-filemodifydate<${filename;$_=substr($_,4,8)} 00:00' IMG-*WA*

To explain a little:

  • Do not update DateTimeOriginal EXIF tag if already exists:

"-datetimeoriginal-="

  • Base the DateTimeOriginal EXIF tag on the filename, by selecting the 5th until 12th character in the filename and expanding this with time midnight (00:00). This special rule is required to ensure file named like IMG-20190405-WA-1290.jpg could be parsed without issues, normal syntax is causing 90 to be specified as minutes which causes errors on importing.

'-datetimeoriginal<${filename;$_=substr($_,4,8)} 00:00'

  • Same applies for EXIF CreateDate:
       "-createdate-=" \
        '-createdate<${filename;$_=substr($_,4,8)} 00:00' \
    
  • our previous $ touch equivalent is a nice-to-have yet not required:

'-filemodifydate<${filename;$_=substr($_,4,8)} 00:00' IMG-*WA*

Now, put your SD card back in the phone and turn it back on. Clear your facebook data "Settings -> Apps -> Facebook -> "Clear Data" -> "Ok' and restart your Facebook Apps and wait a long time again. After your phone (literally) cools down it's time to enjoy the result.

Firefox GTK File Upload Dialog not showing previews

I am confused about Firefox under linux not being about to properly preview all images in the "File Upload" dialog. Since camera's do not generate meaning file-name trying to guess/remember/pick the file-name to be used is annoying time consuming.

More-over the behaviour is not consistent, it only seems to happen on large image files, the small ones are generated properly.

Turns out I looking at a work-around for a CVE issue fixed 5 years ago, as seen in Firefox bugzilla issue:1184009.

The work-around consist of disabling the preview for pictures larger than 4096px in height or width). It has been reported multiple times to have it fixed, how-ever all cases being closed, as it was not safe enough.

5 years down the road an new argument comes to table seen at issue:1571984. "They need to re-implement it ourself, since the external library cannot be trusted.", which seems to make sense at first glance.

Leaves me wondering what they mean with "rigging up their own imagelib". Since 10 months has passed since the last comment. I guess it's challenge accepted, I will try to write a patch somehow ....

Removing master references from github repositories

I recently found out the term 'master' as repository name is considered offensive, since it is often used in conjunction with the term 'slave' Which in hindsight is indeed not correct to use.

Since it is not technology limiting how a branch is named, changing is just a matter of making of spending some time on it. If I can make the world a better place by renaming a few of repository trees, it's time well spend.

Since FreeBSD and subversion is using the word trunk together with branches for ages, so I thought it would make a much better alternative.

Switching is a semi-easy, first create and new branch:

$ git checkout -b trunk
Switched to a new branch 'trunk'
$ git push -u origin trunk
Total 0 (delta 0), reused 0 (delta 0)
remote: 
remote: Create a pull request for 'trunk' on GitHub by visiting:
remote:      https://github.com/rickvanderzwet/nagios-plugins/pull/new/trunk
remote: 
To https://github.com/rickvanderzwet/nagios-plugins.git
 * [new branch]        trunk -> trunk
Branch 'trunk' set up to track remote branch 'trunk' from 'origin'.

Deleting old branch:

$ git push origin --delete master
To https://github.com/rickvanderzwet/nagios-plugins.git
 ! [remote rejected]   master (refusing to delete the current branch: refs/heads/master)
error: failed to push some refs to 'https://github.com/rickvanderzwet/nagios-plugins.git'

Whoops make sure to change the GitHub default branch, in mine case found at:

https://github.com/rickvanderzwet/nagios-plugins/branches

And try again:

$ git push origin --delete master
To https://github.com/rickvanderzwet/nagios-plugins.git
 - [deleted]           master

# Delete local branch:
$ git branch -d master
Deleted branch master (was 82e57d4d).

# Update head reference pointer:
$ git remote set-head origin trunk

Dear IBUS don't steal CTRL+ALT+e shortcut in Gnome

I use terminator as my favorite terminal emulator, which uses the shortcut CTRL+ALT+e to open a new window (vertical split).

How-ever recently the key-binding is hijacked by the emojicon hipsters on GNOME to allow inserting emojicons.

To re-claim the key-binding, use ibus-setup and head to the 'Emoji' tab to free the keybinding.

Hacking Samsung SGH-E530 to kids phone

I have a old Samsung SGH-E530 phone which I wanted to convert to play phone. One worry about the phone was the ability to call emergency services (112, 911).

Flight mode was no option, since the phone had to be powered-down, which makes it quite useless as play phone.

Option number two involves drastic measures. Since I will not be needing any GSM capabilities any-more, let's take it out or at least the antenna bit.

Opening the phone was easy peasy, just remove 5 standard philips screws and good to go. Located the antenna, both internal and external and removed a few filter capacitors using tweezers to break them off the board. This will decouple the antenna.

Re-assembly and turning it back in, "Limited service 5 bars". A bit flaky though (holding the phone would make it drop a few bars) how-ever still stable enough to make calls.

Time for a revised plan, time to dive in again. Now locating the Power Amplifier Module (PAM), took the de-soldering station and removed the SKY77328-13 chip from the PCB.

Re-assembly and turning it back in, "Limited service 2 bars"!!! I am located 500 meters from a GSM tower (line of sight), so I am guessing this also helped the process.

Still more to be removed apparently. The "complete RF front end for multi-band GSM and GPRS wireless communications" SI4205-BM is the next canidate for heat-gun removal.

Re-assembly attempt number 3 and finally "No service available", guess I have hit the bulls-eye :-)

Bonus-challenge is setting the date or more precisely the year. The SGH-E530 will not accept the current year (2020), further inspection reveals the date must be set between 1-1-2020 and 31-12-2016. Either no engineer bothered to look this far in the future or a classical case of planned obsolescence.

I would like to set the date correctly to allow learning the day of the week kind of things. Every year the weekday to shift by 1 weekday (365 mod 7), except on a leap year, which is causing the weekday to shift by 2 weekdays.

I order to work around the date restriction I have to improvise. 1-1-2020 was a Wednesday, 6 years earlier, mind the leap-year 2016 in between, 1-1-2014 should be the solution. How-ever 2014 is not a leap-year unlike 2020, thus first of March 2014 is on a Saturday. 1st of March 2020 is located on on a Sunday.

Going back 6 more years to 2008 reveals an other interesting case. The leap-year criteria matches, how-ever located on Tuesday it's incorrect, since there are now 2 leap-years (2012 & 2018) involved.

Going back to 2003 gives me the correct weekday, how-ever no leap year. Going back to 1997, disqualifies as being no leap year. Next in line 1992. Jackpot, first of all a leap-year and secondly 1-1-1992 weekday is Wednesday.

My surprise grows since this behaviour (28 years) is consistent since 1-1-1964 is the next candidate in line. Which is even before UNIX Epoch Time, making it an unlikely candidate to even to be considered :-). I have tried to wrap my head around the math involved to explain it, how-ever I have to leave it "exercise left to the reader".

Back to my pressing matter of setting the right year allowing the weekdays to match has proven to be a rather difficult issue. I can only deal with it by using a work-around. Set the year to 2014 and at 1st of March change the year to 2015. Sounds like next level daylight saving time/summertime :-).

Fix broken UEFI BCD on WinRE Command Prompt

Reduce firefox spell checker languages on Fedora

I switch a lot between en_GB and nl_NL for spell checking in firefox in the context menu (right mouse click).

The context menu how-ever is really bulky showing all kind of languages I never use. Firefox running on Fedora is using /usr/share/myspell directory to populate this list.

One quick and dirty solution is to remove the ones I do not use. Since the are (luckily) all symlinks, this could be done in a breeze:

$ sudo find /usr/share/myspell -type l -delete

Grub on HiDPI screen

Inspired by the blog post Increase Font in GRUB for High DPI Screens from Ward Muylaert. I decided to try to make it work under Fedora 32 on a system which uses EFI boot.

First make the font compatible for grub:
$ grub2-mkfont /usr/share/fonts/dejavu-sans-mono-fonts/DejaVuSansMono.ttf --size=48 --output=/boot/efi/EFI/fedora/fonts/DejaVuSansMono48.pf2

Next update the grub configuration:
$ sudo grub2-mkconfig -o /etc/grub2-efi.cfg

Strictly speaking not required, how-ever I like to keep the files in sync:
$ sudo grub2-mkconfig -o /etc/grub2.cfg

Alter content of /etc/default/grub to include font reference. The GRUB_TERMINAL_OUTPUT is optional, it should be included by default when specifying a new font.

#GRUB_TERMINAL_OUTPUT="console"
GRUB_TERMINAL_OUTPUT="gfxterm"

GRUB_FONT=/boot/efi/EFI/fedora/fonts/DejaVuSansMono48.pf2

Running zoom.us on a HiDPI screen

Working from remote requires tooling to communicate with co-workers. some are using zoom.us which has good linux support.

How-ever when started the whole interface is tiny-tiny since the Qt application does not honour the settings used to combat unreadable windows on my HiDPI screen.

Altering /usr/share/applications/Zoom.desktop and adding the required Qt tweaks (QT_SCALE_FACTOR=1 QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCREEN_SCALE_FACTORS=2) did the trick:

[Desktop Entry]
Name=Zoom
Comment=Zoom Video Conference
Exec=env QT_SCALE_FACTOR=1 QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCREEN_SCALE_FACTORS=2 /usr/bin/zoom %U
Icon=Zoom.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Network;Application;
StartupWMClass=Zoom
MimeType=x-scheme-handler/zoommtg;x-scheme-handler/zoomus;x-scheme-handler/tel;x-scheme-handler/callto;x-scheme-handler/zoomphonecall;application/x-zoom;
X-KDE-Protocols=zoommtg;zoomus;tel;callto;zoomphonecall;
Name[en_US]=Zoom

Jumping around in bash shell

I jump around a lot in the terminal between different projects and activities. To avoid endless typing I have created aliases which allows me to quickly perform this task.

By adding the following entries to your .bashrc you will give access to the powerfull tools of jcd scd lcd. First and foremost goto a directory you would like to earmark. Type scd <alias-of-choice> and your entry will be stored. To go back to this directory type jcd <stored-alias> and you arrived at your destination. Tab completion also works to save typing some more.

function jcd {
        cd "$(grep "${1:-blank} /" ~/.jcd | cut -d' ' -f  2-)"
}

function scd {
        ( grep -v "^${1:-blank} /" ~/.jcd; echo ${1:-blank} `pwd` ) > ~/.jcd.new
        mv ~/.jcd.new ~/.jcd
}

function lcd {
        cat ~/.jcd | sed 's/ /\t = /'
}

function _listcd {
        COMPREPLY=()
        cur="${COMP_WORDS[COMP_CWORD]}"
        opts=$(awk '{print $1}' ~/.jcd | grep "^$2")
        COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
        return 0
}

complete -F _listcd jcd
complete -F _listcd scd

How-to limit spelling languages options in Firefox right-click context menu

I keep on forgetting the answer to my own question. Hence a repost:

$ sudo find /usr/share/myspell -type l -delete

source: Firefox Support Forum

Something went wrong with Google Mail

Well you could always store my message and try again later :-)

Netflix Phishing report failures

Dear Netflix,

If you offer a service for users to report phishing mails. You might want to consider removing your spam and phishing filter from the particular account.

Else the user ends up with a catch-22 :-)

Vlag uit de knoop

Vlaggenstok hack

Ik woon in een winderige hoek, waardoor de vlag tijdens uithangen elke keer in de war gaat. Gelukkig bied een stukje PVC ter grootte van de vlag een paar ty-wraps en slangenklemmen een nette oplossing.

Leuk staalje DIY huisvlijt :-)

PS: Slangenklemmen aan beiden zorgen ervoor dat ik de vlag ook halfstok kan hangen mocht het nodig zijn.

Fedora 29 not booting on Acer Aspire ES1-731

Got myself an interessting issue after installing Fedora 29 on an Acer Aspire ES1-731. After start it goes into an reboot loop, stating a cryptic message with phases BootOrder not found and grubx64.efi .

It turned out the Secure Boot has to be modified to allow the GRUB (Fedora Bootloader) to be 'trusted'.

Following the excelent intructions of Krallan on the Acer Community Forum got myself an working system again.

Cool, thanks Krallan!

PS: Press F2 during boot to get into the BIOS

Slow Firefox startup at Fedora

Firefox was starting really slow, taking almost 2 minutes before the startup screen was disabled. As suggested by Redhat bug 1290894 disabling the network connection will Firefox start at normal speed again. How-ever this is rather useless :-).

Running wireshark and strace revealed an interesting observation. Firefox (like many other programs) is first trying to resolve the machine hostname. Since this was not properly configured on my machine, it was not able to find the right answer.

Fixing it by adding the entry /etc/hosts

echo "127.0.0.1 $(hostname)" >> /etc/hosts