Skip to content

Instantly share code, notes, and snippets.

Avatar

Caspar Hübinger glueckpress

View GitHub Profile
@glueckpress
glueckpress / .htaccess
Last active Apr 28, 2019 — forked from Zodiac1978/.htaccess
[WordPress] Security-related sort of stuff. **REVIEW AND EDIT BEFORE COPY-PASTING!**
View .htaccess
# Don’t show errors which contain full path diclosure (FPD)
# Use that line only if PHP is installed as a module and not per CGI
# try using a php.ini in that case.
# CHANGE mod_php5.c TO mod_php7.c IF YOU RUN PHP7.
<IfModule mod_php5.c>
php_flag display_errors Off
</IfModule>
# Protect XMLRPC (needed for apps, offline blogging tools, pingback, etc.)
# If you use that, these tools will not work anymore
@glueckpress
glueckpress / wpseo-iconfix.php
Last active Oct 2, 2018 — forked from krafit/wpseo-iconfix.php
[WordPress] Nachdem der Schmerz, den wpSEO-Menüpunkt ansehen zu müssen zu groß wurde, hat @krafit das Icon im Admin-Menü ersetzt. Ich hab’s in ein Plugin gewickelt, Torsten hat’s aktualisiert.
View wpseo-iconfix.php
<?php
/**
* Plugin Name: wpSEO Icon Fix
* Description: Admin icon hack for wpSEO.
* Version: 2018.08
* Author: Simon Kraft, Caspar Hübinger, Torsten Landsiedel
* License: GNU General Public License v3
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
@glueckpress
glueckpress / browser-width.js
Last active Aug 11, 2019 — forked from aarongustafson/watchResize.js
Track browser size in real time, do stuff at certain breakpoints. A JavaScript media query, essentially. Borrowed from @aarongustafson.
View browser-width.js
// watch browser width on resize
var browser_width = 0;
window.watchResize(function(){
browser_width = window.innerWidth || document.body.offsetWidth;
});
// do stuff after breakpoint
window.watchResize(function(){
var threshold = 400;
if ( browser_width >= threshold ) {
You can’t perform that action at this time.