Skip to content

Instantly share code, notes, and snippets.

@ginkgomzd
ginkgomzd / gen-pass.sh
Last active February 5, 2021 02:48
generate a strong password without string delimiters in it
#!/usr/bin/env bash
# generate a strong password without shell special characters
# defaults to 32 characters, overridden to a number passed as first arg
# uses xclip to copy to clipboard
# uses zenity to alert to desktop (from gnome-run-prompt)
gen_pass_length=32
if [ $# -eq 1 ]; then
gen_pass_length="$1"
@mpochron
mpochron / jail.local
Last active November 1, 2021 00:19
Maltrial - integration with Fail2ban
; /etc/fail2ban/jail.local
[maltrail-iptables]
enabled = true
filter = maltrail
bantime = 31536000
action = iptables-allports[name=MALTRAIL, protocol=all]
;action = vesta[name=MALTRAIL]
echo "logpath = /var/log/maltrail/$(ls -1t /var/log/maltrail | grep -E '^[^error.log]' | head -1)"
maxretry = 1
@chrisjhoughton
chrisjhoughton / proxy.apache.conf
Last active September 17, 2024 23:59
Sample Nginx reverse proxy to Apache set up for Wordpress.
<VirtualHost *:{PORT}>
ServerName www.yourdomain.com
ServerAdmin mail@domain.com
DocumentRoot /var/www/yourdir/
<Directory /var/www/yourdir>
Options Indexes FollowSymLinks
AllowOverride all
Order allow,deny
$('.example-countries .typeahead').typeahead({
name: 'countries',
prefetch: '../data/countries.json',
limit: 10
});