summary refs log tree commit diff
path: root/Cheat sheets
diff options
context:
space:
mode:
authoruser <user@node5.net>2024-03-11 11:31:58 +0100
committeruser <user@node5.net>2024-03-11 11:31:58 +0100
commit1ede08d1790d1046c06343f273711fe68ab62f83 (patch)
tree5270392ffa4cbed5598f5aeca1b6f86171db8626 /Cheat sheets
initial commit with 18 articles
Diffstat (limited to 'Cheat sheets')
-rw-r--r--Cheat sheets/Commands.md19
-rw-r--r--Cheat sheets/Git.md12
2 files changed, 31 insertions, 0 deletions
diff --git a/Cheat sheets/Commands.md b/Cheat sheets/Commands.md
new file mode 100644
index 0000000..818710f
--- /dev/null
+++ b/Cheat sheets/Commands.md
@@ -0,0 +1,19 @@
+---
+description: Handy commands i use on my Linux distro machines
+created: 2024-01-01
+---
+
+
+## Convert markdown to HTML
+e.g. to preview a markdown file
+Reqires [python-markdown](https://python-markdown.github.io/install/)
+
+```bash
+python3 -m markdown README.md > /tmp/README.html
+```
+
+To load extensions like code blocks:
+```bash
+python3 -m markdown -x fenced_code -x codehilite -x tables README.md > /tmp/README.html
+```
+
diff --git a/Cheat sheets/Git.md b/Cheat sheets/Git.md
new file mode 100644
index 0000000..5297eda
--- /dev/null
+++ b/Cheat sheets/Git.md
@@ -0,0 +1,12 @@
+---
+created: 2024-01-01
+description: Handy git commands
+---
+
+### See changes since last commit
+```bash
+git diff HEAD~0
+```
+
+### Commit parts of a file
+[filip-prochazka.com - Git: commit only parts of a file](https://filip-prochazka.com/blog/git-commit-only-parts-of-a-file)