This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; | |
} |