Table des matières
- 2026:
- 2025:
4 billet(s) pour septembre 2026
| Notes HTTP Strict Transport Security - HSTS | 2026/09/18 11:04 | Jean-Baptiste |
| Notes GNU Linux GPU carte graphiques | 2026/09/08 15:49 | Jean-Baptiste |
| Notes GNU Linux graphique | 2026/09/08 15:42 | Jean-Baptiste |
| Notes urlencoding - passer des mots de passe en HTTPS | 2026/09/03 17:58 | Jean-Baptiste |
Notes - Python - Static type code analyzer
Et annotations de fonctions
pytype
pip install --user pytype
plop.py
#! /usr/bin/env python3 def func(a: int, b: int, c: int) -> int: return a + b + c print(func(1, 2, 3.7))
$ pytype-single plop.py
File "plop.py", line 6, in <module>: Function func was called with the wrong arguments [wrong-arg-types]
Expected: (a, b, c: int)
Actually passed: (a, b, c: float)
For more details, see https://google.github.io/pytype/errors.html#wrong-arg-types
(python-dev-test) jibe@vivobela:~/code/python-dev-test$ pytype plop.py
Computing dependencies
Analyzing 1 sources with 0 local dependencies
ninja: Entering directory `.pytype'
[1/1] check plop
merge-pyi
plop.py
#! /usr/bin/env python3 def func(a, b, c): return a + b + c print(func(1, 2, 3.7))
pytype plop.py
.pytype/pyi/plop.pyi
# (generated with --quick) from typing import Any def func(a, b, c) -> Any: ...
vim .pytype/pyi/plop.pyi
.pytype/pyi/plop.pyi
# def func(a, b, c) -> Any: ... def func(a: int, b: int, c: int) -> int: ...
merge-pyi -i plop.py .pytype/pyi/plop.pyi
plop.py
#! /usr/bin/env python3 def func(a: int, b: int, c: int) -> int: return a + b + c print(func(1, 2, 3.7))
Mypy
$ mypy plop.py plop.py:6: error: Argument 3 to "func" has incompatible type "float"; expected "int" [arg-type] Found 1 error in 1 file (checked 1 source file)
Notes - Kubernetes - K8S
Voir :
Tuto
crd Custom Ressource
Service Ingress (prochainement remplacé par les GatewayApi)
- nginx
- treafik
- haproxy
API Server (server de kubectl) Scheduler kubelet (reçoie les infos du scheduler)
etcd Backup Restoration à chaud
Controlleur Manager (boucle de controle)
Cloud Controller
Bonnes pratiques
Évitez les Pods orphelins (“Naked” Pods) les pods dits “orphelins” sont ceux qui ne sont pas liés à un contrôleur de plus haut niveau (ReplicaSets, Deployments, …). Comme ils ne sont pas managés, ils ne seront pas relancés en cas d'erreur ou d'échec du nœud.
Spécifiez le namespace par défaut
kubectl config set-context --current --namespace=working-namespace
Ou utiliser kubectx / kubens
Storage
Notes - Docker - proxy
Registry
https://docs.docker.com/engine/admin/systemd/
mkdir /etc/systemd/system/docker.service.d
/etc/systemd/system/docker.service.d/http-proxy.conf
[Service] Environment="HTTP_PROXY=http://192.168.56.1:3128/" "HTTPS_PROXY=http://192.168.56.1:3128/" "NO_PROXY=localhost,127.0.0.0/8"
systemctl daemon-reload
systemctl show --property=Environment docker
systemctl restart docker
Notes - Chromebook
Install GNU/Linux
Voir :
Code source de ChromiumOS https://chromium.googlesource.com/chromiumos
NayuOS n'est plus mis à jour https://nayuos.nexedi.com/ Ni GalliumOS
Les codes claviers des ChromeBooks https://chromium.googlesource.com/chromiumos/docs/+/master/debug_buttons.md
Chrome OS Factory Shim https://chromium.googlesource.com/chromiumos/platform/factory_installer/+/HEAD/README.md
Chrome OS RMA shim https://chromium.googlesource.com/chromiumos/platform/factory/+/HEAD/setup/RMA_SHIM.md
Easy Ways to Enable USB Booting on Chromebook https://www.wikihow.com/Enable-USB-Booting-on-Chromebook
Télécharger ChromeOS officiel signé https://cros.tech/t
Fixing audio & keyboard
Autres
Chrome OS Recovery - Does not detect image https://groups.google.com/a/chromium.org/g/chromium-os-discuss/c/OcB4zaIWwok
chronos # login user sudo -i crossystem dev_boot_usb=1 dev_boot_legacy=1 dev_boot_signed_only=0 crossystem dev_boot_altfw=1
Autres
mkdir -p /boot/EFI/EFI/BOOT cp /boot/EFI/EFI/mageia/grubx64.efi /boot/EFI/EFI/BOOT/BOOTX64.efi
https://forums.mageia.org/en/viewtopic.php?f=7&t=12523
sudo -i dev_install
ChromeOS Device Firmware Utility Script [2024-03-09] (c) Mr Chromebox <mrchromebox@gmail.com> ********************************************************* ** Device: ASUS Chromebook CX34 (MARASOV-UERT) ** Platform: Intel AlderLake/RaptorLake-U/P ** Fw Type: Stock ChromeOS w/RW_LEGACY ** Fw Ver: Google_Marasov.14505.633.0 (10/27/2023) ** Fw WP: Disabled ********************************************************* ** 1) Install/Update RW_LEGACY Firmware ** [WP] 2) Install/Update UEFI (Full ROM) Firmware ** [WP] 3) Set Boot Options (GBB flags) ** [WP] 4) Set Hardware ID (HWID) ********************************************************* Select a numeric menu option or R to reboot P to poweroff Q to quit
[root@sysrescue ~]# /tmp/flashrom -p internal --wp-disable flashrom 1.4.0-devel on Linux 6.6.14-1-lts (x86_64) flashrom is free software, get the source code at https://flashrom.org Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns). Opened /dev/mtd0 successfully Found Programmer flash chip "Opaque flash chip" (32768 kB, Programmer-specific) on internal. Disabled hardware protection SUCCESS [root@sysrescue ~]# /tmp/flashrom -p internal -r -i GBB:/tmp/gbb.temp flashrom 1.4.0-devel on Linux 6.6.14-1-lts (x86_64) flashrom is free software, get the source code at https://flashrom.org Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns). Opened /dev/mtd0 successfully Found Programmer flash chip "Opaque flash chip" (32768 kB, Programmer-specific) on internal. Using region: "GBB":"/tmp/gbb.temp". Reading flash... done. SUCCESS [root@sysrescue ~]# /tmp/gbb_utility --set --flags=0x4A8 /tmp/gbb.temp successfully saved new image to: /tmp/gbb.temp [root@sysrescue ~]# /tmp/flashrom -p internal -w -i GBB:/tmp/gbb.temp flashrom 1.4.0-devel on Linux 6.6.14-1-lts (x86_64) flashrom is free software, get the source code at https://flashrom.org Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns). Opened /dev/mtd0 successfully Found Programmer flash chip "Opaque flash chip" (32768 kB, Programmer-specific) on internal. Using region: "GBB":"/tmp/gbb.temp". disable_power_management: Failed to open /run/lock/power_override/flashrom.lock for writing: No such file or directory Reading old flash chip contents... done. Erasing and writing flash chip... FAILED at 0x01805000! Expected=0xff, Found=0x24, failed byte count from 0x01805000-0x01805fff: 0xffe ERASE_FAILED FAILED! Uh oh. Erase/write failed. Checking if anything has changed. Reading current flash chip contents... done. Good, writing to the flash chip apparently didn't do anything. This means we have to add special support for your board, programmer or flash chip. Please report this to the mailing list at flashrom@flashrom.org or on IRC (see https://www.flashrom.org/Contact for details), thanks! ------------------------------------------------------------------------------- You may now reboot or simply leave the machine running. FAILED
/tmp/flashrom -p internal --ifd -i bios -r /tmp/bios.bin
Pb
Disque pas détecté
Il faut le module ufshcd_pci
Pour booter sur le disque
A tester
recompiler le Kernel avec les options
CONFIG_SCSI_UFSHCD=y CONFIG_SCSI_UFSHCD_PLATFORM=y CONFIG_SCSI_UFS_HISI=y
Notes - Algorithme
Go lang - newton - racine carré
package main // Source : https://go.dev/tour/flowcontrol/8 import ( "fmt" ) func Sqrt(x float64) float64 { z := 1.0 for range 10 { z -= (z*z - x) / (2 * z) } return z } func main() { fmt.Println(Sqrt(2)) }
