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:
|
hooks:
|
||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
- id: check-case-conflict
|
- id: check-case-conflict
|
||||||
|
- id: check-yaml
|
||||||
- id: check-executables-have-shebangs
|
- id: check-executables-have-shebangs
|
||||||
- id: check-shebang-scripts-are-executable
|
- id: check-shebang-scripts-are-executable
|
||||||
- id: destroyed-symlinks
|
- id: destroyed-symlinks
|
||||||
@ -31,6 +32,11 @@ repos:
|
|||||||
rev: "v3.0.0-alpha.9-for-vscode"
|
rev: "v3.0.0-alpha.9-for-vscode"
|
||||||
hooks:
|
hooks:
|
||||||
- id: prettier
|
- 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
|
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
|
||||||
rev: "2.7.1"
|
rev: "2.7.1"
|
||||||
hooks:
|
hooks:
|
||||||
|
@ -5,7 +5,7 @@ CHTDIR=~/PS2/CHT
|
|||||||
mkdir -p $CHTDIR
|
mkdir -p $CHTDIR
|
||||||
|
|
||||||
for chtfile in *.cht; do
|
for chtfile in *.cht; do
|
||||||
cat $chtfile > $CHTDIR/$chtfile
|
cat $chtfile >$CHTDIR/$chtfile
|
||||||
done
|
done
|
||||||
|
|
||||||
chmod -R 777 $CHTDIR
|
chmod -R 777 $CHTDIR
|
||||||
|
@ -19,8 +19,8 @@ chmod -R 777 $BACKUPDIR
|
|||||||
|
|
||||||
# If duperemove is installed, perform FS based deduplication of backups
|
# If duperemove is installed, perform FS based deduplication of backups
|
||||||
if hash duperemove 2>/dev/null; then
|
if hash duperemove 2>/dev/null; then
|
||||||
# recursive, dedupe, human-readable, hashfile is like ddrescue mapfile
|
# recursive, dedupe, human-readable, hashfile is like ddrescue mapfile
|
||||||
duperemove -rdh --hashfile=$BACKUPDIR/duperemove.hashfile $BACKUPDIR/
|
duperemove -rdh --hashfile=$BACKUPDIR/duperemove.hashfile $BACKUPDIR/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Curiosity, show the space used
|
# Curiosity, show the space used
|
||||||
|
@ -4,17 +4,15 @@
|
|||||||
# Purpose: mass setting entrymsgs
|
# Purpose: mass setting entrymsgs
|
||||||
|
|
||||||
# Finnish speaking channels
|
# 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[@]}"
|
for i in "${arr[@]}"; do
|
||||||
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."
|
||||||
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
|
done
|
||||||
|
|
||||||
# English speaking channels
|
# English speaking channels
|
||||||
declare -a arr=("#ppfi" "#ypfi")
|
declare -a arr=("#ppfi" "#ypfi")
|
||||||
|
|
||||||
for i in "${arr[@]}"
|
for i in "${arr[@]}"; do
|
||||||
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."
|
||||||
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
|
done
|
||||||
|
@ -4,17 +4,15 @@
|
|||||||
# Purpose: mass setting entrymsgs
|
# Purpose: mass setting entrymsgs
|
||||||
|
|
||||||
# Finnish speaking channels
|
# 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[@]}"
|
for i in "${arr[@]}"; do
|
||||||
do
|
echo "/msg ChanServ set $i KEEPTOPIC ON"
|
||||||
echo "/msg ChanServ set $i KEEPTOPIC ON"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# English speaking channels
|
# English speaking channels
|
||||||
declare -a arr=("#ppfi" "#ypfi")
|
declare -a arr=("#ppfi" "#ypfi")
|
||||||
|
|
||||||
for i in "${arr[@]}"
|
for i in "${arr[@]}"; do
|
||||||
do
|
echo "/msg ChanServ set $i KEEPTOPIC ON"
|
||||||
echo "/msg ChanServ set $i KEEPTOPIC ON"
|
|
||||||
done
|
done
|
||||||
|
@ -5,10 +5,9 @@
|
|||||||
declare -a arr=("janneone" "mbrsk" "mielipuoli" "nyos" "usvi" "vhautaka" "yaamboo" "lash-" "d200b" "talikka" "arimartti" "scoffa")
|
declare -a arr=("janneone" "mbrsk" "mielipuoli" "nyos" "usvi" "vhautaka" "yaamboo" "lash-" "d200b" "talikka" "arimartti" "scoffa")
|
||||||
|
|
||||||
## now loop through the above array
|
## now loop through the above array
|
||||||
for i in "${arr[@]}"
|
for i in "${arr[@]}"; do
|
||||||
do
|
echo "/msg GroupServ invite !ppfi-aktiivit $i"
|
||||||
echo "/msg GroupServ invite !ppfi-aktiivit $i"
|
# or do whatever with individual element of the array
|
||||||
# or do whatever with individual element of the array
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# You can access them using echo "${arr[0]}", "${arr[1]}" also
|
# 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
|
# Copied from https://stackoverflow.com/a/8880633 except the nicks
|
||||||
|
|
||||||
## declare an array variable
|
## 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
|
## now loop through the above array
|
||||||
for i in "${arr[@]}"
|
for i in "${arr[@]}"; do
|
||||||
do
|
echo "/msg ChanServ flags $i !piraattibotit VOP"
|
||||||
echo "/msg ChanServ flags $i !piraattibotit VOP"
|
# or do whatever with individual element of the array
|
||||||
# or do whatever with individual element of the array
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# You can access them using echo "${arr[0]}", "${arr[1]}" also
|
# 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
|
# Copied from https://stackoverflow.com/a/8880633 except the nicks
|
||||||
|
|
||||||
## declare an array variable
|
## 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
|
## now loop through the above array
|
||||||
for i in "${arr[@]}"
|
for i in "${arr[@]}"; do
|
||||||
do
|
echo "/msg ChanServ flags $i \$registered +VA"
|
||||||
echo "/msg ChanServ flags $i \$registered +VA"
|
# or do whatever with individual element of the array
|
||||||
# or do whatever with individual element of the array
|
|
||||||
done
|
done
|
||||||
|
|
||||||
## now loop through the above array
|
## now loop through the above array
|
||||||
for i in "${arr[@]}"
|
for i in "${arr[@]}"; do
|
||||||
do
|
echo "/msg ChanServ flags $i *!*@gateway/bridge/matrix/diasp.in +VA"
|
||||||
echo "/msg ChanServ flags $i *!*@gateway/bridge/matrix/diasp.in +VA"
|
# or do whatever with individual element of the array
|
||||||
# or do whatever with individual element of the array
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# You can access them using echo "${arr[0]}", "${arr[1]}" also
|
# 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
|
# Copied from https://stackoverflow.com/a/8880633 except the nicks
|
||||||
|
|
||||||
## declare an array variable
|
## 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
|
## now loop through the above array
|
||||||
for i in "${arr[@]}"
|
for i in "${arr[@]}"; do
|
||||||
do
|
echo "/msg ChanServ flags $i \$registered -VA"
|
||||||
echo "/msg ChanServ flags $i \$registered -VA"
|
# or do whatever with individual element of the array
|
||||||
# or do whatever with individual element of the array
|
|
||||||
done
|
done
|
||||||
|
|
||||||
## now loop through the above array
|
## now loop through the above array
|
||||||
for i in "${arr[@]}"
|
for i in "${arr[@]}"; do
|
||||||
do
|
echo "/msg ChanServ flags $i *!*@gateway/bridge/matrix/diasp.in -VA"
|
||||||
echo "/msg ChanServ flags $i *!*@gateway/bridge/matrix/diasp.in -VA"
|
# or do whatever with individual element of the array
|
||||||
# or do whatever with individual element of the array
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# You can access them using echo "${arr[0]}", "${arr[1]}" also
|
# You can access them using echo "${arr[0]}", "${arr[1]}" also
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
|
|
||||||
# loop through all vcard files
|
# loop through all vcard files
|
||||||
for vcard in *.vcard; do
|
for vcard in *.vcard; do
|
||||||
if [ -f "$vcard" ]; then
|
if [ -f "$vcard" ]; then
|
||||||
# -l H - high error correction
|
# -l H - high error correction
|
||||||
# -t utf8 - output to terminal
|
# -t utf8 - output to terminal
|
||||||
# -r - read file
|
# -r - read file
|
||||||
# -o output file
|
# -o output file
|
||||||
qrencode -l H -t utf8 -r $vcard
|
qrencode -l H -t utf8 -r $vcard
|
||||||
qrencode -l H -o $vcard.png -r $vcard
|
qrencode -l H -o $vcard.png -r $vcard
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user