Skip to content

Instantly share code, notes, and snippets.

luzpaz /
Last active Sep 6, 2021
FreeCAD-Addons Guidelines

How to update the FreeCAD-Addons repo

git pull

# git submodule foreach git checkout master
# Skip certain submodules

git submodule foreach 'case $name in MnesarcoUtils|SlopedPlanesMacro|Design456|OpticsWorkbench) ;; *) git checkout master ;; esac'

# git submodule foreach git pull
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)
View Codespell-1-line-tests.txt
Find a line that doesn't have '->' in it: ^(.(?!(->)))*$
Find a line with missing commas: ^(?=\w+->(?!\w+$)(?:\w+, )*\w+(?!,)$).+
# Copying commits from other repos
## This will print the diff,
## then grep all lines that start with '+' and a letter or number (needs other conditions as well
## the truncates the '+' of the beginning of the result
## copies everything to the buffer
git show | grep '^+[a-zA-Z0-9]' | cut -c 2- | pbcopy
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 Apr 13, 2021
codespell flags for different FOSS projects
View FC-Cmake-summary.txt
Summary report
-- Build type: None
-- Compiler: /usr/bin/c++ (10.2.0)
-- Flags: -Wall -Wextra -Wno-write-strings -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fPIC -w
-- Standard: Requires C++14
-- Python: [/usr/bin/python] [.cpython-39-x86_64-linux-gnu]
-- PCL: not enabled
luzpaz /
Last active Dec 29, 2020
FreeCAD API notes
View gist:560e092fcea6c425959e46fed79f941f
  • Patching from https://.patch file

    curl | git apply -v
  • Patching a FreeCAD workbench from a PR

    cd ~/.FreeCAD/Mod/sheetmetal/
    git fetch 
    curl -ss | git apply
luzpaz / gist:2c1cdb0a7919123558cf5c28fa39646a
Created Nov 29, 2020
List of .svg files in ./src/Mod
View gist:2c1cdb0a7919123558cf5c28fa39646a
luzpaz / Valentina.rb
Last active Nov 16, 2020
Valentina Project Homebrew forumula
View Valentina.rb
require 'formula'
class Valentina < Formula
head ''
homepage ''
# version "0.2.8"
depends_on 'qt5' => :build
depends_on 'ccache' => :build
depends_on 'xpdf' => :optional