Updating to the latest version of git on Ubuntu

Permalink

If you're using git on Ubuntu, the version distributed via apt may not be the newest version of git (I use git to deploy changes on all of the sites I manage). You can install the latest stable version of git provided by the maintainers as follows:

sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update

Generating a responsive CSS grid using Neat

Permalink

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);
            }
        }

    }
}

UTo 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>

Dan Moren on switching to Apple's two-factor authentication

Permalink

So is my account much safer now? Given that I already had two-step verification on, probably not really. But I sure get that warm, fuzzy feeling inside by being up-to-date with the latest security measures.

I made the switch from Apple's two-step verification over the weekend and, in spite of having to re-enter my password across devices, it was a change for the better. This implementation is decidedly superior to the previous two-step verification and the geographic data about attempted sign-ins is a particularly nice touch. If you haven't taken the leap yet, I'd go for it.



Reuters: Senate push for encryption legislation falters

Permalink

Draft legislation that Senators Richard Burr and Dianne Feinstein, the Republican and Democratic leaders of the Intelligence Committee, had circulated weeks ago likely will not be introduced this year and, even if it were, would stand no chance of advancing, the sources said.

Fantastic news. This bill (and the push behind it) was ill-conceived at best and would have caused untold damage were it to pass.