Skip to content

Instantly share code, notes, and snippets.

@oskar456
oskar456 / README.md
Last active December 14, 2024 15:32
CLAT for Linux using Jool and ipvlan PoC

CLAT for Linux using ipvlan

This proof of concept uses ipvlan feature of Linux to split up main network interface into two in order to use one in a separate namespace with jool-siit performing CLAT translation.

This way, enabling CLAT is least intrusive to the default network namespace - no need to enable forwarding or touch firewall rules.

@fsimonis
fsimonis / focusrite.conf
Last active February 10, 2024 05:43
Pipewire remapping of Focusrite Scarlett 2i4 to mono input and stereo output
# This is a remapping of the Focusrite Scarlett 2i4 to Mono input and Stereo output
# Place this file in ~/.config/pipewire/pipewire.conf.d/
# Then reload pipewire sudo systemctl reload --user pipewire.service
# Use pw-link --input and pw-link --output to find the name of the output and input device.
# The list will contain one line per port, but you will need the name of the device node.
# The format is <name of the device node>:<name of the port>.
# We need to configure two loopback modules. One for the sink and one of the source
context.modules = [
@Hippo0o
Hippo0o / sway-decouple-client-and-container-fullscreen.patch
Last active November 24, 2024 15:42
sway-decouple-client-and-container-fullscreen
From f28ac118a8f8f4b58953756dbd9c34fa30e3f8cb Mon Sep 17 00:00:00 2001
From: Tobias S <[email protected]>
Date: Sun, 13 Mar 2022 21:30:50 +0100
Subject: [PATCH] decouple client and container fullscreen restore i3
fullscreen behaviour for wayland windows
---
include/sway/tree/container.h | 2 ++
sway/desktop/xdg_shell.c | 1 +
sway/desktop/xwayland.c | 1 +
@numToStr
numToStr / au.lua
Last active August 20, 2023 05:15
Neovim autocmd in lua
--
-- Move this file to your neovim lua runtime path ie. ~/.config/nvim/lua/au.lua
--
local cmd = vim.api.nvim_command
local function autocmd(this, event, spec)
local is_table = type(spec) == 'table'
local pattern = is_table and spec[1] or '*'
local action = is_table and spec[2] or spec
if type(action) == 'function' then
@sindresorhus
sindresorhus / esm-package.md
Last active April 26, 2025 12:29
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@rometsch
rometsch / BH456A_linux_driver.md
Last active October 16, 2023 08:16
MPOW BH456A Bluetooth USB Adapter Kernel Module Adjustements (Realtek RTL8761B chip)

Problem

The MPOW Bluetooth 5 dongle (Model: BH456A) does not work out of the box on Ubuntu 20.04 (kernel 5.4.0-42).

Solution

Patch the bluetooth kernel module and copy the firmware binaries to /lib/firmware.

Copy the fimware

@MiyacoGBF
MiyacoGBF / 01_NieR_FAR.md
Last active March 19, 2025 23:38
How to Install FAR, HD Texture Pack, and ReShade (GShade) for NieR:Automata on Linux
@danderson
danderson / nat64.md
Created October 7, 2019 01:16
NAT64 all in kernel mode

I'm writing this up as a gist, because I'm not sure I'll pursue any of it, but it seems worth writing down.

A basic problem with IPv6-only LANs at the moment is that you still need support for legacy protocol servers, which implies you doing some kind of DNS64 and NAT64 (IPv6-to-IPv4 stateful translation).

Currently, NAT64 only exists outside the kernel, as userspace software. This is not ideal because it limits available performance (since you have to keep bouncing between user space and kernel space),

@user5145
user5145 / flatpak install
Last active November 20, 2024 13:59
how to build, install and remove flatpak applications from cli
1. Store in a repository
flatpak-builder --force-clean build-dir --repo=/path/to/local/repo your.application.Client.yml
2. Install from the repository
flatpak --user install localrepo your.application.Client
3. Install the repository
flatpak --user remote-add --no-gpg-verify local-repo /path/to/repo
4. Store in a folder

introduction

Today I received a notification that TLSe which uses libtomcrypt and libtommath had an issue on Big-Endian MIPS32.

I took this as a reason to finally write down this tutorial on how to build a toolchain, linux kernel and root-fs for a foreign architecture, in this example MIPS32, with Buildroot to run your cross-compiled software on.

We also need QEMU to run all this and I use the system-provided QEMU version in this example. Building QEMU is pretty straight-forward if you follow their examples if you want to build it from source. so I also describe the build process of QEMU for MIPS32.

First let's say the most important, the Buildroot&QEMU documentation is fine and pretty complete and this basically just sums up all the quirks I had to get this up and running.