No Comments

Text with pattern the new way

October 4th, 2020

In the past the only way to to get colored text, like from an image or gradient was to use SVG.

Nowadays pure CSS is enough.

Although a prefix with -webkit- is still needed for Safari and Blink browsers.

No Comments

Why the upgrade from Ubuntu 18.04 LTS to Ubuntu 20.04 LTS is not available yet.

September 9th, 2020

Linux users of the Ubuntu 18.04 LTS (Long Term Support) are still waiting to upgrade their systems to 20.04. Normally at around the time the first point release of the new LTS distribution is released.

What is a point release?

These point releases include support for new hardware as well as rolling up all the updates published in that series to date. So a fresh install of a point release will work on newer hardware and will also not require a big download of additional updates. These include security updates and corrections for other high-impact bugs, with a focus on maintaining stability and compatibility with Ubuntu 20.04 LTS.

And 20.04.1 was released on August 6. But the problem is: not all flaws have been ironed out yet in 20.04.1. So at the moment you can’t be confident to get a smooth upgrade from 18.04 LTS. That’s why the upgrade is not yet available. Yes you can get a smooth install, but not a smooth upgrade.

Upgrade blocking bugs for 20.04

There are 2 blocking issues at the moment, and they must be solved first:

  1. eoan to focal upgrade hangs when lvm snapshot is present (bug 1876506) resolved
  2. grub-pc upgrade support (bug 1891680)

Here you can track the release status.

If you wanna take the risk, you can always force a upgrade with:

do-release-upgrade -d
No Comments

Getting the date right in Javascript in your language of choice

August 20th, 2020

The Internationalization API provides language number formatting, string comparison, and date/time formatting in Javascript. It’s a global object.

Intl.DateTimeFormat('en-GB',
{
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
weekday: 'long',
era: 'long',
year: 'numeric' ,
month: 'long',
timeZoneName: 'long',
hour12: false
}).format()

What is the time today?

No Comments

Fixing HifiBerry and Raspberry Pi sound after update

June 19th, 2020

I updated my Raspberry Pi 4 which I use for playing music with the great, free and open source MPD server.

After reboot it stopped playing music. ;(

The cause was this update in May/June 2020, due to a change in audio configuration. MPD was still working but the sound was now not routed through the HifiBerry soundcard, but through the audio/headphones, simply because a new HW card was defined: headphones/analog audio out.

The solution was easy.

aplay -l shows the Hifiberry the third card instead of the second, the new headphones was now the second.

 $ aplay -l
**** List of PLAYBACK Hardware Devices **** 
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1] 
Subdevices: 4/4 
Subdevice #0: subdevice #0 
Subdevice #1: subdevice #1 
Subdevice #2: subdevice #2 
Subdevice #3: subdevice #3 
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones] 
Subdevices: 4/4 
Subdevice #0: subdevice #0 
Subdevice #1: subdevice #1 
Subdevice #2: subdevice #2 
Subdevice #3: subdevice #3 
card 2: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm5102a-hifi-0 [HifiBerry DAC HiFi pcm5102a-hifi-0]
Subdevices: 0/1 
Subdevice #0: subdevice #0

All I had to do is to edit /etc/asound.conf and increase 1 to 2:

pcm.!default {
type hw card 2
}
ctl.!default {
type hw card 2
}

Restart MPD and everything was working like before. 😉

sudo systemctl restart mpd

 

No Comments

Filter thread sizes Raspberry Pi 6mm and 16mm lenses

June 7th, 2020

The filter thread size for the Raspberry Pi 6mm CS mount lens is 27mm.

Raspberry Pi 6mm lens with step-up-ring

The filter thread size for the Raspberry Pi 16mm C mount lens is 37mm.

Raspberry Pi 16mm lens with step-up-ring

You can use  these lenses as macro lens by to reverse mounting them on the Raspberry Pi HQ camera.  That works surprisingly good. See my earlier posts.

In short: you need a reverse macro ring adapter and some step up rings. I use a Pentax K-mount adapter and ring, because I have some classic Pentax glass, that can be also used with the Raspberry Pi HQ camera.

 

No Comments

Macro Photography with the Raspberry Pi HQ camera and reverse mounted lens III

June 6th, 2020

Another try with some extra lighting, and post-processing with Darktable. See my earlier posts about photographing with the Raspberry Pi HQ Camera: part I and part II.

This time I used a special build of raspistill that offers a Field of Merit function to assist focusing. The Raspberry Pi Forum is full of helpful people and is very informative.

Fruit-fly taken with a Raspberry Pi HQ Camera and a reverse mounted Pentax 35mm lens

Fruitflies are the really minuscule flies that hang around you garbage bin, or home plants in the windowsill.

Not sure what the yellow blob is, maybe I caught the fly eating a piece of banana.