tech

Docker and Iptables: You may do it wrong!

Oct 25, 2022
#tech #docker #iptables

1. Mission # If you’re running Docker on a host that is exposed to the Internet (network bridge), you will probably want to restrict external access. 2. Docker network # Let’s start with a fact that Docker manipulates iptables rules to provide network isolation, on Linux. Docker installs custom iptables chains named DOCKER, DOCKER-USER and DOCKER-ISOLATION-STAGE-*, and it ensures that incoming packets are always checked by these chains first. ...

Moving from Utterances to Giscus

Aug 30, 2022
#tech

I’ve used Utterances for a while. Using Github’s issue feature as a backend for comments is a very elegant solution IM O: no tracking, no ads, simple. But today, I decide to switch to a better alternative - Giscus. Giscus is heavily inspired by Utterances except one thing: instead of using Github issues it uses the fairly new Discussions features to store comments. So.. Why migrate? # Post reactions: utterances allows you to add reactions to comments but as an author I’m also interested in the general reception of the post itself. ...

Bgp Ecmp Load Balancing

Feb 07, 2022
#tech #network #bgp #ecmp

1. Introduction # We will build a Load balancer with BGP and Equal-Cost Multipath routing (ECMP) using both Bird and ExaBGP. References: How to build a load balancer with BGP and ECMP using VyOS Multi-tier load balancer Load balancing without Load balancers 2. Lab overview # EVE-NG version 2.0.3-112 QEMU version 2.4.0 AS 65000: internet service provider. In this post, we will build a BGP session between EdgeRouter and ISP router. ...

Getting Started Tiling Wm [Part 6] I3 Rounded Corners

Jan 10, 2022
#tech #tiling-vm #linux

According to Reddis post and i3-gaps issue, it seems like a lot of people would like this. But Airblade - i3-gaps maintainer doesn’t like it. But nevermind, we still have two ways to achieve it. 1. Rounded i3-gaps # Resloved have an awesome fork to implement rounded corners. I fork it again to keep it up-to-date with the upstream i3-gaps. You can check it here. Install i3-gaps. # Dependencies sudo apt install git libxcb1-dev libxcb-keysyms1-dev libpango1. ...

Rename Files in Linux

Dec 16, 2021
#linux #tech

Rename a single file with mv. Just a basic thing. Rename multiple files with mv. # Rename files with suffix .yaml to yml for f in *.yaml; do mv -- "$f" "${f%.yaml}.yml" done Rename multiple files with rename. # Install rename command # Ubuntu/Debian-derived distros sudo apt install rename # RedHat-derived distros sudo yum install prename # The follow examples are performed in Ubuntu/Debian-derived distros rename 's/.yaml/.yml/' *.yaml # Replace all occurrences of "prev_" with "next_" rename 's/prev_/next_' *. ...

Goignore

Nov 26, 2021
#tech #golang

Goignore - A .gitignore wizard which gnerates .gitignore files from the command line for you. Inspired by joe 1. Features # No installation necessary - just use the binary. Works on Linux, Windows & MacOS. Interactive user interface with bubbletea: Pagination, Filtering, Help… Supports all Github-supported .gitignore files. 2. Install # Download the latest binary from the Release page. It’s the easiest way to get started with goignore. Make sure to add the location of the binary to your $PATH. ...

Getting Started with Tiling WM [Part 1] - I3

Apr 19, 2021
#tiling-wm #linux #tech #i3

Disclaimer I love customizing desktop. I make changes in my desktop everyday, make it look eye candy. My colleagues ask me how to make their desktop look like mine. But there are many steps and things to learn and follow, I know because I’ve gone throught it. Therefore I decide to write this getting-started guide to give people a shortest path to Fancy world. 1. Overview Window Manager # First of all, you have to know the basic concepts. ...

Getting Started with Tiling WM [Part 2] - Rofi

Apr 19, 2021
#tiling-wm #linux #tech #rofi

In the part1, I’ve used rofi instead of dmenu. This part will show you how to start with rofi. 1. Introduction # Rofi is a window switcher, application launcher and dmenu replacement. Features: Fully configurable keyboard navigation. Type to filer. Built-in modes: Window switcher mode. Application laucher. Desktop file application launcher. SSH laucher mode. History-based ordering. … 2. Getting started # Installing rofi is quite easy. sudo apt install rofi -y Run it for the first time. ...