Skip to content

Instantly share code, notes, and snippets.

@ge0ffray
ge0ffray / .gitattributes
Created February 10, 2017 09:20
sample .gitattributes for Drupal
# ignore git files
.gitattributes export-ignore
.gitignore export-ignore
# ignore drupal files
.editorconfig export-ignore
/*.txt export-ignore
install.php export-ignore
modules/README.txt export-ignore
sites/README.txt export-ignore
themes/README.txt export-ignore
@ge0ffray
ge0ffray / .gitignore
Created February 14, 2018 14:00
.gitignore for Drupal 8 that ignores everything except custom files
# Ignore everything except custom files
/*
!/modules
/modules/*
!/modules/custom/
!/themes
/themes/*
!/themes/custom/
!/profiles
/profiles/*
@ge0ffray
ge0ffray / AutoSpell.sublime-settings
Last active November 9, 2018 11:59
My AutoSpell settings for common PHP spelling mistakes
{
"default_triggers": [
":",
";",
".",
" ",
"(",
")",
"_",
"enter"
@ge0ffray
ge0ffray / export.sql
Created October 9, 2018 12:53
Export customers information from a PrestaShop database
SELECT id_customer, IFNULL(ps_gender_lang.name, NULLIF(ps_customer.id_gender, 0)) AS gender, ps_lang.iso_code AS lang, ps_customer.firstname, ps_customer.lastname, email, ps_customer.company, passwd, secure_key, birthday, newsletter, ip_registration_newsletter, optin, website, ps_customer.note, ps_customer.active, is_guest, ps_customer.deleted, ps_customer. date_add, ps_customer.date_upd,
ps_address.alias AS address_alias, ps_address.address1, ps_address.address2, ps_address.company AS address_company, ps_address.postcode, ps_address.city, ps_address.other, ps_address.phone, ps_address.phone_mobile, ps_address.vat_number, IFNULL(ps_country.iso_code,ps_address.id_country) AS country
FROM `ps_customer`
INNER JOIN ps_lang ON ps_customer.id_lang=ps_lang.id_lang
LEFT JOIN ps_gender_lang ON ps_gender_lang.id_gender= ps_customer.id_gender AND ps_gender_lang.id_lang=1
LEFT JOIN ps_address USING(id_customer)
LEFT JOIN ps_country ON ps_country.id_country=ps_address.id_country;