Skip to content

Instantly share code, notes, and snippets.

View mklooss's full-sized avatar

Mathis Klooß mklooss

View GitHub Profile
@fbrnc
fbrnc / gist:3418992
Created August 21, 2012 20:13
Magento Cache Warming
curl --silent http://example.com/sitemap.xml | xpath -q -e "/urlset/url/loc/text()" > tmp.urls && siege -v -c 1 -r `cat tmp.urls | wc -l` -f tmp.urls
@mklooss
mklooss / gist:3799823
Created September 28, 2012 13:22
Multistore Magento / File Owner Cache Problem
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
@mklooss
mklooss / gist:3852036
Created October 8, 2012 11:31
nginx Configuration Magento
location / {
index index.html index.php;
try_files $uri $uri/ @handler;
expires 5h;
}
location ^~ /media/ {
expires max;
}
location ^~ /skin/ {
expires max;
@rkitover
rkitover / parallels-tools-4.9.x.patch
Created January 18, 2017 12:22
patch for parallels tools for kernel 4.9.x
diff -ruN orig/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c new/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c
--- orig/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c 2016-11-15 02:37:25.000000000 -0800
+++ new/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c 2017-01-18 02:18:08.000000000 -0800
@@ -383,7 +383,7 @@
}
static int prlfs_rename(struct inode *old_dir, struct dentry *old_de,
- struct inode *new_dir, struct dentry *new_de)
+ struct inode *new_dir, struct dentry *new_de, unsigned int dummy)
{
@mklooss
mklooss / magento_remove_some_data.sql
Last active October 18, 2018 08:00
remove some Magento Data for Development Systems
--
-- Remove Orders
--
DELETE FROM sales_flat_order;
DELETE FROM sales_flat_creditmemo_comment;
DELETE FROM sales_flat_creditmemo_item;
DELETE FROM sales_flat_creditmemo;
DELETE FROM sales_flat_creditmemo_grid;
DELETE FROM sales_flat_invoice_comment;
@molotovbliss
molotovbliss / pagespeed.conf
Created August 12, 2016 19:55
mod_pagespeed.conf for Magento 1.x
<IfModule mod_pagespeed>
# General Configuration
ModPagespeed on
ModPagespeedDomain *.domain.com
ModPagespeedDomain images.domain.com
ModPagespeedDomain assets.domain.com
ModPagespeedStatistics on
ModPagespeedStatisticsLogging on
ModPagespeedLogDir /home/domain.com/public_html/var/pagespeed
@shapeshed
shapeshed / unicorn
Created September 16, 2011 10:12
Unicorn / Monit setup
#!/bin/sh
set -e
# Example init script, this can be used with nginx, too,
# since nginx and unicorn accept the same signals
# Feel free to change any of the following variables for your app:
TIMEOUT=${TIMEOUT-60}
APP_ROOT=/path/to/your/app/current
PID=$APP_ROOT/tmp/pids/unicorn.pid
ENVIRONMENT=production
@section-io-gists
section-io-gists / pagespeed-requirement.vcl
Created March 15, 2017 15:29
Using the PageSpeed module alongside Varnish, you will need to configure Varnish to handle PageSpeed optimizations.
# Note: You will want to add the snippet: `include "pagespeed-requirement.vcl";` above your `vcl_recv` in the default.vcl file.
sub vcl_recv {
call pagespeed_capability_detection;
}
# Function derived from requirements here https://modpagespeed.com/doc/downstream-caching#ps-capabilitylist
# Additional detection logic for crawlers, tablet and mobile devices.
sub pagespeed_capability_detection {
if (req.http.User-Agent ~ "(?i)Chrome/[3][2-9]+\.|Chrome/[4-9][0-9]+\.|Chrome/[0-9]{3,}\.") {
@renttek
renttek / 0001-BUGIFX-Magento-Zend-Framework-1-PHP5.6.patch
Last active July 5, 2021 17:42
Bugfix for Zend Framework 1 in Magento (>= 1.7.*.*) + PHP 5.6
From 473846959772d8160b34b92ae3bcecddf24b972f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Julian=20Nu=C3=9F?= <julian.nuss@outlook.com>
Date: Tue, 23 Sep 2014 21:07:29 +0200
Subject: [PATCH 1/1] [BUGIFX] Zend Framework 1 + PHP5.6
---
lib/Zend/Locale/Format.php | 22 +++++++++++-----------
lib/Zend/Service/Audioscrobbler.php | 6 +++---
lib/Zend/Service/Technorati.php | 6 +++---
lib/Zend/Validate/Hostname.php | 4 ++--
@deric
deric / check_nvme
Created March 1, 2017 13:09
nagios/icinga check script for NVMe disk
#!/bin/bash
set -o errexit -o nounset -o pipefail
export LC_ALL=C
# Checks for NVMe disks. nmve-cli must be installed.
#
# Author: Tomas Barton
# Requirements:
# nvme-cli - git clone https://github.com/linux-nvme/nvme-cli
#
# Usage: