Skip to content

Instantly share code, notes, and snippets.

- name: Overprovision like the pros'
hosts: all
tasks:
- name: Install early OOM killer and zram
ansible.builtin.apt:
pkg:
- earlyoom
- zram-tools
- name: Configure early OOM killer
ansible.builtin.lineinfile:
@pmarreck
pmarreck / comparison-of-shells.md
Last active October 20, 2025 07:14
Comparison of Bash, Elvish, NuShell, Murex, es-shell, fish, xonsh, PowerShell, Oil and Ion shells

(generated by chatgpt 4o and reviewed/edited by claude 3.5 sonnet, YMMV)

| Feature | Bash | Elvish | NuShell | Murex | Es Shell | Fish | Xonsh | PowerShell | Oil | Ion | |----------------------------------|-----------------------------------------------|-----------------------------------------------|----------------------------------------------|----------------------------------------------|----------------------------------------------|----------------------------------------------|----------------------------------------------|----------------------------------------------|-------------------------

@piaudonn
piaudonn / ids
Last active October 13, 2025 07:28
First-party Microsoft service principal ids
ACOM Azure Website,23523755-3a2b-41ca-9315-f81f3f566a95
AEM-DualAuth,69893ee3-dd10-4b1c-832d-4870354be3d8
ASM Campaign Servicing,0cb7b9ec-5336-483b-bc31-b15b5788de71
Azure Advanced Threat Protection,7b7531ad-5926-4f2d-8a1d-38495ad33e17
Azure Data Lake,e9f49c6b-5ce5-44c8-925d-015017e9f7ad
Azure Lab Services Portal,835b2a73-6e10-4aa5-a979-21dfda45231c
Azure Portal,c44b4083-3bb0-49c1-b47d-974e53cbdf3c
AzureSupportCenter,37182072-3c9c-4f6a-a4b3-b3f91cacffce
Bing,9ea1ad79-fdb6-4f9a-8bc3-2b70f96e34c7
CPIM Service,bb2a2e3a-c5e7-4f0a-88e0-8e01fd3fc1f4
@Computer-Tsu
Computer-Tsu / Prompt.txt
Last active November 20, 2025 14:51
Command prompt SET PROMPT for Microsoft Windows CMD
set prompt=$T$H$H$H$H$H$H$S%computername%\%username%$S$M$P$+$G
22:14 DESKTOP\User C:\Users\User>
set prompt=$T$H$H$H$H$H$H$S%UserName%@%ComputerName%$B$M$P$+$G
@six519
six519 / ntfs.md
Last active July 26, 2025 04:50
Read/write NTFS drive on macOS Ventura with Apple silicon processor

Configuring your Mac!

Change security settings

  • Shut down your Mac, then press and hold the power button until "Loading startup options" appear.
  • Select "Options"
  • In the menu on top of the screen, choose "Utilities" -> "Startup Security Utility".
  • Click "Security Policy"
  • Select "Reduced Security" and check "Allow user management of kernel extensions from identified developers".
  • Reboot
@TheJavaGuy
TheJavaGuy / AlphanumComparator.java
Created May 25, 2022 12:44
Implementation of Alphanumeric sorting by Dave Koelle
/*
* Copyright © 2021 Dave Koelle www.davekoelle.com/
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the “Software”), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@hashchange
hashchange / wsl-linux-path
Last active December 1, 2025 13:20
Safely converts a Windows path to a WSL (Linux) path. Does not suffer from the limitations of `wslpath -u`.
#!/usr/bin/env bash
# Script name
PROGNAME="$(basename "$BASH_SOURCE")"
if [[ "$1" == '--version' || "$1" == '-v' ]]; then
fmt -s <<- VERSION_TEXT
$PROGNAME 1.0.1
(c) 2022 Michael Heim
License: MIT
@mgeeky
mgeeky / Enumerate-URIHandlers.ps1
Created January 12, 2022 12:24
Enumerate Windows URI Handlers (Keys in HKEY_CLASSES_ROOT that contain "URL Protocol" values), examples: http:, calculator:, ms-officecmd:
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT -ErrorAction SilentlyContinue | Out-Null
$count = 0
try {
Get-ChildItem HKCR: -ErrorAction SilentlyContinue | ForEach-Object {
if((Get-ItemProperty $_.PSPath -ErrorAction SilentlyContinue).PSObject.Properties.Name -contains "URL Protocol") {
$name = $_.PSChildName
$count += 1
$line = "URI Handler {0:d4}: {1}" -f $count, $name
Write-Host $line
}
@b0gdanw
b0gdanw / DisableBigSur.sh
Last active September 23, 2025 05:44
Disable Big Sur services
#!/bin/zsh
#Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
#Disabling unwanted services on macOS 11 Big Sur (11) and macOS Monterey (12)
#Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
#Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist
# user
TODISABLE=()
@githubfoam
githubfoam / windows event logs cheat sheet
Last active November 23, 2025 12:55
windows event logs cheat sheet
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# PS : ChatGPT makes mistakes, consider "trust but verify" principle
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#Events to Monitor
https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/plan/appendix-l--events-to-monitor
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#run
eventvwr.msc Event viewer
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Event Viewer(Local)-Windows Logs (shutdown / restart )