Xen's personal web-page

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

READING MODE OFF

Posts in Category: "Dev"

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

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

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

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

Playlist Converter++

This project started as a small script i made for myself to fix and convert my music playlists (Yes i still use local music players), Then i turn it into a small GUI tool that uses the wxWidgets library…I worked on it over the time until it became a large project, But unfortunately i had to dump wxWidgets for Qt due to building problems on GNU/Linux because i wanted it to be cross platform, Everything worked well on Windows though. It was static linking issues and a lot of CMake headaches. more