Site now secured using Let’s Encrypt.

Everything went smoothly except for one plug-in, “Code Snippet Library” which loads Ace.js from CloudFront CDN via HTTP, which resulted in warnings about an insecure script. I needed to override the script and load it over HTTPS:

— UPDATE: I’ve stopped using “Code Snippet Library” and have switched over to EnlighterJS Syntax highlighter.

//* Override scripts in code snippit library to load via https://

function JSJ_reload_ace() {

  if ( class_exists('Code_Snippet_Library') ){

    // Remove the original hardcode script.
    wp_dequeue_script( 'ace' );
    wp_deregister_script( 'ace' );

    // Register the new script using https://
    wp_register_script( 'ace' , esc_url( '' ) );
    wp_enqueue_script( 'ace');

add_action( 'wp_enqueue_scripts', 'JSJ_reload_ace' );

add_action( 'admin_enqueue_scripts','JSJ_reload_ace' );
Posted in Uncategorized | Comments Off on Site now secured using Let’s Encrypt.

Mapping a range of values to a defined index.

I’m researching options for an easy to edit, responsive image map solution for WordPress.

I’ve looked at SVG, however it can get tricky to edit, especially with complicated maps or floor plans. It also requires vector software such as Adobe Illustrator, Inkscape or one of several Mac solutions which I don’t have access to. I’m also not sure if you can define XLINK tags or assign IDs or if it would require manually editing.

So, I’m thinking of using canvas and two images: One to define the map, the other a color map defining the regions. This would allow users to upload a PNG or JPG. It would also be easy to make responsive, swap regions and the color map could be used to drive an effect on touch/hover.

While working on a proof of concept, I needed to map an array of values ranging from 0 -255 to an index of = 0 – 100; below is my basic solution in JavaScript.

 * Maps an array of int values from (0 to 255) to an index from (0-100).
 * @param array int
 * @return array int

function mapValueToIndex(oldValues) {
  //* Set  the old and new range for conversion.
  var oldMin = 0,
    oldMax = 255,
    newMin = 0,
    newMax = 100,
    newValues = [],
    count = oldValues.length;
  for (i = 0; i < count; i++) {
    if ( isNaN(oldValues[i]) == false ){
    	newValue = (((oldValues[i] - oldMin) * (newMax - newMin)) / (oldMax - oldMin)) + newMin;
    	newValues[i] = Math.round(newValue);  
  return newValues;

Posted in Uncategorized | Comments Off on Mapping a range of values to a defined index.

Floated Elements with Javascript

A quick and dirty jQuery script to collapse a parent element when floated. This allows the element to be centered using [ margin: 0 auto; ]

See the Pen AHjdo by James Johnson (@jstuartj) on CodePen.

Posted in Uncategorized | Comments Off on Floated Elements with Javascript

Backyard Shrooms

JSJ_BackyardSroomsTwo years ago, the city made me cut down a monster elm tree in my backyard. Now I have a cool mushroom garden. The shot below was taken with my Canon G6, since it has a nice super-micro feature and a rotatable LCD making it easier to shoot lower to the ground.

Posted in Uncategorized | Comments Off on Backyard Shrooms

Fly fishing with dad.

I went fishing with my dad on Father’s Day. The video below was taken with a Canon T1i and kit lens (18-55).

Posted in Uncategorized | Comments Off on Fly fishing with dad.

Rubber Cement Pyromania

Good old Elmer’s never should have put “Flammable” on the label. Never leave a photographer alone with dice, rubber cement, a hot glue gun, a sheet of glass and some black construction paper? Oh, toss in a fire extinguisher- safety first kiddies.

Posted in Uncategorized | Comments Off on Rubber Cement Pyromania

Zombie Test Video

I’m working on an idea for a short film. So, on the way home I shot some test footage in the parking garage. This brief shot was captured using my Nikon S210. It was then color graded and edited in Sony Vegas 8.0c, where I added the emergency red and blue flash and sound effects.

Posted in Uncategorized | Comments Off on Zombie Test Video

2009 Hudson Hot Air Affair – Moon Glow

This Saturday, I made my way to Wisconsin, for the 2009 Hudson Hot Air Affair. While high winds prevented the Day’s balloon flight. The Moon Glow or “Field of Fire” in this case took place as scheduled at sundown. The Hudson Elementary school yard was filled with 35 or so Balloonist all firing their burners into the air. A spectacular sight and one that warmed the frozen air.

The Moon Glow was a new experience in photography. I do a lot of fireworks and existing light photography, but this was vastly different from anything I’ve done before. The burners vary in temperature vastly over their burn cycle. Set your exposure too short, you get a light blue light which is very dim. Wait too long, the oxygen increases the burn, and more light is emitted. Exposure control was difficult to say least using my old Canon G6.


Posted in Uncategorized | Comments Off on 2009 Hudson Hot Air Affair – Moon Glow

Archiving My Summer

2008 Minneapolis Aquatennial FireworksI ran across a nice firework shot while doing my September archiving. It was taken during the 2008 Aquatennial fireworks, in Minneapolis along the Mississippi river front.

Each year I try to find a new location. This year I fought the crowds on the Stone Arch Bridge, I arrived around three hours early to beat the crowds and as a result had to put up with a drunken nut who fancied himself a “Photography Expert”. He insisted that I had to use a cable release and a wide-angle lens to take “Proper” fireworks photos, and preceded to say so over and over and over again… Even after I politely explained for the sixth time, that I was using a wide-angle lens and wireless remote. Agggh!

Posted in Uncategorized | Comments Off on Archiving My Summer

Taste of Minnesota Fireworks.

The Taste of Minnesota started this weekend, so I headed to Saint Paul this Saturday to photograph the fireworks. I arrived early and wandered for hours, but the crowds were just too… well crowded. The only spot I found to set up had an uninteresting background. So, I headed a mile or so down the river. No surprise that the fireworks were disappointing, hardly worth five dollars for parking and four dollars for a bottle of pop. Oh well, once the brief display was over, I turned my camera on the Saint Paul skyline and was treated to this shot.

Posted in Uncategorized | Comments Off on Taste of Minnesota Fireworks.