Xen's personal web-page

My maintained projects, documentation, scripts, tips, and sometimes my thoughts... all here.

READING MODE OFF

Posts from Year: "2022"

Create a pretty website scroll indicator

Most modern websites have a gauge or a progress bar at the top of their page indicating something. It could be used to show loading time like for example in Youtube/Github… OR it can be used to show current scrolling position and how much left, Which can be very useful to your visitors. This can be seen and tested right here in this site because i use it myself. You can say that this new idea is now part of the Web3 culture and it’s not going away any time soon; so you most adapt. more

Toying with Binary files in C

I noticed a lot of devs these days relay heavily on text or JSON files to store data/settings instead of using binary files. This maybe due to thinking that dealing with binary files are hard or requires deep knowledge in low level languages, which is false. Binary files are very similar to arrays of structures, except the structures are in a disk file rather than in an array in memory. Because the structures in a binary file are on disk, you can create very large collections of them (limited only by your available disk space). They are also permanent and always available. The only disadvantage is the slowness that comes from disk access time. more

How to Enable/Disable Google's "Dino" game in Chrome

Have you ever had internet issues while using Google Chrome and stumbled upon a small pixelated T-Rex? Did you wonder why there’s an extinct animal in your web browser during connection problems? Well…That’s actually a video game! and it is very addictive one! more

Easily add "Reading Time" to your website or blog

Have you ever stumbled upon a website or a blog with a “T read” feature? Usually under or next to the article title; I use this little trick myself so you probably noticed it already, Well this cool trick it can help your viewers decide if they want to read the current article right now or maybe save it for later, Instead of scrolling all the way to find out. more

League of Legends freeze at minute 7 fix

League of Legends is one of the best games of all time. This according to statistics and whether we like it or not, it’s very addictive; So if you’re a millennial or a zoomer you definitely have tried it before in your life and if you say otherwise i won’t believe you :) more

Jekyll simplified

What is Jekyll? Jekyll is a static web pages generator. A normal regular websites usually work dynamically, That means they communicate in real-time with databases or Interpreters…etc. For example; A dynamic website will use languages such as PHP, Python, Perl, Ruby…and other script languages, All these require a interpreter in order to execute and talk back to the website which is most likely is hosted on the same server. It’s a long process that takes a lot of resources and time. from both; The server and the client (you). more

How to easily setup a Toolchain in Windows (Any Language)

Microsoft Windows is one of the best operation systems out there when it comes to casual desktop use or gaming. Unfortunately the same cannot be said when it comes to software or web development, For many reasons; like for example the lack of the famous unix shell which was designed by the legendary Ken Thompson himself back in the early 70’s. Microsoft tried to implement it in Windows 10 through a setting called “Windows Subsystem for Linux” but it didn’t took off because many people hated Windows 10 including myself and also didn’t solve many other issues, It was much easier to use a 3rd party software or just dual-boot than developing apps on Windows under WSL. more

How to create beautiful Scrollbars using pure CSS

Before anything; This tutorial is for browsers that uses the Blink engine, Like Chrome/Edge/Opera…etc. Firefox is excluded because it has it’s own engine called “gecko” and there’s a new one under development called “servo” written in their new programming language “Rust”. Unfortunately none of these two engines support custom scrollbars (only color/width) and their performance is limited compared to Blink as well. more

The Nothing Phone is disappointing just like i expected

When Nothing company announced their first phone ever (Phone(1)) last march everyone got excited, because the current state of the smartphone industry it’s just boring and lack innovation. Xiaomi currently dominates it and i don’t mind because they give their customers more bang for their buck or basically what they paid for, unlike other brands like Samsung for example which is declining and got knocked off from top 1 by Xiaomi last year. And they did it without the US market as well! more

How to brew Gunpowder Tea (My way)

When people generalize tea as a drink with one known flavor like coffee or orange juice is actually very misleading; It comes in different colors, flavors, and even minerals! And one of my favorite teas is a strong black tea with earthy taste called Gunpowder. more

How to improve battery life in Linux systems

Linux based systems also known as Distros which is short for distributions, have many advantages over other operation systems but also they have downs! One if these cons is the horrible battery life while using them on a notebook or a laptop or any other portable computers. more

Why your LTE connection is slow at certain times?

Have you ever had an insomnia and stayed awake all night? or at least until 3AM in the morning trying to sleep? Then you noticed your internet connection got extremely fast and the ping got much lower? This is not a coincidence! Because at these specific times almost all people in your area are busy sleeping; That means the pressure on tower cells that delivers data to you is very low. more

5 Things you need to know before buying a treadmill

When i bought a treadmill few years ago with some other fitness equipments to start getting in shape i had no clue that they require a maintenance routine every weeks or months! (depends on usage). I figured it out the hard and painful way, because in the first few months my treadmill started to have a burning smell and the motor became very hot that you cannot even touch it! And was struggling to keep running. I thought it was a over usage issue so i started to reduce my treadmill time about 50% which like a half hour, Until it completely broke and no longer was working…I did a lot of treadmill googling and i wandered different websites and videos…until i found out couple important things that you should know before buying or doing anything: more

Add pagination to your Github page or Jekyll website

My modified github pages theme didn’t have pagination implemented already despite jekyll have a built-in plugin for it called jekyll-paginate, so i spent a lot of time trying to understand how it works until i got it done, here’s how in short and a simplified manner. If you’re on github pages you don’t need to install anything because it’s already installed by default and cannot be removed, otherwise install the plugin i just mentioned in your jekyll system by using: more

How to make GCC/Clang produce a very small executable

Sometimes size matters! especially if you’re working with medium/big projects that will produce a gigantic executables. Well… Here’s my secret sauce to make compilers generate very small files + another trick that you may not know about. First of all let’s make a small program to test our new compiling flags, you can make your own or just use this code i made for this experiment: more

My Paranoid Canary

When my cat died few months ago it was very rough for me to accept his death and move on, I needed something to help me cope and fill that emptiness… The first thing i’ve done is building a medium sized aquarium (fish tank) which i discovered is not that hard to do! you just need glass, glass cutter, silicone and that’s it! (Tutorial) then i started to wonder what should i put in it and i was thinking either some Goldfishs or i go with smaller fish like Betta or Molly, There’s other options as well but i settled with Guppies because they’re easy to maintain and not that aggressive, also they’re very colorful and pretty. more

Windows Beep

Computers back in the day used to be shipped with something called PC Internal Speakers which was mainly used by the BIOS and sometimes old software, today motherboards still have a port for them but you have to buy one now instead of getting it for free. i got mine from my old Pentium 4 PC when i was cleaning stuff i used it on my newer motherboard to see if still works and it did! but only when i turned on the PC not when i logged in to Windows. more