Skip to content

Instantly share code, notes, and snippets.

View example.sarif.json
"version": "2.1.0",
"$schema": "",
"runs": [
"tool": {
"driver": {
"name": "Brakeman",
"informationUri": "",
"semanticVersion": "4.10.0",


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 /
Created Dec 3, 2020
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 /
Last active Dec 3, 2020
Automatically sign your commits from GitHub Actions, using the REST API

Verified commits made easy with GitHub Actions


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 /
Created Nov 28, 2020
How to Enable Pasting Text on Sites That Block It

Re-enable copy and paste

var allowEvent = function(e) {
  return true;
document.addEventListener('paste', allowEvent, true);
document.addEventListener('copy', allowEvent, true);
swinton / IssueTimelineItemsConnection.graphql
Created Nov 13, 2020
GraphQL | IssueTimelineItemsConnection usage
View IssueTimelineItemsConnection.graphql
resource(url: "") {
... on Issue {
timelineItems(first: 50, itemTypes: [CROSS_REFERENCED_EVENT]) {
edges {
node {
... on CrossReferencedEvent {
source {
swinton /
Created Jul 22, 2020
Run a local web server with Python
# enable job control
set -m
# start server, in background
python -m http.server $port &
swinton / macos-defaults
Created Apr 3, 2020
defaults read -g | pbcopy
View macos-defaults
AKDeviceUnlockState = 0;
AKLastCheckInAttemptDate = "2020-04-03 14:54:49 +0000";
AKLastCheckInSuccessDate = "2020-04-03 14:54:51 +0000";
AKLastEmailListRequestDateKey = "2020-03-03 16:56:46 +0000";
AKLastIDMSEnvironment = 0;
"Apparent Doxie Go" = 1;
"Apple Inc. Apple Mobile Device (Recovery Mode)" = 1;
"Apple Inc. Apple TV Remote" = 1;
"Apple Inc. Magic Trackpad 2" = 1;
View pull_request-event-payload.json
"event": "pull_request",
"payload": {
"action": "synchronize",
"number": 1,
"pull_request": {
"url": "",
"id": 380337778,
"node_id": "MDExOlB1bGxSZXF1ZXN0MzgwMzM3Nzc4",
"html_url": "",
View push-event-payload.json
"event": "push",
"payload": {
"ref": "refs/heads/some-branch",
"before": "a23a73088bb8d69c89abcfece9a91d4e539aed7e",
"after": "52f7e61280c44756691959a11e6970bf153c8ba6",
"repository": {
"id": 243290722,
"node_id": "MDEwOlJlcG9zaXRvcnkyNDMyOTA3MjI=",
"name": "Spoon-Knife",