Skip to content

Instantly share code, notes, and snippets.

View dnaber-de's full-sized avatar
🏠
Working from home

David Naber dnaber-de

🏠
Working from home
View GitHub Profile
@dnaber-de
dnaber-de / editor_plugin.js
Created January 22, 2012 18:33
Wordpress TinyMCE Popup-Dialog. German Tutorial on http://dnaber.de/p1477
// js/editor_plugin.js
/**
* an example tinyMCE Plugin
*/
tinymce.create(
'tinymce.plugins.myPlugin',
{
/**
* @param tinymce.Editor editor
* @param string url
@dnaber-de
dnaber-de / MooTools-delayed-action.js
Created January 12, 2012 17:51
Delayed action on an event
/**
* personal note
* just in case...
*/
$( 'hover-me' ).addEvent( 'mouseenter', function() {
if ( outTimer )
clearTimeout( outTimer );
inTimer = (
function() {
@dnaber-de
dnaber-de / datetime-iso-to-mysql
Created November 22, 2011 13:15
Translate an ISO-formatet datetime string in a mysql datetime string in UTC and local time
/**
* 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
* @return array $mysql_date keys are local and utc