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 / 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
@rkitover
rkitover / sudo.ps1
Last active June 16, 2024 20:11
PowerShell sudo hack for Windows
# This requires localadmin and pwsh/winps as your ssh shell.
function global:sudo {
$cmd = [management.automation.invocationinfo].getproperty('ScriptPosition',
[reflection.bindingflags] 'instance, nonpublic').getvalue($myinvocation).text -replace '^\s*sudo\s*',''
ssh localhost -- "sl '$(get-location)'; $cmd"
}
@rkitover
rkitover / ble-setup.md
Last active June 3, 2024 08:31
Setup ble.sh for PowerShell-like history completion in bash

Setup ble.sh for PowerShell-like history completion in bash

These settings will give you PowerShell-like history completion in bash using ble.sh.

History completions will be displayed in grey, press UP-ARROW or F8 to accept the completion and ENTER.

To cancel a completion, press CTRL-K or DOWN-ARROW.