Skip to content

Instantly share code, notes, and snippets.

@jauderho
jauderho / gist:5f73f16cac28669e56608be14c41006c
Last active December 21, 2025 23:09
HOWTO: Upgrade Raspberry Pi OS from Bookworm to Trixie
### WARNING: READ CAREFULLY BEFORE ATTEMPTING ###
#
# Officially, this is not recommended. YMMV
# https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/
#
# This mostly works if you are on 64bit. You are on your own if you are on 32bit or mixed 64/32bit
#
# Credit to anfractuosity and fgimenezm for figuring out additional details for kernels
#
@curtis628
curtis628 / fish-build-install.sh
Last active November 19, 2023 18:02 — forked from AFRUITPIE/fish-build-install.sh
Install Fish Shell 3+ on Raspberry Pi
#!/bin/bash
# This helps install the latest fishshell on a Raspberry Pi, and was heavily influenced from
# https://gist.github.com/AFRUITPIE/1d26d3d15dc43f821a36d7ccc1260a7f
#
# NOTE: Along with "make"-related dependencies, it also installs 'jq'
#
# Use at your own risk as I have made no effort to make this install safe!
set -e
@jauderho
jauderho / gist:6b7d42030e264a135450ecc0ba521bd8
Last active December 21, 2025 10:28
HOWTO: Upgrade Raspberry Pi OS from Bullseye to Bookworm
### WARNING: READ CAREFULLY BEFORE ATTEMPTING ###
#
# Officially, this is not recommended. YMMV
# https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/
#
# This mostly works if you are on 64bit. You are on your own if you are on 32bit or mixed 64/32bit
#
# Credit to anfractuosity and fgimenezm for figuring out additional details for kernels
#
with table_stats as (
select psut.relname,
psut.n_live_tup,
1.0 * psut.idx_scan / greatest(1, psut.seq_scan + psut.idx_scan) as index_use_ratio
from pg_stat_user_tables psut
order by psut.n_live_tup desc
),
table_io as (
select psiut.relname,
sum(psiut.heap_blks_read) as table_page_read,
#!/bin/bash
usage()
{
cat << EOF
usage: $0 options
This script sets ownership for all tables, sequences, views, and functions for a given schema.
Run this script as your postgres OS user.
@kirkonrails
kirkonrails / log all jQuery events
Created April 9, 2014 13:20
Log all jQuery events to console via redfine jquery trigger
var oldJQueryEventTrigger = jQuery.event.trigger;
jQuery.event.trigger = function( event, data, elem, onlyHandlers ) {
console.log( event, data, elem, onlyHandlers );
oldJQueryEventTrigger( event, data, elem, onlyHandlers );
}
@jordanorelli
jordanorelli / monitor.py
Created April 20, 2011 00:30
file change monitor for Django
import os
import sys
import time
import signal
import threading
import atexit
import Queue
_interval = 1.0
_times = {}