Notes
Notes to refer back to at a later date.
git
-
After doing a large rebase check you only changed what you intended with no surprises using
git diff origin/branchname HEAD -- filenamebefore pushing back to origin. -
Before a history rewrite (squash, rebase,
reset --hard, …) drop a safety tag onHEAD:1 2 3git tag backup-refs HEAD # do the thing git tag -d backup-refs # once happy it workedTo recover if things go wrong:
1 2 3git log backup-refs # inspect the old state git diff HEAD backup-refs # compare against the new state git reset --hard backup-refs # restore the old stateThe tag keeps the old history reachable (reflog entries expire) and is trivially deleted. For a dated backup tag use
git tag backup-$(date +%Y%m%d) HEAD.
helix
- Multiline Cursors
- On instances of a word
Add word to search buffer with/<word>or*, select it with visual modeVand pressnto select the instances you want. Then enter insert mode with multiple cursors!
- On instances of a word
Librewolf
- When installing via homebrew on mac it raises an issue due to removal of the
--no-quarantineflag by brew. To get around this install as normal, but then run:Librewolf codeberg source1sudo xattr -r -d com.apple.quarantine /Applications/LibreWolf.app
pFUnit
- There is an implicit limit on test names of 36 characters.
The
@testmacro expands names to:and Fortran lines are limited to 132 characters. The 2023 standard raises the limit to 10,000 characters, and there exist compiler flags to adjust it.1call suite%addTest(makeCustomTest('<name>', <name>, testParameter))
Quarto
- To get a pdf of a quarto presentation from a browser use
decktape
.
- To preserve animations (somewhat) use:
1npx decktape reveal <slides URL> <output file>.pdf --pause 500 --fragments --progress
- To preserve animations (somewhat) use: