Wednesday, September 26, 2012

Recursive String Replacement

find /recursive/replace/directory/ -type f -exec sed -i 's/properlyescapedsearchstring/properlyescapedreplacementstring/g' {} +

by properly escaped, I mean using the backslash character(\) before special characters ( \. \/  \\ )
I should make myself a tool for this.

Installing the Papyrus Eclipse Plugin

The software source you will need is:
http://download.eclipse.org/modeling/mdt/papyrus/updates/releases/juno/main

Then you will need to install the modeling libraries from eclipse.org. I ended up just installing them all.

For whatever reason, I did not have a 'palette' tool box on my first model. It is there now, I created a new specific model (use case checkbox) with basic primitive types (checkbox) and they were magically there-- if you don't see any way to add diagram graphics via the 'palette'.

About Cloned Wordpress Servers and Logging In to the Wrong Server

So, I cloned an entire server as a development environment.

On that server was a wordpress installation.

The server was logging in to the wrong wordpress installation.

There is probably a 'correct' way to do this. But I found the wordpress options I needed to change in the wordpress database in the prefix_options table. (We have prefixes set to ON for multiple wordpress installations. Our tables are prefixed and referenced with prefix_ prepended in this post.)

SELECT * FROM prefix_options LIMIT 0,20;

From there, you should see why your new wordpress is logging you in to your old wordpress...

Hint:
mysql> select * from prefix_options limit 0,20;
+---------+-----------+-------------------------+--------+
|option_id|option_name|option_value             |autoload|
+---------+-----------+-------------------------+--------+
|        1|siteurl    |http://notdevelopment.com|yes     |


mysql> UPDATE prefix_options SET option_value='http://development.com' WHERE option_id=1;


Followers