Skip to content

Instantly share code, notes, and snippets.

View graffhyrum's full-sized avatar

Joshua Pendragon graffhyrum

View GitHub Profile
@boxabirds
boxabirds / .cursorrules
Last active July 1, 2025 19:26
Rock solid: turn Cursor into a rock-solid software engineering companion
# Project Policy
This policy provides a single, authoritative, and machine-readable source of truth for AI coding agents and humans, ensuring that all work is governed by clear, unambiguous rules and workflows. It aims to eliminate ambiguity, reduce supervision needs, and facilitate automation while maintaining accountability and compliance with best practices.
# 1. Introduction
> Rationale: Sets the context, actors, and compliance requirements for the policy, ensuring all participants understand their roles and responsibilities.
## 1.1 Actors
@rinogo
rinogo / playwright-wait-for-mutation-to-stop.js
Last active July 29, 2022 21:45
Wait for an element to remain unchanged for a period of time. Useful for waiting for asynchronous (AJAX) updates. Playwright, ES6, Promise, Mutation, MutationObserver
///////
//To test this code, execute it locally or copy/paste it at https://try.playwright.tech/
//Usage example: `await waitForMutationToStop(await page.$("#container"));`
///////
// @ts-check
const playwright = require("playwright");
//Wait for `elem` to have no mutations for a period of `noMutationDuration` ms. If `timeout` ms elapse without a "no mutation" period of sufficient length, throw an error. If `waitForFirstMutation` is true, wait until the first mutation before starting to wait for the `noMutationDuration` period.
const waitForMutationToStop = async (elem, noMutationDuration = 3000, timeout = 60000, waitForFirstMutation = true) => {
@gelldur
gelldur / what_i_was_doing_in_last_2w.jql
Last active September 11, 2024 15:12
JQL filter (Jira filter) For what I was doing in last 2 weeks
assignee was currentUser() during (startOfDay(-2w), now()) AND updated >= startOfDay(-2w) AND ( resolutiondate is EMPTY OR resolutiondate >= startOfDay(-2w) )