PHP Country Code ISO3 to ISO2 Mapping Array

Needed this for one my projects. Finding an ISO code 2 php array was immediate, but no one seems to have a 3 to 2 code mapping. Posting just to make people's googling more pleasant.


Caching Drupal Renderable Arrays

Love getting to learn something new. Going through some tutorials today, I realized there's an 'easy' hook to enable caching of the renderable arrays I never knew about. What exactly is a renderable array? ... Maybe the easiest way you can think of it is structured data that needs to be transformed into html. Previously I'd been using cache_set and cache_get, but this is quicker, and a bit more flexible.

Parsing the LEIE Database (DBF file)

Had a client today that needed to parse the USA LEIE Database (List of Excluded Individuals and Entities). This is the database the government uses to excluded vendors from taking part in any federally funded healthcare program. You can download a copy of your own here: Surprise, the file is in .DBF format! Here's how you ignore that issue.


Bulk Uploading Redirects In Drupal 7

Had a client today with a list of 135ish redirects that needed entered, and a decent enough budget for me to do more than shove them in. I put together an admin page that allows you to upload a csv to be processed containing an internal source, destination, and redirect type (status code).



Subscribe to Fragmented Thought RSS