sudo lsof -nP -iTCP -sTCP:LISTEN
sudo netstat -plunt
sudo killall -HUP mDNSResponder
# To use the "confirm" target inside another target, | |
# use the " if $(MAKE) -s confirm ; " syntax. | |
mycommand: | |
@if $(MAKE) -s confirm ; then \ | |
execute_your_command_here ; \ | |
fi | |
.PHONY: mycommand | |
# The CI environment variable can be set to a non-empty string, |
# To use the "confirm" target inside another target, | |
# use the " if $(MAKE) -s confirm ; " syntax. | |
mycommand: | |
@if $(MAKE) -s confirm ; then \ | |
execute_your_command_here ; \ | |
fi | |
.PHONY: mycommand | |
# The CI environment variable can be set to a non-empty string, |
<?php | |
/* | |
############################################### | |
WARNING: this script truncates url rewrite tables and generates system url rewrites; | |
ALL CUSTOM URL REWRITES WILL BE DELETED | |
############################################### | |
*/ | |
const BATCH_SIZE = 5; |
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 |
#!/bin/bash | |
# get all running docker container names | |
containers=$(sudo docker ps | awk '{if(NR>1) print $NF}') | |
host=$(hostname) | |
# loop through all containers | |
for container in $containers | |
do | |
echo "Container: $container" |
<?php | |
// add to bootstrap.php | |
register_shutdown_function(function (){ | |
if (strpos(@$_SERVER['HTTP_ACCEPT'], 'text/html') !== false) { | |
/** @var \Magento\Framework\App\Resource $adapter */ | |
$adapter = \Magento\Framework\App\ObjectManager::getInstance() | |
->get('Magento\Framework\App\ResourceConnection'); | |
// composer.phar require "jdorn/sql-formatter:1.3.*@dev" | |
// require_once '/home/user/.composer/vendor/jdorn/sql-formatter/lib/SqlFormatter.php'; | |
/** @var Zend_Db_Profiler $profiler */ |
[mysqld] | |
## After edit config you have to remove log files and restart mysql server | |
## because after changing innodb-log-file-size you should recreate ib_logfiles | |
## Stop MySQL server | |
## rm /data/dir/ib_logfile* | |
## Run MySQL server | |
##Table open cache under MacOS and MySQL 5.6 should be 250. | |
##Otherwise you will get error MySQL server has gone away | |
##table-open-cache = 250 |