Skip to content

Instantly share code, notes, and snippets.

@2ndkauboy
2ndkauboy / Eclipse Windows German.xml
Created April 2, 2015 14:01
PhpStorm Eclipse keymap for German keyboards on Windows
<keymap version="1" name="Eclipse Windows German" parent="Eclipse">
<action id="QuickChangeScheme">
<keyboard-shortcut first-keystroke="control DEAD_ACUTE" />
</action>
<action id="Vcs.QuickListPopupAction">
<keyboard-shortcut first-keystroke="alt DEAD_ACUTE" />
</action>
</keymap>
@2ndkauboy
2ndkauboy / Twilight_with_Dracula.icls
Last active August 29, 2015 14:18
PhpStorm Twilight color theme when using the Dracula IDE theme
<scheme name="Twilight_with_Dracula" version="124" parent_scheme="Default">
<option name="LINE_SPACING" value="1.0" />
<option name="EDITOR_FONT_SIZE" value="12" />
<option name="CONSOLE_FONT_NAME" value="Lucida Console" />
<option name="EDITOR_FONT_NAME" value="Consolas" />
<colors>
<option name="ANNOTATIONS_COLOR" value="8b999f" />
<option name="CARET_COLOR" value="a7a7a7" />
<option name="CARET_ROW_COLOR" value="1b1b1b" />
<option name="CONSOLE_BACKGROUND_KEY" value="141414" />
@2ndkauboy
2ndkauboy / textdomain-de_DE.po
Last active December 12, 2018 19:05
This template can be used to create a po file for a new WordPress translation (in this example for the locale de_DE)
msgid ""
msgstr ""
"Project-Id-Version: <PROJECT NAME>\n"
"POT-Creation-Date: 2015-04-02 16:42+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: de_DE\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@2ndkauboy
2ndkauboy / jquery.formrescuer.js
Created August 25, 2015 11:42
A jQuery plugin to prevent a user to navigate off of a page without saving the form data
;(function($) {
var settings = {
'warnings' : {
'unsavedform': 'ACHTUNG: Ihre Änderungen wurden noch nicht gespeichert!\n\nDrücken Sie "Auf dieser Seite bleiben" und speichern Sie die Daten! Wenn Sie auf "Diese Seite verlassen" klicken gehen Ihre Änderungen verloren!',
'unsavedtab': 'ACHTUNG: Ihre Änderungen wurden noch nicht gespeichert!\n\nDrücken Sie "Abbrechen" und speichern Sie die Daten! Wenn Sie auf "OK" klicken gehen Ihre Änderungen verloren!'
},
'submitted' : false
};
@2ndkauboy
2ndkauboy / disable-cachify-on-home-page.php
Created September 4, 2015 15:38
Disable Cachify on home page
<?php
/**
* Plugin Name: Disable Cachify on home page
* Description: This plugin simple disables the caching of the home page with Cachify (see https://wordpress.org/support/topic/exclude-home-page-from-being-cached)
* Author: Bernhard Kau
* Author URI: https://kau-boys.de
*/
add_filter(
'cachify_skip_cache',
<?php
/**
* Plugin Name: MailPoet Load Textdomain Fix
* Description: This plugin will deactivate the translation laoding from the MailPoet plugin and load it in the correct was instead, so other plugins that hook into the loading of translations works together with MailPoet
* Version: 1.0
* Author: Bernhard Kau
* Author URI: http://kau-boys.com
* License: GPLv3
* License URI: http://www.gnu.org/licenses/gpl-3.0
@2ndkauboy
2ndkauboy / form_validation_hightlight.js
Last active November 2, 2015 15:37
User friendly form validation feedback
jQuery( document ).ready( function( $ ) {
$( 'form' ).submit( function() {
$( this ).attr( 'data-touched', true );
} );
$( ':submit' ).click( function() {
$( this ).closest( 'form' ).attr( 'data-touched', true );
} );
@2ndkauboy
2ndkauboy / wp-tag-cloud-tag-number.php
Last active December 8, 2021 16:10
This plugin will limit the number of the shown tags to a custom number
<?php
/**
* Plugin Name: WP Tag Cloud Tag Number
* Description: This plugin will limit the number of the shown tags to a custom number
* Version: 1.0.0
* Author: Bernhard Kau
* Author URI: https://kau-boys.de
* License: GPLv3
* License URI: http://www.gnu.org/licenses/gpl-3.0
*/
@2ndkauboy
2ndkauboy / allow-svg-uploads.php
Created December 2, 2015 22:34
Enable the users of your blog to upload SVG files
<?php
/**
* Plugin Name: Allow SVG uploads
* Description: Enable the users of your blog to upload SVG files
* Version: 1.0.0
* Author: Bernhard Kau
* Author URI: https://kau-boys.de
* License: GPLv3
* License URI: http://www.gnu.org/licenses/gpl-3.0
*/