Skip to content

Instantly share code, notes, and snippets.

@pyjavo
Last active April 29, 2020 18:28
Show Gist options
  • Save pyjavo/4866065f344ecaff0f1f to your computer and use it in GitHub Desktop.
Save pyjavo/4866065f344ecaff0f1f to your computer and use it in GitHub Desktop.

Revisions

  1. pyjavo revised this gist Nov 17, 2015. 1 changed file with 5 additions and 2 deletions.
    7 changes: 5 additions & 2 deletions ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -124,7 +124,10 @@ https://getcomposer.org/doc/03-cli.md#require
    -------- Permisos para carpetas ---------------

    Colocando la carpeta con el usuario www-data
    sudo chown -Rf www-data: mi_carpeta/
    sudo chown -Rf www-data: mi_carpeta/

    Abrir sublime con permisos de root
    gksu sublime-text
    gksu sublime-text

    Ver logs de Symfony
    tail -f app/logs/prod.log
  2. pyjavo revised this gist Nov 9, 2015. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -41,6 +41,9 @@ php app/console fos:user:promote testuser --super
    Quitando un role a usuario
    php app/console fos:user:demote testuser ROLE_ADMIN

    Cambiar Password
    php app/console fos:user:change-password username pæssword



    ---- Creando Proyecto en Sonata ----
  3. pyjavo revised this gist Sep 21, 2015. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -63,6 +63,8 @@ Correr el servidor permitiendo que cualquiera de la misma red pueda ver

    Borrar el cache
    php app/console cache:clear && php app/console cache:clear --env=prod

    /opt/lampp/bin/php app/console cache:clear && /opt/lampp/bin/php app/console cache:clear --env=prod

    Creando una entidad
    php app/console generate:doctrine:entity
  4. pyjavo revised this gist Sep 13, 2015. 1 changed file with 8 additions and 3 deletions.
    11 changes: 8 additions & 3 deletions ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -6,16 +6,21 @@ Conocer Version de Symfony instalada
    Crear una carpeta
    mkdir CarpetaNueva

    ------------------ Composer ------------------

    Instalar composer en esa carpeta
    curl -sS https://getcomposer.org/installer | php
    sudo mv composer.phar /usr/local/bin/composer

    Instalar symfony
    composer create-project symfony/framework-standard-edition myproject/ ~2.5

    Instalar paquete en VPS
    /opt/lampp/bin/php composer.phar require liuggio/excelbundle

    Instalar paquete en
    VPS
    /opt/lampp/bin/php composer.phar require liuggio/excelbundle
    Local
    composer require liuggio/excelbundle

    Actualizando paquetes para evitar vulnerabilidades de seguridad descubiertas
    sudo composer update

  5. pyjavo revised this gist Sep 13, 2015. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -12,6 +12,9 @@ Instalar composer en esa carpeta

    Instalar symfony
    composer create-project symfony/framework-standard-edition myproject/ ~2.5

    Instalar paquete en VPS
    /opt/lampp/bin/php composer.phar require liuggio/excelbundle

    Actualizando paquetes para evitar vulnerabilidades de seguridad descubiertas
    sudo composer update
  6. pyjavo revised this gist Sep 8, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,8 @@ Instalar composer en esa carpeta
    Instalar symfony
    composer create-project symfony/framework-standard-edition myproject/ ~2.5


    Actualizando paquetes para evitar vulnerabilidades de seguridad descubiertas
    sudo composer update

    -------------------- FOS (Fos User Bundle) --------------------

  7. pyjavo revised this gist Sep 8, 2015. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -105,4 +105,12 @@ php app/console cache:clear && php app/console cache:clear --env=prod
    composer create-project sonata-project/sandbox:2.3.x-dev

    -------- Documentacion Composer ---------------
    https://getcomposer.org/doc/03-cli.md#require
    https://getcomposer.org/doc/03-cli.md#require

    -------- Permisos para carpetas ---------------

    Colocando la carpeta con el usuario www-data
    sudo chown -Rf www-data: mi_carpeta/

    Abrir sublime con permisos de root
    gksu sublime-text
  8. pyjavo revised this gist Aug 14, 2015. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -102,4 +102,7 @@ alias php=/usr/local/zend/bin/php
    php app/console cache:clear && php app/console cache:clear --env=prod

    -------- Sonata --------
    composer create-project sonata-project/sandbox:2.3.x-dev
    composer create-project sonata-project/sandbox:2.3.x-dev

    -------- Documentacion Composer ---------------
    https://getcomposer.org/doc/03-cli.md#require
  9. pyjavo revised this gist Jul 17, 2015. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -29,6 +29,9 @@ php app/console fos:user:promote testeuser ROLE_ADMIN
    Cambiando un role de usuario a super admin
    php app/console fos:user:promote testuser --super

    Quitando un role a usuario
    php app/console fos:user:demote testuser ROLE_ADMIN



    ---- Creando Proyecto en Sonata ----
  10. pyjavo revised this gist Jul 10, 2015. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -29,6 +29,8 @@ php app/console fos:user:promote testeuser ROLE_ADMIN
    Cambiando un role de usuario a super admin
    php app/console fos:user:promote testuser --super



    ---- Creando Proyecto en Sonata ----

    DATABASE_NAME=mediprueba DATABASE_USER=root DATABASE_PASSWORD="1234" composer create-project sonata-project/sandbox:2.3.x-dev --prefer-dist --no-dev
  11. pyjavo revised this gist Jul 10, 2015. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -13,14 +13,22 @@ Instalar composer en esa carpeta
    Instalar symfony
    composer create-project symfony/framework-standard-edition myproject/ ~2.5

    ---- Creando Nuevo Usuario con FOS (Fos User Bundle) ----


    -------------------- FOS (Fos User Bundle) --------------------

    Creando usuario
    php app/console fos:user:create testuser [email protected] p@ssword

    Creando super admin
    php app/console fos:user:create adminuser --super-admin

    Cambiando a un usuario de role
    php app/console fos:user:promote testeuser ROLE_ADMIN

    Cambiando un role de usuario a super admin
    php app/console fos:user:promote testuser --super

    ---- Creando Proyecto en Sonata ----

    DATABASE_NAME=mediprueba DATABASE_USER=root DATABASE_PASSWORD="1234" composer create-project sonata-project/sandbox:2.3.x-dev --prefer-dist --no-dev
  12. pyjavo revised this gist Jun 11, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -45,14 +45,14 @@ Borrar el cache
    Creando una entidad
    php app/console generate:doctrine:entity

    php app/console generate:doctrine:entity --no-interaction --entity=AcmeBlogBundle:Post --fields="title:string(100) body:text" --format=xml
    php app/console generate:doctrine:entity --no-interaction --entity=TSFullCargoBundle:Propietario --fields="nombres:string(255) apellidos:string(255) razonsocial:string(255) telefono:string(255)" --format=yml



    Creando un controlador
    php app/console generate:controller

    php app/console generate:controller --controller=AcmeBlogBundle:Post
    php app/console generate:controller --controller=TSFullCargoBundle:Propietario



  13. pyjavo revised this gist Jun 10, 2015. 1 changed file with 10 additions and 1 deletion.
    11 changes: 10 additions & 1 deletion ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -42,11 +42,20 @@ Correr el servidor permitiendo que cualquiera de la misma red pueda ver
    Borrar el cache
    php app/console cache:clear && php app/console cache:clear --env=prod

    Creando las entidades
    Creando una entidad
    php app/console generate:doctrine:entity

    php app/console generate:doctrine:entity --no-interaction --entity=AcmeBlogBundle:Post --fields="title:string(100) body:text" --format=xml



    Creando un controlador
    php app/console generate:controller

    php app/console generate:controller --controller=AcmeBlogBundle:Post



    Crea la BD de acuerdo a las entidades creadas (borra y crea las tablas de nuevo)
    php app/console doctrine:schema:create

  14. pyjavo revised this gist Jun 10, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -43,7 +43,7 @@ Borrar el cache
    php app/console cache:clear && php app/console cache:clear --env=prod

    Creando las entidades
    php app/console doctrine:generate:entity
    php app/console generate:doctrine:entity

    php app/console generate:doctrine:entity --no-interaction --entity=AcmeBlogBundle:Post --fields="title:string(100) body:text" --format=xml

  15. pyjavo revised this gist Jun 10, 2015. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -45,6 +45,8 @@ Borrar el cache
    Creando las entidades
    php app/console doctrine:generate:entity

    php app/console generate:doctrine:entity --no-interaction --entity=AcmeBlogBundle:Post --fields="title:string(100) body:text" --format=xml

    Crea la BD de acuerdo a las entidades creadas (borra y crea las tablas de nuevo)
    php app/console doctrine:schema:create

  16. pyjavo revised this gist Jun 9, 2015. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    Conocer Version de Symfony instalada
    php app/console --version

    ---- Creando Proyecto Nuevo En Symfony----

    Crear una carpeta
  17. pyjavo revised this gist Mar 9, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ Instalar composer en esa carpeta
    Instalar symfony
    composer create-project symfony/framework-standard-edition myproject/ ~2.5

    ---- Creando Nuevo Usuario con FOS ----
    ---- Creando Nuevo Usuario con FOS (Fos User Bundle) ----

    Creando usuario
    php app/console fos:user:create testuser [email protected] p@ssword
  18. pyjavo revised this gist Aug 8, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@ php app/console fos:user:create adminuser --super-admin

    ---- Creando Proyecto en Sonata ----

    DATABASE_NAME=medicaltie_ma DATABASE_USER=root DATABASE_PASSWORD="1234" composer create-project sonata-project/sandbox:2.3.x-dev
    DATABASE_NAME=mediprueba DATABASE_USER=root DATABASE_PASSWORD="1234" composer create-project sonata-project/sandbox:2.3.x-dev --prefer-dist --no-dev

    ---- ----

  19. pyjavo revised this gist Aug 6, 2014. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,10 @@ php app/console fos:user:create testuser [email protected] p@ssword
    Creando super admin
    php app/console fos:user:create adminuser --super-admin

    ---- Creando Proyecto en Sonata ----

    DATABASE_NAME=medicaltie_ma DATABASE_USER=root DATABASE_PASSWORD="1234" composer create-project sonata-project/sandbox:2.3.x-dev

    ---- ----

    Ver todos los comandos de console
  20. pyjavo revised this gist Aug 6, 2014. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,14 @@ Instalar composer en esa carpeta
    Instalar symfony
    composer create-project symfony/framework-standard-edition myproject/ ~2.5

    ---- Creando Nuevo Usuario con FOS ----

    Creando usuario
    php app/console fos:user:create testuser [email protected] p@ssword

    Creando super admin
    php app/console fos:user:create adminuser --super-admin

    ---- ----

    Ver todos los comandos de console
  21. pyjavo revised this gist Jul 22, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -27,10 +27,10 @@ Correr el servidor permitiendo que cualquiera de la misma red pueda ver
    Borrar el cache
    php app/console cache:clear && php app/console cache:clear --env=prod

    Creando la base de datos
    Creando las entidades
    php app/console doctrine:generate:entity

    Identifica las entidades creadas en el Bundle y las genera en la BD (borra y crea las tablas de nuevo)
    Crea la BD de acuerdo a las entidades creadas (borra y crea las tablas de nuevo)
    php app/console doctrine:schema:create

    Alter tables
  22. pyjavo revised this gist Jul 22, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@ Ver todos los comandos de console
    php app/console

    Crear un Bundle desde consola (dirigirse a la carpeta path)
    php app/console generate:bundle
    php app/console generate:bundle --namespace=MA/MedicalBundle

    Correr el servidor
    php app/console server:run
  23. pyjavo revised this gist Jul 22, 2014. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -60,4 +60,7 @@ mysql -uroot fullcargo < ddbb.sql
    -------- En Producción --------
    sudo su
    alias php=/usr/local/zend/bin/php
    php app/console cache:clear && php app/console cache:clear --env=prod
    php app/console cache:clear && php app/console cache:clear --env=prod

    -------- Sonata --------
    composer create-project sonata-project/sandbox:2.3.x-dev
  24. pyjavo renamed this gist Jun 19, 2014. 1 changed file with 2 additions and 8 deletions.
    10 changes: 2 additions & 8 deletions gistfile1.txt → ComandosSymfony
    Original file line number Diff line number Diff line change
    @@ -10,16 +10,10 @@ Instalar composer en esa carpeta
    Instalar symfony
    composer create-project symfony/framework-standard-edition myproject/ ~2.5

    Ver todos los comandos de console
    php app/console

    ---- ----

    Crear proyecto con SENCHA CMD
    sencha -sdk /path/to/framework generate app MyApp /path/to/MyApp
    sencha -sdk /opt/sencha/extjs/ext-4.2.1.883/ generate app MySenchaApp /var/www/MiAppdSencha/

    ---- ----
    Ver todos los comandos de console
    php app/console

    Crear un Bundle desde consola (dirigirse a la carpeta path)
    php app/console generate:bundle
  25. pyjavo revised this gist Jun 18, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -52,9 +52,9 @@ Borra las tablas de la base de datos
    php app/console doctrine:schema:drop --force

    1. Mapear archivos yml de una Base de Datos ya creada
    php app/console doctrine:mapping:import TSFullCargoBundle yml
    php app/console doctrine:mapping:import TSFullCargoBundle YML

    2. Crear las entidades
    2. Crear las entidades a partir de esos YML
    php app/console doctrine:generate:entities AcmeBlogBundle

    Dump mysql en local
  26. pyjavo revised this gist Jun 18, 2014. 1 changed file with 5 additions and 2 deletions.
    7 changes: 5 additions & 2 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -51,8 +51,11 @@ Actualizar una entidad especifica de la BD
    Borra las tablas de la base de datos
    php app/console doctrine:schema:drop --force

    *Importar archivos yml de la base de datos
    php app/console doctrine:mapping:import TSFullCargoBundle
    1. Mapear archivos yml de una Base de Datos ya creada
    php app/console doctrine:mapping:import TSFullCargoBundle yml

    2. Crear las entidades
    php app/console doctrine:generate:entities AcmeBlogBundle

    Dump mysql en local
    mysqldump symfony -uroot -p> ddbb.sql
  27. pyjavo revised this gist Jun 18, 2014. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -19,6 +19,8 @@ Crear proyecto con SENCHA CMD
    sencha -sdk /path/to/framework generate app MyApp /path/to/MyApp
    sencha -sdk /opt/sencha/extjs/ext-4.2.1.883/ generate app MySenchaApp /var/www/MiAppdSencha/

    ---- ----

    Crear un Bundle desde consola (dirigirse a la carpeta path)
    php app/console generate:bundle

  28. pyjavo revised this gist Jun 17, 2014. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -14,6 +14,7 @@ Ver todos los comandos de console
    php app/console

    ---- ----

    Crear proyecto con SENCHA CMD
    sencha -sdk /path/to/framework generate app MyApp /path/to/MyApp
    sencha -sdk /opt/sencha/extjs/ext-4.2.1.883/ generate app MySenchaApp /var/www/MiAppdSencha/
  29. pyjavo revised this gist Jun 17, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -15,7 +15,7 @@ Ver todos los comandos de console

    ---- ----
    Crear proyecto con SENCHA CMD
    sencha -sdk /path/to/framework generate app MyApp ./app
    sencha -sdk /path/to/framework generate app MyApp /path/to/MyApp
    sencha -sdk /opt/sencha/extjs/ext-4.2.1.883/ generate app MySenchaApp /var/www/MiAppdSencha/

    Crear un Bundle desde consola (dirigirse a la carpeta path)
  30. pyjavo revised this gist Jun 17, 2014. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -14,6 +14,10 @@ Ver todos los comandos de console
    php app/console

    ---- ----
    Crear proyecto con SENCHA CMD
    sencha -sdk /path/to/framework generate app MyApp ./app
    sencha -sdk /opt/sencha/extjs/ext-4.2.1.883/ generate app MySenchaApp /var/www/MiAppdSencha/

    Crear un Bundle desde consola (dirigirse a la carpeta path)
    php app/console generate:bundle