How to empty a file in Microsoft Windows without deleting it

As part of my freelancing business, I recently had to fix a space issue on a Windows machine. And the issue was caused by a very large text file. I know the Linux way of emptying a file, which is to redirect STDIN to the file. But on Windows I had to find a way to do it. Of course I tried the easy way and I thought that AI would be able to provide a quick answer. ...

May 14, 2025 · 13 min · 2581 words · costin

RedHat Openshift, container IDs and cgroups

So I had a really interesting issue recently where one of our app devs was complaining that he can’t get the container ID from within the container in a new environment. For context, there’s a setup with 3 identical environments on the customer side and a local lab that was recently replaced. I’ve deployed a new Openshift cluster (version 4.14. will become important later) to replace another lab environment in a different location. ...

May 8, 2025 · 3 min · 586 words · costin

Microsoft announced Think Deeper, free access to GPT o1 model

So recently Microsoft announced they’re offering ChatGPT o1 model free to their Copilot program. So I’ve decided to give it a go and see how it goes. First I’ve connected to https://copilot.microsoft.com with both a personal account and a work account. I’ve tested the announcement of this by asking it directly: What we can see quickly is that my company-linked account has to update to latest Copilot because it still uses GPT4 as a LLM. While the official Copilot uses the latest model. Even though it doesn’t respond directly like its previous model. ...

January 31, 2025 · 3 min · 431 words · costin

How to analyze and fix a pod scheduling issue due to Insufficient Memory on Kubernetes or Openshift.

So it may happen that you have a Kubernetes or Openshift deployment and a pod does not want to start and remains in Pending state. First, let’s check the events that are causing this: [root@server ~]# k get events -n <namespace> LAST SEEN TYPE REASON OBJECT MESSAGE 31m Warning FailedScheduling <namespace>/<pod_name> 0/13 nodes are available: 10 Insufficient memory, 3 node(s) had taint {node-role.kubernetes.io/master: }, that the pod didn't tolerate, 4 Insufficient cpu. As we can see, the reason is FailedScheduling and the message complains about insufficient memory and insufficient cpu. ...

January 9, 2025 · 6 min · 1175 words · costin

How to get audio notification from CLI when server or service is reachable

If you’re working on fixing an issue on a server and want to be notified as soon as this is reachable, you can run an audio alert. Below I have a list of variations of the Bell Character. Windows / PowerShell: while ($true) {if (Test-Connection -quiet 1.1.1.1) { [console]::beep() }} Windows / cmd: for /L %n in () do @ping -n 1 1.1.1.1 && echo ^G WSL2 / Bash: while true; do sudo ping -q 1.1.1.1 -w1 >/dev/null && tput bel; sleep 5; done on WSL ping needs eleventation so sudo is mandatory. ...

December 31, 2024 · 2 min · 279 words · costin