Skip to content

Instantly share code, notes, and snippets.

View wsargent's full-sized avatar

Will Sargent wsargent

View GitHub Profile
@wsargent
wsargent / win10-dev.md
Last active November 16, 2025 14:24
Windows Development Environment for Scala

Windows 10 Development Environment for Scala

This is a guide for Scala and Java development on Windows, using Windows Subsystem for Linux, although a bunch of it is applicable to a VirtualBox / Vagrant / Docker subsystem environment. This is not complete, but is intended to be as step by step as possible.

Harden Windows 10

Read the entire Decent Security guide, and follow the instructions, especially:

@wsargent
wsargent / docker_cheat.md
Last active September 23, 2025 16:14
Docker cheat sheet
### Task:
Respond to the user query using the provided context, incorporating inline citations in the format [source_id] **only when the <source_id> tag is explicitly provided** in the context.
### Guidelines:
- If you don't know the answer, clearly state that.
- If uncertain, ask the user for clarification.
- Respond in the same language as the user's query.
- If the context is unreadable or of poor quality, inform the user and provide the best possible answer.
- If the answer isn't present in the context but you possess the knowledge, explain this to the user and provide the answer using your own understanding.
- **Only include inline citations using [source_id] when a <source_id> tag is explicitly provided in the context.**
@wsargent
wsargent / jupyter_lab_config.py.j2
Last active March 14, 2025 03:09
Ansible playbook for installing Jupyter with miniconda and notebook_intelligence
---
- name: Provision JupyterLab on a VM
hosts: all
become: yes
vars_files:
- vars/main.yml
pre_tasks:
- name: Install system dependencies
import_tasks: tasks/system_deps.yml
@wsargent
wsargent / config.yaml.j2
Last active March 11, 2025 22:55
LiteLLM install with ansible playbook
# https://docs.litellm.ai/docs/proxy/configs
# https://docs.litellm.ai/docs/proxy/quickstart
model_list:
# https://docs.lambdalabs.com/public-cloud/lambda-inference-api/#listing-models
- model_name: hermes3-70b
litellm_params:
model: openai/hermes3-70b
api_key: "os.environ/OPENAI_API_KEY"
api_base: "os.environ/OPENAI_API_BASE"
@wsargent
wsargent / playbook.yml
Last active March 10, 2025 15:13
pgvector install for letta
---
- hosts: all
become: true
vars:
postgres_version: "16"
postgres_password: ""
tasks:
- name: Install required packages
apt:
name:
import json
import requests
import os
# https://schema.org/Recipe
def create_recipe_from_arguments(name: str,
directions: str,
ingredients: str,
author: str = "",
cook_time: str = "10m",
@wsargent
wsargent / find_recipes_in_mealie.py
Last active March 3, 2025 23:08
Find recipes in mealie
import requests
import os
from urllib.parse import urljoin
def find_recipes_in_mealie(
searchTerm: str,
categories_csv: str = None,
tags_csv: str = None) -> str:
"""
@wsargent
wsargent / read_mealplans.py
Created March 1, 2025 21:30
Read meal plans from Mealie
import requests
import datetime
import json
import os
def read_mealplans(start_date: str = None, end_date: str = None):
"""
Reads the meal plans from Mealie and returns it as a string.
Parameters
@wsargent
wsargent / update_recipe_categories.py
Created March 1, 2025 21:28
Update recipe categories in Mealie
import re
import requests
import os
import json
import logging
#logging.basicConfig(level=logging.DEBUG)
def update_recipe_categories(recipe_slug: str, categories_csv: str) -> None: