Posts
2023
Link dump #1
Git submodules and newly cloned repositories
As a reminder for my future self: If one clones a repository to a new location, the submodules are not cloned automatically. They need to be initialized and updated once, in order to show the proper content.
git submodule init
git submodule update
If the theme is a submodule and the customizations are in a different branch, one needs to switch to that particular branch as well. D’oh!
git checkout live
I started to shoot analogue again
Due to circumstances I got my hands on an analogue Minolta from the 90s. A Dynax 9xi. There was a 35mm film already loaded inside and almost full (24/36) as well. I took a walk through one of the historic parts of the city and finished the film. After a bit of research - many thanks to analoge-fotografie.net - I decided to try my luck with Safelight Berlin. They offered a good price and seemed caring all-in-all. I received an email that the film arrived in their lab today, so I will know more in about two weeks time. I think the film inside the camera was from ~2005, fingers crossed that I will get something out of it!
FS22 - things I needed to lookup
Restic backup and Windows paths
I recently stumbled upon restic and since I haven’t really setup a backup of my windows machine1, I wanted to give it a try.
I love it 💛 The software is straight to the point, not bloated and using it in a terminal is a bonus for me!
However, there was one pitfall with windows paths (and I’m not even surprised by this):
- When you select the folder for the backup, you can choose absolute or relative paths.
- The backup snapshot will always show the absolute path.
- Additionally, the path in the snapshot view will be displayed in Windows style (with a colon and backward slashes).
- The path in the actual backup will vary depending on your backup command and can only be displayed with
ls
# Backup C:\Users\restic_demo\Git with an absolute path (ID b713711c)
PS C:\Users\restic_demo> restic -r .\Backup\ backup C:\Users\restic_demo\Git\
# Backup C:\Users\restic_demo\Git with a relative path (ID da8fe3c7)
PS C:\Users\restic_demo> restic -r .\Backup\ backup .\Git\
# Display restic snapshots
PS C:\Users\restic_demo> restic -r .\Backup\ snapshots
repository ebfaab05 opened (version 2, compression level auto)
ID Time Host Tags Paths
--------------------------------------------------------------------------
b713711c 2023-09-30 21:47:58 Horscht C:\Users\restic_demo\Git
da8fe3c7 2023-09-30 22:03:19 Horscht C:\Users\restic_demo\Git
--------------------------------------------------------------------------
# Display snapshot files and folders for b713711c
PS C:\Users\restic_demo> restic -r .\Backup\ ls b713711c
enter password for repository:
repository ebfaab05 opened (version 2, compression level auto)
snapshot b713711c of [C:\Users\restic_demo\Git] filtered by [] at 2023-09-30 21:47:58.6977882 +0200 CEST):
/C
/C/Users
/C/Users/restic_demo
/C/Users/restic_demo/Git
/C/Users/restic_demo/Git/blog.bdw.li
/C/Users/restic_demo/Git/blog.bdw.li/.git
# Display snapshot files and folders for da8fe3c7
PS C:\Users\restic_demo> restic -r .\Backup\ ls da8fe3c7
enter password for repository:
repository ebfaab05 opened (version 2, compression level auto)
snapshot da8fe3c7 of [C:\Users\restic_demo\Git] filtered by [] at 2023-09-30 22:03:19.7184899 +0200 CEST):
/Git
/Git/blog.bdw.li
/Git/blog.bdw.li/.git
I no case would I be able to restore the data using the path from the snapshot view C:\Users\restic_demo\Git
. It took me a few confused minutes to figure that out. And I didn’t find anything about it in the docs. At last in the Github issue #2792 was a side note that mentioned the proper paths.
Mailstore Home: Archive mailboxes automatically
I’m using Mailstore Home to archive my personal emails for a while now. And while I didn’t find any specific documentation on command line options, you can actually use /c archive --id=$n
to automatically start the archive process on application start. I currently archive three mailboxes and my scheduled task looks something like this:
MailStoreHome.exe /c archive --id="1,2,3"
At the end I still have to close the Mailstore Window manually. There are tools like AutoIt, that you can use to hide the GUI, but I don’t mind closing the window myself. The task runs right after my login and I just let it do it’s thing in the background. It usually doesn’t take longer then a minute anyway. If you do mind the window, check out the article on andysblog.de1.
I'm Still Biking 🚴♂️
Four weeks after my first bike ride this year and I already sat on the saddle six more times! Three out of those six were earnest rides, where I squeezed myself into my lycra and took my race bike Rudi for a spin.
Month | Distance | Rides |
---|---|---|
May | 96km | 2 |
April | 80km | 2 |
I actually wanted to achieve 200km this month but I can already tell, that this is an unrealistic goal. Nevertheless, I don’t fret! I am actually looking forward to summer and 100s of kilometers to follow (~ ̄▽ ̄)~
Keep the hugo theme up-to-date
I found out that my current setup doesn’t allow for easy theme updates by the author, since I just cloned the theme folder into my hugo project ⊙﹏⊙
But thanks to Adam and his introduction to gits submodule function I was able to work around this.
Create repositories #
- First I created a repository for my hugo project
- Then I created a fork of my current theme Terminal
- The theme was then embedded as submodule in my hugo project and received a second git repository as upstream source (this is the magic function right here)
git submodule add -f https://github.com/<user>/hugo-theme-terminal.git themes/terminal
git remote add upstream https://github.com/panr/hugo-theme-terminal.git
- I also followed Adams advise and moved my theme customizations to a different branch
Get updates from the theme author #
My workflow for theme updates now looks like this:
Finally on the Road Again
After month I finally made it back on the road again.
I bought my race bike in 2017 and I didn’t even reach 3000km with it yet. That actually bothers me a lot. Combine that with my somewhat unhealthy life style and increasing age and the result is Monsieur Blubber 🤪
Enough whining, the main thing is I did it again - 20km in 45min 💪
Log analysis with Grafana and Loki
I wanted to play around with Grafana and Loki for a while now, but always found something else to do. Then, the other day, I decided to push my logs to Grafanas cloud stack just for the fun of it.
The installation and integration into my Ubuntu server and docker was easy enough. After a few hours I was shocked how many bad ssh logins were detected (>100) and decided to up my fail2ban rule. I am now blocking failed attempts (3 within 24h) for 150 days and I still receive around 5 attempts per hour.
Ciao Pocket, hello Nextcloud Bookmarks
My adventures with a Pocket account were short-lived. Saved links can’t be changed. Most menu items ask you to create a premium account, no thank you.
I decided to invest more into Nextcloud for the moment and installed bookmarks. I synchronize them through my devices using floccus.
On my mobile phone it’s still not easy to add bookmarks but the developer added a feature for that just yesterday (Implement share extension for iOS)!
I love RSS!
After using Google Reader for years (who didn’t 🤷♂️) I went to feedly for some time (who didn’t 🤷♂️). But I don’t remember if it was ads or my motivation to self-host, that brought me to Nextcloud News.
Since buying a NAS three years ago, I seldomly use Nextcloud for anything else than reading my feed. And for a feed reader it’s quite bloated. Yes there are also other nice apps for Nextcloud, but I just don’t use them.
Streamlined publishing
Maybe I can make writing a habit by simply doing it once a day. But the process of publishing would need to be simpler.
I still struggle with a hybrid world. Hugo is currently only running on my windows workstation and rysnc
only works on my WSL.
I could try to debug my hugo installation on WSL, but I am too lazy to do that. I could also use robocopy
instead of rsync
, but I don’t want to go that way either (working with ssh keys was a bit of a pain).
How to start (´。_。`)
It’s been four weeks since I opened this blog and I haven’t published anything new yet. Let me just drop a few thoughts off my head:
- I am impatiently waiting for a free slot on the Pixelfed mobile app beta on testflight! The mobile web page1 simply doesn’t feel as smooth as a proper app.
- After looking at a couple of photo books2 3 I really want to dig out my old analog Nikon and start shooting black and white films.