Skip to content

Instantly share code, notes, and snippets.

View getsource's full-sized avatar

Kira Schroder getsource

View GitHub Profile
@getsource
getsource / contextual-related-posts-performance.diff
Created October 4, 2011 23:00
contextual-related-posts MySQL Performance Tweaks
@getsource
getsource / OCWP Talk 10-10-2011.txt
Created October 11, 2011 03:20
OC WordPress Meetup Shared->VPS->Dedicated Q&A 10-10-2011
Fair warning -- this is going to be quite technical, and as such is actually for developers ;)
Also, you *WILL* need to use the shell, but don't worry!
It's not as scary as it sounds, as there are plenty of commands and explanations on the web.
Okay! Going with John's suggestions on how to run through the questions involved.
1. How do you know, objectively, when you need move from shared hosting to VPS
@getsource
getsource / WP_Bag_of_Tricks.txt
Created October 26, 2011 21:07 — forked from boogah/WP_Bag_of_Tricks.txt
Things I've learned by being DreamHost's resident WordPress nerd.
WP Bag of Tricks
1. Helpful Scripts/Plugins:
Hacks:
http://wordpress.org/extend/plugins/tac/
http://wordpress.org/extend/plugins/exploit-scanner/ (Can be extremely resource intensive.)
http://wordpress.org/extend/plugins/wp-malwatch/
@getsource
getsource / directFileAccess.php
Created March 13, 2012 00:39
Make wp-cli work globally with direct file access
/**
* /etc/wp-cli/directFileAccess.php
*/
define( 'FS_METHOD', 'direct' );
@getsource
getsource / GD_in_WordPress.md
Created July 27, 2012 20:47
GD in WordPress
@getsource
getsource / GD_in_WordPress.txt
Created July 27, 2012 20:52
GD in WordPress
# GD in WordPress
From: http://www.php.net/manual/en/ref.image.php
## Functions Used:
* getimagesize
* imagealphablending
* imageantialias
* imagecolorstotal
* imagecopy
* imagecopyresampled
@getsource
getsource / wclv.php
Created October 6, 2012 18:37
WordCamp Vegas Simple-Sample wp-cli Backup Plugin
<?php
// Let WP_CLI know we exist!
// Earlier versions of wp-cli used WP_CLI::addCommand()
WP_CLI::add_command( 'wclv', 'WCLV_Backup_Command' );
/**
* The WCLV Backup Plugin
*
* @package WCLV_Backup
@getsource
getsource / gist:4340799
Created December 19, 2012 21:43
The Syntax error generated when the "Add Media" button is pressed.
SyntaxError: malformed Unicode character escape sequence
http://shared.getsource.net/second35/wp-admin/load-scripts.php,qc=1,aload,5B,5D=admin-bar,,hoverIntent,,common,,schedule,,wp-ajax-response,,autosave,,suggest,,jquery-color,,wp-lists,,jquery-ui-core,,jquery-ui-widget,,jq,aload,5B,5D=uery-ui-mouse,,jquery-ui-sortable,,postbox,,post,,thickbox,,underscore,,shortcode,,backbone,,media-models,,wp-plupload,,media-views,,media-,aload,5B,5D=editor,,word-count,,editor,,quicktags,,jquery-ui-resizable,,jquery-ui-draggable,,jquery-ui-button,,jquery-ui-position,,jquery-ui-dialog,,,aload,5B,5D=wpdialogs,,wplink,,wpdialogs-popup,,wp-fullscreen,,media-upload,aver=3.5.pagespeed.jm.aIPcteQogR.js
Line 60
(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(
if(typeof(jQuery)!="undefined"){if(typeof(jQuery.fn.hoverIntent)=="undefined"){(function(b){b.fn.hoverIntent=function(p,r){var g={sensitivity:7,interval:100,timeout:0};g=b.extend(g,r?{over:p,out:r}:p);var a,f,t,v;var u=function(c){a=c.pageX;f=c.pageY};var w=function(c,d){d.hoverIntent_t=clearTimeout(d.hoverIntent_t);if((Math.abs(t-a)+Math.abs(v-f))<g.sensitivity){b(d).unbind("mousemove",u);d.hoverIntent_s=1;return g.over.apply(d,[c])}else{t=a;v=f;d.hoverIntent_t=setTimeout(function(){w(c,d)},g.interval)}};var s=function(c,d){d.hoverIntent_t=clearTimeout(d.hoverIntent_t);d.hoverIntent_s=0;return g.out.apply(d,[c])};var x=function(e){var d=this;var c=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(c&&c!=this){try{c=c.parentNode}catch(e){c=this}}if(c==this){if(b.browser.mozilla){if(e.type=="mouseout"){d.mtout=setTimeout(function(){q(e,d)},30)}else{if(d.mtout){d.mtout=clearTimeout(d.mtout)}}}return}else{if(d.mtout){d.mtout=clearTimeout(d.mtout)}q(e,d)}};var q=function(e,d){var c=jQuery.ext