Skip to content

Instantly share code, notes, and snippets.

View al3xtjames's full-sized avatar

Alex James al3xtjames

View GitHub Profile
@al3xtjames
al3xtjames / soundcloud-quite-dark.user.css
Last active November 3, 2023 03:04
SoundCloud Quite Dark user style by pawelos076232, with additional fixes
/* ==UserStyle==
@name SoundCloud - Quite Dark
@namespace USO Archive
@author pawelos076232
@description `Quite dark style for the SoundCloud`
@version 20231102.0.1
@license NO-REDISTRIBUTION
@preprocessor uso
@updateURL https://gist.githubusercontent.com/al3xtjames/321c7750cf952551e47c4824c0aae387/raw/soundcloud-quite-dark.user.css?cache=false
==/UserStyle== */
From 0e8718ee00902ebcc5910ed953b45d67ed665cc5 Mon Sep 17 00:00:00 2001
From: Alex James <theracermaster@gmail.com>
Date: Sun, 14 Mar 2021 20:12:15 -0500
Subject: [PATCH] init: Fix shell prompts on Termux
Backport of https://github.com/sorin-ionescu/prezto/pull/1561
---
init.zsh | 11 +++++++++++
1 file changed, 11 insertions(+)
#!/usr/bin/env python3
#
# git clone https://github.com/ryanoasis/nerd-fonts && cd nerd-fonts
# curl -O <this script>
# mkdir incomplete
# find ~/Downloads/Input-Font/Input_Fonts/InputMono/InputMono -name '*.ttf' | parallel fontforge -script font-patcher --mono --adjust-line-height --quiet --outputdir incomplete {}
# mkdir complete
# find ~/Downloads/Input-Font/Input_Fonts/InputMono/InputMono -name '*.ttf' | parallel fontforge -script font-patcher --mono --adjust-line-height --quiet --complete --outputdir complete {}
# python3 gen-input-mono-nf.py
# rm -rf incomplete complete
@al3xtjames
al3xtjames / reddit-carbon.user.css
Last active January 8, 2023 05:58
Carbon for Reddit by ggitaliano, with additional fixes
/* ==UserStyle==
@name Carbon for Reddit
@namespace USO Archive
@author Xyl
@description `Created by /u/ggitaliano and updated by me.For the best experience, you should go to https://www.reddit.com/prefs/ and do the following:Disable "allow subreddits to show me custom themes"Disable "Use the redesign as my default experience"Enable "View user profiles on desktop using legacy mode"Enable "show legacy search page"If you're using RES, disable night mode and Style Tweaks > Nav Top.`
@version 20230107.0.0
@license CC0-1.0
@preprocessor uso
@updateURL https://gist.githubusercontent.com/al3xtjames/fbf7356f1fc914d313408b87cb661263/raw/reddit-carbon.user.css?cache=false
==/UserStyle== */
@al3xtjames
al3xtjames / pci_option_rom.tcl
Last active April 2, 2023 13:14
Hex Fiend binary template for PCI option ROMs
# PCI option ROM binary template
little_endian
set image_num 0
set image_offset 0
set has_next_image 1
while {$has_next_image == 1} {
section "ROM Header $image_num" {
little_endian
requires 0 "50 53 56 00" ; # "PSV\0"
ascii 4 "Signature"
set version [uint32 "Version"]
set flags [uint32 "Flags"]
set key1 [hex 16 "Key 1"]
set key2 [hex 16 "Key 2"]
set signature [hex 20 "Signature"]
set hash [hex 32 "Image Hash"]
set image_size [uint64 "Image Size"]
--- otool/main.c.orig
+++ otool/main.c
@@ -767,14 +767,17 @@ uint32_t narch_flags,
enum bool all_archs,
enum bool version)
{
- char *objdump;
+ char objdump[MAXPATHLEN];
struct stat stat_buf;
uint32_t i;
DefinitionBlock ("", "SSDT", 1, "APPLE ", "Debug", 0x00001000)
{
/*
* Many OEM ACPI implementations have a ADBG function which is used for
* debug logging. In almost all cases, this function calls MDBG, which is
* supposed to be defined in a ACPI debug SSDT (but is usually missing).
* This should make ADBG functional.
*/
Method (MDBG, 1, NotSerialized)
{
--- misc/strings.c.orig
+++ misc/strings.c
@@ -335,7 +335,11 @@ void *cookie)
* If the ofile is not an object file then process it without reguard
* to sections.
*/
- if(ofile->object_addr == NULL || ofile->member_type == OFILE_LLVM_BITCODE){
+ if(ofile->object_addr == NULL
+#ifdef LTO_SUPPORT
+ || ofile->member_type == OFILE_LLVM_BITCODE
# lspci -nnnvvv
00:1f.3 Audio device [0403]: Intel Corporation CM238 HD Audio Controller [8086:a171] (rev 31) (prog-if 80)
Subsystem: Dell Device [1028:07be]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 64
Interrupt: pin B routed to IRQ 17
Region 0: Memory at 7f91028000 (64-bit, non-prefetchable)
Region 4: Memory at 7f91000000 (64-bit, non-prefetchable)
Capabilities: [50] Power Management version 3