Skip to content

Instantly share code, notes, and snippets.

View christian-korneck's full-sized avatar
💭
I may be slow to respond.

Christian Korneck christian-korneck

💭
I may be slow to respond.
View GitHub Profile
@christian-korneck
christian-korneck / start
Created September 22, 2025 01:21
Unix - start GUI app fully detached (windows `start <cmd>` equivalent)
#!/bin/bash
nohup "$@" > /dev/null 2>&1 &

generate NT Hash

script to generate the NT hash for a password string (for NTLMv2 auth, etc). OpenSSL config was tested on Fedora 42.

Usage

$ nthash --help
Generate NT Hash from password string.

Usage: nthash ''
@christian-korneck
christian-korneck / checkres.ps1
Created September 13, 2025 03:54
windows get resolution
Get-CimInstance -ClassName Win32_VideoController | Select-Object Name, CurrentHorizontalResolution, CurrentVerticalResolution, CurrentBitsPerPixel
@christian-korneck
christian-korneck / ghostty_config.md
Last active August 25, 2025 02:17
ghostty_config

remove some major annoyances:

  • TERM setting that is more compatible with most real world apps
  • != should be displayed as two characters, not one
  • don't ask when closing a tab (= don't block shutdowns/reboots)
#   ~/.config/ghostty/config

# https://github.com/ghostty-org/ghostty/discussions/3161
command = TERM=xterm-256color /usr/bin/bash

add to ~/.bashrc:

urldump() {
sudo tcpdump -i any -A -s 0 -l 'tcp' | awk '/GET|POST|PUT|DELETE|HEAD|OPTIONS|PATCH.*HTTP/ {match($0, /(GET|POST|PUT|DELETE|HEAD|OPTIONS|PATCH) ([^ ]+)/, arr); method=arr[1]; url=arr[2]} /^Host:/ {if(method) {print method, $2 url; method=""}}'}
GET localhost:8080/
GET localhost:5172/foo/bar
@christian-korneck
christian-korneck / proxmox_vmlookup.md
Last active August 24, 2024 03:02
Proxmox vmlookup - nslookup but for Proxmox VMs - Proxmox get VM IP

vmlookup - get IP(s) for Proxmox VM name

bash alias for a vmlookup command (nslookup but for Proxmox). Uses qm and jq.

install

put in .bashrc:

function vmlookup () {
@christian-korneck
christian-korneck / win11_compat.md
Last active November 8, 2024 00:04
Win11 install - bypass compatibility checks (no TPM, no UEFI, etc)

in Windows setup: SHIFT + F10 opens a cmd shell. Then regedit.

[HKEY_LOCAL_MACHINE\SYSTEM\Setup\LabConfig]
"BypassTPMCheck"=dword:00000001
"BypassSecureBootCheck"=dword:00000001
"BypassRAMCheck"=dword:00000001
"BypassStorageCheck"=dword:00000001
"BypassCPUCheck"=dword:00000001
"BypassDiskCheck"=dword:00000001
@christian-korneck
christian-korneck / powershell-grep.md
Last active April 14, 2024 12:54
Unix-like destructive grep in Powershell

Powershell pure text grep (grepp)

what

A grep command (grepp) in Powershell that lets you grep for a string in the text that would usually be printed in the terminal (not some other representation of the data). Output is a string, not a pipeline anymore - thus destructive.

why

To quickly grep through shell output without having to do where-object gymnastics.

@christian-korneck
christian-korneck / win11_boot_into_recoverymode.md
Last active March 24, 2024 10:56
windows 11: boot into recovery mode

A way to reboot into recovery mode (Windows boots into GUI with only minimal drivers loaded):

  • bcdedit /set "{current}" safeboot minimal
  • reboot. Machine will boot into recovery mode.
  • in recovery mode, disable it before rebooting: bcdedit /deletevalue "{current}" safeboot