Wed, 15 Jan 2025

1:38 PM - C++20 features

I'm starting to see software that requires C++20 std::range functions such as MySQL 8.4+.  This is a blocker for older LLVM versions on some operating systems.  (versions before 17 don't fully support it, and even then there are still one or two optional things)

()

Tue, 24 Dec 2024

12:22 AM - Micronaut Server Compression

Micronaut 3.9.4 does not support disabling compression in HTTP server responses.  There is a workaround though.  

Create a CustomHttpCompressionStrategy bean

@Primary
@Singleton
public class CustomHttpCompressionStrategy implements HttpCompressionStrategy {
public boolean shouldCompress(io.netty.handler.codec.http.HttpResponse response) { 
return false;
} 

public int getCompressionLevel() {

return 0;
}
}

()

Mon, 16 Dec 2024

4:45 PM - Outdated Dependencies song (to the tune of i'm alright)

Verse 1:
I’m outdated, can’t you see?
These dependencies are killing me.
Versions lagging, what a mess,
APIs need some freshness.Chorus:
I’m outdated, oh it’s clear,
Time to update, let’s shift the gear.
Dependencies, they’re holding tight,
Gotta fix this, make it right!Verse 2:
Old libraries, they just won’t play,
Security risks in every way.
I’m stuck here with legacy code,
Need to lighten this heavy load.Chorus:
I’m outdated, oh it’s clear,
Time to update, let’s shift the gear.
Dependencies, they’re holding tight,
Gotta fix this, make it right!Bridge:
Let’s refactor, clean it up,
With newer tools we’ll fill the cup.
APIs can shine so bright,
When we update and do it right!Chorus:
I’m outdated, oh it’s clear,
Time to update, let’s shift the gear.
Dependencies, they’re holding tight,
Gotta fix this, make it right!Outro:
So let’s move on and take a stand,
With fresh updates we’ll be grand.
No more worries in the night,
We’ll keep our APIs running right!

()

Sun, 8 Dec 2024

1:36 PM - Reading corrupted files on *NIX systems

There's a utility called ddresuce that can be used to read corrupted files from various file systems.  

First pass:
ddrescue -n -v /path/to/source_file /path/to/destination_file logfile

Second pass using same logfile:

ddrescue -d -r3 /path/to/source_file /path/to/destination_file logfile

This can often read or partially read files and can skip bad blocks.

()

Tue, 26 Nov 2024

4:43 PM - OVH and FreeBSD hosts with IPV6

So I struggled getting FreeBSD or MidnightBSD ipv6 working on OVH.  The instructions are a little off.  The prefixlen has to be larger than it's allocated (for 64 it needs to be 56) and this is because the gateway ip is not in the /64 block.  It won't route no matter what you do with static routes, fe80 link locals, etc.

()

Mon, 21 Oct 2024

2:35 PM - Disable recall in windows 11 24h2

$RecallEnabled = Dism /online /Get-FeatureInfo /FeatureName:Recall | findstr /B /C:"State" If ($RecallEnabled -Match 'State : Enabled') { DISM /Online /Disable-Feature /featurename:Recall }else{Write-Host "Recall Disabled" }

()

Mon, 27 May 2024

3:04 PM - Windows on ARM experience

I bought a cheap Dell Inspiron with a qualcomm snapdragon cx gen2.  

First, the laptop couldn't get out of Windows s mode for two days.  That meant I couldn't install any third party programs like chrome, firefox, vscode or java.  it also failed to install many apps from the windows app store until today.

Gaming doesn't work fully.  While I expected many games to not be ported to arm, the game services installer needed for the xbox app fails on this CPU.  It throws dll errors constantly on login/reboot of windows or when trying to launch the xbox app. I reported this to microsoft.  A few games were installable on the device such as the microsoft jigsaw app and minecraft.

Thunderbird and virtualbox are not available on windows/arm64.  In fact, there are no VM apps available from third parties so far.  I found that hyper-v is available, but requires a pro windows license. I haven't paid the 99 dollars to find out if it works.

Battery life is good.  I'm seeing about 25% per 2-2.5 hours of use.  I'm down to 30% remaining since I got the device on saturday.  I've only charged it once.

This arm chip is not the new snapdragon elite x with the AI crap.  It's an older ARM chip so there are possibilities for some things to work on the upcoming platform that don't here.  Still, it's interesting to see the state of arm on windows.

Edge and chrome are fast on the device.  Firefox feels a little slugish compared to using it on windows x86_64 or linux. 

I was able to setup wsl on the device with debian.  None of the ubuntu installers worked despite some listing arm64 support.  I had to go cli and run the wsl --update and wsl --install -d Debian to get there though.

()

Sat, 30 Mar 2024

4:36 PM - xz vulnerability

github has blocked the xz repository which makes it more difficult for OS projects to track what is going on with the malware. Instead of blocking the repo, they should have put a warning up and blocked downloads of the affected tarballs.

()

Sun, 4 Feb 2024

4:44 PM - Updating a PS3 to a SSD

I've been working on migrating my PS3 to a WD red 500GB ssd from the original 80GB toshiba hard drive.  The hardware part is easy.  For the software, you have to download the PS3 update from Sony's playstation website and then put it on a USB flash drive on PS3/UPDATE/ with the file named as downloaded.  It will pick it up and load.  Then you do an initial setup and then start the restore process.  (assumes you have a backup from old drive ahead of time)

It takes like an hour to backup and another hour to restore

()

Thu, 11 Jan 2024

6:05 PM - Setting up mandoc man.cgi on MidnightBSD

Mandoc (mdocml) includes a man.cgi(8) script to display man pages.  Here's a quick and dirty explanation on how to set it up.

  • mport install mdocml 

  • Files will be installed in /usr/local/www/mdocml/

  • Configure apache

  • Configure man directory

create a directory /man on your file system. This is the default path. 

in it, create a file called manpath.conf

it should have a RELATIVE path for one or more directories (per line) that you want to index. 

so /man/midnightbsd-3.1

copy the man1, man2, and so on folders from /usr/share/man for your release. 

extract all of then with gunzip

run makewhatis -a . from the /man/midnightbsd-3.1 folder.  This will create your mandoc.db file. 

Apache config

<VirtualHost *:80>
        Protocols h2c http/1.1
        H2Direct on
        DocumentRoot /usr/local/www/mdocml/htdocs/
        ServerName man.midnightbsd.org
        ErrorLog /var/log/man.midnightbsd.org-error_log
        CustomLog /var/log/man.midnightbsd.org-access_log combinedio
        RedirectMatch ^/$ /cgi-bin/man.cgi
        <Directory /usr/local/www/mdocml/>
        DirectoryIndex man.cgi index.html
        Require all granted
       
        ScriptAlias /cgi-bin/ "/usr/local/www/mdocml/cgi-bin/"
        <Location "/cgi-bin/man.cgi">
        Options +ExecCGI
        SetHandler cgi-script
       

()

Sat, 6 Jan 2024

7:13 PM - vm-bhyve quick start for MidnightBSD

1\. mport install vm-bhyve
2\. vm init
6\. cp /usr/local/share/examples/vm-bhyve/* /mountpoint/for/vm/.templates/
7\. vm switch create public
8\. vm switch add public em0
9\. vm iso https://midnightbsd.org/ftp/MidnightBSD/releases/amd64/ISO-IMAGES/3.1.3/MidnightBSD-3.1.3--amd64-disc1.iso
10\. vm create myguest
11\. vm install [-f] myguest MidnightBSD-3.1.3--amd64-disc1.iso
12\. vm console myguest

Here's an example template for midnightbsd. 

loader="bhyveload"
cpu=3
memory=4096M
network0_type="virtio-net"
network0_switch="public"
disk0_type="virtio-blk"
disk0_name="disk0.img"
disk0_size="90"

()

7:09 PM - HPE DL20 Gen9 Configuration issues with Linux

I had a lot of issues getting HPE DL20 gen9 server working with Linux today.  It won't even boot with ubuntu server 23.10 or the LTS release. It would hang with constant resets on the SSA. 

Disabling SSA and going to AHCI mode in the bios allowed me to boot debian 12 after a lot of trial and error.

()

6:53 PM - Using HPE ILM v4

If you need to use HPE ILM v4 on a server, there is usually a sticker on the server with the default hostname and username/password combination.  You can then hit that with a web browser to the standard port and login.

In the bios, you can also add users and set permissions for it.

()

6:51 PM - HPE dl20 gen9 debian 12 software

If you need to install HPE management software in linux for the agent or ssa configuration, do the following

create a file in /etc/apt/sources.list.d/

deb http://downloads.linux.hpe.com/SDR/repo/mcp/debian/ bookworm/12.80 non-free non-free-firmware

for keys:

curl -fsSL https://downloads.linux.hpe.com/SDR/hpPublicKey2048.pub | gpg --dearmor -o /usr/share/keyrings/hpPublicKey2048.gpg
curl -fsSL https://downloads.linux.hpe.com/SDR/hpePublicKey2048_key1.pub | gpg --dearmor -o /usr/share/keyrings/hpePublicKey2048_key1.gpg
curl -fsSL https://downloads.linux.hpe.com/SDR/hpPublicKey2048_key1.pub | gpg --dearmor -o /usr/share/keyrings/hpPublicKey2048_key1.gpg

For agent:

apt install amsd

For ILM (LOM)
apt install hponcfg

()

Tue, 24 Oct 2023

12:10 AM - Tuning for search engine traffic

When you have a small site, the worst-case scenario is a spider indexing you that doesn't honor robots.txt.  Yandex is particularly bad about this.  Trying to tune for a large indexing operation becomes the bottleneck. 

It's effectively the load test.

()

Fri, 15 Sep 2023

4:17 PM - The problem with benchmarks

I frequently see folks arguing about CPUs to buy.  Many want everyone to buy a 5600x or 12600k or some other variant that's last gen and cheap.  The idea is that gamers don't need anything more so these should be the only choices for 99% of the world.  

The problem with that is gaming and even more specifically, people who would build their own PC also are a very niche group also.  If you think the most common workload should dictate all benchmarks, we'd only benchmark Microsoft Office apps and web browsers. That's what most people use a computer for right?  

Don't be that guy who thinks his own use case is the only one that matters.  

I care about compiler and lzma performance more than anything else when selecting a CPU.  Other people need to make youtube videos, play games, work on AI/ML workloads, CAD, or other tasks.  It's not universal. That's what is great about PCs and not so great about modern Macs.

()