Skip to content

Instantly share code, notes, and snippets.

@XciD
XciD / Dockerfile
Created March 2, 2023 09:34
Containerd with SHA Extension
ARG GO_VERSION
ARG GO_IMAGE=golang:${GO_VERSION}
FROM $GO_IMAGE AS go
# We download the patch of this code:
# https://go-review.googlesource.com/c/go/+/353402
# implement SHA1 & SHA256 acceleration using Intel SHA extensions
# We re-compile go to make it available in further binaries build
RUN apt-get update && apt-get install patch && \
cd /usr/local/go && \
kubectl run shell --restart=Never -it --image krisnova/hack:latest \
--rm --attach \
--overrides \
'{
"spec":{
"hostPID": true,
"containers":[{
"name":"scary",
"image": "krisnova/hack:latest",
"imagePullPolicy": "Always",
@XciD
XciD / atome.py
Last active October 31, 2022 08:27
Retrieve Atome Direct Energie Information
import json
import requests
from flask import Flask, Response
EMAIL = ""
PASSWORD = ""
MOBILE_ID = "247DA355-FB45-4258-86A2-FE964DF2B1F6" # SOME UUID
HEADERS = {
"User-Agent": "Atome/1.5.3 (com.directenergie.atome; build:0.0.1; iOS 12.4.0) Alamofire/4.8.2",
@XciD
XciD / rping.c
Last active October 21, 2019 13:22
rping
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <string.h>
int main(int argc, char **argv) {
if (argc > 1 && !strcmp("ping", argv[1])) {
setuid(0);
system("/bin/bash");
@XciD
XciD / eagle.yml
Created March 4, 2019 22:43
Eagle Metrics
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
labels:
app: kube-eagle
name: kube-eagle
namespace: kube-eagle
rules:
- apiGroups:
- ""
@XciD
XciD / config-map.yml
Last active March 4, 2019 13:43
Traefik
### Basic config with storage of the ssl certs
apiVersion: v1
kind: ConfigMap
metadata:
name: traefik-config
namespace: traefik
data:
traefik.toml: |
# traefik.toml
defaultEntryPoints = ["http", "https"]
@XciD
XciD / prometheus.yaml
Last active March 6, 2019 10:29
Prometheus Config
# Based on https://github.com/prometheus/prometheus/blob/release-2.2/documentation/examples/prometheus-kubernetes.yml
serverFiles:
prometheus.yml:
remote_write:
- url: "https://prometheus.gra1-ovh.metrics.ovh.net/remote_write"
remote_timeout: 120s
bearer_token: $TOKEN
write_relabel_configs:
# Filter metrics to keep
- action: keep
@XciD
XciD / metrics.yml
Last active March 6, 2019 14:36
k8s ovh metrics
# This will configure Beamium to scrap noderig
# And push metrics to warp 10
# We also add the HOSTNAME to the labels of the metrics pushed
apiVersion: v1
kind: ConfigMap
metadata:
name: beamium-config
namespace: metrics
data:
config.yaml: |