Skip to content

Instantly share code, notes, and snippets.

View charignon's full-sized avatar

Laurent Charignon charignon

View GitHub Profile
@charignon
charignon / LLM_GUIDE.md
Created December 14, 2025 21:21
Cherri Language Guide for LLMs - Teaching AI to write Apple Shortcuts

Cherri Language Guide for LLMs

Overview

Cherri is a programming language that compiles to Apple Shortcuts. When writing Cherri code, you're essentially creating iOS/macOS Shortcuts using a more traditional programming syntax.

Key Concepts

1. Basic Syntax

  • Comments: Use /* */ for block comments, // for line comments
  • Variables: Use @varName = value to declare variables
@charignon
charignon / Makefile
Created October 11, 2017 07:16
Makefile to simplify let's encrypt domain maintenance using lego, digital ocean spaces and dns
.PHONY: new renew upload download
ENDPOINT=--endpoint-url https://nyc3.digitaloceanspaces.com
AWS=aws ${ENDPOINT}
LEGO=lego --accept-tos --email xxx --dns digitalocean
S3_PATH="s3://domain-certificates/acme"
LOCAL_PATH=${PWD}/.lego
DOMAINS=`ls .lego/certificates | grep key | sed "s/.key$$//"`
new:
@$(if ${DOMAIN}, echo "Setting up ${DOMAIN}", echo "Please set DOMAIN env var" ; exit 1 )
@charignon
charignon / runbook.yaml
Created July 22, 2017 21:32
ansible runbook to set up digital ocean block storage
- name: Get the volume name
shell: ls /dev/disk/by-id/ | grep -v part
register: volume_name_raw
- set_fact:
volume_name: "{{ volume_name_raw.stdout }}"
- name: Check if the volume is already setup
command: grep '{{ volume_name }}' /etc/fstab -q
register: volume_present
# Script to query the numerous API
# make sure that your API key is set in the apikey file
import json
import os
import sys
import argparse
import requests
from termcolor import cprint