Here is some documentation about the process I used to solve some issues with hotfolder and the features module. I was doing this partly through the web interface and partly through a console, so this is a reconstruction of what I remember and the console log. 

 

I was getting the following error message when I tried to check hotfolder watches (see https://www.drupal.org/node/2453659):

Notice: Undefined property: stdClass::$field_watch_config_scheme

 

That error is related to the field not being properly configured by the features module. The way to fix this is to 'revert' the feature. That's a real pain to do unless you're using drush.

So... Log into a console on the server and change to the sites directory for your site. I use KiTTY.

First, let's update drush:
  > composer global update

 

Reverting a feature is done like this:
  > drush features-revert hotfolder -y

However, features won't detect any changes unless you clear its codecache variable first.

   > drush variable-delete features_semaphore

Now you can revert the feature.

   > drush features-revert hotfolder -y

 
Attempting to revert the feature resulted in this exception:

   exception 'FieldException' with message 'Cannot change an existing field's entity_types property.'

But that's not very helpful because it's too vague, so I changed the code to tell me more details (/modules/field/field.crud.inc, approx line 237):

  throw new FieldException("Cannot change an existing field's entity_types property.\n--- Field: ".$field['field_name'].$field['entity_types']);

 

The features settings on the web page (/admin/structure/features/hotfolder), showed it was stuck rebuilding the fields.
To make features try again to rebuild fields, delete this variable:

   > drush variable-delete features_semaphore

 

At some point, the module wouldn't install properly, and was giving me the field exception. (there is a lot of repeating commands, so remember that you can select a command from the console history using up-arrow.)

   > drush dre hotfolder -y      # disable, uninstall (remove) and re-enable the module

This was giving me exceptions, like 

   exception 'FieldException' with message 'Cannot change an existing field's entity_types property.
   --- Field: job_record_actions

The answer to that is

   > drush field-delete field_job_record_actions

... and then try to disable/uninstall/reenable again, which most of the time resulted in a different field causing the exception. Keep repeating these steps until the module is installed without giving an exception.

Sometimes I got an exception like this:

  exception 'DatabaseSchemaObjectExistsException' with message 'Table field_data_field_job_record_retries already exists.'

The answer to that is to delete the table in the database. I don't know if there is a drush command for that. And then try the reinstall command, etc.


And then... finally... this should work and hopefully features will show hotfolder as enabled and not rebuildling anything:

  > drush features-revert hotfolder -y

 

So with the module installed properly and its features fixed, everything should work now.

 

Here's another handy drush command

  > drush cc all   # clear all caches

 

Tags

Selecting PHP command line version on HostGator shared host

This took me a while to find, so I'm saving it somewhere I can find it again.

The easy way to select the PHP version used for web applications is to use the CPanel configuration tool. However, that doesn't work if you're using SSH and need PHP on the command line. Also, on HostGator, you can't create a symlink outside of your directory (such as to the global php).

You can find out what version you have with

$ php --version

If that's not the version you want, try a specific version like this (php55 is 5.5, etc):

Book Scanning Process

 

Just to document this for next time. For reference, my books are 8 x 10.75 inches and other dimension below work for this. For approximately 100 pages, It takes me about 45 minutes to scan, an hour to crop and rotate, and 30 minutes to organize and generate the PDF.

Fixing features for hotfolder

Here is some documentation about the process I used to solve some issues with hotfolder and the features module. I was doing this partly through the web interface and partly through a console, so this is a reconstruction of what I remember and the console log. 

 

I was getting the following error message when I tried to check hotfolder watches (see https://www.drupal.org/node/2453659):

Notice: Undefined property: stdClass::$field_watch_config_scheme

 

GIMP for Kids

 

My daughter likes to draw on the computer. I don't remember exactly how it started, but she draws in GIMP using my Genius pen tablet, on my secondary monitor. I used to have Linux running in a VirtualBox with GIMP running on my second monitor for her, but VB doesn't completely work in Windows 10 yet. A while back I tried running GIMP on one of my Raspberry Pi's but it was just too sluggish to be useful, frustratingly slow for a (then) 3-year-old. It runs much better on a Raspberry Pi 2. It still lags if she goes crazy with a big brush, but it works.

Die Fly: Designing a better fly swatter

I was looking through some of my old stuff for something and ran across this gem. If you need to put together a quick flyswatter, try this one I designed for a class in college (the famous Rube Goldberg project).

Here are a few excerpts from the attached PDF. If this doesn't convince you to build one (perhaps with several improvements as noted in the document), I don't know what will.