What are Makefiles and Why should anyone use them?

Makefiles are one of the most useful tools I’ve been working with. I can say that it can be useful for lots of projects (with any language). What is Makefile? Makefiles are essentially a place where you can store your most frequently used commands in one place. They make repetitive tasks easier by creating short commands. Let’s take a look at sample file: install_packages: pip install -r requirements.txt generate_deps: pip-compile requirements.in -o requirements.txt docs: pdoc --html --force --output-dir docs common The way to execute this targets would be using make generate_deps or make docs. By default make command will search for a file named Makefile (with no extension) to run your commands. ...

July 19, 2024 · 5 min · 907 words · Amir

Setting Up Caddy for Reverse Proxy is dead simple

I’ve recently found Caddy as a tool to assign urls to my docker services and I’m quite happy with it. I’ve done other reverse proxies like Nginx and Traefik in the past but they are too complicated for my needs. Let’s start. Let’s say that you want to assign your url like newservice.amirpourmand.ir to a service in a VM with a public IP address. I’ll go you through it. Also, It has multiple benefits. The first one is that you don’t have to do IPs. You don’t have to deal with ugly IPs that may change in the future. You deal with Secure URLs. The second is that the connection is https. ...

July 3, 2024 · 3 min · 533 words · Amir

How to Record Google Meet Session With OBS Studio

Some days ago, I wanted to record a Google Meet session as a podcast and I didn’t want to pay for just recording the call, neither to google nor third party services. Update 2024-11-02 Previously, I used the browser method to record the screen since I heard my voice twice in the recording. This way, the issue is fixed. But, There are other solutions! The better solution would be to just record the screen normally. These would be the sources. One would capture your audio, and the other would capture your screen and their audio. ...

May 19, 2024 · 3 min · 546 words · Amir

Browser Extensions I use

Here are some most important chrome extensions I use almost on a daily basis. All of them can be installed on chromium browsers. But, they may not be available on Firefox or other browsers. Bitwarden Bitwarden is the first thing I install on every browser. It saves all my passwords on all my devices. I rather not depend on Google to save my passwords since It limits my options to just use same-old Chrome. ...

March 12, 2024 · 3 min · 452 words · Amir

A Great Combination of Jupyter + Conda + Docker

I’ve always wanted a clean local environment to install python packages in it. To me, it should have multiple requirements: 1- Installing packages should be easy enough. I mean I just want to use pip install that and not worry about anything else. 2- Switching between python environments should be easy. If I happen to need multiple environments in my system, I want to be able to easily switch between them. Preferably, even without command line. ...

December 8, 2023 · 3 min · 588 words · Amir

Useful Linux Commands and Scripts

I’ve been working for some time with Linux and I feel that sharing some scripts and also tools I frequently use can be helpful. Search History history | grep seach_string or Ctrl+R. Search Log files In order to search a folder to see if a string exists in the whole folder: grep -ir "string to search" . Show File and Folder Size To analyze file size, there are several ways. ls -alh -rw-r--r-- 1 amir amir 270K May 20 2023 Arial.ttf -rw-r--r-- 1 root root 72 Sep 20 21:10 Untitled5.ipynb -rw-r--r-- 1 amir amir 1.2M May 26 2023 exp12.mp4 -rw-r--r-- 1 amir amir 4.7M May 26 2023 exp13.mp4 -rw-r--r-- 1 amir amir 654M May 22 2023 exp4.avi -rw-r--r-- 1 amir amir 68 Dec 28 2022 kaggle.json drwxr-xr-x 17 amir amir 4.0K Dec 28 2022 miniconda3 drwxr-xr-x 2 amir amir 4.0K May 26 2023 mp4 You can see from the above output that this only shows file sizes properly. ...

December 5, 2023 · 4 min · 739 words · Amir

How to Sync Obsidian between Android, Windows and Mac via GIT

Introduction I’ve tried many tools and tutorials to sync my obsidian notes between android and windows. They all have the same problems: Some need subscription service (Obsidian Sync) which I’m not willing to pay Some can’t handle editing the same file (Sync via GoogleDrive, Dropbox and …) Others need complicated setup and maintenance. Update Sep 2025: A better one Just use Git Sync on android. It will make your life easier. I’ve been using it a month and since I had no problem. ...

January 16, 2023 · 7 min · 1402 words · Amir