Skip to content

Instantly share code, notes, and snippets.

View sharms's full-sized avatar

Steve Harms sharms

View GitHub Profile
@stathissideris
stathissideris / core.clj
Last active November 26, 2020 22:26
Basic Clojure example for Skija
(ns skija.core
(:import [org.jetbrains.skija Canvas Surface Paint Color4f
EncodedImageFormat]
[java.nio.file Path Files OpenOption]))
(defn write-bytes [#^bytes b path]
(Files/write (Path/of "output.png" (make-array String 0)) b (make-array OpenOption 0)))
(defn show []
(let [surface (Surface/makeRasterN32Premul 100 100)
@orhun
orhun / arch_linux_installation.md
Last active May 22, 2024 19:59
Notes on my Arch Linux installation: UEFI/Secure Boot + systemd-boot, LUKS-encrypted root (XFS), LUKS-encrypted swap (with hibernate & unlocked via TPM)
@adrienbrault
adrienbrault / llama2-mac-gpu.sh
Last active April 22, 2024 08:47
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
@dhh
dhh / linux-setup.sh
Last active May 29, 2024 19:57
linux-setup.sh
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils