mirror of
https://gitea.blesmrt.net/mikaela/scripts.git
synced 2025-08-20 05:17:20 +02:00
Compare commits
No commits in common. "3c0e9924a08294e1f2de94317c11ea601be760fc" and "f7b8a40b2834ca0beb45276cbdc77848ef189a89" have entirely different histories.
3c0e9924a0
...
f7b8a40b28
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,6 +1,3 @@
|
|||||||
[submodule "submodules/gist"]
|
[submodule "submodules/gist"]
|
||||||
path = submodules/gist
|
path = submodules/gist
|
||||||
url = https://gitea.blesmrt.net/mikaela/gist.git
|
url = https://gitea.blesmrt.net/mikaela/gist.git
|
||||||
[submodule "submodules/PPFI-Pikaviestimet"]
|
|
||||||
path = submodules/PPFI-Pikaviestimet
|
|
||||||
url = https://git.piraattipuolue.fi/Pikaviestimet/Pikaviestimet.git
|
|
||||||
|
@ -40,11 +40,6 @@ repos:
|
|||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
#- id: black-jupyter
|
#- id: black-jupyter
|
||||||
- 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:
|
||||||
|
2
bash/.gitignore
vendored
2
bash/.gitignore
vendored
@ -8,5 +8,3 @@ forgejo-*
|
|||||||
backup-ops2l-vmc.bash
|
backup-ops2l-vmc.bash
|
||||||
generate-vcard-qr.bash
|
generate-vcard-qr.bash
|
||||||
install-cht.bash
|
install-cht.bash
|
||||||
gist-irc-piraatit
|
|
||||||
PPFI-IM-IRC
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
../submodules/PPFI-Pikaviestimet/irc/
|
|
@ -4,7 +4,8 @@
|
|||||||
# installations. I am too lazy to always do this by hand!
|
# installations. I am too lazy to always do this by hand!
|
||||||
|
|
||||||
# Loop with the users
|
# Loop with the users
|
||||||
for user in mikaela matti tommi tiina nenne anneli; do
|
for user in mikaela matti tommi tiina nenne anneli
|
||||||
|
do
|
||||||
# To see that it works
|
# To see that it works
|
||||||
echo "Current user: $user"
|
echo "Current user: $user"
|
||||||
# Create the user & homedir if it doesn't exist
|
# Create the user & homedir if it doesn't exist
|
||||||
@ -20,7 +21,8 @@ for user in mikaela matti tommi tiina nenne anneli; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# And next sudoers
|
# And next sudoers
|
||||||
for sudoer in mikaela matti tommi tiina; do
|
for sudoer in mikaela matti tommi tiina
|
||||||
|
do
|
||||||
# Add the user to sudo group (as they are administrator)
|
# Add the user to sudo group (as they are administrator)
|
||||||
echo "Current sudoer: $sudoer"
|
echo "Current sudoer: $sudoer"
|
||||||
usermod -a -G wheel $sudoer
|
usermod -a -G wheel $sudoer
|
||||||
|
@ -22,7 +22,8 @@ if hash jami-gnome 2>/dev/null; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Telegram.org
|
# Telegram.org
|
||||||
if [ -f ~/.local/Telegram/Updater ]; then
|
if [ -f ~/.local/Telegram/Updater ]
|
||||||
|
then
|
||||||
(~/.local/Telegram/Updater -many -startintray&)
|
(~/.local/Telegram/Updater -many -startintray&)
|
||||||
else
|
else
|
||||||
if hash telegram-desktop 2>/dev/null; then
|
if hash telegram-desktop 2>/dev/null; then
|
||||||
|
@ -105,7 +105,8 @@ if hash needrestart 2>/dev/null; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Sedric workaround, located in this repo. I trust /root/
|
# Sedric workaround, located in this repo. I trust /root/
|
||||||
if [ -f /root/fixgrub.bash ]; then
|
if [ -f /root/fixgrub.bash ]
|
||||||
|
then
|
||||||
/root/fixgrub.bash
|
/root/fixgrub.bash
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
## Copy-paste the following to your crontab without the #
|
## Copy-paste the following to your crontab without the #
|
||||||
# */5 * * * * /usr/local/bin/ydns-simple >/dev/null 2>&1
|
# */5 * * * * /usr/local/bin/ydns-simple >/dev/null 2>&1
|
||||||
|
|
||||||
|
|
||||||
# yDNS details
|
# yDNS details
|
||||||
USEREMAIL=""
|
USEREMAIL=""
|
||||||
PASSWORD=""
|
PASSWORD=""
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
## Copy-paste the following to your crontab without the #
|
## Copy-paste the following to your crontab without the #
|
||||||
# */5 * * * * PATH_TO_HOME_DIRECTORY_HERE/.local/bin/ydns6 >/dev/null 2>&1
|
# */5 * * * * PATH_TO_HOME_DIRECTORY_HERE/.local/bin/ydns6 >/dev/null 2>&1
|
||||||
|
|
||||||
|
|
||||||
# yDNS details
|
# yDNS details
|
||||||
USEREMAIL=""
|
USEREMAIL=""
|
||||||
PASSWORD=""
|
PASSWORD=""
|
||||||
|
@ -3,7 +3,8 @@ VERSION=1.19.1-0
|
|||||||
PLATFORM=linux-amd64
|
PLATFORM=linux-amd64
|
||||||
|
|
||||||
# If the signature is already downloaded, don't redownload it
|
# If the signature is already downloaded, don't redownload it
|
||||||
if [ -f "forgejo-$VERSION-$PLATFORM.asc" ]; then
|
if [ -f "forgejo-$VERSION-$PLATFORM.asc" ]
|
||||||
|
then
|
||||||
printf "Forĝejo signature already downloaded.\n"
|
printf "Forĝejo signature already downloaded.\n"
|
||||||
else
|
else
|
||||||
printf "Downloading Forĝejo $VERSION-$PLATFORM signature…\n"
|
printf "Downloading Forĝejo $VERSION-$PLATFORM signature…\n"
|
||||||
@ -11,7 +12,8 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# If the binary is already downloaded, don't redownload it
|
# If the binary is already downloaded, don't redownload it
|
||||||
if [ -f "forgejo-$VERSION-$PLATFORM" ]; then
|
if [ -f "forgejo-$VERSION-$PLATFORM" ]
|
||||||
|
then
|
||||||
printf "Forĝejo already downloaded.\n"
|
printf "Forĝejo already downloaded.\n"
|
||||||
else
|
else
|
||||||
printf "Downloading Forĝejo $VERSION on $PLATFORM…\n"
|
printf "Downloading Forĝejo $VERSION on $PLATFORM…\n"
|
||||||
|
@ -9,7 +9,8 @@ set -x
|
|||||||
# This script is Fedora specific for now.
|
# This script is Fedora specific for now.
|
||||||
|
|
||||||
# There is no reason to run if dnf hasn't moved the proper config aside.
|
# There is no reason to run if dnf hasn't moved the proper config aside.
|
||||||
if [ -f /boot/efi/EFI/fedora/grub.cfg.rpmsave ]; then
|
if [ -f /boot/efi/EFI/fedora/grub.cfg.rpmsave ]
|
||||||
|
then
|
||||||
rm -f /boot/efi/EFI/fedora/grub.cfg.rpmsave
|
rm -f /boot/efi/EFI/fedora/grub.cfg.rpmsave
|
||||||
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
|
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
|
||||||
fi
|
fi
|
||||||
|
@ -1 +0,0 @@
|
|||||||
../submodules/gist/irc/piraatit/
|
|
@ -6,7 +6,8 @@ TORRENTS=$(transmission-remote -l | wc -l)
|
|||||||
CURRENT=1
|
CURRENT=1
|
||||||
|
|
||||||
# until $CURRENT equals $TORRENTS ?
|
# until $CURRENT equals $TORRENTS ?
|
||||||
until [ $CURRENT -gt $TORRENTS ]; do
|
until [ $CURRENT -gt $TORRENTS ]
|
||||||
|
do
|
||||||
# get the information for $CURRENT? Grep the magnet line and cut out the
|
# get the information for $CURRENT? Grep the magnet line and cut out the
|
||||||
# frist field ("Magnet: ") using awk?
|
# frist field ("Magnet: ") using awk?
|
||||||
transmission-remote -l -t $CURRENT -i | grep -i magnet | awk -F': ' '{print $2}'
|
transmission-remote -l -t $CURRENT -i | grep -i magnet | awk -F': ' '{print $2}'
|
||||||
|
@ -11,13 +11,16 @@ FlagsForFirefox="--ProfileManager $@"
|
|||||||
|
|
||||||
# Firefox (stable, beta) and signatures: https://releases.mozilla.org/pub/firefox/releases/
|
# Firefox (stable, beta) and signatures: https://releases.mozilla.org/pub/firefox/releases/
|
||||||
# Developer edition (and signatures): https://releases.mozilla.org/pub/devedition/releases/
|
# Developer edition (and signatures): https://releases.mozilla.org/pub/devedition/releases/
|
||||||
if [ -f ~/.local/firefox/firefox ]; then
|
if [ -f ~/.local/firefox/firefox ]
|
||||||
|
then
|
||||||
~/.local/firefox/firefox $FlagsForFirefox
|
~/.local/firefox/firefox $FlagsForFirefox
|
||||||
# Fallback to global wayland installation
|
# Fallback to global wayland installation
|
||||||
elif [ -f /usr/bin/firefox-wayland ]; then
|
elif [ -f /usr/bin/firefox-wayland ]
|
||||||
|
then
|
||||||
/usr/bin/firefox-wayland $FlagsForFirefox
|
/usr/bin/firefox-wayland $FlagsForFirefox
|
||||||
# Fallback to global installation
|
# Fallback to global installation
|
||||||
elif [ -f /usr/bin/firefox ]; then
|
elif [ -f /usr/bin/firefox ]
|
||||||
|
then
|
||||||
/usr/bin/firefox $FlagsForFirefox
|
/usr/bin/firefox $FlagsForFirefox
|
||||||
# Fallback to flatpak, don't care if it doesn't exist
|
# Fallback to flatpak, don't care if it doesn't exist
|
||||||
else
|
else
|
||||||
|
@ -5,9 +5,11 @@
|
|||||||
# bad.
|
# bad.
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
if [ -f /snap/bin/fluffychat ]; then
|
if [ -f /snap/bin/fluffychat ]
|
||||||
|
then
|
||||||
snap run fluffychat $@
|
snap run fluffychat $@
|
||||||
elif [ -f /var/lib/flatpak/exports/bin/im.fluffychat.Fluffychat ]; then
|
elif [ -f /var/lib/flatpak/exports/bin/im.fluffychat.Fluffychat ]
|
||||||
|
then
|
||||||
flatpak run im.fluffychat.Fluffychat $@
|
flatpak run im.fluffychat.Fluffychat $@
|
||||||
else
|
else
|
||||||
/usr/bin/fluffychat
|
/usr/bin/fluffychat
|
||||||
|
@ -5,7 +5,8 @@
|
|||||||
set -x
|
set -x
|
||||||
|
|
||||||
# Check if go is installed through snap
|
# Check if go is installed through snap
|
||||||
if [ -f /snap/bin/go ]; then
|
if [ -f /snap/bin/go ]
|
||||||
|
then
|
||||||
snap run go $@
|
snap run go $@
|
||||||
|
|
||||||
# Fallback to system installation
|
# Fallback to system installation
|
||||||
|
@ -10,13 +10,16 @@ export MOZ_ENABLE_WAYLAND=1
|
|||||||
FlagsForThunderbird="--ProfileManager $@"
|
FlagsForThunderbird="--ProfileManager $@"
|
||||||
|
|
||||||
# Thunderbird (stable, beta) and signatures: https://releases.mozilla.org/pub/thunderbird/releases/
|
# Thunderbird (stable, beta) and signatures: https://releases.mozilla.org/pub/thunderbird/releases/
|
||||||
if [ -f ~/.local/thunderbird/thunderbird ]; then
|
if [ -f ~/.local/thunderbird/thunderbird ]
|
||||||
|
then
|
||||||
~/.local/thunderbird/thunderbird $FlagsForThunderbird
|
~/.local/thunderbird/thunderbird $FlagsForThunderbird
|
||||||
# Fallback to global installation
|
# Fallback to global installation
|
||||||
elif [ -f /usr/bin/thunderbird-wayland ]; then
|
elif [ -f /usr/bin/thunderbird-wayland ]
|
||||||
|
then
|
||||||
/usr/bin/thunderbird-wayland $FlagsForThunderbird
|
/usr/bin/thunderbird-wayland $FlagsForThunderbird
|
||||||
# Fallback to global installation
|
# Fallback to global installation
|
||||||
elif [ -f /usr/bin/thunderbird ]; then
|
elif [ -f /usr/bin/thunderbird ]
|
||||||
|
then
|
||||||
/usr/bin/thunderbird $FlagsForThunderbird
|
/usr/bin/thunderbird $FlagsForThunderbird
|
||||||
# Fallback to flatpak, don't care if it doesn't exist
|
# Fallback to flatpak, don't care if it doesn't exist
|
||||||
else
|
else
|
||||||
|
@ -13,6 +13,7 @@ qrencode -l H -s $PIXELSIZE -o $1.png "WIFI:T:WPA;S:$1;P:$2;;"
|
|||||||
# Might as well jpg this too
|
# Might as well jpg this too
|
||||||
convert "$1".png "$1".jpg
|
convert "$1".png "$1".jpg
|
||||||
|
|
||||||
|
|
||||||
# Prints details
|
# Prints details
|
||||||
echo "SSID: $1"
|
echo "SSID: $1"
|
||||||
echo "Passphrase: $2"
|
echo "Passphrase: $2"
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 7da91232880f879b3f2feb0e6ca32432bfdcac35
|
|
@ -1 +1 @@
|
|||||||
Subproject commit fa9e8927c0b82f8b30209ef0c6a73d8a78d9f17c
|
Subproject commit a6f73dbad72d5958bec7e899bd27050f22b36a93
|
Loading…
x
Reference in New Issue
Block a user