Skip to content

Instantly share code, notes, and snippets.

@jbinto
jbinto / howto-recover-google-authenticator-keys.txt
Created February 8, 2014 04:20
Recovering Google Authenticator keys from Android device for backup
### Last tested February 7 2014 on a Galaxy S3 (d2att) running Cyanogenmod 11 nightly, with Google Authenticator 2.49.
### Device with Google Authenticator must have root.
### Computer requires Android Developer Tools and SQLite 3.
### Connect your device in USB debugging mode.
$ cd /tmp
$ adb root
$ adb pull /data/data/com.google.android.apps.authenticator2/databases/databases
@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
@ryanpadilha
ryanpadilha / pg_search_conf_unaccented.sql
Created July 10, 2017 15:06
PostgreSQL - full-text search configuration
-- enable extensions
-- full-text search on postgresql
CREATE EXTENSION unaccent;
-- languages supported
CREATE TEXT SEARCH CONFIGURATION fr ( COPY = french );
ALTER TEXT SEARCH CONFIGURATION fr ALTER MAPPING
FOR hword, hword_part, word WITH unaccent, french_stem;
CREATE TEXT SEARCH CONFIGURATION en ( COPY = english );