Encode videos with Docker & Handbrake

Looking for a cheap solution to encode videos I created a docker container and an encoding script to automate this.


FROM ubuntu
RUN /bin/bash -c 'apt update && apt -y install handbrake-cli cpulimit psmisc'
COPY ./ /
RUN /bin/bash -c 'chmod +x;mkdir /media/downloads'
VOLUME /media/downloads
ENTRYPOINT ["/bin/bash"]

cpulimit -e $HANDBRAKE_CLI -l 80 -b
for FILE in "$SRC"/*
filename=$(basename "$FILE")
$HANDBRAKE_CLI -i "$FILE" -o "$DEST"/"$filename".$DEST_EXT "$PRESET" --subtitle-lang-list fre --all-subtitles
echo $FILE
echo "DONE"
killall cpulimit
echo $DEST
echo "Encoding task(s) finished"

How it works?

To start encoding job, launch the script


The script will look for files into the /media/downloads/sources and will encode each of them using the “universal” preset and french subtitles.

The new file will be stored in the /media/downloads/encoded folder.

The cpulimit is here to make sure the container is not eating all resources.

The container has the /media/downloads volume linked to a host folder.


A font to remember what you read

Sans Forgetica is a downloadable font that is scientifically designed to help you remember your study notes.


30 Million Facebook Accounts Were Hacked: Check If You’re One of Them

last month Facebook announced its worst-ever security breach that allowed an unknown group of hackers to steal secret access tokens  for millions of accounts by taking advantage of a flaw in the ‘View As’  feature.

Here’s How to Check If You Are One of 30 Million Affected Users:

Facebook said users can check whether they were affected by the breach by visiting the social network’s Help Center.


KDE Plasma 5.14 is out

New in Plasma 5.14

New Features

  • There’s a new Display Configuration widget for screen management which is useful for presentations.
  • The Audio Volume widget now has a built in speaker test feature moved from Phonon settings.
  • The Network widget now works for SSH VPN tunnels again.
  • Switching primary monitor when plugging in or unplugging monitors is now smoother.
  • The lock screen now handles user-switching for better usability and security.
  • You can now import existing encrypted files from a Plasma Vault.
  • The Task Manager implements better compatibility with LibreOffice.
  • The System Monitor now has a ‘Tools’ menu full of launchers to handy utilities.
  • The Kickoff application menu now switches tabs instantly on hover.
  • Widget and panels get consistent icons and other user interface improvements.
  • Plasma now warns on logout when other users are logged in.
  • The Breeze widget theme has improved shadows.
  • The Global menu now supports GTK applications. This was a ‘tech preview’ in 5.13, but it now works out of the box in 5.14.

Plasma Discover

Discover, our software and add-on installer, has more features and improves its look and feel.

  • Discover gained fwupd support, allowing it to upgrade your computer’s firmware.
  • It gained support for Snap channels.
  • Discover can now display and sort apps by release date.
  • You can now see an app’s package dependencies.
  • When Discover is asked to install a standalone Flatpak file but the  Flatpak backend is not installed, it now offers to first install the  backend for you.
  • Discover now tells you when a package update will replace some packages with other ones.
  • We have added numerous minor user interface improvements: update  button are disabled while checking for updates, there is visual  consistency between settings and the update pages, updates are sorted by  completion percentage, we have improved the layout of updates page and  updates notifier plasmoid, etc..
  • We have improved reliability and stability through a bunch of bug fixes.

Your browser does not support the video tag. Improved KWin Glide Effect

KWin and Wayland:

  • We fixed copy-paste between GTK and non-GTK apps on Wayland.
  • We fixed non-centered task switchers on Wayland.
  • We have improved pointer constraints.
  • There are two new interfaces, XdgShell and XdgOutput, for integrating more apps with the desktop.
  • We have considerably improved and polished KWin effects throughout,  including completely rewriting the Dim Inactive effect, adding a new  scale effect, rewriting the Glide effect, and more.


We fixed many bugs, including:

  • Blurred backgrounds behind desktop context menus are no longer visually corrupted.
  • It’s no longer possible to accidentally drag-and-drop task manager buttons into app windows.

Browse the full Plasma 5.14 changelog to find out about more tweaks and bug fixes featured in this release: Full Plasma 5.14 changelog




Solve authentication issue on mariadb

When installing Mariadb on Ubuntu I always have the problem of root  password not set and authentication plugin set to unix_socket. The  commands below solve the issues.

# change to root
sudo -s

# stop mariadb server
systemctl stop mariadb

# start mariadb in safe mode
mysqld_safe --skip-grant-tables --skip-networking &

# log into mariadb without password
mysql -u root
# change to mysql db
USE mysql;

# Change the root password
UPDATE user SET password=PASSWORD("new_password_here") WHERE User='root';

# Set the authentication plugin to default
UPDATE mysql.user SET plugin = '' WHERE user = 'root' AND host = 'localhost';
Reset privileges
FLUSH privileges;

# Exit from Mariadb
# Restart Mariadb server
systemctl stop mariadb
systemctl start mariadb

After this you should be able to log into mysql with your root password. Tested on Ubuntu 17.10 & 18.04