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
const std = @import("std");
pub fn build(b: *std.build.Builder) void {
const target = b.standardTargetOptions(.{ .default_target = .{ .abi = .gnu } });
const mode = b.standardReleaseOptions();
const exe = b.addExecutable("hello-gamedev", "src/main.zig");
exe.setTarget(target);
exe.setBuildMode(mode);
@akhenakh
akhenakh / featurecollection.yaml
Created May 10, 2023 01:55
Exploding GeoJSON feature collection to feature with Benthos
input:
label: input_geojson
stdin:
codec: all-bytes
max_buffer: 1e+06
pipeline:
processors:
- mapping: root = this.features
- unarchive:
format: json_array
@akhenakh
akhenakh / h3gosvg.ipynb
Last active March 24, 2023 01:03
Go Jupyter kernel demonstrate how to use h3
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@akhenakh
akhenakh / spatialite.sql
Last active September 11, 2023 16:18
DBeaver and Spatialite
-- load the extension (usually mod_spatialite)
select load_extension("/opt/homebrew/lib/mod_spatialite.dylib");
-- display the current version to prove it's loaded
select spatialite_version();
-- Transform the geometry to st_astext in your queries
select st_astext(GEOM) as geom from not_enabled_airspace;
-- or as binary
@akhenakh
akhenakh / cmd.md
Last active January 19, 2023 13:59
Nice shell for kubernetes

Tools

Install required tools

brew install fzf
brew install kubectx
brew install stern
brew install kube-ps1
brew install kubecolor/tap/kubecolor
@akhenakh
akhenakh / tempo.yaml
Created January 17, 2023 21:15
Quick and dirty Grafana Tempo deployment for Kubernetes, 1 hour retention, good for development
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: tempo
namespace: tempo
spec:
selector:
matchLabels:
app: tempo
serviceName: "tempo"
@akhenakh
akhenakh / geopandas and natural earth.ipynb
Created January 12, 2023 18:19
geopandas and natural earth
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
package main
import (
"fmt"
"math/bits"
)
func main() {
c := combinations([]string{"A", "B", "C"}, 2)
fmt.Println(c)
@akhenakh
akhenakh / kube-dump.sh
Created February 16, 2022 14:30
Dump all kubernetes ressources from all namespaces
#!/bin/bash
DATE=`date +%F`
for NS in `kubectl get ns --no-headers -o custom-columns=":metadata.name"`
do
kubectl get all -n $NS -o yaml > ${DATE}-${NS}.yaml
done
@akhenakh
akhenakh / install.sh
Created September 1, 2021 20:21
Get rid of Docker Desktop on M1
# Bye Docker on M1
# don't do anything as root
brew install lima
brew uninstall --ignore-dependencies qemu
# Install necessary packages for building
brew install libffi gettext glib pkg-config autoconf automake pixman ninja
# Clone qemu