Skip to content

Instantly share code, notes, and snippets.

View nextify2025's full-sized avatar

nextify nextify2025

View GitHub Profile
@adrienbrault
adrienbrault / llama2-mac-gpu.sh
Last active April 8, 2025 13:49
Run Llama-2-13B-chat locally on your M1/M2 Mac with GPU inference. Uses 10GB RAM. UPDATE: see https://twitter.com/simonw/status/1691495807319674880?s=20
# Clone llama.cpp
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
# Build it
make clean
LLAMA_METAL=1 make
# Download model
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin
@bouroo
bouroo / sse-worker.js
Last active October 6, 2025 11:40
example for cloudflare worker server-sent events
/**
* Cloudflare Worker for Server-Sent Events (SSE)
*
* This worker demonstrates how to set up an SSE endpoint
* that sends an initial message and then periodic updates.
*/
// Listen for incoming requests
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request));