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 / 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 <bvp-yar@ya.ru>
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
@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