Skip to content

Instantly share code, notes, and snippets.

@jauderho
jauderho / gist:5f73f16cac28669e56608be14c41006c
Last active October 19, 2025 17:16
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
#
@thehans
thehans / phillips.scad
Created February 26, 2021 18:41
OpenSCAD model for Phillips screwdriver
$fs=0.2;
$fa=0.2;
headNum = 2;
phillipsDrive(headNum);
//phillipsDemo(headNum);
module phillipsDemo(num) {
difference() {
@mikepierce
mikepierce / accessible-colors.tex
Created November 17, 2020 17:09
My LaTeX Workflow
% LaTeX's standard color definitions
\definecolor{blue}{HTML}{0000FF}
\definecolor{brown}{HTML}{A52A2A}
\definecolor{cyan}{HTML}{00FFFF}
\definecolor{green}{HTML}{008000}
\definecolor{lime}{HTML}{00FF00}
\definecolor{magenta}{HTML}{FF00FF}
\definecolor{olive}{HTML}{808000}
\definecolor{orange}{HTML}{FFA500}
\definecolor{pink}{HTML}{FFC0CB}
#!/bin/bash
############################################################################
# This script simply formats a block device and mounts it to the data
# directory in a very safe manner by checking that the block device is
# completely empty
#
############################################################################
set -eu
if [ $# -ne 2 ]
@mfyz
mfyz / gapp.js
Created January 13, 2020 19:26
Auto Increment (Sequence) in Google Sheets / Google Apps Script
function onEdit(e) {
// Auto increment number column name
var aiColumnName = 'A';
// The column that is tested, seq numbers will be
// given if this column is not empty.
var requieredColName = 'B'
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var worksheet = spreadsheet.getActiveSheet();
var aiColRange = worksheet.getRange(aiColumnName + '1:' + aiColumnName + '1000');
@clayperez
clayperez / Code.gs
Created December 18, 2019 14:53
AUTO-Generate Unique IDs in Google Sheets
// AUTO GENERATE SIMPLE UNIQUE ID'S FOR NON-EMPTY ROWS
//
// Author: Carlos Perez, clayperez@gmail.com
//
// Purpose: This Google Sheets script fires when any cell is edited and
// inserts a random (reasonably unique) UID of ID_LENGTH length
// into the specified ID_COLUMN. For instance if the first column in the
// sheet specified by SHEETNAME is the column where you would like the
// UID injected, then ID_COLUMN should be 1.
//
@richardblondet
richardblondet / README.md
Last active February 13, 2025 05:58
Create a simple API backend with Google App Script and a Spreadsheet

Google App Script CRUD

Inspired by this gist.

Getting Started

  1. Create a new App Script project.
  2. Paste the content of the file google-app-script-crud.gs in the default Code.gs file.
  3. Create a new Spreadsheet.
  4. Copy the Spreadsheet ID found in the URL into the variable SHEET_ID located in line 1 of your file.
@rumansaleem
rumansaleem / clean-up-arch-linux.md
Created May 28, 2019 08:51
Instructions to clean up Arch Linux (Manjaro)

Contents

  • Clean pkg cache
  • Remove unused packages (orphans)
  • Clean cache in /home
  • remove old config files
  • Find and Remove
    • duplicates
    • empty files
    • empty directories
  • broken symlinks
@robey
robey / qemu-linux.md
Created May 17, 2019 19:30
install a qemu virtual machine on linux

install qemu on host machine & launch it

sudo apt install qemu-system-x86
sudo apt install libsdl2-dev

qemu-img create -f qcow2 test.qcow2 16G

qemu-system-x86_64 -enable-kvm -m 2048 -boot d
    -nic user,model=virtio