Skip to content

Instantly share code, notes, and snippets.

View 130db's full-sized avatar
💭
Read-Only

130db 130db

💭
Read-Only
View GitHub Profile
@doitlikejustin
doitlikejustin / change_wp_url.sql
Created July 26, 2013 20:06
WordPress SQL replace old URL with new URL
SET @prefix = "wp_";
SET @old = "http://www.old.com";
SET @new = "http://www.new.com";
SET @sql1 = CONCAT('UPDATE ', @prefix, 'options SET option_value = REPLACE(option_value,?,?)');
SET @sql2 = CONCAT('UPDATE ', @prefix, 'posts SET guid = REPLACE(guid,?,?)');
SET @sql3 = CONCAT('UPDATE ', @prefix, 'posts SET post_content = REPLACE(post_content,?,?)');
PREPARE update1 FROM @sql1;
PREPARE update2 FROM @sql2;
@kadamwhite
kadamwhite / main.js
Created December 13, 2012 22:20
A basic JW Player plugin to display a text banner overlay at the top of the video player instance
// Pass the plugin reference and configuration parameter ('text') to the embed script
jwplayer('id-of-container').setup({
file: '/path/to/my/video.mp4',
plugins: {
'/path/to/overlay.js': {
text: 'Text that you want to go within the overlayed banner'
}
}
});