Skip to content

Instantly share code, notes, and snippets.

@scyto
scyto / proxmox.md
Last active May 8, 2024 20:16
proxmox cluster proof of concept

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

@karpathy
karpathy / min-char-rnn.py
Last active May 8, 2024 20:15
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@ad3m3r5
ad3m3r5 / proxmox-unprivileged-lxc-coral-usb.md
Last active May 8, 2024 20:14
USB Coral TPU Passthrough for Unprivileged LXC in Proxmox

This guide is how I got a Coral TPU (USB) working in an unprivileged LXC container.

At the end, you should be able to use the Coral TPU for inferencing inside of an unprivileged LXC container as well as Docker containers within the LXC, such as Frigate.

This does NOT require privileged LXC or docker container.

NOTES:

  • Proxmox Version: 8.1.10
  • LXC Container: Debian 10/11 (Example #1)
    • Debian 12 was used as the Docker host (Example #2)
@Gadgetoid
Gadgetoid / README.md
Last active May 8, 2024 20:12
Raspberry Pi 5 - All channels on pwm0
@vinthewrench
vinthewrench / testshunt.c
Created February 9, 2022 22:58
Using gattlib to read values from victron smart shunt bluetooth
/*
clang++ -Wall -o testshunt testshunt.c /usr/lib/libgattlib.so
*/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include "gattlib.h"
@wojteklu
wojteklu / clean_code.md
Last active May 8, 2024 20:04
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

using UnityEngine;
using System.Collections.Generic;
[RequireComponent(typeof(MeshRenderer))]
[RequireComponent(typeof(MeshFilter))]
public class GridMesh : MonoBehaviour
{
public int GridSize;
void Awake()
{
"version": 1,
"snippets": [
{
"version": 1,
"javascript": "const settings \u003d {\\r\\n chatGpt: {\\r\\n \\/\\/ replace with your ChatGPT API key created at https:\\/\\/platform.openai.com\\/api-keys\\r\\n apiKey: \\\u0027ENTER CHATGPT API KEY\\\u0027,\\r\\n\\r\\n \\/\\/ the OpenAI model to use\\r\\n model: \\\u0027gpt-4-turbo\\\u0027,\\r\\n },\\r\\n alsoAsked: {\\r\\n \\/\\/ replace with your AlsoAsked API key created at https:\\/\\/alsoasked.com\\/developer\\/keys\\r\\n apiKey:\\r\\n \\\u0027ENTER ALSOASKED API KEY\\\u0027,\\r\\n\\r\\n \\/\\/ the language to search in\\r\\n language: \\\u0027en\\\u0027,\\r\\n\\r\\n \\/\\/ the region to search in\\r\\n region: \\\u0027gb\\\u0027,\\r\\n\\r\\n \\/\\/ the depth of the search\\r\\n \\/\\/ 2 is the default and returns the smallest number of questions, and costs 1 credit\\r\\n \\/\\/ 3 is the maximum and returns the largest number of questions, but costs 4 credits\\r\\n depth: 2,\\r\\n\\r\\n
@stellanhaglund
stellanhaglund / Dockerfile
Created April 22, 2020 18:38
Assembly socket server
FROM alpine as builder
RUN apk add --no-cache build-base nasm
COPY . .
RUN nasm -f elf64 -o server.o server.s && ld server.o -o server
FROM alpine
COPY --from=0 /server /server
CMD /server $PORT