Skip to content

Instantly share code, notes, and snippets.

@yorickdowne
yorickdowne / README.md
Last active December 18, 2025 11:30
How to resize a netcup VPS disk after contract upgrade

Resizing a netcup VPS disk after upgrading the contract to a bigger one

From the comments, this is possible without rescue mode in Linux.

Identify the root partition / with df -h and lsblk and then run something like the below. This one assumes the root partition is vda3; adjust for yours.

df -h output, this shows /dev/vda3 as the partition for /:

/dev/vda3       2.0T  1.9T   20G 100% /
@debold
debold / Get-MgUserLicenseLogonReport.ps1
Last active December 18, 2025 11:27
Quick Office 365 user export with license details and last logon
# Warning: PowerShell ternary operator (a ? b : c) in use. Needs PowerShell 7+!
# Install Microsoft Graph API module if not already there
# Install-Module Microsoft.Graph
# Need to select beta profile in order to get logon statistics
Select-MgProfile -Name "beta"
# You'll need auditlog read access for logon statistics
Connect-MgGraph -Scopes "User.Read.All", "Group.ReadWrite.All", "AuditLog.Read.All"
# Load SKU list
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active December 18, 2025 11:25
set -e, -u, -o, -x pipefail explanation
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active December 18, 2025 11:24
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@tdcosta100
tdcosta100 / WSL2GUIWSLg-Wayland-en.md
Last active December 18, 2025 11:20
Using full desktop shell in WSL2 using WSLg (Wayland)

Full desktop shell in WSL2 using WSLg (Wayland)

Note

If you want a more complete experience and already tried the Xvnc tutorial, maybe you should try the WSLg (Xwayland) instead.

Warning

This is a work in progress tutorial. Things done here may break existing functionality, so be careful!

In this tutorial, we will install and use a full GNOME Desktop environment in WSL2, without any external software. The only requirement is a working WSLg installation. At the moment, the instructions are only for Ubuntu (20.04, 22.04 and 24.04) distros and GNOME, but you can request me to test other distros and desktop environments.

@bloodrabbit51
bloodrabbit51 / Network_Bridge_Wsl2.md
Created October 3, 2025 18:39
Network_Bridge_Wsl2.md

WSL2 Dual Network Setup (NAT + Bridged)

This guide explains how to configure WSL2 to use two network interfaces, similar to VirtualBox with NAT + Bridged adapters.
With this setup, your WSL2 instance will have:

  • A NAT interface (172.22.x.x) → default WSL2 network, always online
  • A Bridged interface (192.168.x.x) → direct LAN access with its own IP

1. Default NAT Interface

@blattmann
blattmann / Git: Empty branch.md
Last active December 18, 2025 11:15
Git: Create empty branch

Replace empty-branch with your desired branch name.

git checkout --orphan empty-branch

Then you can remove all the files you'll have in the staging area (so that they don't get committed):

git rm -rf .

At this point you have an empty branch, on your machine.

@bitzodothtml
bitzodothtml / index.html
Created November 18, 2025 17:47
ascii pendulum
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ASCII Pendulum Harmonics</title>
<style>
body {
margin: 0;
background: black;
font-family: monospace;
@angela-d
angela-d / gpg-key-migration.md
Created April 1, 2018 23:57
Move GPG Keys from One Machine to Another

Migrate GPG Keys from One Workstation to Another

Replace [your key] with your key ID

To obtain your key ID

gpg --list-secret-keys --keyid-format LONG

Which returns something like

@hybridherbst
hybridherbst / RuntimeInitializeOnLoad - Event Order.cs
Created March 8, 2021 15:04
[RuntimeInitializeOnLoad] Event Order
static Lifecycle() => Debug.Log(Prefix + "Static Constructor");
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] static void Subs() => Debug.Log(Prefix + "Subsystem Registration");
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterAssembliesLoaded)] static void AfterAsm() => Debug.Log(Prefix + "AfterAssembliesLoaded");
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)] static void BeforeSlash() => Debug.Log(Prefix + "Before Splash");
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] static void BeforeScene() => Debug.Log(Prefix + "BeforeScene");
private void Awake() => Debug.Log(Prefix + "Awake");
private void OnEnable() => Debug.Log(Prefix + "OnEnable");
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)] static void AfterScene() => Debug.Log(Prefix + "AfterSceneLoad");
[RuntimeInitializeOnLoadMethod] static void DefaultLog() => Debug.Log(Prefix + "RuntimeInit Default");
void Start() => Debug