Vim: Substition

First of all you can find information for this while inside Vim using: :help :substitute Replace Names Quickly Say that you have a Deployment yaml example: apiVersion: apps/v1 kind: Deployment metadata: name: nginx-app labels: app: nginx-app spec: replicas: 3 selector: matchLabels: app: nginx-app template: metadata: labels: app: nginx-app spec: containers: - name: nginx-app image: nginx:1.20 ports: - containerPort: 80 And you want to rename it to web-server, instead of going line by line use: :%s/nginx-app/web-server/ ...

23 June 2025 · Pedro Tae Young Chang

Bash: History Expansion

Event Designators (found on man bash) These commands help to save time on Linux based tests: ! # Start a history sub. * # All the words but the zeroth. After the 1st command all the words $ # The last word. So if you add it all together: !$ # The last word of the previous command. !* # All the words of the previous command except the first. !! # The previous command. Examples kubectl apply -f my-pod.yaml vim !$ # vim my-pod.yaml touch file1.txt file2.txt rm !* # rm file1.txt file2.txt kubectl get pods !! -n kube-system # kbuectl get pods -n kube-system 202506210844 ...

21 June 2025 · Pedro Tae Young Chang

How I Installed Cosmic DE on Arch Linux

Introduction I installed Sway at first, but after some recommendations from my community, I decided to install Cosmic. First steps: When I removed sway, I did it without disabling autostart in my bash_profile. This caused me to not be able to log in to my user; which, is not fine since I want to build packages! To fix this, I went to my Home folder in my Root user, entered my user’s home folder, and commented out the sway startup script, rebooted, and now I have a blank TTY screen. ...

28 February 2025 · Pedro Tae Young Chang