Skip to content

Instantly share code, notes, and snippets.

View velnias75's full-sized avatar
🏠
Working from home

Heiko Schäfer velnias75

🏠
Working from home
View GitHub Profile
@thendrix
thendrix / ungrab.sh
Created December 31, 2018 17:36
Force ungrab mouse, useful for debugging games in Linux
# Install xdotool first
#sudo apt install xdotool
# Now you can force ungrab mouse
setxkbmap -option grab:break_actions
xdotool key XF86Ungrab
@dvlop
dvlop / gist:fca36213ad6237891609e1e038a3bbc1
Last active May 3, 2024 16:43 — 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
@premnirmal
premnirmal / GZipRequest.java
Last active December 20, 2022 06:07
Parse GZip responses using volley
import com.android.volley.NetworkResponse;
import com.android.volley.ParseError;
import com.android.volley.Response;
import com.android.volley.toolbox.HttpHeaderParser;
import com.android.volley.toolbox.StringRequest;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStreamReader;