Articles | TwiN

Securing Gatus with OIDC using Auth0

This article will show you how to secure Gatus by leveraging Auth0 to manage user authentication.

Mocking HTTP requests in Go

Testing gives us the peace of mind to allow external contributors or even ourselves in the future to modify code without worrying about breaking any functionality. The problem is that when it comes to testing features that depend on making HTTP requests to third party services, we tend to just keep our eyes closed.

Bit Fields: Squishing Booleans Using Bitwise Operations

Bitwise operations, while complicated to understand at first, can become quite useful when you want to simplify the way you manipulate data. Using bit fields is one such approach; it allows combining multiple booleans, sometimes referred to as flags, into a single integer.

Fuck Your Cookie Consent Pop-up

I am so sick and tired of seeing these shitty "Do you accept cookies from this website?" pop-ups or whatever disingenuous variation of the same annoying notice.

Writing Good Documentation

Writing good documentation is not easy, but very often, it's not easy because taking the first step is hard. Make what's recommended in this article a habit, and you'll take the first step before you realize.

Shit Programmers Say: “Just Scale Up”

With cloud providers making scalability easier and easier, just scaling up has become the de facto easy way out despite the fact that it isn't always the best option.

Performance, Benchmarking and Allocations in Go

When performance matters, unnecessary memory allocations are usually the first suspect, but without benchmarking, you'll never know.

Audiobooks with Overpowered Main Characters

A list of the top overpowered main characters (OP MC/protagonist) of all time in series published as audiobooks

The Meaning of Life: Chasing Your Passion

Happiness is just too broad to be called the meaning of life because you constantly have to sacrifice your happiness for long term happiness. With that in mind, what is the meaning of life? I think it's chasing your passion.

Match a Simple Pattern Without Regex in Go

There's many reasons why you could need to support wildcard patterns, and with Go's regex not being the fastest, sometimes you need to get creative. Don't look too far, Go's standard library is here for you.

Gatus: Automated Health Dashboard

A service health dashboard written in Go that is meant to be used as a docker image with a custom configuration file.

What Programming Means to Me

The flame of my passion never went out ever since we met - here's the beginning of our story.

Add a timeout to any function in Go

Whether it be to protect your TP99 or provide a good user experience, timeouts can provide all sort of benefits. This tutorial will show you how you can add a timeout to any function in Go.

Writing a Simple Reverse Proxy in Go

Writing a reverse proxy has never been this easy

Migrating Personal Projects To Kubernetes and Rewriting Website in Go

I've finally decided to migrate my personal projects to Kubernetes

SEO Is Not a Science

Search Engine Optimization is about common sense, not trickery.

List of Interesting Quotes Collected Over The Years

A list of somewhat interesting quotes I collected over the years about anything and everything

Go Concurrency: GoRoutines, Worker Pools and Throttling Made Simple

Channels, WaitGroup, Goroutines and worker pools are all very scary principles for those who haven't been in contact with them before. Fear no more, for this article will clear up your doubts.

Useful Go Projects

It's easy to miss all Go has to offer, so here's a list of some libraries that'll make yours even simpler

Kubernetes - Efficient Autoscaling

My experience from creating a continuous deployment application on Kubernetes and implementing a resilient, robust autoscaling solution as well as the challenges I've faced and some tips to deal with them

Reducing Docker image size by using multi-stage builds

Leveraging Docker multi-stage build can allow you to drastically reduce the size of your Docker images

How to add colors to your console/terminal output in Go

The simplest way to add colors to your console/terminal output in Go, without external libraries

Why Reading is so Important

Life is short, far too short to give you the opportunity of learning everything there is to learn. That's why you should read - so you can take advantage of others' accumulated years of knowledge.

Remove Accents from Characters in Go

Users love trying to find workarounds to break your applications. Removing accents from each characters in a string is one of the many ways to make it harder for them to break your application.

Windows Alias

Ever heard of DOSKEY? It's a handy but very underrated and relatively unknown tool that allows you to create aliases in Windows.

Yubikey - Is It Worth It?

Multi factor authentication (MFA) is gaining popularity at an astonishing rate, and closely tied to MFA, we have Universal 2nd Factor (U2F) as well as Yubico's security keys branded as Yubikeys - but do they really live up to the hype?

Spaces vs. Tabs

The spaces vs tabs debate is one of the most, if not the most, commonly debated topic among developers, but does it really matter?

Stop Writing Bad Code

Bad code is unhealthy for you, your growth as a developer and other developers. Here's why.

Design Patterns - Observer

The observer design pattern contains a subject which notifies all of its dependants when it changes instead of having all of its dependant constantly check for update.

Design Patterns - Factory Method

The factory method pattern defines an interface for creating an object but lets subclasses decide which class to instantiate.

Design Patterns - Factory

The simple factory pattern is a creational pattern that creates objects without exposing how the object is created to the client by referring to the newly created object through a common interface.

Intellij - Increasing Productivity Using Templates

Using templates might be a better idea than you think. With their help, you can stop wasting your time on repetitive, time consuming tasks and instead focus on what's really important.

Spring Security - Reload Authorities on Every Request

By using an interceptor, it is possible to reload the user's authorities on every request, thus allowing the authorities of an authenticated user to be modified without having to force said user to re-authenticate.

Project - spring-as-backend

A ready-to-go secure Spring backend project

Spring Security - Prevent Authenticated Users From Accessing Login Page

A quick guide on how to prevent authenticated users from accessing the login page using Spring Security.

My First Browser Extension: show-my-ip

Creating a browser extension is not as hard as it seems.

REST API - Best Practices

A list of best practices you should be following for your RESTful APIs.

Spring Security - How to configure an OAuth2 client

Minimal configuration required for a Spring Boot project using Spring Security with OAuth2 client

Python - How to check if a port is in use

Easily check if a port is open (in use) or closed using Python's socket library.

Vim Tricks

Basic commands and a few tricks to help you get you started with VIM

My Java Code Conventions

A Java code convention for clear and readable projects.

Migrating from Java EE to Spring Boot

A guide on how to easily migrate a Java Enterprise Edition (J2EE) Web application to Spring Boot

Spring Boot: How to read a file from the resources folder

How to access resource files that are packaged inside the JAR file using Spring Boot

How to install Ubuntu Server 16.04 on a Raspberry Pi 3

Installing Ubuntu Server 16.04, or alternatively, Raspbian without a GUI on a Raspberry Pi 3 model B

React: Fix issue with Session changing after every request

Axios won't send the session unless you ask it to by using 'withCredentials: true'

Replace TAB by 4 spaces in textarea or text input

Detect the TAB character in an input or a text area and replace it by 4 spaces in JavaScript

Responsive CSS

(outdated) A short guide on how to make your website responsive without the help of a framework

How to compile large Java projects from Terminal

A simple guide on how to compile a large project when you're outside of the safe environment provided by an IDE

Setting up internet on Ubuntu Server 16.04

Configuring your wireless can be a real pain on Linux, but it's not actually that complicated.

Remove all non ascii characters from a file recursively

A simple trick to remove all non-ASCII characters from a file

How RAID works

How to install YouCompleteMe for VIM using Pathogen on Ubuntu

A guide to help you install YouCompleteMe for VIM using Pathogen on Ubuntu

Overpowered Main Character - Anime, Manga and Light Novel

A list of the top overpowered main characters (OP MC/protagonist) of all time in anime, manga and light novel series.

Anime, Manga and Light Novel with Badass Main Character

A list of some of the most badass main characters (MC/protagonist) in Anime, Manga and light novel series.