Skip to content

Instantly share code, notes, and snippets.

@hbro
hbro / randompp.sh
Created November 6, 2023 14:39
Random Passphrase Generator
#!/usr/bin/env bash
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
amount=${1:-1}
# curl -s 'https://raw.githubusercontent.com/first20hours/google-10000-english/master/google-10000-english-no-swears.txt' | awk 'length($0) > 6 && length($0) < 12' > passphrase-words.txt
source='passphrase-words.txt'
for n in $(seq 1 $amount); do
pw=''
@hbro
hbro / ToyotaScraper.py
Created March 20, 2017 14:06
Scraper for www.toyotacertified.be (used Toyota cars search engine).
from selenium import webdriver
from selenium.webdriver.support.ui import Select
import csv
import re
import os.path
import time
import datetime
import smtplib
from email.mime.text import MIMEText
@hbro
hbro / ImmowebScraper.py
Last active June 8, 2021 17:33
Scrape an Immoweb search URL and e-mail any new results.
#!/usr/bin/python3
# Usage:
# - Fill in the settings, then run with `python3 ImmowebScraper.py`.
# - First run won't send any mails (or you'd get dozens at once).
# Requirements:
# - python3
# - selenium
# - phantomjs
import sqlite3
#!/usr/bin/python3
# BestHomeLocationFinder by Hans Broeckx <hans.broeckx@gmail.com>
# DEPENDANCIES: bokeh, numpy, googlemaps
# USAGE: Fill in some points of interest latitude and longitude coordinates, max driving time and max car speed. Run the script.
# A few more settings are available in the Settings section.
# WARNING: This script uses the Google Maps Distance Matrix API (free API keys get 2500 request / day).
@hbro
hbro / screenrc
Created April 23, 2015 09:45
Simply add a status bar to screen
# show me some status bar
hardstatus off
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m-%d %{W} %c %{g}]'
@hbro
hbro / fail2ban-downloader.sh
Created April 23, 2015 09:34
Simple Fail2Ban download script for Trixbox installations
#!/bin/bash
####################################################
# Script written by Cédric Brohée @09/09/10 - UPDATED 030512 with new source
# +32-71-49206
# Gateway Communications
# http://www.gatewaycomms.com
####################################################
echo "################################################################"
@hbro
hbro / keybase.md
Last active May 30, 2017 10:22
Keybase authentication

Keybase proof

I hereby claim:

  • I am hbro on github.
  • I am hbro (https://keybase.io/hbro) on keybase.
  • I have a public key whose fingerprint is DC35 6508 539A 6B61 263D B5B1 E024 7A87 1608 5014

To claim this, I am signing this object: