Skip to content

Instantly share code, notes, and snippets.

View StudioEtrange's full-sized avatar
💫

StudioEtrange StudioEtrange

💫
View GitHub Profile
@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

@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 / 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`
@StudioEtrange
StudioEtrange / -PDF manipulation tools.md
Last active January 19, 2025 15:18
various pdf manipulation tools and tips

various tips and tools for pdf

@StudioEtrange
StudioEtrange / launch_docker_airgeddon_remotely.sh
Created June 7, 2021 01:01
launch_docker_airgeddon_remotely.sh
# https://github.com/v1s1t0r1sh3r3/airgeddon
docker run --rm -ti --name airgeddon --net=host --privileged \
-v $HOME/air/io:/io -v $HOME/air/plugins:/opt/airgeddon/plugins \
-e DISPLAY=$(env | grep DISPLAY | awk -F "=" '{print $2}') \
-e AIRGEDDON_WINDOWS_HANDLING=tmux v1s1t0r1sh3r3/airgeddon
@StudioEtrange
StudioEtrange / synology_set_external_drive_as_internal.sh
Created April 3, 2021 20:05
synology_set_external_drive_as_internal
# https://www.casler.org/wordpress/synology-ssd-cache-on-external-devices/
echo "Current values"
more /etc.defaults/synoinfo.conf | grep maxdisk
more /etc.defaults/synoinfo.conf | grep usbportcfg
more /etc.defaults/synoinfo.conf | grep esataportcfg
more /etc.defaults/synoinfo.conf | grep internalportcfg
sudo sed -i.bak -e 's/maxdisks=\".*$/maxdisks=\"24\"/g' -e 's/usbportcfg=\".*$/usbportcfg=\"0x00\"/g' -e 's/esataportcfg=\".*$/esataportcfg=\"0x00\"/g' -e 's/internalportcfg=\".*$/internalportcfg=\"0xffffff\"/g' /etc.defaults/synoinfo.conf
echo "Updated values"
more /etc.defaults/synoinfo.conf | grep maxdisk
more /etc.defaults/synoinfo.conf | grep usbportcfg
@StudioEtrange
StudioEtrange / inline_file_as_string_heredoc.sh
Created January 28, 2021 02:22
inject file inline to command with heredoc
# https://stackoverflow.com/a/38731052
# variable substitution, leading tab retained, overwrite file, echo to stdout
tee /path/to/file <<EOF
${variable}
EOF
# no variable substitution, leading tab retained, overwrite file, echo to stdout