Skip to content

Instantly share code, notes, and snippets.

View thibaultserti's full-sized avatar
🎯
Focusing

Thibault Ayanides thibaultserti

🎯
Focusing
View GitHub Profile
@thibaultserti
thibaultserti / nethunter.txt
Last active June 5, 2020 09:22
Nexus 6p install
1) take 6p with any OS
2) download all files from https://build.nethunter.com/contributors/re4son/angler/
3) unzip angler-n4f26u-factory-131d7b01.zip
./flash-all.sh
4) fastboot flash recovery twrp-3.3.1-0-angler.img
5) adb push lineage-14.1-20180219-nightly-angler-signed.zip
adb push vendor-n2g48c.img
adb push opengapps.zip
adb push magisk.zip
6) insert USB stick and reboot bootloader, do not reboot into system - reboot into bootloader

Keybase proof

I hereby claim:

  • I am thibaultserti on github.
  • I am thibaultserti (https://keybase.io/thibaultserti) on keybase.
  • I have a public key whose fingerprint is F2B6 AEF1 AA9B 56B2 90C9 6AC0 7F9A 9687 E7CA 0D86

To claim this, I am signing this object:

for i in {1..20};do mkdir $i; done

.vimrc

set number
set paste
@thibaultserti
thibaultserti / resizeLVM.txt
Created June 15, 2023 17:10
Resize LVM partition
sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
@thibaultserti
thibaultserti / README.md
Last active May 31, 2024 12:23
FastAPI + Redis

Le code a été conçu pour python 3.11 et redis v5.

ETCDCTL_API=3 etcdctl --endpoints=https://127.0.0.1:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key defrag
@thibaultserti
thibaultserti / main.py
Last active January 27, 2024 17:12
FastAPI + MYSQL
# main.py
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel
import os
import pymysql
app = FastAPI()
class Item(BaseModel):
name: str
@thibaultserti
thibaultserti / main.py
Created January 28, 2024 12:05
Kubernetes Call
from fastapi import FastAPI
from kubernetes import client, config
import uvicorn
app = FastAPI()
# Charger la configuration Kubernetes en utilisant le service account du pod
config.load_incluster_config()
# Obtenir la liste des namespaces
  • Install WSL 2 Ubuntu from Microsoft Store

  • Install Docker Desktop

  • Check Docker Desktop uses Docker

  • Install minikube in windows with docker driver minikube start --driver docker

  • Install kubectl with minikube kubectl version

  • Fix docker iussue docker context use default

  • Add following content to set-k8s-credentials.sh. This script must be rerun every time we relaunch minikube

Pour installer les dépendances :

pip install -r requirements.txt

Pour lancer l'API :