| Command | Description | Example |
|---|---|---|
| Value Inspection | ||
po |
Print the value of an expression | po myVariable.count |
po [object description] |
Print a detailed description of the object. | po [myView debugDescription] |
ptype |
Print the type of an expression | ptype myArray |
quick look |
Display a visual preview of an object in the debug pane | |
kvc path: "<key path>" |
Access nested properties using Key-Value Coding from the current context | kvc path: "user.profile.name" |
On MacOS the command line is typically accessed via Terminal.app, equivalent to cmd.exe on Microsoft Windows. The Terminal app passesthe text commands to the operating system for processing, then displays the returned results or errors.
In MacOS here are two ways to kill processes in one hit. I'll use Google Drive as an example.
List process IDs (optional, useful to query beforehand or verify afterwards):
ps aux | grep "Google Drive" | awk '{print $2}'
By Andrew Kingdom
-
User-Centric Design: The system should be designed with a core intent of assisting users to leverage their existing knowledge and experiences. This means the system should be intuitive and familiar, allowing users to apply what they already know to interact with and navigate the system effectively. Using familiar metaphors is one way to do this.
-
Multi-Sensory Interactivity: Users should be able to create interactive elements that can be interacted with not only visually (e.g., through touch or gesture on a screen), but also through other senses. For example, users could create elements that respond to voice commands (auditory) or provide haptic feedback (tactile). This multi-sensory interactivity can enhance the user experience and make the system more accessible to a wider range of users.
-
Inclusive Language and Symbolic Representations: The system should offer multiple modalities for instructions, including spoken
| // Javascript | |
| // Color from a web-style hex string -- for named colors, see https://gist.github.com/akingdom/0a0edd3ea37a9a331983cff3a69c4bee | |
| // By Andrew Kingdom | |
| // MIT license (use free and do not remove this author's name, etc) | |
| // | |
| // **Supported string formats**: | |
| // - `"fff" // RGB` | |
| // - `"#fff" // #RGB` | |
| // - `"ffff" // RGBA` | |
| // - `"#ffff" // #RGBA` |
Author: Andrew Kingdom Note: These are grep patterns I find useful for the BBEdit text editor on MacOS. Some templates may need modification/changes before use on your specific data.
-
Remove Blank Lines
- Find:
^\s*$\n - Replace: (empty string)
- Find:
-
Pascal Comment to C Comment
-
Find:
{([^}]*)}
| // pathGetter.js - MIT License (C) 2025 Andrew Kingdom | |
| /** | |
| * createPathGetter | |
| * ---------------- | |
| * Returns a high-performance, hybrid property accessor for dot-delimited paths. | |
| * | |
| * DESIGN: | |
| * - Cold paths (below `threshold` calls) use a manual string parse to avoid `.split()` allocations. | |
| * - Hot paths (≥ `threshold` calls) are promoted to precompiled accessors and cached for speed. | |
| * - Cache is capped (`maxCacheSize`) and evicts oldest hot paths (FIFO) to control memory growth. |