Skip to content

Instantly share code, notes, and snippets.

@usrbinkat
usrbinkat / README.md
Last active May 10, 2025 19:14
Ollama + Open-Webui + Nvidia/CUDA + Docker + docker-compose

image

UPDATE: This is tested and working on both Linux and Windows 11 used for LlaMa & DeepSeek

Here's a sample README.md file written by Llama3.2 using this docker-compose.yaml file that explains the purpose and usage of the Docker Compose configuration:

ollama-portal

A multi-container Docker application for serving OLLAMA API.

"""
DISCLAIMER: This is a quick prototype, it's not at all tested, and may be deeply cryptographically flawed.
Normally, JSON canonicalization is at least O(nlogn), because you need to sort the map keys.
This approach avoids the need to do that, and in theory it's O(n), but in practice it's probably slower for most inputs... I have not benchmarked.
If you limit recursion depth, you could implement it as an Online Algorithm https://en.wikipedia.org/wiki/Online_algorithm
NB: Python's JSON parser allows duplicate map keys, which this impl will be oblivious to.
@GregorB54321
GregorB54321 / hdd-state
Created April 18, 2025 20:45
getting HDD's spin state
#!/usr/bin/bash
DRIVE_ID[0]=/dev/disk/by-id/wwn-0x50014ee2ae42a608 # 2TB Disk model: WDC WD20EADS-00S
DRIVE_ID[1]=/dev/disk/by-id/wwn-0x50014ee20a7836a8 # 4TB Disk model: WDC WD40EZRX-00S
DRIVE_ID[2]=/dev/disk/by-id/wwn-0x5000c500b1841369 # 8TB Disk model: ST8000NM0055-1RM
DRIVE_ID[3]=/dev/disk/by-id/wwn-0x5000c500b1844fe1 # 8TB Disk model: ST8000NM0055-1RM
DRIVE_ID[4]=/dev/disk/by-id/wwn-0x5000c500b185901f # 8TB Disk model: ST8000NM0055-1RM
for DRIVE_NUM in "${!DRIVE_ID[@]}"; do # init some variables
DRIVE_STATE_OLD[$DRIVE_NUM]=""
import System.Random
import Data.String
record Game where
constructor MkGame
answer : Nat
tries : Nat
Show Game where
show (MkGame answer tries) = "Game (answer = \{show answer}, tries = \{show tries})"

Pull images

podman pull <image-name>

Example: podman pull docker.io/library/ubuntu:22.04


Create container

@Klerith
Klerith / instalaciones-database.md
Last active May 10, 2025 19:09
Instalaciones necesarias para el curso de base de datos
@justinvanwinkle
justinvanwinkle / broken.py
Last active May 10, 2025 19:08
Every python rate-limiting library (that I can find) is broken, at least a little.
# I was looking for a rate limiting library to call rate limited apis as closely
# as possible to their enforced limits. I looked at the first few python libraries
# that I found, and when I glanced at the source, they were all clearly broken.
# Curious how this could be, I took all the top google and pip search results for: python rate limiting
# and tried to get them to do the wrong thing and fail to rate limit in situations that could come up
# in normal use (though in some cases very specific use)
# https://github.com/tomasbasham/ratelimit
# Where broken:
#define STEP 12
void setup() {
// 200 step per revolution motor driver on this pin.
pinMode(STEP, OUTPUT);
}
void topSpeed_1Turn() {
for (int i = 0; i < 200; i++) {
// Issue 1 step.

Hyper Agent Protocol (HAP) - An Overview

What is HAP?

The Hyper Agent Protocol (HAP) is a new, simplified standard for how software "agents" (or any automated services and capabilities) communicate with each other over the web. Imagine a universal way for different software components to discover what other components can do and then ask them to do it, all using standard web technologies.

The goal of HAP is to make it much easier to build flexible, interoperable systems where different services, tools, or AI agents can work together seamlessly, regardless of how they are built internally.

Core Idea: Every Capability has a Web Address (URI)

@kasparsd
kasparsd / wp-adv-admin-handbook.md
Last active May 10, 2025 19:01
WordPress handbooks as a single markdown file for LLMs (source https://developer.wordpress.org)

Advanced Administration Handbook

Source: https://developer.wordpress.org/advanced-administration/

Welcome to the WordPress Advanced Administration Handbook! Here you will find WordPress advanced documentation. Use the “Contents” menu on the left to navigate topics.

Why Advanced Administration?

Not all users who use WordPress have to know about technology, and therefore in its documentation should not appear either, and developers do not have to know certain advanced system configurations.