g

gridlocdev's blog

I'm a software developer by trade, which means I run into issues with various small and tricky issues quite a bit. Here is where I post short-form guides for those things that I can't easily find anywhere else on the internet. Hopefully you may find some of these useful!

JavaScript is the nuclear warhead of programming languages.

JavaScript is wacky. JavaScript was invented in 10 days for Netscape Navigator in 1995 to help gain market share from Mosaic, the most popular browser at the time from the University of Illinois. Eventually, in the late 90s and early 2000s, competitors joined the competition such as Internet Explorer, Opera, and Mozilla Firefox. However, instead of inventing their own scripting languages, those competitors also chose to use JavaScript, likely due to motivations by easing the barrier to entry t...
Read post

How to install the Slint VSCode extension in a Fedora Silverblue Toolbox

For context, I have VSCode installed inside a Toolbox in Fedora 40 Silverblue. Getting the Extension to work in a Fedora container The Slint VSCode extension was not working for me; it was starting and then crashing with an EPIPE write error. The way I resolved it was to install the libinput dependency in the container: sudo dnf install libinput-utils More context on what this is can be found in this GitHub issue: https://github.com/slint-ui/slint/issues/4926 Making the Live Preview work...
Read post

How to install VSCode in a Toolbox on Fedora Silverblue

Context This guide explains how to install Visual Studio Code on Fedora Silverblue using Toolbox, and how to create desktop shortcuts for the GNOME application overview. Under the hood, toolbox is a Fedora-native CLI tool to manage Podman containers. This guide describes how to install VSCode into Fedora Silverblue using this tool, and also create the necessary desktop shortcut for GNOME's app overview. Installing Visual Studio Code in a Toolbox Open a terminal Create a Toolbox container ...
Read post

Fix Jetbrains IDE Scaling Issues on Linux for HiDPI displays

On HiDPI displays, for me the UI was displaying text extremely small on Fedora 38 KDE. Most regular options like setting the GDK_SCALE_FACTOR environment variable and other IDE options seemed to not work. However, simply forcing the UI scale through the editor settings worked. To accomplish this, do the following: Open the menu, then navigate to Help -> Custom VM Options In the newly opened ".vmoptions" file, add the following line: -Dsun.java2d.uiScale=2 Restart the editor to apply the ...
Read post

How to gather Zenity output in Lua

Zenity is a library that allows you to spawn standard linux GUI controls in GNOME using GTK. It's not a Lua library, but rather a Linux package that you can interop with using your Lua logic for more easier and effective user input in GNOME desktop environments. It is incredibly powerful for spawning small and simple GUI controls, such as file selectors, calendar date pickers, informational boxes, system notifications, etc. To call this from Lua, you might think of using os.execute(), however ...
Read post

How to install Joycond on Fedora 35 Workstation for gaming on Steam

Joycond is a library that assists the hid-nintendo linux kernel driver that allows for support of Nintendo Switch joy-con / Switch Pro controllers for Linux. TLDR: The process is relatively standard but with one exception before the standard installation instructions is to install the C++ compiler sudo dnf install g++ before going through the usual installation. The joycond library is primarily built with C++, so in order to compile it your machine will need to know how to read and process the...
Read post

Entering and exiting full-screen in YouTube with Vimium

Vimium is a browser extension that lets you browse the internet in web browsers with the keyboard, and provides a number of keyboard shortcuts to do so. But, in the odd chance the web page supplies its own set of keyboard shortcuts, the extension and the page's shortcuts can conflict if using the same keys. One of these cases is the YouTube player, so if you'd like to enter/exit full-screen on YouTube while keeping the extension enabled, this article is for you! YouTube and Vimium share two ke...
Read post

Markdown Renderer using Svelte, TailwindCSS, and Marked

Markdown Renderer using Svelte, TailwindCSS, and Marked Here's an example of a simple markdown renderer using Svelte, TailwindCSS, and Marked Step 1 - Create a Svelte project The two easiest options are either using Vite or using Rich Harris's default Svelte template npm init vite@latest -- --template svelte-js npx degit sveltejs/template Step 2 - Install Marked Install Marked, a popular JavaScript package that converts markdown strings to HTML npm install marked Step 3 - Install Tailw...
Read post