Skip to content

Instantly share code, notes, and snippets.

View azurams's full-sized avatar

William Blanc Dit Jolicoeur azurams

View GitHub Profile
@azurams
azurams / 0001-handles-File-field-expansion-for-D8-codebase-with-co.patch
Last active February 14, 2018 15:07
Patch handles File field expansion for D8 codebase
diff --git a/src/Drupal/Driver/Fields/Drupal8/FileHandler.php b/src/Drupal/Driver/Fields/Drupal8/FileHandler.php
index bbef214..ee4a1f5 100644
--- a/src/Drupal/Driver/Fields/Drupal8/FileHandler.php
+++ b/src/Drupal/Driver/Fields/Drupal8/FileHandler.php
@@ -5,5 +5,37 @@ namespace Drupal\Driver\Fields\Drupal8;
/**
* File field handler for Drupal 8.
*/
-class FileHandler extends EntityReferenceHandler {
+class FileHandler extends AbstractHandler {
@azurams
azurams / magento_removeAllCategories.sql
Last active March 31, 2016 14:17 — forked from jklance/magento_removeAllCategories.sql
Magento: Remove all categories from a store
##
## should update the script below to use https://www.cuisinteractive.com/magento-delete-all-products-categories-via-sql/
##
SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE `catalog_category_entity`;
TRUNCATE TABLE `catalog_category_entity_datetime`;
TRUNCATE TABLE `catalog_category_entity_decimal`;
TRUNCATE TABLE `catalog_category_entity_int`;
TRUNCATE TABLE `catalog_category_entity_text`;
@azurams
azurams / customers.sql
Last active March 31, 2016 13:58 — forked from leek/_Magento1_DeleteTestData.md
Magento - Delete All Test Data
SET FOREIGN_KEY_CHECKS=0;
-- Customers
TRUNCATE `customer_address_entity`;
TRUNCATE `customer_address_entity_datetime`;
TRUNCATE `customer_address_entity_decimal`;
TRUNCATE `customer_address_entity_int`;
TRUNCATE `customer_address_entity_text`;
TRUNCATE `customer_address_entity_varchar`;
TRUNCATE `customer_entity`;

OS X ENV (re)Install

This is my personal guide to restore my configuration and setup my system for a fresh install. I use it and keep it updated frequently. Hope it will inspire you on your own way =].

Backup

Before a fresh reinstall, don't forget to backup many things. A regular ghost made with CarbonCopyCloner is a good solution, but if you can't, you should save the following :

Awesome PHP Libraries

A list of amazingly awesome PHP libraries that you should consider using (and some other shiny extras).