Skip to content

Instantly share code, notes, and snippets.

View pgrepds's full-sized avatar

David Scholz pgrepds

View GitHub Profile
git config --global user.signingKey <fingerprint>
git config --global commit.gpgSign true
pgrepds / gist:fa67a3077f6064f5f1754847a3effb80
Created January 18, 2022 12:37
Kill and restart GNOME session without logging out via terminal
killall -3 gnome-shell
pgrepds / gist:812b21e16640fee9fae22449d66ce312
Created January 18, 2022 16:25
Set ssh globally as default for GitHub
git config --global url.ssh://
pgrepds / gist:b78d8ca1914414a4219d71a26bd6b247
Created February 7, 2022 12:23
Test microphone on Linux via loopback
Install PulseAudio Volume Control (pavucontrol).
Execute the following command.
pactl load-module module-loopback latency_msec=1
The above will route the microphone output back to the input.
pgrepds / gist:22bd92f1697d68b18e5d63d1cb258689
Created February 7, 2022 14:27
Including Mathematica IGraphM
<< IGraphM`
pgrepds / graph.lean
Created February 12, 2022 20:57 — forked from MonoidMusician/graph.lean
Graph Theory: watershed
-- This work by Nick Scheel is licensed under CC0 1.0
-- A basic framework for graph theory on multidigraphs in Lean
-- and a proof that no_watershed_condition is sufficient to
-- establish that a graph has a unique sink for each vertex
-- I hope to give some introduction to the syntax of how Lean works here,
-- but I assume some familiarity with functions, pattern matching,
-- type theory, and proofs.
pgrepds / gist:761ebdbeefdbed54683c6220504ed0d1
Created March 22, 2022 15:25
Change authorship of commits which are already pushed
Fix the author of commits which are already pushed.
To fix the last six commits:
* First set the correct author for current Git repo using `git config --local FirstName LastName`
and `git config --local`
* Then apply to the last six commits `git rebase --onto HEAD~6 --exec "git commit --amend --reset-author --no-edit" HEAD~6`
* Finally, push using `git push --force-with-lease`
pgrepds / gist:297d6ef710d4006cac5916160287da6c
Created March 28, 2022 11:03
Delete simulator content from command line on MacOS X
xcrun simctl erase all
pgrepds / gist:a0baf1df7c291908a63de3b437f53e10
Created March 31, 2022 04:35
Sqash the latest 6 local commits into one new commit.
Sqash the latest 6 local commits into one new commit.
git reset --soft HEAD~6 && git commit