Skip to content

Instantly share code, notes, and snippets.

View Nolwennig's full-sized avatar
🐘
Focusing

Nolwennig Nolwennig

🐘
Focusing
View GitHub Profile
@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 / local-xml-template.xml
Last active July 29, 2019 14:43
Magento 1.9.2.1 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 / 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 / mise_en_prod_ftp.notice.txt
Last active March 1, 2019 16:38
mise en prod ftp
###############
# Problem:
# faire une mise en prod avec le travail et les fichiers de qqn d'autre
# On a : un dépôt git local, un dépôt git preprod, un accès ftp (ou sftp) en prod
#################
# résolution
# 1*/ trouver la dernière mise en prod sur srv prod
# 1.1*/ cnx ftp -> check last date
# 2*/ faire le diff (git whatchanged) sur la preprod (plus stable que local) entre %last_date_modify_prod% et %now% (ou autre date)
@Nolwennig
Nolwennig / cleanup_session.sh
Last active June 20, 2022 00:47
Magento delete session files when var/session directory contain a too massive number of sess_* files
#!/bin/sh
# Place this script in magento/var/ directory
for n in `seq 0 9`
do
for u in `seq 0 9`
do
for m in `seq 0 9`
do
name="sess_"$n$u$m*
@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
@Nolwennig
Nolwennig / flush_email_queue_recipients.sql
Last active January 8, 2018 18:11
Magento flush email queue recipients
DELETE
FROM `core_email_queue_recipients`
WHERE `core_email_queue_recipients`.`message_id` NOT IN
(
SELECT `core_email_queue`.`message_id`
FROM `core_email_queue`
)
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