Storing Google Protobuf in a Relative Path for Python

On how I have stuggled with this for SO long. Google Protocol buffers are fantastic, but they’re a pain in the neck with python! Unless you install them in a special way they won’t import, or will they! Why you should care Sometimes you want to install packages in a relative manner. Say in a lambda or cloud function, or what have you. If you do a full pip install every script now has full access to that version. Sometimes using a virtual environment can be too tough. What’s the answer? Realative importing. pip install -r requirements.txt -t ./packages But...…

Authenticate to WordPress Outside of WP

Sometimes you don’t want to run ALL of WordPress, but you want to get the benefits of working within WordPress. In my case I needed to run a small PHP file, on a different domain (same server), and still use the same WordPress authentication of a primary site. I searched everywhere for a valid solution. I couldn’t find anything that works, so I made my own. …

this post is featured

True URL to Post ID Within WordPress

Occasionally, developers of Wordpress themes and plugins may have need to locate a page, a post, and get the ID before the post object is done with it’s initial query. If you - like many developers out there - have discovered that the url_to_postid function is insufficient, you are NOT alone. The function I created (shown below) will make your day a happier one. …