Categories

automation

Curating cron emails

As you might know, cron captures all the output of executed tasks and mails them to the user under which the tasks are executed. The problem is that often this mail just piles up somewhere in /var/mail directory, without being ever reviewed. It’s not a good practice, akin to sweeping the trash under the carpet.

Ansible filter list based on attributes

Suppose we want to find only users who have a middle name from this: users: - name: John surname: Johnson - name: Alice surname: Wonderland - name: Bob surname: Rabbit middlename: Bebop Old, verbose way would be: - debug: msg="" loop: "" when: item.middlename is defined This results in “s...

Speeding up Ansible

Ansible playbook execution may take quite a while when connection is not configured properly. Here’s a checklist to ensure your Ansible is as fast as possible:

Back to Top ↑

cloud

Static website hosting in 2019

TL;DR: use Gitlab+Netlify. With the push for back to static, I found myself looking for static hosting again. And with some specific requirements: DNS on Cloudflare SSL support for 4th level subdomains (sub.sub.domain.com). Which means SSL termination can’t happen on Cloudflare - their free plan only allows to ...

Zimbra split horizon DNS on EC2 with Unbound

Email server behind NAT is a pain, but it can be further aggravated if your email server has a dynamic IP address. Which is the case with EC2. Granted, it will only change on stop/start of the instance, but still. Here’s a recipe to deal with it (a kludge, of course):

Speeding up Ansible

Ansible playbook execution may take quite a while when connection is not configured properly. Here’s a checklist to ensure your Ansible is as fast as possible:

Using multiple ELBs with Cloudflare DNS

If you have an autoscaling app on EC2, you need an ELB to distribute traffic. And if you don’t trust in ELB to be HA, you need at least 2 of them. The issue is that ELBs don’t have statis IPs, they can only be referenced with CNAME. That limits your DNS hosting option to just Route53, because apex record can’t be CN...

Back to Top ↑

email

Curating cron emails

As you might know, cron captures all the output of executed tasks and mails them to the user under which the tasks are executed. The problem is that often this mail just piles up somewhere in /var/mail directory, without being ever reviewed. It’s not a good practice, akin to sweeping the trash under the carpet.

Zimbra split horizon DNS on EC2 with Unbound

Email server behind NAT is a pain, but it can be further aggravated if your email server has a dynamic IP address. Which is the case with EC2. Granted, it will only change on stop/start of the instance, but still. Here’s a recipe to deal with it (a kludge, of course):

Centos 7 Exim DKIM

Centos 7 has Exim 4.84 in repos, which has DKIM support built-in. So no need for OpenDKIM anymore. See how is it configured:

Back to Top ↑

AWS

Zimbra split horizon DNS on EC2 with Unbound

Email server behind NAT is a pain, but it can be further aggravated if your email server has a dynamic IP address. Which is the case with EC2. Granted, it will only change on stop/start of the instance, but still. Here’s a recipe to deal with it (a kludge, of course):

Using multiple ELBs with Cloudflare DNS

If you have an autoscaling app on EC2, you need an ELB to distribute traffic. And if you don’t trust in ELB to be HA, you need at least 2 of them. The issue is that ELBs don’t have statis IPs, they can only be referenced with CNAME. That limits your DNS hosting option to just Route53, because apex record can’t be CN...

Back to Top ↑

kludge

Zimbra split horizon DNS on EC2 with Unbound

Email server behind NAT is a pain, but it can be further aggravated if your email server has a dynamic IP address. Which is the case with EC2. Granted, it will only change on stop/start of the instance, but still. Here’s a recipe to deal with it (a kludge, of course):

Using multiple ELBs with Cloudflare DNS

If you have an autoscaling app on EC2, you need an ELB to distribute traffic. And if you don’t trust in ELB to be HA, you need at least 2 of them. The issue is that ELBs don’t have statis IPs, they can only be referenced with CNAME. That limits your DNS hosting option to just Route53, because apex record can’t be CN...

Back to Top ↑

exim

Curating cron emails

As you might know, cron captures all the output of executed tasks and mails them to the user under which the tasks are executed. The problem is that often this mail just piles up somewhere in /var/mail directory, without being ever reviewed. It’s not a good practice, akin to sweeping the trash under the carpet.

Centos 7 Exim DKIM

Centos 7 has Exim 4.84 in repos, which has DKIM support built-in. So no need for OpenDKIM anymore. See how is it configured:

Back to Top ↑

ansible

Ansible filter list based on attributes

Suppose we want to find only users who have a middle name from this: users: - name: John surname: Johnson - name: Alice surname: Wonderland - name: Bob surname: Rabbit middlename: Bebop Old, verbose way would be: - debug: msg="" loop: "" when: item.middlename is defined This results in “s...

Speeding up Ansible

Ansible playbook execution may take quite a while when connection is not configured properly. Here’s a checklist to ensure your Ansible is as fast as possible:

Back to Top ↑

DNS

Zimbra split horizon DNS on EC2 with Unbound

Email server behind NAT is a pain, but it can be further aggravated if your email server has a dynamic IP address. Which is the case with EC2. Granted, it will only change on stop/start of the instance, but still. Here’s a recipe to deal with it (a kludge, of course):

Speeding up Ansible

Ansible playbook execution may take quite a while when connection is not configured properly. Here’s a checklist to ensure your Ansible is as fast as possible:

Back to Top ↑

jenkins

Back to Top ↑

reliability

Back to Top ↑

ubuntu

Change resolution from command line in Ubuntu 18.04’s Wayland

Wayland doesn’t allow applications to change resolution, and there’s no official utility to do that. There’s a third party display-config script, but it stopped working with latest changes in Mutter API. Here’s a short workaround until a better solution comes up:

Typing diacritics Mac-style in Ubuntu 17.10

One can say many bad things about Mac OS, but what they got right for sure is typing diacritics, such as ñ or é. You don’t have to add layouts or switch languages, just use alt+n to get dead tilde and alt-e for dead acute accent.

Back to Top ↑

html

Static website hosting in 2019

TL;DR: use Gitlab+Netlify. With the push for back to static, I found myself looking for static hosting again. And with some specific requirements: DNS on Cloudflare SSL support for 4th level subdomains (sub.sub.domain.com). Which means SSL termination can’t happen on Cloudflare - their free plan only allows to ...

Navbar menu for a large static website

Say you need to make a navigation menu bar for a large static (HTML) website. Very large, maybe thousands of pages. First problem would be - how to put this menu onto every page. Remember, the site is static, files can’t be changed. Fortunately even static pages can be modified with a combination of SSI server side ...

Back to Top ↑

database

MaxScale in 2015

There’s still a shortage of proper Mysql proxy software. At the moment, there are 2 the most prominent: Mysqlproxy by Oracle and MaxScale by MariaDB. Seeing that there are no RPMs for Mysqlproxy, I decided to try out MaxScale first. Let’s see how it performed.

Back to Top ↑

epic fail

MaxScale in 2015

There’s still a shortage of proper Mysql proxy software. At the moment, there are 2 the most prominent: Mysqlproxy by Oracle and MaxScale by MariaDB. Seeing that there are no RPMs for Mysqlproxy, I decided to try out MaxScale first. Let’s see how it performed.

Back to Top ↑

mariadb

MaxScale in 2015

There’s still a shortage of proper Mysql proxy software. At the moment, there are 2 the most prominent: Mysqlproxy by Oracle and MaxScale by MariaDB. Seeing that there are no RPMs for Mysqlproxy, I decided to try out MaxScale first. Let’s see how it performed.

Back to Top ↑

maxscale

MaxScale in 2015

There’s still a shortage of proper Mysql proxy software. At the moment, there are 2 the most prominent: Mysqlproxy by Oracle and MaxScale by MariaDB. Seeing that there are no RPMs for Mysqlproxy, I decided to try out MaxScale first. Let’s see how it performed.

Back to Top ↑

mysql

MaxScale in 2015

There’s still a shortage of proper Mysql proxy software. At the moment, there are 2 the most prominent: Mysqlproxy by Oracle and MaxScale by MariaDB. Seeing that there are no RPMs for Mysqlproxy, I decided to try out MaxScale first. Let’s see how it performed.

Back to Top ↑

mysqlproxy

MaxScale in 2015

There’s still a shortage of proper Mysql proxy software. At the moment, there are 2 the most prominent: Mysqlproxy by Oracle and MaxScale by MariaDB. Seeing that there are no RPMs for Mysqlproxy, I decided to try out MaxScale first. Let’s see how it performed.

Back to Top ↑

cloudflare

Using multiple ELBs with Cloudflare DNS

If you have an autoscaling app on EC2, you need an ELB to distribute traffic. And if you don’t trust in ELB to be HA, you need at least 2 of them. The issue is that ELBs don’t have statis IPs, they can only be referenced with CNAME. That limits your DNS hosting option to just Route53, because apex record can’t be CN...

Back to Top ↑

ELB

Using multiple ELBs with Cloudflare DNS

If you have an autoscaling app on EC2, you need an ELB to distribute traffic. And if you don’t trust in ELB to be HA, you need at least 2 of them. The issue is that ELBs don’t have statis IPs, they can only be referenced with CNAME. That limits your DNS hosting option to just Route53, because apex record can’t be CN...

Back to Top ↑

high availability

Using multiple ELBs with Cloudflare DNS

If you have an autoscaling app on EC2, you need an ELB to distribute traffic. And if you don’t trust in ELB to be HA, you need at least 2 of them. The issue is that ELBs don’t have statis IPs, they can only be referenced with CNAME. That limits your DNS hosting option to just Route53, because apex record can’t be CN...

Back to Top ↑

round-robin DNS

Using multiple ELBs with Cloudflare DNS

If you have an autoscaling app on EC2, you need an ELB to distribute traffic. And if you don’t trust in ELB to be HA, you need at least 2 of them. The issue is that ELBs don’t have statis IPs, they can only be referenced with CNAME. That limits your DNS hosting option to just Route53, because apex record can’t be CN...

Back to Top ↑

Route53б

Using multiple ELBs with Cloudflare DNS

If you have an autoscaling app on EC2, you need an ELB to distribute traffic. And if you don’t trust in ELB to be HA, you need at least 2 of them. The issue is that ELBs don’t have statis IPs, they can only be referenced with CNAME. That limits your DNS hosting option to just Route53, because apex record can’t be CN...

Back to Top ↑

centos

Centos 7 Exim DKIM

Centos 7 has Exim 4.84 in repos, which has DKIM support built-in. So no need for OpenDKIM anymore. See how is it configured:

Back to Top ↑

centos 7

Centos 7 Exim DKIM

Centos 7 has Exim 4.84 in repos, which has DKIM support built-in. So no need for OpenDKIM anymore. See how is it configured:

Back to Top ↑

dkim

Centos 7 Exim DKIM

Centos 7 has Exim 4.84 in repos, which has DKIM support built-in. So no need for OpenDKIM anymore. See how is it configured:

Back to Top ↑

performance

Speeding up Ansible

Ansible playbook execution may take quite a while when connection is not configured properly. Here’s a checklist to ensure your Ansible is as fast as possible:

Back to Top ↑

ssh

Speeding up Ansible

Ansible playbook execution may take quite a while when connection is not configured properly. Here’s a checklist to ensure your Ansible is as fast as possible:

Back to Top ↑

Zimbra

Zimbra split horizon DNS on EC2 with Unbound

Email server behind NAT is a pain, but it can be further aggravated if your email server has a dynamic IP address. Which is the case with EC2. Granted, it will only change on stop/start of the instance, but still. Here’s a recipe to deal with it (a kludge, of course):

Back to Top ↑

cron

Back to Top ↑

security

Back to Top ↑

keepass

Back to Top ↑

keepassx

Back to Top ↑

password

Back to Top ↑

mac

Typing diacritics Mac-style in Ubuntu 17.10

One can say many bad things about Mac OS, but what they got right for sure is typing diacritics, such as ñ or é. You don’t have to add layouts or switch languages, just use alt+n to get dead tilde and alt-e for dead acute accent.

Back to Top ↑

regex

Back to Top ↑

python

Back to Top ↑

css

Navbar menu for a large static website

Say you need to make a navigation menu bar for a large static (HTML) website. Very large, maybe thousands of pages. First problem would be - how to put this menu onto every page. Remember, the site is static, files can’t be changed. Fortunately even static pages can be modified with a combination of SSI server side ...

Back to Top ↑

javascript

Navbar menu for a large static website

Say you need to make a navigation menu bar for a large static (HTML) website. Very large, maybe thousands of pages. First problem would be - how to put this menu onto every page. Remember, the site is static, files can’t be changed. Fortunately even static pages can be modified with a combination of SSI server side ...

Back to Top ↑

smartmenus

Navbar menu for a large static website

Say you need to make a navigation menu bar for a large static (HTML) website. Very large, maybe thousands of pages. First problem would be - how to put this menu onto every page. Remember, the site is static, files can’t be changed. Fortunately even static pages can be modified with a combination of SSI server side ...

Back to Top ↑

programming

Back to Top ↑

tmLanguage

Back to Top ↑

vscode

Back to Top ↑

hosting

Static website hosting in 2019

TL;DR: use Gitlab+Netlify. With the push for back to static, I found myself looking for static hosting again. And with some specific requirements: DNS on Cloudflare SSL support for 4th level subdomains (sub.sub.domain.com). Which means SSL termination can’t happen on Cloudflare - their free plan only allows to ...

Back to Top ↑

сloudflare

Static website hosting in 2019

TL;DR: use Gitlab+Netlify. With the push for back to static, I found myself looking for static hosting again. And with some specific requirements: DNS on Cloudflare SSL support for 4th level subdomains (sub.sub.domain.com). Which means SSL termination can’t happen on Cloudflare - their free plan only allows to ...

Back to Top ↑

github

Static website hosting in 2019

TL;DR: use Gitlab+Netlify. With the push for back to static, I found myself looking for static hosting again. And with some specific requirements: DNS on Cloudflare SSL support for 4th level subdomains (sub.sub.domain.com). Which means SSL termination can’t happen on Cloudflare - their free plan only allows to ...

Back to Top ↑

gitlab

Static website hosting in 2019

TL;DR: use Gitlab+Netlify. With the push for back to static, I found myself looking for static hosting again. And with some specific requirements: DNS on Cloudflare SSL support for 4th level subdomains (sub.sub.domain.com). Which means SSL termination can’t happen on Cloudflare - their free plan only allows to ...

Back to Top ↑

netlify

Static website hosting in 2019

TL;DR: use Gitlab+Netlify. With the push for back to static, I found myself looking for static hosting again. And with some specific requirements: DNS on Cloudflare SSL support for 4th level subdomains (sub.sub.domain.com). Which means SSL termination can’t happen on Cloudflare - their free plan only allows to ...

Back to Top ↑

jekyll

Back to Top ↑