Skip to content

Instantly share code, notes, and snippets.

View bueltge's full-sized avatar
Always interested

Frank Bültge bueltge

Always interested
View GitHub Profile
@bueltge
bueltge / is_serialized.php
Created December 1, 2011 10:29 — forked from cs278/is_serialized.php
PHP is_serialized() function.
<?php
/**
* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://sam.zoy.org/wtfpl/COPYING for more details.
*/
/**
@bueltge
bueltge / restrict-mime-types.php
Created December 15, 2011 11:40
Restrict list of allowed mime types and file extensions.
<?php
/**
* Plugin Name: Restrict mime types
* Plugin URI: http://wpengineer.com/?p=2369
* Description: Restrict list of allowed mime types and file extensions.
* Version: 1.0.0
* License: GPLv3
* Author: Frank B&uuml;ltge
* Author URI: http://bueltge.de/
*/
@bueltge
bueltge / gist:1503172
Last active September 28, 2015 22:08
Remove Admin Bar in WordPress 3.3
<?php
/**
* Plugin Name: Remove Admin Bar in WordPress 3.3
* Plugin URI: http://wordpress.stackexchange.com/questions/40983/removing-admin-bar-from-wordpress-dashboard
* Description: Remove Admin Bar
* Version: 1.0.0
* Author: Frank Bültge
* Author URI: http://bueltge.de
* License: GPLv3
*/
@bueltge
bueltge / gist:1559249
Created January 4, 2012 09:19
Custom Query Shortcode: Run a Loop inside any Post/Page
<?php
/**
* Plugin Name: Custom Query Shortcode
* Plugin URI:
* Description: Run a Loop inside any Post/Page via Shortcode <code>[loop]</code>
* Version: 0.0.1
* License: GPLv3
* Author: Frank B&uuml;ltge
* Author URI: http://bueltge.de/
*/
@bueltge
bueltge / gist:1559312
Created January 4, 2012 09:35
Inputfelder optional zwischen type=text|password umschaltbar
<form method="post" action="">
<input type="password" id="my_password" name="password" value="" autocomplete="off" />
<input type="submit" value="Los" id="my_submit" disabled="disabled" onclick="document.getElementById('my_password').type = 'password'" />
<br />
<input type="checkbox" onchange="document.getElementById('my_password').type = this.checked ? 'text' : 'password';"> Passwort beim Tippen anzeigen
</form>
@bueltge
bueltge / gist:1572371
Created January 6, 2012 20:57
Aptana Bug?
on this source; Aptana dont view functions, vars etc. in outline window
if ( ! class_exists( 'Foo' ) ) {
class Foo {
static public $foo;
public function foo() {
@bueltge
bueltge / gist:1575381
Created January 7, 2012 17:29
Remove pixel in img for responsive design
// remove height, width for responsive design
(function ($) {
$(document).ready(function($) {
$( 'img' ).removeAttr( 'height' ).removeAttr( 'width' );
});
})(jQuery);
/**
* @package Normalize Style with goal CSS3 and html5-elements
* @author Hans Mustermann <[email protected]>
* @since 0.0.1
* @version 0.0.2
*
* Description: Normalize all browsers
*
* Normalize, inspired by http://bueltge.de/b/33 and http://bueltge.de/b/34
*/
@bueltge
bueltge / dabblet.css
Created January 11, 2012 09:25
Nice button with CSS3 - to view or play: http://dabblet.com/gist/1593891
body {
margin: 3em;
}
.button {
padding: 10px 15px;
background: #4479BA;
text-decoration: none;
color: #FFF;
border-radius: 4px;
border: solid 1px #20538D;
@bueltge
bueltge / gist:1595155
Created January 11, 2012 15:21
Add custom post type to AddQuicktag plugin for use the plugin on custom post types
<?php
/**
* Plugin Name: Use AddQuicktag on my CPT
* Plugin URI: http://bueltge.de/
* Description: Add custom post type 'my_custom_post_type' to AddQuicktag plugin
* Author: Frank Bültge
* Version: 0.0.1
* Licence: GPLv3
* Author URI: http://bueltge.de
*/