Console is Undefined in IE8

If you’ve ever developed using Javascript, you should know that console.log is probably your most important tool. Unfortunately, not all web browsers support it (e.g. IE8 only supports it when Developer Tools is activated). Here’s a way of checking to see if console.log exists and if it does, go ahead …

XLink Property in SVG textPath Nodes

Ran into a problem today with attempting to manipulate textPath SVG elements within the DOM. Consider the following, where the variable svg is an SVG element in your DOM: var g = document.createElementNS(“http://www.w3.org/2000/svg”, “g”); var label_container = document.createElementNS(“http://www.w3.org/2000/svg”, “text”); var label = document.createElementNS(“http://www.w3.org/2000/svg”, “textPath”); label.setAttributeNS(“http://www.w3.org/1999/xlink”, ‘xlink:href’, ‘#some-path’); label.appendChild(document.createTextNode(“Hello, World!”)); label_container.appendChild(label); …

How to Run a Detached Process in Bash

Running a process that is detached from the terminal is sometimes useful. Case in point, I had to run a database update script remotely via SSH. However, the update script takes a long time (close to an hour) so running it over SSH wouldn’t be practical. Simply being disconnected with …