Skip to content

Instantly share code, notes, and snippets.

View Nolwennig's full-sized avatar
🐘
Focusing

Nolwennig Nolwennig

🐘
Focusing
View GitHub Profile
@Nolwennig
Nolwennig / xml
Created August 7, 2015 15:51
Magento 1.4.1.0 app/etc/local.xml.template
<config>
<global>
<install>
<date>{{date}}</date>
</install>
<crypt>
<key>{{key}}</key>
</crypt>
<disable_local_modules>false</disable_local_modules>
<resources>
@Nolwennig
Nolwennig / uninstall_PayZen_Magento_1.4-1.9_v1.5.4.sh
Last active September 14, 2015 09:28
rollback after unpack payzen
rm app/code/community/Lyra/Payzen/Block/Abstract.php
rm app/code/community/Lyra/Payzen/Block/Adminhtml/Redirect.php
rm app/code/community/Lyra/Payzen/Block/Cof3xcb.php
rm app/code/community/Lyra/Payzen/Block/Field/CategoryMapping.php
rm app/code/community/Lyra/Payzen/Block/Field/Column/Label.php
rm app/code/community/Lyra/Payzen/Block/Field/Column/List.php
rm app/code/community/Lyra/Payzen/Block/Field/CustgroupOptions.php
rm app/code/community/Lyra/Payzen/Block/Field/Gift/AddedCards.php
rm app/code/community/Lyra/Payzen/Block/Field/Gift/UploadButton.php
rm app/code/community/Lyra/Payzen/Block/Field/InitButton.php
@Nolwennig
Nolwennig / uninstall_mailjet.sh
Last active September 16, 2015 08:23
rollback after unzip mailjet magento plugin
# For archive: magento-extension.zip
rm magento-extension.zip
rm screenshot/Mailjet-Magento.png
rm readme.txt
rm plugin/Mailjet-Magento.zip
# For archive: plugin/Mailjet-Magento.zip
rm app/etc/modules/MJ_Customsmtp.xml
rm app/code/local/MJ/Customsmtp/etc/system.xml
rm app/code/local/MJ/Customsmtp/etc/config.xml
@Nolwennig
Nolwennig / gist:c31894011c32bc98aea1
Last active October 6, 2015 15:06
yaml array question
service_name:
class: path\to\my\Class
tags:
- { name: doctrine.event_listener, event: prePersist }
- { name: doctrine.event_listener, event: preUpdate}
- { name: doctrine.event_listener, event: preFlush }
@Nolwennig
Nolwennig / .htaccess
Last active January 21, 2016 13:03
protection git htaccess
# source: https://marceau.casals.fr/blog/2015/05/le-htaccess-ce-heros
RedirectMatch 404 ^/(app|config|system|\.hg|\.idea|\.git|logs).*$
RedirectMatch 404 \.(md|json|yaml|gitignore|rev|neon)$
# source: http://serverfault.com/a/527911/329412 // more light but not tested
RedirectMatch 404 /\.git
catalog_eav_attribute:
-
attribute_id: 79
frontend_input_renderer: ~
is_global: 1
is_visible: 1
is_searchable: 0
is_filterable: 0
is_comparable: 0
is_visible_on_front: 0
@Nolwennig
Nolwennig / docker.md
Created November 17, 2016 13:43
docker help file

si changement de config dans un container, par exemple vhost apache ou php.ini

  1. make stop C=__CONTAINER__
  2. docker rm __CONTAINER__
  3. make build
  4. make up
upsell products: produits que vous aimeriez que votre client achète au lieu du produit qu'il consulte (+ coûteux, de meilleure qualité, etc).
related products: produits qui sont destinés à être achetés en plus de celui que le client consulte.
cross sell products: (peut apparaître à la fois sur la fiche produit, dans le panier d'achat, au fil de la navigation, etc) produit d'achat impulsif (articles aux caisses des magasins).
exemple:
- le client est sur le fiche produit : chaussure XyZ à 10€
up: chaussures à 15€
rel: lacets, cirages, etc
X: k-way, chewing-gum, etc
@Nolwennig
Nolwennig / clean_backups.sh
Created February 28, 2017 11:00
Supprime les fichiers de plus de 15 jours
#!/bin/bash
#
## Supprime les sauvegardes vieilles de plus de 15 jours
#
find /var/sqldump/ -type f -mtime +14 -delete
@Nolwennig
Nolwennig / backup_db.sh
Last active March 28, 2017 10:19
Sauvegarde toutes les bases de données en fichiers .sql.tar.bz2
#!/bin/bash
#################################
# /!\ apt-get install bzip2 /!\ #
#################################
mkdir -p /var/sqldump
cd /var/sqldump/
# Récupère toutes les bases de données
databases=`mysql --user=DATABASE_USERNAME --password=DATABASE_PASSWORD -e "SHOW DATABASES;" | grep -Ev "(Database|information_schema)"`