RSSAmplifier

Blog

[tekovic.com~]#

[tekovic.com~]#

tekovic.comRSS feed ↗27 posts

Latest posts

Use custom managers in Renovate

Mend Renovate is a wonderful set-and-forget utility that helps you keep your project’s dependencies up to date. It’s similar to Dependabot, only much better regarding automatic dependency discovery, and configurability. Once you grant Renovate access to your Git repo, it’ll automatically open pull/merge requests once it detects new dependency updates.

Block abusive IPs based on 404 error rate using HAProxy

I’ve been using HAProxy for a very long time. In most cases, I work on stuff where HAProxy configuration fits into the fire-and-forget category, with occasional tweaks to ACLs, redirections, and throttling. But, now and then I find myself in a situation where I end up solving a certain problem with HAProxy, but in a, let’s call it, creative way.

Encrypt Ansible variables with SOPS

SOPS (Secret OPerationS) is a useful tool for encrypting sensitive data, but it doesn’t get enough praise. It supports full file encryption, and value encryption in structured data formats such as YAML, JSON, ENV, and INI. You can choose different encryption methods, such as age, PGP, Vault, and KMS (AWS, GCP, and Azure).

OpenWRT and the 802.11s mesh network

Recently I wanted to improve the WiFi coverage in my house. My trusted Linksys EA6350 v3 wasn’t able to cover to full square footage, so I got a second router to fill in the wireless gap - the TP-Link Archer C7 AC1750 v5.

Bash completion for aliases

Bash completion is a wonderful feature that allows you quickly compose complex shell commands. Add muscle memory to the mix, and one-liners will appear on the screen as if you were typing with 20 fingers. Add Bash aliases on top of that, and… you’re back to square one.

Configure Lenovo Thinkpad T480s fingerprint reader on Debian Bullseye

The fingerprint sensor on Lenovo Thinkpad T480s is not supported by libfprint, so you can’t use it out of the box. Thankfully, there’s a project called python-validity based on open-fprintd that’s easy to set up in, like, 5 minutes. Setup python-validity is available from open-fprintd PPA.

One-click random password generator

I’m frequently required to quickly get a hold of a random password. I’m either resetting password for a client or I’m testing something and I need a throwaway set of credentials. There are many ways to generate a random password (using DuckDuckGo, online password generator, password manager, etc.

Web feeds are not dead yet!

I remember using the web feeds (RSS and Atom) in Mozilla Firefox in the early 2000s. It was the time before social networks such as Facebook and Twitter took the web by storm. Sharing, liking, and retweeting didn’t exist at the time, and “following” certain blog or news site boiled down to bookmark the site.

Vim as Python IDE

I’m by no means a Python developer, but as a sysadmin, I’m constantly interacting with Python - my scripting language of choice. My preferred text editor is Vim, which I’ve been using for as long as I can remember. I’ve never been a fan of bloating applications with unnecessary plugins and modules, and Vim is no exception.

Installing Tesseract OCR 4.0 on CentOS 6

Tesseract OCR package is available for CentOS 6 via EPEL yum repository, but unfortunately, at the time of writing this article, the latest available Tesseract version in EPEL is 3.0.4. Installing Tesseract 4.0 from source is possible, but with some extra effort as CentOS 6 doesn’t come with Leptonica 1.

Solr full text search for Dovecot

Dovecot is great POP3/IMAP mail server but its internal search mechanism falls short when dealing with large mailboxes. Search is not only super slow, but also extremely resource intensive on both CPU and disk IO front. Offloading mail indexing and search to Apache Solr is not only recommended, but a must in such scenarios.

Dynamic HAProxy backends

HAProxy is one of very few pieces of software that are truly a joy to use. It’s written in C, it’s reliable, fast, secure and versatile. I’ve been using it for a number of years now for all kinds of purposes and its ability to inspect and manipulate HTTP requests is one of the features I use most often.

Rebuilding software RAID without mdadm.conf

Rebuilding software RAID array is very easy when you have your mdadm.conf file at hand, but when you find yourself in a situation without backup of that little config file, e.g. after reinstalling the system or when your migrate disks to the new server, it can be a bit daunting.

How to remove VirtFS like a boss

Recently I was unfortunate to witness huge filesystem loop on a cPanel server that was caused by combination of VirtFS and Idera’s Server Backup software (previously known as R1soft CDP backup). To cut the chase, I had to disable and remove VirtFS for all users on the server.

Fixing timeout between Nginx and PHP-FPM

In case you’ve set up Nginx as reverse proxy for PHP-FPM and you have very slow or complex PHP script that executes for quite some time, you’ve probably seen an 504 gateway time-out error. This is pretty common error, but in most cases people are barking at the wrong tree and they’re having difficulties finding out which timeout directive is the right one for their scenario.

Exim ACL for blocking certain senders

If you’re in a need for fast and simple solution to block certain senders directly on Exim mail server, you’re in luck. Couple of weeks back I needed to blacklist a spammer on a relay mail server, so that I could take my time and carefully trace the origin server/script from where the spam was being sent.

AWStats - poor man’s download counter

A few days ago I was asked to configure AWStats to count downloads of .exe files on an website. I know that it’s blindingly obvious that AWStats isn’t the right tool for this job, but sometimes you have to pick battles with your clients.

Change passwords for multiple cPanel accounts (bulk password reset)

The other day I needed to change passwords for multiple cPanel accounts. Since there was a lot accounts in question, changing passwords manually was out of the question. Changing passwords from shell using passwd utility was also out of the question because that would change only the password for Unix user - MySQL and FTP passwords would remain unchanged.

Adding custom modules to Nginx RPM

If you’ve installed Nginx from source, adding custom modules is easy. You simply recompile Nginx and include the module you want. But what if you’ve installed Nginx from RPM? How do you install custom module in this case? Well, you’ll need to repackage RPM and although it may sound really complicated, it’s not that big of a deal.

Nginx maintenance page with 503 HTTP status code

The other day I had to do some maintenance on a server with Nginx configured as a reverse proxy for Apache. The configuration was very simple - Nginx was in front of Apache and it served static content. Apache in the back was responsible for PHP stuff.

Etherpad Lite up ’n’ running in 5 minutes

Etherpad Lite is a lightweight version of (probably) the most popular web-based collaborative real-time editor - Etherpad. This great peace of software allows multiple users to edit the same document in real-time. To make collaboration easier, users have built-in chat at their disposal.

Webalizer stats for multiple websites

Webalizer is a web log analysis software licensed under GPL. It’s written in C and it’s super fast in processing access log files. Configuring Webalizer is very easy, especially if your Apache web server combines all access logs into one log file, but I noticed that many people have trouble configuring Webalizer for multiple websites (virtualhosts).

MySQL hot backup with XtraBackup on CentOS

If you are in a need for hot backup solution for MySQL RDBMS, you should try out Percona’s XtraBackup. Now, as you can read on the official website, XtraBackup is the world’s only open-source, free MySQL hot backup software that performs non-blocking backups for InnoDB and XtraDB databases.

Fine tuning cPanel autoresponder interval

If you enabled autoresponder in your cPanel, then you probably noticed that, by default, the sender gets only one autoreponder message every 8 hours. There is nothing wrong with that. In fact, the purpose of this interval setting is to prevent sending a bunch of emails to the sender who sends more then one email to the user who has enabled autoresponder.

Are your emails being automatically deleted from trash folder on cPanel server?

If you happen to run Courier IMAP server that comes with cPanel, then you are probably experiencing a rather unpleasant feature . By default, Courier will regularly delete every single email from trash folder that is more than 7 days old.

Changing (forgotten) PostgreSQL password

Whether you lost password for postgres user or you’d just like to change it, the process is very simple. Unlike resetting lost password for MySQL’s root user, resetting postgres’ password is pretty straightforward and you’ll not experience any kind of downtime. This article explains how to change/reset password for postgres user in PostgreSQL 8.

Running Django in Virtualenv

So, you learned some Python, heard a thing or two about Django framework and decided to try it out. You’re in luck, because you can set up your development environment in less then 60 seconds. The idea is that you install and run Django within virtualenv.