Skip to content

Instantly share code, notes, and snippets.

View monsieurp's full-sized avatar

monsieurp

  • Planet Earth
  • 07:25 (UTC +02:00)
View GitHub Profile
@monsieurp
monsieurp / netbsd-ffs-cgd-uefi.txt
Last active May 1, 2025 14:53
Install NetBSD 10.1 with FFS and CGD encryption on a UEFI based system.
## Introduction
I want to install NetBSD 10.1 alongside Windows 11 and FreeBSD 14.2. I'm using rEFInd to boot into either one of these OSes.
## Commands
1. Create a bootable FreeBSD amd64 USB key. Go to http://ftp.fr.netbsd.org/pub/NetBSD/images/10.1
and download NetBSD-10.1-amd64-install.img.gz.
2. Burn the image onto a USB disk (dd or rufus). Make sure to enable the UEFI mode if you burn the ISO with rufus.
3. Boot off of the USB key and into the FreeBSD live system.
@monsieurp
monsieurp / freebsd-ufs-geli-efi.txt
Last active May 1, 2025 13:43
Install FreeBSD 14.1 with UFSv2 and GELI encryption on a UEFI based system.
These are my notes for installing FreeBSD on a UEFI based system using the UFSv2 filesystem and encrypting it with GELI.
## Introduction
I've set up Windows 11 on my Lenovo x280. I now want to install FreeBSD alongside Windows 11.
I've already replaced the default UEFI boot manager with rEFInd. Now comes the FreeBSD installation. Let's go.
## Commands
1. Create a bootable FreeBSD amd64 USB key. Go to https://www.freebsd.org and download the latest release.
@monsieurp
monsieurp / install-refind-windows-11.txt
Last active May 1, 2025 13:42
Install rEFInd on Windows 11 to allow for booting into multiple OSes.
These are my notes to install rEFInd on the Windows 11 EFI partition. A lot of inspiration came from
the following YT video: https://www.youtube.com/watch?v=OgipyyaxSmE. I did some research on the side too.
## Introduction
On UEFI based systems, the Windows 11 installer creates a 100 MB FAT 32 formatted partition. By default, Windows 11 installs
its own bootloader on this partition. We will install rEFInd instead to pick an OS to boot into at boot time.
## Installation
#!/usr/bin/env perl
use warnings;
use autodie;
use strict;
use feature qw#say#;
use Curses::UI;
use File::Find;
use vars qw#*name#;
@monsieurp
monsieurp / listbox.pl
Created July 13, 2020 17:52
Centered window and listbox demo using Perl Curses::UI module
#!/usr/bin/env perl
use warnings;
use strict;
use Curses;
use Curses::UI;
my $cui = Curses::UI->new(
-color_support => 1,
-clear_on_exit => 1
@monsieurp
monsieurp / window_centered.pl
Last active July 13, 2020 17:49
Create a centered window with a label using Perl Curses::UI module
#!/usr/bin/env perl
use warnings;
use strict;
use Curses;
use Curses::UI;
my $cui = Curses::UI->new(
-color_support => 1,
-clear_on_exit => 1
@monsieurp
monsieurp / urwid-bananas-apples-dialog.py
Last active June 23, 2020 19:44
dialog(1) like example with urwid using a single main loop.
#!/usr/bin/env python3
import urwid
from urwid import MainLoop
import time
import sys
import os
PALETTE = [
('s1_titlebar', 'white,bold', 'yellow'),
('s2_titlebar', 'white,bold', 'light green'),
@monsieurp
monsieurp / main.dart
Last active March 17, 2019 17:41
Dart classes
class Clazz {
static List<String> elements = ["foo", "bar"];
}
void main() {
var n = Clazz.elements;
for (int i = 0; i < n.length; i++) {
print(n[i]);
}
}
@monsieurp
monsieurp / blkid2fstab.bash
Created January 16, 2018 10:41
Parse the blkid output and turn it into a fstab compatible file.
#!/usr/bin/env bash
tmpfile=$(mktemp /tmp/blkid2fstab.XXXXXX)
blkid -o list | while read -r l; do
[[ ! ${l} =~ (^/dev/sd) ]] && continue
IFS=" " read -a line <<< "${l}"
fs="${line[1]}"
mountpt="${line[2]}"
uuid="UUID=${line[3]}"
package org.gentoo.java;
import static org.objectweb.asm.Opcodes.ACC_PUBLIC;
import static org.objectweb.asm.Opcodes.ACC_STATIC;
import static org.objectweb.asm.Opcodes.ACC_SUPER;
import static org.objectweb.asm.Opcodes.ALOAD;
import static org.objectweb.asm.Opcodes.ATHROW;
import static org.objectweb.asm.Opcodes.INVOKESPECIAL;
import static org.objectweb.asm.Opcodes.RETURN;
import static org.objectweb.asm.Opcodes.V1_5;