Hi there đź‘‹

My thoughts and ideas on life, universe, and everything

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. ...

January 31, 2024 Â· 1 min Â· Saeed

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. So, the frame of mind in which you do these things will determine the quality of your life. Above all, there’s one mistake, you cannot afford to make, you can’t wait until you solve your problems to be happy.” ...

June 26, 2023 Â· 1 min Â· Saeed

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. Find the index of each character in the base64 character map. Convert each index into binary. Combine all the binaries in a group into one binary, resulting in 24 bits. Split the binary into groups of 8 bits, which correspond to characters in the ASCII table. These steps will enable us to successfully decode the base64-encoded string. ...

May 25, 2023 Â· 5 min Â· Saeed

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. I’ll share the resources I used at the end of this post. ...

May 16, 2023 Â· 6 min Â· Saeed

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. Run the following command in your terminal: ...

February 7, 2023 Â· 3 min Â· Saeed

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.

February 1, 2023 Â· 1 min Â· Saeed

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. ...

January 29, 2023 Â· 7 min Â· Saeed

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. Because he had put another book in the package, I decided to keep the book, although I’m not a fan the books about success. But the Outliers proved me wrong. This book is not about how to be an outlier; it’s about the hidden opportunities that outliers benefit from: ...

January 5, 2022 Â· 8 min Â· Saeed

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. The only feelings you have left to experience are better than this one. ...

August 16, 2021 Â· 1 min Â· Saeed

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. When I say mindfulness, I mean to be present at the moment and observe my feelings when I’m washing the dishes. You might ask, why don’t you focus on a piece of music and enjoy instead of focusing on the dishes and suffer? The honest answer is I don’t know, and the more complex answer is maybe by observing and being present at the moment, I can find an answer to why it feels painful to do the dishes. ...

July 29, 2021 Â· 4 min Â· Saeed

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. And do it well. And then move on to the next thing. Follow the process and not the prize. The process is about doing the right things, right now. We wrongly assume that moving forward is the only way to progress, the only way we can win. Sometimes, staying put, going sideways, or moving backward is actually the best way to eliminate what blocks or impedes your path. Problems, as Duke Ellington once said, are a chance for us to do our best. Just our best, that’s it. Not the impossible. We must be willing to roll the dice and lose. Prepare, at the end of the day, for none of it to work. We don’t get to choose what happens to us, but we can always choose how we feel about it. Life is a process of breaking through these impediments—a series of fortified lines that we must break through. Each time, you’ll learn something. Each time, you’ll develop strength, wisdom, and perspective. Each time, a little more of the competition falls away. Until all that is left is you: the best version of you. As the Haitian proverb puts it: Behind mountains are more mountains. First, see clearly. Next, act correctly. Finally, endure and accept the world as it is.

February 15, 2021 Â· 2 min Â· Saeed

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. So don’t be discourage if you see better alternatives out there. ...

January 21, 2021 Â· 4 min Â· Saeed

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. Suffering in and of itself is meaningless; we give our suffering meaning by the way in which we respond to it. Forces beyond your control can take away everything you possess except one thing, your freedom to choose how you will respond to the situation. You cannot control what happens to you in life, but you can always control what you will feel and do about what happens to you. In psychiatry there is a certain condition known as “delusion of reprieve.” The condemned man, immediately before his execution, gets the illusion that he might be reprieved at the very last minute. An abnormal reaction to an abnormal situation is normal behavior. everything can be taken from a man but one thing: the last of the human freedoms—to choose one’s attitude in any given set of circumstances, to choose one’s own way. Dostoevski said once, “There is only one thing that I dread: not to be worthy of my sufferings.” If there is a meaning in life at all, then there must be a meaning in suffering. “Life is like being at the dentist. You always think that the worst is still to come, and yet it is over already.” it did not really matter what we expected from life, but rather what life expected from us. We needed to stop asking about the meaning of life, and instead to think of ourselves as those who were being questioned by life—daily and hourly. Our answer must consist, not in talk and meditation, but in right action and in right conduct. Life ultimately means taking the responsibility to find the right answer to its problems and to fulfill the tasks which it constantly sets for each individual. When a man finds that it is his destiny to suffer, he will have to accept his suffering as his task; his single and unique task. He will have to acknowledge the fact that even in suffering he is unique and alone in the universe. No one can relieve him of his suffering or suffer in his place. His unique opportunity lies in the way in which he bears his burden. But there was no need to be ashamed of tears, for tears bore witness that a man had the greatest of courage, the courage to suffer. Psychologically, what was happening to the liberated prisoners could be called “depersonalization.” Everything appeared unreal, unlikely, as in a dream. We could not believe it was true. How often in the past years had we been deceived by dreams! We dreamt that the day of liberation had come, that we had been set free, had returned home, greeted our friends, embraced our wives, sat down at the table and started to tell of all the things we had gone through—even of how we had often seen the day of liberation in our dreams. And then— a whistle shrilled in our ears, the signal to get up, and our dreams of freedom came to an end. And now the dream had come true. But could we truly believe in it? back to the commonplace truth that no one has the right to do wrong, not even if wrong has been done to them. is not the meaning of life in general but rather the specific meaning of a person’s life at a given moment. “Live as if you were living already for the second time and as if you had acted the first time as wrongly as you are about to act now!” happiness cannot be pursued; it must ensue. One must have a reason to “be happy.” Once the reason is found, however, one becomes happy automatically. As we see, a human being is not one in pursuit of happiness but rather in search of a reason to become happy, last but not least, through actualizing the potential meaning inherent and dormant in a given situation. people have enough to live by but nothing to live for; George A. Sargent was right when he promulgated the concept of “learned meaninglessness.” He himself remembered a therapist who said, “George, you must realize that the world is a joke. There is no justice, everything is random. Only when you realize this will you understand how silly it is to take yourself seriously. There is no grand purpose in the universe. It just is. There’s no particular meaning in what decision you make today about how to act.”

January 17, 2021 Â· 4 min Â· Saeed

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. I thought it’s better to take up some new skills to kill the time in a worthwhile way. After having a few beers, I wrote down a list of activities/skills that I’ve always wanted to do but I couldn’t find time to start them. ...

January 14, 2021 Â· 5 min Â· Saeed

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. ...

April 16, 2020 Â· 11 min Â· Saeed