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 / 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
Loading
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
@akhenakh
akhenakh / main.go
Created March 4, 2021 16:00
Visual graph for Drone pipelines
package main
import (
"fmt"
"log"
"os"
"github.com/drone/drone-yaml/yaml"
"github.com/goccy/go-graphviz"
"github.com/goccy/go-graphviz/cgraph"
@akhenakh
akhenakh / adapter.go
Created January 27, 2021 20:07
kitlogadapter for pgx
package kitlogadapter
import (
"context"
"github.com/go-kit/kit/log"
kitlevel "github.com/go-kit/kit/log/level"
"github.com/jackc/pgx/v4"
)
@akhenakh
akhenakh / gist:d76adb669deec2d4db3816dd76d5d0e7
Created December 26, 2020 02:20
spice-gtk.diff compile spice-gtk 0.39 on osx m1
diff --git a/src/cd-scsi.h b/src/cd-scsi.h
index 6351f4a..feb935e 100644
--- a/src/cd-scsi.h
+++ b/src/cd-scsi.h
@@ -26,6 +26,8 @@
#include "cd-usb-bulk-msd.h"
#include "scsi-constants.h"
+#include <CoreFoundation/CoreFoundation.h>
+
@akhenakh
akhenakh / PKGBUILD
Created August 13, 2020 12:16
arm64 consul-bin Arch Linux
# Maintainer: Vasiliy Bukharev <[email protected]>
pkgname=consul-bin
pkgver=1.8.2
pkgrel=1
pkgdesc='A tool for service discovery, monitoring and configuration.'
#arch=('i686')
#arch=('x86_64')
arch=('i686' 'x86_64' 'arm' 'armv6h' 'aarch64')
url="https://www.consul.io"
@akhenakh
akhenakh / .errcheck_excludes.txt
Created May 10, 2020 01:17
Golangci-lint with Gokit logger and errcheck enabled
// do not report logger gokit
(github.com/go-kit/kit/log.Logger).Log