Skip to content

Instantly share code, notes, and snippets.

View StudioEtrange's full-sized avatar
💫

StudioEtrange StudioEtrange

💫
View GitHub Profile
@StudioEtrange
StudioEtrange / -git_tips.md
Last active June 24, 2024 21:18
Various git tips

Various git tips

@StudioEtrange
StudioEtrange / docker_multi_platform.md
Last active April 28, 2024 22:43
Docker multi platform

Docker multi platform support

  • Docker images support multiple platforms. When you run an image with multi-platform support, Docker automatically selects the image that matches your OS and architecture.

  • About local images storage : The default image store in Docker Engine do not separate image by platform type. Each image:tag erase the previsous one, independently of its image type To solve that you can enable the containerd image store by modifing daemon.json (https://docs.docker.com/storage/containerd/)

  • About BuildKit : BuildKit is enabled by default on Docker Engine >= 23.0. If not enabled, you may activate BuildKit which is a better docker build engine, with export DOCKER_BUILD=1 or by modifying /etc/docker/daemon.json with "features": {"buildkit" : true}. It is not a requirement for basic multi platform support, but it is a requirement when using buildx.

  • DOC : https://docs.docker.com/build/building/multi-platform/

set "FOLDER=X:\FOLDER"
for /r "%FOLDER%" /d %F in (.) do @dir /b "%F" | findstr "^" >nul || echo %~fF && rmdir /Q "%~fF"
@StudioEtrange
StudioEtrange / -remote_sync_files.md
Last active August 29, 2024 16:45
Remote sync files with various method for various protocol

Remote sync/copy files with various method for various protocol

@StudioEtrange
StudioEtrange / PulseSecure_disable_pulsetray_macos.md
Last active February 4, 2024 23:05
PulseSecure MacOS : Disable autostart PulseTray app
@StudioEtrange
StudioEtrange / setup_kodi_vstream.md
Last active March 3, 2023 22:48
Guide pour streamer depuis le lecteur Kodi avec vStream

Guide pour streamer depuis le lecteur Kodi avec vStream

Ce guide part de l'installation de Kodi, le configure en français et permet d'obtenir un lecteur de streaming connecté à différentes sources d'hébergement de fichiers vidéos (uptobox, uptostream, lien https divers etc...)

Ainsi Kodi aura la capacité de streamer des contenus en accèdant à des catalogues de liens de fichiers hébergés en ligne tout en les présentant avec les informations complètes sur la vidéo (titre, résumé, ...)

NOTE : ce guide est rédigé avec le skin et menus par défaut de kodi qu'on a lors d'une toute première installation

Installation et configuration de Kodi

# https://unix.stackexchange.com/a/493548
find /dir1 -mindepth 2 -type f -exec mv -t /dir1 --backup=t '{}' +
@StudioEtrange
StudioEtrange / librelink2_buiild_apk_patched.sh
Created March 12, 2022 18:47
Build LibreLink2 patched app
# download APK file from https://www.apkmonk.com/download-app/com.freestylelibre.app.de/5_com.freestylelibre.app.de_2019-04-22.apk/ into $(pwd):/workspace
docker run -it -u 0:0 --rm -v $(pwd):/workspace mobiledevops/android-sdk-imag
apt update
apt install apktool wget zip align apksigner
cd /workspace
git clone https://github.com/BenoitAnastay/LibreLink-xDrip-Patch
cd LibreLink-xDrip-Patch
# remove md5 checksum
sed -i.bak 's/^md5sum.*//' patch.sh
./patch.sh
@StudioEtrange
StudioEtrange / regexp_extended.go
Last active November 30, 2021 23:59
Golang add regexp functionality
package main
import (
"fmt"
"regexp"
)
// ReplaceAllSubmatchFunc and ReplaceAllStringSubmatchFunc are variant of the same func for []byte and string
// They will replace all matching groups with the repl string
func ReplaceAllStringSubmatch(re *regexp.Regexp, src string, repl string, n int) string {