Skip to content

Instantly share code, notes, and snippets.

View pokey's full-sized avatar

Pokey Rule pokey

View GitHub Profile
@pokey
pokey / row-number-syllables.md
Last active June 12, 2023 16:43
Syllable counts for numbers used with Cursorless `"row"` mark
Number Syllables Spoken form
1 1 "one"
2 1 "two"
3 1
4 1
5 1
6 1
7 2
8 1
From adee2792eb50cb800867130dae529c15c39817c4 Mon Sep 17 00:00:00 2001
From: Pokey Rule <755842+pokey@users.noreply.github.com>
Date: Wed, 12 Apr 2023 11:23:53 +0100
Subject: [PATCH] Initial failed typedoc 0.24.0 attempt
---
.../cursorless-org-docs/docusaurus.config.js | 2 +-
packages/cursorless-org-docs/package.json | 12 +-
packages/{cursorless-org-docs => }/typedoc.js | 11 +-
pnpm-lock.yaml | 564 ++++++++++++++----
@pokey
pokey / knip-output.txt
Created April 11, 2023 14:01
Output of running knip on Cursorless
➜ pnpm exec knip
Unused files (36)
.meta-updater/main.mjs
data/playground/javascript.js
data/playground/typescript.ts
data/playground/typescriptreacts.tsx
packages/cheatsheet-local/src/environments/environment.prod.ts
packages/cheatsheet-local/src/environments/environment.ts
packages/cheatsheet-local/src/polyfills.ts
packages/cheatsheet-local/src/webpack.config.ts
log.ts:401 TRACE [File Watcher (parcel)] [CHANGED] /Users/pokey/src/cursorless/packages/cursorless-vscode/src/scripts/populateDist/transformPackageJson.ts
log.ts:401 TRACE [File Watcher (parcel)] >> normalized [CHANGED] /Users/pokey/src/cursorless/packages/cursorless-vscode/src/scripts/populateDist/transformPackageJson.ts
@pokey
pokey / cursorless-talon-checkout-staging.sh
Last active March 24, 2023 16:39
Check out staging version of cursorless-talon associated with a PR
#!/usr/bin/env bash
set -euo pipefail
PR_NUMBER=$1
cd ~/.talon/user/cursorless-talon
git remote add staging git@github.com:cursorless-dev/cursorless-talon-staging.git
git fetch staging
git switch pr/$1
@pokey
pokey / 0001-DX-experiment-Import-auto-import-tests.patch
Created March 15, 2023 16:59
Cursorless monorepo DX experiments
From ce4f530318564957f13b3451412e9e8259e680a7 Mon Sep 17 00:00:00 2001
From: Pokey Rule <755842+pokey@users.noreply.github.com>
Date: Wed, 15 Mar 2023 15:48:56 +0000
Subject: [PATCH] [DX experiment] Import / auto-import tests
---
.../cursorless-engine/src/autoImportTest.ts | 17 ++++++++++
packages/cursorless-engine/src/importTest.ts | 34 +++++++++++++++++++
.../cursorless-vscode/src/autoImportTest.ts | 8 +++++
packages/cursorless-vscode/src/importTest.ts | 30 ++++++++++++++++
#!/usr/bin/env bash
# Given a commit sha (defaults to current commit), creates PRs for every
# branch on the stack of the given commit. Each PR is created with its base
# as the nearest ancestor of the given branch that is also a branch.
set -euo pipefail
commit="${1:-.}"
base="$(git config branchless.core.mainBranch)"
remote="origin"
@pokey
pokey / Welcome.py
Created July 9, 2022 14:24
Code used in Cursorless tutorial part II
def print_color(color, invert=False):
if invert:
print(invert_color(color))
else:
print(color)
def invert_color(color):
if color == "black":
return "white"
@pokey
pokey / merge-knausj-reformat.sh
Last active May 31, 2022 11:18
A bash script to merge the recent knausj reformat
# ============= Notes =====================
# This script contains the commands I ran to merge my Talon files (https://github.com/pokey/pokey_talon/)
# with the recent large reformat that took place in knausj (https://github.com/knausj85/knausj_talon/commit/3bf4882fa0a05b22171e59118bd7c9640aae753a)
# You can use this script for inspiration when you perform the merge on your own talon files.
# Note that this script is not meant to be run exactly; it is just a guideline.
# I'd recommend reading through and modifying each step to fit your individual setup
# Your mileage may vary
# ============= Initial setup =============
# Clone and cd into a fresh knausj just to use for the merge
@pokey
pokey / bulk-transfer-github-issues.sh
Last active January 12, 2022 16:23
Bulk transfer all github issues from one repo to another, keeping labels intact
#!/usr/bin/env bash
# Migrates all open issues from one repo to another, labeling them with the same labels, and adding a new label
#
# Assumes:
# - the target repo's labels are a superset of the source repo's
# - you have jq installed
# - you have gh installed
#
# Steps:
# 1. Change source_repo to your source repo,