Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / disable-translation-updates.php
Last active August 18, 2018 15:10
A small WordPress plugin to disable the asynchronous and automatic background translation updates
<?php
/*
Plugin Name: Disable Translation Updates
Plugin URI: https://gist.github.com/2ndkauboy/1907f5847b4e092a88ac
Description: Disable the asynchronous and automatic background translation updates
Version: 1.0.0
Author: Bernhard Kau
Author URI: http://kau-boys.de
License: GPL
*/
@2ndkauboy
2ndkauboy / 0_reuse_code.js
Last active August 29, 2015 14:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@2ndkauboy
2ndkauboy / helvetica-neue-desk-interface-reset.css
Created October 28, 2014 23:29
Reset the HTML form buttons font-family from "Helvetica Neue Desk Interface", forced by OS X Yosemite, back to it's original font-family.
input[type="submit"], input[type="reset"], input[type="button"], button {
font-family: inherit;
-webkit-font-smoothing: inherit;
}
<?php
/*
* Plugin Name: Text-Widget Highlighted
* Description: Extends the WordPress default text widget by adding a CSS class "widget_text_highlighted" to the container aside HTML tag
* Version: 0.1
* Author: Bernhard Kau
* Author URI: http://kau-boys.de
*/
@2ndkauboy
2ndkauboy / colors-Twilight_optimized.icls
Created October 9, 2014 21:44
My current PhpStorm color scheme (Twilight with file status colors from the Dracula scheme and Consolas as the main font)
<?xml version="1.0" encoding="UTF-8"?>
<scheme name="Twilight_optimized" 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="CARET_COLOR" value="a7a7a7" />
<option name="CARET_ROW_COLOR" value="1b1b1b" />
<option name="CONSOLE_BACKGROUND_KEY" value="141414" />
@2ndkauboy
2ndkauboy / taxonomy-gallery-shortcode.php
Last active April 15, 2019 15:25
Adding the shortcode "taxonomy_gallery" to list all images for a given taxonomy