Skip to content

Instantly share code, notes, and snippets.

View carlowens's full-sized avatar

Carl Owens carlowens

View GitHub Profile
@carlowens
carlowens / gist:0de961b86477488be83417ba09b44bae
Created November 2, 2016 14:59
compression & cache headers nginx
server {
gzip on;
gzip_http_version 1.0;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types text/plain text/html text/css application/json application/javascript application/x-javascript text/javascript text/xml application/xml application/rss+xml application/atom+xml application/rdf+xml;
#it was gzip_buffers 16 8k;
gzip_buffers 128 4k; #my pagesize is 4
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
@carlowens
carlowens / Magento2-remove-orders-customers
Created November 14, 2016 11:24
Magento 2 remove test data of orders and customers
SET FOREIGN_KEY_CHECKS = 0;
#clear orders
TRUNCATE TABLE `gift_message`;
TRUNCATE TABLE `quote`;
TRUNCATE TABLE `quote_address`;
TRUNCATE TABLE `quote_address_item`;
TRUNCATE TABLE `quote_id_mask`;
TRUNCATE TABLE `quote_item`;
TRUNCATE TABLE `quote_item_option`;
TRUNCATE TABLE `quote_payment`;
@carlowens
carlowens / gist:62d1e07c8d8f29f9957b00355356f976
Created February 9, 2017 22:31
linux foxus / hide terminator shortcut key command
/usr/bin/xdotool search --onlyvisible --class terminator windowactivate
/usr/bin/xdotool search --onlyvisible --class terminator windowminimize