Skip to content

Instantly share code, notes, and snippets.

View farandal's full-sized avatar

Francisco Aranda farandal

View GitHub Profile
#Wordpress Blog Url Migration
SET @old_url = 'http://your_old_url.com';
SET @old_www_url = 'http://www.your_old_url.com';
SET @new_url = '//your_new_url';
UPDATE wp_options SET option_value = replace(option_value, @old_url , @new_url) WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, @old_url , @new_url);
UPDATE wp_posts SET post_content = replace(post_content, @old_url , @new_url);
UPDATE wp_postmeta SET meta_value = replace(meta_value,@old_url , @new_url);
@isochronous
isochronous / Marionette.SubAppRouter.js
Created December 1, 2012 21:46
Backbone.SubRoute functionality for Marionette.AppRouter
// This is heavily based on Backbone.SubRoute (https://github.com/ModelN/backbone.subroute) by Dave Cadwallader, who
// helped me out in this discussion thread:
// https://groups.google.com/forum/?fromgroups=#!topic/backbone-marionette/KTw7USoA6Gs
;define([
'underscore',
'marionette'
],
/**
* A module that defines and adds Marionette.SubAppRouter to the Marionette object