Skip to content

Instantly share code, notes, and snippets.

@kingargyle
kingargyle / TOOLING_CONSTRAINTS.md
Created February 24, 2026 02:49
AI Tooling Constraings

AGENT CAPABILITY PROTOCOL

1. Filesystem Fallbacks

  • No Directory Creation Tool: Use your Write tool to create a placeholder .gitkeep file in the target path.
  • No Delete/Move Tools:
    1. Write the new file to the destination.
    2. Add the old file path to the "Cleanup & Manual Actions" section of the task spec for human action.

2. Environment Restrictions

  • No Direct Shell: Do not assume shell access (bash/zsh).
@kingargyle
kingargyle / sdd_implementation_v1.md
Last active February 24, 2026 02:51
Enforce Spec Driven / Goal Driven development

Implementation Plan: Phased Spec-Driven Development (SDD)

Status: PROPOSED
Version: 1.6.3
Target: Standardized AI Workflow (Universal LLM/Agent Compatibility)

1. Scope and Summary

  • Scope: This protocol applies to all AI-assisted development (features, refactors, migrations).
  • Summary: To eliminate "Vibe Coding" and ensure consistency, this plan implements a Spec-First Protocol. Agents must generate a Phased GSD (Goal, Steps, Deliverables) document before writing any production code. Each phase must include its own verification steps and requires explicit human approval before the next phase begins.
  • Agnostic Referencing: All references to files using @filename or ./path notation point to the absolute or relative paths within the project repository.
@kingargyle
kingargyle / promptslocation.md
Created February 16, 2026 14:59
Location of Android Studio Prompts

On a a linux system, the app.prompts.xml file that contains the saved prompts, is stored in `~/.config/Goggle/AndroidStudioVersion/options/app.prompt.xml'

For MacOSX: Configuration/Settings: ~/Library/Application Support/Google/AndroidStudio

  • Plugins: ~/Library/Application Support/Google/AndroidStudio/plugins
  • System/Cache Files: ~/Library/Caches/Google/AndroidStudio
  • Logs: ~/Library/Logs/Google/AndroidStudio

For Windows: On Windows, the settings are stored within the user's AppData folder:

@kingargyle
kingargyle / pipewire.md
Created May 2, 2025 23:54 — forked from the-spyke/pipewire.md
Enable PipeWire on Ubuntu 22.04

Enable PipeWire on Ubuntu 22.04

This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like pipewire-debian, you might get into conflicts.

Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.

Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.

Based on Debian Wiki, but simplified for Ubuntu 22.04.

@kingargyle
kingargyle / End GCode
Last active February 9, 2024 10:35
Prusa Slicer Anycubic Kobra Neo
M117 Cooling down...
M104 S0 ; turn off extruder
M107 ; Fan off
M140 S0; Turn bed off
M84 ; disable motors
G91 ;relative positioning
G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure
G1 Z+0.5 E-5 ;X-20 Y-20 F240 ;move Z up a bit and retract filament even more
G28 X0 ;move X to min endstops, so the head is out of the way
G90 ;Absolute positionning
@kingargyle
kingargyle / SchoolViewHolder.java
Last active June 1, 2022 12:52
Example of Unit Testing classes with Hilt @entrypoints
public class SchoolViewHolder extends RecyclerView.ViewHolder {
private ItemSchoolBinding binding;
// @VisibleForTesting
// protected EventBus eventBus = EventBus.getDefault();
private EventBus eventBus;
public SchoolViewHolder(@NonNull View itemView) {
@kingargyle
kingargyle / CoroutinesRule.kt
Created July 31, 2020 19:27
A JUnit 4 test rule for working with testing coroutines.
package com.abercrombie.testing.ui.rules
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.TestCoroutineDispatcher
import kotlinx.coroutines.test.TestCoroutineScope
import kotlinx.coroutines.test.resetMain
import kotlinx.coroutines.test.runBlockingTest
import kotlinx.coroutines.test.setMain
import org.junit.rules.TestRule
@kingargyle
kingargyle / spotless.gradle
Created May 16, 2020 23:53
Configure XML formatting for Android Layout files
subprojects {
apply plugin: "com.diffplug.gradle.spotless"
spotless {
format 'xml', {
target '**/layout*/*.xml'
indentWithSpaces(2)
eclipseWtp('xml').configFile rootProject.file('spotless.xml.prefs')
}
}
@kingargyle
kingargyle / gist:460bd53b5c6096fc43866020a9bde4d9
Created October 12, 2019 01:29
Capture Image from HLS stream using FFMPeg
ffmpeg -loglevel 99 -i "https://webcamstream.multivista.com/live/amlst:dal_59169_1.stream/chunklist_w95623917_b300000.m3u8" -ss 00:00:14.435 -vframes 1 -strftime 1 "%Y-%m-%d_%H-%M-%S_crew_stadium.png"
@kingargyle
kingargyle / commit-msg
Created April 19, 2019 14:10 — forked from williamdenton/commit-msg
Git hooks
#!/bin/sh
commit_regex='^(PP-[0-9]+|fixup!)'
error_msg="Aborting commit. Your commit message is missing a JIRA ticket ('PP-1234')"
if ! grep -iqE "$commit_regex" "$1";
then
echo "$error_msg" >&2
exit 1