Welcome to Bixoto's Tech Blog

This is bixoto's tech blog. Here you will find useful tips, tutorials & interesting information about tech related stuff (Python, PHP, JavaScript, Dokku, etc).

Exploring Svelte and Capacitor: A global reflection

In the realm of web and mobile development, it’s never easy to decide which frameworks and tools are a better fit for our projects. For the last months, I have been developing some apps with Svelte and Capacitor, and now it’s time to reflect on the journey, analyzing the outcomes, strengths, and weaknesses of this … Read more

Monitor anything with Telegraf, InfluxDB, Grafana and Python

At Bixoto we use the TIG stack to monitor our systems. “TIG” stands for “Telegraf, InfluxDB, Grafana”. Telegraf is an agent that collects metrics on your servers and sends it to InfluxDB, a database oriented for real-time data. Then, Grafana reads these data points and renders them with nice graphs and provides some alerting. Of … Read more

How does bixoto.com work?

At Bixoto we’re quite ambitious but we’re a small team so we have to make pragmatic choices for the technologies we use. For example, the website is using Magento under the hood, so we haven’t had the need to recode an e-commerce stack from the ground. Magento has its issues, but it has tons of … Read more

Install avifenc on Ubuntu 20.04

AVIF is a next-generation image format for the Web, that’s supported by all major browsers except IE and Edge. It has better compression than WebP, which itself is a great improvement as a replacement for JPG. As of today, the most efficient way to encode JPG images into AVIF is to use libavif’s avifenc. There are no prebuilt … Read more

Always encode your Requests payloads in Python

At Bixoto, we use a lot of different APIs to interface with suppliers and other services. Today, I was working with an XML API using requests (via api_session) and xmltodict. TL;DR: use requests.post(url, data=my_string.encode(“utf-8”)) and not requests.post(url, data=my_string).Long version below: The simplified code looked like this: This worked great until I called client.hello() with a name that contained accents, such as “Élise”. The API … Read more

Add Let’s Encrypt SSL Certificates on Private Domains with Dokku

If you use Dokku, you’re probably already familiar with the Let’s Encrypt plugin to enable HTTPS on your apps with a single command. The plugin uses certbot with the HTTP-01 challenge that requires that the app be accessible on the Internet. This can’t work on apps that live in a private network. At Bixoto, we use Tailscale and Headscale to manage our VPN. … Read more

Deploy Mattermost on Dokku

Mattermost started as an open-source Slack alternative, like Gitlab for GitHub, and as such has been adopted by a lot of organizations because you can self-host it for free (although you have to pay for your own servers and you’re responsible for the maintainance and updates). Dokku is a single-server self-hosted PaaS. Think of Heroku, but open-source … Read more