Skip to content

Instantly share code, notes, and snippets.

luzpaz /
Created Aug 6, 2022
Random useful oneliners
git show --pretty="" --name-only a9dc7b038d93ca96c776bd778f71458a4bc89a5e | grep -e '\.h$' | while read file; do md5sum ${file}; done
luzpaz /
Last active Aug 8, 2022
List FreeCAD commits pending the local copy you're running
# This script will ascertain what hash number (derived from revision number) your current
# local copy of FreeCAD is based on. Then it lists the commits that haven't made it in to
# said local copy.
git fetch --all # Make sure up-to-date
head=$(git rev-list --count HEAD)
echo -e "\n"
echo -e "Upstream: $head"
# get total commit count
curl --silent -I -k "" | sed -n '/^[Ll]ink:/ s/.*"next".*page=\([0-9]*\).*"last".*/\1/p'
# get AppImage release number
curl -s -H "Accept: application/vnd.github.v3+json" | jq '.assets[].name' | grep -e 'AppImage\"$' | sed -r 's/.*-([0-9]{5}).*/\1/'
View Calculix-v2.19-typos.patch
From d23b1d79362b64690dbe17cfb75f152e183ea4b1 Mon Sep 17 00:00:00 2001
From: luz paz <>
Date: Thu, 31 Mar 2022 09:22:00 -0400
Subject: [PATCH] Fix various documentation and source comment typos
Signed-off-by: luz paz <>
ccx_2.19/src/CalculiX.h | 4 ++--
ccx_2.19/src/README.INSTALL | 2 +-
ccx_2.19/src/add_rect.c | 6 +++---
View freetype-typos.patch
From 63107a4d7679a805ec494596597727d0624f02c9 Mon Sep 17 00:00:00 2001
From: luz paz <>
Date: Sat, 10 Jul 2021 19:05:32 -0400
Subject: [PATCH] Fix various typos
Found via ./src/autofit/aflatin.c:1697: inbetween ==> between, in between
./src/autofit/afhints.c:1056: inbetween ==> between, in between
./src/pshinter/pshalgo.c:805: inbetween ==> between, in between
./src/gxvalid/gxvjust.c:252: Threshhold ==> Threshold
./src/pfr/pfrload.c:291: acount ==> account
luzpaz /
Last active Dec 29, 2020
FreeCAD API notes
luzpaz /
Last active Apr 13, 2021
codespell flags for different FOSS projects
View gist:560e092fcea6c425959e46fed79f941f
View gist:22ecb3633b8fd7a1b0b8c40f71196010
External Projects
Voxel Workench
luzpaz / grep.txt
Last active Jul 30, 2021
CLI gems
View grep.txt
grep -R (recurse through subdirectories)
grep -i (Case insensitive)
grep -e (extended regex, allows for regex modifiers)
grep -l (only returns file name)
grep -Rle 'aligne\b' | xargs sed -i 's/aligne\b/align/'g
# search for the string 'aligne' (don't returns strings like 'aligned')
# pass all files that have said string to xargs which quickly processes
# sed (with the -i flag to process in place)