Archiv der Kategorie: Dies und das

Links

What: A list of not-now useful links
Why: Limited memory 😉
How: –

Tools

Vagrant

Resize vagrant disks

Virtual Box

Resizing virtual box disk space, the easy way
GParted live image

Install guest additions in Ubuntu

Java

https://developers.redhat.com/blog/2017/03/14/java-inside-docker/

Ember

https://medium.com/@ruslanzavacky/ember-cli-fingerprinting-and-dynamic-assets-797a298d8dc6

Docker

https://developers.redhat.com/blog/2017/03/14/java-inside-docker/

Docker an iptables

Sound recording

http://www.upubuntu.com/2013/05/how-to-record-your-voice-from.html

Machine learning

deeplearnjs

Programming

Ternary numbers

Python 3 program to convert a decimal number to ternary (base 3)

Data

General

Pandas data profiling

Conversion

Convert audio to base64

Linux

Go back to older kernel after update

Add a second hard drive (also working for vms)

Ubuntu not starting to graphical mode, flickering

Hang at boot on old machines

See https://www.youtube.com/watch?v=ZZBTSUbzT0g.

Add acpi=force in /etc/default/grub in line GRUB_CMDLINE_LINUX_DEFAULT and apply settings:

Ubuntu

If you would like to use a usb serial connection (for example to connect an ESP32), make sure the linux-modules-extra is installed (which is not the case in default cloud versions of Ubuntu). You can install it via:

See also: https://askubuntu.com/a/1129260.

Windows

Links to user folders

1. Copy folder to new location
2.

Show symbolic links

See also: https://superuser.com/a/496155

VCS

Git

Beautiful log

Use it like:

Development

Joels Test

Hallway test

Python https server

Creating self-signed SSL certificates with OpenSSL

Serial console

https://www.cyberciti.biz/hardware/5-linux-unix-commands-for-connecting-to-the-serial-console/

Client – Server

Get server certificate

See: https://superuser.com/a/641396.

openssl s_client -showcerts -connect server.edu:443 /dev/null|openssl x509 -outform PEM >mycertfile.pem

Systemd

https://wiki.ubuntuusers.de/Howto/systemd_Service_Unit_Beispiel/

https://www.freedesktop.org/software/systemd/man/systemd.service.html

Activate caching for client side on apache2

Enable apache module:

Create .htaccess file in the specific directory (adjust max-age to the number of seconds you want the resource to be cached):

Set different port in apache2

See: https://stackoverflow.com/a/26064554.

Images

Identify image format

For format options see: ImageMagick.

Resize image

IoT

Raspberry and Ubuntu

Install Ubuntu on Raspberry

https://ubuntu.com/download/raspberry-pi

Getting audio to work over hdmi

Add the following line to /boot/firmware/usercfg.txt and reboot:

Increase gpu memory

Add the following line to /boot/firmware/usercfg.txt and reboot:

Make a small animation based on existing images

What: Concatenate images to a video
Why: Small animation as logo, simple stop and go movie
How: Using ffmpeg to concat existing images into mp4 file

Requirements

The following is using ffmpeg in debian linux. There are also builds for other platforms available. Depending on the platform you maybe have to install the codec. The following is tested with a default debian system.

Install ffmpeg with:

Create some images

Create a sequence of images. Lets assume we want to have a spinning wheel of the following kind for this tutorial:










The important point is the numerical ordering of the image names like img1.png, img2.png, ….

Create the video

Create the video according to the documentation (assuming an image numbering like mentioned above):

The above command works because there are less than 10 images. If you have another image numbering (for example 001-999) you have to change the pattern:
– img%02d.png for 01-99
– img%03d.png for 001-999
– …

The final result will look like: