Skip to content

Instantly share code, notes, and snippets.

View al3xtjames's full-sized avatar

Alex James al3xtjames

View GitHub Profile
# To set this up, first get tailscale working in an isolated linux shell:
# 1. sudo systemctl stop tailscaled.service
# 2. tailscaled -port 9993 -state tailscale-luks-setup.state -tun userspace-networking -socket ./tailscaled.sock
# 3. tailscale -socket ./tailscaled.sock up -hostname HOSTNAME-luks
# 4. tailscale -socket ./tailscaled.sock down
# 5. ctrl-c out of tailscaled
# 6 sudo systemctl start tailscaled.service
#
# Then add the .state file to your machine secrets and pass its path as tailscaleStatePath.
@al3xtjames
al3xtjames / Section_PE32_image_Setup_body.efi.0.0.en-US.ifr.txt
Created November 11, 2023 23:28
ASUS ProArt Z790-CREATOR WIFI BIOS 1303
This file has been truncated, but you can view the full file.
Program version: 1.5.0, Extraction mode: UEFI
FormSet Guid: 7B59104A-C00D-4158-87FF-F04D6396A915, Title: "Setup", Help: "Setup"
Guid Guid: 0F0B1735-87A0-4193-B266-538C38AF48CE, ExtendedOpCode: Class, Class: 0x1
Guid Guid: 0F0B1735-87A0-4193-B266-538C38AF48CE, ExtendedOpCode: SubClass, SubClass: 0x0
DefaultStore DefaultId: 0x0, Name: ""
DefaultStore DefaultId: 0x1, Name: ""
VarStore Guid: EC87D643-EBA4-4BB5-A1E5-3F3E36B20DA9, VarStoreId: 0xF101, Size: 0xD35, Name: "Setup"
VarStore Guid: 8BE4DF61-93CA-11D2-AA0D-00E098032B8C, VarStoreId: 0xF009, Size: 0x2, Name: "PlatformLang"
VarStore Guid: 8BE4DF61-93CA-11D2-AA0D-00E098032B8C, VarStoreId: 0xF00A, Size: 0x2, Name: "PlatformLangCodes"
@al3xtjames
al3xtjames / Section_PE32_image_Setup_body.efi.0.0.en-US.ifr.txt
Created October 29, 2023 02:12
ASUS ProArt Z790-CREATOR WIFI BIOS 1501
This file has been truncated, but you can view the full file.
Program version: 1.5.1, Extraction mode: UEFI
0x76618: FormSet Guid: 7B59104A-C00D-4158-87FF-F04D6396A915, Title: "Setup", Help: "Setup" { 0E A7 4A 10 59 7B 0D C0 58 41 87 FF F0 4D 63 96 A9 15 07 00 08 00 01 71 99 03 93 45 85 04 4B B4 5E 32 EB 83 26 04 0E }
0x7663F: Guid Guid: 0F0B1735-87A0-4193-B266-538C38AF48CE, ExtendedOpCode: Class, Class: 0x1 { 5F 15 35 17 0B 0F A0 87 93 41 B2 66 53 8C 38 AF 48 CE 03 01 00 }
0x76654: Guid Guid: 0F0B1735-87A0-4193-B266-538C38AF48CE, ExtendedOpCode: SubClass, SubClass: 0x0 { 5F 15 35 17 0B 0F A0 87 93 41 B2 66 53 8C 38 AF 48 CE 04 00 00 }
0x76669: DefaultStore DefaultId: 0x0, Name: "" { 5C 06 02 00 00 00 }
0x7666F: DefaultStore DefaultId: 0x1, Name: "" { 5C 06 02 00 01 00 }
0x76675: VarStore Guid: EC87D643-EBA4-4BB5-A1E5-3F3E36B20DA9, VarStoreId: 0xF101, Size: 0xD35, Name: "Setup" { 24 1C 43 D6 87 EC A4 EB B5 4B A1 E5 3F 3E 36 B2 0D A9 01 F1 35 0D 53 65 74 75 70 00 }
diff --git a/lib/Driver/ToolChains/CommonArgs.cpp b/lib/Driver/ToolChains/CommonArgs.cpp
index 34640b3c450d..93c4a4f4ec5c 100644
--- a/lib/Driver/ToolChains/CommonArgs.cpp
+++ b/lib/Driver/ToolChains/CommonArgs.cpp
@@ -589,8 +589,7 @@ void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args,
#endif
SmallString<1024> Plugin;
- llvm::sys::path::native(Twine(D.Dir) +
- "/../" CLANG_INSTALL_LIBDIR_BASENAME +
@al3xtjames
al3xtjames / aq_edge_biased.patch
Last active July 24, 2023 01:03 — forked from noizuy/aq_edge_biased.patch
x265 patch to add an AQ mode adding AQ mode 3's dark bias to AQ mode 4.
From 06661cfa70b74b49cf6fd8ffe62045d327b118dd Mon Sep 17 00:00:00 2001
From: noizuy <85082087+noizuy@users.noreply.github.com>
Date: Fri, 18 Feb 2022 17:09:39 +0000
Subject: [PATCH] add new AQ mode (#17)
add new AQ mode
This just adds AQ mode 3's dark bias to AQ mode 4. Because of normal AQ
strength values for mode 4 not really working well with the dark bias,
an additional bias-strength parameter has been added.
@al3xtjames
al3xtjames / singlepass-scenecut-aware-qp.patch
Last active July 24, 2023 00:18 — forked from quietvoid/singlepass-scenecut-aware-qp.patch
Enables x265 --scenecut-aware-qp for single pass, fixes float precision in settings string and allows offset to be set to 0
diff --git a/source/common/param.cpp b/source/common/param.cpp
index 1a4df4cdc..e1505b29e 100755
--- a/source/common/param.cpp
+++ b/source/common/param.cpp
@@ -1832,10 +1832,10 @@ int x265_check_params(x265_param* param)
"Invalid SAO tune level. Value must be between 0 and 4 (inclusive)");
if (param->bEnableSceneCutAwareQp)
{
- if (!param->rc.bStatRead)
+ if (param->bEnableSceneCutAwareQp != FORWARD && !param->rc.bStatRead)
diff --git a/common/param.cpp b/common/param.cpp
index 1a4df4cdc..7c131666f 100755
--- a/common/param.cpp
+++ b/common/param.cpp
@@ -102,7 +102,7 @@ x265_param *x265_param_alloc()
void x265_param_free(x265_param* p)
{
- x265_zone_free(p);
+ PARAM_NS::x265_zone_free(p);
@al3xtjames
al3xtjames / lvfs-dump.py
Created May 8, 2023 00:14
Dump URLs of UEFI capsule updates on LVFS
from pathlib import Path
from urllib.parse import urlparse
from urllib.request import urlopen, urlretrieve
from xml.etree import ElementTree
import gzip
with urlopen("https://cdn.fwupd.org/downloads/firmware.xml.gz") as response:
xml = gzip.decompress(response.read()).decode()
root = ElementTree.fromstring(xml)
@al3xtjames
al3xtjames / config.plist
Created January 9, 2023 02:48
Fix for "MSI vectors enabled = 1 < reported = 8" with cxgb.kext. Note that OC cannot patch AuxKC, so using this patch in config.plist won't work. Manually patching cxgb.kext and injecting it with OC works as an alternative.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Kernel</key>
<dict>
<key>Patch</key>
<array>
<dict>
<key>Arch</key>
diff --git a/configure.ac b/configure.ac
index 4ffb68f..445f677 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,6 +7,7 @@ AC_PREREQ(2.60)
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_SRCDIR(src/sbsign.c)
+AM_PROG_AR
AM_PROG_AS