Skip to content

Instantly share code, notes, and snippets.

Constantin Bejenaru frozenminds

Block or report user

Report or block frozenminds

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@frozenminds
frozenminds / tideways.service
Created Nov 27, 2017
Tideways SystemD service
View tideways.service
[Unit]
Description=Tideways Daemon
Requires=network.target
[Service]
PIDFile=/var/run/tideways.pid
ExecStart=/usr/bin/tideways-daemon
User=tideways
Restart=on-failure
RestartSec=10
@frozenminds
frozenminds / nginx.conf
Last active Sep 20, 2016
Nginx Load Balancing
View nginx.conf
user www-data;
worker_processes auto;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type text/html;
View nginx.conf
server {
listen 80;
server_name test.dev;
root /var/www/html;
userid on;
default_type text/html;
index index.html;
@frozenminds
frozenminds / vhost.conf
Created Jul 14, 2015
Nginx rewrite parameter "p" to "page" using Lua
View vhost.conf
server {
...
rewrite_by_lua '
-- get query args
local args = ngx.req.get_uri_args()
if args.p ~= nil then
args.page = args.p
args.p = nil
@frozenminds
frozenminds / change-definer-mysqldump
Created Oct 17, 2014
Change MySQL database definer
View change-definer-mysqldump
sed -i 's/DEFINER=`olddefiner`/DEFINER=`newdefiner`/g' mysqldump-file.sql
@frozenminds
frozenminds / performance-mage_reports.xml
Created Oct 14, 2014
Disable observers for Mage_Reports. Module can not be disabled completely because other modules rely on it.
View performance-mage_reports.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Disable observers for Mage_Reports module.
*/
-->
<config>
<frontend>
<events>
<!-- Disable Mage_Reports -->
@frozenminds
frozenminds / performance-mage_log.xml
Created Oct 14, 2014
Disable observers for Mage_Log. Module can not be disabled completely because other modules rely on it. Don't do this if you need the product compare feature.
View performance-mage_log.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Disable observers for Mage_Log module.
*/
-->
<config>
<frontend>
<events>
<!-- Disable Mage_Log -->
@frozenminds
frozenminds / strip-magento-ee-dumpfile.sh
Created Aug 19, 2014
Strip "INSERT INTO `table`" junk out of Magento SQL dumpfile. Use it when dump is huge and you can not even import it.
View strip-magento-ee-dumpfile.sh
cat dump.sql | grep -v "INSERT INTO \`catalog_compare_item\`" | grep -v "INSERT INTO \`wishlist_item_option\`" | grep -v "INSERT INTO \`wishlist_item\`" | grep -v "INSERT INTO \`wishlist\`" | grep -v "INSERT INTO \`adminnotification_inbox\`" | grep -v "INSERT INTO \`dataflow_batch_export\`" | grep -v "INSERT INTO \`dataflow_batch_import\`" | grep -v "INSERT INTO \`report_event\`" | grep -v "INSERT INTO \`report_viewed_product_index\`" | grep -v "INSERT INTO \`report_compared_product_index\`" | grep -v "INSERT INTO \`catalogsearch_fulltext\`" | grep -v "INSERT INTO \`catalogsearch_query\`" | grep -v "INSERT INTO \`catalogsearch_recommendations\`" | grep -v "INSERT INTO \`catalogsearch_result\`" | grep -v "INSERT INTO \`catalog_category_flat_store_1\`" | grep -v "INSERT INTO \`catalog_category_flat_store_2\`" | grep -v "INSERT INTO \`catalog_product_flat_1\`" | grep -v "INSERT INTO \`catalog_product_flat_2\`" | grep -v "INSERT INTO \`log_customer\`" | grep -v "INSERT INTO \`log_quote\`" | grep -v "INSERT INTO \
@frozenminds
frozenminds / magento-anonymise-db.sql
Last active Jul 28, 2017
Anonymise Magento database
View magento-anonymise-db.sql
--
-- Anonymise Magento database
--
-- @author Constantin Bejenaru <boby@frozenminds.com>
-- @copyright Copyright (c) Constantin Bejenaru (http://frozenminds.com/)
-- @license http://www.opensource.org/licenses/mit-license.html MIT License
--
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@frozenminds
frozenminds / clean-magento_ce-db-extended.sql
Created May 12, 2014
Clean Magento database of junk and unnecessary data
View clean-magento_ce-db-extended.sql
--
-- Magento CE database clean-up extended
--
-- This is an extended clean-up which will clean search, import/export, reports, etc.
--
-- @author Constantin Bejenaru <boby@frozenminds.com>
-- @copyright Copyright (c) Constantin Bejenaru (http://frozenminds.com/)
-- @license http://www.opensource.org/licenses/mit-license.html MIT License
--
You can’t perform that action at this time.