Skip to content

Instantly share code, notes, and snippets.

View daniDLL's full-sized avatar
😎

Daniel Delgado daniDLL

😎
View GitHub Profile
@daniDLL
daniDLL / 0_reuse_code.js
Created November 23, 2016 07:39
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@daniDLL
daniDLL / grep GOD
Last active June 19, 2019 10:22
grep GOD
Búsqueda en distintos ficheros
==============================
find . -name <patternFile> -print0 | xargs -0 grep -n -H <patternSearch>
grep -rnw '/path/to/somewhere/' -e "pattern"
Búsqueda en un string muy largo.
================================
grep -oE '.{20}<patternToSearch>.{20}'
@daniDLL
daniDLL / time-curl
Created March 21, 2017 08:54
time-curl
curl -4 wttr.in/Zaragoza?lang=es
@daniDLL
daniDLL / git submodules
Created October 18, 2017 10:48
git submodules
git submodule init && git submodule sync && git submodule update && git submodule foreach modman deploy
* * * * * ! test -e /var/www/magento/maintenance.flag && /bin/bash /var/www/magento/scheduler_cron.sh --mode default --excludeGroups reindex,importador_productos,importador_imagenes,actualizador_stock,queue_management
* * * * * ! test -e /var/www/magento/maintenance.flag && /bin/bash /var/www/magento/scheduler_cron.sh --mode default --includeGroups reindex
* * * * * ! test -e /var/www/magento/maintenance.flag && /bin/bash /var/www/magento/scheduler_cron.sh --mode default --includeGroups importador_productos
* * * * * ! test -e /var/www/magento/maintenance.flag && /bin/bash /var/www/magento/scheduler_cron.sh --mode default --includeGroups importador_imagenes
* * * * * ! test -e /var/www/magento/maintenance.flag && /bin/bash /var/www/magento/scheduler_cron.sh --mode default --includeGroups actualizador_stock
* * * * * ! test -e /var/www/magento/maintenance.flag && /bin/bash /var/www/magento/scheduler_cron.sh --mode default --includeGroups queue_management
* * * * * ! test -e /var/www/magento/maintenance.flag &&
@daniDLL
daniDLL / RSYNC (SSH)
Last active November 5, 2019 10:55
RSYNC (SSH)
rsync -avzhe ssh host_user@host_ip:remote_path/ local_path
@daniDLL
daniDLL / Dumping
Created March 23, 2018 10:20
Dumping
mysqldump -u root -h localhost database --single-transaction | gzip > /tmp/database.dump.sql.gz
@daniDLL
daniDLL / debug-knockout
Created September 7, 2018 07:48
Debug Knockout
<pre data-bind="text: JSON.stringify(ko.toJS($data), null, 2)"></pre>
@daniDLL
daniDLL / mage2-create-project
Created October 30, 2018 18:49
Magento 2 Create Project
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento
composer create-project --repository-url=https://repo.magento.com/ magento/project-enterprise-edition magento
@daniDLL
daniDLL / DEFINER
Created November 5, 2018 18:34
DEFINER remove
sudo sed 's/\sDEFINER=`[^`]*`@`[^`]*`//g' -i dump-05_11_18.sql