Zsh Setup

Some basic zsh stuff. Setting up Aliasses https://linuxhint.com/configure-use-aliases-zsh/ CLI Tools https://dev.to/stuartcreed/how-to-add-aliases-to-your-terminal-on-mac-os-53dl Zsh Color https://scriptingosx.com/2019/07/moving-to-zsh-06-customizing-the-zsh-prompt/ Grepping History history | grep echo https://linuxhint.com/search-in-my-zsh-history/ Simple Cron (type) job export VISUAL=nano or export EDITOR=nano for noob-mode, and don’t forget to chmod +x your files. Example: 43 * * * * ~/scripts/notes.sh >/tmp/stdout.log 2>/tmp/stderr.log https://www.geekbitzone.com/posts/macos/crontab/macos-schedule-tasks-with-crontab/ https://towardsdatascience.com/a-step-by-step-guide-to-scheduling-tasks-for-your-data-science-project-d7df4531fc41 https://serverfault.com/questions/332255/how-to-backup-crontab-e-files https://apple.stackexchange.com/questions/38861/where-is-the-cron-log-file-in-macosx-lion Preferred Shebang Line? User preferred shell: #!/usr/bin/env bash Source: https://scriptingosx.com/2017/10/on-the-shebang/ zsh vs. bash differences Q: is zsh a superset of bash?...

March 1, 2023 · 105 words · Peter Dieleman

Python Cheatsheet

Basics brew install pyenv brew install poetry pyenv install 3.7 pyenv global 3.7 poetry new demo poetry add numpy poetry install poetry run demo/demo.py ├── README.md ├── demo │ ├── __init__.py │ └── demo.py <-- add yourself ├── poetry.lock ├── pyproject.toml └── tests └── __init__.py Passing in Arguments when using Poetry From SO: test poetry run arg_script arg1 arg2 arg3 Visualizing Dir Structure brew install tree

February 13, 2023 · 66 words · Peter Dieleman

Banana Pancakes

From: https://www.onceuponachef.com/recipes/banana-pancakes.html 230g / 1.5 cups all purpose flour, spooned into measuring cup and leveled off 300g / 1 cup plus 2 tablespoons low fat milk 2 TBSP. sugar 10g / 2.5 tsp. baking powder 1/2 tsp. salt 1 small, over-ripe banana, peeled (the browner, the better) 2 large eggs 1/2 tsp. vanilla extract 3 TBSP. unsalted butter, melted

February 12, 2023 · 59 words · Peter Dieleman

Obscure Nation States

Arbitrary list of (obscure) nation states that existed during the 20th century. Internationally Recognised Ordered to date of dissolution: 1982 – 1992: Coalition Government of Democratic Kampuchea 1958 – 1984: Republic of Upper Volta 1478 – 1967: Ankole 1809 – 1949: Tripura 1921 - 1931: Socialist Soviet Republic of Abkhazia 1920 - 1924: Free State of Fiume 22 April 1918 – 28 May 1918: Transcaucasian Democratic Federative Republic 1501 - 1912: Wadai Empire 1713 - 1904: Kingdom of Champasak 1690 - 1902: Aro Confederacy Not Internationally Recognised 1992 - 1995: Republika Srpska 1990 - 1994: Gagauz Republic 10 January 1919 - 23 February 1923 Free State of Bottleneck 10 January 1919 - 4 February 1919 Bremen Soviet Republic Honorable Mentions/Condominiums Less obscure, but still worth mentioning:...

February 2, 2023 · 156 words · Peter Dieleman

Fish Fragrant Eggplant

From, The food of Sechuan, by Fuchsia Dunlop (p. 266): Ingredients 600g eggplants 1.5 TBSP. Sichuan chili bean paste (Toban Djan/Doubanjiang) 1.5 TBSP. chopped garlic 1 TBSP. finely chopped ginger 150mL hot stock or water 4 tsp. superfine sugar 1 tsp. light soy sauce 3/4 tsp. potato starch + 1 TBSP. cold water 1 TBSP. Chinkiang vinegar 6 TBSP. thinly sliced scallion greens

February 1, 2023 · 63 words · Peter Dieleman

Git reset to single commit

Resetting entire repository to a single commit: git checkout --orphan newBranch git add -A # Add all files and commit them git commit -m "first commit" git branch -D main # Deletes the main branch git branch -m main # Rename the current branch to main git push -f origin main # Force push main branch to github git gc --aggressive --prune=all # remove the old files And additionally check remote branches: git ls-remote or delete them through the UI....

February 1, 2023 · 92 words · Peter Dieleman

Latex through Github Actions

Setting up LaTeX through github actions: https://dev.to/mrturkmen/latex-with-github-actions-4580 https://github.com/marketplace/actions/latex-compilation

February 1, 2023 · 8 words · Peter Dieleman

Minestrone

Buy: 2 onions, peeled and chopped 2 medium carrots, peeled and chopped 1 celery stick, trimmed and chopped Few thyme sprigs 2 TBSP tomato puree 2 x 400g tins borlotti beans, rinsed and drained 150g cherry tomatoes, halved Large handful of basil, finely shredded Further: 2 TBSP olive oil, plus a little extra to drizzle (optional) 1 bay leaf 80g smoked back bacon, trimmed of fat and chopped 600-800ml chicken stock or water 75g spaghetti, broken into small pieces Parmesan, for grating (optional) From: countryandtownhouse

February 1, 2023 · 85 words · Peter Dieleman

Parboiling rice for stir-fry

From: Fried Rice 3 mins in deep water → drain → 15 minutes steaming.

February 1, 2023 · 14 words · Peter Dieleman

SSH key macOS

https://superuser.com/questions/1127067/macos-keeps-asking-my-ssh-passphrase-since-i-updated-to-sierra ssh-add -A nano ~/.bash_profile https://unix.stackexchange.com/questions/71253/what-should-shouldnt-go-in-zshenv-zshrc-zlogin-zprofile-zlogout https://apple.stackexchange.com/questions/388622/zsh-zprofile-zshrc-zlogin-what-goes-where

February 1, 2023 · 7 words · Peter Dieleman