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).

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