Skip to content

Instantly share code, notes, and snippets.

View andreybolonin's full-sized avatar

Andrey Bolonin andreybolonin

View GitHub Profile
image: andreybolonin/phpunit_ctype:latest
pipelines:
default:
- step:
script: # Modify the commands below to build your repository.
- service mysql restart
- composer install -n
- phpunit
@andreybolonin
andreybolonin / gist:278af113f27ea92a9cb8d89ee893704d
Created December 8, 2016 09:30
Google Places API request by keyword "Киев"
object(Illuminate\Support\Collection)#711 (1) {
["items":protected]=>
array(2) {
["predictions"]=>
object(Illuminate\Support\Collection)#713 (1) {
["items":protected]=>
array(5) {
[0]=>
array(8) {
["description"]=>
<?php
namespace AppBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\DomCrawler\Crawler;
<?php
namespace UmberFirm\Bundle\CustomerBundle\Tests\Unit\Entity;
use DateTime;
use UmberFirm\Bundle\CommonBundle\Entity\Gender;
use UmberFirm\Bundle\CustomerBundle\Entity\Customer;
use UmberFirm\Bundle\CustomerBundle\Entity\CustomerProfile;
/**
dependencies:
pre:
- sudo add-apt-repository ppa:ondrej/php -y; sudo apt-get update; sudo apt-get install php7.1 php7.1-mbstring php7.1-pgsql
- composer install
machine:
php:
version: 7.1.0
test:
<?php
namespace AppBundle\Provider;
use AppBundle\Entity\JobTitle;
use AppBundle\Entity\Provider;
use GuzzleHttp\Client;
use Symfony\Component\DomCrawler\Crawler;
use Symfony\Component\HttpFoundation\Response;
class Order
{
public function
public function
public function
public function
public function
calculateTotalSum(){/*...*/}
getItems(){/*...*/}
getItemCount(){/*...*/}
@andreybolonin
andreybolonin / clickhouse.sh
Last active June 3, 2017 21:51
clickhouse 17.04 build from sources checklist
sudo apt-get install git cmake
sudo apt-get install software-properties-common
sudo apt-add-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-6 g++-6
sudo apt-get install libicu-dev libreadline-dev libmysqlclient-dev libssl-dev unixodbc-dev
git clone -b stable [email protected]:yandex/ClickHouse.git
<?php
declare(strict_types = 1);
namespace UmberFirm\Bundle\CustomerBundle\Tests\Unit\Entity\Customer;
use Doctrine\Common\Collections\Collection;
use UmberFirm\Bundle\CustomerBundle\Entity\Customer;
use UmberFirm\Bundle\CustomerBundle\Entity\CustomerAddress;
use UmberFirm\Bundle\CustomerBundle\Entity\CustomerAddressAwareInterface;
<?php
declare(strict_types = 1);
namespace UmberFirm\Bundle\CustomerBundle\Tests\Functional\Controller;
use Symfony\Bundle\FrameworkBundle\Routing\Router;
use Symfony\Component\HttpFoundation\Response;
use UmberFirm\Bundle\CommonBundle\Entity\Gender;
use UmberFirm\Bundle\CustomerBundle\Entity\Customer;