- Always keep the code DRY for testability and separation of concerns
- Prefer modern idiomatic Python 3.13 and open source conventions, Leverage type hints, use CONST over hard coded strings
- Prioritize native Home Assistant libraries, like aiounifi, and other core capabilities to respect available resources and to avoid building duplicate fuctionality. Leverage the latest Home Assistant documentation.
- Diagnostics enabled for observability and debugging should be targeted, respecting the resources of the system
- When designing a new feature, prefer elegant solutions using established best practices and patterns.
- When fixing a problem or bug, avoid treating the symptom, look for the root cause.
- Details matter, ensure to always preserve existing functionality unless otherwise instructed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# proxy to vnc port | |
ngrok tcp --region=us --remote-addr=1.tcp.ngrok.io:99999 5900 | |
# or via Docker. Tunnel ports are random and will be specific to your tunnel | |
docker run -it -e NGROK_AUTHTOKEN=1232121212 ngrok/ngrok tcp 5900 --region=us --remote-addr=7.tcp.ngrok.io:99999 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.user.ollama</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/opt/homebrew/bin/ollama</string> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipelines: | |
# -- Automatically install Pipelines chart to extend Open WebUI functionality using Pipelines: https://github.com/open-webui/pipelines | |
enabled: true | |
# -- This section can be used to pass required environment variables to your pipelines (e.g. Langfuse hostname) | |
extraEnvVars: [] | |
tika: | |
# -- Automatically install Apache Tika to extend Open WebUI | |
enabled: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: set global environment variables | |
setx OLLAMA_ORIGINS "*" /m | |
setx OLLAMA_HOST "0.0.0.0" /m | |
:: install service via non-sucking service manager, confirm dialog | |
nssm install OllamaService "C:\Users\chris\AppData\Local\Programs\Ollama\ollama.exe" serve | |
:: start the service | |
net start OllamaService |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# to start | |
launchctl load ~/Library/LaunchAgents/com.user.ollama.plist | |
launchctl start com.user.ollama | |
# to stop | |
launchctl stop com.user.ollama | |
launchctl unload ~/Library/LaunchAgents/com.user.ollama.plist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://get.acme.sh | sh -s email=blog@chriskirby.net | |
# Source the installed script (or restart your terminal) | |
source ~/.bashrc # or source ~/.zshrc for macOS | |
# Export Cloudflare API Token | |
export CF_Token="your-cloudflare-api-token" | |
# Optional: Add this to your ~/.bashrc or ~/.zshrc to make it permanent | |
# Issue the certificate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import yaml | |
import sys | |
from datetime import datetime | |
import re | |
def clean_comment(comment): | |
"""Clean up comment by removing newlines and extra spaces.""" | |
if not comment: | |
return "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bind_host: 0.0.0.0 | |
bind_port: 3000 | |
# I recommend adding a user account, but this is optional | |
# requires hashed password htpasswd -B -n -b <USERNAME> <PASSWORD> | |
users: | |
- name: admin | |
password: XXXXXXXXXXXXXXXXXXXXXXXX | |
auth_attempts: 5 | |
block_auth_min: 15 | |
http_proxy: "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: | |
repository: adguard/adguardhome | |
pullPolicy: IfNotPresent | |
tag: latest | |
env: | |
TZ: America/Detroit | |
# customizing my web and dns services | |
# using the LoadBalancer to expose outside of the cluster |
NewerOlder