Throwing together a blog

I’ve been working on this site for longer than I’d care to admit (years at this point). It’s been through a few domains, two content management systems, multiple versions of those content management systems, countless designs and several different hosts. I’m really happy with where it’s at and what I’ve learned putting it together.

I started this site off running Kirby on shared hosting. It’s served as a design and development playground for me as I’ve learned and applied new things. It started off without being version and now the source for it is stored on Github and now runs on Statamic.

I started off writing the CSS and JS for the site manually, before generating a Grunt build process, breaking out the styles to be more modular and rewriting them in SCSS. Dependencies are now sourced from npm and Bower.

Instead of running the site on shared hosting, it now runs on a LAMP Digital Ocean box using PHP7 and mod_pagespeed, both of which have made a tremendous difference in terms of site performance.

As it stands now, I’m thrilled with where this site sits, but I’m curious to see how else I can continue improving it.

Generating a responsive CSS grid using Neat

I use a responsive grid system for this site (and a number of other projects) that’s generated by pulling in Thoughtbot’s Neat framework. To generate the framework for this grid, I’ve put together a simple SASS/SCSS mixin that looks like the following:”

.grid {

    &-main-container {
        @include outer-container;
    }

    &-row {
        @include row;
        @include pad (0 10%);

        @media only screen and (max-width: 640px) {
            @include pad (0 10%);
        }

        &.collapse {
            @media only screen and (max-width: 640px) {
                @include pad (0);
            }
        }

        .grid-row { // collapse nested grid rows
            @include pad(0);
        }
    }

    $grid-columns: 12;

    @for $i from 0 through $grid-columns {

        &-columns-#{$i} {
            @include span-columns($i);
        }

        &-columns-small-#{$i} {
            @include span-columns($i);

            @media only screen and (max-width: 640px) {
                @include span-columns(12);
            }
        }
    }
    @for $i from 0 through $grid-columns {

        &-shift-left-#{$i} {
            @include shift(-$i);
        }

        &-shift-right-#{$i} {
            @include shift($i);
        }

        @media only screen and (max-width: 640px) {
            &-shift-left-#{$i},
            &-shift-right-#{$i} {
                @include shift(0);
            }
        }

    }
}

To use the grid, simply drop it in as an import after including Neat. Once your SASS/SCSS files have been parsed, you’ll end up with completed grid classes that will allow you to generate responsive markup for a page. For example:

<div class="grid-main-container">
    <div class="grid-row>
        <div class="grid-columns-9">
        <!-- Content -->
        </div>
        <div class="grid-columns-3">
        <!-- Content -->
        </div>
    </div>
    <!-- Columns in this row will collapse to the full screen width on small screens -->
    <div class="grid-row>
        <div class="grid-columns-small-9">
        <!-- Content -->
        </div>
        <div class="grid-columns-small-3">
        <!-- Content -->
        </div>
    </div>
</div>

Scriptable Backups with Arq

I’ve been using Arq for my backups for several months now and have regular backups being pushed to both Amazon Cloud Drive and AWS. A big part of Arq’s appeal is it’s flexibility, configurability and the wide array of backup destinations it supports. In short, it allows you to own and control your backups.

In addition to being a wonderfully designed app, Arq ships with a handy command line utility that lets you pause, resume and otherwise control your backups using simple commands named for the app. In order to use these commands, however, you need to include the executable in your shell’s path variable.

To accomplish this, I symlinked the Arq executable in to usr/local/bin. If /usr/local/bin isn’t in your path, you can add it by adding the following to your .bashrc, .bash_profile or what have you:

export PATH=$PATH:/usr/local/bin

Next, symlink the Arq executable:

sudo ln -s /Applications/Arq.app/Contents/MacOS/Arq /usr/local/bin/Arq

Next, open up a new shell and try the following:

Arq pause 60
Arq resume

Now you can easily control your backups from your CLI of choice or even script them from apps like Alfred or Control Plane (context sensitive backups anyone?).

DOJ takes war on encryption to WhatsApp

Via The EFF:

The government’s theory, that the All Writs Act gives it the power to compel American companies to write code and design products to ensure law enforcement access to encrypted content, is virtually without limits. No devices, and indeed no encrypted messaging services, would be safe from such backdoor orders. If the government wins in San Bernardino, it could even force companies to give it access to software update systems, and send their users government surveillance software disguised as security patches.

The government is taking its war on encryption to WhatsApp’s front door. This is, perhaps, even more terrifying than their effort to force Apple to hamstring its device security. It’s one thing if the government can force its way in to devices but, oftentimes, services used on secured devices have their own, additional layers of security. This is the government attempting to compromise security further by making inroads in to security provided by messaging (and other) service providers.

Chilling.

Dutch government on encryption

Via Ars Technica:

…forcing companies to add backdoors to their products and services would have “undesirable consequences for the security of communicated and stored information,” since “digital systems can become vulnerable to criminals, terrorists and foreign intelligence services.”

Exactly.