Skip to content

Instantly share code, notes, and snippets.

@alec-pinson
alec-pinson / status-widget.yaml
Created April 10, 2025 17:16
My home assistant 'dynamic alert template' that I use on my phone and home assistant dashboard.
<p style="text-align: start">
{%- if states('input_boolean.holiday_mode') == "on" -%}
{#- Holiday Mode -#}
🇬🇧 {{ now().timestamp() | timestamp_custom('%I:%M %p') }}<br>
{%- else %}
{#- Not Holiday Mode -#}
{#- Shell Home/Away -#}
{# {%- if states('person.shell') != "home" %}
👰 Away ({{ relative_time(states.person['shell'].last_changed) }} ago)<br> #}
{# {%- else %}
@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 February 27, 2025 23:27
Ansible playbook for installing Letta with an external pgvector database
---
- name: Install Letta Server with Docker
hosts: all
become: true
vars:
letta_data_dir: /opt/letta/data
postgres_password: ""
anthropic_api_key: ""
mistral_api_key: ""
postgres_host: ""
@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:
@Kishi85
Kishi85 / nft2ipset
Created May 17, 2024 07:44
/etc/init.d/nft2ipset: An nftables set to ipset synchronizer for use with OpenWRT/mwan3
#!/bin/sh /etc/rc.common
# Start before firewall and mwan3 which are at Prio 19
START=18
APP=nft2ipset
USE_PROCD=1
SCRIPTPATH="/tmp/nft2ipset"
write_script() {
cat > "$1" <<'EOT'
#!/bin/sh
@MaggieFero
MaggieFero / altmilkpairing.md
Created April 25, 2024 21:04
AltMilks: A Pairing Decision

As a diverse array of alt-milks continues to proliferate, I'm seeing more and more questions about "which is the best altmilk." As with nearly-any question someone might end up answering on GitHub, my answer is that it depends. Some amount depends on personal flavor preferences. I think that more of this than you might expect, though, is a matter of pairing.

Background

First, why do I have so many opinions on alt milks. I have tried all of:

  • rice milk
  • oat milk
  • sesame milk
  • walnut milk
  • macadamia nut milk
  • coconut milk
@schacon
schacon / better-git-branch.sh
Created January 13, 2024 18:41
Better Git Branch output
#!/bin/bash
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
NO_COLOR='\033[0m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
NO_COLOR='\033[0m'
@scyto
scyto / proxmox.md
Last active April 24, 2025 23:59
my proxmox cluster

ProxMox Cluster - Soup-to-Nutz

aka what i did to get from nothing to done.

note: these are designed to be primarily a re-install guide for myself (writing things down helps me memorize the knowledge), as such don't take any of this on blind faith - some areas are well tested and the docs are very robust, some items, less so). YMMV

Purpose of Proxmox cluster project

Required Outomces of cluster project

@vaurora
vaurora / block_personal_appts
Last active March 29, 2023 15:11 — forked from ttrahan/block_personal_appts
Google Apps Script to automatically create, edit and delete events on work calendar for personal calendar events. Instructions on how to set up can be found at https://medium.com/@willroman/auto-block-time-on-your-work-google-calendar-for-your-personal-events-2a752ae91dab
function sync() {
// CHANGE - id(s) of the secondary calendar to pull events from
// If you have more than one calendar, use the form ["XXXXXX", "YYYYY"]
var ids=["XXXXXXXXXX"];
var today=new Date();
var enddate=new Date();
enddate.setDate(today.getDate()+7); // how many days in advance to monitor and block off time
@ghuntley
ghuntley / configuration.nix
Last active May 6, 2023 16:27
ghuntley-net
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, lib, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
];