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/bash | |
uname -r # Get installed kernels - make sure that there is at least one more kernel than the one you're removing! | |
sudo rpm -e kernel-6.7.0_rc6_pvm_host_fedora_baremetal-1.x86_64 | |
sudo grub2-mkconfig -o /boot/grub2/grub.cfg | |
sudo reboot |
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
#include <bits/time.h> | |
#include <fcntl.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/mman.h> | |
#include <time.h> | |
#include <unistd.h> | |
int main() { | |
const size_t page_size = 4096 * 64; |
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
# Also see: https://passt.top/passt/about/ for an alternative setup | |
# In first terminal (namespace 1) | |
unshare --user --map-root-user --net --mount | |
echo $$ > /tmp/pid | |
# In second terminal | |
# For port-forwarding: http://web.archive.org/web/20240112152726/https://rootlesscontaine.rs/how-it-works/netns/incoming/ for port-forwarding | |
# For communicating between different slirp4netns instances: https://github.com/rootless-containers/slirp4netns/blob/master/slirp4netns.1.md#inter-namespace-communication | |
slirp4netns --configure --mtu=65520 --disable-host-loopback --macaddress 26:87:71:8f:6f:57 --outbound-addr 100.111.168.3 --outbound-addr6 fd7a:115c:a1e0::1def:a803 --enable-ipv6 $(cat /tmp/pid) tap0 |
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/bash | |
sudo su -c 'for file in /dev/nbd*; do nbd-client -d $file & done; wait' |
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/bash | |
pmbootstrap pkgrel_bump --auto |
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/bash | |
# Note that you _have_ to copy the quotation marks around the return value of this into the value field of the DNS settings | |
# You can set the return value like this (note the quotation marks): strato-dkim-0002._domainkey.pojtinger.com. 1 IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt3a1nbhQdD0MtbPT1r8DGZefoQlj3fSgtWdINsXsRl55OmOAf2QNR8B0SwC59dWqA+isuH/bQnU0f0OmO5A7p+cyfT9EekbWslP575NAnAYpsUJlBv/0O8qA6T/cLoDz6LsUYv000gFRqSSUe1BZnJ/sjg0f96UCkomT1aQRpSUS" "DwNYCqpQKQ/fWg9IS2fL+d2kR1rckqwoKdgbEtjr4i+ICn2SUodI1KkGusIivuBueMYfDh8RGYKvFv40UZlBSfuX71GkzEPvQPnQTfXLqM9F8q1kWq/mdWYy5R0KrWptAnuAmCZqujkgWmcqzLoTMln04oOxGFp/zkf8iA75lwIDAQAB" | |
dig strato-dkim-0002._domainkey.strato.com TXT +short @shades09.rzone.de |
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/bash | |
DEVICE="/dev/input/event4" # Replace with your actual device | |
COMMAND="echo 'Touch detected'" # Replace with the command you want to run | |
sudo evtest "$DEVICE" | while read line; do | |
if echo "$line" | grep -q "EV_KEY"; then # Adjust based on actual output for a touch event | |
eval "$COMMAND" | |
fi | |
done |
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/bash | |
# Note: This doesn't work yet. | |
socat tcp:128.140.106.133:1338,forever,interval=2,fork tcp:127.0.0.1:7000 | |
pactl load-module module-native-protocol-tcp port=7000 listen=127.0.0.1 | |
socat tcp-listen:7001,reuseaddr,fork tcp-listen:1338,reuseaddr | |
pactl load-module module-tunnel-sink server=tcp:127.0.0.1:7001 |
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/bash | |
# Without gender changer (server dials client on port 1337) | |
# On client | |
waypipe --socket /tmp/waypipe-remote.sock client | |
socat TCP-LISTEN:1337,reuseaddr,fork UNIX-CONNECT:/tmp/waypipe-remote.sock | |
# On server | |
socat UNIX-LISTEN:/tmp/waypipe-local.sock,reuseaddr,fork TCP:127.0.0.1:1337 |
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/bash | |
find / -type f -exec du -h {} + 2>/dev/null | sort -rh | head -n 20 |
NewerOlder