Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Plugin Name: dna Framebreaker
* Plugin URI: https://gist.github.com/4045656
* Description: Add a framebreaker javascript to the header. (Requires PHP 5.3)
* Version: 0.1
* Author: David Naber
* Author URI: http://dnaber.de
* License: MIT
* License URI: http://opensource.org/licenses/MIT
<div id="cse" style="width: 100%;">Loading</div>
<script src="http://www.google.de/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load('search', '1', {language : 'de'});
google.setOnLoadCallback(function() {
var customSearchOptions = {}; var customSearchControl = new google.search.CustomSearchControl(
'*****************', customSearchOptions);
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
customSearchControl.draw('cse');
function parseParamsFromUrl() {
<?php
/**
* class Logwriter
*
* yet another log writer
*
* @author David Naber <kontakt@dnaber.de>
* @charset utf-8
* @version 0.3
* @licence GPLv3
@charset "UTF-8";
/**
* Technicolor
*
* A theme for Rainbow.js
*
* @author David Naber <kontakt@dnaber.de>
*/
<?php
declare( encoding='UTF-8' );
/**
* A template helper to print class-names
* to eacht element, matches the equation xn+y
*
* @author David Naber <kontakt@dnaber.de>
*/
class Nth_Child_Class {
<?php
/**
* gets the link to the article index
*
* @global $blog_id
* @return string
*/
function get_page_for_posts_url() {
global $blog_id;
<?php
/*
Plugin Name: New_Plugin
Description: Empty Plugin to fill with your code
Version: 0.0
Author: David Naber <kontakt@dnaber.de>
Author URI: http://dnaber.de
*/
# @charset utf-8
// js/editor_plugin.js
/**
* an example tinyMCE Plugin
*/
tinymce.create(
'tinymce.plugins.myPlugin',
{
/**
* @param tinymce.Editor editor
* @param string url
<?php
/**
* datetime_iso_to_mysql
*
* if the iso string comes without timezone information
* we gues it's utc and append this to leave no doubt
* remeber to set your systems default timezone with
* date_default_timezone_set()
*
* @param string $iso an ISO Formated datetime string
<?php
/**
* Plugin Name: Ratcache
* Description: An advanced caching plugin that uses an external object cache to store full pages.
* Author: Christopher Davis
* Author URI: http://christopherdavis.me
* Version: 0.1
*
* Place this file in your `wp-content` directory and add
* `define('WP_CACHE', true)` to your wp config file.