Nokia 3310 3G – Import Contacts from Nextcloud

I bought a Nokia 3310 3G. The first challenge was already to import my contacts from Nextcloud. After some research in the internet I have succeeded. Here you find a list of the steps:

1. Login in the nextcloud webinterface and go to contacts

2. Click on All contacts and then on settings

3. Choose download. This will save a *.vcf file with all your contacts

The format of the vcf file is version 3.0/4.0 (depending on your version), however the nokia 3310 supports only version 2.1. Thus a conversion is needed. I wrote a small utility to do this. You find the utility and a description how to execute it here: https://github.com/patrickuhlmann/nokia3310contacts

4. Use the utility to convert the downloaded file to the 2.1 format

5. Connect the phone with an usb cable and choose storage

6. Put the file in the 2.1 format on the external card in the folder vCard

7. optional: delete all existing contacts

8. Use the File application on the phone to locate the file. Against intuition, you don’t need to select open but “save vCard”. The process is fast and unspectacular (you don’t see a message at all).

9. Open the contact app again and enjoy your contacts 😀

Sources from research:

  • https://stackoverflow.com/questions/54009980/parsing-converting-nokia-smart-feature-os-backup-ib-files/54060829
  • https://github.com/mangstadt/ez-vcard
  • https://dba.ovh/vcf222.html
  • https://nokiapoweruser.com/how-to-import-contacts-on-nokia-215-220-225-230/
  • https://superuser.com/questions/1461970/import-vcard-vcf-file-to-nokia-3310-3g-phone

Grav CMS – Prepare Media/Images

Grav has a caching mechanism that automatically generates thumbnails. Still it is advisable to reduce the original size of the images. I use two tools to achieve this:

find . -iname '*.jpg' -exec convert \{} -verbose -resize 2048x2048\> \{} \;
exiftool -all= *

The above command rescales all images to maximum width or height of 2048 (preserving the aspect ratio) and removes all EXIV Information.

Another task is to generate a .meta.yaml file for each picture. Unfortunately Grav has no mechanism to achieve this out of the box. However a small script can help:

for f in *.jpg
do
echo "Creating metadata file for jpg file - $f"
echo "alt_text: " > "$f.meta.yaml"
done

How to download referenced images and videos of tweets

Recently I wanted to download a twitter stream. I didn’t want to write a specific program for it. After some research I found the following steps:

  1. Load the tweets into a Google Sheet. This can be done using the Twitter Archiver plugin
  2. Download the file to the desktop
  3. Remove everything but the column “Media” and safe the file as a csv file
  4. Remove the empty lines:
    sed -i '/^$/d' file.csv
  5. Let wget download the images/files
    wget -i file.csv

Extremely slow apt-get update on Debian Jessie

I was fiddling around with the phpdocker.io service. I generated a PHP 5.6 image (phpdockerio/php56-fpm). When I tried to run it, the following line was extremely slow:

RUN apt-get update \

&& apt-get -y –no-install-recommends install php5-mysql php5-gd php5-imagick \

&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

First I thought that it is completely frozen, as it didn’t show any progress. Then I realized that it is just extremely slow as it printed a line after an hours or so. Upon further analysis I found this bug: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1332440. Because of other containers I had a high number for ulimit configured.

I then realized that it was pretty trivial to fix it. I just had to lower the ulimit temporarely. Doing this made it possible to run the command in a couple of seconds:

RUN ulimit -n 10000 && apt-get update \

&& apt-get -y –no-install-recommends install php5-mysql php5-gd php5-imagick \

&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

Installing Brother DCP-J41100W Scanner under Fedora 28 Linux

After upgrading from Fedora 28 the scanner was not working anymore. Here some hints to fix this:
1. Download the Driver Install Tool from the Brother Support Webpage
2. Run the install script

linux-brprinter-installer-2.2.sh

(in my case I specified a Device URI and entered the IP adress)
3. Install libnsl by running

dnf install libnsl

4. The scanner should now work. You can check this by running

scanimage -L

. It should be listed