deno js

Took me some time to realize: node, no-de, de-no, deno

How to fix broken Ubuntu 20.04 upgrade in WSL 1 / libc6 & sleep

I recently sudo do-release-upgrade -d my ubuntu 18 LTS inside my WSL 1 to the new Focal Fossa and ended up with a broken system.

libc6:amd64 (2.31-0ubuntu9) wird eingerichtet …
Checking for services that may need to be restarted…
Checking init scripts…
Nothing to restart.
sleep: cannot read realtime clock: Invalid argument
dpkg: Fehler beim Bearbeiten des Paketes libc6:amd64 (–configure):
Unterprozess installiertes libc6:amd64-Skript des Paketes post-installation gab den Fehler-Ausgangsstatus 1 zurück
Fehler traten auf beim Bearbeiten von:
E: Sub-process /usr/bin/dpkg returned an error code (1)

After some investigation I fixed it by editing /var/lib/dpkg/info/libc6:amd64.postinst – I just needed to remove the sleep from the script.

After that a simple sudo apt --fix-broken install fixed the issue and I was able to finish the upgrade via sudo apt dist-upgrade.

Paragon review

First post in a series of some short game reviews.

tl;wr – Walking Simulator 2017

So, I played Paragon in July 2017 and I gotta say that it bored me. You like LoL/Dota? Well, it’s like live action Heroes of the Storm. But strip the action. And remove the fun. And awesome support classes. Depending on your class and the situation you have to recall to your base to buy some cards (i. e. items) or to refill potions and hp/mp. Too bad your walking speed is so realistic that you have to take a 5 minute stroll back to the frontline.

Aim’s not really important. It’s more like shooting with pumpguns. Actually you can shoot pumpguns in Paragon.
The card system confuses you the first time but turns out to be just like item systems – juuust less intuitive.
Like in most other mobas, PVE ain’t no challenge. I’ve never lost a single PVE game with randoms.

What really annoyed me is that you can’t just unlock new characters by spending gold or something. No. You gotta log in like 5 days in a row to unlock the next tier of characters and like … 10 days? … to get all of them. After a couple matches I mastered all starter chars and there was no way to play another. I just had to wait days(!) to play some new character … Jesus!

Definitely not worth downloading the ~20 gigs.

Der Choke – die Starterklappe

Ja, das Ding heißt Choke. Nicht Schock, nicht Joke, nicht schok, auch nicht tschok und schon gar nicht Schoko. Im Ernst Leute, fragt ihr eucht nicht warum es Choke heißt? Wie kommt es, dass ich in 998 von 1000 Beiträgen irgendein Fantasiewort lese?

Choke kommt aus dem Englischen und bedeutet drosseln und würgen. Denn genau das macht die Starterklappe ja – sie würgt die Luft ab, damit das Luft-Treibstoff-Gemisch fetter wird. Bedeutet weniger Luft auf die gleiche Menge Kraftstoff.

Also bitte Leute, nennt das Teil beim Namen – wenn der englische zu schwer ist nehmt den deutschen.

VLC batch convert to mp3

What I wanted

Convert a single(!) file (mp4, flv, …) to mp3 using VLC via command line and trash the original video without having to re-type all the VLC stuff over and over again.

How I did it

I wrote a very simple batch file that does the work for me.
Here’s my setup:
I have a directory containing all the stuff I want to convert. Within that directory there’s a directory called „converted“ and another one called „trash“. converted will contain the converted mp3 files and trash will hold the original files (just in case something went wrong during convert).
Place the following convert.bat in the setup’s root directory:

set inname=%1
@echo in: %inname%

set outname=%inname:~0,-5%.mp3"
@echo out: %outname%

:: convert
CALL "C:\Program Files\Videolan\VLC\vlc.exe" %inname% --sout=#transcode{acodec=mp3,vcodec=dummy}:standard{access=file,mux=raw,dst=converted/%outname%} vlc://quit

:: move original to pseudo trash
move %1 trash/%1

Assuming you have VLC installed (and mp3 codecs) you can now press Win+R, hack in cmd, navigate to your setup (cd command), and run convert.bat „my super cool video that needs to become a mp3.mp4“

What’s the outcome

You will now have VLC popping up and writing to converted/my super cool video that needs to become a mp3.mp3. After it’s done it will move the original to the trash directory.

But I want it to convert all the files at once

There’s plenty of tutorial on the interwebs for this.

Why not move the original to the actual system trash?

I’m just too lazy to do that. This way, if anything went wrong and I need the original I won’t have to search my 300 kajillion trashfiles for the original but my 20 trashed videos – that’s way faster. And if everything went as expected I can move the whole trash directory to the actual trash (and create a new one).

I don’t want the VLC window to pop up

There’s a dummy option for you.

What’s your system?

I’m running Windows 7 ultimate with VLC 2.1.0 (beta).
I had some converting issues with VLC 2.0.

What could be done better if I wasn’t that lazy and actually knew how to batch

  • Actually trash the original if VLC exits without an error and the file has been written.
  • Accept a second parameter that – when given – is the new file name/location.
  • Automatically add mp3 metadata (well, batch won’t do that alone).
  • Add option to convert n/all files at once.
  • Verbose/non-verbose option
  • Sample rate/output encoding/… options
  • and so on

cached redirect

If you wonder why your browser redirects you from your local development URL to your live URL – it’s probably because you had your local apache redirect to your live URL (since you forgot to strip the lines from your dev .htaccess or whatsoever) and your browser has cached that redirect. So if you removed your .htacces already and still get redirected and are almost up to smashing your motherfrickin machine then try flushing your browser cache (somethin‘ like options->advanced->clear now). Totally worked for me.

Y’ain’t stupid; or at least, we both are.