Skip to content

Instantly share code, notes, and snippets.

View ezequiel9's full-sized avatar
:octocat:
Coding

Ezequiel Fernandez ezequiel9

:octocat:
Coding
View GitHub Profile
@ezequiel9
ezequiel9 / rsync.txt
Last active April 20, 2016 00:31
Uso de Rsync para sincronizar carpetas o servidores.
1) Sync de files:
#entramos en la carpeta que deseamos sincronizar
$ cd /public_html/sites/
#sincronizamos la carpeta con la de origen en el repo o servidor por ejemplo.
$ rsync -avz user@dominio.com:/home/www/sites/ .
## Si tenemos hostgator u otro servidor que necesita incluir el puerto por ssh haríamos esto.
@ezequiel9
ezequiel9 / Generate-ssh-key-public
Created April 22, 2016 16:35
Generar Claves Publicas en Ubuntu para usar Git con los repositorios
Generando tu clave pública SSH
PASO 1
$ cd ~/.ssh
$ ls
authorized_keys2 id_dsa known_hosts
config
@ezequiel9
ezequiel9 / gist:26971310455b3061f29790fac3f2c2d2
Created May 9, 2016 03:01
Comandos Git Básicos Necesarios
#############################################
# Push de la rama actual
git push origin $rama_actual
#############################################
# Volver a un commit anterior, descartando los cambios
git reset --HARD $SHA1
#############################################
# Ver y descargar Ramas remotas
Luego de llevar a cabo los pasos del otro
tutorial de cómo instalar Lamp y configurar
los virtualhost procedemos a instalar laravel
sobre esa intalación.
0. Chequeamos estos requisitos necesarios para que funcione Laravel.
PHP> = 5.5.9
OpenSSL PHP Extensión
DOP PHP Extensión
@ezequiel9
ezequiel9 / composer.json
Created June 21, 2017 09:33
Whoops, looks like something went wrong. 1/1 TokenMismatchException in VerifyCsrfToken.php line...
/*
LES CUENTO QUE ESTUVE COMO 2 DÍAS BUSCANDO LA SOLUCIÓN A ESTE PROBLEMA.
EN MI CASO ME PASABA CUANDO INTENTABA SUBIR MI PROYECTO CASI TERMINADO A UN SERVER COMPARTIDO.
PROBÉ DESDE LA SOLUCIÓN MAS FACIL A LA MAS DIFÍCIL Y NADA LO ARREGLABA.
INSTALÉ 2 VECES DESDE 0 EL PROYECTO... COPIÉ UNO A UNO CADA ARCHIVO QUE HICE... Y NADA
@ezequiel9
ezequiel9 / customsort.js
Created March 25, 2019 04:23
Custom Sort Boostrap Table Vue | prop sort-compare
# Your table will have something like this
<b-table show-empty
stacked="sm"
:items="items"
:fields="fields"
:current-page="currentPage"
:per-page="perPage"
:filter="filter"
@filtered="onFiltered"
@row-clicked="editUser"
@ezequiel9
ezequiel9 / how to install wp cli in windows 10.md
Last active August 15, 2019 02:33
How to install WP-CLI in Windows 10.

WP-CLI is a tool for controlling WordPress through a console window.

1. Install Composer if you don't have it globally.

Go to this link and follow the instructions. https://getcomposer.org/doc/00-intro.md#installation-windows (this is not a guide to install composer :))

C:\Users\username>composer -V

Composer version xxxxxxxxxx

@ezequiel9
ezequiel9 / .sh
Created November 7, 2020 23:12
How to Upload an SSH Public Key to an Existing Droplet | Digital Ocean
cat ~/.ssh/id_rsa.pub | ssh user@droplet-ip "cat >> ~/.ssh/authorized_keys"
@ezequiel9
ezequiel9 / laravel-permissions.txt
Last active November 8, 2020 08:19
How to proper set up Laravel Permissions
Your user as owner
I prefer to own all the directories and files (it makes working with everything much easier), so I do:
# sudo chown -R my-user:www-data /path/to/your/laravel/root/directory
Then I give both myself and the webserver permissions:
# sudo find /path/to/your/laravel/root/directory -type f -exec chmod 664 {} \;
# sudo find /path/to/your/laravel/root/directory -type d -exec chmod 775 {} \;
@ezequiel9
ezequiel9 / .htaccess
Created December 3, 2020 03:37 — forked from Zodiac1978/.htaccess
Safer WordPress with these .htaccess additions
# Don't show errors which contain full path diclosure (FPD)
# Use that line only if PHP is installed as a module and not per CGI
# try using a php.ini in that case.
# Change mod_php5.c to mod_php7.c if you are running PHP7
<IfModule mod_php5.c>
php_flag display_errors Off
</IfModule>
# Don't list directories
<IfModule mod_autoindex.c>