Skip to content

Instantly share code, notes, and snippets.

View evagabond's full-sized avatar
🎯
Focusing

<CoolDeepSingh /> evagabond

🎯
Focusing
View GitHub Profile
@evagabond
evagabond / del-m2-categories.sql
Last active May 20, 2018 04:45
Delete Categories using phpMyAdmin in Magento 2
/* If you are using table_prefix in your DB
* do not forget to add them in the table names below prior to executing this code
*/
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;
@evagabond
evagabond / del-m2-categories.sql
Created May 20, 2018 04:41
Delete Categories Using phpMyAdmin in Magento 2
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;
TRUNCATE TABLE catalog_category_entity_varchar;
TRUNCATE TABLE catalog_category_product;
TRUNCATE TABLE catalog_category_product_index;
@evagabond
evagabond / del-m2-categories.sql
Created May 20, 2018 04:41
Delete Categories Using phpMyAdmin in Magento 2
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;
TRUNCATE TABLE catalog_category_entity_varchar;
TRUNCATE TABLE catalog_category_product;
TRUNCATE TABLE catalog_category_product_index;
@evagabond
evagabond / test-var-let-const.js
Last active April 15, 2018 09:00
Why not to use var in variable declaration, and instead use let or const in JavaScript
// Global Scope
var a = 1;
var b = 2;
var c = 3;
// Testing Block Scope
if(true) {
// Block scope
var a = 4;
let b = 5;