Skip to content

Instantly share code, notes, and snippets.

View arnoudhgz's full-sized avatar

Arnoud Beekman arnoudhgz

View GitHub Profile

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@peterjaap
peterjaap / attachToWebsite.sql
Created September 24, 2014 12:27
Magento SQL query to attach products that are not added to a website to the default website (id 1)
INSERT INTO catalog_product_website
(product_id, website_id)
(SELECT catalog_product_entity.entity_id, '1'
FROM catalog_product_entity LEFT JOIN catalog_product_website ON catalog_product_entity.entity_id = catalog_product_website.product_id
GROUP BY catalog_product_entity.entity_id
HAVING COUNT(catalog_product_website.product_id) = 0
ORDER BY sku DESC)
@jacobtomlinson
jacobtomlinson / get-toolbox.sh
Last active November 22, 2017 21:23
Docker toolbox for linux
#!/bin/bash
# A quick script to install Docker Engine and Compose
# Run with sudo
# Install Docker Engine
curl -sSL https://get.docker.com/ | sh
# Start Docker
# TODO update to handle multiple distros
service docker start
@erikhansen
erikhansen / 1_product_queries.sql
Last active May 30, 2024 09:01
Magento 2 - Remove duplicate store view-specific product and category data
/*
* IMPORTANT: The queries below are written for Magento Enterprise. If you're going to run them on Magento Community, you need
* to replace all instances of ".row_id" with ".entity_id". See this for context: http://magento.stackexchange.com/questions/139740/magento-2-schema-changes-for-ee-catalog-staging
*
* When importing products in Magento 2, if you specify store view codes in the store_view_code column, product data will be set at
* both the global scope as well as the specific store view scope. This is not ideal because now you have duplicate
* data at two different scopes that shouldn't actually be duplicated. The scripts below clean up this data by finding
* data set at specific store view scopes and if it's an exact match to the data set at the global store view, then it
* deletes the data set at the specific store view scope.
*