I sense a trend starting. A few weeks ago, I wrote a post about managing different versions of Python on Mac OS X, and today I’m going to explain how I use multiple versions of PHP on the same platform. The Problem Until the homebrew-php group figure out a better way of handling several versions of PHP (their instructions haven’t worked for several months), and without installing something like phpenv, I concocted my own means to manage PHP versions using bash aliases similar to my Python post.
At the new job, I started piecing together a Google Spreadsheet about our open-source software in various languages, based on frameworks, or example applications. One of the things we wanted to track for each repository was a count of open issues and pull requests we had at GitHub. Turns out Google made this pretty easy, but you have to scrape the repo page first. The code I wrote a scraper in Python using Flask, Requests and BeatifulSoup, hosted the project on Heroku, and works a little like this:
Okay, I’ll be blunt: I’m a Linux guy. I know, shocker. I’ve recently moved to an awesome new job and part of that role will be an area of developer advocacy which will require me to go to meetups and tech conferences from time to time, and talk about how freakin’ awesome my new employer is. And they are, srsly. You should sign up and use it if you’re thinking about building a news/activity feed/timeline in your app.
Nutshell: I used a free SendGrid developer account, a free Trello account, and a free Google App Engine account. I added a subdomain to iandouglas.com, set its MX record to point to mx.sendgrid.net, then modified a portion of py-trello to be appengine-compatible, and wrote some other Python code to answer a POST operation as a webhook. SendGrid would perform a POST operation to my webhook when receiving Email to any recipient at @mynewsubdomain.
I recently had a colleague ask me how to do in-line regular expression matching for a Bash shell script. Since Bash v3 only offers a regex matching check and not the full s/foo/bar/ regex syntax, I offered to look into other alternatives. My natural instinct was to look for a Perl cmdline regex parser, which works great if you’re manipulating a file and not shell variables. In the end, since he only needed a simple search and replace, and not an actual regular express, this sufficed:
I’ve been ignoring a problem updating Diodon (a great clipboard manager) whenever Ubuntu’s daily Update Manager tries to alert me of new software updates. I finally opened a shell prompt, ran apt-get update and got this error: signatures couldn't be verified because the public key is not available: NO_PUBKEY 751A20CF523884B2 Here’s how to fix any NO_PUBKEY error in two simple steps: $ gpg --recv-keys 751A20CF523884B2 gpg: requesting key 523884B2 from hkp server keys.
When I was a senior engineer at The Rubicon Project, I inherited some Perl code to analyze log data for online advertising impressions. It eventually hit a maximum on the multi-core systems I had at my disposal and so rewrote my code to use threads. In Perl. Yes, you read that correctly. It was actually one of my prouder engineering feats in my career, to scale some software that could analyze a few million ad impressions per day to scale up to handling more than a billion data points per day.
I have Windows 7 on my laptop, but since I’m a die-hard Linux geek and haven’t got the patience to wait for anyone else to figure out all of the drivers needed for a clean, working Linux build on my M17x, I installed Cygwin. However, the limitation of running Cygwin in a DOS-like command line window that couldn’t be expanded beyond an 80-character width was a nuisance. Enter “puttytel” (downloadable on this page) which can connect to your local Cygwin installation in a PuTTY-like SSH terminal.
To recap my “social web is not a private web” article, Facebook’s F8 platform will begin to create a massive social web for which you have already given them permission to share your public info. Be warned, though, that even if you do take some of the following steps to opt-out, your friends might still be able to share some of your public information (Name, Profile Picture, Gender, Current City, Networks, Friend List, and Pages) without your consent as these ‘partner’ sites will have access to your friend’s contact list which can contain public pieces of information about you.