Skip to content

Instantly share code, notes, and snippets.

View jkhsjdhjs's full-sized avatar
💭
killing foss projects since 2016™

jkhsjdhjs

💭
killing foss projects since 2016™
View GitHub Profile
@jkhsjdhjs
jkhsjdhjs / readme.md
Last active December 22, 2022 22:42
How to compile Android x86 Pie (Version 9) on Arch Linux

How to compile Android x86 Pie (Version 9) on Arch Linux

Why?

Why not just use Ubuntu as in the official guide?

Building Android 9 requires Python 3 in addition to Python 2 nowadays. While even the old Ubuntu versions recommended in the guide offer Python 3, they only have Python 3.5 or older, which lacks some features required by the build script. While you can install Python 3.6 or newer on Ubuntu (just compile it yourself), I then still ran into other issues (can't recall exactly what they were), but eventually decided that it was too much of a hassle and switched back to Arch Linux.

TL;DR Building on the recommended Ubuntu version is too complicated.

@jkhsjdhjs
jkhsjdhjs / SlightlyImprovedDialogues.patch
Created February 22, 2022 16:15
Remove unnecessary dependencies from SlightlyImproved Dialogues and make it compatible with the latest version
diff -ruN SlightlyImprovedDialogues/LibAddonMenu-2.0/LibAddonMenu-2.0/controls/button.lua SlightlyImprovedDialogues.bak/LibAddonMenu-2.0/LibAddonMenu-2.0/controls/button.lua
--- SlightlyImprovedDialogues/LibAddonMenu-2.0/LibAddonMenu-2.0/controls/button.lua 2022-02-22 16:53:43.584876599 +0100
+++ SlightlyImprovedDialogues.bak/LibAddonMenu-2.0/LibAddonMenu-2.0/controls/button.lua 1970-01-01 01:00:00.000000000 +0100
@@ -1,91 +0,0 @@
---[[buttonData = {
- type = "button",
- name = "My Button", -- string id or function returning a string
- func = function() end,
- tooltip = "Button's tooltip text.", -- string id or function returning a string (optional)
- width = "full", --or "half" (optional)
@jkhsjdhjs
jkhsjdhjs / SlightlyImprovedExperienceBar.patch
Created February 22, 2022 16:12
Remove unnecessary dependencies from SlightlyImproved Experience Bar and make it compatible with the latest version
diff -ruN SlightlyImprovedExperienceBar/LibAddonMenu-2.0/LibAddonMenu-2.0/controls/button.lua SlightlyImprovedExperienceBar.bak/LibAddonMenu-2.0/LibAddonMenu-2.0/controls/button.lua
--- SlightlyImprovedExperienceBar/LibAddonMenu-2.0/LibAddonMenu-2.0/controls/button.lua 2022-02-22 16:53:42.171512446 +0100
+++ SlightlyImprovedExperienceBar.bak/LibAddonMenu-2.0/LibAddonMenu-2.0/controls/button.lua 1970-01-01 01:00:00.000000000 +0100
@@ -1,91 +0,0 @@
---[[buttonData = {
- type = "button",
- name = "My Button", -- string id or function returning a string
- func = function() end,
- tooltip = "Button's tooltip text.", -- string id or function returning a string (optional)
- width = "full", --or "half" (optional)
@jkhsjdhjs
jkhsjdhjs / DRCPA.lua
Last active February 22, 2022 18:57
Patch for making DRCPA compatible with Dressing Room - Updated
DRCPA = DRCPA or {}
DRCPA.Name = "DRCPA"
DRCPA.Version = "1.0.2"
DRCPA.Color = {
[1] = "|cA5DB52",
[2] = "|cA5DB52",
[3] = "|cA5DB52",
[4] = "|cA5DB52",
[5] = "|c5ABAE7",
@jkhsjdhjs
jkhsjdhjs / main.patch
Last active February 22, 2022 18:40
Patch for making AutoCategory_DressingRoom compatible with empty gear sets
--- main.lua 2022-02-22 19:37:54.963712905 +0100
+++ main.lua.bak 2022-02-22 19:39:10.935461185 +0100
@@ -5,9 +5,10 @@
local gearSet = DressingRoom.sv.gearSet
if #args == 0 then
- -- TODO
- for i, _ in ipairs(gearSet) do
- args[i] = i
+ local count = 1
struct ResultIter<I, F> {
iter: I,
f: F,
}
impl<U, E, R, F, I> Iterator for ResultIter<I, F>
where
I: Iterator<Item = Result<U, E>>,
F: FnOnce(U) -> Result<R, E> + Copy,
{
@jkhsjdhjs
jkhsjdhjs / check.bash
Created August 21, 2019 20:27
pacman: check for unsatisfied dependencies
pacman -Q $(pacman -Qq | pacman -Qi | grep "Depends On" | awk '{for(i=1;i<4;i++) $i=""; print}' | grep -v None | sed 's/ /\n/g' | cut -d'>' -f1 | cut -d'<' -f1 | cut -d'=' -f1 | grep -v "^$" | sort | uniq | xargs) | grep "^error: "
@jkhsjdhjs
jkhsjdhjs / kvm_set_msr_common_dmesg.log
Last active February 10, 2019 02:14
output printed to dmesg when trying to launch L.A. Noire in a qemu vm with cpu model 'host-model' on an i5-7600K
[ 1642.590777] kvm [7022]: vcpu3, guest rIP: 0xfffff80742459082 kvm_set_msr_common: MSR_IA32_DEBUGCTLMSR 0x1, nop
[ 1642.590791] kvm [7022]: vcpu3, guest rIP: 0xfffff80742459082 kvm_set_msr_common: MSR_IA32_DEBUGCTLMSR 0x1, nop
[ 1642.590803] kvm [7022]: vcpu3, guest rIP: 0xfffff80742459082 kvm_set_msr_common: MSR_IA32_DEBUGCTLMSR 0x1, nop
[ 1642.590814] kvm [7022]: vcpu3, guest rIP: 0xfffff80742459082 kvm_set_msr_common: MSR_IA32_DEBUGCTLMSR 0x1, nop
[ 1642.590826] kvm [7022]: vcpu3, guest rIP: 0xfffff80742459082 kvm_set_msr_common: MSR_IA32_DEBUGCTLMSR 0x1, nop
[ 1642.590838] kvm [7022]: vcpu3, guest rIP: 0xfffff80742459082 kvm_set_msr_common: MSR_IA32_DEBUGCTLMSR 0x1, nop
[ 1642.590849] kvm [7022]: vcpu3, guest rIP: 0xfffff80742459082 kvm_set_msr_common: MSR_IA32_DEBUGCTLMSR 0x1, nop
[ 1642.590859] kvm [7022]: vcpu3, guest rIP: 0xfffff80742459082 kvm_set_msr_common: MSR_IA32_DEBUGCTLMSR 0x1, nop
[ 1642.590871] kvm [7022]: vcpu3, guest rIP: 0xfffff80742459082 kvm_set_msr_common: MSR_IA32_DEBUGCTLMSR 0x1, no

Keybase proof

I hereby claim:

  • I am jkhsjdhjs on github.
  • I am jkhsjdhjs (https://keybase.io/jkhsjdhjs) on keybase.
  • I have a public key whose fingerprint is 16F0 3DC2 EF16 3831 7CEE AD66 856E D6BD 3C8B 4EDA

To claim this, I am signing this object:

@jkhsjdhjs
jkhsjdhjs / nvidia_post.bash
Last active August 21, 2018 06:32
nvidia hooks to trigger initramfs image generation on install/update/remove
#!/usr/bin/env bash
workdir="$(cd "$(dirname "$0")" && pwd)"
xargs -I % rm "${workdir}/%" < "${workdir}/nvidia_hooks_filenames.txt" && rm "${workdir}/nvidia_hooks_filenames.txt"