Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

wp-content/plugins/wp-time-machine/includes/wpTimeMachineCore.php anschauen. Dort findet sich auf Zeile 865 folgende Funktion: function wpTimeMachine_enqueue_scripts()
{
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js');
wp_enqueue_script( 'jquery' );
wp_deregister_script( 'jquery-ui-core' );
wp_register_script( 'jquery-ui-core', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js' );
wp_enqueue_script( 'jquery-ui-core' );
@kanedo
kanedo / wpTimeMachineCore.php1
Created January 24, 2012 13:07
WP-Timemachine fix
function wpTimeMachine_enqueue_scripts()
{
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js');
wp_enqueue_script( 'jquery' );
wp_deregister_script( 'jquery-ui-core' );
wp_register_script( 'jquery-ui-core', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js' );
wp_enqueue_script( 'jquery-ui-core' );
@kanedo
kanedo / gist:2127999
Created March 19, 2012 23:01
GoogleAnalytics Plugin vs. Readability Favorites
//googleanalytics.php Line 824:
function authenticate() {
if ( isset( $_REQUEST['oauth_token'])) {
//…
//should be something like this
function authenticate() {
if ( isset( $_REQUEST['oauth_token']) && $_REQUEST['page'] == 'google-analytics-for-wordpress' ) {
@kanedo
kanedo / run.sh
Created July 11, 2012 11:03
Gitlab Thin Deamontools Skript
#!/bin/bash
# This is needed to find gems installed with --user-install
export USER=kanedo
export HOME=/home/kanedo
# Include our profile to get Ruby 1.9.2 included in our PATH (via rvm)
. $HOME/.bash_profile
export PORT=<Port>
@kanedo
kanedo / file_extension.sh
Created July 18, 2012 14:16
Fileextension finder
#!/bin/bash
# For each file with the given extension in the current directory...
echo "Pfad;Datei;Groesse (in Byte)";
if [[ "x$1" == "x" ]]
then
echo "no path given - exiting" >&2
exit 1;
fi
find $1 -not -path */dev/* -type f -execdir bash -c 'echo -en "$PWD;$(basename {});$(stat -f %z {})\n"' \;
var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i) ? true : false;
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i) ? true : false;
},
iOS: function() {
return navigator.userAgent.match(/iPhone|iPad|iPod/i) ? true : false;
},
var isIOS = {
iPhone: function(){
return navigator.userAgent.match(/iPhone/i) ? true : false;
},
iPad: function(){
return navigator.userAgent.match(/iPad/i) ? true : false;
},
iPod: function(){
return navigator.userAgent.match(/iPod/i) ? true : false;
},
var mobileVersion = function(){
var version = 0.0;
if(isMobile.iOS()){
version = parseFloat(
('' + (/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent) || [0,''])[1])
.replace('undefined', '3_2').replace('_', '').replace('_', '')
) || false;
}
if(isMobile.Android()){
@kanedo
kanedo / function.php
Created September 13, 2012 09:32
Add language descriptor to wordpress adminbar
/*
Plugin Name: Language Descriptor for admin Bar
Plugin URI: http://kanedo.net
Description: Add language descriptor to wordpress adminbar
Version: 1.0
@kanedo
kanedo / fermat.hs
Created December 19, 2012 20:12
Fermat's little theorem
fermat :: (Integral i, Show i) => i -> Bool
fermat 1 = True -- Fermat's litte theorem only works for
fermat 2 = True -- numbers greater then 2
fermat x = not (null [x | y<-[2.. pred x], (y^(x-1) `mod` x) == 1])