Global .gitignore
I found myself adding .idea and .DS_STORE to .gitignore in every repository I’ve been working on, but then I realized I could take advantage of Git’s global .gitignore. ...
Journey of Life
“Wherever you’re hoping to get to in life, the quality of the journey must be more important than those fleeting moments when you actually seem to arrive at your destination. Because most of your life is the journey, most of your life is a process of solving problems. It is not and never will be the condition of basking in the absence of all problems. You will always have something to do....
Base64 implementation in Rust - Part 2: decoding
In the previous article, we explored how base64 encoding works and successfully implemented it in Rust. Now, let’s delve into the process of decoding a base64-encoded string. It is important to note that the implementations discussed here are primarily for educational purposes, and for production environments, it is recommended to employ well-established libraries. Theory Here are the steps to decode a base64-encoded string: Split the string into groups of 4 characters....
Base64 Implementation in Rust - Part 1: encoding
I’ve been learning Rust on and off for quite a some time and every time I pick it up again I learn something new. A few days ago when I came back to it again, I was looking for a educational project to do and I decided to implement the Base64 algorithm in Rust. In this post, I will explain how to encode data to base64 in Rust. Decoding from base64 will be covered in a separate blog post, but it’s worth practicing by implementing it yourself....
Deploy Hugo on Github Pages with GitHub Actions
For the start, you will require two repositories: one to store your Hugo project, and the other to host the GitHub page with the static files generated by Hugo. Configuring GitHub Pages GitHub Pages is a straightforward solution for hosting a static website. You can find more information on how to set up your GitHub Pages in the relevant documentation. To give GitHub Actions permission to write to your GitHub Pages repository, you will need to create a secret key pair....
Today's Mantra
Let’s approach today differently. Let’s be mindful. Let’s not worry about the future. Whenever our minds wander, let’s bring them back to the present moment. Let’s love. Let’s smile.
What Next
Steps towards a dream Since moving to Germany, I have struggled to find a long-term goal to guide my daily actions. My dream of living abroad, particularly in Germany, had been with me since my early twenties, but it wasn’t until my late twenties that I committed to making it a reality. To prepare for this move, I left my hometown and spent time in Tehran, where I gained valuable experience working in technology companies and tested my ability to live independently in a different city while dealing with the challenges that come with it....
Books I Loved Most in 2021
In terms of reading, 2021 was a productive year for me. I read several books, here is the list of those that I loved most. Outliers: The Story of Success When the books I had ordered online were delivered to me, I saw the Outliers were also in the package. I was disappointed because I hadn’t ordered this, and after contacting the seller, he said he mistakenly put this book instead of another book that I’d ordered....
To remember during the bad days
It won’t last. You have felt other things. You will feel other things again. Emotions are like weather. They change and shift. Clouds can seem as still as stone. We look at them and hardly notice a change at all. And yet they always move. The worst part of any experience is the part where you feel like you can’t take it any more. So, if you feel like you can’t take it any more, the chances are you are already at the worst point....
Doing the Dishes as an Act of Mindfullness
I don’t know why, but for me doing the dishes is one the worst aspect of life, especially when you have to do it after one of the best aspects of life, eating. Since I’ve been struggling to wash the dishes as soon as I use them, the result has always been a sink full of dirty and stinky dishes. I have tried many ways to overcome this laziness. One of those ways is to look at it as an act of mindfulness....
The Obstacle Is the Way by Ryan Holiday - Highlights
you can focus your energy exclusively on solving problems, rather than reacting to them. When you worry, ask yourself, What am I choosing to not see right now? We are A-to-Z thinkers, fretting about A, obsessing over Z, yet forgetting all about B through Y. Think progress, not perfection. Okay, you’ve got to do something very difficult. Don’t focus on that. Instead break it down into pieces. Simply do what you need to do right now....
A few ideas for your next Go project
Have you ever been out of idea on what to code for your next open-source or side-project? As a beginner, you can find many resources and tutorials on different beginner-friendly projects out there. But when you pass that level, you just cannot come up with any interesting ideas to work on while you’re learning. You can take any of these ideas for your next project, and dont’ forget the purpose of doing this, is learning....
Man's Search for Meaning by Victor Frankl - Highlights
Nietzsche: “He who has a Why to live for, can bear almost any How.” Life is not primarily a quest for pleasure, as Freud believed, or a quest for power, as Alfred Adler taught, but a quest for meaning. The greatest task for any person is to find meaning in his or her life. Frankl saw three possible sources for meaning: in work (doing something significant), in love (caring for another person), and in courage during diffcult times....
2020 in a Nutshell
In March 2020, the government announced a lockdown. No one allows to go out except for shopping, and everyone must work from home. First of all, despite of the hard situation for every business, I was lucky that I didn’t get laid off and my salary remained untouched. After a few days of passing time at home, playing video games, and watching movies, I felt guilty that I’m not as productive as I should be and I’m not using my time efficiently....
How to write a PHP Youtube video downloader
PHP is not the best language for writing a download manager, but in this article, we are going to learn how we can download videos from Youtube. Because PHP does not support multithreading, we cannot make a proper download manager that split the file into several chunks and download it concurrently. There are some ways to add multithreading to PHP, but for the sake of this article, we won’t go through those ways and will stick to single threading....