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 / gps.c
Last active February 14, 2024 16:19
A working TTGO T-BEAM v0.7 (the one with only 2 push buttons) LoRa device client for the thing network
#include "gps.h"
HardwareSerial GPSSerial(1);
void gps::init()
{
GPSSerial.begin(9600, SERIAL_8N1, GPS_TX, GPS_RX);
GPSSerial.setTimeout(2);
}
@akhenakh
akhenakh / mapd.nomad
Created November 11, 2019 22:01
Example Nomad deployment
job "mapd" {
datacenters = ["dc1"]
type = "service"
constraint {
operator = "distinct_hosts"
value = "true"
}
update {
max_parallel = 1
min_healthy_time = "10s"
@akhenakh
akhenakh / traefik2.yaml
Created October 7, 2019 17:40
Traefik2 Kubernetes example config
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: traefik
name: traefik
namespace: default
spec:
replicas: 1
selector:
@akhenakh
akhenakh / traefik.yaml
Last active March 23, 2020 05:27
traefik 2.0 Kubernetes
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: ingressroutes.traefik.containo.us
spec:
group: traefik.containo.us
version: v1alpha1
names:
kind: IngressRoute
@akhenakh
akhenakh / boot.txt
Created July 8, 2019 01:49
rk3328 ayufan 5 boot
[ 3.636884] Internal error: SP/PC alignment exception: 8a000000 [#1] PREEMPT SMP
[ 3.636982] ------------[ cut here ]------------
[ 3.637542] Modules linked in:
[ 3.637945] refcount_t: underflow; use-after-free.
[ 3.638215] Process swapper/0 (pid: 1, stack limit = 0x(____ptrval____))
[ 3.638694] WARNING: CPU: 2 PID: 0 at lib/refcount.c:190 refcount_sub_and_test_checked+0x94/0xb0
[ 3.639215] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.1.0-1114-ayufan-g097e5be61be4 #ayufan
[ 3.639973] Modules linked in:
[ 3.640712] Hardware name: Rockchip RK3328 T9 (DT)
[ 3.640979] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 5.1.0-1114-ayufan-g097e5be61be4 #ayufan
@akhenakh
akhenakh / PKGBUILD
Last active June 5, 2019 18:21
rock64 updated ayufan kernel for AUR 4.4.167-1187-rockchip-ayufan
# AArch64 multi-platform
# PKGBUILD Maintainer: Raanu <[email protected]>
# Kernel maintainer: Ayufan <[email protected]>
# The below variables get updated from external script when new builds are released
_kernver=4.4.167-1200-rockchip-ayufan-gb87a48aaf35f
_imagename=linux-image-4.4.167-1200-rockchip-ayufan-gb87a48aaf35f_4.4.167-1200-rockchip-ayufan_arm64.deb
_headersname=linux-headers-4.4.167-1200-rockchip-ayufan-gb87a48aaf35f_4.4.167-1200-rockchip-ayufan_arm64.deb
_releasetag=4.4.167-1200-rockchip-ayufan
_pkgver=4.4.167_1200
@akhenakh
akhenakh / caddy.yaml
Created April 29, 2019 13:52
deploy caddy with a git clone and hugo transform
---
apiVersion: v1
kind: ConfigMap
metadata:
name: caddy-git-config
labels:
app: caddy-git
data:
Caddyfile: |
:80
@akhenakh
akhenakh / app.yaml
Last active March 4, 2023 19:22
Example of graceful shutdown with grpc healthserver * httpserver
readinessProbe:
exec:
command: ["/root/grpc_health_probe", "-addr=:6666"]
initialDelaySeconds: 1
livenessProbe:
exec:
command: ["/root/grpc_health_probe", "-addr=:6666"]
initialDelaySeconds: 2
imagePullPolicy: IfNotPresent
@akhenakh
akhenakh / dashboard-ingress.yaml
Created March 13, 2019 23:02
Kubernetes Dashboard Ingress, don't do that in production for your dev only (minikube ...), you need an ingress controller as Traefik or Nginx ..., kubectl create -f deployment/dev/dashboard-ingress.yaml
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: dashboard-ingress
namespace: kube-system
spec:
rules:
- host: dashboard.minikube
http:
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: ${NAME}
labels:
app: "${NAME}"
commit: "${VERSION}"
appgroup: "${PROJECT}"
deploydate: "${DATE}"
spec: