Maintaining your installed Drupal distro

Drupal.org provides a number of pre-packaged distributions (e.g., Drupal Commons, DKAN, etc.) that allow users to get a fully-featured Drupal installation up and running in no time, but maintaining an installed distribution can be tricky. You may need to juggle distribution updates with contrib module updates, core updates, and your own customizations. If you aren't careful, it can become a maintenance nightmare!

Installing XHProf for Drupal

There are many ways to install XHProf, but at the end of the day, you need to accomplish the same basic set of tasks:

I found all of the various methods a bit overwhelming, so I've put together this page a resource to help you 1) Know the options, and 2) Find corresponding tutorials.

Applescript to add images to Microsoft Word table

This is a bit of a forray into the unknown for me— I don't know a thing about applescript, but I managed to piece this working snippet together from various internet posts. Hope that it helps someone!

This script does the following:

  1. Prompts you to select a folder (should contain images)
  2. Finds the active Microsoft Word document
  3. Find the first table in the document
  4. Inserts first image from folder into row 2 of table
  5. Continues loop, inserting next image into next row

 

Restoring an accidentally deleted Vagrant directory

If you accidentally deleted your Vagrant directory, and you have an orphaned VM sitting in VirtualBox, you can re-associate it with a new VagrantFile. Here's how.

When new VM is first created for a given VagrantFile, Vagrant creates a .vagrant file in the same directory. It contains a JSON array, which stores the Unique ID:

{"active":{"default":"ec426377-dbe6-4be7-4751-766956e44958"}}

You need to re-create this file.

1) Determine the Unique ID for the VM.