Skip to content

Instantly share code, notes, and snippets.

View sachajw's full-sized avatar
💭
Have you tried turning it off and on again?

Sacha Wharton sachajw

💭
Have you tried turning it off and on again?
View GitHub Profile

3x worker nodes with 50GB disk (where applicable), 1 load balancer (where applicable)

Provider Node Class Node Details CPU Node Node Disk LB Total EUR
Civo Medium 2vCPU 4GB RAM 50GB NVMe Dedicated 20 0 10 75.803
Digital Ocean Basic 2vCPU 4GB RAM 80GB SSD Shared 24 0 12 90.9636
GCP N1 Spot n1-standard-1, 50GB Disk Dedicated 8.03 5.5 0 32.043011
GCP N1 n1-standard-1, 50GB Disk Dedicated 26.72 5.5 0 92.761214
GCP E2 e2-medium, 50GB Disk Shared 26.93 5.5 0 93.443441
Scaleway* PLAY2 NANO Cost-Optimized- 2 - 4 GB Shared 19.71 4.31 14.6 80.814
@iamalbert
iamalbert / README.md
Last active November 30, 2023 22:39
Git skip LFS on local repo

Because GitKraken and SourceTree are FUCKING SLOW for repo with large LFS objects.

Need to completely skip LFS operation when pull/fetch/checkout/...

Skip downloading when clone

GIT_LFS_SKIP_SMUDGE=1 git clone SERVER-REPOSITORY

Skip downloading when fetch/checkout/pull

@staaldraad
staaldraad / awk_netstat.sh
Last active July 5, 2024 01:55
AWK to get details from /proc/net/tcp and /proc/net/udp when netstat and lsof are not available
# Gawk version
# Remote
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($3,index($3,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($3,i,2))}{print x":"strtonum("0x"substr($3,index($3,":")+1,4))}'
# Local
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($2,index($2,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($2,i,2))}{print x":"strtonum("0x"substr($2,index($2,":")+1,4))}'
# No Gawk
# Local
grep -v "rem_address" /proc/net/tcp | awk 'function hextodec(str,ret,n,i,k,c){