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 / glib-macos.patch
Created June 1, 2025 02:46
GLib build fix for macOS
--- glib-2.78.3/meson.build 2023-12-06 19:03:55
+++ glib/meson.build 2025-05-19 15:12:51
@@ -534,7 +519,7 @@
# Due to pervasive use of things like GPOINTER_TO_UINT(), we do not support
# building with -Wbad-function-cast.
'-Wno-bad-function-cast',
- '-Werror=implicit-function-declaration',
+ '-Wno-error=implicit-function-declaration',
'-Werror=missing-prototypes',
'-Werror=pointer-sign',
@rkitover
rkitover / wx-macOS.patch
Created May 29, 2025 15:30
wxWidgets patch for macOS
--- a/src/osx/cocoa/window.mm
+++ b/src/osx/cocoa/window.mm
@@ -2370,11 +2370,12 @@ bool wxWidgetCocoaImpl::acceptsFirstResponder(WXWidget slf, void *_cmd)
{
if ( HasUserKeyHandling() )
return m_wxPeer->AcceptsFocus();
- else
- {
- wxOSX_FocusHandlerPtr superimpl = (wxOSX_FocusHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd];
- return superimpl(slf, (SEL)_cmd);
@rkitover
rkitover / Meditation Instructions.md
Created March 30, 2025 10:09
Instructions on Meditation from “Good Question, Good Answer” by Ven. S. Dhammika.

This text is taken from pages 32 – 36 of “Good Question, Good Answer” by Ven. S. Dhammika. ISBN: 9789839382082

Question: How many types of meditation are there?

Answer: The Buddha taught many different types of meditation, each designed to overcome a particular problem or to develop a particular psychological state. But the two most common and useful types of meditation are Mindfulness of Breathing, anapana sati, and Loving Kindness Meditation, metta bhavana.

Question: If I wanted to practice Mindfulness of Breathing, how would I do it?

Answer: You would follow these easy steps; the four Ps — place, posture, practice and problems. First, find a suitable place, perhaps a room that is not too noisy and where you are unlikely to be disturbed. Second, sit in a comfortable posture. A good way to sit is with your legs folded, a pillow under your buttocks, your back straight, your hands nestled in the lap and the eyes closed. Al

@rkitover
rkitover / plugin.py.patch
Last active March 24, 2025 18:15
Remove edits and labels from GitHub Supybot plugin.
--- /home/rkitover/source/repos/Supybot-plugins/GitHub/plugin.py 2025-03-16 05:44:13.177020502 +0000
+++ plugin.py 2025-03-24 16:41:12.939045476 +0000
@@ -205,6 +205,10 @@
bold = ircutils.bold
format_ = ''
+
+ if payload['action'] in ['labeled','edited']:
+ return
+
@rkitover
rkitover / gnome-extensionss.md
Last active December 17, 2024 16:16
Crocodillian's Gnome Extensions 2025

Crocodillian's Gnome Extensions 2025

This is a list of the Gnome Extensions that I use, their descriptions, installation instructions, and settings.

I am using GNOME 46.

You will need the Gnome Shell Integration browser extension to install extensions from the Gnome Extensions website.

@rkitover
rkitover / zsh-history-completion.sh
Last active September 9, 2024 13:29
zsh-autosuggestions config
source ~/source/repos/zsh-autosuggestions/zsh-autosuggestions.zsh
autoload -U up-line-or-beginning-search
autoload -U down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
bindkey "^[[A" up-line-or-beginning-search # Up
bindkey "^[[B" down-line-or-beginning-search # Down
@rkitover
rkitover / ports.sh
Created September 7, 2024 05:42
List open ports shell function
ports() {
(
echo 'PROC PID USER x IPV x x PROTO BIND PORT'
(
sudo lsof +c 15 -iTCP -sTCP:LISTEN -P -n | tail -n +2
sudo lsof +c 15 -iUDP -P -n | tail -n +2 | egrep -v ' (127\.0\.0\.1|\[::1\]):'
) | sed -E 's/ ([^ ]+):/ \1 /' | sort -k8,8 -k5,5 -k1,1 -k10,10n
) | awk '{ printf "%-16s %-6s %-9s %-5s %-7s %s:%s\n",$1,$2,$3,$5,$8,$9,$10 }'
}
@powershell -c ". $profile; %2% %3% %4% %5% %6% %7% %8% %9%"
@rkitover
rkitover / irclog.sh
Created August 7, 2024 03:36
page weechat irc logs
irclog() {
chan_log=$(find ~/.weechat/logs -name "*.#${1}.*" -printf '%p ' | sed 's/ $//')
case "$chan_log" in
*" "*)
echo >&2 'irclog: multiple matches'
unset chan_log
return 1
;;
"")
@rkitover
rkitover / build-tmux-windows.sh
Last active August 21, 2024 00:40
build experimental tmux for Windows
#!/bin/bash
pacman -S --noconfirm --needed base-devel git make autotools autoconf-archive libtool pkgconf libevent-devel windows-default-manifest msys2-runtime-devel msys2-w32api-headers gcc bison
rm -rf ~/tmux-windows
mkdir ~/tmux-windows
pushd ~/tmux-windows
git clone https://github.com/rkitover/MSYS2-packages.git
pushd MSYS2-packages/ncurses