The “envsubst” tool is part of the GNU’s “gettext” package that programmers use to create multilingual programs. We use envsubst to substitute environment variables in a file or a data stream. This is particularly useful when creating and adapting configuration file templates in a variety of scenarios. For example, you sometimes have a template configuration […]
Category: VPS Hosting
How to Use the Awk “If Else” Statement
Earlier, I’d written about how the awk statement in Linux can be a superior alternative to grep in many situations. One of those included the ability to perform complex operations, including control loops. The “if-else” statement is one of the most basic control loops in all languages. While it’s strange to view awk as a […]
How to Remove a Remote Origin in Git
Most people working on a git repository, have done so by cloning a remote one. The thousands of developers who work on projects everyday, have mostly taken an existing repo and are working on it. When you do this, git sets up a connection to the remote repo and calls it the “origin”. This makes […]
What Is SIGSEGV and How Do We Fix It?
SIGSEGV is a signal sent by the operating system to a process indicating that the process has attempted to access memory that it shouldn’t. This kind of error is prevalent in low-level code – that deals directly with system code, for example. These days, SIGSEGV errors are rare because of improvements in modern programming languages […]
How to Reset the Last Commit in Git
While the purpose of git is to maintain a faithful record of a project’s history, it’s usually not a good idea to blindly include every single change, including mistakes or tiny commits that should be merged into a single one. I’ve written before, about how we can use git squash to keep a clean project, […]
How to Redirect stderr to stdout in Linux
Linux uses the concept of “streams” to handle input and output messages. Specifically, there are three: These streams are defined by the environment in which a command operations, and doesn’t depend on the command itself. So if a script has an output – say via an “echo” statement or it throws an error, these messages […]
How To Create Groups In Linux
A group in Linux is a way to bunch users together so that they’re easier to manage in one place. The easiest way to demonstrate the power of groups is to show how we can manage their permissions in one go. But you can do more than just manage permissions. With special “control groups”, you […]
How To Use The Bash Heredoc Syntax In Linux
Linux allows you to use the bash prompt to provide the input for a variety of commands. For example, let’s say you want to quickly create a file with some text. The following will work nicely: echo “Test file” > testfile.txt This will create a file called “testfile.txt” as shown here: You can see that […]
VPS vs. Shared Hosting: Which One to Choose?
VPS hosting and shared hosting are easy to mix up since both solutions involve sharing a server with other websites. However, there are some key differences between them that make them suitable for different types of websites and users. Shared hosting is ideal for website owners with a small budget, but it isn’t suitable for […]
How to Protect Your WordPress Website from Hackers
There’s nothing more frustrating than dealing with malicious activity on your website. Cyberattacks don’t just disrupt your website’s traffic—they damage your business, tarnish your reputation, and create immeasurable harm to your brand. No matter the size or purpose of your site, cleaning up after a security breach is the last thing you want to spend […]