## Gentoo Linux: Building/rebuilding a kernel and Intel CPU microcode in an installation with initramfs

Fitzcarraldo
, 19/01/2022 | Source: Fitzcarraldo's Blog

In a 2014 post I explained how to update the Intel CPU microcode in a Gentoo Linux installation with an initramfs (I use sys-kernel/genkernel to build the kernel in the installation on my Compal NBLB2 laptop, which is running the Testing Branch of Gentoo Linux although the branch is not important). The initscript method (Method […]

## Work-around if movie subtitles restart after the final subtitle is displayed

Fitzcarraldo
, 23/11/2021 | Source: Fitzcarraldo's Blog

If I’m watching movies in a language I don’t understand, I want subtitles. On my computers this is possible as long as there is a subtitles file with the name suffix .srt and the same prefix name as the .mp4 video file in the same directory. I usually prefer to view movies on my TV […]

## ‘IP configuration was unavailable’: a laptop cannot connect wirelessly to a router

Fitzcarraldo
, 11/11/2021 | Source: Fitzcarraldo's Blog

I recently switched my ISP from BT to Virgin Media because the speed and reliability of the broadband connection were low. A Virgin Media Hub 3 was supplied as part of the package, and the TV, laptops (Gentoo Linux, Windows 10 and macOS), desktops (Lubuntu and Windows 10), tablets and phones (Android and iOS) could […]

## Gentoo Linux: Building/rebuilding a kernel and Intel CPU microcode in an installation without initramfs

Fitzcarraldo
, 26/10/2021 | Source: Fitzcarraldo's Blog

In a 2016 post I explained how to update the Intel CPU microcode in a Gentoo Linux Stable Branch installation without an initramfs (I do not use sys-kernel/genkernel to build the kernel in the installation on my Clevo W230SS laptop). The behaviour of the tool sys-apps/iucode_tool for updating the Intel CPU microcode has changed since […]

## A cube, a quintillion dollars coin and the power of decimals

Last week stood out by some popular discussions about minting a particularly huge bullion coin to avoid a Debt Ceiling default of the United States of America’s Federal Government. More precisely, a one Trillion USD platinum bullion coin. While I’m not an expert on American right nor do I have any opinion about if such a project is wise or not, contrary to what some Twitter commenters suggested to my thread:

To be fair, I genuinely wondered what such a bullion coin would look like if it was indeed made of one Trillion dollars worth of platinum at the current valuation. In case you’re more interested in the former legal aspects of such a project, I encourage you to go through this more law-oriented blog post from Preston Byrne, who, as an American lawyer, is I suppose much better informed about American rights than I’ll ever be.

Therefore, in this blog post, I’m going through where this idea came from, how I made my calculation and initially done a volume conversion mistake. It’s also an occasion for me to test more in-depth this $$\LaTeX$$ javascript library 1. Now that our workplace is set, let’s follow the sheep:

This whole idea started with an old article from Wired 2013, I ended up there by googling something like “$1T platimium coin volume”, and while the article is a bit old to be relevant, my main source of annoyance was: Such a coin would weigh 42,778,918 pounds – the equivalent of nearly seven Saturn V rockets – and occupy 31,947 cubic feet. As a reminder here is the map of all the countries in the World which are not officially using the metric system: So let’s start back the calculus in a system that everyone can follow. While prices keep fluctuating, one kg of platinum is currently worth around$31500, so from here we can check the conjectural weight of one Trillion worth of platinum:

$$\frac{1 T}{31.5k} = \frac{10^{12}}{31.5 \times 10^3} \approx 31.7 \times 10^6kg$$

Or 31.7k tons of platinum or between 150 and 200 years of platinum mining depending on the year you use as a reference. I can read online that one cubic meter of platinum weighs 21.45 tons, from there we can easily determine the volume of this Trillion coin:

$$\frac{31.7 \times 10^3}{21.45} \approx 1.48 \times 10^3m^3$$

And it’s here where I’ve done a dumb mistake in the rush, I wanted to find a visual to understand what 1000 $$m^3$$ would look like and in my mind one kilometer is the addition of 1000 meters. And that’s here that the power of decimals is coming in:

 $$km$$ $$10^3 m$$ $$km^2$$ $$10^3m \times 10^3m = 10^6 m^2$$ $$km^3$$ $$10^3m \times 10^3m \times 10^3m = 10^9 m^3$$

Ultimately the one trillion dollar coin would be one-third bigger than an Airbus A380 which has a total hold volume of 1134$$m^3$$. Thus not as big as Manhattan’s giant towers, but already quite significant in size.

For fun and glory, let’s reverse engineer the theoretical worth price of my initial one cubic kilometer platinum bullion coin initially represented next to Manhattan island:

For this nothing easier, we just have to divide the volume of this cube by the volume of our theoric Trillion dollar platinum coin:

$$\frac{10^9 m^3}{1.48 \times 10^3 m^3} \approx 6.76 \times 10^5T$$

We can now confidently say that this cube is a 0.67 quintillion dollars bullion platinum coin!

1. Which oddly enough is the only library I’m serving from a CDN, see my Privacy policy ↩︎

## Browsing a WebDAV share in Linux and Windows 10

Fitzcarraldo
, 27/09/2021 | Source: Fitzcarraldo's Blog

In this post I explain how I configured my machines running two Linux distributions (Gentoo Linux and Lubuntu 20.10) and my Windows 10 test machine to enable me to browse a shared folder on my file server (running ownCloud, in my case) that uses the WebDAV protocol. I cover two options for configuring Linux to […]

## Removing PipeWire in Gentoo Linux

Fitzcarraldo
, 30/07/2021 | Source: Fitzcarraldo's Blog

PipeWire, all the rage these days, was originally developed for video but was later enhanced to support audio as well, and is now an alternative to PulseAudio and JACK. My laptop running Gentoo Stable (amd64) with the KDE Plasma Desktop had been working fine with PipeWire for some time. The pulseaudio and screencast USE flags […]

## croc – another file transfer method

Fitzcarraldo
, 17/06/2021 | Source: Fitzcarraldo's Blog

I have lost count of the number of times I have had to send a large file to someone at work, usually in a hurry. I’ve used Dropbox, ownCloud, Firefox Send (no longer available) etc. Transferring large files became a bit easier when e-mail service providers increased the size limit for attachments, but that is […]

## Quick templating with gmaven and GStringTemplateEngine

Dirk Olmes
, 15/06/2021 | Source: Infoschnipsel und Wissenswertes

At work I have come across the requirement to generate some files based on the info in a pom.xml. Maven’s resource filtering feature would be the first thing that comes to mind but unfortunately it’s not powerful enough for my use case. I had to generate a file based on the dependencies that are referenced in the project.

A bit of googling found all kinds of outdated or unsupported maven plugins but nothing that would fit my use case directly. Finally I gave up and started to hack something together in groovy.

As it turns out groovy comes with a templating engine built in: groovy.text.GStringTemplateEngine. Using it is fairly straightforward from Maven:

....
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<version>2.1.1</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>${project.basedir}/templateGenerator.groovy</source> </configuration> </execution> </executions> </plugin>  The templateGenerator.groovy Script is only a few lines long: import java.io.File import groovy.text.GStringTemplateEngine def templateFile = "${project.basedir}/template.file" as File
def outputFile = "\${project.build.directory}/dependencies.html" as File
outputFile.newWriter("UTF-8").withCloseable { writer ->
def engine = new GStringTemplateEngine()
def replacements = [ dependencies: project.dependencies ]
engine.createTemplate(templateFile).make(replacements).writeTo(writer)
}


The template file can contain any syntax that the GStringTemplate supports.

IMHO this approach supports the best of both worlds: with only a little groovy scripting magic you get the maximum flexibility of a templating engine that has access to all the internals of your project.

## Using adb tools in Linux to remove bloatware from my Samsung Galaxy Note 20 Ultra

Fitzcarraldo
, 13/06/2021 | Source: Fitzcarraldo's Blog

Samsung included a lot of bloatware on my Galaxy Note 20 Ultra 5G, and it is not possible to uninstall it using Play Store. However, it is possible to remove this stuff using adb tools. I got rid of the bloatware I don’t want very easily using the Linux version of the adb tools. I […]