If you’re a Windows developer like me, you’ve probably had trouble working with GitHub on Windows. Here’s what I did. Hopefully this will be helpful to you.
A couple of months ago, I had the opportunity to attend an API Hackday event in Bloomington. At the event, I created some cool WordPress tools using Twilio (more on that at a later date), but I ended up having some free time (because Twilio’s API is so easy to use!), so I wrote another plugin called WP SendGrid using the SendGrid API.
A couple of years ago I released a plugin called “Minimum Password Length“. It’s been pretty popular, mostly thanks to some link love by David Peralty. Ever since I released the plugin, I’ve been thinking “wouldn’t it be nice to do something similar, but harness the WordPress password strength meter?”. Well, I finally took the time to do that, and so we have the Minimum Password Strength plugin.
This is also a special plugin, because it’s the first one I’ve simultaneously published on GitHub and my site. I plan on uploading my other plugins to GitHub at some point (in fact, I uploaded Short Comment Filter, another popular plugin, a few days ago), but Minimum Password Strength is the first one that’s there from the start.
I’m working with GitHub for a school project this quarter. It’s the first time I’ve done anything but dabble with Git, so it took some time for me to figure it out. The commands weren’t that bad, because they’re pretty similar to SVN (which I work with from the command line all the time), but getting set up in Windows was a bit of a pain. Turns out if you install Git for Windows with the “Use PuTTY” option, it uses PuTTY ssh keys to authenticate with Git. This wouldn’t be a big deal, except PuTTY uses a special private key format, and I already have a keypair that I use on my Mac. I finally figured out how to convert that to PuTTY format using PuTTYgen, and then I figured out that I needed to start Pageant and manually add the key in order to use it for authentication.
Anyway, despite all this pain, I decided to start using GitHub to host my open source WordPress plugins. This gives me some more experience with Git, plus it provides public source control, which is better for open source projects than the private SVN repository I was already using.
Long story short, if you want to see what I’ve uploaded so far, check out my GitHub page.
I just realized that 6 months from today will be my first day at Microsoft! To celebrate, I revived my old “Seattle Countdown” widget.
Custom search engines in Chrome are a pretty cool feature. For example, Jimmy Theis has a great blog post about using them to look up someone’s Rose-Hulman class schedule. The one shortcoming I’ve found is that you can’t do any processing of the actual search term. In other words, you have to blindly jump to the search engine URL without evaluating the actual query.
I posted a few months ago about using static methods in WordPress plugins. I’ve used that method myself for the last few months, and I’ve really grown to love the style of code that this technique produces. One part, however, was a source of some pain: Inheritance. This can be solved by utilizing PHP’s get_called_class() function to get called class names in from your static functions.
This evening I was chatting with Nick Ohrn and I threw out an idea that I’d been thinking about for a while. What if WordPress plugin developers used PHP static methods to namespace their plugins?