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
@ljw1004
ljw1004 / you_are_not_right.sh
Last active November 2, 2025 20:11
A UserPromptSubmit hook for Claude Code to stop it saying "You're right"
#!/bin/bash
set -euo pipefail
trap 'echo "at line $LINENO, exit code $? from $BASH_COMMAND" >&2; exit 1' ERR
# This is a Claude Code hook to stop it saying "you are right".
#
# Installation:
# 1. Save this script and chmod +x it to make it executable.
# 2. Within Claude Code, /hooks / UserPromptSubmit > Add a new hook (this file)
#
FUNCTION NAME :TEXTBETWEEN
AUTHOR: HAZEM HASSAN ( Microsoft Excel MVP )
LINKEDIN :https://www.linkedin.com/in/hazemhassandrexcel/
//TEXTBETWEEN is a Custom Function to Extract Text Between Delimiters.
//Syntax:
= TEXTBETWEEN ( text , delimiter_1 , [num_1] , [case_1] , [delimiter_2] , [num_2] , [case_2] )
num : the instance_num
@disler
disler / the-fishermans-prompt
Created October 2, 2023 12:50
Fisherman's Prompt
I'm a [your level] [profession] and I want to learn [topic] so I can [objective]. Follow the RULES below to generate a comprehensive yet concise mini-course for rapid learning. The course should contain chapters that teach me about these SUB_TOPICS. Make sure the chapters fit my level, profession and topic. Ask for clarification if you need more information about my knowledge.
SUB_TOPICS
- [topic 1]
- [topic 2]
- [topic 3]
RULES
- Use concrete examples to explain every concept
- Use emojis to add expression
@CHatmaker
CHatmaker / BXL 5g Functions LAMBDA for Excel Dynamic Ranges
Last active September 26, 2025 17:45
BXL 5g Functions LAMBDA for Excel for Dynamic Ranges
/* FUNCTION NAME: Aboutλ
DESCRIPTION:*//**Displays the URL to this module's Gist which includes documentation*/
/* REVISIONS: Date Developer Description
Mar 02 2023 Craig Hatmaker Original Development
Jun 08 2023 Craig Hatmaker CBSE Compliant
Jan 17 2024 Craig Hatmaker See DynamicArrayλ
*/
Aboutλ =TEXTSPLIT(
"About: →BXL's Dynamic Array module. Suggested module name: BDR¶" &
// video explaining all these formulas: https://youtu.be/yO8zX_Ivcug
// see video: https://youtu.be/P8knGhzV7uk
ListTable = LAMBDA(array,
LET(one,TAKE(array,,1),two,TAKE(array,,-1),
list,UNIQUE(one),
HSTACK(list,BYROW(list,LAMBDA(x,TEXTJOIN(", ",TRUE,FILTER(two,one=x)))))));
// see video: https://youtu.be/lli7MTilTB8
repeatXtimes = LAMBDA(array,num_repeat,
@mhawksey
mhawksey / submit.md
Last active May 20, 2025 23:10 — forked from tanaikech/submit.md
Retrieving and Parsing XML data from Google Workspace Update Blog and Putting it to Google Spreadsheet using Google Apps Script

Retrieving and Parsing XML data from Google Workspace Update Blog and Putting it to Google Spreadsheet using Google Apps Script

This is a sample script for retrieving and parsing the XML data from Google Workspace Update Blog and putting it to Google Spreadsheet using Google Apps Script.

At Google Workspace Update Blog, the XML data is provided. By this, the retrieved XML data is parsed with XmlService, and the data is put to Google Spreadsheet. Recently, I got a request for this. So I created this sample script. When this was useful for your situation, I'm glad.

Update: Modified version of the script which keeps inserting new posts after the header row.

@ExcelRobot
ExcelRobot / UNPIVOT.lambda
Last active July 11, 2025 08:24
Unpivot Table LAMBDA Function
/*
Name: Unpivot Table (UNPIVOT)
Description: Given a table range with headers and array of header names, unpivots the
specified columns in place, optionally removing any blank entries.
Written By: Excel Robot (@ExcelRobot)
Category: Array
*/
UNPIVOT=LAMBDA(table,[columns_to_unpivot],[attribute_name],[value_name],[remove_blanks], LET(
_ColumnsToUnpivot, IF(
ISOMITTED(columns_to_unpivot),
@ncalm
ncalm / excel-lambda-NGRAMS.txt
Last active June 15, 2023 09:43
This Excel LAMBDA function converts a text string into n-grams
/*
NGRAMS
Converts a text string to n-grams
Inputs:
- text (string): the text string to convert
- n (int): the number of elements to output in each n-gram
- strict (bool): whether to output incomplete n-grams at the end of the array
@jack-williams
jack-williams / datelib
Last active October 15, 2024 20:16
Excel Date Library
/**
* Returns the day of the week for the provided date,
* where Monday is the first day.
*/
dayOfWeek = LAMBDA(datetime, WEEKDAY(datetime, 2));
/**
* Returns the name for the day of the week for the provided date.
*/
dayOfWeekName = LAMBDA(datetime, TEXT(datetime, "dddd"));