Posts

My ToDo List for 2024 (daily updates)

waffarx cash back

How to use automatic image loading optimizations in Blogger's blogspot

If you are using Blogger to host your blogspot blog for free, you must use the latest optimization features to serve pages faster to users. As you can see in the following image, there are two features that I added arrows to point to. These two features are off by default, so just turn them on to help speed up your webpages load faster. Let’s know how these features help make your blog pages load faster.

[fixed] Docker desktop on Mac OS says "Docker Engine stopped"

I was developing a new feature in KartBusiness , but when I tried to launch the local development environment with Laravel Sail, Sail said docker is not running. I opened the Docker desktop and there is a message “Docker Engine stopped”. I checked the notifications inside Docker Desktop, and there are too many notifications telling me “Failed to fetch extensions”. My first approach to fix this problem is to terminate Docker Desktop and Docker via Activity Monitor, then start Docker Desktop again and check if it works.

Recreated the Website to be futureproof

The old website had some good features such as auto light/dark mode, ~500 posts, good enough speed & performance, mobile-first design UI/UX, responsive layout. The refreshed website kept all those things. Some features improved, more features and capabilities added. Here are the list of all features and capabilities kept or added to the website: Futureproof content format 🔗 In the new website, I use markdown files .md as content storage. So I can update or upgrade or even completely change the tech stack without reproducing/rewriting the old content.

Ubuntu boots to black screen after trying to install proprietary Nvidia graphics driver

The problem occured after installing proprietary Nvidia graphics driver using those commands. sudo apt-get update && clear && apt-cache search nvidia-[0-9] | grep 'binary driver' sudo apt-get purge nvidia* sudo apt-get install nvidia-340 nvidia-settings sudo nvidia-xconfig The fix is to let the built-in ubuntu-drivers program decide automatically which graphics driver to install. Open the terminal and type this command to update the apt repositories. sudo apt update Then, remove all packages started with nvidia using this command.

How to upgrade npm in Laravel Sail ?

When I stop the vite live server sail npm run dev of Laravel 10 by ctrl + c, the CLI tells me to upgrade npm with this message. npm notice npm notice New patch version of npm available! 9.6.4 -> 9.6.5 npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.6.5 npm notice Run npm install -g [email protected] to update! npm notice Here is a screenshot of the npm upgrade notice. pgrade npm inside Laravel Sail Docker environment 🔗 You can not just run npm install -g npm@9.

Useful npm Packages for All Projects

date-fns 🔗 date-fns (a.k.a Date Functions) is a library which gives you functions to deal with dates. It is great package with a small size. dotenv 🔗 dotenv create a .env file to store your environment variables. So when you publish that project online you use the environment variables which you deploy the project on. socket.io 🔗 Help you use the sockets to create realtime communications such as chat apps.

View time taken of last command in Fish shell

Just use $CMD_DURATION to get the time taken running the last command. To make your prompt give you the elapsed time for every command you run in Terminal, add this function in your Fish config file ~/.config/fish/config.fish. function fish_prompt; echo "$CMD_DURATION  "; end The prompt will be like that. I hope this helps you. You know someone will benefit from this, share it with him/her, a friend or colleage.

Website Types

E-Commerce Website 🔗 There are too many e-commerce websites such as Amazon, Souq, Jumia, AliBaba, .. etc. What you should focus on if you are about to create an e-commerce website ? showcase the product in a visual appealing way optimize checkout process with best practices Marketing & Business Website 🔗 The vast majority of websites are the marketing websites and business websites. What is the goal of marketing and business websites ?

Tags: marketing

WebSocket Communication Between Two Go Programs, the Easy Way

This article was written with one idea in mind: to show you, how to make a communication between two Go programs, using WebSockets. The simplest possible way. When using WebSockets, one program has to act as a server. But there can be numerous other programs as clients. In this article we will create one server and one client. WebSocket Server 🔗 The code for server is pretty simple. And because we don’t want to reinvent the wheel, we will use gobwas module.

Why built-in functions in python are faster ?

Because Python is sitting of the shoulders of giants. Built-in functions are written in C and C++ under the hood. C and C++ languages are efficient and fast, so their functions will be faster than the functions you write in Python. So it is recommended to use built-in functions instead of creating new ones.