Skip to content

Instantly share code, notes, and snippets.

View PatrickLang's full-sized avatar

Patrick Lang PatrickLang

  • Washington, USA
View GitHub Profile
@PatrickLang
PatrickLang / WindowsInsiderOnAzure.md
Last active April 21, 2023 18:02
Building a Windows Insider VM and running in Azure

Here's example steps for uploading a Windows VHD to Azure. I initially built mine using this Packer script, then used PowerShell to convert it - Convert-VHD -VHDType Fixed -Path <source.vhdx> -DestinationPath WindowsServer2016Insider.vhd, and last the Azure CLI 2.0 to upload it.

az login

# If you need to use a specific subscription, then 
# az account set --subscription <subscription name>

# Resource group to contain all resources
@PatrickLang
PatrickLang / Fedora_33_notes.md
Last active March 4, 2023 19:59
Fedora 33 Notes

This is just a few things I'll probably forget later

Dual boot with encryption & hibernation

  1. Disable secure boot in BIOS if you want hibernation in Linux
  2. Shrink Windows partition using diskmgmt.msc
  3. Boot off Fedora live ISO
  4. Choose install, do manual partitioning with blivet
  • Mount existing EFI partition at /boot/efi
  • Create /boot partition
@PatrickLang
PatrickLang / README.md
Last active March 4, 2023 05:49
Setting up a multi-arch Kubernetes cluster on ODroid HC-1 and Pine64 Rock64
@PatrickLang
PatrickLang / README.md
Last active February 24, 2023 20:05
Yubikey + Windows

Using a Yubikey 4 on Windows

These are my notes on how to set up GPG with the private key stored on the hardware Yubikey. This will reduce the chances of your GPG private key from being stolen, and also allow you to protect other secrets such as SSH private keys.

It's just some notes and a partial worklog for now, but I may turn it into a full blog post later.

@PatrickLang
PatrickLang / winpe_bitlocker.md
Created April 13, 2017 00:04 — forked from anonymous/winpe_bitlocker.md
Making a WinPE device that can unlock a bootlocker'd drive

Adapted from http://digitalhacksblog.blogspot.com/2015/01/it-worked-for-me-winpe-bitlocker-and.html, updated for Windows 10

C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools>dism /mount-wim /wimfile:c:\winpe_amd64\media\sources\boot.wim /index:1 /mountdir:c:\winpe_amd64\mount

Deployment Image Servicing and Management tool
Version: 10.0.14393.0

Mounting image
[==========================100.0%==========================]
@PatrickLang
PatrickLang / README.md
Last active October 6, 2022 05:37
Testing SuSE Advanced Linux Platform (ALP) on Hyper-V

Background

The initial [ALP Announcement] was this week, and the [ALP Deployment] instructions only cover how to test it on KVM. Since all of the support needed for Hyper-V is in upstream Linux, I thought I would give it a try. Technically this is all feasible, it's just a matter of making sure the right kernel options (or modules) are compiled in, and that the VM is configured appropriately

What's Needed

  • Get the qcow image from [ALP Download]
  • Download a qemu-img build for Windows from my friends at CloudBase
@PatrickLang
PatrickLang / dstar user export 091716_cleaned.csv
Created September 19, 2016 18:22
Repeater list for Icom ID-51A focused on US & Pacific Northwest D-Star and FM repeaters, and other D-Star repeaters across US
Group No Group Name Name Sub Name Repeater Call Sign Gateway Call Sign Frequency Dup Offset Mode TONE Repeater Tone RPT1USE Position Latitude Longitude UTC Offset
4 Canada Blenheim Ontario VA3IBA C VA3IBA G 145.79 DUP- 0 DV OFF 82.5Hz Yes Approximate 42.34 -81.98 -5:00
4 Canada Toronto Ontario VA3MCU C VA3MCU G 144.91 DUP- 0 DV OFF 82.5Hz Yes Approximate 43.7 -79.39 -5:00
4 Canada Mississauga Ontario VA3PMO B VA3PMO G 444.25 DUP+ 5 DV OFF 82.5Hz Yes Approximate 43.59 -79.64 -5:00
4 Canada Toronto Ontario VA3SLU B VA3SLU G 442.4125 DUP+ 5 DV OFF 82.5Hz Yes Approximate 43.97 -79.43 -5:00
4 Canada Sault Ste. Marie Ontario VA3SNR C VA3SNR G 145.21 DUP- 0.6 DV OFF 82.5Hz Yes Approximate 46.55 -84.32 -5:00
4 Canada Sudbury Ontario VA3SRG C VA3SRG G 147.09 DUP+ 0.6 DV OFF 82.5Hz Yes Approximate 46.5 -81 -5:00
4 Canada Windsor Ontario VA3WDG B VA3WDG G 445.825 DUP- 0 DV OFF 82.5Hz Yes Approximate 42.25 -82.96 -5:00
4 Canada Windsor Ontario VA3WDG C VA3WDG G 145.61 DUP- 0 DV OFF 82.5Hz Yes Approximate 42.25 -82.96 -5:
@PatrickLang
PatrickLang / systemd-oomd-learnings.md
Last active June 23, 2022 06:12
learning about systemd-oomd

systemd-oomd was enabled by default in Fedora 33, and more recently Ubuntu 22.04. After trying some large software builds on these distros, I ran into some unexpected problems.

Overall, I think this is a good thing for most users, but I need to tune the defaults for cases where I'm willing to give up some responsiveness for reliability under heavy load.

Hard learnings

Where'd my build go?

  • Don't run a huge build process with too many threads in Gnome Terminal. Each one has its own cgroup slice, and if too much memory/swap are consumed or too much pressure - the slice is killed. You can't see what was going on when it was killed unless you were tee'ing it to a file
  • Podman also creates 1 cgroup slice per container, but at least you may be able to get some clues from podman container ls and logs
@PatrickLang
PatrickLang / README.md
Last active March 16, 2022 13:06
Experiments with namespaces on Windows Pods
  1. kubectl create -f iis-multi.yml

  2. Log into the node

I can see the three containers running - pause, iis and windowswebserver. If I do a docker exec ... tasklist on each one, the processes listed are separate.

docker ps |select-string p7rm7
@PatrickLang
PatrickLang / Steps.md
Last active February 4, 2022 04:40
Tracing Bluetooth Audio in Windows 10

Collecting the trace

Windows has the tools needed to collect traces for the bluetooth stack built-in, they just need to be configured. There are step by step instructions and scripts at Microsoft/busiotools, but I have copied some of the relevant details below.

To start the trace, create a temporary directory, then run this from an admin PowerShell prompt:

wget https://github.com/Microsoft/busiotools/raw/master/bluetooth/tracing/BluetoothStack.wprp -outfile .\BluetoothStack.wprp