mirror of
https://gitea.blesmrt.net/mikaela/gist.git
synced 2024-11-28 06:09:34 +01:00
shfmt
This commit is contained in:
parent
4a3ccf77ff
commit
fa9e8927c0
@ -10,6 +10,7 @@ repos:
|
||||
hooks:
|
||||
- id: check-added-large-files
|
||||
- id: check-case-conflict
|
||||
- id: check-yaml
|
||||
- id: check-executables-have-shebangs
|
||||
- id: check-shebang-scripts-are-executable
|
||||
- id: destroyed-symlinks
|
||||
@ -31,6 +32,11 @@ repos:
|
||||
rev: "v3.0.0-alpha.9-for-vscode"
|
||||
hooks:
|
||||
- id: prettier
|
||||
- repo: https://github.com/scop/pre-commit-shfmt
|
||||
rev: v3.6.0-2
|
||||
hooks:
|
||||
- id: shfmt
|
||||
#- id: shfmt-docker
|
||||
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
|
||||
rev: "2.7.1"
|
||||
hooks:
|
||||
|
@ -5,7 +5,7 @@ CHTDIR=~/PS2/CHT
|
||||
mkdir -p $CHTDIR
|
||||
|
||||
for chtfile in *.cht; do
|
||||
cat $chtfile > $CHTDIR/$chtfile
|
||||
cat $chtfile >$CHTDIR/$chtfile
|
||||
done
|
||||
|
||||
chmod -R 777 $CHTDIR
|
||||
|
@ -19,8 +19,8 @@ chmod -R 777 $BACKUPDIR
|
||||
|
||||
# If duperemove is installed, perform FS based deduplication of backups
|
||||
if hash duperemove 2>/dev/null; then
|
||||
# recursive, dedupe, human-readable, hashfile is like ddrescue mapfile
|
||||
duperemove -rdh --hashfile=$BACKUPDIR/duperemove.hashfile $BACKUPDIR/
|
||||
# recursive, dedupe, human-readable, hashfile is like ddrescue mapfile
|
||||
duperemove -rdh --hashfile=$BACKUPDIR/duperemove.hashfile $BACKUPDIR/
|
||||
fi
|
||||
|
||||
# Curiosity, show the space used
|
||||
|
@ -4,17 +4,15 @@
|
||||
# Purpose: mass setting entrymsgs
|
||||
|
||||
# Finnish speaking channels
|
||||
declare -a arr=("#aaltopiraatit" "#akateemisetpiraatit" "#aktiivit" "#antikupla" "#grafiikka" "#hallituskokous" "#hame" "#helsinki" "#hepihalko" "#kaakko" "#keski-suomi" "#likakaivo" "#mediaseuranta" "#messi" "#Mikaela" "#pinu" "#pinu-hallitus" "#pinuhalko" "#pinu_hallitus" "#piraatit" "#piraattinuoret" "#piraattipuolue" "#piraattivpn" "#pirkanmaa" "#politiikka" "#ppfi-chanacs-abuse" "#puoluehallitus" "#puoluekokous" "#puoluetoimisto" "#purje" "#satakunta" "#sateenkaaripiraatit" "#savo-karjala" "#sivusto" "#syotteet" "#test" "#toiminta" "#tulevaisuus" "#uusimaa" "#vaaliteltta" "#vaasa" "#varainhankinta" "#varsinais-suomi" "#verkkopalvelut")
|
||||
declare -a arr=("#aaltopiraatit" "#akateemisetpiraatit" "#aktiivit" "#antikupla" "#grafiikka" "#hallituskokous" "#hame" "#helsinki" "#hepihalko" "#kaakko" "#keski-suomi" "#likakaivo" "#mediaseuranta" "#messi" "#Mikaela" "#pinu" "#pinu-hallitus" "#pinuhalko" "#pinu_hallitus" "#piraatit" "#piraattinuoret" "#piraattipuolue" "#piraattivpn" "#pirkanmaa" "#politiikka" "#ppfi-chanacs-abuse" "#puoluehallitus" "#puoluekokous" "#puoluetoimisto" "#purje" "#satakunta" "#sateenkaaripiraatit" "#savo-karjala" "#sivusto" "#syotteet" "#test" "#toiminta" "#tulevaisuus" "#uusimaa" "#vaaliteltta" "#vaasa" "#varainhankinta" "#varsinais-suomi" "#verkkopalvelut")
|
||||
|
||||
for i in "${arr[@]}"
|
||||
do
|
||||
echo "/msg ChanServ set $i ENTRYMSG Lähettämällä viestin kanavalle suostut nimimerkkisi ja viestisi julkaisemiseen, sekä Telegrammiin ja Discordiin lähettämiseksi. Se tieto on https://telegram.org/privacy ja https://discordapp.com/privacy alaista sieltäen liittyvät datan tallennuskäytännöt."
|
||||
for i in "${arr[@]}"; do
|
||||
echo "/msg ChanServ set $i ENTRYMSG Lähettämällä viestin kanavalle suostut nimimerkkisi ja viestisi julkaisemiseen, sekä Telegrammiin ja Discordiin lähettämiseksi. Se tieto on https://telegram.org/privacy ja https://discordapp.com/privacy alaista sieltäen liittyvät datan tallennuskäytännöt."
|
||||
done
|
||||
|
||||
# English speaking channels
|
||||
declare -a arr=("#ppfi" "#ypfi")
|
||||
|
||||
for i in "${arr[@]}"
|
||||
do
|
||||
echo "/msg ChanServ set $i ENTRYMSG By sending messages to this channel you consent to your nick and message being published and transmitted to Telegram and Discord. That information is subject to https://telegram.org/privacy and https://discordapp.com/privacy including relevant data retention policies."
|
||||
for i in "${arr[@]}"; do
|
||||
echo "/msg ChanServ set $i ENTRYMSG By sending messages to this channel you consent to your nick and message being published and transmitted to Telegram and Discord. That information is subject to https://telegram.org/privacy and https://discordapp.com/privacy including relevant data retention policies."
|
||||
done
|
||||
|
@ -4,17 +4,15 @@
|
||||
# Purpose: mass setting entrymsgs
|
||||
|
||||
# Finnish speaking channels
|
||||
declare -a arr=("#aaltopiraatit" "#akateemisetpiraatit" "#aktiivit" "#antikupla" "#grafiikka" "#hallituskokous" "#hame" "#helsinki" "#hepihalko" "#kaakko" "#keski-suomi" "#likakaivo" "#mediaseuranta" "#messi" "#Mikaela" "#pinu" "#pinu-hallitus" "#pinuhalko" "#pinu_hallitus" "#piraatit" "#piraattinuoret" "#piraattipuolue" "#piraattivpn" "#pirkanmaa" "#politiikka" "#ppfi-chanacs-abuse" "#puoluehallitus" "#puoluekokous" "#puoluetoimisto" "#purje" "#satakunta" "#sateenkaaripiraatit" "#savo-karjala" "#sivusto" "#syotteet" "#test" "#toiminta" "#tulevaisuus" "#uusimaa" "#vaaliteltta" "#vaasa" "#varainhankinta" "#varsinais-suomi" "#verkkopalvelut")
|
||||
declare -a arr=("#aaltopiraatit" "#akateemisetpiraatit" "#aktiivit" "#antikupla" "#grafiikka" "#hallituskokous" "#hame" "#helsinki" "#hepihalko" "#kaakko" "#keski-suomi" "#likakaivo" "#mediaseuranta" "#messi" "#Mikaela" "#pinu" "#pinu-hallitus" "#pinuhalko" "#pinu_hallitus" "#piraatit" "#piraattinuoret" "#piraattipuolue" "#piraattivpn" "#pirkanmaa" "#politiikka" "#ppfi-chanacs-abuse" "#puoluehallitus" "#puoluekokous" "#puoluetoimisto" "#purje" "#satakunta" "#sateenkaaripiraatit" "#savo-karjala" "#sivusto" "#syotteet" "#test" "#toiminta" "#tulevaisuus" "#uusimaa" "#vaaliteltta" "#vaasa" "#varainhankinta" "#varsinais-suomi" "#verkkopalvelut")
|
||||
|
||||
for i in "${arr[@]}"
|
||||
do
|
||||
echo "/msg ChanServ set $i KEEPTOPIC ON"
|
||||
for i in "${arr[@]}"; do
|
||||
echo "/msg ChanServ set $i KEEPTOPIC ON"
|
||||
done
|
||||
|
||||
# English speaking channels
|
||||
declare -a arr=("#ppfi" "#ypfi")
|
||||
|
||||
for i in "${arr[@]}"
|
||||
do
|
||||
echo "/msg ChanServ set $i KEEPTOPIC ON"
|
||||
for i in "${arr[@]}"; do
|
||||
echo "/msg ChanServ set $i KEEPTOPIC ON"
|
||||
done
|
||||
|
@ -5,10 +5,9 @@
|
||||
declare -a arr=("janneone" "mbrsk" "mielipuoli" "nyos" "usvi" "vhautaka" "yaamboo" "lash-" "d200b" "talikka" "arimartti" "scoffa")
|
||||
|
||||
## now loop through the above array
|
||||
for i in "${arr[@]}"
|
||||
do
|
||||
echo "/msg GroupServ invite !ppfi-aktiivit $i"
|
||||
# or do whatever with individual element of the array
|
||||
for i in "${arr[@]}"; do
|
||||
echo "/msg GroupServ invite !ppfi-aktiivit $i"
|
||||
# or do whatever with individual element of the array
|
||||
done
|
||||
|
||||
# You can access them using echo "${arr[0]}", "${arr[1]}" also
|
||||
|
@ -2,13 +2,12 @@
|
||||
# Copied from https://stackoverflow.com/a/8880633 except the nicks
|
||||
|
||||
## declare an array variable
|
||||
declare -a arr=("#aaltopiraatit" "#grafiikka" "#hallituskokous" "#hame" "#helsinki" "#hepihalko" "#kaakko" "#keski-suomi" "#mediaseuranta" "#pinu_hallitus" "#piraatit" "#piraattinuoret" "#piraattipuolue" "#piraattivpn" "#pirkanmaa" "#ppfi" "#sateenkaaripiraatit" "#sivusto" "#toiminta" "#tyoryhmaorganisaatiomalli" "#uusimaa" "#vaaliteltta" "#varainhankinta" "#varsinais-suomi" "#verkkopalvelut" "#mikaela" )
|
||||
declare -a arr=("#aaltopiraatit" "#grafiikka" "#hallituskokous" "#hame" "#helsinki" "#hepihalko" "#kaakko" "#keski-suomi" "#mediaseuranta" "#pinu_hallitus" "#piraatit" "#piraattinuoret" "#piraattipuolue" "#piraattivpn" "#pirkanmaa" "#ppfi" "#sateenkaaripiraatit" "#sivusto" "#toiminta" "#tyoryhmaorganisaatiomalli" "#uusimaa" "#vaaliteltta" "#varainhankinta" "#varsinais-suomi" "#verkkopalvelut" "#mikaela")
|
||||
|
||||
## now loop through the above array
|
||||
for i in "${arr[@]}"
|
||||
do
|
||||
echo "/msg ChanServ flags $i !piraattibotit VOP"
|
||||
# or do whatever with individual element of the array
|
||||
for i in "${arr[@]}"; do
|
||||
echo "/msg ChanServ flags $i !piraattibotit VOP"
|
||||
# or do whatever with individual element of the array
|
||||
done
|
||||
|
||||
# You can access them using echo "${arr[0]}", "${arr[1]}" also
|
||||
|
@ -2,20 +2,18 @@
|
||||
# Copied from https://stackoverflow.com/a/8880633 except the nicks
|
||||
|
||||
## declare an array variable
|
||||
declare -a arr=("#aaltopiraatit" "#grafiikka" "#hame" "#helsinki" "#hepihalko" "#kaakko" "#keski-suomi" "#mediaseuranta" "#pinu_hallitus" "#piraatit" "#piraattinuoret" "#piraattipuolue" "#piraattivpn" "#pirkanmaa" "#ppfi" "#sateenkaaripiraatit" "#sivusto" "#toiminta" "#tyoryhmaorganisaatiomalli" "#uusimaa" "#vaaliteltta" "#varainhankinta" "#varsinais-suomi" "#verkkopalvelut" "#mikaela" )
|
||||
declare -a arr=("#aaltopiraatit" "#grafiikka" "#hame" "#helsinki" "#hepihalko" "#kaakko" "#keski-suomi" "#mediaseuranta" "#pinu_hallitus" "#piraatit" "#piraattinuoret" "#piraattipuolue" "#piraattivpn" "#pirkanmaa" "#ppfi" "#sateenkaaripiraatit" "#sivusto" "#toiminta" "#tyoryhmaorganisaatiomalli" "#uusimaa" "#vaaliteltta" "#varainhankinta" "#varsinais-suomi" "#verkkopalvelut" "#mikaela")
|
||||
|
||||
## now loop through the above array
|
||||
for i in "${arr[@]}"
|
||||
do
|
||||
echo "/msg ChanServ flags $i \$registered +VA"
|
||||
# or do whatever with individual element of the array
|
||||
for i in "${arr[@]}"; do
|
||||
echo "/msg ChanServ flags $i \$registered +VA"
|
||||
# or do whatever with individual element of the array
|
||||
done
|
||||
|
||||
## now loop through the above array
|
||||
for i in "${arr[@]}"
|
||||
do
|
||||
echo "/msg ChanServ flags $i *!*@gateway/bridge/matrix/diasp.in +VA"
|
||||
# or do whatever with individual element of the array
|
||||
for i in "${arr[@]}"; do
|
||||
echo "/msg ChanServ flags $i *!*@gateway/bridge/matrix/diasp.in +VA"
|
||||
# or do whatever with individual element of the array
|
||||
done
|
||||
|
||||
# You can access them using echo "${arr[0]}", "${arr[1]}" also
|
||||
|
@ -2,20 +2,18 @@
|
||||
# Copied from https://stackoverflow.com/a/8880633 except the nicks
|
||||
|
||||
## declare an array variable
|
||||
declare -a arr=("#aaltopiraatit" "#grafiikka" "#hame" "#helsinki" "#hepihalko" "#kaakko" "#keski-suomi" "#mediaseuranta" "#pinu_hallitus" "#piraatit" "#piraattinuoret" "#piraattipuolue" "#piraattivpn" "#pirkanmaa" "#ppfi" "#sateenkaaripiraatit" "#sivusto" "#toiminta" "#tyoryhmaorganisaatiomalli" "#uusimaa" "#vaaliteltta" "#varainhankinta" "#varsinais-suomi" "#verkkopalvelut" "#mikaela" )
|
||||
declare -a arr=("#aaltopiraatit" "#grafiikka" "#hame" "#helsinki" "#hepihalko" "#kaakko" "#keski-suomi" "#mediaseuranta" "#pinu_hallitus" "#piraatit" "#piraattinuoret" "#piraattipuolue" "#piraattivpn" "#pirkanmaa" "#ppfi" "#sateenkaaripiraatit" "#sivusto" "#toiminta" "#tyoryhmaorganisaatiomalli" "#uusimaa" "#vaaliteltta" "#varainhankinta" "#varsinais-suomi" "#verkkopalvelut" "#mikaela")
|
||||
|
||||
## now loop through the above array
|
||||
for i in "${arr[@]}"
|
||||
do
|
||||
echo "/msg ChanServ flags $i \$registered -VA"
|
||||
# or do whatever with individual element of the array
|
||||
for i in "${arr[@]}"; do
|
||||
echo "/msg ChanServ flags $i \$registered -VA"
|
||||
# or do whatever with individual element of the array
|
||||
done
|
||||
|
||||
## now loop through the above array
|
||||
for i in "${arr[@]}"
|
||||
do
|
||||
echo "/msg ChanServ flags $i *!*@gateway/bridge/matrix/diasp.in -VA"
|
||||
# or do whatever with individual element of the array
|
||||
for i in "${arr[@]}"; do
|
||||
echo "/msg ChanServ flags $i *!*@gateway/bridge/matrix/diasp.in -VA"
|
||||
# or do whatever with individual element of the array
|
||||
done
|
||||
|
||||
# You can access them using echo "${arr[0]}", "${arr[1]}" also
|
||||
|
@ -3,12 +3,12 @@
|
||||
|
||||
# loop through all vcard files
|
||||
for vcard in *.vcard; do
|
||||
if [ -f "$vcard" ]; then
|
||||
# -l H - high error correction
|
||||
# -t utf8 - output to terminal
|
||||
# -r - read file
|
||||
# -o output file
|
||||
qrencode -l H -t utf8 -r $vcard
|
||||
qrencode -l H -o $vcard.png -r $vcard
|
||||
fi
|
||||
if [ -f "$vcard" ]; then
|
||||
# -l H - high error correction
|
||||
# -t utf8 - output to terminal
|
||||
# -r - read file
|
||||
# -o output file
|
||||
qrencode -l H -t utf8 -r $vcard
|
||||
qrencode -l H -o $vcard.png -r $vcard
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user