Skip to content

Instantly share code, notes, and snippets.

View erquhart's full-sized avatar

Shawn Erquhart erquhart

  • USA
View GitHub Profile
@erquhart
erquhart / selection-command.js
Last active February 29, 2024 10:31
Text selection commands for Cypress.io
/**
* Credits
* @Bkucera: https://github.com/cypress-io/cypress/issues/2839#issuecomment-447012818
* @Phrogz: https://stackoverflow.com/a/10730777/1556245
*
* Usage
* ```
* // Types "foo" and then selects "fo"
* cy.get('input')
* .type('foo')
@erquhart
erquhart / observeStyles.js
Last active July 11, 2019 15:48
Parse stylesheets over time, Eg. for detecting CodeMirror themes dynamically.
import { uniq, reduce, map, filter, debounce, sortBy, difference } from 'lodash';
/**
* Watches for new stylesheets for a period of time, returns a unique list of
* pattern match captures from CSS selectors. Designed to handle a single
* capture group per match, so the resulting array of matches will always be
* strings. The observer is a singleton, callers should pass callbacks that will
* be called when new matches are found. Uses `MutationObserver` to watch for
* stylesheets in the document head. Accepts RegExp `pattern` and an options
* hash for `debounceLength`/`lifespan` in milliseconds, defaulting to 5000 and
@erquhart
erquhart / staticgen-archive.json
Last active February 10, 2020 21:51
STATICGEN.COM DATA ARCHIVE
[[1581371477076,[{"id":"ace","s":37,"fk":6,"i":0},{"id":"acrylamid","s":284,"fk":41,"i":43},{"id":"adm-dev-kit","s":29,"fk":4,"i":11},{"id":"amsf","s":247,"fk":142,"i":12},{"id":"anodize","s":4,"fk":0,"i":1},{"id":"antora","f":633,"s":225,"fk":86,"i":165},{"id":"antwar","s":461,"fk":32,"i":7},{"id":"asimov-static","s":4,"fk":3,"i":0},{"id":"assemble","s":3759,"fk":264,"i":29},{"id":"awestruct","s":269,"fk":81,"i":54},{"id":"bake","s":32,"fk":7,"i":0},{"id":"bakeit","s":2,"fk":2,"i":1},{"id":"baker","s":41,"fk":7,"i":1},{"id":"bang","s":8,"fk":1,"i":0},{"id":"bashblog-ng","s":13,"fk":3,"i":0},{"id":"bashblog","s":905,"fk":147,"i":22},{"id":"blackhole","s":112,"fk":10,"i":1},{"id":"blacksmith","s":564,"fk":42,"i":27},{"id":"blended","s":16,"fk":2,"i":2},{"id":"blo","s":9,"fk":4,"i":1},{"id":"blog.sh","s":8,"fk":1,"i":0},{"id":"blogc","s":122,"fk":9,"i":3},{"id":"blogdown-r","s":1079,"fk":248,"i":13},{"id":"blogdown","s":17,"fk":1,"i":9},{"id":"blogo","s":16,"fk":6,"i":5},{"id":"blogofile","s":336,"fk":89,"i":45
@erquhart
erquhart / 1-setup.md
Created October 30, 2023 20:52 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS

Methods of Signing with a GPG Key on MacOS

Last updated September 21, 2022

This Gist explains how to do this using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

There has been a number of comments on this gist regarding some issues around the pinentry-program and M1 Macs. I've finally gotten a chance to try things out on an M1 and I've updated the documentation in 2-using-gpg.md to reflect my findings.