Skip to content

Instantly share code, notes, and snippets.

View stowball's full-sized avatar

Matt Stow stowball

View GitHub Profile
@stowball
stowball / what-has-focus.js
Created January 18, 2026 23:50
What has focus? bookmarklet
javascript:!function(d){d.addEventListener('focus',function(){console.log(d.activeElement);},true);}(document);void(0);
javascript:(function()%7Bconsole.log(%0A%20%20Array.from(document.querySelectorAll('h1%2C%20h2%2C%20h3%2C%20h4%2C%20h5%2C%20h6')).reduce((str%2C%20heading%2C%20index%2C%20arr)%20%3D%3E%20%7B%0A%20%20%20%20const%20level%20%3D%20Number(heading.tagName.slice(1))%3B%0A%0A%20%20%20%20if%20(level%20%3D%3D%3D%201%20%26%26%20heading.textContent%20%3D%3D%3D%20'No%20Preview')%20%7B%0A%20%20%20%20%20%20return%20str%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20const%20style%20%3D%20getComputedStyle(heading)%3B%0A%20%20%20%20const%20previousLevel%20%3D%20index%20%3D%3D%3D%200%20%3F%20level%20%3A%20Number(arr%5Bindex%20-%201%5D.tagName.slice(1))%3B%0A%20%20%20%20const%20indentation%20%3D%20(level%20-%20previousLevel%20%3E%201%20%3F%20'*'%20%3A%20'-').repeat(level)%3B%0A%20%20%20%20const%20isAriaHidden%20%3D%20heading.getAttribute('aria-hidden')%20%3D%3D%3D%20'true'%3B%0A%20%20%20%20const%20isDisplayNone%20%3D%20style.display%20%3D%3D%3D%20'none'%3B%0A%20%20%20%20const%20isVisibilityHidden%20%3D%20style.visibility%20%3D%3D%3D%20'h
@stowball
stowball / .bash_profile
Last active September 10, 2025 02:43
Mac dotfiles
export BASH_SILENCE_DEPRECATION_WARNING=1
source ~/.bashrc
#eval "$(/opt/homebrew/bin/brew shellenv)"
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
#export PATH="/usr/local/sbin:$PATH"
@stowball
stowball / installation.md
Last active May 1, 2025 20:13
JIRA Toggle Filter

Installation instructions

  1. Change your JIRA domain on line 7
  2. Install with Greasmonkey for Firefox or Tampermonkey for Chrome

Ctrl+click to revert to the original behaviour

@stowball
stowball / example-input.html
Last active February 16, 2025 19:57
Fetch a remote SVG as an <img> and convert it to an inline SVG
<img
alt="accessible text"
class="fill-color-red"
height="16"
src="some.svg"
width="16"
onload="fetchSvgInline(this)"
/>
@stowball
stowball / front-end-guidelines.md
Last active December 4, 2024 09:58
Front-End Guidelines
@stowball
stowball / plain-text.txt
Created March 28, 2024 10:36
The Psychology Behind a Successful Crowdfunding Campaign - Launchboom https://www.launchboom.com/blog/the-psychology-behind-a-successful-crowdfunding-campaign/
There are so many factors that can impact the result of a crowdfunding campaign. If you’re familiar with LaunchBoom’s strategy for success, you already know some of the marketing methodologies that can help you outperform traditional crowdfunding methods.
However, you might not be aware of the psychology behind successful crowdfunding campaigns — in relation to both creators and backers.
To do this, you need to understand not only the correct creator mindset but the mindset of crowdfunding backers as well. Once you have a firmer grasp of these concepts, it will help to alleviate a lot of the doubt surrounding a major endeavor like a crowdfunding launch.
Let’s start with the creator mindset, and dispelling any myths about success in crowdfunding.
Key takeaways for understanding the psychology behind crowdfunding success
Understanding the measures of successful crowdfunding, ranging from the goals you must hit to the business metrics you must calculate
@stowball
stowball / 1st.md
Last active July 28, 2023 22:46
ChatCPT rules help

The game contains various cards, each containing a flower, such as Red Daisy. The Red Daisy card appears multiple times, but 1 of them has a Bee on it. The aim of the game is for players to draft and arrange flower cards in a 3x3 grid to achieve the highest score.

When players place a flower card with a bee, they score 1 point for each adjacent card that has an identical flower as the one with the bee. I'd like to write this rule succinctly, starting with "Earn 1 point…" ChatGPT


Earn 1 point for each adjacent card that shares the same flower type as the card with the Bee.


@stowball
stowball / anti-adblocker-notifications.css
Last active July 23, 2023 11:29
Stylus user stylesheets
metering-modal,
.fc-ab-root.fc-ab-root.fc-ab-root,
[class*="sp_veil"][class*="sp_veil"][class*="sp_veil"],
[class*="sp_message_container"][class*="sp_message_container"][class*="sp_message_container"],
[id*="__vliadb"][id*="__vliadb"][id*="__vliadb"],
.ml-webforms-popup-overlay,
webpushrpromptconatiner,
[class*="popupally"],
#onesignal-slidedown-container,
.pushowl-optin,