Shutdown Proxmox VM using CLI

SSH into the Proxmox host and run: qm shutdown <VMID> This sends an ACPI shutdown signal to the guest OS for a graceful shutdown. To find the VM ID: qm list If the VM doesn’t respond to the shutdown signal, force it: qm stop <VMID> qm stop is equivalent to pulling the power cable. Use it only when qm shutdown hangs.

17 October 2023 · 1 min · 61 words · Shafiq Alibhai

Learn Ansible

Ansible manages remote machines over SSH. No agents needed. You write playbooks in YAML that describe what the target state should be, and Ansible makes it happen. SSH setup Generate a key pair on the control node and copy it to your targets: ssh-keygen -t rsa ssh-copy-id username@target_host Inventory An inventory file lists your hosts and groups them: # my_inventory.ini [web] 192.168.1.2 [db] 192.168.1.3 You can also use dynamic inventory scripts that output JSON. ...

8 September 2023 · 2 min · 316 words · Shafiq Alibhai

Books that actually helped me with the people side of project management

I spent a chunk of last year reading my way through the soft-skills section of the bookshop. Not because I’d suddenly become interested in personal development — more because I was struggling with a project where the technical bits were fine but everything around it kept falling apart. Miscommunications. Teams that wouldn’t align. Stakeholders who seemed to be operating in a different reality. So I started reading. Not the textbook stuff, but the books people actually recommend when they’re being honest. Here’s what stuck. ...

5 September 2023 · 7 min · 1383 words · Shafiq Alibhai

How to count words in a PDF from the Linux command line

The simplest approach: pdftotext input.pdf - | wc -w pdftotext is in the poppler-utils package (sudo apt install poppler-utils or sudo yum install poppler-utils). The - sends output to stdout instead of a file. Other options pdfminer: pdf2txt.py input.pdf | wc -w Install with pip install pdfminer.six. Python with PyPDF2: import PyPDF2 with open("input.pdf", "rb") as f: reader = PyPDF2.PdfReader(f) total = sum(len(page.extract_text().split()) for page in reader.pages) print(total) Note: PyPDF2’s PdfFileReader and getPage() are deprecated in newer versions — use PdfReader and index into reader.pages instead. ...

5 September 2023 · 1 min · 132 words · Shafiq Alibhai

Install psql on macOS with Homebrew

brew install libpq brew link --force libpq psql --version libpq includes psql and other PostgreSQL client utilities. The brew link --force step symlinks the binaries into your PATH so psql is available from any terminal. If you don’t have Homebrew installed yet: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

26 July 2023 · 1 min · 47 words · Shafiq Alibhai

How to avoid other pods from being scheduled on your node in Kubernetes

Taints on nodes repel pods. Tolerations on pods let them ignore specific taints. Together they give you control over scheduling. Taint effects NoSchedule — pods without a matching toleration won’t be scheduled on the node. PreferNoSchedule — the scheduler avoids the node but will use it if there’s nowhere else. NoExecute — pods without a matching toleration are evicted and won’t be rescheduled there. Applying a taint kubectl taint nodes node1 type=db:NoSchedule This prevents any pod from being scheduled on node1 unless it has a toleration for type=db. ...

13 July 2023 · 1 min · 149 words · Shafiq Alibhai

Security Clearance Vetting for Access to Cloud Production Environments

Access to cloud production environments should require security clearance vetting. Production systems hold live data and applications, and the consequences of compromise are direct. UK clearance levels Level What it covers Checks included BPSS Pre-employment screening for government asset access Identity, employment history, immigration status, unspent criminal record AC Unescorted access to UK airport security areas Identity, employment history, criminal record, government agency records CTC / Level 1B UK OFFICIAL assets, occasional SECRET access Identity, employment, criminal record, financial situation, personal circumstances SC Substantial unsupervised SECRET access Everything in CTC plus credit reference and MI5 record checks DV Substantial unsupervised TOP SECRET access Everything in SC plus detailed interview and referee enquiries The process You need a sponsor — usually HR or a company security controller. They confirm your role requires vetting and that BPSS checks are complete (unless you’re doing AC). You then fill out a security questionnaire online covering personal details, employment history, finances, criminal record, foreign travel, and contacts. ...

11 July 2023 · 2 min · 258 words · Shafiq Alibhai

Kubernetes Tolerations

Taints and tolerations work together to control which pods land on which nodes. Taints go on nodes and repel pods. Tolerations go on pods and let them ignore specific taints. Taint effects There are three effects: NoSchedule — pods without a matching toleration won’t be scheduled on the node. Existing pods are unaffected. PreferNoSchedule — the scheduler avoids the node but will use it if there’s nowhere else. NoExecute — pods without a matching toleration are evicted from the node and won’t be rescheduled there. Applying taints # Add a taint kubectl taint nodes node1 example-key=example-value:NoSchedule # Remove a taint kubectl taint nodes node1 example-key=example-value:NoSchedule- # Multiple taints at once kubectl taint nodes node1 key1=value1:NoSchedule key2=value2:PreferNoSchedule View taints on a node: ...

11 July 2023 · 2 min · 248 words · Shafiq Alibhai

A list of emotions I keep coming back to

I started keeping a list of emotions because I realised I didn’t have names for half the things I was feeling. Not clinical names — just everyday words that would let me say “I’m feeling X” instead of “I don’t know what’s wrong but something is.” It sounds simple, but most people never build that vocabulary. We grow up with maybe twenty or thirty emotion words and then we just reuse them forever. Happy, sad, angry, stressed. That’s it. When something more specific comes up — like the particular flavour of disappointment you get when someone forgets your birthday but you pretend it didn’t matter — you don’t have a word for it. So you just sit with it, unnamed, and it gets heavier. ...

15 May 2023 · 5 min · 853 words · Shafiq Alibhai

How to make a vision board (that you'll actually use)

I’ve tried vision boards before. Like most people, I made a nice collage, pinned it somewhere visible, and then promptly forgot it existed. The problem wasn’t the board — it was that I never actually sat down and thought about what I wanted. I just pasted random pictures of beaches and sports cars and called it a day. This time I wanted to do it properly. Not the Pinterest aesthetic kind, but the kind where you actually force yourself to decide what matters across different areas of your life. So I built a markdown template instead. It’s simpler, it lives in my notes, and it forces structure onto the chaos. ...

6 May 2023 · 4 min · 842 words · Shafiq Alibhai