Skip to content

Instantly share code, notes, and snippets.

View jamieparkinson's full-sized avatar
🤖

Jamie Parkinson jamieparkinson

🤖
View GitHub Profile
@jamieparkinson
jamieparkinson / one-task-per-host.sh
Created January 4, 2018 11:17
Run one task per host from CLI
nInstances=$(aws ecs list-container-instances --cluster ${CLUSTER_NAME} | jq -r '.containerInstanceArns | length')
aws ecs run-task \
--cluster ${CLUSTER_NAME} \
--task-definition ${TASK_NAME} \
--count ${nInstances} \
--placement-constraints type="distinctInstance"
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain <CA-cert>.pem
@jamieparkinson
jamieparkinson / esp-idf_clion_cmake_setup.md
Created August 17, 2019 14:59
ESP-IDF CLion/CMake setup

ESP-IDF CLion CMake setup

  1. Open project directory which contains a CMakeLists.txt
  2. Set environment variables (Settings > Build, Execution, Deployment > CMake):
    • Ensure IDF_PATH is present & correct
    • Ensure PATH includes xtensa-esp32-elf's bin directory ($IDF_TOOLS_PATH/tools/xtensa-esp32-elf/esp32-<version>/xtensa-esp32-elf/bin)
    • Add the python2.7 virtualenv's bin directory to PATH ($IDF_TOOLS_PATH/python_env/<version>/bin)
    • Add a PYTHONPATH variable pointing at the virtualenv's site-packages ($IDF_TOOLS_PATH/python_env/<version>/lib/python2.7/site-packages)
  3. Set the 'Generation path' to build

Keybase proof

I hereby claim:

  • I am jamieparkinson on github.
  • I am jamieparkinson (https://keybase.io/jamieparkinson) on keybase.
  • I have a public key ASAJRZ7XugR-fWquLx2I2GcQr-L5OvsfFHWpQZAobo_5oAo

To claim this, I am signing this object:

@jamieparkinson
jamieparkinson / recipe.md
Last active April 29, 2022 09:38
Chilli oil

Chilli oil (Sichuan-ish)

Ingredients

  • 1L sunflower oil
  • ~140g Korean chilli flakes (best substitute for erjiangtao colour)
  • ~50g other dried chillis, a mix of grinds from very coarse to very fine
  • Maybe half a cup (?) sesame seeds
  • ~5 star anise
  • ~8 green cardamom
  • 2 cao guo, halved
@jamieparkinson
jamieparkinson / jupytenv.sh
Created May 19, 2020 09:55
Create a Jupyter kernel using a virtualenv
#!/usr/bin/env bash
set -e
VIRTUALENVS_DIR=${WORKON_HOME:-$HOME/.virtualenvs}
if [ -z "$1" ]; then
echo "Please specify an environment name!"
exit -1
fi
ENV_NAME=$1
@jamieparkinson
jamieparkinson / tf-idf-things.json
Last active September 30, 2020 11:09
TF-IDF per-field document frequency proof
PUT tf-idf-test
PUT tf-idf-test/_mapping
{
"properties": {
"thing": {
"type": "text"
},
"secret": {
"type": "text"
@jamieparkinson
jamieparkinson / shingara.md
Last active October 3, 2020 21:01
Phulkopi'r Shingara recipe transcription
@jamieparkinson
jamieparkinson / desiderata.md
Created October 7, 2020 13:55
Ingest/merger versioning

Desired behaviour for ingest versioning

Works

Given a work already in the index:

  • The same work with a higher transformer version always overrides it
  • The same work with the same transformer version and more sources merged in overrides it
  • The same work with the same transformer version which have been unlinked from some/all sources overrides it
  • The same work with the same transformer version which has been redirected overrides it
@jamieparkinson
jamieparkinson / pizza_dough.md
Last active January 2, 2021 15:04
Pizza dough

Pizza dough

Based on Vaughn Tan's recipe plus general thoughts absorbed from reading stuff online. Makes 2 balls for 2 11"-12" pizzas.

Flour (320g)

  • 40% 00 (128g) [cumulative 128g]
  • 25% strong white (80g) [208g]
  • 30% stoneground white (96g) [304g]
  • 5% wholemeal/heritage (16g) [320g]