Step-by-Step Guide to Install Hugo on a Mac Using Homebrew

Hugo is a powerful static site generator built with Go, designed for those who crave flexibility and control over their web applications. Whether you’re a blogger, developer, or a tech enthusiast, Hugo offers a streamlined way to bring your ideas to life online. What is Homebrew? Homebrew is a widely-used package manager for macOS that simplifies the software installation process. Think of it as the Swiss Army knife for your Mac—one command can install a plethora of software, saving you from the drudgery of lengthy setups and configurations. ...

June 12, 2022 · 2 min · 379 words

How to Stop Firefox from Redirecting to HTTPS

When using Firefox, you may have noticed an automatic redirection to the HTTPS version of websites. This feature is part of Mozilla’s commitment to secure browsing. However, there are scenarios—especially when working with local networks or development environments—where you may want to disable this automatic HTTPS redirect. Let’s explore how to regain control over your browsing experience. Accessing Firefox’s Hidden Configurations Before we dive into the specific settings, let’s first locate Firefox’s hidden configuration options. Think of this as accessing the control room of your browser—where you can fine-tune its behavior. ...

February 16, 2022 · 3 min · 427 words

Exploring Ways to Increase Scroll Back Limit in iTerm2

Ever found yourself staring at a terminal output so lengthy that the scrollback buffer limit left you in the dark about where things went awry? It’s a common frustration, but fear not! Let’s delve into how you can enhance the scrollback limit in iTerm2, so you can keep your debugging skills sharp and your output history rich. Understanding the Scrollback Limit in iTerm2 Before we get our hands dirty, let’s unpack the concept of the ‘Scrollback Limit.’ Think of it as a safety net for your terminal output. By default, iTerm2 allows you to scroll back through 1,000 lines of output. While this is usually sufficient, there are moments—like when you’re running extensive scripts or analyzing logs—when you’d prefer a deeper dive into your terminal’s past. That’s where increasing the scrollback limit comes into play. ...

December 3, 2021 · 2 min · 323 words

Making Markdown Preview Work From Finder in OSX

The versatility of Markdown lies in its simplicity, making it one of the most effective tools for converting plain text to rich HTML. For those new to the world of Markdown, it’s a lightweight markup language that allows you to create structured documents with ease. However, there’s often a pesky hurdle to overcome: how can we preview Markdown files without the need to open a dedicated text editor or application? Fear not—using OSX’s Finder, you can preview these files as effortlessly as you would an image or PDF. In this guide, I’ll walk you through the steps to enable Markdown previews directly from Finder using a nifty tool called QLMarkdown. ...

October 15, 2021 · 2 min · 391 words

Configuring the Perfect Terminal Experience in OSX

The terminal can feel like a daunting space for newcomers. Yet, with a bit of practice, it transforms into an indispensable ally for those of us who spend our days navigating the digital landscape—especially in programming, system administration, and related fields. In this post, we’ll explore how to configure an optimal terminal experience in OSX. Choosing the Right Terminal When it comes to terminal emulators for OSX, you have a smorgasbord of choices, each with its distinct advantages. While the default Terminal.app serves its purpose, you may find it lacking compared to some alternatives. Here are two standout options: ...

May 10, 2021 · 3 min · 522 words

Control Menu Bar Icons with Dozer

Have you ever looked at your Mac’s menu bar and felt like you were gazing into a chaotic toy box? Icons spilling over like a giggling toddler with a glass of milk — it’s a sight that can test even the most patient among us. While macOS offers a beautifully designed interface, it sometimes overlooks the importance of usability and aesthetics in the menu bar. Enter Dozer, a game-changing tool that elegantly addresses this challenge. ...

February 25, 2021 · 2 min · 223 words

Read a Filtered List of Files from a Directory and Ask the User to Choose One (Bash)

One of the standout features of Docksal is its extensibility through Bash scripting, making it a valuable tool for automating various tasks. A common scenario is the need to import databases when initializing projects. The snippet below serves this purpose by scanning a directory for database files and allowing the user to select which one to import. # Get a list of *.mysql | *.sql.gz | *.sql in /db/ and let the user choose which to import unset options i while IFS= read -r -d $'\0' f; do options[i++]="$f" done < <(find ${PROJECT_ROOT}/db/ -maxdepth 1 -type f \( -name "*.mysql" -o -name "*.sql.gz" -o -name "*.sql" \) -print0) echo "Press [Enter] to choose a DB to import" read -t5 -p "(times out in 5 seconds) " if [ $? -gt 0 ]; then echo "" echo "Timed out waiting for response. Skipping DB import..." else select opt in "${options[@]}" "Skip DB Import" do case $opt in *.mysql | *.sql.gz | *.sql) echo "Importing $opt ..." fin db import $opt break ;; "Skip DB Import") echo "Skipping DB Import..." break ;; *) echo "Invalid choice, please enter the number of your choice above." ;; esac done fi This script effectively searches a specified directory for files that match certain extensions and prompts the user to make a selection. The inclusion of a timeout is a thoughtful touch, especially for scripts designed to run unattended or as part of a larger automation workflow. ...

September 30, 2019 · 2 min · 369 words