Skip to content

Instantly share code, notes, and snippets.

#! /bin/bash
help () {
echo "Usage: $0 [MODE] URL
Modes:
music
video"
}
import time
from bs4 import BeautifulSoup
from selenium import webdriver
# Setup Selenium
driver = webdriver.Firefox()
driver.get("https://www.cat.com/de_DE/products/new/power-systems/industrial.html")
# Give Selenium 2 Secends to load the page
time.sleep(2)

Keybase proof

I hereby claim:

  • I am rbnis on github.
  • I am rbnht (https://keybase.io/rbnht) on keybase.
  • I have a public key ASCK0jKyvMjmjw1XFpQB_qjCHCQ0nidhBgHtpPP4ov7_ZAo

To claim this, I am signing this object:

@rbnis
rbnis / migration_mailserver.sh
Last active May 31, 2020 12:19
Migration code for my deployment from netcup to hetzner
#!/bin/bash
## Migration netcup / hetzner
### Mailserver
read -p "Don't use dry-run: [N|y]" answer
case "$answer" in
Yes|yes|Y|y) env="prod"
;;
No|no|N|n|"") env="test"
@rbnis
rbnis / autolist.sh
Last active June 26, 2018 13:37
Script to add ips trying to login mail server zu blacklist
#!/bin/bash
regexlog="passwd-file\([a-zA-Z0-9]*,\K[0-9.]*(?=\))"
regexip="(?:[0-9]*\.){3}[0-9]*"
list=blacklist
listexcept=blacklistexception
docker exec -i mail cat /var/log/mail/mail.log | grep -Po $regexlog | while read -r linelog ; do
if ! ipset test $list $linelog > /dev/null 2>&1 ; then
if ! ipset test $listexcept $linelog > /dev/null 2>&1 ; then