This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remember to create your own user and password before deleting everything with useradd -m <user> and passwd <user> | |
sudo pacman -Rnsc gtk-update-icon-cache qt5-base wayland xorg-server xorg-server-common xorg-xprop chromium calamares audacious clonezilla gtk2 gtk3 gtk4 karchive kauth kconfig gtk2 gtk3 gtk4 xfce4 lightdm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check logs size of containers, sorted by size and show total usage | |
sudo du -ch $(docker inspect --format='{{.LogPath}}' $(docker ps -qa)) | sort -h | sed 's/\/var\/lib\/docker\/containers\///' | awk '{if ($1 != "total") {split($NF, arr, "/"); id = arr[1]; print $1 " " $2 " " id} else {print $1 " " $2 " " $1}}' | while read size unit id; do if [ "$size" != "total" ]; then name=$(docker ps --format "{{.Names}}" --filter id=$id); echo "$size $unit $name"; else echo "$size $unit $id"; fi; done | |
# Check all volumes and images sizes | |
docker system df -v |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You may need to run this every time you boot a new kernel | |
sudo apt install --reinstall bcmwl-kernel-source; sudo modprobe -rv bcma; sudo modprobe -v wl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FILES=$1*.*g | |
REGEX='.*(\d{4})-?(\d{2})-?(\d{2})(?>-|_|\s(?>at\s)?)(\d{2})(?>\.|-)?(\d{2})(?>\.|-)?(\d{2}).*' | |
for f in $FILES | |
do | |
echo -n "$f:" | |
date=$(echo "$f" | perl -ne 'print if m/'"$REGEX"'/' | perl -pe 's/'"$REGEX"'\..*/"$1:$2:$3 $4:$5:$6"/g') | |
if [ -n "$date" ]; then | |
echo $date |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
help() | |
{ | |
echo "Usage: reboot_genexis [ -p | --password (REQUIRED) ] | |
[ -u | --user default: user] | |
[ -h | --host default: 192.168.1.1 ] | |
[ --help ]" | |
exit 2 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This will recreate timestamps on the stream allowing avidemux to export the file. Note that the output has to be a Matroska container. | |
ffmpeg -start_at_zero -copyts -i input_file.ts -map 0:v -c copy -map 0:a:0 output_file.mkv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Filename: grab-magnets-from-watchdir.custom-cont-init-script | |
# Save this file in /config/custom-cont-init.d/ | |
# This way it will run everytime the container is created and will add the crontab entry and transmission authentication | |
# Save env files to get authentication | |
printenv | sed 's/^\(.*\)$/export \1/g' > /root/container.env | |
# Add entry to crontab, runs every minute | |
echo '* * * * * . /root/container.env; /config/grab-magnets-from-watchdir.sh' >> /etc/crontabs/root |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This line generates a self signed SSL certificate and key without user intervention. | |
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes -subj "/C=AU/ST=Some-State/L=Sydney/O=Internet/OU=./CN=./emailAddress=." |