Skip to content

Instantly share code, notes, and snippets.

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 March 25, 2024 03:56
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 &
@swinton
swinton / macos-defaults
Created April 3, 2020 15:11
defaults read -g | pbcopy
{
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;
{
"event": "pull_request",
"payload": {
"action": "synchronize",
"number": 1,
"pull_request": {
"url": "https://api.github.com/repos/swinton/Spoon-Knife/pulls/1",
"id": 380337778,
"node_id": "MDExOlB1bGxSZXF1ZXN0MzgwMzM3Nzc4",
"html_url": "https://github.com/swinton/Spoon-Knife/pull/1",