Skip to content

Instantly share code, notes, and snippets.

View TimothyJones's full-sized avatar

Timothy Jones TimothyJones

View GitHub Profile
@TimothyJones
TimothyJones / keybindings.json
Created April 10, 2026 02:00
Soft returns in Claude (~/.claude/keybindings.json)
{
"$schema": "https://www.schemastore.org/claude-code-keybindings.json",
"$docs": "https://code.claude.com/docs/en/keybindings",
"bindings": [
{
"context": "Chat",
"bindings": {
"shift+enter": "chat:newline"
}
}
@TimothyJones
TimothyJones / keybindings.json
Created April 10, 2026 01:59
Soft returns in Claude (
{
"$schema": "https://www.schemastore.org/claude-code-keybindings.json",
"$docs": "https://code.claude.com/docs/en/keybindings",
"bindings": [
{
"context": "Chat",
"bindings": {
"shift+enter": "chat:newline"
}
}
@TimothyJones
TimothyJones / SKILL.md
Created April 10, 2026 01:17
Update-docs skill
name update-docs
description Sync the architecture docs in /docs/ with recent code changes. Use when invoked manually as /update-docs, and automatically at the end of any turn that modified files under tlseal-fe/ or tlseal-be/. Inspects the diff vs main, decides which doc files are affected, and edits only those.

update-docs

Keep /docs/ in sync with code changes in tlseal-fe/ and tlseal-be/.

Doc files and their scope

@TimothyJones
TimothyJones / handover-documentation-checklist.md
Last active May 22, 2026 02:44
Handover documentation checklist

Handover documentation

Here's a list of things I find useful to check off when writing handover documentation for source code.

General sanity checks

These get checked at the end, but they're at the front of the document because they're good to keep in mind the whole time

  • Do these instructions work cross-platform? If not, which platform do they work on?
  • If the source of truth is not this document, should some of the questions be answered with links (to eg confluence/other repos)
@TimothyJones
TimothyJones / semver-from-git.sh
Created May 8, 2020 07:20
Short bash script that figures out the semver from your git tags, plus some useful context when not on a tag
#!/bin/bash -eu
# This script prints out git metadata information for a given commit (or head by default)
# It assumes tags of the form `v1.2.3`, and will print prerelease versions when
# not on an exact tag.
#
# It is intended to be used like so:
#
# cd <some-git-repo>
# $(../semver-from-git.sh)
@TimothyJones
TimothyJones / getDecryptedEnv.js
Last active September 4, 2022 04:38
A javascript module that demonstrates decrypting some KMS-encrypted environment variables
const AWS = require('aws-sdk');
const encryptedEnvironmentVariableNames = ['SOME_VARIABLE', 'SOME_OTHER_VARIABLE'];
// This module exports a function that returns a promise for obtaining
// a decrypted copy of the environnment.
//
// Configure it by putting the name of each environment variable you would like to
// decrypt above.
//
@TimothyJones
TimothyJones / ssm-kms-put-parameter.sh
Created August 30, 2019 05:29
Example script for putting KMS-encrypted parameters into SSM as plain strings
#!/bin/bash -eu
# (C) Timothy Jones
# This function prints the usage
function usage {
{
echo "Usage:"
echo " ${BASH_SOURCE[0]} <NAME> <VALUE> <KEY_ID>"
echo " NAME - the name of the SSM variable"
@TimothyJones
TimothyJones / KMS-decrypt-example.js
Created August 30, 2019 04:47
Example showing a simple promisified decryption of a KMS encrypted string
const decrypt = data =>
new Promise((resolve, reject) =>
kms.decrypt(
{
CiphertextBlob: Buffer.from(data, 'base64')
},
(err, data) => {
if (err) {
reject(err);
} else {
@TimothyJones
TimothyJones / getSsmConfig.js
Created August 28, 2019 04:44
Example showing a promisified SSM config reader for SecureString parameters
const AWS = require('aws-sdk');
const ssm = new AWS.SSM();
const configFeatures = {
'/path/to/your/config/option': 'someOption',
'/path/to/your/config/something_else': 'somethingElse'
};
const getConfig = () =>
@TimothyJones
TimothyJones / robust-bash.sh
Last active January 29, 2021 14:30
These are (currently) the only functions I recommend porting around when writing bash scripts
#!/bin/bash -eu
if [ -z "${LIB_ROBUST_BASH_SH:-}" ]; then
LIB_ROBUST_BASH_SH=included
function error {
echo "Error: ${1:-}"
}
# Check to see that we have a required binary on the path
function require_binary {