Skip to content

Instantly share code, notes, and snippets.

# Fix composer.json
sed -i 's/hautelook\/templated-uri-router/goetas\/templated-uri-router/' composer.json
sed -i 's/hautelook\/templated-uri-bundle/goetas\/templated-uri-bundle/' composer.json
# Fix composer.lock
sed -i 's/hautelook\/templated-uri-router/goetas\/templated-uri-router/' composer.lock
sed -i 's/hautelook\/templated-uri-bundle/goetas\/templated-uri-bundle/' composer.lock
sed -i 's/hautelook\/TemplatedUriRouter/goetas\/TemplatedUriRouter/' composer.lock
sed -i 's/hautelook\/TemplatedUriBundle/goetas\/TemplatedUriBundle/' composer.lock
# Add and commit
git add composer.json composer.lock && git commit -m "Replaced hautelook packages with goetas"
@SerheyDolgushev
SerheyDolgushev / .bash_profile
Created April 11, 2021 15:52
Alias to open the current directory in the latest locally installed PHP Storm
# add following alias into ~/.bash_profile
phpstorm-open-current-path() {
PHP_STORM_CH=~/Library/Application\ Support/JetBrains/Toolbox/apps/PhpStorm/ch-0
PHP_STORM_LATEST_VERSION=$(ls -rA1 "${PHP_STORM_CH}" | head -1)
open -a "${PHP_STORM_CH}/${PHP_STORM_LATEST_VERSION}/PhpStorm.app"
}
# usage
cd <PROJECT_DIR>
phpstorm-open-current-path
@SerheyDolgushev
SerheyDolgushev / install-ibexa.sh
Last active February 10, 2021 13:47
Install Ibexa DXP oss
#!/usr/bin/env bash
PROJECT_PATH=${1-~/Projects/ibexa/331}
IBEXA_VERSION=${2-"v3.3.1"}
DATABASE_NAME=${3-ibexa331}
# Create new ibexa/website-skeleton project via composer
composer create-project ibexa/website-skeleton "${PROJECT_PATH}"
cd "${PROJECT_PATH}"
web:
locations:
/:
root: web
passthru: /app.php
php bin/console cache:clear
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:docbook="http://docbook.org/ns/docbook"
exclude-result-prefixes="docbook"
version="1.0">
<xsl:output indent="yes" encoding="UTF-8"/>
<xsl:template match="docbook:tr[docbook:ezattribute[docbook:ezvalue[@key='hide' and text()='true']]]"/>
</xsl:stylesheet>
attributes.hide.label: 'Hide'
attributes.max-length.label: 'Maximal Length'
attributes.language.label: 'Language'
options.javascript.label: 'JavaScript'
options.php.label: 'PHP'
options.java.label: 'Java'
options.p-class-1.label: 'Paragraph Class 1'
options.p-class-2.label: 'Paragraph Class 2'
options.p-class-3.label: 'Paragraph Class 3'
options.table-class-1.label: 'Table Class 1'
options.table-class-2.label: 'Table Class 2'
php bin/console ezplatform:generate-custom-attributes-configuration --config-file=src/AppBundle/Resources/config/custom_attributes.yml
Extracting Custom Classes from Rich Text fields
==============================================
1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
Extracting Custom Attributes from Rich Text fields
=================================================