Parking Page on Cloud Storage

Now that I’m using Google Domains, I thought that it only appropriate to have my parking page on Google Cloud Storage. It turned out to be pretty easy.

  1. Create a Google Cloud Storage bucket with your desired website name. You may need to prove that you control the domain before creating the bucket. In my case, Google knew that because they were the registrar.
  2. Build your static parking page. I started with the Grayscale template from Start Bootstrap and made my changes.
  3. Copy the static content up to Google Cloud Storage.
    1
    2
    3
    4
    
    gsutil cp -a public-read -R * gs://www.dwightshih.com
    # -a public-read gives the requester OWNER permission
    #    and all other users READ permission
    # -R for recursive copy
    
  4. Update the bucket configuration to serve index.html when a bucket listing is requested via the CNAME alias.
    1
    2
    
    gsutil web set -m index.html gs://www.dwightshih.com
    # use -e <404.html> to specify an error page
    
  5. Update your DNS CNAME alias to c.storage.googleapis.com:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    
    $ dig www.dwightshih.com
    
    ; <<>> DiG 9.8.3-P1 <<>> www.dwightshih.com
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28866
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;www.dwightshih.com.		IN	A
    
    ;; ANSWER SECTION:
    www.dwightshih.com.	3600	IN	CNAME	c.storage.googleapis.com.
    c.storage.googleapis.com. 1055	IN	CNAME	storage.l.googleusercontent.com.
    storage.l.googleusercontent.com. 229 IN	A	64.233.171.128
    
    ;; Query time: 58 msec
    ;; SERVER: 10.0.1.1#53(10.0.1.1)
    ;; WHEN: Mon Sep  1 16:48:08 2014
    ;; MSG SIZE  rcvd: 129
    

And voilà, your static page should be up.

Smalltalk and Me

I never had the opportunity to write an application in Smalltalk.

I was a fortran programmer back in the late 80’s. Exposure to Unix had opened my eyes to a whole new world of possibilities in software. And I was a regular at the Sunnyvale Computer Literacy, trying to learn more about those possibilities. One of those possibilities was Smalltalk, or more precisely Little Smalltalk. I read the book. I obtained the source on 9 track tape. And I surreptitiously installed it on the superminicomputer at work.

And that was my introduction to the wonderful world of objects. They say that “You can write a Fortran program in any language” And I’ve certainly seen my share of Java code that is best described as C with garbage collection. In Smalltalk, everything is an object. And with its devotion to that mantra, Smalltalk was perhaps the best language to start object oriented programming.

RIP James Robertson

I was saddened to learn:

It’s with great sadness that I inform you that James Robertson passed away on Thursday, April 17, 2014. He was a very good friend to me and to multitudes of other people. He was a tireless supporter of Smalltalk and a loving father to his family. He will be greatly missed.

I didn’t have the privilege of meeting Jim - our only connection was between his blog and mine. But you could feel his presence and commitment at a distance. My thoughts and prayers go to his family.

The Platform Wins

Hmmm. You would think that I would have learned my lesson when I picked TextPattern over WordPress.

The Platform Wins

I was idlely searching for GitHub on the IOS App Store and I found OctoPage, an app for jekyll on github pages. And I couldn’t resist. So I spent $0.99 plus tax and took it for a spin.

The verdict? Not quite ready for prime time. OctoPage needs some more polish when authoring posts. And it would be really nice if it were a universal app rather than iPhone only.

But the fact that it exists, along with Jekyll on GitHub pages and Jekyll Themes and Octopress, is a strong statement that Jekyll really is the static weblog platform. And that I need to re-think my move to Hexo.

Google Domains

I’ve been a most happy GoDaddy customer for over 10 years. But Google Domains offered more (free private registration) for less ($3-$5 per domain). My beta invite arrived last week and I started moving my domains.

My experience with Google Domains has been mostly good. I submitted 3 support emails and received responses in a couple of hours. I didn’t get the answers that I was hoping for, but I got my answers.

For the record, here’s what I was interested in:

Q: Are bare domains supported on Google Cloud Storage with Google Domains?

A: No …

I have no complaints with Amazon S3. But my Amazon bill has been about $0.70/month, with about $0.53/month for Route53 DNS hosting. I’m not going to move this site to Google Cloud Storage for $6.50/year, but support for bare domains might just put my next static site on Google Cloud rather than Amazon S3.

Q: How should I configure my MX records to use email forwarding with an external (Amazon Route53) DNS?

A: The email forwarding feature requires the use of the Google name servers.

I have to use Amazon name servers to support a bare domain name (ideoplex.com) on Amazon S3. I use GoDaddy email forwarding on this domain by setting the MX records to the GoDaddy mail servers.

I need to move a bunch of account off the ideoplex.com email addresses before I can transfer this domain.

Q: Can Google Domains forward a email address to multiple email addresses.

A: No …

My email issues are pretty small change. And it is a beta after all. But if Google wants to be a best of breed service, then they’ll need to up their game.

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.