Skip to content

Instantly share code, notes, and snippets.

View chhaugen's full-sized avatar

Carl Henning Haugen chhaugen

  • Norway, Østfold
View GitHub Profile
@chhaugen
chhaugen / README.md
Last active September 17, 2026 01:29 — forked from alaraun/README.md
Quectel QMI/QMAP on vanilla OpenWrt (Zyxel NR7101, ramips/mt7621)

Quectel QMI/QMAP on vanilla OpenWrt (Zyxel NR7101, ramips/mt7621)

Build the Quectel qmi_wwan_q driver (QMI + QMAP USB aggregation), the quectel-CM connection manager, and a LuCI interface protocol as installable OpenWrt packages — so a 5G/LTE Quectel modem runs in high-throughput QMI mode and is configurable from Network → Interfaces like any other WAN.

Tested on a Zyxel NR7101 (modem: Quectel RG502Q-EA) on OpenWrt 25.12.x (ramips/mt7621, kernel 6.12).

@chhaugen
chhaugen / NodaTimeValueParserExtensions.cs
Created September 14, 2026 23:02
Add Value Parser For NodaTime based on NodaTime.Serialization.SystemTextJson
using FastEndpoints;
using NodaTime;
using System.Text.Json;
using System.Text.Json.Nodes;
namespace Api.Extensions;
public static class NodaTimeValueParserExtensions
{
public static void ValueParserForNodaTime(this BindingOptions options, JsonSerializerOptions jsonSerializerOptions)
import requests
import os
import re
download_folder = r"<lokal mappe sti>"
os.makedirs(download_folder, exist_ok=True)
# F12 på apex, finn api-forespørselen som ligner, bytt ut leilighetsnummeret.
# I Request headers feltet, finn cookies og lim det inn under også.
@chhaugen
chhaugen / WordleHelper.cs
Created September 4, 2025 08:45
WordleHelper
using static System.Console;
int aNumber = 0x41;
List<char> letters = Enumerable
.Range(0, 26)
.Select(x => (char)(aNumber + x))
.ToList();
List<(char, LetterState)[]> wordleGame = [
[('X', LetterState.Black), ('X', LetterState.Black), ('X', LetterState.Black), ('X', LetterState.Black), ('X', LetterState.Black),],
@chhaugen
chhaugen / LaunchLittleBigMouseHook.vbs
Last active July 2, 2026 05:13
LittleBigMouse non-admin user workaround
Set shell = CreateObject("WScript.Shell")
shell.CurrentDirectory = "C:\ProgramData"
shell.Run """C:\Program Files\LittleBigMouse\LittleBigMouse.Hook.exe""", 0
@chhaugen
chhaugen / google_search_maps_addon.user.js
Last active April 17, 2024 11:36 — forked from Daan-Grashoff/README.md
Bring back the google maps button when searching on google
// ==UserScript==
// @name Google maps addon
// @namespace http://tampermonkey.net/
// @version 2024-03-21
// @description Bring google maps button back
// @author You
// @match https://www.google.com/search*
// @include https://www.google.tld/search*
// @icon https://www.google.com/images/branding/googleg/1x/googleg_standard_color_128dp.png
// @grant none
@chhaugen
chhaugen / SignalAutoWin10.md
Last active April 21, 2021 22:16
How to make Signal open (as a tray icon) on startup on Windows 10

How to make Signal open (as a tray icon) on startup on Windows 10

Copying the shortcut:

  1. Select the Start button and scroll to find Signal.
  2. Right-click Signal, select More, and then select Open file location. This opens a file folder window for the location where the shortcut of Signal is saved.
  3. With the file location open, press the Windows logo key + R, type shell:startup, then select OK. This opens the Startup folder. You now have 2 folder windows open: "Programs" and "Startup".
  4. Copy and paste the Signal shortcut from the "Programs" file folder window to the "Startup" folder by right-clicking on Signal shortcut, Copy, go to Startup folder, right-click, Paste Shortcut.

Editing the shortcut:

@chhaugen
chhaugen / UnprivilegedLXCContainersMappingNotes.txt
Last active February 28, 2021 02:33
Notes that helped me figure out the mapping scheme.
To me, it seams like its supposed to remap all of the containers {u,g}ids.
So the important detail is that all of the containers id need to be maped, not the hosts.
Please correct me if I'm wrong.
I added "symbols" to make the syntax more readable, and some show the result on the nest line.
// https://www.reddit.com/r/homelab/comments/6p3xdw/proxmoxlxc_mount_host_folder_in_an_unprivileged/dkncmrc/
0 -> 100000 x 124
0-123 -> 100000-100123
124 -> 1004 x 1