Sunset sweetness
In the middle of Småland
at sunset, the Hamneda kyrka is gently mirroring on Lagan river.
Nobody Knows
In the middle of Småland
at sunset, the Hamneda kyrka is gently mirroring on Lagan river.
Sweden’s Most Infamous Fermented Herring Tradition
Even if the season is over, today I tasted them.
I’m not worried about the disgusting smell and I took all the measures to proper handle the can. I open it outdoors, but just taking the herring in, filled the kitchen.
Anyhow they taste nice once served in the traditional way.
A northern Swedish heritage
Surströmming dates back to the 16th century, when fermentation was essential for preserving fish in northern coastal regions along the Gulf of Bothnia. With limited salt available, herring was lightly salted and left to ferment—creating a method that became both practical and culturally significant.
When Linux boot and as soon the sound system is up we can play automatically a sound. Sound should be in any format manageble from ffmpg. To do that we need to create a proper system service. First of all it is better to find the ALSA device that play sound in our system and test playing trough that device works:
aplay -L
This should give a list of devices, choose the one that say Analog, but in any case better to test that it works
ffmpeg -loglevel error -i $FULL_PATH_TO_YOUR_SOUND -f alsa plughw:0,0
Where 0,0 is the card and device number of my analog output from aplay -L. Replace with correct numbers for yours Now we can create the bash scrip will play the sound:
nano /usr/local/bin/boot-sound.sh
Add the command to play the sound file:
#!/bin/bash
sleep 1
/usr/bin/ffmpeg -loglevel error -i $FULL_PATH_TO_YOUR_SOUND -f alsa plughw:0,0
The sound system may be not immediatly ready, so I added 'sleep 1'. Tune the slip time according to you system. Create the service description file:
sudo nano /etc/systemd/system/boot-sound.service
Then add the service description:
[Unit]
Description=Play Linux startup sound
After=sound.target
[Service]
Type=oneshot
User=YOUR USERNAME
SupplementaryGroups=audio
ExecStart=/usr/local/bin/boot-sound.sh
[Install]
WantedBy=multi-user.target
We can finally enable the service:
sudo systemctl daemon-reload
sudo systemctl enable boot-sound.service
sudo systemctl start boot-sound.service
and check it started properly:
sudo systemctl status boot-sound.service
It is possible to use Emacs and markdown to write and publish articles on a WriteFreely server. First Markdown mode should be installed
M-x package-install RET markdown RET
Install then the specific Emacs package to interact with WriteFreely servers. It is available in MELPA and depend on ox-hugo
M-x package-install RET writefreely RET
When the packages are ready Emacs need to be confgured to access the target server: In the Emacs init file
~/emacs.d/init.el
add:
(require 'writefreely)
(setq writefreely-instance-url "https://yourblog.com")
(setq writefreely-instance-api-endpoint "https://yourblog.com/api")
(load-file expand-file-name "~/.emacs.d/secrets/writefreely-auth-token.el")
In the last raw there is a file we need to create because it is a good practice not to paste the access token in plain text but encrypt it.
curl -X POST "https://yourblog.com/api/auth/login" -H "Content-Type: application/json" -d '{"alias":"YOUR-USERNAME","pass":"YOUR-PASSWORD"}'
Create the dir for storing it
kdir -p ~/.emacs.d/secrets
chmod 700 ~/emacs.d/secrets
Create the token file:
nano ~/.emacs.d/secrets/writefreely-auth-token.el
Insert:
(setq writefreely-auth-token "YOUR-ACCESS-TOKEN")
Encript the file with GPG:
gpg --symmetric --cipher-algo AES256 ~/.emacs.d/secrets/writefreely-auth-token.el
GPG will ask for an encryption passphrase
Now it is possible to post:
1 – Save the post in Emacs
2 – M-x write-freely-publish-or-update
3 – Select the collection
4 – Done!
sudo arp-scan --localnet
Gives a list of connected devices, with IP and MAC and manufacturer name when recognised.
sudo nmap -sn x.x.x.x
Attempts to resolve hostnames.
ssh-keygen -t ed25519 -C "client name"
Keep the default file name when prompted. Choose a passphrase and finish. Now the key is stored in
~/.ssh/id_ed25519.pub
ssh-copy-id -i ~/.ssh/id_ed25519.pub user@x.x.x.x
This will add the public key to the server, stored in
~/.ssh/authorized_keys
It is possible to add host information in one config file:
~/.ssh/config
Add for every host:
Host servername
Hostname x.x.x.x
User user
IdentityFile ~/.ssh7id_ed25519
IdentitiesOnly yes
ssh servername
A passphrase will be required if set.
In Pi-hole go to:
Settings → DNS → Interface settings
Pi-hole normally restricts which interfaces or source networks it answers. Tailscale traffic arrives through the tailscale0 interface, so the default local-only mode can reject it. Pi-hole Documentation
For a first test, select:
Permit all origins
or in recent Pi-hole versions:
sudo pihole-FTL --config dns.listeningMode "ALL"
Then:
sudo systemctl restart pihole-FTL
This setting is safe only if port 53 is not exposed to the public Internet. Your router should not forward TCP/UDP 53 to the Raspberry Pi. Pi-hole itself warns that ALL can otherwise create an open DNS resolver. Pi-hole Documentation
A more restrictive configuration can be done later.
On the Pi:
sudo ss -lunpt | grep ':53'
You should see Pi-hole listening on port 53, for example: udp UNCONN 0 0 0.0.0.0:53 tcp LISTEN 0 32 0.0.0.0:53
Then find your Tailscale IP again:
tailscale ip -4
Suppose it is: 100.88.12.34
Open:
Tailscale Admin Console → DNS
Under Nameservers:
Add nameserver → Custom
Enter: 100.88.12.34
Then enable:
Override DNS servers
This is important. It tells tailnet clients to use Pi-hole instead of whatever DNS their current Wi-Fi/mobile network supplies. Tailscale
So your Tailscale DNS page should effectively contain: Nameservers
100.88.12.34 Global nameserver
Override DNS servers: ON
You can leave MagicDNS enabled. MagicDNS and your Pi-hole nameserver can coexist; MagicDNS handles tailnet machine names while your configured nameserver handles normal DNS lookups. Tailscale
On the iPhone:
Tailscale → Settings
Make sure:
Use Tailscale DNS settings is enabled.
The exact wording can vary slightly by Tailscale version.
Do not manually configure the iPhone Wi-Fi DNS to 100.88.12.34.
Let Tailscale install its VPN DNS configuration. This is what makes it work on: Home Wi-Fi Other Wi-Fi 4G / 5G hotspots
Tailscale explicitly requires clients to accept the tailnet DNS configuration for the DNS settings configured in the admin console to take effect. Tailscale
Disconnect the iPhone from your home Wi-Fi and use 4G/5G. Keep Tailscale connected.
Open Safari and visit several websites.
On the Raspberry Pi run:
sudo tcpdump -ni tailscale0 port 53
Then browse on the iPhone.
You should see packets similar to: 100.70.23.14.54321 > 100.88.12.34.53
If you see them, Tailscale routing is working and any remaining problem is Pi-hole configuration.
If you see nothing, the problem is on the Tailscale/iPhone DNS side.
Internet │ │ Upstream DNS e.g. Cloudflare │ ▼ ┌──────────────┐ │ Pi-hole │ │ Raspberry Pi │ │ 100.x.x.x │ └──────▲───────┘ │ DNS :53 Tailscale tunnel │ ┌───────────┴───────────┐ │ │ iPhone Laptop Tailscale Tailscale
In Tailscale: MagicDNS ON Global nameserver Pi-hole 100.x.x.x Override DNS ON
In Pi-hole initially: DNS listening mode ALL
Host dev-box
HostName 192.168.1.50
User admin
Port 22
To connect: Just type go ssh dev-box
Generate your key: go ssh-keygen
Copy the key to your server (you'll type the password one last time here): go ssh-copy-id dev-box
sudo apt update
sudo apt install broadcom-sta-dkms
sudo apt install linux-headers-$(uname -r) build-essential dkms
sudo dkms autoinstall
sudo modprobe wl
Check:
lsmod | grep wl
lsmod | grep -E 'wl|brcm|bcma'
dmesg | grep -i wl
This guide shows how to create and manage a GitHub repository entirely from the Linux command line.
sudo apt update
sudo apt install git
Configure your identity (used for commits):
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
Check configuration:
git config --list
ssh-keygen -t ed25519 -C "your.email@example.com"
Copy the public key:
cat ~/.ssh/id_ed25519.pub
Add it to GitHub under Settings → SSH and GPG keys → New SSH key.
Test connection:
ssh -T git@github.com
mkdir my-project
cd my-project
git init
This creates a new Git repository in the folder.
Add a file and commit it:
echo "# My Project" > README.md
git add README.md
git commit -m "Initial commit"
Go to https://github.com/new and create an empty repository manually.
Then connect it:
git remote add origin https://github.com/username/my-project.git
git remote add origin git@github.com:username/my-project.git
Push the local repo to GitHub:
git branch -M main
git push -u origin main
Edit files as needed, then:
git status
git add .
git commit -m "Describe changes"
git push
To pull updates from GitHub:
git pull
git clone https://github.com/username/repository.git
# or
git clone git@github.com:username/repository.git
Create and switch to a new branch:
git checkout -b feature-branch
Push a new branch to GitHub:
git push -u origin feature-branch
Merge back to main:
git checkout main
git merge feature-branch
git push