Last active
March 29, 2020 02:50
-
-
Save fernandopetry/a1ff21e5beb941f12ad79ee75e37398e to your computer and use it in GitHub Desktop.
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
| ### Plugins | |
| SideNotes - Christoph M. Meier (anotações) | |
| ########################### XDEBUG | |
| [Xdebug] | |
| zend_extension="/usr/lib/php/20170718/xdebug.so" | |
| xdebug.remote_enable = 1 | |
| xdebug.remote_autostart = 1 | |
| xdebug.remote_port = 9000 | |
| xdebug.idekey = PHPSTORM | |
| xdebug.max_nesting_level = 512 | |
| xdebug.file_link_format = phpstorm://open?%f:%l | |
| ;xdebug.profiler_enable = 1; | |
| xdebug.profiler_enable_trigger = 1; | |
| xdebug.profiler_output_dir = "/media/dados/web/xdebug_profiler" | |
| $ sudo apt install php7.3-xdebug | |
| $ locate xdebug.so | |
| $ sudo phpenmod xdebug | |
| ########################### Instalar no navegador para ativar o profiler | |
| https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc | |
| ########################### Instalando o Webgrind | |
| https://easyengine.io/tutorials/php/xdebug-webgrind | |
| ########################## Pacote para o linux kcachegrind | |
| kcachegrind | |
| ########################### Language Portugues (Spelling) | |
| https://github.com/rafaelsc/IntelliJ.Portuguese.Brazil.Dictionary | |
| ########################### Color Shema Atom | |
| https://github.com/jesusOmar/one-dark-phpstorm | |
| ########################### PHP Class | |
| <?php | |
| #parse("PHP File Header.php") | |
| declare(strict_types=1); | |
| #if (${NAMESPACE}) | |
| namespace ${NAMESPACE};#end | |
| /** | |
| * | |
| * | |
| #if (${NAMESPACE}) * @package ${NAMESPACE} | |
| #end | |
| @date ${DATE} ${TIME} | |
| * | |
| * @author Fernando Petry <fernando.petry@autoavaliar.com.br> | |
| */ | |
| class ${NAME} { | |
| } | |
| ############################# PHP Interface | |
| <?php | |
| #parse("PHP File Header.php") | |
| declare(strict_types=1); | |
| #if (${NAMESPACE}) | |
| namespace ${NAMESPACE};#end | |
| /** | |
| * | |
| * | |
| #if (${NAMESPACE}) * @package ${NAMESPACE} | |
| #end | |
| @date ${DATE} ${TIME} | |
| * | |
| * @author Fernando Petry <fernando.petry@autoavaliar.com.br> | |
| */ | |
| interface ${NAME} { | |
| } | |
| ############################ PHPUNIT TEST | |
| <?php | |
| #if (${NAMESPACE}) | |
| namespace ${NAMESPACE}; | |
| #end | |
| #if (${TESTED_NAME} && ${NAMESPACE} && !${TESTED_NAMESPACE}) | |
| use ${TESTED_NAME}; | |
| #elseif (${TESTED_NAME} && ${TESTED_NAMESPACE} && ${NAMESPACE} != ${TESTED_NAMESPACE}) | |
| use ${TESTED_NAMESPACE}\\${TESTED_NAME}; | |
| #end | |
| use PHPUnit\Framework\TestCase; | |
| class ${NAME} extends TestCase { | |
| } | |
| #################### Fernando Petry.xml | |
| <code_scheme name="Fernando Petry" version="173"> | |
| <option name="SOFT_MARGINS" value="80" /> | |
| <HTMLCodeStyleSettings> | |
| <option name="HTML_ATTRIBUTE_WRAP" value="0" /> | |
| <option name="HTML_TEXT_WRAP" value="0" /> | |
| <option name="HTML_ENFORCE_QUOTES" value="true" /> | |
| </HTMLCodeStyleSettings> | |
| <PHPCodeStyleSettings> | |
| <option name="ALIGN_KEY_VALUE_PAIRS" value="true" /> | |
| <option name="ALIGN_PHPDOC_PARAM_NAMES" value="true" /> | |
| <option name="ALIGN_PHPDOC_COMMENTS" value="true" /> | |
| <option name="ALIGN_ASSIGNMENTS" value="true" /> | |
| <option name="PHPDOC_BLANK_LINE_BEFORE_TAGS" value="true" /> | |
| <option name="PHPDOC_BLANK_LINES_AROUND_PARAMETERS" value="true" /> | |
| <option name="PHPDOC_WRAP_LONG_LINES" value="true" /> | |
| <option name="KEEP_RPAREN_AND_LBRACE_ON_ONE_LINE" value="true" /> | |
| <option name="ALIGN_CLASS_CONSTANTS" value="true" /> | |
| <option name="SPACE_BETWEEN_TERNARY_QUEST_AND_COLON" value="true" /> | |
| <option name="SPACE_BEFORE_COLON_IN_RETURN_TYPE" value="true" /> | |
| <option name="PHPDOC_USE_FQCN" value="true" /> | |
| </PHPCodeStyleSettings> | |
| <codeStyleSettings language="HTML"> | |
| <option name="RIGHT_MARGIN" value="120" /> | |
| </codeStyleSettings> | |
| <codeStyleSettings language="PHP"> | |
| <option name="KEEP_FIRST_COLUMN_COMMENT" value="false" /> | |
| <option name="BLANK_LINES_AFTER_PACKAGE" value="1" /> | |
| <option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" /> | |
| <option name="ALIGN_MULTILINE_TERNARY_OPERATION" value="true" /> | |
| <option name="ALIGN_MULTILINE_ARRAY_INITIALIZER_EXPRESSION" value="true" /> | |
| <option name="ALIGN_GROUP_FIELD_DECLARATIONS" value="true" /> | |
| <option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" /> | |
| <option name="METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" /> | |
| <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" /> | |
| <option name="KEEP_SIMPLE_METHODS_IN_ONE_LINE" value="true" /> | |
| <option name="PLACE_ASSIGNMENT_SIGN_ON_NEXT_LINE" value="true" /> | |
| </codeStyleSettings> | |
| </code_scheme> | |
| ------------------------------ | |
| // - - - - - - - - - - - - - - - - - - - - - - - - - - | |
| // $END$ | |
| // - - - - - - - - - - - - - - - - - - - - - - - - - - |
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
| #!/bin/bash | |
| echo "=========================================================" | |
| echo "O que deseja fazer:" | |
| echo "=========================================================" | |
| echo "1 = Ativar o profiler" | |
| echo "2 = Desativar o profiler" | |
| echo "3 = Limpar log" | |
| echo "=========================================================" | |
| read action | |
| if [ ${action} = 1 ] | |
| then | |
| sudo sed -i 's/^;xdebug.profiler_enable = 1;/xdebug.profiler_enable = 1;/g' /etc/php/7.2/apache2/php.ini | |
| sudo sed -i 's/^xdebug.profiler_enable_trigger = 1;/;xdebug.profiler_enable_trigger = 1;/g' /etc/php/7.2/apache2/php.ini | |
| sudo service apache2 restart | |
| echo "Profiler ativado" | |
| fi | |
| if [ ${action} = 2 ] | |
| then | |
| sudo sed -i 's/^xdebug.profiler_enable = 1;/;xdebug.profiler_enable = 1;/g' /etc/php/7.2/apache2/php.ini | |
| sudo sed -i 's/^;xdebug.profiler_enable_trigger = 1;/xdebug.profiler_enable_trigger = 1;/g' /etc/php/7.2/apache2/php.ini | |
| sudo service apache2 restart | |
| echo "Profiler desativado" | |
| fi | |
| if [ ${action} = 3 ] | |
| then | |
| rm /media/dados/web/xdebug_profiler/cachegrind.out* | |
| echo "Log removido com sucesso" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment