Skip to content

Instantly share code, notes, and snippets.

View akhenakh's full-sized avatar
🏠
Working from home

Fabrice Aneche akhenakh

🏠
Working from home
View GitHub Profile
@akhenakh
akhenakh / zig-wasm.md
Created June 13, 2025 12:54
learning Zig using Wasm-4 fantasy console

Learning Zig with WASM-4

tags: #zig #wasm-4 #gamedev

Of course! Here is a detailed tutorial for learning Zig by creating a small game for the WASM-4 fantasy console. This tutorial is designed to be followed sequentially, introducing Zig concepts as they become necessary for building the game. We'll be making a classic Snake game.


Learn Zig by Making a Snake Game for WASM-4

FROM uigen-t2-7b-3600-q8_0.gguf
# Model information
PARAMETER stop <|end_of_solution|>
PARAMETER temperature 0.7
PARAMETER top_p 0.9
SYSTEM """You are Tesslate, a helpful assistant specialized in UI generation."""
@akhenakh
akhenakh / us-states.sql
Created May 1, 2025 17:57
Using Duckdb to query point in polygons in an efficient manner
-- source https://www.census.gov/geographies/mapping-files/time-series/geo/carto-boundary-file.html
-- https://www2.census.gov/geo/tiger/GENZ2018/shp/cb_2018_us_state_5m.zip
LOAD spatial;
LOAD geography;
CREATE TABLE wkbstates AS
SELECT
name,
ST_AsWKB(geom) as geom_wkb -- Convert GEOMETRY to WKB_BLOB
@akhenakh
akhenakh / gemini_file.go
Created April 30, 2025 01:04
Gemini is often producing code with the pattern **`path/to/file.go`**, this is creating the files from the outputed markdown
package main
import (
"bufio"
"fmt"
"log"
"os"
"path/filepath"
"regexp"
"strings"
@akhenakh
akhenakh / wehbook.yaml
Created July 9, 2024 19:29
A github webhook receiver for Benthos. SECRET_KEY=BLAH benthos -c benthos.yaml
http:
enabled: true
address: 0.0.0.0:8095
root_path: /api
debug_endpoints: false
input:
label: webhook_server
http_server:
path: "/webhook/github"
@akhenakh
akhenakh / nodes.png
Last active March 26, 2024 01:49
Resolve VR180 nodes
nodes.png
@akhenakh
akhenakh / config.toml
Created January 2, 2024 03:21
Helix Config
theme = "solarized_dark"
[editor]
true-color = true
bufferline = "multiple"
cursorline = true
color-modes = true
[editor.cursor-shape]
insert = "bar"
@akhenakh
akhenakh / notes.md
Last active October 30, 2023 16:24
Quick setup to experiment with Envoy Gateway on a Mac

Note to quickly deploy Envoy Gateway for experiment on a Mac using Colima (or a Linux)

Mac Requirement (M1/M2)

# clean up colima install BEWARE!! older version of colima sometimes are failing
rm -rf ~/.colima ~/.lima

# start colima with kubernetes option and disable Traefik
colima start --kubernetes --kubernetes-disable=traefik  --arch aarch64 --vm-type=vz --vz-rosetta --cpu 2 --memory 4
@akhenakh
akhenakh / llama.sh
Last active November 30, 2023 22:16
Use a llama model on your mac
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
make -j
pip3 install huggingface-hub
huggingface-cli download TheBloke/zephyr-7B-alpha-GGUF zephyr-7b-alpha.Q5_K_M.gguf --local-dir ./models --local-dir-use-symlinks False
export MODEL=./models/zephyr-7b-alpha.Q5_K_M.gguf
./examples/server-llama2-13B.sh
# go to http://localhost:8080
@akhenakh
akhenakh / load_spatialite.sql
Created September 15, 2023 14:51
Jetbrains SQLite and SpatiaLite
-- Save this file somewhere with the path of your extension (on Silicon Mac: /opt/homebrew/lib/mod_spatialite.dylib)
select load_extension("/opt/homebrew/lib/mod_spatialite.dylib");