Using HyperDB to separate and share user and user_meta between WordPress installations

I need to remember to keep this example for some testing. This should be a good start for sharing a user and user_meta between websites. I do know that user_meta tends to have very site-centric settings at times. Original article was located at:

$wpdb->add_database(array( //Connect to Users Database
    'host'     => DB_HOST, // I am using the same host for my two DBs
    'user'     => DB_USER, // I am using the same username for my two DBs
    'password' => DB_PASSWORD, // I am using the same p/w for my two DBs
    'name'     => 'my_user_db_name', 
    'write'    => 0, // Change to 1 if you want your slave site's the power to update user data.
    'read'     => 1,
    'dataset'  => 'user',
    'timeout'  => 0.2,

$wpdb->add_database(array( // Main Database
    'host'     => DB_HOST,
    'user'     => DB_USER,
    'password' => DB_PASSWORD,
    'name'     => DB_NAME,

function user_callback($query, $wpdb) {
    if ( $wpdb->base_prefix . 'users' == $wpdb->table || $wpdb->base_prefix . 'user_meta' == $wpdb->table) {
        return 'user'; 

Create a new Git repo from and old repo

How to extend an old repository as a full copy in a new repository. This preserves the history of the old repository. Future changes will not affect the old repository, but will be committed to the new repository.

This originally came from the info found at:

// This makes the new repo as a checkout of the old repo to a new directory.
# git clone nicholls-2015-core
// Change directory to new repo area
# cd nicholls-2015-core
// Change the origin to the new repo. Remember to make the new repo area.
# git remote set-url origin
// Push commits to new area.
# git push origin master
// Push all changes to repo, just making sure.
# git push --all

Git local repositories

These are some quick examples and notes related to using git with local repositories. Using local repositories can be helpful maintaining file changes without committing to larger repository systems like Github. Instead of syncing with a remote repository, synchronization and changes are committed to the local repository and recorded.

First we create a new local folder and initialize it as blank Git repository.

# mkdir my-local-git
# cd my-local-git
# git init —bare

Then we just clone that to the location we want and work on it like any other git repository.

# git clone /where/is/my-local-git

OSX turn off or delay hibernate

Apple’s Mac OSX hibernate can be delayed indefinitely or turned off by issuing this terminal command.

sudo pmset -a hibernatemode 0

To get back to default normal hibernate mode type this terminal command.

sudo pmset -a hibernatemode 3

So the word is this won’t disable hibernate on battery failures. Haven’t tested, hope I won’t have to.