Posts
My choice of personal knowledge management (PKM): logseq
I chose logseq as my PKM I was overloaded with information in the past several weeks. I sought many ways to overcome it. One choice I made is using logseq as PKM.
why? There are several open source or freeware verion of PKM. Why did I choose logseq?
logseq is clojure based. I am a big fan of lisp-liked languages. I studied and did some coding using racket, common-lisp, elisp and clojure after I read Paul Graham’s essays about lisp.
Posts
Setup docker in wsl2
Installation I installed Ubuntu 22.04 on my laptop following the scripts here.
sudo apt-get update sudo apt-get install ca-certificates curl gnupg sudo install -m 0755 -d /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg sudo chmod a+r /etc/apt/keyrings/docker.gpg echo \ "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin service docker start Troubleshootig It is little different from my previous installation.
Posts
Hash vs UUID to replace NRIC/L4C
Item
Hash/encryption
UUID
Order preservation
possible (linear hash)
possible ( customized UUID algorithm)
length
shorter or longer
fixed
ubiquitous
anyone or machines can be used to hash
depends
performance (computing)
?
?
performance (search)
fast
slow
References:
Posts
Keep the search result pages in search engines up to date
Last week I was assigned a task to keep search result pages of a site of my company up to date. After researching, trial and errors, I found out the following ways to keep the search result pages in search engines up to date.
Remove outdated content from search result of google and Bing.
temporary: block URLs from webmaster tools
permanent:
get sitemaps.
Posts
linux utils equivalent in powershell
I never thought I will learn to use powershell seriously. Now I joined NTUC, there are many restrictions. Today I started to use linux utils equivalent in powershell.
dig: Resolve-DnsName
telnet: Test-NetConnection
host: Get-Host
touch: New-Item
cat: Get-Content
tail: Get-Content
grep: Where-Object or Select-String
man: Get-Help
References https://mathieubuisson.github.io/powershell-linux-bash/#pwd- -
Posts
filter data conditionally using power-query
2 days ago, I didn’t figure out how to filter out data using power-query. I used a workaround solution to achive the same goal. Yesteray I occasionally found that I can filter out data directly without using my workaround solutions.
Table.SelectRows
Table.SelectRows( Table.FromRecords({ [CustomerID = 1, Name = "Bob", Phone = "123-4567"], [CustomerID = 2, Name = "Jim", Phone = "987-6543"], [CustomerID = 3, Name = "Paul", Phone = "543-7890"], [CustomerID = 4, Name = "Ringo", Phone = "232-1550"] }), each ( [CustomerID] > 2 and Text.
Posts
Subdomain or path for dev/stage/uat environments
In my previous two companies, everytime I used the subdomain way without thinking much about this. Recently I wondered the rational behind this decisions. I had the clear answers two days ago. Today I have the time to put it into this writing.
Factors
subdomain(dev.example.com)
subdomain reasons
path (example.com/dev/)
path reasons
server side performance
9
dns records point to differnent IP.
Posts
Leader election in Kubernetes control plane
Leader election in Kubernetes control plane - #HeptioProTip give a way how to find out leaders of Kubernetes control plane components kube-scheduler and kube-controller-manager. However it was based on a old version of kubernetes, and the mechanism is changed in later versions. Today I was asked how to find the leaders. Here is the new way to find.
$ kubectl -n kube-system get lease NAME HOLDER AGE kube-apiserver-c4vwjftbvpc5os2vvzle4qg27a kube-apiserver-c4vwjftbvpc5os2vvzle4qg27a_b187371d-e48c-4216-8228-707a0ecf6100 2m57s kube-apiserver-dz2dqprdpsgnm756t5rnov7yka kube-apiserver-dz2dqprdpsgnm756t5rnov7yka_0b531f66-0c31-453c-9277-a6c1aa81da94 86s kube-apiserver-fyloo45sdenffw2ugwaz3likua kube-apiserver-fyloo45sdenffw2ugwaz3likua_3e322f9a-9724-4e3a-9fc6-a512e9424164 2m11s kube-controller-manager kind-control-plane_bec39b96-87c4-4bce-8775-2eeb4eb4c1e8 2m53s kube-scheduler kind-control-plane_db6f36d8-ceaa-40eb-b821-75f8ae829f22 2m53s $ kubectl -n kube-system get pods -l component=kube-controller-manager,tier=control-plane \ -o custom-columns=NAME:.
Posts
Istio Canary Deployments using flagger
Progressive delivery: Istio Canary Deployments using flagger.
Steps environment:
kindest/node:v1.25.3
Istio 1.17.0
helm # need to install metrics-server, HPA depends on metrics-server kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml # command: # - /metrics-server # - --kubelet-insecure-tls istioctl manifest install --set profile=default kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.17/samples/addons/prometheus.yaml helm repo add flagger https://flagger.app kubectl apply -f https://raw.githubusercontent.com/fluxcd/flagger/main/artifacts/flagger/crd.yaml helm upgrade -i flagger flagger/flagger \ --namespace=istio-system \ --set crd.
Posts
Learning experiences among datadog, dynatrace, newrelic
Last week and this week, I completed my basic learning of APMs as a tool of SRE. I learnt fundamentals of datadog and newrelic, walked through their tutorials in last week and this week. I don’t find a easy way to learn dynatrace from its site. The whole learning experiences between datadog and newrelic are on par with each other. What’s the deal breaker when making choices among them?
Leader Feature flags intergration During a discussion about progressive delivery using flagger, I was curious if it is possible to integrate feature flags and APM.