Skip to content

Instantly share code, notes, and snippets.

View pyaillet's full-sized avatar
:bowtie:
Trolling...

Pierre-Yves Aillet pyaillet

:bowtie:
Trolling...
View GitHub Profile
@pyaillet
pyaillet / config.yml
Created December 4, 2023 17:24
Minimal configuration for lazydocker https://github.com/jesseduffield/lazydocker - put this in your `~/.config/lazydocker/config.yml` file
customCommands:
containers:
- name: bash
attach: true
command: 'docker exec -it {{ .Container.ID }} bash'
serviceNames: []
- name: sh
attach: true
command: 'docker exec -it {{ .Container.ID }} sh'
serviceNames: []
@pyaillet
pyaillet / main.rs
Last active October 18, 2022 21:40
esp-idf-rs storage example
use std::sync::Arc;
use embedded_svc::storage::{RawStorage, StorageBase};
use esp_idf_svc::{nvs::EspDefaultNvs, nvs_storage::EspNvsStorage};
use esp_idf_sys as _; // If using the `binstart` feature of `esp-idf-sys`, always keep this module imported
use log::*;
fn main() {
// Temporary. Will disappear once ESP-IDF 4.4 is released, but for now it is necessary to call this function once,
@pyaillet
pyaillet / check.log
Created March 10, 2022 19:50
cargo c --target=xtensa-esp32-espidf
Checking esp-idf-hal v0.33.1 (/Users/pyaillet/Projets/esp32/esp-idf-hal)
error[E0433]: failed to resolve: use of undeclared crate or module `rmt_item32_t__bindgen_ty_1__bindgen_ty_1`
--> src/rmt.rs:564:38
|
564 | let mut inner_item = rmt_item32_t__bindgen_ty_1__bindgen_ty_1::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module `rmt_item32_t__bindgen_ty_1__bindgen_ty_1`
error[E0425]: cannot find function `rmt_set_tx_loop_count` in this scope
--> src/rmt.rs:451:23
|
@pyaillet
pyaillet / docker-compose.blue.yaml
Created December 6, 2021 16:39
traefik constraintes
version: "3"
services:
blue:
image: containous/whoami
labels:
- traefik.http.routers.blue.rule=PathPrefix("/")
- color=blue
proxy:
image: traefik:v2.5.4
# Enables the web UI and tells Traefik to listen to docker
@pyaillet
pyaillet / cks-tasks.md
Last active December 29, 2022 10:00
CKS Tasks
  • Check certificates
    • /etc/kubernetes/pki
    • openssl x509 -in <certificate.crt> -noout -text
    • kubeadm certs renew all
  • Check PID Namespace isolation
    • v1.PodSpec.shareProcessNamespace: true
  • Use Network policies
    • Default deny ingress
    • Default deny egress
  • frontend to backend
#!/usr/bin/env sh
# Install
apt update
apt install -y python3 python3-pip neovim docker.io golang
USER="pyaillet"
USER_HOME="/home/$USER"
groupadd $USER
useradd -d $USER_HOME -m -g $USER -G adm,dialout,cdrom,floppy,audio,dip,video,plugdev,netdev,lxd,ubuntu,google-sudoers $USER
{
"CN": "Kubernetes",
"key": {
"algo": "rsa",
"size": 2048
},
"names": [
{
"C": "FR",
"L": "Nantes",

All Products

Compute Products

  • Compute Engine: Virtual Machines, Disks, Network 🔗 📄
  • App Engine: Managed App Platform 🔗 📄
  • Kubernetes Engine: Managed Kubernetes/Containers 🔗 📄
  • Cloud Functions: Event-driven serverless functions 🔗 📄
@pyaillet
pyaillet / Readme.md
Last active November 28, 2018 13:44
Access etcd from cluster (setup with kubeadm)

Steps to access etcd from cluster (setup with kubeadm)

Create secret with etcd credentials

cd /etc/kubernetes/pki
kubectl create secret generic etcd-creds --from-file=etcd/ca.crt --from-file=apiserver-etcd-client.crt --from-file=apiserver-etcd-client.key

kubectl describe secret etcd-creds