Skip to content

Instantly share code, notes, and snippets.

View glueckpress's full-sized avatar

Caspar Hübinger glueckpress

View GitHub Profile
@glueckpress
glueckpress / browser-width.js
Last active August 11, 2019 14:21 — forked from aarongustafson/watchResize.js
Track browser size in real time, do stuff at certain breakpoints. A JavaScript media query, essentially. Borrowed from @aarongustafson.
// 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 ) {
@glueckpress
glueckpress / wpseo-iconfix.php
Last active October 2, 2018 23:12 — 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.
<?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 / .htaccess
Last active April 28, 2019 12:15 — forked from Zodiac1978/.htaccess
[WordPress] Security-related sort of stuff. **REVIEW AND EDIT BEFORE COPY-PASTING!**
# 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