Skip to content

Instantly share code, notes, and snippets.

View tomgrv's full-sized avatar
♻️

Thomas G. tomgrv

♻️
View GitHub Profile
@tomgrv
tomgrv / wsl_alpine_1_install.sh
Last active July 23, 2023 08:34
Alpine Linux WSL environnement
### RESTART
#cmd> wsl -t alpine
### INSTALLATION
# Logname linux idem logname windows
su
cd
### REMOTE CODE FOR WSL
@tomgrv
tomgrv / prettierignore.sh
Last active March 30, 2020 13:55
Generate .prettierignore file from all .gitignore in folder/subfolders
#!/bin/sh
#
# Copyright 2020 @tomgrv
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR T
@tomgrv
tomgrv / cleanup.sh
Last active June 12, 2021 08:15
Synology Video Station Convert EAC to AAC (needs docker package to be installed)
#!/bin/sh
if [ -z "$1" ]
then
dir=/var/services/video
elif [ -d "$1" ]
then
dir=$(readlink -e $1)
else
echo "Folder <$1> do not exits"
@tomgrv
tomgrv / folder2submodule.sh
Last active August 29, 2015 14:26
Convert project folders to git submodules
#!/bin/sh
# Convert project folders to git submodules
# Usage:
#
# folder2submodule.sh <main project folder> <remote repository name> <access token> <subfolder1> <subfolder12> ...
#
typeset var prj=$1 # Project folder
typeset var rmt=$2 # Origin remote repository