Skip to content

Instantly share code, notes, and snippets.

@AleksKu
AleksKu / nginx-openresty-ubuntu-build-dependencies.sh
Created August 26, 2016 15:03 — forked from markselby/nginx-openresty-ubuntu-build-dependencies.sh
Build Nginx OpenResty version on Ubuntu.This is part of the high performance caching blog on writebox.co.uk
# Build dependencies for OpenResty.
sudo apt-get install build-essential libpcre3-dev libssl-dev libgeoip-dev
# Install standard Nginx first so that you get the relevant service scripts installed too
sudo apt-get install nginx
# If you want to access Postgres via Nginx
sudo apt-get install libpq-dev
@AleksKu
AleksKu / NotificationManagerTest.php
Created August 5, 2016 13:51
Юнит-тесты отправки постбеков вебмастерам(Notifications) с использованием мокирования ответов HTTP сервера (заглушка для http-сервера).
<?php
namespace Tests;
use Doctrine\ORM\EntityManager;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Handler\MockHandler;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Response;
use PostbackBundle\Entity\Notification;
@AleksKu
AleksKu / parameters.conf.dist
Last active February 13, 2023 13:38
lua openresty rabbitmq example
#RabbitMq
set $connect_rabbitMqStompHost "127.0.0.1";
set $connect_rabbitMqStompPort "61613";
set $connect_rabbitMqStompUsername "test";
set $connect_rabbitMqStompPassword "test";
set $connect_rabbitMqStompVhost "/";
@AleksKu
AleksKu / StatisticsController.php
Last active June 30, 2016 09:16
processStatistics
/**
* @param Request $request
* @param string $groupBy
* @param $groupByList
* @param Form $filterForm
* @return Response
*/
private function processStatistics(Request $request, $groupBy, $groupByList, Form $filterForm)
{
$filterForm->handleRequest($request);