Monthly Archives: March 2016

Pro Tools 12.5

It looks like Pro Tools 12.4 is the end of the line for me. I purchased a student license of Pro Tools 10 back on March 17, 2012. It was quite a deal — it included four years of free updates.

With the news that Pro Tools 12.5 will likely drop on March 31, 2016, that will mark the first release that is not included in the package I bought. I can’t complain - I spent $293.95, and I’ve definitely gotten my worth out of it. But now I’m faced with a decision regarding how to move forward. My options appear to be:

  • Spend $300-360/year on a subscription or Annual Upgrade plan
  • Do nothing, and continue to use Pro Tools 12.4 until I see a compelling reason to update.

I’m leaning heavily towards doing nothing. The cloud collaboration tools of version 12.5 aren’t enough to spur me to action. At the current pricing for Pro Tools, I’d be very tempted to spend $200 on Logic X, to thoroughly evaluate it, delaying a Pro Tools update by 8 months to offset the cost.

But for now, I’ll just wait and see how my needs evolve.

MathJax with WordPress

It’s not something I do regularly, but occasionally I like to include equations in my writing here. MathJax seems to be the consensus choice for equation presentation today, and it meets all of my criteria:

  • Uses the LaTeX equation format, which is as portable as these things come.
  • Does not require the use of fixed resolution images.
  • Can take advantage of browser support for MathML.

Dr. Drang wrote a post a while back about his modifications to PHP-Markdown-Extra to include support for MathJax. I’m still using the canonical version of PHP-Markdown, and I’d prefer to stay on the main development branch, so I went searching for alternatives. What I found is the MathJax-LaTeX WordPress Plugin. In combination with PHP-Markdown, this site turns this:


<p>
\\[ \begin{align}
{gain}_{left} & = \left( \cos { \frac{2}{\pi} \color{red}{pan}} \right) \\\
{gain}_{right} & = \left( \sin { \frac{2}{\pi} \color{red}{pan}} \right)
\end{align} \\]
</p>

Into this:

\[ \begin{align} {gain}_{left} & = \left( \cos { \frac{2}{\pi} \color{red}{pan}} \right) \\ {gain}_{right} & = \left( \sin { \frac{2}{\pi} \color{red}{pan}} \right) \end{align} \]

There are a couple of things to note about this. First, I have to wrap the whole equation in <p> tags in order to keep PHP-Markdown from trying to parse it. Second, while the documentation for MathJax indicates thet only a single backslash is required to kick off a block, I need to use two, the first to escape the second (I think). Finally, I need to include the Shortcode to have MathJax included on the page. This is actually great, because it means that the scripts are only loaded when they’re truly needed.

Marked 2 also supports MathJax, so I’m able to fully preview my equations before pushing them live on this site, which is great, because I don’t know LaTeX equation syntax well enough to get it right on the first try.

Removing Comments RSS Feeds from WordPress

Looking at the headers for this site, I found links to four types of RSS feeds:

  1. The main posts RSS feed:

    <link rel="alternate" type="application/rss+xml" title="Jeff Vautin &raquo; Feed" href="http://jeffvautin.com/feed/" />
    
  2. The main comments RSS feed:

    <link rel="alternate" type="application/rss+xml" title="Jeff Vautin &raquo; Comments Feed" href="http://jeffvautin.com/comments/feed/" />
    
  3. Category RSS feeds, such as:

    <link rel="alternate" type="application/rss+xml" title="Jeff Vautin &raquo; Tremolo Pedal Category Feed" href="http://jeffvautin.com/category/tremolo-pedal/feed/" />
    
  4. Individual posts comment RSS feeds, like:

    <link rel="alternate" type="application/rss+xml" title="Jeff Vautin &raquo; Tremolo Pedal - Getting Back to Work Comments Feed" href="http://jeffvautin.com/2009/01/tremolo-pedal-getting-back-to-work/feed/" />
    

Since I’ve disabled comments on this site, I’d also like to stop advertising the existence of the comment feeds to my visitors. A quick web search turned up a lot of misinformation, but here’s what I found that worked.

Per these instructions, I first commented out this line in the theme’s functions.php file, to remove the main posts feed and main comment feed from all pages:

// add_theme_support( 'automatic-feed-links' );

But I actually want to keep the main posts feed, so I manually added it back in header.php, right before <?php wp_head(); ?>:

<link rel="alternate" type="application/rss+xml" title="Jeff Vautin &raquo; Feed" href="<?php bloginfo('rss2_url'); ?>" />

Next, I added this code to functions.php to to remove the comment feeds on individual sites:

// Disable comment feeds for individual posts
function disablePostCommentsFeedLink($for_comments) {
    return;
}
add_filter('post_comments_feed_link','disablePostCommentsFeedLink');

Not too complicated - three simple modifications did the trick. I tried adding this call to functions.php, in order to avoid the header.php modification, keeping all of my modifications in one file. It caused the site to go down, though, so I had to ssh in and revert my changes:

add_action('wp_head', 'addBackPostFeed');
function addBackPostFeed() {
    echo '<link rel="alternate" type="application/rss+xml" title="RSS 2.0 Feed" href="'.get_bloginfo('rss2_url').'" />'; 
}

So, next time, I won’t do this. I imagine I’ll have to recreate these changes any time there’s an update available for my theme, so having these instructions around will be useful.

Update: February 9, 2017

I moved these changes into a WordPress Child Theme.

HTTPS with Let’s Encrypt

Following these instructions from Digital Ocean, it was really easy to get HTTPS set up for my flask app with Let’s Encrypt.

Since I already have git installed, the first step is to clone the letsencrypt tool:

sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt

Move into the directory and run the tool to install a certificate:

cd /opt/letsencrypt
./letsencrypt-auto --apache -d example.com

The tool will install all of the needed dependencies. The next step is to set up auto-renewal, since Let’s Encrypt only offers 90-day certificates. Digital Ocean has provided a shell script to handle this process, but I modified it to remove the dependency on the bc tool. When the certificate is within 30 days of expiration, it will renew. The script can be installed via curl:

sudo curl -L -o /usr/local/sbin/le-renew https://gist.githubusercontent.com/jeffvautin/5d98b4f7d42ab29463e2/raw/6a4b01a4caba2efd1e3dbc97a33d2ef1f80ecf26/le-renew.sh
sudo chmod +x /usr/local/sbin/le-renew

Edit the crontab to add a recurring task:

sudo crontab -e

Then add this line to the configuration to run the update script weekly:

30 2 * * 1 /usr/local/sbin/le-renew example.com >> /var/log/le-renew.log

I’ve updated my server configuration post to include these steps. And I’ll be making a small contribution to Let’s Encrypt - they’ve made this process so simple.

POODLE Vulnerability

When I tested one server with the following link, it reported a vulnerability to the POODLE attack:

https://www.ssllabs.com/ssltest/analyze.html?d=example.com&latest

Digital Ocean also provides instructions for resolving this. You need to disable SSLv3 by editing a configuration file:

sudo nano /etc/apache2/mods-available/ssl.conf

Find the line starting with SSLProtocol and change it to:

SSLProtocol all -SSLv3 -SSLv2

And then restart Apache2:

sudo service apache2 restart

Retesting should indicate the server is now secure.