Skip to content

Instantly share code, notes, and snippets.

@errkk
errkk / Famous people
Last active December 15, 2015 05:09
Famous people I have seen
(S) = Seen
(M) = Met
# Soho
(S) Jerry Springer
(S) Kyly Minogue
(S) Neil Morrissy
(S) Rod Stuart
(S) Lennie Henry
(S) Jack Whitehall x2
@errkk
errkk / gist:4986422
Created February 19, 2013 14:33
Prep repo for pushing from Fabric
git init && git config receive.denyCurrentBranch ignore
@errkk
errkk / gist:4706383
Created February 4, 2013 12:08
Move a WordPress blog from one host to another, so the permalinks work
SET @uri_from = 'www.devurl.local';
SET @uri_to = 'www.liveurl.net';
UPDATE wp_options SET `option_value` = REPLACE(`option_value`, @uri_from, @uri_to)
WHERE `option_value` LIKE CONCAT( "%", @uri_from, "%" );
UPDATE wp_posts SET `guid` = REPLACE(`guid`, @uri_from, @uri_to);
UPDATE wp_posts SET `post_content` = REPLACE(`post_content`, @uri_from, @uri_to);
@errkk
errkk / gist:3763626
Created September 21, 2012 20:10
Term - taxonomy relationship SQL join for WP
SELECT * FROM wp_posts p
LEFT JOIN wp_term_relationships tr ON tr.object_id = p.ID
LEFT JOIN wp_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id
LEFT JOIN wp_terms t ON t.term_id = tt.term_id