I wanted to use Mullvad VPN and Tailscale together on my Android phone. The problem is Android only allows one active VPN at a time. Tailscale does have a built-in option to purchase Mullvad through them, but that's not available in India. So I built a small tool to work around this: mullvad-tailscale . It's a Docker container that takes a Mullvad WireGuard tunnel and exposes it as a Tailscale…
In many Go codebases, I come across patterns like this: func main () { var wg sync . WaitGroup wg. Add ( 1 ) go func1 ( & wg) wg. Wait () } In this pattern, the goal is to let a function call the Done() method once it is finished, synchronizing multiple goroutines with a sync.WaitGroup . However, there's a disadvantage: now the function needs to take a WaitGroup as one of its arguments.…
fzf is a powerful tool for fuzzy searching, and can greatly enhance your workflow. Here are some ways that I use fzf : 1. Changing directories with ease To quickly change directories, I use a bash alias that combines the speed of fd (an alternative to find ) and the convenience of fzf . cdh () { cd $( fd --type d . " /home/sarat " | fzf ) } This command lists all directories under the /home/sarat…
In my attempt to move away from Google Photos, I decided to try out Photoprism as an alternative in my Nextcloud setup . However, my first impression of Photoprism was that its user interface was unintuitive, and my family members, who are not very tech-savvy, agreed with me. Additionally, I discovered that Photoprism lacks a dedicated mobile app, and users are expected to use a Progressive Web…
Me and my family uploads most of our photos on Google Photos. This always bothered me since this is one of the most important data we have and we are relying on the promise of unlimited storage by Google. Even then we are losing the original quality photos and uploading lossy photos (what google calls High Quality Photos) to get the unlimited storage. I always wanted to find a good alternative for…
Recently I had to implement HMAC SHA1 using Elixir. It's pretty simple in Python. Here's the code in Python3. import hashlib import hmac secret_key = b " secret-key " text = b " This is a secret " hmac_sha1 = hmac.HMAC( key = secret_key, msg = text, digestmod = hashlib.sha1).hexdigest() print ( " HMAC is {} " .format(hmac_sha1)) # HMAC is 08dc7014b3e778a44af52ea7a16a973a9b48f0dd I wanted to do the…