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

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

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

May 16, 2023 · 6 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....

January 21, 2021 · 4 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

How to Authenticate User in Symfony 5 by Jwt

Introduction Nowadays, when we are talking about web development, regardless of the type of application or the programming language, one of the first things that come to mind is how to authenticate users. There are many types of authentication ways for this purpose such as login form, oAuth, JWT, API token, etc. Reliability, security, easy to use and widely supported in many platform and languages make JWT one of the most popular authentication protocols in the web ecosystem. In this tutorial, we will learn how to implement JWT in Symfony 5 by using the firebase/php-jwt package and AbstractGuardAuthenticator class. There are some bundles or packages already out there like lexik/LexikJWTAuthenticationBundle that we can use but at the end of this tutorial, we will learn how can we implement and use Authentication Guard which in Symfony. ...

April 11, 2020 · 10 min · Saeed