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 / 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");
@akhenakh
akhenakh / overturemaps.sql
Last active September 10, 2024 13:04
Querying into Overturemap data using duckdb
-- rename files to parquet: find . -type f -exec mv {} {}.parquet \;
-- easier for tools detection like tad
LOAD spatial;
-- Update with Geoparquet
FROM read_parquet('/opt/public_files/overturemaps/theme=places/type=place/*', filename=true, hive_partitioning=1)
where bbox.xmin > -71.2 and bbox.xmax < -71.1 and bbox.ymin > 46.7 and bbox.ymax < 46.9
LIMIT 1;
@akhenakh
akhenakh / gist:f88bd8522aacb90953ea8a3b09df386d
Last active October 15, 2024 17:20
Useful online tools, usually without backend interaction, full js or wasm
@akhenakh
akhenakh / start.sh
Last active October 16, 2023 17:48
FreeBSD on M1/M2 with ssh access to localhost
qemu-system-aarch64 -m 4096M -cpu host -M virt,accel=hvf \
-bios edk2-aarch64-code.fd -serial mon:stdio -nographic \
-drive if=virtio,file=FreeBSD.qcow2,id=hd0 \
-device virtio-net,netdev=vmnic \
-netdev user,id=vmnic,hostfwd=tcp:127.0.0.1:9022-:22
# on the guest service sshd onestart or enable sshd in rc.conf
# bios can be found here wget https://lxr.missinglinkelectronics.com/qemu/+save\=pc-bios/edk2-aarch64-code.fd.bz2
@akhenakh
akhenakh / README.md
Created July 25, 2023 13:58
Allow loading unsigned extension for DuckDB in DBeaver

Right click on your connection: Edit Connection, then Driver Settings, Driver Properties tab.

Add allow_unsigned_extensions to true.