Skip to content

Instantly share code, notes, and snippets.

@seansasso
seansasso / MIT-LICENSE.txt
Created September 5, 2012 01:39 — forked from jgarber/MIT-LICENSE.txt
Responsive Video - YouTube Embed Optimized
Original Copyright (c) 2011 ZURB, http://www.zurb.com/
One line edited(.flex-video padding-bottom) for optimum YouTube embed size to eliminate black bars.
@seansasso
seansasso / gist:3492516
Created August 27, 2012 21:40 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
@seansasso
seansasso / WP DB Search and Replace
Created August 27, 2012 21:39
WordPress DB Domain Search and Replace
# Pulled from http://www.idowebdesign.ca/mysql-replace/
UPDATE wp_comments SET comment_author_url = REPLACE(comment_author_url, 'old-url.com', 'new-url.com');
UPDATE wp_options SET option_value = REPLACE(option_value, 'old-url.com', 'new-url.com');
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'old-url.com', 'new-url.com');
UPDATE wp_posts SET post_content = REPLACE(post_content, 'old-url.com', 'new-url.com');
UPDATE wp_posts SET post_excerpt = REPLACE(post_excerpt, 'old-url.com', 'new-url.com');
UPDATE wp_posts SET guid = REPLACE(guid, 'old-url.com', 'new-url.com');
UPDATE wp_usermeta SET meta_value = REPLACE(meta_value, 'old-url.com', 'new-url.com');
UPDATE wp_users SET user_email = REPLACE(user_email, 'old-url.com', 'new-url.com');
@seansasso
seansasso / Print Pretty PHP Array
Created August 22, 2012 19:30
Prints a PHP array and makes it readable.
echo '<pre>'; print_r($array); echo '</pre>';