Hasan's Blog

I blog about programming and graphic design, I am interested in React, Blender 3d.

Feb 10, 2024

My notes on some articles

In this post I will share some articles that I have read along with some notes from these articles. React Query as a State Manager This articles is written by...

Jan 21, 2024

Request new playstore signing key

Last week, Google prompted me to make updates to my app or risk losing access to my Google Play account! The same account that I paid 25 USD for. Anyways,...

Nov 9, 2023

Checkout a branch without commiting/stashing local changes

https://git-scm.com/docs/git-worktree this command copies the entire repo into a new tree that will appear as a sub dir. then you can explore that shit as you want knowing that the...

Nov 2, 2023

Git revert pitfall

create a commit in branch a, then create a new branch b and then revert the commit from a. then merge branch b back into a. what will happen to...

May 15, 2023

How I paid the price of over-engineering

TLDR: While hosting my blog in one place and fetching styles from another place (using GitHub Pages’ remote themes), I encountered a problem where a request to an insecure HTTP...

May 15, 2023

Tools to enhance website performance

A Guide on how to measure and improve the performance of any website using free tools. Problem I was trying out some performance-measuring tools on a website and it showed...

Apr 19, 2023

How to cache expensive components in React

A Guide to Cache expensive components in React: Use a simple React hook can cache a component that takes a long time to load, and improve your application’s user experience....

Feb 19, 2023

How to sort table in NextUI

How to sort table in NextUI A useful example on how to utilize the sorting functionality that NextUI tables have. Overview Create a table following any of the examples from...

Feb 15, 2023

Solve error 504 in NextJS

Solve error 504 in NextJS This post provides an outline on the steps to take when facing error 504 aka serverless function timeout. To describe it better, when you have...

Feb 9, 2023

Publishing Your First NPM Package

Publishing Your First NPM Package This document provides an outline on the steps to take when publishing your first NPM package. Create the package files Create a package.json file Publish...

Jan 30, 2023

Display Temporary Mesage Using Hooks

Display Temporary Mesage Using Hooks Here is how to display a temporary error message or a warning in a React app using hooks and setTimeout The desired result Take a...

Jan 27, 2023

Simple Solution to CORS

CORS is a security rule that applies to browsers. It prevents a page from accessing a server if they sit on different domains. A hacker could otherwise access your bank...

Nov 17, 2022

How to find the coordinates of any place on Earth!

Geocoders are applications that enable us to search for any location on the planet and get its coordinates. When we type the name of a restaurant into Google maps, Google’s...

Oct 15, 2022

create a VPN server on the cloud

How to create a VPN server on Azure There are many commercial VPN providers out there. But when it comes to privacy you are allowed to be extra suspicious. That...

Jul 1, 2022

My Notes From A Css Html Course

Html-CSS ) overview Udemy course. static websites have their files stored on the server waiting to be displayed as they are. dynamic website is an application that is executed at...

May 8, 2022

Fix Linux' Auto Brightness Adjustment

prevent Linux from changing the screen brightness of your laptop when you plug it in. The Problem With Linux Screen Brightness Adjustment I use Ubuntu, and on my Acer Nitro...

Apr 9, 2022

Compile Java Code From the Terminal

How to use any terminal to compile and run Java source code. What You Need Java Source Code You will need to write your Java code and save it with...

Mar 29, 2022

Five Reasons to Love FISH

A beautiful, well-built alternative to BASH, here is why you should try it. What is FISH? FISH stands for Friendly Interactive Shell. It simplifies many of the common tasks that...

Mar 16, 2022

Blender is Fun

Blender is Fun I have several hobbies and recently I realized that they all have something in common; they all revolve around making things. Take Blender 3D, my most recent...

Dec 20, 2021

Floodlight installation guide

a more up-to-date guide on installing the famous SDN controller Why Floodlight?! There are many SDN controllers out there, but some of the reasons why you will want to use...

Sep 26, 2021

Simplify Your Code

Clean up nested if-statements with ease. ) Cyclomatic complexity is defined as the number of linearly independent paths through the code, so you are increasing the complexity of your code...

Sep 19, 2021

Free Interactive Programming Course

learn Java with the University of Helsinki ) Are you Trying to Learn Programming? Are you a complete beginner? or maybe you are not a beginner but you are trying...

Sep 2, 2021

Elegantly Log Elapsed Time in Java

Avoid repeating your code ) Have you ever needed to compare the performance of two methods? the easiest way is to log the execution time of each method, you probably...

Aug 3, 2021

Clean any NSFW content from you Reddit account

Before No Nut November Using a simple Python script. ) Social media giants such as Reddit and Twitter have been using NSFW content to promote their platforms, this turned these platforms...

Jan 8, 2021

Disable keyboard-light timeout on Acer Nitro machines

I recently bought a laptop from Acer, specifically the Nitro 5 model, I like the machine but one thing I didn’t like was the keyboard, unlike most backlit keyboards, this...

Dec 20, 2020

Feature-matching using BRISK

an open-source alternative to SIFT I wanted an app that takes two images and detects the position of the first image in the second, I also didn’t want to use...

Jul 13, 2020

NS3: the second step forward

In the last example we created a simple LAN network, now we will create something a little more convoluted. ) The Topology: I will build my application on NS3 tutorial...

Jul 9, 2020

Simple NS3 example: One LAN.

The NS3 is a network simulator with a steep learning curve, I’m currently learning how to use NS3 and I thought that I’d write about the things that I learn...

This project is maintained by hasan-aga