Skip to content

Instantly share code, notes, and snippets.

@WomB0ComB0
WomB0ComB0 / reusable-providers.tsx
Created January 10, 2025 00:06
A reusable providers component that almost eliminates the need for context API
'use client';
import type { JSXElementConstructor, ReactNode } from 'react';
type InferProps<T> = T extends JSXElementConstructor<infer P> ? P : never;
type ProviderWithProps<T extends JSXElementConstructor<unknown>> = [
T,
Omit<InferProps<T>, 'children'>
];
@hkfuertes
hkfuertes / proxmox_alpine_lxc_ollama_igpu.md
Last active January 13, 2025 18:14
Alpine LXC Container with iGPU Ollama Server on Proxmox

How to setup an LXC container with AMD iGPU (Ryzen 7 5800H) passthrougth for Ollama in Proxmox

Proxmox

First we need to install the Alpine LXC, the easiest way is to use Proxmox Helper scripts: https://tteck.github.io/Proxmox/

bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/alpine.sh)"

I would install in "advance" mode and be generous with the resources (8-16 cores, 16G ram, 128GB disk)

@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active January 13, 2025 18:14
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@stefancocora
stefancocora / phoronix-cmd.md
Created October 16, 2019 18:59 — forked from anshula/phoronix-cmd.md
Phoronix Test Suite Cheat Sheet
@erikcorry
erikcorry / mbedtls-errors.txt
Created October 23, 2020 14:35
Mbed TLS error codes
High level error codes
0x1080 PEM - No PEM header or footer found
0x1100 PEM - PEM string is not as expected
0x1180 PEM - Failed to allocate memory
0x1200 PEM - RSA IV is not in hex-format
0x1280 PEM - Unsupported key encryption algorithm
0x1300 PEM - Private key password can't be empty
0x1380 PEM - Given private key password does not allow for correct decryption
0x1400 PEM - Unavailable feature, e.g. hashing/encryption combination
@Specht2010
Specht2010 / ULUS10509.ini
Created July 5, 2019 01:30
Peace Walker Right Analog Cheat File
_S ULUS-10509
_G Metal Gear Solid: Peace Walker
_C1 Right Analog Aim
_L 0xE052A964 0x00075084
_L 0x2000100C 0x340A0020
// ^change 20 on the end of the line above for deadzone anything from 01 to maybe up to 40 will work(definitely set to 01 when using with mouse control)
// also affects maximum camera speed
_L 0x20001020 0x3C0E3F80
// ^change 3F80 for camera speed multiplier, it's first 4 digit of floating point
// default 3F80 == 0x3F800000 == 1.0
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active January 13, 2025 18:12
Conventional Commits Cheatsheet

Conventional Commit Messages starline

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@yhatt
yhatt / diagrams.md
Last active January 13, 2025 18:12
Marp diagram plugin example (Powered by kroki.io)
marp theme
true
default

Marp diagram plugin example

Powered by kroki.io

@cwgem
cwgem / build_guide.md
Last active January 13, 2025 18:12
Building `dockerd` and `docker-cli` from source

Introduction

This guide looks at what it will take to build dockerd and docker-cli from source with Ubuntu. Ubuntu was chosen as the OS as it uses the same apt-get calls the standard Dockerfile method uses making the experience a bit more seamless. While the official method is building docker in a container, here are some reasons why you may want to build this way:

  • Custom source modifications for testing
  • System that does not yet have a docker(d) binary release
  • You want to test things on a non-standard toolchain
  • You just want to deep dive

As you can probably tell using this method means you're delving away from support. Please don't file issues/PRs unless you can reproduce in the official build environment. In fact unless you really have one of the strong needs above you're better off building off a container since this guide is mostly a lot of copy/paste from the Dockerfile used in the official build system.

@sam016
sam016 / AllGattCharacteristics.java
Last active January 13, 2025 18:11
Bluetooth GATT Services & Characteristics
package com.sam016.vsflatomation.service.ble;
import java.util.HashMap;
import java.util.UUID;
public class AllGattCharacteristics {
private static HashMap<String, String> attributes = new HashMap();
static {
attributes.put("00002a00-0000-1000-8000-00805f9b34fb", "Device Name");