Skip to content

Instantly share code, notes, and snippets.

View rkitover's full-sized avatar

Rafael Kitover rkitover

  • San Francisco, CA, United States
View GitHub Profile
@rkitover
rkitover / boot-linux.ps1
Last active October 22, 2023 02:15
trivial script to delete GRUB env to boot Linux
# Script to remove the GRUB environment file, resetting the default GRUB entry
# to what is usually the user's latest Linux kernel.
$grubenv = 'z:/grub/grubenv'
# Relaunch as an elevated process.
if (-not ([security.principal.windowsprincipal] [security.principal.windowsidentity]::getcurrent() `
).isinrole([security.principal.windowsbuiltInrole]::administrator) `
) {
$pwsh = [system.diagnostics.process]::getcurrentprocess().mainmodule.filename
--- glib-original/meson.build 2023-05-31 01:05:34
+++ glib/meson.build 2023-05-31 04:32:57
@@ -2103,6 +2103,8 @@
libintl_deps = []
libintl_prefix = '#include <libintl.h>'
libintl = dependency('intl', required: false, allow_fallback: false)
+libiconv = dependency('iconv', required: false)
+mac_cf = dependency('appleframeworks', modules: ['CoreFoundation'], required: false)
if libintl.found()
# libintl supports different threading APIs, which may not
## arrow up
"\e[A":history-search-backward
## arrow down
"\e[B":history-search-forward
@rkitover
rkitover / build.sh
Last active October 25, 2022 18:50
build vbam
git clone https://github.com/visualboyadvance-m/visualboyadvance-m
cd visualboyadvance-m
./installdeps
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -G Ninja
ninja
gdb --args ./visualboyadvance-m /path/to/rom.gba
@rkitover
rkitover / build-wx
Created October 22, 2022 21:06
Build wxWidgets from source on Linux into /usr/local
#!/bin/sh
set -e
OPWD=$(pwd)
mkdir -p ~/source/repos
cd ~/source/repos
if ! [ -d wxWidgets ]; then
@rkitover
rkitover / irc-log.txt
Created September 30, 2022 01:21
docker explanation
07-04 23:51 <Crocodillian> ok, so let me explain a bit
07-04 23:51 <Crocodillian> if you don't mind
07-04 23:51 <blank> Okay.
07-04 23:53 <Crocodillian> sorry had to pee
07-04 23:53 <Crocodillian> have you used chroots for anything before?
07-04 23:53 <Crocodillian> or bsd jails
07-04 23:54 <blank> Nope.
07-04 23:55 <Crocodillian> so a chroot is when you open a shell in a directory that becomes the whole linux system in that shell
07-04 23:55 <blank> Yes, I remember that much.
07-04 23:56 <Crocodillian> it still runs on the same kernel, but it's kind of analagous to a virtual machine
@rkitover
rkitover / macOS-glib-link-static-libintl-gettext.patch
Last active September 10, 2022 15:33
glib patch for linking static gettext/libintl on macOS
@rkitover
rkitover / addendum-to-letter-to-public-defender.txt
Last active April 19, 2024 11:34
letter to my public defender
Hi Mr. Waterman,
I forgot to mention a couple of things, and it seems my letter did not go
through. I would like to meet with you for a minute at your office to hand you
the printout of my previous letter and this one.
First thing is that they edit all of my communications and often block them
entirely. A message I may want to send on an internet channel may not go through
or be edited. An email I may want to send may not go through at all or be edited
in order to offend the receiving party or delete information etc..
@rkitover
rkitover / choose_cd.sh
Last active September 4, 2022 23:55
shell function to play a cd from a collection
ttf() {
if [ -z "$1" ]; then
echo >&2 Please specify CD number
return 1
fi
_cd_num=$1
set --
_dir=$(echo ~/Music/Tunnel*/*_${_cd_num}-*)
@rkitover
rkitover / msys2_full_upgrade.ps1
Created August 7, 2022 22:01
PowerShell script to do a full MSYS2 upgrade
$erroractionpreference = 'stop'
if (-not (new-object security.principal.windowsprincipal(
[security.principal.windowsidentity]::getcurrent()
)).isinrole([security.principal.windowsbuiltinrole]::administrator)) {
write-error "Must be elevated."
}
$bash = resolve-path /tools/msys64/usr/bin/bash.exe