Skip to content

Instantly share code, notes, and snippets.

@steipete
steipete / agent.md
Created October 14, 2025 14:41
Agent rules for git
  • Delete unused or obsolete files when your changes make them irrelevant (refactors, feature removals, etc.), and revert files only when the change is yours or explicitly requested. If a git operation leaves you unsure about other agents' in-flight work, stop and coordinate instead of deleting.
  • Before attempting to delete a file to resolve a local type/lint failure, stop and ask the user. Other agents are often editing adjacent files; deleting their work to silence an error is never acceptable without explicit approval.
  • NEVER edit .env or any environment variable files—only the user may change them.
  • Coordinate with other agents before removing their in-progress edits—don't revert or delete work you didn't author unless everyone agrees.
  • Moving/renaming and restoring files is allowed.
  • ABSOLUTELY NEVER run destructive git operations (e.g., git reset --hard, rm, git checkout/git restore to an older commit) unless the user gives an explicit, written instruction in this conversation. Treat t
@0xdevalias
0xdevalias / _gh-cli-copilot-api.md
Last active June 14, 2025 19:06
Some notes and references while exploring the GitHub CLI extension for the GitHub Copilot CLI
@unix-junkie
unix-junkie / cde-backdrop
Created June 19, 2023 22:49
Setting the CDE Backdrop - shell script
#!/bin/sh
#
# cde-backdrop
# Copyright © 2002 Thomas A. Fine
# License is hereby granted to redistribute for any use (commercial or
# otherwise), in whole or in part, provided only that this copyright and
# license are preserved.
#
# Version 1.0 Fri Sep 6 15:24:49 EDT 2002
@MCJack123
MCJack123 / rawterm.lua
Last active June 22, 2025 06:06
CraftOS-PC raw mode client/server API for ComputerCraft with test program
--- rawterm.lua - CraftOS-PC raw mode protocol client/server API
-- By JackMacWindows
--
-- @module rawterm
--
-- This API provides the ability to host terminals accessible from remote
-- systems, as well as to render those terminals on the screen. It uses the raw
-- mode protocol defined by CraftOS-PC to communicate between client and server.
-- This means that this API can be used to host and connect to a CraftOS-PC
-- instance running over a WebSocket connection (using an external server
@MCJack123
MCJack123 / redrun.lua
Last active August 16, 2025 10:21
RedRun - A very tiny background task runner for CC using the native top-level coroutine
--- RedRun - A very tiny background task runner using the native top-level coroutine
-- By JackMacWindows
-- Licensed under CC0, though I'd appreciate it if this notice was left in place.
-- @module redrun
-- Note: RedRun is not intended for use as a fully-featured multitasking environment. It is meant
-- to allow running small asynchronous tasks that just listen for events and respond (like
-- rednet.run does). While it is certainly possible to use this to make a functioning kernel, you
-- should not do this as a) any time spent in the processes is time taken from Rednet, and b) there
-- is no filtering for user-initiated events, or automatic terminal redirect handling.
@unix-junkie
unix-junkie / ImageDocument.css
Created July 15, 2019 09:57
resource://gre/res/ImageDocument.css
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* This CSS stylesheet defines the rules to be applied to any ImageDocuments,
* including those in frames.
*/
@kghose
kghose / embed.py
Last active September 23, 2022 11:09
Code for: Embed Ace editor in a Python QT app
import sys
from PySide2.QtCore import QObject, QUrl, Signal, Slot
from PySide2.QtWidgets import QApplication
from PySide2.QtWebChannel import QWebChannel
from PySide2.QtWebEngineWidgets import QWebEngineView
# We create this file as follows
# First create a .qrc file so we can include the ace editor code and the qqwebchannel.js in a form
# usable by the application. Delightfully QT doesn't allow wildcards or directories in the .qrc
@hpcsc
hpcsc / hack.sh
Created March 3, 2019 12:43
md viewer in terminal
#!/usr/bin/env bash
FZF_DEFAULT_OPTS="--reverse --height 30% --header 'Choose markdown file'"
CACHE_DIR=$HOME/.hack/
function check_prerequisite() {
local prerequisites=(curl mdless jq fzf)
for tool in ${prerequisites[@]}; do
type ${tool} >/dev/null 2>&1 || { echo >&2 "I require $tool but it's not installed."; exit 1; }
@koenighotze
koenighotze / hint.sh
Last active October 3, 2021 12:42
Simple shell script for using https://devhints.io on the command line
#!/usr/bin/env bash
type wget >/dev/null 2>&1 || { echo >&2 "I require wget but it's not installed."; exit 1; }
type mdless >/dev/null 2>&1 || { echo >&2 "I require mdless but it's not installed."; exit 1; }
TOOL=${1:?Usage: hack.sh <toolname> [--refresh]}
REFRESH=${2:-no}
RAW_MD_URL="https://raw.github.com/hazeorid/devhints.io/gh-pages/${TOOL}.md"