Skip to content

Instantly share code, notes, and snippets.

View kelvie's full-sized avatar

Kelvie Wong kelvie

  • Vancouver, B.C., Canada
View GitHub Profile
@kelvie
kelvie / palworld-translate.user.js
Last active February 2, 2024 06:05
Palworld Palname Translate パルーワルドのパル名和訳
// ==UserScript==
// @name Palworld Palname Translate
// @name:ja パルーワルドのパル名和訳
// @description Translate Palworld names to Japanese (auto runs if palworld is in the URL, otherwuse use the menu item)
// @description:ja 英語のパルーワルドサイトでパル名を和訳します(URLにpalworldが含まれてる場合は自動的に実行,そうでない場合はメニューから)
// @version 1.0.0
// @license MIT
// @grant GM_registerMenuCommand
// @grant GM_getResourceText
//
@kelvie
kelvie / palnames_v1.json
Last active January 26, 2024 05:09
Pal names in Japanese and English. パルワールドのパル名(英語⇔日本語)
[
{
"id": "1",
"en": "lamball",
"ja": "モコロン"
},
{
"id": "2",
"en": "cattiva",
"ja": "ツッパニャン"
@kelvie
kelvie / fw-amd-13-power-compare.sh
Created January 4, 2024 00:33
compare rapl and battery charge info on Framework AMD 13 (2023 edition)
#!/bin/bash
#
# Comparing the two sources of energy usage on a framework 13 AMD edition
# tempdir=$(mktemp -d)
# cleanup() {
# rm -rf "$tempdir"
# }
@kelvie
kelvie / 2021-10-02-gigabyte-osd-sidekick-reversing.org
Created June 19, 2023 21:58
gigabyte sidekick reversing notes

OSD sidekick reversing

Summary

It uses the HID device:

0bda:1100 Realtek Semiconductor Corp. HID Device
@kelvie
kelvie / archwiki-visited-purple.user.js
Created February 22, 2023 04:00
Make archwiki links purple again
// ==UserScript==
// @name Change color of visited links on ArchWiki
// @namespace
// @version 1.0
// @description Changes the color of visited links on wiki.archlinux.org
// @author Kelvie
// @match https://wiki.archlinux.org/*
// @grant GM_addStyle
// ==/UserScript==
@kelvie
kelvie / 0001-Add-a-lockdown_hibernate-parameter.patch
Created October 2, 2022 23:39
Enable hibernate during lockdown
From e4db4f07e77feb1c126e7afbf441e9eae34b4e57 Mon Sep 17 00:00:00 2001
From: Kelvie Wong <kelvie@kelvie.ca>
Date: Sun, 2 Oct 2022 13:23:25 -0700
Subject: [PATCH] Add a lockdown_hibernate parameter
This allows the user to tell the kernel that they know better (namely,
they secured their swap properly), and that it can enable hibernation.
Signed-off-by: Kelvie Wong <kelvie@kelvie.ca>
---
@kelvie
kelvie / block-eac.sh
Created February 26, 2022 00:19
Script to block EAC phonehomes temporarily to run elden ring
#!/bin/bash
set -euo pipefail
# Script to temporarily block EAC acesss so Elden Ring can start up
# from dig modules-cdn.eac-prod.on.epicgames.com -- this might be different for
# you
iprange=18.65.229.0/24
sleeptime=10
@kelvie
kelvie / gigabyte-osd-sidekick-reversing.org
Last active December 30, 2022 23:49
reversing notes on gigabyte osd sidekick control of m328

OSD sidekick reversing

Summary

It uses the HID device:

0bda:1100 Realtek Semiconductor Corp. HID Device
@kelvie
kelvie / nec_util.h
Created July 31, 2021 17:42
lookup table for converting NEC commands/addresses to the esphome32 remote_transmitter.transmit_nec format
#ifndef UTIL_H
#define UTIL_H
int nec_format(unsigned char b) {
static const int nec_code_table[256] = {
0x00ff, 0x807f, 0x40bf, 0xc03f, 0x20df, 0xa05f, 0x609f, 0xe01f, 0x10ef,
0x906f, 0x50af, 0xd02f, 0x30cf, 0xb04f, 0x708f, 0xf00f, 0x08f7, 0x8877,
0x48b7, 0xc837, 0x28d7, 0xa857, 0x6897, 0xe817, 0x18e7, 0x9867, 0x58a7,
0xd827, 0x38c7, 0xb847, 0x7887, 0xf807, 0x04fb, 0x847b, 0x44bb, 0xc43b,
0x24db, 0xa45b, 0x649b, 0xe41b, 0x14eb, 0x946b, 0x54ab, 0xd42b, 0x34cb,
@kelvie
kelvie / brogue-ce.nix
Last active June 21, 2021 02:45 — forked from benob/brogue-ce.nix
nix package for brogue community edition, with terminal support
#{ fetchurl, SDL2, SDL2_image makeDesktopItem }:
with import <nixpkgs> {};
stdenv.mkDerivation rec {
pname = "brogue-ce";
version = "1.9.3";
src = fetchFromGitHub {
owner = "tmewett";
repo = "BrogueCE";