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
| # Since last upgrade | |
| tac /var/log/pacman.log | sed -n '/full system upgrade/q;s/.*\[ALPM\] upgraded //p' | |
| # Last 40 entries in pacman.log | |
| expac --timefmt='%Y-%m-%d %T' '%l\t%n' | sort -hr | head -40 |
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 | |
| # trim all supported mounted filesystems from /etc/fstab | |
| sudo fstrim --fstab --verbose |
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
| export PS1="\[$(tput bold)\]\[$(tput setaf 1)\][\[$(tput setaf 3)\]\u\[$(tput setaf 2)\]@\[$(tput setaf 4)\]\h \[$(tput setaf 5)\]\W\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]" |
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 | |
| onair=$(curl -s https://www.lbc.co.uk | xmllint --html --nowarning --xpath '//section/div/span/a[1]/text()' - | tail -c 25) | |
| echo $onair |
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
| # Remove old rules from /etc/ufw | |
| #!/bin/bash | |
| sudo rm /etc/ufw/after6.rules.2* | |
| sudo rm /etc/ufw/after.rules.2* | |
| sudo rm /etc/ufw/before6.rules.2* | |
| sudo rm /etc/ufw/before.rules.2* | |
| sudo rm /etc/ufw/user6.rules.2* | |
| sudo rm /etc/ufw/user.rules.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
| #!/bin/bash | |
| sudo ufw reset | |
| sudo ufw default deny incoming | |
| sudo ufw default allow outgoing | |
| sudo ufw allow 1714:1764/udp | |
| sudo ufw allow 1714:1764/tcp | |
| sudo ufw allow 22/tcp | |
| sudo ufw allow in 139,445/tcp | |
| sudo ufw allow in 137,138/tcp |
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 | |
| sudo ufw reset | |
| sudo ufw default deny incoming | |
| sudo ufw default deny outgoing | |
| sudo ufw allow 1714:1764/udp | |
| sudo ufw allow 1714:1764/tcp | |
| sudo ufw allow 22/tcp | |
| sudo ufw allow 5556/tcp | |
| sudo ufw allow 5558/tcp |
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 | |
| current=$(pacmd list-sinks |grep active) | |
| #switch to speakers | |
| if [[ $current == *"headphones"* ]]; then | |
| pacmd set-sink-port 0 analog-output-lineout | |
| amixer -c 0 sset "Auto-Mute Mode" Disabled | |
| #switch to headphones | |
| elif [[ $current == *"lineout"* ]]; then |
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
| # Increase or decrease audio via commandline by percent + or - | |
| amixer -D pulse sset Master 5%- |
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
| ffmpeg -v quiet -f x11grab -video_size 1920x1080 -i :0 -f alsa -i default -c:v libx264 -vf scale=1280x720 -b:v 1280K -minrate 2560K -maxrate 2560K -bufsize 1280K -c:a ac3 -b:a 384K -ac 2 -strict -2 "video.mkv" |