Skip to content

Instantly share code, notes, and snippets.

View StudioEtrange's full-sized avatar
💫

StudioEtrange StudioEtrange

💫
View GitHub Profile
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 December 30, 2023 14:05
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 {
@StudioEtrange
StudioEtrange / substitute_key_in_file.sh
Last active November 18, 2021 21:03
Awk function that can in any text or configuration file substitute a key with its own value, if its value is assigned earlier in the file
# In any text or configuration file substitute a key with its own value, if its value is assigned earlier in the file and the key is referenced with {{key}}
# This could be used on any text file, i.e an .ini file or a docker-compose env file
# The mechanism works like in shell script variable syntax in some ways : assignation, declaration, resolution order and comment symbol (#)
# Usage : substitute_key_in_file "<file_path>"
# Input file content:
# N=10
# The number is {{N}}
# # FOO={{N}}
# A=1
@StudioEtrange
StudioEtrange / crush_all_commits_to_one.sh
Created November 11, 2021 04:51
will crush all commits history to one then push and erase the remote branch master on github
#!/bin/sh
# will crush all commits history to one
# then push and erase the remote branch master on github
# https://stackoverflow.com/a/15572071
git branch new_branch $(echo "init message" | git commit-tree HEAD^{tree})
git push --force <remote url> new_branch:master
# delete local folder and re-clone thge project
@StudioEtrange
StudioEtrange / ssl_proxy_onion_demo.sh
Created October 21, 2021 01:11
open an ssl proxy over ssh and add N layer of ssh/ssl to communication between a client and a server
#! /bin/bash
# Credits : anonymous
# Ouvrir un proxy SSL sur le port ssh
# IE avoir X couche de cryptage ssl + ssh
# Cf NBSSL nombre de couche SSL
# Execute sans parametre = Usage
cd `dirname $0`