This file contains 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
#!/usr/bin/env sh | |
# Download all I-Blocklist lists into a file | |
curl -s https://www.iblocklist.com/lists.php \ | |
| sed -n "s/.*value='\(http:.*\)'.*/'\1'/p" \ | |
| xargs curl -L \ | |
| gunzip \ | |
| egrep -v '^#' \ | |
| sort -u > iblocklist.p2p |
This file contains 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
perl -MPOSIX -MIO::Socket -We ' | |
my $s = IO::Socket::INET->new( | |
Proto => "udp", | |
LocalAddr => "0.0.0.0:162" | |
); | |
while ( $s->recv( $_, 65535 ) ) { | |
print strftime( "%F %T", localtime ), " ", $s->peerhost(), " $_\n"; | |
}' |
This file contains 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
--- dsdt.dsl.org 2017-02-11 16:34:15.627459663 +0100 | |
+++ dsdt.dsl 2017-02-11 16:34:47.727597598 +0100 | |
@@ -18,7 +18,7 @@ | |
* Compiler ID "INTL" | |
* Compiler Version 0x20110112 (537985298) | |
*/ | |
-DefinitionBlock ("", "DSDT", 2, "HPQOEM", "1909 ", 0x00000001) | |
+DefinitionBlock ("", "DSDT", 2, "HPQOEM", "1909 ", 0x00000002) | |
{ | |
/* |
This file contains 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
ytdl-format=bestvideo[ext=mp4][height<=1080]+bestaudio/best[ext=mp4]/best |
This file contains 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 | |
INTERFACE=$1 | |
ACTION=$2 | |
# DNS modification makes sense for active (up and vpn-up) interfaces only | |
[[ "${ACTION}" =~ up$ ]] || exit 0 | |
# Disable DNS default route for all interfaces to prefer global DNS | |
resolvectl default-route "${INTERFACE}" no |
This file contains 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" Intel driver in favor of the default modesetting driver | |
sudo pacman -R xf86-video-intel | |
# Disable vsync for Zoom for more smooth screen sharing experience | |
sudo rm /usr/bin/zoom | |
cat <<"EOF" > /tmp/zoom | |
#!/bin/sh | |
vblank_mode=0 /opt/zoom/ZoomLauncher "$@" | |
EOF |
This file contains 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
# Unmount mounted microSD card partitions, just in case | |
sudo umount /dev/mmcblk0p1 | |
sudo umount /dev/mmcblk0p2 | |
# Download the latest Raspbian and upload it to microSD card: https://www.raspberrypi.org/documentation/installation/installing-images/linux.md | |
wget https://downloads.raspberrypi.org/raspbian_lite_latest | |
unzip -p 2020-02-13-raspbian-buster-lite.zip | sudo dd of=/dev/mmcblk0 bs=4M conv=fsync status=progress | |
sync | |
sudo partprobe /dev/mmcblk0 |
This file contains 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
# Unmount mounted microSD card partitions, just in case | |
sudo umount /dev/mmcblk0p1 | |
sudo umount /dev/mmcblk0p2 | |
# Download the latest Ubuntu Server and upload it to microSD card: https://ubuntu.com/download/raspberry-pi | |
wget http://cdimage.ubuntu.com/releases/19.10.1/release/ubuntu-19.10.1-preinstalled-server-arm64+raspi3.img.xz | |
xzcat ubuntu-19.10.1-preinstalled-server-arm64+raspi3.img.xz | sudo dd of=/dev/mmcblk0 bs=4M conv=fsync status=progress | |
sync | |
sudo partprobe /dev/mmcblk0 |
This file contains 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
wget https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | |
chmod +x Storage.sh | |
sudo ./Storage.sh |
This file contains 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
sudo apt install dnsmasq | |
sudo tee -a /etc/dnsmasq.conf > /dev/null <<'EOF' | |
listen-address=::1,127.0.0.1 | |
cache-size=1000 | |
no-negcache | |
EOF | |
sudo systemctl restart dnsmasq |