Last active
October 2, 2020 18:53
-
-
Save lucasadrianof/c9943d94c0873ea52a6f29f5dc987652 to your computer and use it in GitHub Desktop.
Revisions
-
lucasadrianof revised this gist
Oct 2, 2020 . 1 changed file with 24 additions and 29 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,54 +1,49 @@ export faderim_app=app-magazord alias git-pull-all="find . -maxdepth 3 -name .git -type d | rev | cut -c 6- | rev | xargs -I {} sh -c 'echo ""Atualizando repositório"" {}; git -C {} pull'" docker_magazord() { (cd /mnt/Dev/dev/docker-magazord; docker-compose $@) } docker_magapay() { (cd /mnt/Dev/dev/docker-magapay; docker-compose $@) } xphp() { projeto=$(pwd | grep -o "[a-zA-Z-]*$") docker run --rm -it \ -v ${PWD}:/var/www/html/$projeto \ -w /var/www/html/$projeto \ -e faderim_app=$faderim_app \ magazord php \ -d xdebug.remote_autostart=On \ $@ } xphpjob() { xphp cli.php run $@ } phpmig() { additionalParams=$(([ $1 = "execute" ] || [ $1 = "migrate" ]) && echo "--no-interaction" || echo "") xphp cli.php migrations:$@ $additionalParams } switch_rev_sprint() { echo Informe a nova revisão: read rev for dir in $(ls -d /mnt/Dev/htdocs/* | grep sprint); do url=$(svn info $dir | grep -Po "(?<=^URL: ).*") newurl=$(echo $url | sed "s/[0-9]\.[0-9]\{2\}$/$rev/g") echo Alterando versão do $dir para $rev svn switch $newurl $dir done } dumpdoctrine () { xphp vendor/doctrine/orm/bin/doctrine.php orm:schema-tool:update --dump-sql > /mnt/Dev/temp/scripts-doctrine.sql } -
lucasadrianof renamed this gist
Jul 8, 2020 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
lucasadrianof revised this gist
Jul 8, 2020 . No changes.There are no files selected for viewing
-
lucasadrianof renamed this gist
Jul 8, 2020 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
lucasadrianof created this gist
Jul 8, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,54 @@ pm2 resurrect >&-; alias ll="ls -lah" alias runlike="docker run --rm -v //var/run/docker.sock://var/run/docker.sock assaflavie/runlike" alias twig-lint="php /d/www/twig-lint.phar lint" export faderim_app=app-magazord export DISPLAY=host.docker.internal:0.0 xphp () { php -d xdebug.remote_autostart=On $@ } xphpjob () { xphp cli.php run $@ } phpjob() { php cli.php run $@ } dumpdoctrine () { php vendor/doctrine/orm/bin/doctrine.php orm:schema-tool:update --dump-sql > d:/scripts-doctrine.sql } phpmig () { if [ $1 = "execute" ] || [ $1 = "migrate" ]; then php cli.php migration:$@ --no-interaction else php cli.php migration:$@ fi } svninfo*() { find . -name "*.svn" | sed "s/.svn//g" | sed "s|\.\/||g" | xargs -n1 svn info } switch_rev_sprint() { echo Informe a nova revisão: read rev for dir in $(ls -d /d/htdocs/* | grep sprint); do url=$(svn info $dir | grep -Po "(?<=^URL: ).*") newurl=$(echo $url | sed "s=[0-9]\.[0-9]\{2\}$=$rev=g") echo Alterando versão do $dir para $rev svn switch $newurl $dir done } docker_elastic_stack() { (cd /d/dev/docker_elastic; docker-compose $@) }