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 / 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 <Gero3977@gmail.com>
# Kernel maintainer: Ayufan <ayufan@ayufan.eu>
# 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:
@akhenakh
akhenakh / jaeger.yaml
Created February 21, 2019 18:47
Jaeger all in one for development for Kubernetes from https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/all-in-one/jaeger-all-in-one-template.yml modified to use an ingress
#
# Copyright 2017-2019 The Jaeger Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
@akhenakh
akhenakh / .vimrc
Created December 17, 2018 13:20
curent plugins and config
" install vim-plug
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
call plug#begin('~/.vim/plugged')
Plug 'Shougo/deoplete.nvim'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
Plug 'zchee/deoplete-go', { 'do': 'make'}
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
@akhenakh
akhenakh / _INSTALL.md
Last active November 19, 2018 14:29
go-spew pretty printer for Golang
$ go get -u github.com/davecgh/go-spew/spew

In VS Code, go to Preferences > User Snippets > Go and add go.json sd snippet.

type sd to use the snippet

package main
@akhenakh
akhenakh / install-arch.sh
Created November 14, 2018 18:34
Install Arch Linux on OSX with xhyve
#!/bin/bash
#
# Usage
# install-arch.sh ./archlinux-2018.11.01-x86_64.iso
# first you neeed to patch xhyve with this
# index 61aeebb..39a9c4b 100644
# --- a/src/firmware/kexec.c
# +++ b/src/firmware/kexec.c
# @@ -185,6 +185,7 @@ kexec_load_ramdisk(char *path) {
@akhenakh
akhenakh / MJPEGViewController.m
Created November 2, 2018 11:36
query a static image camera and animate it
//
// MJPEGViewController.m
// iMocs
//
// Created by akh on 2018-10-29.
// Copyright ? 2018 akh. All rights reserved.
//
#import "MJPEGViewController.h"