Skip to content

Instantly share code, notes, and snippets.

View gallery-shortcode-change-default-size.php
@2ndkauboy
2ndkauboy / array_keys_not_empty.php
Created Apr 7, 2014
A handy function to check for an array if all key do exist and none of them has an empty value
View array_keys_not_empty.php
/**
* Check an array if all key to exists and none of them has an empty value
*
* @param array $array The array.
* @param array $keys The searched keys.
* @return boolean returns true, if all keys existed in the array and none of them had empty values
*/
function array_keys_not_empty($keys, $array){
foreach($keys as $key){
@2ndkauboy
2ndkauboy / colors-Twilight_optimized.icls
Created Oct 9, 2014
My current PhpStorm color scheme (Twilight with file status colors from the Dracula scheme and Consolas as the main font)
View colors-Twilight_optimized.icls
<?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" />
View widget-text-highlighted.php
<?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 / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@2ndkauboy
2ndkauboy / Eclipse Windows German.xml
Created Apr 2, 2015
PhpStorm Eclipse keymap for German keyboards on Windows
View Eclipse Windows German.xml
<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 Aug 29, 2015
PhpStorm Twilight color theme when using the Dracula IDE theme
View Twilight_with_Dracula.icls
<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 / jquery.formrescuer.js
Created Aug 25, 2015
A jQuery plugin to prevent a user to navigate off of a page without saving the form data
View jquery.formrescuer.js
;(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
};
View wysija-newsletters-load-textdomain-fix.php
<?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 / helvetica-neue-desk-interface-reset.css
Created Oct 28, 2014
Reset the HTML form buttons font-family from "Helvetica Neue Desk Interface", forced by OS X Yosemite, back to it's original font-family.
View helvetica-neue-desk-interface-reset.css
input[type="submit"], input[type="reset"], input[type="button"], button {
font-family: inherit;
-webkit-font-smoothing: inherit;
}