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
Document doc = Jsoup.connect(jurl) | |
.header("Accept","text/html, */*; q=0.01") | |
.header("Accept-Encoding","gzip,deflate,sdch") | |
.header("Accept-Language","ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4") | |
.header("Connection","keep-alive") | |
.header("Cookie",cookie) | |
.header("Host","rivalregions.com") | |
.header("Referer","http://rivalregions.com/") | |
.header("User-Agent","Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36") | |
.header("X-Requested-With", "XMLHttpRequest") |
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
<com.google.ads.AdView android:id="@+id/adView" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:gravity="center" | |
ads:adUnitId="@string/admob_publisher_id" | |
ads:adSize="BANNER" | |
ads:loadAdOnCreate="false" | |
android:layout_alignParentRight="true" | |
android:layout_alignParentBottom="true"/> |
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
$('param[name=flashvars]').attr('value').split("&")[2].split("=")[1]; |
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; |
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
//--------------------------------------------------------------------------- | |
#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
<?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
#!/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
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
Резервное копирование баз данных PostgreSQL. | |
http://interface31.ru/tech_it/2013/07/rezervnoe-kopirovanie-bez-dannyh-postgresql.html | |
https://gist.github.com/akeinhell/763617fae52fdacfec48 | |
http://goo.gl/SCScpd |
OlderNewer