RSSAmplifier

Blog

thoughts

Denis Khoshaba's blog | theden.sh

thoughts.theden.shRSS feed ↗16 posts

Latest posts

Indigo Prophecy: The Case for Demos as Game Design

The Magic of Demos # I remember playing the demo of Indigo Prophecy (known as Fahrenheit in Australia) when I was younger. The demo plays out the intro (as shown above) through to the end of what’s effectively the first level. It was tense and gripping, and felt at the time really innovative insofar as evoking a real sense of panic and urgency. The premise was simple. After coming out of…

You Can Watch "No Other Land" Online — but Not if You Google It

I was looking to watch the documentary No Other Land — from the wiki: [No Other land] was recorded between 2019 and 2023 and shows the destruction of a Palestinian community in the occupied West Bank, which had been resisting forced displacement after an Israeli “firing zone” was declared on their land. While not widely available for streaming, fortunately it’s readily available…

Are Your Public Dotfiles Revealing Too Much?

Why is it a Problem? # Committing dotfiles to a public git repository is now pretty common. Oftentimes people include their .bashrc without much thought. However, information in one’s bashrc could potentially leak sensitive information — for example: ssh connection aliases that expose server IPs/hostnames, usernames, and potentially private key locations and ciphers AWS account IDs via…

A List of What's Wrong with MS Teams

The UI and Navigation # Keyboard shortcuts aren’t clear, or at least not encouraged. In other chat apps, at least on MacOS, hitting CMD + ? shows a shortcut window. I still don’t know how to switch between chats in MS Teams (in Slack it’s Option+up/down Keyboard navigation in general is poor, I end up using the mouse more than I need to. Teams has Chat and Teams tabs, where…

Fun with DNS TXT Records

TXT Record Specification Primer # Reading through the RFC Using the Domain Name System To Store Arbitrary String Attributes to summarise the relevant part: Any printable ASCII character is permitted for the attribute name. More importantly, on the restrictions section Some DNS server implementations place limits on the size or number of TXT records associated with a particular owner. Certain…

Parsable Text Considered Harmful

Searching GitHub for OpenAI API Keys

OpenAI API keys in the format sk-<40 case-sensitive alphanumeric characters> A simple regular expression for this would be /sk-[a-zA-Z0-9]{40,}/ i.e., match any string that starts with &ldquo;sk-&rdquo; followed by at least 40 alphanumeric characters. GitHub allows regular expression search , but note that if the search is too expensive you&rsquo;ll get a 5XX response. I noticed modifying it to…

Free Up Disk Space on MacOS

Ignoring system caches, and logs in general for safety. Brew&rsquo;s Cache # brew cleanup --prune = all -s brew cleanup Remove stale lock files and outdated downloads for all formulae and casks, and remove old versions of installed formulae --prune=all removes everything (not up only a specified age, otherwise set by the env var HOMEBREW_CLEANUP_MAX_AGE_DAYS ) -s : Scrub the cache, including…

Offbeat Documentaries I Enjoyed Watching

Confessions of a Superhero The Dungeon Masters The Parking Lot Movie Cinemania American Movie American Juggalo Einstein&rsquo;s Brain Confessions of a Superhero # Follows four people that dress up in superhero costumes and work on tips taking photos with tourists on Hollywood Boulevard. It starts off innocuous but descends into the personal lives and past of each character. The Dungeon Masters #…

Improve docker volume performance on MacOS with a RAM disk

Primer Hardware Setup Random Read and write performance Standard volume RAM Disk I/0 latency Standard volume RAM Disk Cleanup Results Primer # Whilst docker does support tmpfs natively, it&rsquo;s only available if you&rsquo;re running docker on linux. A use-case for using a ram disk, as described in the documentation: If your container generates non-persistent state data, consider using a tmpfs…

WhatsApp Desktop attempts to access the camera on MacOS

I use Micro Snitch , a neat tool that shows a notification overlay whenever the microphone or camera is accessed. It also logs all access. I noticed whenever I open WhatsApp Desktop on Macos it triggers the overlay notification even though WhatsApp doesn&rsquo;t use the camera, and AFAIK WhatsApp on the desktop does not use video. Digging deeper, we can use lsof after restarting WhatsApp to see…

Organising One's Music Library

The Setup # Recently I&rsquo;ve made efforts to have a local lossless music collection. The setup is humble: The bare metal server is a mid-tier Synology NAS Plex as the media server software With Plexamp , a solid music player client for Plex (runs on all major OSes) Here is the client on MacOS Cool thing is it allows me to stream library when I&rsquo;m outside, download locally, etc. most of the…

M1 MacBooks and Drive Wear

Typically, to find the overall wear of a MacBook drive, one installs smartctl from smartmontools via brew install smartmontools or sudo port install smartmontools Then by looking at the Percentage Used from the output of smartctl -a /dev/disk0 === START OF SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED SMART/Health Information (NVMe Log 0x02) Critical Warning: 0x00…

Kube Tricks

Ephemeral Debug Containers # One can use ephemeral debug containers Alternatively to edit in-place to test out configs and env vars use kubectl edit to modify a pod (or Deployment , StatefulSet etc.) YAML to update the command to do nothing so one can kubectl exec into the pod apiVersion : v1 kind : Pod metadata : name : unstable-pod spec : containers : - name : unstable-pod image : foobar command…

Changing Your PS1's Prompt Based on The Previous Command's Return Value

You may find it useful for your PS1 to signal if a previous command returned 0 or not. One neat way to do this that doesn&rsquo;t add clutter is to have your PS1 change colour based on the previous command&rsquo;s return value. I find that it also works well for scrollback, allowing me to at a quick glance where things went wrong. It can also draw attention to nonzero return values for programs…

Unix philosophy-esque approach to web tooling

[Ongoing. I&rsquo;ll be adding for snippets to this page that I find useful over time Suggestions are also welcome ] Creating WebP images # If you want to recursively create .webp versions of images in a folder (same name, saved in same location, different extension name), this script will do that while IFS = read -r -d '' file; do cwebp -q 90 " $file " -o " ${ file%.* } .webp" || true done < < (…