Run a comamnd after network-online.target is ready

tl;dr: Use this shell command in my crontab: @reboot sh -c "while ! systemctl status network-online.target > /dev/null; do sleep 1; done; exec /foo/bar.sh" The problem I've encountered is, sometimes /foo/bar.sh would failed at boot. After digging into details, I found it's because the network was not ready, therefore the script could not get network …

The weird part of AWS bandwidth cost

I just got curious during handling the invoice of AWS. My gut feeling is that all inbound traffic are free (mostly), for example, you can see this in "Amazon EC2 On-Demand Pricing": Data Transfer IN To Amazon EC2 From Internet All data transfer in $0.00 per GB But if you're dealing with inbound traffic across …

Golang software packaging for offline environment

Open build services like Launchpad PPA usually forbid internet connections during building, therefore it's impossible to download dependencies during building, and we need to include all dependencies into the source package. Two things need to be done for building Golang softwares on no-internet building services: Download all dependencies into vendor/ via go mod vendor command. …