Jekyll on the Go

The more I play with jekyll on GitHub pages, the more I like it.

The big downside to a static weblog is how to post on the go. In my case, this means posting from an iPad. The nice thing about GitHub is that you can update your repository from a browser. If you know the jekyll file naming syntax, then blogging from the browser is pretty straight-forward. Here’s my workflow:

  1. Author the post in Editorial
    • Copy the front matter from an existing post as a starting point
  2. Use the GitHub web interface to create a new file:
    • Name the file ccyy-mm-dd-post-link.md
    • Paste the content in from Editorial
  3. Commit the new file

Bingo. You have a new post. I’m not leaving hexo, but jekyll might be my top recommendation for a new technically proficient blogger.

emacs, windows, and ack

I just had to migrate to a new work computer and it took a bit of remembering to get ack working from emacs. For next time, here are the instructions for getting it to work.

  1. Install Perl
  2. Add the perl bin and site bin to the Windows Path
  3. Download the single file version of ack to the site bin (note the .pl extension):
    1
    
    curl http://beyondgrep.com/ack-2.12-single-file > c:\Strawberry\perl\site\bin\ack.pl
    
  4. Associate the .pl Extension with perl by running the following lines as an administrator:
    1
    2
    
    assoc .pl=PerlScript
    ftype PerlScript=C:\Strawberry\bin\perl.exe "%1" %*
    
    This assumes that you’ve installed Strawberry Perl to the default installation directory.
  5. Define an ack function for use in emacs (see Stack Overflow on ack in Emacs on Windows):
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    
    (defvar ack-command "ack --nogroup --nocolor ")
    (defvar ack-history nil)
    (defvar ack-host-defaults-alist nil)
    (defun ack ()
      "Like grep, but using ack-command as the default"
      (interactive)
      ; Make sure grep has been initialized
      (if (>= emacs-major-version 22)
          (require 'grep)
        (require 'compile))
      ; Close STDIN to keep ack from going into filter mode
      (let ((null-device (format "< %s" null-device))
            (grep-command ack-command)
            (grep-history ack-history)
            (grep-host-defaults-alist ack-host-defaults-alist))
        (call-interactively 'grep)
        (setq ack-history             grep-history
              ack-host-defaults-alist grep-host-defaults-alist)))
    

Custom Domain with GitHub Pages

It’s pretty simple to use a custom domain for your GitHub Page. Start by reading GitHub Pages Basics and then follow the directions.

Here’s what I did:

Update DNS in Route53

  1. Login to your Amazon Web Services Console
  2. Go to Route53
  3. Go to Hosted Zones
  4. Select the Domain Name and Go to Record Sets
  5. Select “Create Record Set”
  6. Add a CNAME Record from your desired custom name to your github page. In my case, I created a CNAME record named “github.ideoplex.com” and directed it to “ideoplex.github.io”.

Verify your DNS setting from the command line with dig:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
~ 17 $ dig github.ideoplex.com

; <<>> DiG 9.8.3-P1 <<>> github.ideoplex.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38421
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;github.ideoplex.com.		IN	A

;; ANSWER SECTION:
github.ideoplex.com.	2558	IN	CNAME	ideoplex.github.io.
ideoplex.github.io.	2558	IN	CNAME	github.map.fastly.net.
github.map.fastly.net.	23	IN	A	23.235.46.133

;; Query time: 43 msec
;; SERVER: 10.0.1.1#53(10.0.1.1)
;; WHEN: Sat Aug  2 17:53:29 2014
;; MSG SIZE  rcvd: 120

You want to see your custom domain name (github.ideoplex.com) aliased to your github user page (ideoplex.github.io) aliased to something (github.map.fastly.net) that references an ip address (23.235.46.133).

Add a CNAME record to your repository

The GitHub instructions to add a CNAME record are straight forward.

  1. Identify the correct branch.
    • Use master for user and organization pages
    • Use gh-pages for project pages
  2. Add a new file named CNAME (all caps) to the branch root directory
  3. Add a single line to the CNAME file that specifies the bare subdomain for your page (in my case, github.ideoplex.com)

Verify the CNAME behavior with curl:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
~ 18 $ curl -I http://ideoplex.github.io/
HTTP/1.1 301 Moved Permanently
Server: GitHub.com
Content-Type: text/html
Location: http://github.ideoplex.com/
Expires: Sat, 02 Aug 2014 22:20:01 GMT
Cache-Control: max-age=600
Content-Length: 178
Accept-Ranges: bytes
Date: Sat, 02 Aug 2014 22:10:01 GMT
Via: 1.1 varnish
Age: 0
Connection: keep-alive
X-Served-By: cache-iad2120-IAD
X-Cache: MISS
X-Cache-Hits: 0
X-Timer: S1407017401.351397276,VS0,VE1
Vary: Accept-Encoding

Here you want to see that your old github page url (http://ideoplex.github.io/) is redirected to your custom domain name (http://github.ideoplex.com).

Wait

This was the hardest part. The first two steps took a couple of minutes, but it can take ten minutes for the changes to take effect at GitHub.

Riding down Memory Lane

Thinking of the 1986 Tour de France triggered a stroll down memory lane.

I was introduced to the Tour by Great Adventures in Daredevil Sports. One of the stories, “Pedal till you drop”, was about Jacques Anquetil winning the 1964 Tour - making him the first to with the Tour 5 times. That was pretty much all I knew about the Tour for many years. Greg LeMond briefly put the Tour on the US media map, but it wouldn’t be until Lance Armstrong that the US would really pay attention.

It may be hard to imagine, but bicycles were the accessible high tech of the 70’s. Cars had carburetors and computers were for the privileded few. Heathkit was more about saving money than learning. But we all had bicycles. And we would fantasize about Reynolds 531 frames, tubular tires, and Campagnolo groupsets.

But that was big bucks. I had my eyes on a Viscount. A Viscount dealer had moved into my neighborhood and I would ride down and drool 2 or 3 times a month. The Viscount featured a cast aluminum fork and I loved the look of it. Its notoriety as the death fork was yet to come.

I never became much more than a casual rider. But I enjoyed it while it lasted.

Slaying the Badger

“Slaying the Badger” goes beyond just a story about a cycling race.

John Dower - Director

I remember watching Greg LeMond seize the 1989 Tour de France from Laurent Fignon’s grasp with an amazing ride in the final time trial. But I don’t have direct memories of the 1986 Tour. So I was very pleased to watch Slaying the Badger, the latest film from ESPN’s 30 for 30 this past week.

Going in, I was certain that Hinault owed LeMond the 86 Tour de France as LeMond’s just reward for letting Hinault win the 85 Tour. Halfway through I had come around to thinking the team director was the villian and that maybe Hinault wasn’t such a backstabber after all. And at the end, I was convinced Hinault was pond scum.

Like all the best stories, Slaying the Badger is a story about people. Bernard Hinault and Greg LeMond were two of the great riders of their time. And they were both on the same team. A very good watch for the sports fan.

World Cup Withdrawal

As a bit of a soccer dilettante, I refrained from commenting on the World Cup while it was ongoing. But it’s fair game now.

I thought the group stage was brilliant. There were a few clunkers, but the teams were playing for the win. But the knock-out phase brought a return to form - teams started playing not to lose rather than win.

Germany is a worthy World Champion. But I can’t help but wonder what would have happened if the Argentina had the extra day of rest rather than Germany - they had early scoring opportunities, but they weren’t sharp and let them slip away.

The 2014 World Cup is over. Time to start the countdown for Euro 2016.

About Time

And I believe in Love
And I know that you do too
And I believe in some kind of path
That we can walk down, me and you

What I like about a Richard Curtis romantic comedy is he gives us multiple romances to follow. And most, if not all, of the romances are interesting. The lead romance in About Time is between Tiem (Domhnall Gleeson) and Mary (Rachel McAdams). But that’s not the relationship that I’m envious of.

Read More

Missing Roger Ebert

I just watched About Time on cable (a very nice romantic-comedy from Richard Curtis, known for Love Actually and Notting Hill). As is my want, I hopped over to IMDB to check other people’s reactions after the end. And I realized once again that Roger Ebert was gone and that I’d never read a new review from Roger again.

Roger Ebert was my go-to movie reviewer. I feel his absence with every movie I wish he could have reviewed.

Infrastructure Updates

New Theme

I’ve switched from the default landscape theme to the biture theme. I’ll miss landscape, but regenerating the site in landscape took about 27 minutes vs about 8 seconds for biture. I think I’ll keep those 27 minutes per post.

S3 Update

My S3 hosting bill continues to run just over $0.60/month. I like those numbers.

Like reading an old yearbook

I’m bringing the blog back by hand. I thought about automating the process, but I needed to convert from textile to markdown and update my intra-blog links. Rather than wait for automation, I decided to start the conversion by hand immediately. The side-effect has been that I’ve been reading my blog from the beginning.

It’s like reading an old yearbook:

  • Some pages are ehh
  • Some pages bring a smile
  • Some pages take you back in time

A little bit goes a long way, but well worth my time.