EngiNerd's Blog

Full Stack Engineer

Fast and Ineffective Hugo

I’ve been using Jekyll for quite a while now, probably around 7-8 years. I’m not exactly a very active blogger, and I don’t have any complaints about Jekyll in terms of generating documentation - usually there is no more than 100 pages. Yes, sometimes it can be quite slow, especially with complex Liquid constructions or if there are a lot of images, or if you’re using the Kramdown parser instead of CommonMark. However, Jekyll’s slowness is typically not critical, as sites are not built frequently, and one or two minutes don’t really make a difference.

Recently, out of curiosity, I explored the range of popular SSGs - who knows, maybe there’s something out there that’s as stable and mature as Jekyll but with better performance. Hugo, Astro, and 11ty caught my attention. Since I’m not a fan of products that go down the path of excessive universality, like a Swiss Army knife with everything you need but with lots of drawbacks, Astro and 11ty were ruled out. That left “incredibly fast” Hugo, which I decided to try out and see if it lives up to its reputation as described in various articles.

Amazing Node-RED

Oh, if only I had touched Node-RED earlier. With this awesome programming tool, you can automate everything… well, almost everything. Yes, it is not for everyone, an ordinary user who does not understand the basics of networks and does not know JavaScript will probably prefer IFTTT or Zapier.

How much I have been messing with IFTTT over the past few years, with their constant introduction of new limits, offering a subscription, and other crap. As soon as I raised a docker container with Node-RED on my raspberry pi 4 and I’ve got so many possibilities and had so much flexibility that I can never see on IFTTT or Zapier. Especially with a dedicated IP address, the possibilities in terms of IoT automation in conjunction with various APIs and online services are almost limitless.

Goodbye, Gromozeka Bot

The Gromozeka bot was implemented to assist Telegram users in deleting all of their messages from a chat, channel, or conversation, even without admin privileges. Official Telegram clients lack a straightforward solution for a mass message deletion, requiring users to manually select and delete messages, with a limit of 100 at a time. Gromozeka bot was aimed to solve this inconvenience.

The bot’s implementation involves creating and storing a user session on the bot’s side, posing a security concern regarding potential misuse by the bot owner. While it’s reasonable for Telegram to prevent unauthorized user session manipulation by a bot, my implementation addresses this issue. Although not flawless, my solution ensures that only the user can utilize the created session.

TeleBuilder - Telegram bot framework

[ NPM Package ]     [ GitHub Repo ]

In my spare time, I find joy in tinkering with small open source projects, one of which is a straightforward Telegram bot framework called TeleBuilder. This framework is powered by the GramJS library and is written in TypeScript. I’ve primarily developed it for personal use to implement various bots tailored to my specific needs. However, TeleBuilder also serves as a testing ground for experimenting with new TypeScript features and approaches.

Overcoming CORS Restrictions with a Cloudflare Workers-Based Proxy

Cross-Origin Resource Sharing (CORS) restrictions can be a major obstacle for web developers, preventing them from accessing data from different domains using the Fetch API. However, there is a solution that allows you to bypass these restrictions and simplify your development process - a Cloudflare Workers-based proxy.