This file contains hidden or 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
First update npm, | |
npm install -g npm stable | |
Then update node, | |
npm install -g node or npm install -g n | |
check after version installation, |
This file contains hidden or 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
Postgres allows the use of any existing database on the server as a template when creating a new database. I'm not sure whether pgAdmin gives you the option on the create database dialog but you should be able to execute the following in a query window if it doesn't: | |
CREATE DATABASE newdb WITH TEMPLATE originaldb OWNER dbuser; | |
Still, you may get: | |
ERROR: source database "originaldb" is being accessed by other users | |
To fix it you can use this query | |
SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity | |
WHERE pg_stat_activity.datname = 'originaldb' AND pid <> pg_backend_pid(); |
This file contains hidden or 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
{ | |
"oro_website_search" : { | |
"mappings" : { | |
"oro_product_2" : { | |
"_all" : { | |
"enabled" : false | |
}, | |
"dynamic_templates" : [ { | |
"name_LOCALIZATION_ID" : { | |
"mapping" : { |
This file contains hidden or 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
# Fix timezone in php | |
date.timezone=UTC | |
memory_limit=2GB | |
short_open_tag=off | |
function getCredentials() | |
{ | |
declare -A REQUIRED_CREDENTIALS | |
fields=(database_driver database_name database_user database_password) | |
for index in ${!fields[*]} |
This file contains hidden or 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
#mod_macro https://www.cri.ensmp.fr/~coelho/mod_macro/ | |
<Macro VHostDev $baseDomain> | |
<VirtualHost *:80> | |
ServerName $baseDomain.dev | |
ServerAlias www.$baseDomain.dev | |
# Module mpm-itk | |
AssignUserID alexandr alexandr | |
DocumentRoot /home/alexandr/projects/dev/application/$baseDomain/web |
This file contains hidden or 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: 7.1.2 | |
1 mln records | |
-DTO- | |
Time: 0.26642107963562, Memory: 148MB | |
-Array with dynamic adding keys- |
This file contains hidden or 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
imports: | |
- ../../package/platform/src/Oro/Bundle/TestFrameworkBundle/Resources/config/behat.yml.dist | |
default: &default | |
gherkin: | |
filters: | |
tags: ~@not-automated&&~@skip&&~@community-edition-only | |
extensions: | |
Behat\MinkExtension: | |
browser_name: chrome |
This file contains hidden or 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
matrix: | |
include: | |
- php: 5.6 | |
env: APPLICATION="application/commerce-crm-ee" TESTSUITE="unit" | |
- php: 7.0 | |
env: APPLICATION="application/commerce-crm-ee" TESTSUITE="unit" | |
- php: 7.1 | |
env: APPLICATION="application/commerce-crm-ee" TESTSUITE="unit" | |
- php: 7.1 |
This file contains hidden or 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
alias cc="php -d xdebug.remote_enable=0 app/console cache:clear" | |
alias unitx="php -dxdebug.remote_autostart=1 /usr/local/bin/phpunit" | |
alias oroup="php app/console oro:install --user-name=admin [email protected] --user-firstname=John --user-lastname=Doe --user-password=admin --sample-data=n --organization-name=OroCRM --no-interaction --timeout 3600" | |
alias orocs="phpcs -p --encoding=utf-8 --extensions=php --standard=psr2 `git diff --name-only`" |
This file contains hidden or 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 | |
$path = realpath('package/'); | |
$directoryIterator = new RecursiveDirectoryIterator($path); | |
$iterator = new RecursiveIteratorIterator($directoryIterator); | |
$regexIterator = new RegexIterator( | |
$iterator, | |
'/^\/home\/ocz\/PhpstormProjects\/dev\/package\/.+\/Form\/Type.+Type.php$/', | |
RecursiveRegexIterator::GET_MATCH, |
NewerOlder