Skip to content

Instantly share code, notes, and snippets.

View jpgninja's full-sized avatar
🎯
Got a ton of interesting projects going on, and loving it.

Chris Mewhort jpgninja

🎯
Got a ton of interesting projects going on, and loving it.
View GitHub Profile
@mixin for-phone-only {
@media (max-width: 599px) { @content; }
}
@mixin for-tablet-portrait-up {
@media (min-width: 600px) { @content; }
}
@mixin for-tablet-portait-only {
@media (min-width: 600px) and (max-width: 899px) { @content; }
}
@mixin for-tablet-landscape-up {
@jpgninja
jpgninja / migrate-wordpress-db.sql
Last active February 3, 2017 07:18
Quick way to update WordPress DB during migration. Eliminates the need for running Find & Replace.
/* HTTP */
UPDATE wp_options SET option_value = replace(option_value, 'http://OLDDOMAIN.com', 'http://NEWDOMAIN.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://OLDDOMAIN.com','http://NEWDOMAIN.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://OLDDOMAIN.com', 'http://NEWDOMAIN.com');
/* HTTP + WWW */
UPDATE wp_options SET option_value = replace(option_value, 'http://www.OLDDOMAIN.com', 'http://NEWDOMAIN.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.OLDDOMAIN.com','http://NEWDOMAIN.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.OLDDOMAIN.com', 'http://NEWDOMAIN.com');