Skip to content

Instantly share code, notes, and snippets.

View lundman's full-sized avatar

Jorgen Lundman lundman

View GitHub Profile
@lundman
lundman / test.S
Last active March 1, 2023 10:30
Testing macros in clang
.macro bytereg reg
.if \reg == %r8 || \reg == %r9 || \reg == %r10 || \reg == %r11 || \reg == %r12 || \reg == %r13 || \reg == %r14 || \reg == %r15
.set breg, \reg\()b
.elseif \reg == %rax
.set breg, %al
.elseif \reg == %rcx
.set breg, %cl
.elseif \reg == %rdx
.set breg, %dl
@lundman
lundman / Win FS events monitoring
Last active June 6, 2023 06:06
Monitoring filesystem events/changes with powershell
* Load PowerShell
PS C:\WINDOWS\system32>
$watcher = New-Object System.IO.FileSystemWatcher
$watcher.IncludeSubdirectories = $true
$watcher.Path = 'E:\'
$watcher.EnableRaisingEvents = $true
$action =
{
$path = $event.SourceEventArgs.FullPath
@lundman
lundman / details.md
Last active April 5, 2025 18:33
Attempting IP6 with auひかり using EdgeRouter

au HIKARI is DUID-LL and should be represented as "00:03:00:01:xx:xx:xx:xx:xx:xx"

So using MAC address aa:bb:cc:dd:ee:ff

My WAN is eth1

configure
set interfaces ethernet eth1 dhcpv6-pd duid "00:03:00:01:aa:bb:cc:dd:ee:ff"
@lundman
lundman / notarytool_remote.sh
Created December 9, 2023 04:51
xcrun notarytool replacement for macOS 10.14 using ssh
#!/bin/bash
#
# Replacement commandline tool of "notarytool" for 10.14.
# Will ssh to host specified and run "xcrun notarytool" on
# that server.
#
# Arguments are copied as is, and expects the last argument to
# be the filename.
#
# notarytool_remote.sh submit --wait