Skip to content

Instantly share code, notes, and snippets.

View 524c's full-sized avatar

Roger 524c

  • Brazil
  • 16:07 (UTC -03:00)
  • X @0x524c
View GitHub Profile
@ubergarm
ubergarm / DeepSeek-R1-Quantized-GGUF-Gaming-Rig-Inferencing-Fast-NVMe-SSD.md
Last active April 17, 2025 16:55
Run DeepSeek R1 671B unsloth GGUF locally with ktransformers or llama.cpp on high end gaming rig!

tl;dr;

UPDATE Mon Mar 10 10:51:31 AM EDT 2025 Check out the newer ktransformers guide for how to get it running faster! About 3.5 tok/sec on this same gaming rig. Big thanks to Supreeth Koundinya with analyticsindiamag.com for the article!

You can run the real deal big boi R1 671B locally off a fast NVMe SSD even without enough RAM+VRAM to hold the 212GB dynamically quantized weights. No it is not swap and won't kill your SSD's read/write cycle lifetime. No this is not a distill model. It works fairly well despite quantization (check the unsloth blog for details on how they did that).

The basic idea is that most of the model itself is not loaded into RAM on startup, but mmap'd. Then kv cache will take up some RAM. Most of your system RAM is left available to serve as disk cache for whatever experts/weights are currently most u

@danpetitt
danpetitt / esmodules.md
Last active April 16, 2025 08:52
Typescript, Jest and ECMAScript Modules

Typescript, Jest and ECMAScript Modules (ESM)

Package.json

Add the type property to package.json to ensure modules are supported:

{
  "type": "module",
}
@aradalvand
aradalvand / DockerfileForSvelteKit.md
Last active March 16, 2025 13:26
Dockerfile and .dockerignore for SvelteKit:

*This Dockerfile is intended for SvelteKit applications that use adapter-node. So, the Dockerfile below assumes that you have already installed and configured the adapter.

Dockerfile:

FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json .
RUN npm ci
COPY . .
RUN npm run build
// Core assets
let coreAssets = [];
// On install, cache core assets
self.addEventListener('install', function (event) {
// Cache core assets
event.waitUntil(caches.open('app').then(function (cache) {
for (let asset of coreAssets) {
cache.add(new Request(asset));
Creating the license
--------------------------------------------------------------------------
UPDATE!!! - https://monokai-keygen-nu.vercel.app/
use the above link to auto generate the keys and use it on the go! hurray!!
--------------------------------------------------------------------------
Monokai Pro requires an email to purchase a license, so we're going to need one here. I'm going to use a placeholder address: [email protected].
Sublime Text 3 -
Take your email address and get the MD5 hash of it; you can use a website like https://www.md5hashgenerator.com/ for this. My test email comes out with 5658ffccee7f0ebfda2b226238b1eb6e or use https://monogen.vercel.app/.
@jakexks
jakexks / cert-manager-test.sh
Last active September 29, 2024 17:48
Cert-manager selfsigned as cluster issuer
#!/usr/bin/env bash
set -ex
export TEST_CLUSTER_NAME=quick-test
export CERT_MANAGER_VERSION=v1.3.1
export KIND_IMAGE=kindest/node:v1.20.2
# Create test cluster
echo "Creating test cluster..."
kind create cluster --name="$TEST_CLUSTER_NAME" --image="$KIND_IMAGE"
until kubectl --timeout=120s wait --for=condition=Ready pods --all --namespace kube-system; do sleep 1; done
@acoyfellow
acoyfellow / hooks.js
Last active February 12, 2023 01:22
hooks.js CSP example
// https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
// https://scotthelme.co.uk/content-security-policy-an-introduction/
// scanner: https://securityheaders.com/
const rootDomain = `your-domain.com`; // or your server IP for dev
const directives = {
'img-src': [
"*",
"'self'",
@sttk
sttk / javascript-prototype-pollution.md
Last active April 7, 2023 15:13
Javascript Prototype Pollution

Javascript Prototype Pollution

Javascript prototype specification

// Not only Object but also other types. (Function, Array, String, Number, ...)
Object.prototype.prop1 = 1;
Object.prototype.func1 = () => 'Hello!';                                        

const obj1 = {};
@lucaguada
lucaguada / RASPBERRY_PI_4.md
Last active January 5, 2025 12:02
Steps to fully install Ubuntu Server and MiniKube on Raspberry Pi 4 (wip)

How to install Ubuntu Server and Minikube on Raspberry Pi 4 4GB+ (recommended)

Disclaimer: this step-by-step GIST has been created with no guarantees, I may have missed some steps because of distraction or chiptune improvised on-chair-dancing, so be patient and let me know if I must add or fix something.

This is the way for living long and prospering!

Download Raspberry Pi Imager

Download and install Raspberry Imager: https://www.raspberrypi.org/software/