Skip to content

Instantly share code, notes, and snippets.

View f1r3starter's full-sized avatar
🕶️
Having fun

Andrii Filenko f1r3starter

🕶️
Having fun
  • Kyiv
View GitHub Profile
fpmorakul:
build: ./php-fpm
links:
- memcached
fpmtaro:
build: ./php-fpm
links:
- memcached
memcached:
build: ./memcached
fpm-orakul:
image: fpm-orakul
links:
- memcached
volumes:
- /var/www/html/orakul-dev:/var/www/orakul
fpm-taro:
build: ./php-fpm
links:
- memcached
FROM ubuntu:14.04
RUN apt-get -qq update
RUN apt-get -qq -y install goaccess
if (partner.src === 'external') {
$('#tenDaysSpread').html(buildExternalAds(partner))
}else {
if (partner.show_counter) {
showCountersPull.push(partner);
}
var div=document.createElement('div');
$('#tenDaysSpread').append(div);
$('#tenDaysSpread div').html('<a target="_blank" rel="nofollow" ' + counter + ' href="' + partner.partner_url + '"><img src="'+partner.bgImg+'" width="300" /></a>');
}
for ( slot in adsStore.under_termometr) {
if (adsStore.under_termometr.hasOwnProperty(slot)) {
if (adsStore.under_termometr[slot].length) {
partner = chooseBlock(adsStore.under_termometr[slot]);
var counter = partner.counter?'onmousedown="SIN.utility.click_count('+partner.counter+');"':'';
if(partner.type === 'external'){
$('.under-termometr').html(buildExternalAds(partner))
}else {
if (partner.show_counter) {
showCountersPull.push(partner);
foreach ($this->table->logFileName as $siteId => $site) {
$this->table->createTempTable();
foreach ($site['log'] as $log) {
$logFile = $this->pathToGrep . DIRECTORY_SEPARATOR . $this->grepPrefix . $log;
if (file_exists($logFile)) {
echo "parsing $logFile\n";
$this->parseLog($logFile, $siteId);
} else {
echo "file not exist $logFile\n";
}
location ~ \.php$ {
#fastcgi_cache orakul;
#fastcgi_cache_use_stale error timeout updating invalid_header http_500 http_503;
#fastcgi_cache_valid 200 5m; # Only cache 200 responses, cache for 5 minutes
#fastcgi_cache_methods GET HEAD; # Only GET and HEAD methods apply
#add_header X-Fastcgi-Cache $upstream_cache_status;
#fastcgi_cache_bypass $no_cache; # Don't pull from cache based on $no_cache
#fastcgi_no_cache $no_cache; # Don't save to cache based on $no_cache
fastcgi_pass ork_backend;
fastcgi_index /web/index.php;
listen = 10.60.20.58:9005
listen.allowed_clients = 127.0.0.1,10.60.20.58
user = www
group = www
pm = dynamic
pm.max_children = 20
pm.start_servers = 5
pm.min_spare_servers = 3
pm.max_spare_servers = 10
pm.max_requests = 1000
<?php
$start = microtime(true);
$i=0;
$stack = [];
while ($i!=1000){
array_push($stack,1);
$i++;
}
$time_elapsed_secs = microtime(true) - $start;
echo $time_elapsed_secs;
<?php
$target_dir = __DIR__;
$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
$uploadOk = 1;
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
// Check if image file is a actual image or fake image
if(isset($_POST["submit"])) {
$check = getimagesize($_FILES["fileToUpload"]["tmp_name"]);
if($check !== false) {
echo "File is an image - " . $check["mime"] . ".";