Skip to content

Instantly share code, notes, and snippets.

View CrazyHackGUT's full-sized avatar
🙈
Army evader

Kruzya CrazyHackGUT

🙈
Army evader
View GitHub Profile
@CrazyHackGUT
CrazyHackGUT / dbupdater.inc
Created May 18, 2019 20:54
DB Updater - Helpful include for SourcePawn Database
/**
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
@CrazyHackGUT
CrazyHackGUT / proxygram-nginx.conf
Created April 29, 2019 12:39 — forked from stek29/proxygram-nginx.conf
config for nginx to proxy webogram
server {
server_name gram.com;
location / {
root /var/www/gram;
try_files $uri $uri/index.html;
# protect with basic auth, we don't want to get banned by rkn
auth_basic "webogram";
auth_basic_user_file /var/www/gram.htpasswd;
@CrazyHackGUT
CrazyHackGUT / functions.sp
Last active August 7, 2020 12:57
Text window
void CreateTextDialog(int iClient, const char[] szMessage, any ...)
{
char szText[1024];
VFormat(sText, sizeof(sText), szMessage, 3);
KeyValues kvKey = new KeyValues("text");
kvKey.SetNum("time", 200);
kvKey.SetString("title", "ЗАГОЛОВОК ОКНА");
kvKey.SetNum("level", 0);
kvKey.SetString("msg", sText);
// Original: https://gist.github.com/kythin/9775086
function isMobileDevice() {
$user_agent = strtolower ( $_SERVER['HTTP_USER_AGENT'] );
if ( preg_match ( "/phone|iphone|itouch|ipod|symbian|android|htc_|htc-|palmos|blackberry|opera mini|iemobile|windows ce|nokia|fennec|hiptop|kindle|mot |mot-|webos\/|samsung|sonyericsson|^sie-|nintendo/", $user_agent ) ) {
// these are the most common
return true;
} else if ( preg_match ( "/mobile|pda;|avantgo|eudoraweb|minimo|netfront|brew|teleca|lg;|lge |wap;| wap /", $user_agent ) ) {
// these are less common, and might not be worth checking
return true;
}