Skip to content

Instantly share code, notes, and snippets.

View getsource's full-sized avatar

Kira Schroder getsource

View GitHub Profile
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 14">
<link id=Main-File rel=Main-File
* Install VirtualBox
* Install Vagrant
* Copy VVV.zip to Local HD
* Pass Drive on
* Decompress ZIP, and from new VVV Folder:
* `vagrant box add ubuntu/trusty64 contributor.box`
* `vagrant plugin install vagrant-hostsupdater`
@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 / 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.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 / GD_in_WordPress.md
Created July 27, 2012 20:47
GD in WordPress
@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(