aboutsummaryrefslogtreecommitdiff
path: root/til.md
diff options
context:
space:
mode:
Diffstat (limited to 'til.md')
-rw-r--r--til.md53
1 files changed, 53 insertions, 0 deletions
diff --git a/til.md b/til.md
new file mode 100644
index 0000000..b25de0d
--- /dev/null
+++ b/til.md
@@ -0,0 +1,53 @@
+---
+layout: page
+title: "TIL: Useful code snippets"
+lang: en
+ref: til
+---
+Useful code snippets[^source].
+
+## Git custom work-tree checkout
+
+```shell
+git --work-tree=/path/to/outputdir checkout HEAD -- .
+```
+## Search in Git
+
+Search log messages
+
+```shell
+git log --grep='Build 0051'
+```
+
+Search content in git history
+
+```shell
+git grep 'Build 0051' $(git rev-list --all)
+```
+## Find broken symlinks
+
+```shell
+find . -xtype l
+```
+
+## Kernel version
+```shell
+uname -r
+```
+## Sending email through the command line
+
+```shell
+mail eu@euandre.org -s "This is the subject" -aFrom:eu@euandre.org <<< 'This is the message'
+```
+
+## Git bisecting
+
+Automatic Git bisect
+
+```shell
+git bisect start e1fd0a817d192c5a5df72dd7422e36558fa78e46 HEAD
+git bisect run sh -c 'git clean -ffdx && ./bootstrap && ./configure --localstatedir=/var && make && git checkout'
+```
+
+
+[^source]: Shameless rip-off of [Anna e só](https://til.flourishing.stream/)