<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Articles on Ayman Bagabas</title><link>https://aymanbagabas.com/posts/</link><description>Recent content in Articles on Ayman Bagabas</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 11 Mar 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://aymanbagabas.com/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>A Brief History of Terminal Emulators</title><link>https://aymanbagabas.com/posts/a-brief-history-of-terminal-emulators/</link><pubDate>Tue, 11 Mar 2025 00:00:00 +0000</pubDate><guid>https://aymanbagabas.com/posts/a-brief-history-of-terminal-emulators/</guid><description>&lt;p&gt;If you&amp;rsquo;re reading this, you&amp;rsquo;ve probably used a terminal emulator before. But
have you ever wondered how this modern—yet archaic—tool came to be?&lt;/p&gt;
&lt;p&gt;In this post, we&amp;rsquo;ll explore the history of terminal emulators, from the
earliest typewriters and teleprinters to modern video terminals and the
terminal emulators of today. Let&amp;rsquo;s go!&lt;/p&gt;
&lt;h2 id="early-terminals-and-typewriters"&gt;&lt;a class="heading-anchor" href="#early-terminals-and-typewriters" aria-label="Link to this section"&gt;#&lt;/a&gt;Early Terminals and Typewriters&lt;/h2&gt;
&lt;p&gt;&lt;img src="https://charm.sh/typewriter.84227b29dbcbcea4.jpg" alt="This Olivetti Lettera 22 typewriter is not a terminal, but terminals were totally based on typewriters. The new line and carriage return lever is on the left. On the right, the paper roller and the paper release lever. The cursor is the horizontal line on the paper where the next character will be typed." loading="lazy" decoding="async"
 &gt;&lt;/p&gt;</description></item><item><title>Self-hosted Soft Serve</title><link>https://aymanbagabas.com/posts/self-hosted-soft-serve/</link><pubDate>Fri, 28 Apr 2023 00:00:00 +0000</pubDate><guid>https://aymanbagabas.com/posts/self-hosted-soft-serve/</guid><description>&lt;p&gt;&lt;a href="https://github.com/charmbracelet/soft-serve" target="_blank" rel="noopener noreferrer"&gt;Soft Serve&lt;/a&gt;
 is a self-hostable Git server for the command-line. It supports Git over HTTP(s), SSH, and the &lt;a href="https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols#_the_git_protocol" target="_blank" rel="noopener noreferrer"&gt;Git Protocol&lt;/a&gt;
. &lt;a href="https://github.com/charmbracelet/soft-serve" target="_blank" rel="noopener noreferrer"&gt;Soft Serve&lt;/a&gt;
 also comes with a simple straight-forward user management interface for teams.&lt;/p&gt;
&lt;p&gt;In this post, we will go through how to set up your &lt;a href="https://github.com/charmbracelet/soft-serve" target="_blank" rel="noopener noreferrer"&gt;Soft Serve&lt;/a&gt;
 instance. This includes setting up SSH access, HTTPS using &lt;a href="https://certbot.eff.org/" target="_blank" rel="noopener noreferrer"&gt;Certbot&lt;/a&gt;
, and how to manage your &lt;a href="https://github.com/charmbracelet/soft-serve" target="_blank" rel="noopener noreferrer"&gt;Soft Serve&lt;/a&gt;
 instance.&lt;/p&gt;
&lt;h2 id="prerequisites"&gt;&lt;a class="heading-anchor" href="#prerequisites" aria-label="Link to this section"&gt;#&lt;/a&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;In this post, we are assuming that you have a basic knowledge of networking, a general understanding of how to use Linux and the command-line, and are comfortable using &lt;code&gt;git&lt;/code&gt; commands.&lt;/p&gt;</description></item><item><title>Simple Vim Session Management</title><link>https://aymanbagabas.com/posts/simple-vim-session-management/</link><pubDate>Thu, 13 Apr 2023 00:00:00 +0000</pubDate><guid>https://aymanbagabas.com/posts/simple-vim-session-management/</guid><description>&lt;p&gt;Recently I switched back to using Neovim after being a VSCode user for a while. One of the things I miss in VSCode is the session management that comes bundled in. My brain became wired to doing things like &lt;code&gt;code &amp;lt;projectDir&amp;gt;&lt;/code&gt; to open the editor with all files loaded just like the way I left them. Luckily in Vim, you can use &lt;code&gt;:mksession&lt;/code&gt; to create sessions.&lt;/p&gt;
&lt;h2 id="the-problem"&gt;&lt;a class="heading-anchor" href="#the-problem" aria-label="Link to this section"&gt;#&lt;/a&gt;The Problem&lt;/h2&gt;
&lt;p&gt;Just like VSCode, I want Neovim to save the session file under the project root directory. Specifically in &lt;code&gt;.nvim/session.vim&lt;/code&gt;. I want Neovim to detect whether the opened file is a directory, and based on that, load the session file if exists. Before exiting Neovim, save the session file under the project root directory.&lt;/p&gt;</description></item><item><title>Blue Mountain</title><link>https://aymanbagabas.com/posts/blue-mountain/</link><pubDate>Thu, 02 Jun 2022 16:11:13 +0000</pubDate><guid>https://aymanbagabas.com/posts/blue-mountain/</guid><description>&lt;figure data-orig-width="2048" data-orig-height="1603" class="tmblr-full"&gt;&lt;img src="https://64.media.tumblr.com/ce0f95c67ce781f852e28387ac77791c/469e3ad4846168e5-fb/s540x810/343ce46fa0e2ec38ae25359b9c0db0f5bcba5bf3.jpg" alt="image" data-orig-width="2048" data-orig-height="1603" data-media-key="ce0f95c67ce781f852e28387ac77791c:469e3ad4846168e5-fb"/&gt;&lt;/figure&gt;&lt;p&gt;📍Blue Mountain Summit Loop&lt;/p&gt;</description></item><item><title>Import Notion Pages to Jekyll</title><link>https://aymanbagabas.com/posts/import-notion-pages-to-jekyll/</link><pubDate>Tue, 29 Mar 2022 00:00:00 +0000</pubDate><guid>https://aymanbagabas.com/posts/import-notion-pages-to-jekyll/</guid><description>&lt;p&gt;Lately, I started using Notion for note-taking, to-do lists, and now for writing blog posts. Notion makes it simple to combine all those activities in a unified pretty interface. Using Jekyll, Github Pages, and Github Actions, I was able to import my Notion Blog database posts into Jekyll using a Github workflow that runs twice a day.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;
 &lt;source srcset="https://aymanbagabas.com/posts/import-notion-pages-to-jekyll/my_notion_blog_database_hu_bb428d32382017f5.webp" type="image/webp"&gt;
 &lt;img src="https://aymanbagabas.com/posts/import-notion-pages-to-jekyll/my_notion_blog_database_hu_5dba5e822bf37e63.jpeg" alt="My Notion Blog database"
 width="1200" height="323"
 loading="lazy" decoding="async"
 &gt;
 &lt;/picture&gt;&lt;/p&gt;
&lt;h2 id="what-is-a-notion-database"&gt;&lt;a class="heading-anchor" href="#what-is-a-notion-database" aria-label="Link to this section"&gt;#&lt;/a&gt;What is a Notion Database?&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://www.notion.so/help/guides/creating-a-database" target="_blank" rel="noopener noreferrer"&gt;Notion databases&lt;/a&gt;
 are smart tables that can hold a collection of pages with customizable properties and multiple layouts. Think of it as smart spreadsheets on steroids.&lt;/p&gt;</description></item><item><title>Nyan Cat Over SSH</title><link>https://aymanbagabas.com/posts/nyan-cat-over-ssh/</link><pubDate>Fri, 25 Mar 2022 00:00:00 +0000</pubDate><guid>https://aymanbagabas.com/posts/nyan-cat-over-ssh/</guid><description>&lt;p&gt;Everyone knows the Nyan Cat meme that started in 2011. The meme started from a &lt;a href="https://www.youtube.com/watch?v=QH2-TGUlwu4" target="_blank" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;
 video that merged a Japanese pop song with an animated cartoon cat. Then a Telnet Nyan Cat server was created by &lt;a href="https://github.com/klange/nyancat" target="_blank" rel="noopener noreferrer"&gt;klange/nyancat&lt;/a&gt;
. And now, in 2022, after 11 years of nyaning, it got ported to SSH! Try it out here &lt;code&gt;ssh dir.charm.sh -p2226&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://github.com/aymanbagabas/nyancatsh/raw/master/nyancatsh.gif" alt="nyancat" loading="lazy" decoding="async"
 &gt;&lt;/p&gt;
&lt;h2 id="the-why"&gt;&lt;a class="heading-anchor" href="#the-why" aria-label="Link to this section"&gt;#&lt;/a&gt;The Why&lt;/h2&gt;
&lt;p&gt;Well, to put it simply, why not port it to SSH! SSH is safer and a more modern protocol than Telnet is.&lt;/p&gt;</description></item><item><title>Walk by the pond</title><link>https://aymanbagabas.com/posts/walk-by-the-pond/</link><pubDate>Thu, 10 Mar 2022 13:45:30 +0000</pubDate><guid>https://aymanbagabas.com/posts/walk-by-the-pond/</guid><description>&lt;figure data-orig-width="1536" data-orig-height="2048" class="tmblr-full"&gt;&lt;img src="https://64.media.tumblr.com/e20f88fc87ed4dde6cd76e7a4a797573/e1c4b1564c7a9c6d-9f/s540x810/9b8c7ee00c43fd23143d48ab2a68a2469407fc0d.jpg" alt="image" data-orig-width="1536" data-orig-height="2048"/&gt;&lt;/figure&gt;&lt;p&gt;📍 Sugar Hollow Pond&lt;/p&gt;</description></item><item><title>Run native C/C++ code in the browser using Emscripten</title><link>https://aymanbagabas.com/posts/run-native-c-c-code-in-the-browser-using-emscripten/</link><pubDate>Wed, 18 Nov 2020 00:00:00 +0000</pubDate><guid>https://aymanbagabas.com/posts/run-native-c-c-code-in-the-browser-using-emscripten/</guid><description>&lt;p&gt;While working on &lt;a href="https://aymanbagabas.com/wmidumpper/"&gt;WMIDumpper&lt;/a&gt;
, a simple tool that analyzes ACPI WMI blocks, I had to figure out how to implement &lt;a href="https://github.com/pali/bmfdec" target="_blank" rel="noopener noreferrer"&gt;bmfdec&lt;/a&gt;
 in JavaScript. My first thought was to port it to JavaScript and put in the time and effort to rewrite ~1500 lines of C code in JS. But then a light bulb went on in my head, WebAssembly! A quick search showed that &lt;a href="https://emscripten.org/" target="_blank" rel="noopener noreferrer"&gt;Emscripten&lt;/a&gt;
 is exactly what I need. It can compile C/C++ native code into WebAssembly and run it on the web.&lt;/p&gt;</description></item><item><title>Dynamic DNS using DDclient</title><link>https://aymanbagabas.com/posts/dynamic-dns-using-ddclient/</link><pubDate>Sat, 16 Feb 2019 00:00:00 +0000</pubDate><guid>https://aymanbagabas.com/posts/dynamic-dns-using-ddclient/</guid><description>&lt;p&gt;&lt;a href="http://ddclient.sf.net/" target="_blank" rel="noopener noreferrer"&gt;DDclient&lt;/a&gt;
 is a service used to update dynamic DNS entries on many services. It is useful if you need a DDNS client that can work with pretty much any DNS service. Most distributions provide &lt;code&gt;DDclient&lt;/code&gt; in their official repositories. It is available on Debian-based systems, Fedora, Archlinux, and many more.&lt;/p&gt;
&lt;p&gt;In my case, I need &lt;code&gt;DDclient&lt;/code&gt; for my &lt;a href="https://ownyourbits.com/nextcloudpi/" target="_blank" rel="noopener noreferrer"&gt;NextcloudPi&lt;/a&gt;
 server that runs on a Raspberry Pi 3B hooked up to a storage device. This server gives me access to my files anywhere anytime as long as it has a working internet connection. I&amp;rsquo;m using a free DNS service from &lt;a href="https://www.dynu.com/" target="_blank" rel="noopener noreferrer"&gt;Dynu&lt;/a&gt;
 and in their &lt;a href="https://www.dynu.com/DynamicDNS/IPUpdateClient/DDClient" target="_blank" rel="noopener noreferrer"&gt;website&lt;/a&gt;
, they go in details of how you would set up dynamic DNS using &lt;code&gt;DDclient&lt;/code&gt;. It turns out that they use a &lt;code&gt;dyndns2&lt;/code&gt; protocol by &lt;a href="https://www.dyndns.com" target="_blank" rel="noopener noreferrer"&gt;www.dyndns.com&lt;/a&gt;
 to provide this service.&lt;/p&gt;</description></item><item><title>Writing a Chip-8 emulator</title><link>https://aymanbagabas.com/posts/chip-8-emulator/</link><pubDate>Mon, 17 Sep 2018 00:00:00 +0000</pubDate><guid>https://aymanbagabas.com/posts/chip-8-emulator/</guid><description>&lt;p&gt;If you ever played retro games on modern computers, then you probably know what an emulator is. Chip-8 is an interpreted programming language that was created originally by &lt;a href="https://en.wikipedia.org/wiki/Joseph_Weisbecker" target="_blank" rel="noopener noreferrer"&gt;Joseph Weisbecker&lt;/a&gt;
. Chip-8 programs get interpreted by a virtual machine. It offers a very simple monochrome graphics and uses a 4Kb of memory. It has the &amp;ldquo;8&amp;rdquo; part because all the system&amp;rsquo;s components, like CPU registers, have a size of 8 bits or 1 byte.&lt;/p&gt;</description></item><item><title>Arch Linux on Matebook X Pro</title><link>https://aymanbagabas.com/posts/archlinux-on-matebook-x-pro/</link><pubDate>Mon, 23 Jul 2018 00:00:00 +0000</pubDate><guid>https://aymanbagabas.com/posts/archlinux-on-matebook-x-pro/</guid><description>&lt;p&gt;Recently, I got a new laptop, Huawei Matebook X Pro. It has an i7 8th Gen. Intel CPU, 16Gib of RAM, 512Gib of SSD storage, Nvidia MX150 GPU with 2Gib of DRAM, and a beautiful HiDPI and touchscreen. It also comes with a fingerprint sensor. The first thing I did was installing Arch Linux, because well I am a Linux user! In the end, everything was working properly except:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;del&gt;Two out of four speakers.&lt;/del&gt; See UPDATE1 down below&lt;/li&gt;
&lt;li&gt;The fingerprint sensor.&lt;/li&gt;
&lt;li&gt;&lt;del&gt;Some keys in the Fn row.&lt;/del&gt; See UPDATE2&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The installation was very straightforward and like every other Arch Linux installation process. I followed their &lt;a href="https://wiki.archlinux.org/index.php/Installation_guide" title="installation guide" target="_blank" rel="noopener noreferrer"&gt;installation guide&lt;/a&gt;
. After the installation is complete, everything was working properly except for some minor issues.&lt;/p&gt;</description></item><item><title>Suspend then hibernate in systemd 239</title><link>https://aymanbagabas.com/posts/suspend-then-hibernate/</link><pubDate>Wed, 18 Jul 2018 00:00:00 +0000</pubDate><guid>https://aymanbagabas.com/posts/suspend-then-hibernate/</guid><description>&lt;p&gt;In &lt;em&gt;systemd&lt;/em&gt; 239, they have added a new service that handles suspending then hibernating after a given amount of time. This is easier than using external scripts since it comes built-in with this version of &lt;em&gt;systemd&lt;/em&gt;. You can check &lt;em&gt;systemd&lt;/em&gt; version with &lt;code&gt;systemctl --version&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;First, you have to define the delay time before the system wakes up and go into hibernation and that should be defined in &lt;em&gt;/etc/systemd/sleep.conf&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;[Sleep]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;HibernateDelaySec=15min
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here, what we care about is the last line &lt;code&gt;HibernateDelaySec&lt;/code&gt; where you can define delayed time. As you see, I have it set to 15 minutes after suspending.&lt;/p&gt;</description></item><item><title>Minesweeper using HTML5</title><link>https://aymanbagabas.com/posts/minesweeper-using-html5/</link><pubDate>Sun, 13 May 2018 00:00:00 +0000</pubDate><guid>https://aymanbagabas.com/posts/minesweeper-using-html5/</guid><description>&lt;p&gt;Obviously, everyone was born before the year 2000 knows the famous classic game &amp;lsquo;Minesweeper&amp;rsquo;. To me, I knew this game when I was little at the time where Windows XP was ruling everywhere. It is funny because at that time I did not know exactly how the game is played. That time the game was some kind of a luck game to me where you try to eliminate all the squares except the ones with mines until you either win or lose &amp;#x1f606;.&lt;/p&gt;</description></item><item><title>Sync Google calendar using Vdirsyncer and Orage</title><link>https://aymanbagabas.com/posts/sync-google-calendar/</link><pubDate>Sun, 08 Apr 2018 00:00:00 +0000</pubDate><guid>https://aymanbagabas.com/posts/sync-google-calendar/</guid><description>&lt;p&gt;For a long time I wanted to have all my calendars and todo lists synchronized with my current desktop setup. Currently, I am using XFCE software, like Thunar, with Openbox to manage everyday stuff. Yes, I know with Gnome DE you can achieve that easily, but Gnome has a HUGE package dependencies. XFCE on the other hand is very light-weight and simple.&lt;/p&gt;
&lt;p&gt;The other wonderful piece of software is &lt;a href="https://vdirsyncer.pimutils.org" target="_blank" rel="noopener noreferrer"&gt;vdirsyncer&lt;/a&gt;
. It supports CalDAV protocol which is also supported by Google calendar. With simple configurations we can synchronize Google calendar locally. Then we can use Orage to view/modify our calendar files. Orage is a time-managing application that can manage your calendars, appointments, alarms, and todo lists.&lt;/p&gt;</description></item><item><title>Dropbox client on Ubuntu server 16.04</title><link>https://aymanbagabas.com/posts/dropbox-client-on-ubuntu-server-16-04/</link><pubDate>Sun, 06 Aug 2017 23:19:00 +0000</pubDate><guid>https://aymanbagabas.com/posts/dropbox-client-on-ubuntu-server-16-04/</guid><description>&lt;p&gt;Dropbox, in my opinion, is the best cloud service available. I wanted to have one shared dropbox folder that is accessible from all my virtual machines running on the server. I am using a ZFS drive as a storage drive, the dropbox folder is located in the ZFS drive. Dropbox service is running as a normal user, not the root, and the server is using systemd to start the service after booting the system.&lt;/p&gt;</description></item><item><title>What is Jekyll?</title><link>https://aymanbagabas.com/posts/what-is-jekyll/</link><pubDate>Fri, 09 Jun 2017 18:12:00 +0000</pubDate><guid>https://aymanbagabas.com/posts/what-is-jekyll/</guid><description>&lt;p&gt;&lt;a href="https://jekyllrb.com/" target="_blank" rel="noopener noreferrer"&gt;Jekyll&lt;/a&gt;
 is a static website builder, it assembeles and combines multiple pages to form one unified HTML page. Jekyll uses YAML language to organize the structure of the page. &lt;a href="https://daringfireball.net/projects/markdown/" target="_blank" rel="noopener noreferrer"&gt;Markdown&lt;/a&gt;
 language, which is a text-to-HTML converter, makes webpages easy to write and adapt.&lt;/p&gt;
&lt;p&gt;Jekyll is writen in Ruby and can be installed using &lt;code&gt;gem&lt;/code&gt;. On a Linux machine that already has Ruby installed, Jekyll can be installed as the following:&lt;/p&gt;</description></item></channel></rss>