marcelpetrick

grip: render Markdown as PDF

Written by  on May 6, 2021

.. and other things, where you assumed it should be quite easy. ..

Wrote a short guide how to verify some information in Markdown. Local rendering works (most of the time via PyCharm or online at Github).
Now: how export it as PDF, because I realized that the receiver might not be able to display it properly.

* printing from PyCharm: failed
* VisualStudio-Plugin: no VS, no plugin
* any of the *nix-ways: not possible at that moment
* using a web-renderer: not allowed, because confidental data

UFF!

Python to the rescue!

Grip prepares a local flask server, where you receive a localhost:<randomport> url and just open it with the browser of your choice and then print as PDF.

žžžžžž

Written by  on April 29, 2021

Two family members names sport a nice z with Caron: ž.
Win 10: ALT+0158 (number pad with numlock on)
Linux (unicode): CTRL+SHIFT+U+017E

Scrum: PSPO I certification

Written by  on April 12, 2021

With the power of the mega-fluff I’ve succeeded in the test and can call myself now ‘Professional Scrum Product Owner‘.
Of course, it is just a small step. But a series of small steps will carry over long distances.
Sincere thanks go to Glenn Lamming & Boris Steiner for their interactive way to teach the fundamentals 👍

64 GiB USB 3.1 stick and VM problems

Written by  on March 31, 2021

Got a new 64 GiB USB3.1 stick (Samsung) and that’s where the problems started..
It was formatted with exFAT, one partition, which was not mountable for an embedded Linux.
So I tried to to use Windows standard tools (neither via explorer nor via powershell) to create a FAT32-partition of smaller than 32 GiB size. Did not work.

Second thought: let’s do this inside the Kubuntu-VM!
* media was not shown -> fixable by installing the extension pack (else just USB 1.1), then adding in the VM-settings a USB3.0-filter for the respective device, then fire up the VM and activate it in the “virtualbox-bar > devices”.
* check with ‘lsblk’ if there is a new block based device
* format with ‘gparted’ if necessary: one primary partition of 20 GiB FAT32 and the rest ext4 worked like a charm for me (of course, windows can’t handle ext4 ..). Gparted is really a lifesaver, been using this for a decade now.
* mount with ‘sudo mount /dev/sbd1 ~/Desktop/usbsticky’ if OS does not support some auto-mount on plugging-in

Cheap wifi repeater

Written by  on March 17, 2021

Long time ago (see: https://marcelpetrick.bplaced.net/wp_solutionsnotcode/?p=1266 ) I announced the plan to set up one/some ESP8266 as wifi-repeater and after some tinkering I did.
The device was running during Summer 2020 until now in different locations.

Code comes from martin-ger – kudos to him. Flash the binary and you’re done. Used the ESP-download-tool, as far as I can remember.
The wrapping is quite makeshift, but works. The blinking LED is a bit annoying if used on the balcony at night. will fix the hole for the cable with hot glue. Can run from battery pack or via usb-charger. Ah, yes, the price for the full package is around 3 €.

Performance: throughput is 5 Mbps down and 2 Mbps upstream. Not really much, but better than the local 4G ..

If the ESP8266 is connected via USB to serial terminal (115.200 baud), the output at boot looks like this:

Configure via serial by doing:

Windows (10) doesn’t allow the same resource twice

Written by  on February 4, 2021

So, the NAS* I use for years is separated into different partitions. Some for general access and things and one for music, which has a special user, which owns just read-only privileges.

Linux: no problem: mount as many shares with Gigolo and you are done.

Windows: use that 90s-style network-mount of the ‘explorer’ and add share by resource and credentials.
“\\ds213\musik” .. Works, but is awkward and not comfortable.
then you want to mount the second share with different credentials and you get “Can’t mount the same share** with different credentials”.

Workaround:
mount once by resource-name and once by ip: “\\192.168.178.178\musik”

Another approach via the hosts-file.

* DS213 from Synology: 2 bay; now running 24/7 for 5 (?) years; upgraded inbetween from 2 TByte drives to 4 TB with complete replication
** is actually “different shares at the same host”, but who am I with my limited knowledge?

RamBLE and the (german) Covid19 tracker

Written by  on February 4, 2021

Quicker posts, less retardation! One of the goals for 2021 was to 0. write more often, 1. faster after ‘doing’ and 2. therefore also covering more things which were ‘touched’
There’s still a pile of topics left from 2020 xD

In Novembre a colleague and me talked about one of his acquantainces which wrote an iOS-app, which can show how many “Corona Warn App”-users are nearby. I was puzzling over this and also wondered if really some special app or some bluetooth-receiver-tinkering is needed. I still own that one BT receiver for the Raspberry.

First: So, quick check for BT sniffers in the playstore showed RamBLE.
Second: 5 min of googling found the UUID used for the exposure notification: “fd6f”.

So, let’s combine and see what is shown for an location I traverse often:

Quintessence: check the market before developing something 😉

Project Euler – mathematical riddles which require some programming skills

Written by  on January 14, 2021

Took me a while to write about this, but I really love Project Euler. The page is a collection of math challenges, which require some programming (I saw just one which could have been computed by a closed formula without any help). The first ten are quite easy to solve and are more commonly known math problems. Prime numbers and combinatorics play a strong role. But then the difficulty rises quite quickly. Usually it takes me one to two hours to write a Python solution for one. If I would – like I should – write unit-tests for each single method and not for a few selected one, then I guess 50% more.

It’s great: each problem is a closed, separate problem, which requires some algorithmic thinking and – of course – some proper implementation. If you chose the wrong path time or space complexity will kill your ambitions quite quickly. But proper solutions are computed most of the time in less than a minute.
Most of the time I rely on basic python structures and common libraries. But I’ve also given NumPy, itertools, etc. a try. Speeds up the process quite a bit.
My next goal is to fix problem 47, because then I’ve handed in solutions for all of the first fifty problems.
The highest challenge (with also the highest difficulty level (for me) so far) was problem 668. Due to a really big (80 GiByte!) boolean array the computer had a hard time swapping memory. So it took almost 36 hours to finish. By the way: less than 900 people worldwide have solved this issue #tinyflakeofpride

Of course, several geniuses have dedicated pages to optimal solution strategies. Which is a nice idea. But I avoid them. Most of the times stepping back, thinking without a display about the problem and if the chosen approach was a good one, is more helpful. A solution by cheating is nothing which renders any reward.

https://github.com/luckytoilet/projecteuler-solutions

https://euler.stephan-brumme.com/24/

micro:bit v2 arrived :)

Written by  on January 4, 2021

Today (finally) my micro:bit v2 arrived. Had to unwrap it immediately after dinner and play around with the speech synthesis👌🏻 Some lines of microPython and the things got heated.
If you’re not creating anything nowadays, then it’s your own fault 🐒


Read more…

Fablab Freising

Written by  on December 30, 2020

I was always interested in continuing to tinker with 3d printers and the lasercutter. So I’ve checked which local labs are publicly available, because space at home is valuable and we have four smol ones which would like to attack any technical device ;3 Some years ago I did some prints and cuts in the FabLab Kiel, but never put any photos or reports here #sad.
The Fablab Freising looks great, very cool and friendly guys! And the fee to be a club member is also reasonable.
Read more…