CJClavianus Juneardoinclavinjune.hashnode.dev·Jan 22, 2021 · 8 min readLinux Retains the Size of the Deleted FileWhile interning, I once had an application that logged every request and response to the Linux file system. That app easily fills up our disks due to traffic. I got confused when I tried to delete log files because disk usage didn’t decrease even aft...00
CJClavianus Juneardoinclavinjune.hashnode.dev·Jan 10, 2021 · 1 min readGreatest Common Divisor and Least Common MultiplierI only rewrite what was written on my pastebin package main import "fmt" func findGCD(a, b int) int { if b == 0 { return a } return findGCD(b, a%b) } func findLCM(a, b int) int { return a * b / findGCD(a, b) } func main() { fmt.Pri...00
CJClavianus Juneardoinclavinjune.hashnode.dev·Jan 10, 2021 · 2 min readSieve Of EratosthenesI don’t do anything except converting the pseudocode from wiki into Golang code package main import "fmt" func fetchFirstPrimeNumbersOf(n int) []int { var result []int // an integer n > 1 if n <= 1 { return result } // let A be an a...00
CJClavianus Juneardoinclavinjune.hashnode.dev·Dec 19, 2020 · 7 min readContextual Logging In GoI’ve just woke up and somehow I remember that when I created taboo to trace the error log. And then I think, would it be better if I pass the logger instead of the error log itself? As the context passed, it will contain a sub-logger that has x-reque...00
CJClavianus Juneardoinclavinjune.hashnode.dev·Dec 7, 2020 · 8 min readAsymmetric Cryptography: Signing VS EncryptingWhen we talk about crypto-something, we need to talk about Alice and Bob acting as actors in the example section. I hope you don’t get bored with them as I will use them as examples too. Here, Alice and Bob will use RSA for the asymmetric key, SHA256...00