Skip to content

Instantly share code, notes, and snippets.

View kvpb's full-sized avatar
📸
Say cheese, or else!

Karl kvpb

📸
Say cheese, or else!
View GitHub Profile
@kvpb
kvpb / kvpbsembroideryluggagetag.sketch
Last active September 14, 2026 22:50
KVPB's embroidery luggage tag
This file has been truncated, but you can view the full file.
@kvpb
kvpb / GZ2J01.ini
Last active June 14, 2026 00:35
Japanese GameCube NTSC The Legend Of Zelda: Twilight Princess moon jump gecko code
[Gecko]
$moon jump [kvpb]
283D745A 00000120
48000000 804051D8
DE000000 80008180
120004FC 00004260
E2000002 80008000
*Press R and A on the Japanese GameCube Twilight Princess.
*
*JP button activator: 803D745A -> 283D745A; JP player pointer: 804051D8 -> 48000000 804051D8;
@kvpb
kvpb / pokemongoldandsilverandcrystalversionbestindividualstrengthspreads.md
Last active September 30, 2025 21:08
Pokémon Gold & Silver Versions and Crystal Version best individual strength spreads

Pokémon Gold Version & Silver Version and Crystal Version
best individual strength spreads

abstract

In these notes, '${type}-type hidden power' modulates 'flawless' so that we still refer to maxed out--in terms of individual strengths--mons with a certain desired hidden power as flawless. Also, official terminology straight from The Pokémon Company or data from the games themselves is used instead of fan terms.

introduction

@kvpb
kvpb / long-rangetrainerescapeglitchmonbestdvspreads.csv
Last active September 27, 2025 18:41
long-range trainer escape glitch 'mon best DV spreads
n_SPC_10 mon (EN) mon (JP) n_ER_EN_max n_ER_JP_max also [met] n_IS_ATK_max_10 n_IS_DEF_max_10 n_IS_SPD_max_10 n_IS_SPC_max_10 n_IS_ATKDEF_max_16 n_IS_SPDSPC_max_16 n_IS_ATK_max_10 n_IS_DEF_max_10 n_IS_SPD_max_10 n_IS_SPC_max_10 n_IS_ATKDEF_max_16 n_IS_SPDSPC_max_16 n_IS_ATK_max_10 n_IS_DEF_max_10 n_IS_SPD_max_10 n_IS_SPC_max_10 n_IS_ATKDEF_max_16 n_IS_SPDSPC_max_16
0
1 Rhydon サイドン 25 traded (Y) 15 15 15 15 0xFF 0xFF 15 15 14 15 0xFF 0xEF
2 Kangaskhan ガルーラ 30 traded (JP B) 15 15 15 15 0xFF 0xFF 15 15 14 15 0xFF 0xEF
3 Nidoran♂ ニドラン♂ 30 15 15 14 15 0xFF 0xEF 15 15 15 7 0xFF 0xF7
4 Clefairy ピッピ 10 25 gifted (RGB) 15 15 15 15 0xFF 0xFF
5 Spearow オニスズメ 25 15 15 14 15 0xFF 0xEF
6 Voltorb ビリリダマ 15 15 15 14 15 0xFF 0xEF
7 Nidoking ニドキング 15 15 15 15 0xFF 0xFF
8 Slowbro ヤドラン 15 traded* (JP B) 15 15 15 15 0xFF 0xFF
@kvpb
kvpb / calculatergbywildmondv.py
Last active June 7, 2026 00:32
Calculate Red, Green, Blue, Yellow legal wild 'mon DV combinations for a given encounter rate.
#!/usr/bin/env python3
rate_encounter: int # Nidorans' encounter rate is 25.
game: str # values: "Red" or "Green" or "Blue" and "Yellow";
DV_ATKDEF: int
DV_SPDSPC: int
spread_DV: list[ int ]
spread_DV_possible: list[ bool ] # 'array' of false, table of slots for every spread.
positions_SPDSPC: list[ int ]
positions_ATKDEF: list[ int ]
@kvpb
kvpb / calibrate.bash
Last active June 17, 2024 11:04
BASH function for Pokémon RNG manipulation calibration
#!/bin/bash
function calibrate # calibrate frame_targeted frame_hit
{
n_targeted=${1};
n_hit=${2};
n_calibrated=$(( ${n_targeted} - ( ${n_hit} - ${n_targeted} ) ));
printf "%s\ttargeted frame\n" ${n_calibrated}; # Why do any of the RNG Reporter, PokeFinder... Still not automatically do this? The programmer must have more than enough on his plate. A secondary lesser automatic generator restricted to a range of +-10 % of the number of the hit frame and a text area for the output of this function would suffice. Many people have been asking for it for years. Does Chatot do it?
};
@kvpb
kvpb / normal.c
Last active February 7, 2024 23:37
Calculate the normal focal length for the given film or image sensor format.
#include <stdint.h> // UInt16_T
#include <stdlib.h> // AToF, MAlloc
#include <math.h> // PowF, SQRT, RoundF
#include <ctype.h> // IsAlpha
#include <string.h> // STRCPY, STRnCMP
#include <stdio.h> // PrintF
float focal_normal_calculate( float h/*eight_sensor*/, float w/*idth_sensor*/ )
{
float d/*iagonal_sensor*/;
@kvpb
kvpb / UnlikeTikTok.scpt
Created July 6, 2023 16:38
Automatically unlikes, or un-bookmarks, all liked, or bookmarked, videos on TikTok from Chrome, or another a web browser, on macOS.
-- Copyright 2022, 2023 Karl Vincent Pierre Bertin
--
-- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
--
-- 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
--
-- 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
--
-- 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
--
@kvpb
kvpb / rg7tidc.sh
Last active November 22, 2022 13:54
A random generation VII trainer ID number calculator.
#!/usr/bin/env bash
#function scnclr
#{
# printf "\033[2J\033[3J\033[1;1H"
#}
function g_G7ID
{
declare -n a_G7ID=${1}
@kvpb
kvpb / alarm.sh
Last active September 13, 2022 08:45
macOS Command-Line Alarm
#!/usr/bin/env zsh
if ! command -v gdate &> /dev/null || ! command -v bc &> /dev/null || ! command -v tput &> /dev/null || ! command -v osascript &> /dev/null
then
printf "%s\n" "Error: Software Incompatibility.\nThis ZSH script depends on ZSH, GDate, BC, TPUT and OSAScript."
exit 1
fi
[ -n "${1}" ] && [ 0 -le ${1} -a ${1} -le 23 ] && h=${1} || h=0 #[ -n "${1}" -a 0 -le ${1} -a ${1} -le 24 ] obviously fails.
[ -n "${2}" ] && [ 0 -le ${2} -a ${2} -le 59 ] && m=${2} || m=0