Skip to content

Instantly share code, notes, and snippets.

View mklooss's full-sized avatar

Mathis Klooß mklooss

View GitHub Profile
@killerbees19
killerbees19 / README.md
Last active June 4, 2022 11:32
[certbot] Let's Encrypt: Dual RSA/ECDSA certificates without frequent key changes

Tested at

  • Debian Buster [2019-07-18]
  • Debian Bullseye [2022-04-28]

Installation

apt update
apt full-upgrade

apt install certbot nginx-full
@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,}\.") {
@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:
@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)
{
@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
@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;
@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 ++--
@sergejmueller
sergejmueller / ttf2woff2.md
Last active March 9, 2024 13:37
WOFF 2.0 – Learn more about the next generation Web Font Format and convert TTF to WOFF2
@takeshixx
takeshixx / hb-test.py
Last active March 9, 2024 13:37
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
"""
Author: takeshix <takeshix@adversec.com>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
@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;