FUN WITH LINUX

Lets Encrypt

30 January 2016

Letsenrypt

Lets Encryptwas lately quite often in the media. Letsencrypt is a very easy to use tool which provides certificates for free. Those certificates are valid on most common browsers. I never understood why certificates are expensive that’s why I tried out letsencrypt(and I like it!).

In this article, I will replace all cacert-certificates on a kolab-server. Therefore I will install the letsencrypt-certificate on: apache2, cyrus-imapd and postfix.

Read more..
Phoning home - In a nice way

30 January 2016

I own one host with a dynamic ip and I’am using dyndns to find this host. But from time to time the dyndns-provider changes it’s fingerprint and this host is unable to propergate it’s ip. In such situations I am unable to connect since I don’t know the current ip. I could change the dyndns-provider and just get a stable one, but i don’t wanna lose the domainname and it just happens from time to time. So I want to find out the new ip of my host even if dyndns fails.

Read more..
the fuck: Magnificent app which corrects your previous console command

25 January 2016

the fuck programm

Magnificent app which corrects your previous console command, inspired by a @liamosaur tweet.

Read more..
Git: Using Git for building the Linux-Kernel from sources

19 January 2016

Git was invented by Linus Thorvalds for managing the Linux-kernel-sources. So it’s pretty clear that it is the best tool for managing our own kernel-builds too. I love to use Docker. That’s why I also need the AUFS-Support which is not included in the Linux-Tree. Git can also help us to easily include external kernel-patches. In this article I will clone the linux tree and create an own branch with my prefered kernel-version(and my customized kernel-config). I will pull the AUFS-Patches directly into this branch and compile this kernel afterwards.

Read more..
Preparing videos for the web(using ffmpeg)

15 January 2016

Convert video to different formats:

Mp4 (H.264 / ACC):

ffmpeg -i INPUTFILE -b 1500k -vcodec libx264 -vpre slow -vpre baseline -g 30 "OUTPUTFILE.mp4

Webm (VP8 / Vorbis):

ffmpeg -i "INPUTFILE" -b 1500k -vcodec libvpx -acodec libvorbis -ab 160000 -f webm -g 30 "OUTPUTFILE.webm"

Ogv (Theora / Vorbis):

ffmpeg -i "INPUTFILE" -b 1500k -vcodec libtheora -acodec libvorbis -ab 160000 -g 30 "OUTPUTFILE.ogv"

Rotate video 90 clockwise:

ffmpeg -i INPUTFILE.ogv -vf "transpose=1" -b 1500k -vcodec libtheora -acodec libvorbis -ab 160000 -g 30 "OUTPUTFILE.ogv"

Remove sound from video:

ffmpeg -i INPUTFILE.ogv -c copy -an OUTPUTFILE.ogv
Read more..
Space Invaders using 8x8 LED-Display on Tiva-Board TM4C1294XL

15 January 2016

I created 2 tasks in RTOS: one for reading from uart and one for the display(8x8 LED-Matrix). Both tasks are communicating via queues. The space-invaders-programm gets started by pressing F1. If F2 is pressed, the programm will display all keyboard-input on the led-display.

Click here to download the sources

Read more..
SSH: transfer files indirectly using scp

15 January 2016

Many times I have to remotely transfer files between 2 Hosts. And sometimes those hosts are not able to communicate to each other. In order to copy a file from host1 to host2 I had to copy it to my workstation first. But this is not necessary…

Read more..
amavisd-new: .docx often incorrectly detected as BANNED: .exe, .exe-ms, [trash]/0000.dat

15 January 2016

Amavis seems to block some Word documents. I experienced those problems with signed documents. In the logfiles amavis writes:

Read more..
Check /etc/shadow for accounts with empty passwords

11 January 2016

cat /etc/shadow | awk -F: '($2==""){print $1}' 
Read more..
What if logrotate does not rotate files..

11 January 2016

Recently I was confrontated with a strange problem. Logrotate did not rotate logfiles. When I started it in debug-mode I got the following message:

empty log files are not rotated, old logs are removed considering log /var/log/syslog log does not need rotating not running postrotate script, since no logs were rotated

The problem was that some logfiles had a zero size so logrotate did not rotate them. It was quite easy to solve the problem by deleting the files:

Read more..
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution 3.0 Unported License.

Copyright 2015-present Hoti