Skip to content

Instantly share code, notes, and snippets.

View patriciomg's full-sized avatar
🎖️
I may be slow to respond.

Don Pato patriciomg

🎖️
I may be slow to respond.
  • KK
  • Germany
View GitHub Profile
@Malvineous
Malvineous / google-authenticator.sh
Created October 1, 2017 09:11
Shell script to generate Google Authenticator codes
#!/bin/sh
# This is the path to the Google Authenticator app file. It's typically located
# in /data under Android. Copy it to your PC in a safe location and specify the
# path to it here.
DB="/path/to/com.google.android.apps.authenticator/databases/databases"
sqlite3 "$DB" 'SELECT email,secret FROM accounts;' | while read A
do
NAME=`echo "$A" | cut -d '|' -f 1`
@dvlop
dvlop / gist:fca36213ad6237891609e1e038a3bbc1
Last active March 16, 2025 05:51 — forked from allthingsdem/gist:63b3223a7d14ac1f2457
My long list of bad bots to block in htaccess, ready to copy and paste!
# Start Bad Bot Prevention
<IfModule mod_setenvif.c>
# SetEnvIfNoCase User-Agent ^$ bad_bot
SetEnvIfNoCase User-Agent "^12soso.*" bad_bot
SetEnvIfNoCase User-Agent "^192.comAgent.*" bad_bot
SetEnvIfNoCase User-Agent "^1Noonbot.*" bad_bot
SetEnvIfNoCase User-Agent "^1on1searchBot.*" bad_bot
SetEnvIfNoCase User-Agent "^3D_SEARCH.*" bad_bot
SetEnvIfNoCase User-Agent "^3DE_SEARCH2.*" bad_bot
SetEnvIfNoCase User-Agent "^3GSE.*" bad_bot
@technoknol
technoknol / site.conf
Created July 23, 2020 13:33
.NET core app with SignalR with SSL with Apache Reverse Proxy Configuration
<IfModule mod_ssl.c>
<VirtualHost *:443>
RewriteEngine On
ProxyPreserveHost On
ProxyRequests Off
# allow for upgrading to websockets
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://localhost:5000/$1 [P,L]
@markomitranic
markomitranic / dsize.sh
Last active November 3, 2024 16:51
List human readable sizes for all docker volumes
#!/bin/bash
set -e
for d in `docker ps -a | awk '{print $1}' | tail -n +2`; do
d_name=`docker inspect -f {{.Name}} $d`
echo "========================================================="
echo "$d_name ($d) volumes:"
VOLUME_IDS=$(docker inspect -f "{{.Config.Volumes}}" $d)
@christophetd
christophetd / Dockerfile
Created October 8, 2021 08:23
Reproducing CVE-2021-41773 (Apache 2.4.49 and 2.4.50) with Docker
FROM httpd:2.4.49-alpine
COPY ./vulnerable-httpd.conf /usr/local/apache2/conf/httpd.conf