Month: June 2013

Movable Type: How to emulate an MTEntryIfNotExtended tag

Movable Type has a built in container tag  

<MTEntryIfExtended>

which is often used to show the “More” part of a long entry, or anything else that should be displayed only if the entry is extended:

<MTEntryIfExtended>
    <$MTEntryMore$>
   <div>Special text or page elements for Extended Entries go here</div>
</MTEntryIfExtended> 

But what if you want something to show up only if the entry is NOT extended? There is no corresponding <MTEntryIfNotExtended> tag. 

Fortunately that functionality is simple to replicate using Movable Type variables.

Continue reading

Mechanical Turk for transcribing audio recordings and captioning

I sometimes record lectures or meetings for later reference, and have found Mechanical Turk to be an efficient and affordable method for transcribing them. It can be quite confusing to get started using MTurk though, and the available blogs on the subject don’t really help you navigate the current MTurk interface, so here is the step-by-step process I use to have a lecture transcribed:

Cut your audio into 5 or 10 minute clips

Download Audacity – a free audio editing tool that works on both Windows and Mac.

Import your voice-recording file. (File > Import >Audio)

If you see a warning about FFMpeg being missing, just ignore it.

Continue reading

Drupal 7: It is recommended to install the PECL uploadprogress library

When installing Plupload module to work with Media module on a Hostgator site, I got the error:

Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the PECL uploadprogress library (preferred) or to install APC.

Looking at the suggested library (pecl.php.net) it was a shell script that pretty obviously required privileges that I would not have on a shared host. However, Hostgator has another library already installed that implements PECL: CodeGen_PECL. It just has to be enabled.

Continue reading

How to make a diff file on Mac

I had occasion to make a patch file the other day, and since I do this so rarely, it took some time to look up how to do it. So here, in a nutshell is how to use diff on a Mac.

Open terminal.
At the prompt, type
diff -up newfile oldfile

But really the easiest way to get the paths right is to type:

diff -up

…then drag first the new file, then the old file from the desktop onto the terminal window right at the end of the line after -up . It will fill in the paths for you.

Continue reading
Wordpress logo

WordPress: SimpleLDAP plugin updated to work with v3.5

The SimpleLDAP plugin by Cliff Griffin is exactly what I needed for a proof-of-concept WordPress site I’m working on, but it hasn’t been officially updated in a while and was not entirely compatible with WordPress v.3.5.

I’ve updated the plugin to eliminate the errors I was getting, and it now works fine on my site, but it could probably use some TLC from someone more experienced with working with WordPress.

The original version of the plugin I used as a basis is v1.4.0.5.1, available at http://wordpress.org/plugins/simple-ldap-login/.

Continue reading

Drupal 7: Fatal error: Allowed memory size of 52428800 bytes exhausted

Working with Drupal 7, you may get an error like the one below. (The actual number may be different.)

Fatal error: Allowed memory size of 52428800 bytes exhausted

If you don’t have one already, add a text file called “php.ini” to the root directory of the Drupal 7 site, and add a line like:

memory_limit = 96M

or

memory_limit = 128M

Continue reading

HTML 5 Treasure Hunt game framework

I’m working on an HTML version of a Flash Treasure Hunt training game I built a couple of years ago. When it’s done, this will be more of a flexible framework than a specific game, capable of being used for any of the many situations in healthcare that require finding the right tool, part or medication quickly and accurately. Searchable anesthesia carts, cardiac arrest team “crash carts”, cardiac catheterization tubing racks, operating rooms, and even patient rooms are just some of the possible settings that could be portrayed in the game.

Continue reading