Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:

Sergej Müller sergejmueller

:octocat:
View GitHub Profile
@sergejmueller
sergejmueller / index.html
Last active May 19, 2018
Embedded Google Analytics: Fix “Leverage Browser Caching” Warning on Nginx
View index.html
<html>
<!-- ... -->
<!-- Embed analytics.js as local file -->
<script src="/analytics.js"></script>
</html>
@sergejmueller
sergejmueller / .htaccess
Created Jun 14, 2016
WordPress Security: Prevent browser and search engines to request LOG (WP debug) and TXT (plugins readme) files in Apache
View .htaccess
# To be placed in
# /wp-content/.htaccess
<FilesMatch "\.(log|txt)$">
Order Allow,Deny
Deny from all
</FilesMatch>
@sergejmueller
sergejmueller / bash
Last active Mar 8, 2016
Install BackstopJS for CSS Regression Testing
View bash
npm install gulp phantomjs casperjs backstopjs --save-dev
cd node_modules/backstopjs/
npm install
gulp genConfig
@sergejmueller
sergejmueller / .htaccess
Last active Mar 9, 2016
Set X-Frame-Options SAMEORIGIN for all files but not for /embed/ files.
View .htaccess
<IfModule mod_setenvif.c>
SetEnvIf Request_URI "/embed/$" IS_embed
Header set X-Frame-Options SAMEORIGIN env=!REDIRECT_IS_embed
</IfModule>
@sergejmueller
sergejmueller / cron.php
Last active Feb 20, 2016
VK(.com) Bot for the last_seen value
View cron.php
<?php
/**
* VK(.com) Bot for the last_seen value
*
* @author Sergej Müller
*/
/**
* Main class
View goodbye-wordpress.md

Goodbye, WordPress!

Fast 9 Jahre und nahezu 3 Millionen Downloads später ist Schluss.
Schluss mit WordPress.

Für mich geht ein Lebensabschnitt zu Ende. Ein Lebensabschnitt, der unendlich viel Erfahrung, Learnings und Spaß mit sich brachte. Ein Lebensabschnitt, der aber unendlich viel Zeit, Nerven und Motivation mit sich nahm. Doch der Wille zählt und ich hoffe stark, dass meine Software und mein Engagement die WordPress-Community ein Stückchen besser, qualitativer gemacht haben.

// Bitteschön

@sergejmueller
sergejmueller / nginx.conf
Created May 26, 2015
Logjam vulnerability: SSL/TLS cipher suites for Nginx recommended by Yandex engineers http://habrahabr.ru/company/yandex/blog/258673/
View nginx.conf
# Modern browsers
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers kEECDH+AESGCM+AES128:kEECDH+AES128:kRSA+AESGCM+AES128:kRSA+AES128:!RC4:!aNULL:!eNULL:!MD5:!EXPORT:!LOW:!SEED:!CAMELLIA:!IDEA:!PSK:!SRP:!SSLv2;
# Modern browsers + IE8 on XP
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers kEECDH+AESGCM+AES128:kEECDH+AES128:kRSA+AESGCM+AES128:kRSA+AES128:kRSA+3DES:!RC4:!aNULL:!eNULL:!MD5:!EXPORT:!LOW:!SEED:!CAMELLIA:!IDEA:!PSK:!SRP:!SSLv2;
@sergejmueller
sergejmueller / comodo.pem
Created Feb 13, 2015
OCSP stapling PEM file for Comodo certificates used on Nginx.
View comodo.pem
-----BEGIN CERTIFICATE-----
MIIGCDCCA/CgAwIBAgIQKy5u6tl1NmwUim7bo3yMBzANBgkqhkiG9w0BAQwFADCB
hTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNV
BAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTQwMjEy
MDAwMDAwWhcNMjkwMjExMjM1OTU5WjCBkDELMAkGA1UEBhMCR0IxGzAZBgNVBAgT
EkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR
Q09NT0RPIENBIExpbWl0ZWQxNjA0BgNVBAMTLUNPTU9ETyBSU0EgRG9tYWluIFZh
bGlkYXRpb24gU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAI7CAhnhoFmk6zg1jSz9AdDTScBkxwtiBUUWOqigwAwCfx3M28Sh
@sergejmueller
sergejmueller / .htaccess
Last active Feb 3, 2016
Remove line breaks and tabs from HTML with mod_substitute Apache module. For Nginx: https://github.com/sergejmueller/sergejmueller.github.io/wiki/Nginx:-nginx_substitutions_filter
View .htaccess
AddOutputFilter SUBSTITUTE html
Substitute "s/[\n\t]//i"
@sergejmueller
sergejmueller / nginx.conf
Last active Jun 4, 2020
Stop search engines from indexing .txt, .log, .xml, .css and .js files in Nginx
View nginx.conf
location ~* \.(txt|log|xml|css|js)$ {
add_header X-Robots-Tag noindex;
}
You can’t perform that action at this time.