Why I like PHPStorm
Advantages of Using Docker
Client, Docker Host, Registry
Docker Usage
Solr Docker File
Every Day Docker Commands
Docker Search
One Line Scripts
Portainer
Kinematic
Docker Compose
Grafana
Coding style guide
PHPCS/MD
Documentation Rules
Xdebug
Postman
Large and heavy PHP frameworks are a thing of the past. Modern PHP developers now have a wealth of libraries and packages available to perform specific tasks, and microservices are fast becoming a preferred way to architect applications. But many don't know how to start, and get thrown in the deep end to flounder. This hands-on workshop will introduce what microservices are, and how to leverage middleware to create them. We will use the Zend Expressive microframework to leverage components of Zend Framework, and other libraries, to quickly create awesome things without requiring an entire framework. Resources for reference and continued learning will also be shared.
This talk I will show you the golang project layout and some best practice like as the following:
1. RESTful api and GraphQL
2. Model testing (Postgres, SQLite, MySQL)
3. Software Quality
4. Data Metrics
5. Go Testing
The presentation is the result of my investigating if there is an open source development framework that can manage complex robotic systems. If so,should it be recommended to be used in advanced high school/undergraduate levels.
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce Diane Mueller
Presenters: Jhon Honce
Cartridges allow developers to provide services running on top of the Red Hat OpenShift Platform-as-a-Service (PaaS). OpenShift already provides cartridges for numerous web application frameworks and databases. Writing your own cartridges allows you to customize or enhance an existing service, or provide new services. In this session, the presenter will discuss best practices for cartridge development and the latest changes in the OpenShift cartridge support.
* Latest changes made in the platform to ease cartridge development
* OpenShift Cartridges vs. plugins
* Outline for development of a new cartridge
* Customization of existing cartridges
* Quickstarts: leveraging a cartridge or cartridges to provide a complete application
Paweł Skotnicki: Masz zacząć pracę z legacy code? Nie wiesz, gdzie najlepiej zrobić refactor? A może zaczynasz nowy projekt, który, tym razem, ma utrzymywać najwyższą jakość kodu? Istnieje sporo narzędzi, które mają w tym pomóc, a my często o nich zapominamy. Przedstawię lub przypomnę część z nich.
Large and heavy PHP frameworks are a thing of the past. Modern PHP developers now have a wealth of libraries and packages available to perform specific tasks, and microservices are fast becoming a preferred way to architect applications. But many don't know how to start, and get thrown in the deep end to flounder. This hands-on workshop will introduce what microservices are, and how to leverage middleware to create them. We will use the Zend Expressive microframework to leverage components of Zend Framework, and other libraries, to quickly create awesome things without requiring an entire framework. Resources for reference and continued learning will also be shared.
This talk I will show you the golang project layout and some best practice like as the following:
1. RESTful api and GraphQL
2. Model testing (Postgres, SQLite, MySQL)
3. Software Quality
4. Data Metrics
5. Go Testing
The presentation is the result of my investigating if there is an open source development framework that can manage complex robotic systems. If so,should it be recommended to be used in advanced high school/undergraduate levels.
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce Diane Mueller
Presenters: Jhon Honce
Cartridges allow developers to provide services running on top of the Red Hat OpenShift Platform-as-a-Service (PaaS). OpenShift already provides cartridges for numerous web application frameworks and databases. Writing your own cartridges allows you to customize or enhance an existing service, or provide new services. In this session, the presenter will discuss best practices for cartridge development and the latest changes in the OpenShift cartridge support.
* Latest changes made in the platform to ease cartridge development
* OpenShift Cartridges vs. plugins
* Outline for development of a new cartridge
* Customization of existing cartridges
* Quickstarts: leveraging a cartridge or cartridges to provide a complete application
Paweł Skotnicki: Masz zacząć pracę z legacy code? Nie wiesz, gdzie najlepiej zrobić refactor? A może zaczynasz nowy projekt, który, tym razem, ma utrzymywać najwyższą jakość kodu? Istnieje sporo narzędzi, które mają w tym pomóc, a my często o nich zapominamy. Przedstawię lub przypomnę część z nich.
Modeling and Control Robot Arm using Gazebo, MoveIt!, ros_controlByeongKyu Ahn
본 문서는 8축 로봇팔을 Gazebo, ROS, MovieIt을 이용한 시뮬레이션 과정에 대한 것으로 제2회 오로카 세미나(http://cafe.naver.com/openrt.cafe)에서 발표되었습니다.
This document represent working process for simulation 8-dof robot arm using Gazebo, ROS, MoveIt. And, this document presented on 2nd OROCA seminar in KOREA.
Uma introdução ao uso de Sockets usando Golang, apresenta as formas de criar seus próprios Sockets e qual cenário poderia está aplicando Sockets.
Aborda como a arquitetura Rest funciona e qual seria o cenário para sua aplicabilidade comparada com Socket.
A apresentação é uma tentativa de apresentar os recursos e poder do Golang quando o assunto é REST e Socket.
Talk given on BalCCon 2013 by Vlatko Kosturjak: Wonderful world of (distributed) SCM or VCS. Ripping and extracting useful info from CVS, Subversion (SVN) and GIT repositories publicly exposed on the web.
My slides for the Hands-on part of the Robotic Vision Summer School 2015 in Kioloa, Australia.
This is part of the robotics workshop, aiming to teach the participants how to program the turtlebot .
Take care of hundred containers and not go crazyHonza Horák
Imagine you have four different databases, five popular languages, and six other interesting technologies, that you want to put into container image, make them nicely run in OpenShift, and support for few years. However, you soon realize that you want to support not only one version of the particular technology, and the images are not based on one distribution only. Then you easily find yourself developing and maintaining hundred of container images or more.
Something similar happened to us and I admit we did not know all the tricks from the first minute. Come and hear what issues we met during the way, so you do not repeat them as well. We will cover upstream/downstream design, de-duplication of the sources from more perspectives, automation based on Jenkins, and of course testing.
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...OpenShift Origin
Extending OpenShift Origin: Build Your Own Cartridge
Presenters: Bill DeCoste
Cartridges allow developers to provide services running on top of the Red Hat OpenShift Platform-as-a-Service (PaaS). OpenShift already provides cartridges for numerous web application frameworks and databases. Writing your own cartridges allows you to customize or enhance an existing service, or provide new services. In this session, the presenter will discuss best practices for cartridge development and the latest changes in the OpenShift cartridge support.
* Latest changes made in the platform to ease cartridge development
* OpenShift Cartridges vs. plugins
* Outline for development of a new cartridge
* Customization of existing cartridges
* Quickstarts: leveraging a cartridge or cartridges to provide a complete application
Doing Quality Assurance in PHP projects sometimes looks like a dark art! Picking the right tools, making all tools work together, analysing your code and even then deliver all the required features of the software project can be quite challenging.
This talks aims to help lowering the entry barrier for doing QA on your project, sharing the experience, knowledge and some tricks that brings QA back from the dark arts to the every day of a PHP programmer.
We will review tools like Jenkins, PHPUnit, phpcs, pdepend, phpcpd, etc and how we can chain them together to make sure we are building a great software.
Modeling and Control Robot Arm using Gazebo, MoveIt!, ros_controlByeongKyu Ahn
본 문서는 8축 로봇팔을 Gazebo, ROS, MovieIt을 이용한 시뮬레이션 과정에 대한 것으로 제2회 오로카 세미나(http://cafe.naver.com/openrt.cafe)에서 발표되었습니다.
This document represent working process for simulation 8-dof robot arm using Gazebo, ROS, MoveIt. And, this document presented on 2nd OROCA seminar in KOREA.
Uma introdução ao uso de Sockets usando Golang, apresenta as formas de criar seus próprios Sockets e qual cenário poderia está aplicando Sockets.
Aborda como a arquitetura Rest funciona e qual seria o cenário para sua aplicabilidade comparada com Socket.
A apresentação é uma tentativa de apresentar os recursos e poder do Golang quando o assunto é REST e Socket.
Talk given on BalCCon 2013 by Vlatko Kosturjak: Wonderful world of (distributed) SCM or VCS. Ripping and extracting useful info from CVS, Subversion (SVN) and GIT repositories publicly exposed on the web.
My slides for the Hands-on part of the Robotic Vision Summer School 2015 in Kioloa, Australia.
This is part of the robotics workshop, aiming to teach the participants how to program the turtlebot .
Take care of hundred containers and not go crazyHonza Horák
Imagine you have four different databases, five popular languages, and six other interesting technologies, that you want to put into container image, make them nicely run in OpenShift, and support for few years. However, you soon realize that you want to support not only one version of the particular technology, and the images are not based on one distribution only. Then you easily find yourself developing and maintaining hundred of container images or more.
Something similar happened to us and I admit we did not know all the tricks from the first minute. Come and hear what issues we met during the way, so you do not repeat them as well. We will cover upstream/downstream design, de-duplication of the sources from more perspectives, automation based on Jenkins, and of course testing.
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...OpenShift Origin
Extending OpenShift Origin: Build Your Own Cartridge
Presenters: Bill DeCoste
Cartridges allow developers to provide services running on top of the Red Hat OpenShift Platform-as-a-Service (PaaS). OpenShift already provides cartridges for numerous web application frameworks and databases. Writing your own cartridges allows you to customize or enhance an existing service, or provide new services. In this session, the presenter will discuss best practices for cartridge development and the latest changes in the OpenShift cartridge support.
* Latest changes made in the platform to ease cartridge development
* OpenShift Cartridges vs. plugins
* Outline for development of a new cartridge
* Customization of existing cartridges
* Quickstarts: leveraging a cartridge or cartridges to provide a complete application
Doing Quality Assurance in PHP projects sometimes looks like a dark art! Picking the right tools, making all tools work together, analysing your code and even then deliver all the required features of the software project can be quite challenging.
This talks aims to help lowering the entry barrier for doing QA on your project, sharing the experience, knowledge and some tricks that brings QA back from the dark arts to the every day of a PHP programmer.
We will review tools like Jenkins, PHPUnit, phpcs, pdepend, phpcpd, etc and how we can chain them together to make sure we are building a great software.
Everyone talks about raising the bar on quality of code, but it's always hard to start implementing it when you have no clue where to start. With this talk I'm showing that there are many levels developers can improve themselves by using the right tools.
* Syntax checking with PHPLint (php -l)
* Validating code with PHP_CodeSniffer
* Testing code with PHPUnit
* Debugging code with XDebug
* Documenting code with PHPDocumentator
* Building with Phing
* Packaging with Phar
Development Workflow Tools for Open-Source PHP LibrariesPantheon
Having a fine-tuned continuous integration environment is extremely valuable, even for small projects. Today, there is a wide variety of standalone projects and online Software-As-A-Service offerings that can super-streamline your everyday development tasks that can help you get your projects up and running like a pro. In this session, we'll look at how you can get the most out of:
* GitHub source code repository
* Packagist package manager for Composer
* Travis CI continuous integration service
* Coveralls code coverage service
* Scrutinizer static analysis service
* Box2 phar builder
* Sami api documentation generator
* ReadTheDocs online documentation reader service
* Composer scripts and projects for running local tests and builds After mastering these tools, you will be able to quickly set up a new php library project and use it in your Drupal modules.
Session presented at Stanford Drupal Camp: https://drupalcamp.stanford.edu/development-workflow-tools-open-source-php-libraries
Spenser Reinhardt's presentation on Detecting Security Breaches With Docker, Honeypots, & Nagios.
The presentation was given during the Nagios World Conference North America held Oct 13th - Oct 16th, 2014 in Saint Paul, MN. For more information on the conference (including photos and videos), visit: http://go.nagios.com/conference
OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...OpenShift Origin
Extending OpenShift Origin: Build Your Own Cartridge
Presenters: Jhon Honce
Cartridges allow developers to provide services running on top of the Red Hat OpenShift Platform-as-a-Service (PaaS). OpenShift already provides cartridges for numerous web application frameworks and databases. Writing your own cartridges allows you to customize or enhance an existing service, or provide new services. In this session, the presenter will discuss best practices for cartridge development and the latest changes in the OpenShift cartridge support.
* Latest changes made in the platform to ease cartridge development
* OpenShift Cartridges vs. plugins
* Outline for development of a new cartridge
* Customization of existing cartridges
* Quickstarts: leveraging a cartridge or cartridges to provide a complete application
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHPDana Luther
In this tutorial we will go over setting up a standard LEMP stack for development use and learn how to modify it to mimic your production/pre-production environments as closely as possible. We will go over how to switch from Nginx to Apache, upgrade PHP versions and introduce additional storage engines such as Redis to the equation. We'll also step through how to run both unit and acceptance suites using headless Selenium images in the stack. Leave here fully confident in knowing that whatever environment you get thrown into, you can replicate it and work in it comfortably.
Golang becomes more and more popular: new projects are developed in this language and the old ones migrate to it. Why is Go loved by developers, wanted by clients and preferred by architects? Find the answers in this video.
This presentation was held by Sergii Shapoval (Senior Software Engineer, Consultant, GlobalLogic) at GlobalLogic Kyiv Java Career Day #2 on December 1, 2018.
Video: https://youtu.be/wSSgY_Du9zY
Learn more: https://www.globallogic.com/ua/events/globallogic-kyiv-java-career-day-2-summary
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxR&R Consult
CFD analysis is incredibly effective at solving mysteries and improving the performance of complex systems!
Here's a great example: At a large natural gas-fired power plant, where they use waste heat to generate steam and energy, they were puzzled that their boiler wasn't producing as much steam as expected.
R&R and Tetra Engineering Group Inc. were asked to solve the issue with reduced steam production.
An inspection had shown that a significant amount of hot flue gas was bypassing the boiler tubes, where the heat was supposed to be transferred.
R&R Consult conducted a CFD analysis, which revealed that 6.3% of the flue gas was bypassing the boiler tubes without transferring heat. The analysis also showed that the flue gas was instead being directed along the sides of the boiler and between the modules that were supposed to capture the heat. This was the cause of the reduced performance.
Based on our results, Tetra Engineering installed covering plates to reduce the bypass flow. This improved the boiler's performance and increased electricity production.
It is always satisfying when we can help solve complex challenges like this. Do your systems also need a check-up or optimization? Give us a call!
Work done in cooperation with James Malloy and David Moelling from Tetra Engineering.
More examples of our work https://www.r-r-consult.dk/en/cases-en/
About
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Technical Specifications
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
Key Features
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface
• Compatible with MAFI CCR system
• Copatiable with IDM8000 CCR
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
Application
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Hierarchical Digital Twin of a Naval Power SystemKerry Sado
A hierarchical digital twin of a Naval DC power system has been developed and experimentally verified. Similar to other state-of-the-art digital twins, this technology creates a digital replica of the physical system executed in real-time or faster, which can modify hardware controls. However, its advantage stems from distributing computational efforts by utilizing a hierarchical structure composed of lower-level digital twin blocks and a higher-level system digital twin. Each digital twin block is associated with a physical subsystem of the hardware and communicates with a singular system digital twin, which creates a system-level response. By extracting information from each level of the hierarchy, power system controls of the hardware were reconfigured autonomously. This hierarchical digital twin development offers several advantages over other digital twins, particularly in the field of naval power systems. The hierarchical structure allows for greater computational efficiency and scalability while the ability to autonomously reconfigure hardware controls offers increased flexibility and responsiveness. The hierarchical decomposition and models utilized were well aligned with the physical twin, as indicated by the maximum deviations between the developed digital twin hierarchy and the hardware.
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...Amil Baba Dawood bangali
Contact with Dawood Bhai Just call on +92322-6382012 and we'll help you. We'll solve all your problems within 12 to 24 hours and with 101% guarantee and with astrology systematic. If you want to take any personal or professional advice then also you can call us on +92322-6382012 , ONLINE LOVE PROBLEM & Other all types of Daily Life Problem's.Then CALL or WHATSAPP us on +92322-6382012 and Get all these problems solutions here by Amil Baba DAWOOD BANGALI
#vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore#blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #blackmagicforlove #blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #Amilbabainuk #amilbabainspain #amilbabaindubai #Amilbabainnorway #amilbabainkrachi #amilbabainlahore #amilbabaingujranwalan #amilbabainislamabad
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Dr.Costas Sachpazis
Terzaghi's soil bearing capacity theory, developed by Karl Terzaghi, is a fundamental principle in geotechnical engineering used to determine the bearing capacity of shallow foundations. This theory provides a method to calculate the ultimate bearing capacity of soil, which is the maximum load per unit area that the soil can support without undergoing shear failure. The Calculation HTML Code included.
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
2. Why I like PHPStorm
● You can develop applications in PHP versions 5.3/5.4/5.5/5.6/7.0/7.1, SQL & PL/SQL,
JavaScript, XML, HTML, CSS.
● You can add functionality to our IDE by installing plugins (Bash, Symfony, Laravel,
Magento 2, NodeJS, LiveEdit, Spy-JS, Meteor).
● Support for Vagrant and Docker, Docker Compose, SSH console & remote tools.
● Databases and SQL Editor in PhpStorm (MySQL, PostgreSQL, Oracle, SQLite, etc)
● Coding style Support PSR1/PSR2, PHPDoc support.
● Version control systems integration Git, Subversion, Mercurial, Perforce, CVS, TFS
● Duplicated Code Detector. PHP Code Sniffer (phpcs) that checks for code smells on
the fly. Local History. Debugging with Xdebug and ZendDebugger.
3. Advantages of Using Docker
Portability across machines – an application and all its dependencies
can be bundled into a single container that can be transferred to
another machine that runs Docker, and executed there without
compatibility issues.
Version control and component reuse – you can track successive
versions of a container, inspect differences, or roll-back to previous
versions.
Sharing – you can use a remote repository to share your container
with others.
6. Docker File Example
FROM php:5.6-fpm
RUN apt-get update && apt-get install -y libfreetype6-dev libicu-dev libjpeg62-turbo-dev
libmcrypt-dev libpng-dev libxslt1-dev
RUN docker-php-ext-install gd mcrypt mbstring sockets zip xsl soap
RUN pecl install xdebug-2.5.5 && docker-php-ext-enable xdebug
ADD ./etc/init.d/php/run.sh /run.sh
RUN curl -Lsf 'https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz'
| tar -C '/usr/local' -xvzf -
ENV PATH /usr/local/go/bin:$PATH
RUN go get github.com/mailhog/mhsendmail
RUN cp /root/go/bin/mhsendmail /usr/bin/mhsendmail
7. Solr Docker File
FROM java:6
RUN mkdir -p /opt/solr
RUN cd /tmp && curl https://archive.apache.org/dist/lucene/solr/3.6.1/apache-solr-3.6.1.tgz | tar xvz &&
mv -v apache-solr-3.6.1/* /opt/solr
EXPOSE 8983
VOLUME ["/opt/solr/example/solr/data", "/opt/solr/example/solr/conf"]
WORKDIR /opt/solr/example
CMD java -jar start.jar
8. Every Day Docker Commands
~$ docker ps -a
~$ docker stop|start|restart container_name
~$ docker run --name ubuntu -d ubuntu /bin/sh -c "while true; do echo hello world; sleep 1; done"
~$ docker exec -it ubuntu bash
~$ docker logs ubuntu
~$ docker history ubuntu
~$ docker stats
9. Docker Search
~$ docker search node
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
node Node.js is a JavaScript-based platform for... 5829 [OK]
mhart/alpine-node Minimal Node.js built on Alpine Linux 366
mongo-express Web-based MongoDB admin interface, written... 269 [OK]
nodered/node-red-docker Node-RED Docker images. 168 [OK]
iojs io.js is an npm compatible platform origin... 126 [OK]
prom/node-exporter 83 [OK]
readytalk/nodejs Node.js based off the official Debian W
10. One Line Scripts
~$ curl -s https://registry.hub.docker.com//v1/repositories/php/tags | php -r
'print_r(json_decode(file_get_contents("php://stdin")));' | grep fpm | head -20
~$ sudo nano /usr/local/bin/docker-tags
~$ sudo chmod +x /usr/local/bin/docker-tags
#!/usr/bin/env bash
curl -s https://registry.hub.docker.com//v1/repositories/$1/tags | php -r
'print_r(json_decode(file_get_contents("php://stdin")));' | grep name | grep $2 | head -$3
16. docker-compose up
Runs services via docker-compose util:
● db - MySql database service
● app - PHP5.6-FPM service
● web - Nginx web server
● redis - Redis session and cache storage
● mongo - Mongo NoSql storage used for price service
● rabbit - RabbitMQ queue server
● solr -Apache Solr service for fulltext search
● bps - Backend price service on Python Tornado
● fps - Frontend price service on PHP
● worker - PHP worker for background jobs
● cron - Run application schedule tasks
● mailservice - Caught all mail from application
19. Coding style guide PSR-1
● Files MUST use only <?php and <?= tags.
● Files MUST use only UTF-8 without BOM for PHP code.
● Files SHOULD either declare symbols (classes, functions, constants, etc.) or cause
side-effects (e.g. generate output, change .ini settings, etc.) but SHOULD NOT do both.
● Namespaces and classes MUST follow an “autoloading” PSR: [PSR-0, PSR-4].
● Class names MUST be declared in StudlyCaps.
● Class constants MUST be declared in all uppercase with underscore separators.
● Method names MUST be declared in camelCase.
20. Coding style guide PSR-2
● Code MUST use 4 spaces for indenting, not tabs.
● There MUST NOT be a hard limit on line length; the soft limit MUST be 120
characters; lines SHOULD be 80 characters or less.
● There MUST be one blank line after the namespace declaration, and there
MUST be one blank line after the block of use declarations.
● Opening braces for classes MUST go on the next line, and closing braces MUST
go on the next line after the body.
● Opening braces for methods MUST go on the next line, and closing braces MUST
go on the next line after the body.
● Visibility MUST be declared on all properties and methods; abstract and
final MUST be declared before the visibility; static MUST be declared
after the visibility.
● Control structure keywords MUST have one space after them; method and
function calls MUST NOT.
● Opening braces for control structures MUST go on the same line, and closing
braces MUST go on the next line after the body.
● Opening parentheses for control structures MUST NOT have a space after them,
and closing parentheses for control structures MUST NOT have a space before.
23. PHP CS Setup
Setup PHPCS in PHPStorm:
In PHPStorm open File > Settings > Languages & Frameworks> PHP > Code Sniffer
Click to configuration, in opened popup click to the (+) and provide path to phpcs launcher.
24. PHP MD Setup
Setup PHPMD in PHPStorm:
In PHPStorm open File > Settings > Languages & Frameworks> PHP > Mess Detector
Click to configuration, in opened popup click to the (+) and provide path to phpmd launcher.
27. Document Rules
PHPDocs Rules:
● Each method in project MUST contain - @param, @return, @throws tags, and short method description.
● Each property and constant in project MUST contain - @var tag, and short property description.
● Each class and interface MUST contain - @category, @package, @author, @copyright, @license, @link and
short desc.
● Each file MUST contain - @category, @package, @author, @copyright, @license, @link and NOTICE OF
LICENSE
● Each public method in observe is in the listening to a magento event MUST contain - @see with value
event_name
● All PHP files MUST start with php tag, and MUST contain a empty line in end of file without php close tag.
● Each deprecated method MUST contain - @depricated and @see tags, @see -
class_method_with_new_functionality
29. Xdebug Installation
~$ sudo apt install php-xdebug
~$ sudo phpenmod xdebug && php -m | grep xdebug
~$ sudo nano /etc/php/{php-version}/mods-available/xdebug.ini
[Xdebug]
zend_extension=<full_path_to_xdebug_extension>
xdebug.remote_enable=1
xdebug.remote_host=<the host where PhpStorm is running (e.g. localhost)>
xdebug.remote_port=<the port to which Xdebug tries to connect on the host where PhpStorm is
running (default 9000)>
xdebug.remote_autostart=1
30. Postman Collections
A Postman Collection is an Executable API Description. With Postman collections you can:
● Publishing an API collection can be done via a Run In Postman button, embedded within the publisher’s
site, and downloading a Postman Collection directly into the developer’s Postman instance.
● API Monitoring is a scheduled service to run a Postman Collection, reporting results based on tests
embedded in the collection, and reported in the user’s Postman dashboard.
● API Documentation publishes a shareable, customized view of the API’s Postman Collection - helping
developers onboard quickly to an API.
● Developers can create a Mock Server from a collection, allowing API users to view example request &
response pairs, even before the API is complete.
● Developers can Debug APIs by creating requests, adding tests, and examining responses.
32. Debug PHP in Docker
Our php docker image already contain Xdebug in path/to/project/docker/php-fpm.dockerfile ;
xdebug configuration are in path/to/project/docker/etc/xdebug.ini ;
PHP Environment Variables are in path/to/project/docker/php.env ;
Environment Variables used for PHP Storm and Xdebug:
XDEBUG_CONFIG=remote_host=172.17.0.1 - IDE machine IP address
PHP_IDE_CONFIG=serverName=example - server name in PHPSTORM
Get your IP address in docker network (ifconfig (Unix) or ipconfig (Win)) and put to remote_host
~$ ifconfig
docker0 Link encap:Ethernet HWaddr #########
inet addr:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
param
33. Xdebug Configuration In Docker
Mount to the php container xdebug.ini file next content:
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_port=19000
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
xdebug.idekey="PHPSTORM"
In PHP dockerfile php-fpm.dockerfile
RUN pecl install xdebug-2.5.5
&& docker-php-ext-enable xdebug
37. Xdebug Profiling
xdebug.profiler_enable=1 or xdebug.profiler_enable_trigger=1 and activate it by XDEBUG_PROFILE
GET/POST parameter. xdebug.profiler_output_dir=/path/to/volume/profiler_output