Skip to content

Instantly share code, notes, and snippets.

View ginsterbusch's full-sized avatar

Fabian Wolf ginsterbusch

View GitHub Profile
@ginsterbusch
ginsterbusch / hide-comment-tag-notice.css
Created April 22, 2015 12:07
CC2: Hides the "what HTML tags are availble" info notice below the comment form.
#commentform .form-allowed-tags {
display: none;
}
#commentform .alert.alert-info {
display: none;
}
@ginsterbusch
ginsterbusch / cc2-examples.css
Created March 18, 2015 01:56
Examples for changing the link styling in CC 2.0.x
/**
* Change link styling of the body (more or less globally)
*/
a:link,
a:visited {
color: #333;
background-color: #fc0;
text-decoration: none;
font-weight: bold;
@ginsterbusch
ginsterbusch / remove-hidden-files.php
Created January 7, 2015 18:54
Find and delete all hidden files in $dir. PHP CLI file. Change the shebang accordingly.
#!/usr/bin/php
<?php
/**
* Find and delete all hidden files in $dir
* Usage: remove-hidden-files.php OR remove-hidden-files.php /path/to/parse/
*
* Without path parameter, the current path is being used.
*
* (C)ommitted 2015 by @author Fabian Wolf (@link http://usability-idealist.de/)
*
@ginsterbusch
ginsterbusch / leo-de-en.xml
Created September 12, 2014 16:29
Fixed LEO de-en Search Plugin
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
<os:ShortName>LEO de&lt;-&gt;en</os:ShortName>
<os:Description>Suche in LEO Deutsch-Englisch</os:Description>
<os:InputEncoding>ISO-8859-15</os:InputEncoding>
<os:Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAAAAAAEgAAABIAAAAAAAAAAAAAACh0vp3ad+nb158HwB8IgB5HACnalJeTuBVReGpcF14GwB9IwB1FwCrcFb++/WRiOoj1f94o8I/PlZWUU86JB01EQdXNyo/NJZFOLecaFZ1GQB1FwCrcFf//viQh+5lU9gJyfY1UFXy///0///p+Pjc6uq3wsKQmZlsc3dVU1I9LCpEMCiCgX9lX6pjU82nbFgGxPEYWWiYoaHx///v///M2trj8/P6///////////0///g7u67xsaQlZVPSkdUEwAHy/EAx/YKQE7u/f2lsLArJklQRkU5OVFdYWiMk5O7xcXj8fH0///////0//9EQT8MnvMA2f8NV2nx//+IkZGCr8Tw7/9dTdVGNbmvr69+f39OTF5YV1ZbW1hhYmBfVk8HFOAAmPYLWmfw//+IkpIToMGXzPdXRdk6JdJ/ceKBc+OIfOSCduKAduN/duKGfe8CANsADt8IRGjq+/uPmZkAlbgZ0/99s/JFMdUfB8wfBswfBswfBswfBswfBswfBswCANwAANwFC2nY6Oikrq4AgqEAzv8Z0/9+svI7JtMeBcweBcweBcweBcweBcweBcwIB+IAAN0CAXTD0dHAzc0BcYMAzv8Azv8Z
@ginsterbusch
ginsterbusch / personal-running-order-sb2014.txt
Last active August 29, 2015 14:05
My "PRO" - Personal Running Order for Summer Breeze 2014.
Personal Running Order
======================
## Mittwoch, 13. August 2014
21:15 - 22:15 Grand Magus (Zelt)
22:15 - 23:00 Ereb Altor (Gammel-Stage) !
23:00 - 00:00 Unleashed (Zelt) !
00:45 - 01:30 Decapitated (Zelt)
@ginsterbusch
ginsterbusch / load-external-script-with-jquery.js
Last active August 29, 2015 14:04
Example for loading external scripts using jQuery
if( typeof jQuery != 'undefined' ) {
jQuery.getScript( '//cdnjs.cloudflare.com/ajax/libs/history.js/1.8/bundled-uncompressed/html4+html5/jquery.history.js' ).done(function( script, textStatus ) {
console.info( 'successfully loaded History.js');
if( typeof History != 'undefined') {
console.log( 'ready to use History.js')
}
}).fail(function( jqxhr, settings, exception ) {
console.error('failed to load History.js')
});
}
@ginsterbusch
ginsterbusch / load-external-files.js
Last active August 29, 2015 14:04
Example for loading external scripts using HeadJS
/**
* load the CDN version of History.js (@link https://github.com/browserstate/history.js/)
*/
if( typeof head.js != 'undefined') {
head.js('//cdnjs.cloudflare.com/ajax/libs/history.js/1.8/bundled-uncompressed/html4+html5/native.history.js', function() {
if( typeof History != 'undefined' ) {
console.info('history.js loaded');
}
})
@ginsterbusch
ginsterbusch / disable-plugin.php
Created May 3, 2014 20:47
Function to disable plugins in WordPress
<?php
/**
* Direct update of the stored active plugins (in wp_options table)
* @see http://perishablepress.com/quickly-disable-or-enable-all-wordpress-plugins-via-the-database/
*
* @author Fabian Wolf (@link http://usability-idealist.de/)
*/
function disable_plugin() {
$active_plugins = get_option( 'active_plugins', array() );
@ginsterbusch
ginsterbusch / querySelectorClass.js
Last active August 29, 2015 13:57
Helper for CSSClass
/**
* Helper lib to enable CSSClass being able to handle selector queries
* @author Fabian Wolf
* @link http://usability-idealist.de/
* @license GNU GPL v3
*/
querySelectorClass = {
fetchQuery: function( selector ) {
var $return = false,
@ginsterbusch
ginsterbusch / how-to-NOT-do-if-clauses.php
Last active December 22, 2015 13:49
Nasty piece I fouund in an officially "customized" part of a WordPress theme - just when I thought I've seen it all .. m(
<?php
if($parentCatName=='Kunden'):{
?>
<p class="agency" style="color: #00ffff;">
<?php echo "AGENCY";?>
</p>
<?php
}
else:{
?>