Skip to content

Instantly share code, notes, and snippets.

View arbal's full-sized avatar
👌
new Adaptor(this); // new Adaptor(_humans[].Behavior);

Arbal arbal

👌
new Adaptor(this); // new Adaptor(_humans[].Behavior);
  • Los Angeles, CA
  • 13:30 (UTC -07:00)
View GitHub Profile
@disler
disler / README.md
Created March 31, 2024 14:34
Use these Prompt Chains to build HIGH QUALITY AI Agents (Agentic Building Blocks)

Setup

  1. Create a new directory with these three files (requirements.txt, main.py, README.md)
  2. python -m venv venv
  3. source venv/bin/activate
  4. pip install -r requirements.txt
  5. python main.py
  6. Update main() to run the example prompt chains

Coral USB Accelerator on Debian 12 (Bookworm)

This installation is tested on a Raspberry Pi 4B with a fresh installation of Debian 12 Bookworm. It does not require manual recompiling any of the libraries or modules.

Update the packages to the latest version.

sudo apt update
sudo apt full-upgrade

Install pyenv

@montasaurus
montasaurus / llmc.sh
Last active April 20, 2024 21:32
AI Shell Command Generator
llmc() {
local system_prompt='Output a command that I can run in a ZSH terminal on macOS to accomplish the following task. Try to make the command self-documenting, using the long version of flags where possible. Output the command first enclosed in a "```zsh" codeblock followed by a concise explanation of how it accomplishes it.'
local temp_file=$(mktemp)
local capturing=true
local command_buffer=""
local first_line=true
local cleaned_up=false # Flag to indicate whether cleanup has been run
cleanup() {
# Only run cleanup if it hasn't been done yet
@skrashevich
skrashevich / beta-blueprint-svk.yaml
Last active February 4, 2024 17:54
Frigate Notifications (0.12.0.3-2)
blueprint:
name: Frigate Notifications (0.12.0.3-2)
description: |
## Frigate Notifications
This blueprint will send a notification to your device when a Frigate event for the selected camera is fired. The notification will initially include the thumbnail of the detection, but include an actionable notification allowing you to view the clip and snapshot.
With this blueprint, you may send the notification to multiple devices by leaving "Device" blank and instead use a [notification group][1].
### Software Version Requirements

Hyper-converged High Available Homelab with Proxmox

This is me documenting my journey moving my Homelab from a Qnap NAS and a Single host Proxmox server to a Hyper-converged multi-node Proxmox Cluster.

The reason to document it here is twofold:

  1. Information often it scattered 'all over the place', but never 100% applicable to the setup I have.
  2. To remember 'what the fuck' did I do some months ago.
  3. Writing it for 'a public' forces me to think it all through again and make sure it's correct.

It's written 'first to scratch my own itch' but hopefully it benefits others too, or even better, that others improve upon my implementations. Feel free to comment or share improvements and insights!

Mount Volumes into Proxmox VMs with Virtio-fs

Part of collection: Hyper-converged Homelab with Proxmox

Virtio-fs is a shared file system that lets virtual machines access a directory tree on the host. Unlike existing approaches, it is designed to offer local file system semantics and performance. The new virtiofsd-rs Rust daemon Proxmox 8 uses, is receiving the most attention for new feature development.

Performance is very good (while testing, almost the same as on the Proxmox host)

VM Migration is not possible yet, but it's being worked on!

Docker Swarm in LXC Containers

Part of collection: Hyper-converged Homelab with Proxmox

After struggling for some days, and since I really needed this to work (ignoring the it can't be done vibe everywhere), I managed to get Docker to work reliable in privileged Debian 12 LXC Containers on Proxmox 8

(Unfortunately, I couldn't get anything to work in unprivileged LXC Containers)

There are NO modifications required on the Proxmox host or the /etc/pve/lxc/xxx.conf file; everything is done on the Docker Swarm host. So the only obvious candidate who could break this setup, are future Docker Engine updates!

@joekrill
joekrill / docker-compose.yml
Last active April 8, 2024 04:53
Linkwarden Docker Compose
version: "3.9"
volumes:
postgres:
services:
postgres:
image: postgres
restart: unless-stopped
healthcheck:
@varunshenoy
varunshenoy / photoshop_gpt.py
Created June 21, 2023 01:28
PhotoshopGPT: Describe photo edits in natural language (via a prompt) and automatically apply corresponding enhancements using a combination of Instagram filters and PIL functions.
from opendream import opendream
from opendream.layer import Layer, ImageLayer, MaskLayer
import openai
import os
import json
from PIL import Image, ImageEnhance, ImageFilter
import pilgram
@opendream.define_op