Posts

My ToDo List for 2024 (daily updates)

waffarx cash back

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.

Why Did Google Develop Go ?

long compile time 🔗 Google has two tremendous problems. One of them is compile time. Back in the 1980’s, reasonable sized projects took hours to do a clean build. There were whole server farms dedicated to recompiling. You got a new “nightly build” and made modifications to that. Google builds things that are so ridiculously huge that it’s still like that in 2017. It takes 5 hours to rebuild chrome from scratch even on a big fat i7 system.

Why Do Command Lines Still Exist ?

GUI (graphical user interface) is easy to use and goodlooking. But CLI (command line interface) is faster and easier to automate. Advantages of Command Line over Graphics 🔗 Graphics are fancy but lack clarity and prone to errors and crashes and uses alot of resources (RAM, CPU and GPU). Here are some advantages. Lightweight Text Interface 🔗 If you accomplish a task like converting mp4 to mp3 on command line using ffmpeg , it will be faster than using any other GUI program such as Format Factory (for Windows OS).