This file contains 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
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
apt-get install -y language-pack-en-base | |
LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php | |
apt-get update | |
apt-get install \ | |
php7.0 \ |
This file contains 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
$encoded_newPassword = "{SHA}" . base64_encode( pack( "H*", sha1( $newPassword ) ) ); |
This file contains 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
\w{0,5}[хx]([хx\s\!@#\$%\^&*+-\|\/]{0,6})[уy]([уy\s\!@#\$%\^&*+-\|\/]{0,6})[ёiлeеюийя]\w{0,7}|\w{0,6}[пp]([пp\s\!@#\$%\^&*+-\|\/]{0,6})[iие]([iие\s\!@#\$%\^&*+-\|\/]{0,6})[3зс]([3зс\s\!@#\$%\^&*+-\|\/]{0,6})[дd]\w{0,10}|[сcs][уy]([уy\!@#\$%\^&*+-\|\/]{0,6})[4чkк]\w{1,3}|\w{0,4}[bб]([bб\s\!@#\$%\^&*+-\|\/]{0,6})[lл]([lл\s\!@#\$%\^&*+-\|\/]{0,6})[yя]\w{0,10}|\w{0,8}[её][bб][лске@eыиаa][наи@йвл]\w{0,8}|\w{0,4}[еe]([еe\s\!@#\$%\^&*+-\|\/]{0,6})[бb]([бb\s\!@#\$%\^&*+-\|\/]{0,6})[uу]([uу\s\!@#\$%\^&*+-\|\/]{0,6})[н4ч]\w{0,4}|\w{0,4}[еeё]([еeё\s\!@#\$%\^&*+-\|\/]{0,6})[бb]([бb\s\!@#\$%\^&*+-\|\/]{0,6})[нn]([нn\s\!@#\$%\^&*+-\|\/]{0,6})[уy]\w{0,4}|\w{0,4}[еe]([еe\s\!@#\$%\^&*+-\|\/]{0,6})[бb]([бb\s\!@#\$%\^&*+-\|\/]{0,6})[оoаa@]([оoаa@\s\!@#\$%\^&*+-\|\/]{0,6})[тnнt]\w{0,4}|\w{0,10}[ё]([ё\!@#\$%\^&*+-\|\/]{0,6})[б]\w{0,6}|\w{0,4}[pп]([pп\s\!@#\$%\^&*+-\|\/]{0,6})[иeеi]([иeеi\s\!@#\$%\^&*+-\|\/]{0,6})[дd]([дd\s\!@#\$%\^&*+-\|\/]{0,6})[oоаa@еeиi]([oоаa@еeиi\s\!@#\$%\^&*+-\|\/]{0,6})[рr]\w{0,12}|\w{0,6}[cсs][уu][kк][aа] |
This file contains 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
Резервное копирование баз данных PostgreSQL. | |
http://interface31.ru/tech_it/2013/07/rezervnoe-kopirovanie-bez-dannyh-postgresql.html | |
https://gist.github.com/akeinhell/763617fae52fdacfec48 | |
http://goo.gl/SCScpd |
This file contains 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
set PATH=%PATH%;%ProgramFiles(x86)%\PostgreSQL\9.1.9-1.1C\bin;%ProgramFiles%\7-Zip | |
echo %PATH% | |
set DAT=%date:~6,4%%date:~3,2%%date:~0,2% | |
cd C:\backup | |
pg_dump -U postgres unf14 > %DAT%-unf14.pgsql.backup | |
7z a -tzip %DAT%-unf14.pgsql.zip %DAT%-unf14.pgsql.backup |
This file contains 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
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
apt-get update | |
apt-get install -y git-core autoconf bison libxml2-dev libbz2-dev libmcrypt-dev libcurl4-openssl-dev libltdl-dev libpng-dev libpspell-dev libreadline-dev | |
mkdir -p /etc/php7/conf.d | |
mkdir -p /etc/php7/cli/conf.d | |
mkdir /usr/local/php7 |
This file contains 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
<?php | |
require 'src/WotApi/Api.php'; | |
require 'vendor/autoload.php'; | |
use WotApi\Api; | |
Api::create()->setApplicationId('demo'); | |
Api::onSuccess( | |
function($response, $args){ | |
print '->'.sizeof(explode(',',$args[0]['clan_id'])).' OK'.PHP_EOL; |
This file contains 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
//--------------------------------------------------------------------------- | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include "curl/curl.h" | |
//#pragma comment(lib,"curllib.lib") // для VC++ | |
//-------------------------------------------------------------------------- | |
const size_t BUF_SIZE= 5000000; | |
char wr_buf[5000001]; | |
size_t wr_index=0; |
This file contains 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
function matchCIDR($addr,$cidr) { | |
list($ip,$mask) = explode('/',$cidr); | |
return (ip2long($addr) >> (32 - $mask) == ip2long($ip) >> (32 - $mask)); | |
} | |
function cidr_match($ip, $range) | |
{ | |
list ($subnet, $bits) = explode('/', $range); |
This file contains 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
SELECT FLOOR(count(*)*RAND()) INTO @max FROM table; | |
PREPARE STMT FROM 'SELECT * FROM table LIMIT ?,1'; | |
EXECUTE STMT USING @max; |
NewerOlder