Skip to content

Instantly share code, notes, and snippets.

View ydenyshchenk's full-sized avatar

Yuriy Denyshchenko ydenyshchenk

View GitHub Profile
@aabumuslimov
aabumuslimov / Magento1 indexers healthcheck
Last active March 9, 2017 10:17
Magento1 indexers healthcheck
SELECT m.metadata_id, m.table_name, m.changelog_name, IF(ccd.value = 1, "On Save", "Scheduled") AS "Mode", m.version_id AS "Processed version", v.version_id AS "Changelog version"
, CAST(v.version_id AS SIGNED) - CAST(m.version_id AS SIGNED) AS "Behind"
FROM (
(SELECT "enterprise_url_rewrite_redirect_cl" AS changelog_name, "index_management/index_options/redirect_url_rewrite" AS path, version_id FROM enterprise_url_rewrite_redirect_cl ORDER BY version_id DESC LIMIT 1)
UNION (SELECT "cataloginventory_stock_status_cl", "index_management/index_options/product_price_and_stock", version_id FROM cataloginventory_stock_status_cl ORDER BY version_id DESC LIMIT 1)
UNION (SELECT "catalogsearch_fulltext_cl", "index_management/index_options/fulltext", version_id FROM catalogsearch_fulltext_cl ORDER BY version_id DESC LIMIT 1)
UNION (SELECT "enterprise_url_rewrite_category_cl", "index_management/index_options/category_url_rewrite", version_id FROM enterprise_url_rewrite_category_cl ORDER BY version_id DESC LIMIT 1)
UNION
@tshabatyn
tshabatyn / CODE_AND_DB_DUMP.MD
Last active October 5, 2022 05:33
Making Code and DB dump

Code dump

tar cf - ./ --exclude=pub/media/catalog/* --exclude=pub/media/* --exclude=pub/media/backup/* --exclude=pub/media/import/* --exclude=pub/media/tmp/* --exclude=pub/static/* --exclude=var/* --exclude=private --exclude=tests | gzip > /tmp/`date +%s`.code.tar.gz

After execution you will be able to find dump in the directory /tmp

ls -laht /tmp/*.code.tar.gz

Your dump will be shown at the top of the listed dumps.

@twonjosh
twonjosh / Create iOS Icons.jsx
Last active April 25, 2023 08:41 — forked from ma11hew28/Create Icons.jsx
Photoshop Script to Create iOS Icons from a source image
// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com