I recently picked up a Beelink EQR6 Mini PC to reduce some of the Docker stress on my aging Synology NAS. Since my Synology used the Btrfs filesystem, I never had to worry about file locks and corruption during a backup because that particular file system used copy-on-write (CoW). However, since I decided to use Ubuntu Server on my Mini PC and neglected choosing which filesystem I wanted to use, I ended up with ext4.
Here’s the problem though.
The ext4 filesystem does not support copy-on-write. This means that if I tried to make backups of my Docker volumes, I’d run the risk of file corruption if those files were in use at the time of backup. This is particularly more of a problem with Docker volumes that contain SQLite databases with write-ahead log (WAL) or databases in general.
There’s good news though! There are a few automated solutions for safe backups of Docker volumes that can be used with minimal effort.
Read MoreAdvertisements are incredibly annoying, and I’m saying this as someone who relies on them for income on The Polyglot Developer. Even with ad providers such as Google saying that they’re working to provide a better experience, things seem to be getting worse. You could use tools like Adblock Plus in the browser, but what about mobile devices? Better yet, what about all the websites out there that detect when an ad blocker is being used and make the browsing experience even worse by denying access?
To get beyond these advertisement related problems, you’re going to need to handle things from a network level, not a per device level.
In this tutorial we’re going to see how to configure Pi-Hole, a popular network level ad blocking solution. For this example we’re going to use it with a Raspberry Pi and an Ubiquiti EdgeRouter, even though other networking hardware can be substituted.
Read MoreRecently I’ve been playing around with Netlify and as a result I’m becoming more familiar with caching strategies commonly found with content delivery networks (CDN). One such strategy makes use of ETag identifiers for web resources.
In short, an ETag identifier is a value, typically a hash, that represents the version of a particular web resource. The resource is cached within the browser along with the ETag value and that value is used when determining if the particular cached resource has changed remotely.
We’re going to explore how to simulate the requests that the browser makes when working with ETag identifiers, but using simple cURL requests instead.
Read MoreIn case you hadn’t heard it on social media, The Polyglot Developer is part of a continuous integration (CI) and continuous deployment (CD) pipeline. Rather than using Hugo to manually build the site and then manually copying the files to a DigitalOcean VPS or similar, the Hugo changes are pushed to GitLab and GitLab takes care of the building and pushing.
Now you might be wondering why this is important because the process of manually building and pushing wasn’t so strenuous.
Having your web application as part of a CI / CD pipeline can streamline things that you would have otherwise needed to take into consideration. Here are some examples of where a pipeline would be of benefit, at least in the world of static website generation through tools like Hugo:
Those are just some of the examples, more specifically how things are done on The Polyglot Developer. In this tutorial, we’re going to explore how The Polyglot Developer is doing things and how you can adopt them into your static website generation workflow.
Read MoreThere are tons of tools out there that help you make sure your app is functioning correctly. But how do test software from a purely visual standpoint?
Chances are you’re writing functional tests to check visual elements, or manually checking your UI whenever you push a change. If you are doing either of those things, then you know that they’re incredibly time-consuming and bugs still end up slipping through the cracks.
That’s where visual testing comes in.
Read MoreWhile I haven’t done too much with Serverless Framework and Functions as a Service (Faas) recently, I did in the past and it isn’t something that I’ve forgotten. In the past I demonstrated how to deploy Node.js functions to Amazon Web Services (AWS) Lambda that contain native dependencies. While not a necessity for all Lambda functions, it is for functions that use libraries for specific operating systems and architectures. For example, my previous article titled, Use AWS Lambda and API Gateway with Node.js and Couchbase NoSQL, fell into this situation. Making use of an EC2 instance or a Docker container with Amazon Linux will help most of the time, but there are scenarios where a little bit extra must be done to accomplish the task.
In certain circumstances everything may package and deploy correctly, but still throw errors. For example, a common error is around libstdc++ and a version of GLIBCXX not being found.
In this tutorial we’re going to see how to resolve library errors that might not be caught in a typical packaging and deployment scenario with Serverless Framework and AWS Lambda.
Read MoreOne of the most powerful commands that you could learn, grep is essentially a robust search tool. It gets its name from the acronym it stands for which is global regular expression print. This is just a fancy way of saying “to search for specific strings or patterns (using regular expressions) within a specific file or directory and print the matching results”.
Read More