Virtualconfusion.net

Nothing serious!

Bobber work in progress

Custom Bobbers @ swiss-moto 2018

The customized Bobbers seen @ swiss-moto

Bash script to encode all movies in folder

Just a little bash script to encode all movie files in a folder and save them in another folder:

#!/bin/bash

SRC="/media/source"
DEST="/media/destination"
DEST_EXT=mp4
HANDBRAKE_CLI=HandBrakeCLI
PRESET="Universal"

cpulimit -e $HANDBRAKE_CLI -l 80 -b

for FILE in "$SRC"/*
do
    filename=$(basename "$FILE")
    extension=${filename##*.}
    filename=${filename%.*}
    $HANDBRAKE_CLI -i "$FILE" -o "$DEST"/"$filename".$DEST_EXT "$PRESET"
done

killall cpulimit

It requires HandBrake CLI and cpulimit.

Adapt the extension, preset, source & destination path to your needs.

I used cpulimit to make sure the VM where I am running this script will not get stuck.

Ruby on Rails, mariadb, RVM on Debian

I am from time to time trying some Ruby on Rails dev on my machine.

Installation of RVM & mariadb is usually straightforward on *buntu systems, it is a liitle bit more tricky on Debian.

For RVM the easiest is to use the instructions from the official RVM page.

The installation script will try to install the dependencies using sudo:

\curl -sSL https://get.rvm.io | bash -s stable --ruby

and it fails as sudo is not install by default on Debian.

# apt install sudo

Will do the trick, after you need to modify the /etc/sudoers file to add your user to the sudoers group. Add the following line to /etc/sudoers and you are done!

myuser  ALL=(ALL:ALL) ALL

RVM will install all dependencies and stable ruby.

Install mariadb is trivial (but sometimes you will need to set or reset the root password => google is your friend)

The mysql gem will require the installation of the default-libmysqlclient-dev package to run correctly.

Lastly execute the following SQL commands to be able to execute mysql without sudo (it will save you time when creating a RoR application based on mysql):

UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE user = 'root' AND plugin = 'unix_socket';

flush privileges;

And restart mysql service.

Installation of Debian Testing on MacBookPro12,1

After using Ubuntu 17.10 on my mac (MacBookPro12,1) and removed all stuff created by Ubuntu to recover vanilla Gnome, I realized that Debian Testing will bring the same level of comfort without additional irrelevant stuff.

After Downloading & burning on a USB stick the Debian Testing image the installation starts correctly (Press alt key during mac boot to boot from USB stick).

The wifi network card is not installed by default as the proprietary drivers is not there.

After the reboot I connected to internet using my iphone over Bluetooth.

I configured the sources.list file like this:

deb http://deb.debian.org/debian testing main contrib non-free

deb-src http://deb.debian.org/debian testing main contrib non-free

deb http://deb.debian.org/debian testing-updates main contrib non-free
deb-src http://deb.debian.org/debian testing-updates main contrib non-free

deb http://security.debian.org/debian-security/ testing/updates main contrib non-free
deb-src http://security.debian.org/debian-security/ testing/updates main contrib non-free

The installation of the firmware-brcm80211 package from non-free repository & computer reboot I was able to connect to wifi.

Synology DS918+

My previous NAS (Qnap TVS-473) had too many issues since I bought it. I send it back to QNAP under warranty and have been reimbursed.

Looking for a similar model in the same range I chose a Synology DS918+. After one day, I must say it is a very good product. The all plastic box looks less solid than the QNAP but it is well finished.

The interface is good and configuration is really simple.

Even with the basic setup (4 GB RAM) and 4 seagate HDD (3 To) the NAS is performing quite well.

  • Plex media server
  • Virtual machine running a custom web site
  • Logitech Media server application

I have ordered 8GB additional RAM to be comfortable. Synology is proposing only 4GB but I found some nice guys sharing their experience to upgrade RAM (synology forum, Disczone)

Altered Carbon

Ubuntu 17.10 new version released on january 11

Ubuntu will release a new version of 17.10 Artful Aardvark which will correct the problem with Lenovo computers.

This new version will not have the intel-spi driver activated.

Announcement: https://lists.ubuntu.com/archives/ubuntu-release/2018-January/004263.html

Possible "fix" the Lenovo laptop issue:

1. Install Ukuu on Ubuntu (http://www.omgubuntu.co.uk/2017/02/ukuu-easy-way-to-install-mainline-kernel-ubuntu )
2. Install 'Linux Kernel 4.14.9'
3. Reboot, load Grub & boot Ubuntu w/ kernel 4.14.9
4. Let system load fully
5. Reboot
6. Go into BIOS = saving changes should now work

Ubuntu breaks some Lenovo laptops

If you plan to install Ubuntu 17.10 on a recent lenovo laptop please don't do it.

Read this article about possible problem with some lenovo laptop models:

http://www.omgubuntu.co.uk/2017/12/ubuntu-corrupting-lenovo-laptop-bios

New iso images should be release soon to correct this issue.

What a bike!

Pipeburn