Skip to content

Instantly share code, notes, and snippets.

View swinton's full-sized avatar
:bowtie:

Steve Winton swinton

:bowtie:
View GitHub Profile
@swinton
swinton / README.md
Last active July 18, 2026 18:44
Standalone JavaScript function that removes JavaScript and HTML restrictions that block pasting, editing, or autofilling text fields (like email or password inputs) on a web page.

restore-paste.js — Bookmarklet

Standalone JavaScript that removes JavaScript/HTML restrictions blocking paste, edit, or autofill on input and textarea fields (e.g. password fields that block pasting).

This version is packaged as a bookmarklet — a bookmark you click to instantly run the script on whatever page you're viewing. No extension required.

Install (one-time, Firefox)

  1. Show the bookmarks toolbar: Ctrl+Shift+B (or right-click any toolbar → Bookmarks Toolbar).
  2. Right-click the toolbar → New Bookmark…
#!/bin/bash
# Usage: ./glitchify.sh /path/to/your/input.jpg
# https://chatgpt.com/share/680d6d83-c9d8-8005-8c29-252270e9179b
# Check for input argument
if [ "$#" -ne 1 ]; then
echo "Usage: $0 /path/to/your/input.jpg"
exit 1
fi

How to tell if Rosetta is installed?

lsbom -f /Library/Apple/System/Library/Receipts/com.apple.pkg.RosettaUpdateAuto.bom

Or

ls /usr/libexec/rosetta
{
"version": "2.1.0",
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
"runs": [
{
"tool": {
"driver": {
"name": "Brakeman",
"informationUri": "https://brakemanscanner.org",
"semanticVersion": "4.10.0",

About

This 🚧 work-in-progress 🚧 playbook for developing and delivering webinar content, with a focus on delivering live demos...

📚 Playbook

  1. I develop the narrative, e.g. as a high-level outline, using the team as a sounding board to get feedback / inputs early on!
  2. I try and write the least amount of code possible in the amount of time available! I can always fake it, e.g. I just started building this app, the important part is the narrative.
  3. Pre-recorded demos are great, they buy predictability but at the cost of prolonged preparation time, and they allow me to speed up boring parts, like waiting for builds to complete.
  4. My preference is to use ScreenFlow to screen-record my demos.
@swinton
swinton / README.md
Created December 3, 2020 22:24
Using GitHub's Git data API

Using GitHub's Git data API by Example

  1. Create a blob
  2. Create a tree
  3. Create a commit
  4. Create (or update) a ref

Create a blob

@swinton
swinton / README.md
Last active July 2, 2026 05:30
Automatically sign your commits from GitHub Actions, using the REST API

Verified commits made easy with GitHub Actions

image

So you want to commit changes generated by a GitHub Actions workflow back to your repo, and have that commit signed automatically?

Here's one way this is possible, using the REST API, the auto-generated GITHUB_TOKEN, and the GitHub CLI, gh, which is pre-installed on GitHub's hosted Actions runners.

You don't have to configure the git client, just add a step like the one below... Be sure to edit FILE_TO_COMMIT and DESTINATION_BRANCH to suit your needs.

@swinton
swinton / CODE.md
Created November 28, 2020 17:48
How to Enable Pasting Text on Sites That Block It

Re-enable copy and paste

var allowEvent = function(e) {
  e.stopImmediatePropagation();
  return true;
};
document.addEventListener('paste', allowEvent, true);
document.addEventListener('copy', allowEvent, true);
@swinton
swinton / IssueTimelineItemsConnection.graphql
Created November 13, 2020 14:05
GraphQL | IssueTimelineItemsConnection usage
{
resource(url: "https://github.com/microsoft/vscode/issues/10121") {
... on Issue {
url
title
timelineItems(first: 50, itemTypes: [CROSS_REFERENCED_EVENT]) {
edges {
node {
... on CrossReferencedEvent {
source {
@swinton
swinton / serve.sh
Created July 22, 2020 14:42
Run a local web server with Python
#!/bin/bash
# enable job control
set -m
port="${1:-8000}";
# start server, in background
python -m http.server $port &