Corey Ward

Full-stack, freelance designer + web developer building GatsbyJS and Rails websites. I also design and build furniture.

Page 3


Typo Forgiveness in Git & Bash

I’m often moving pretty quickly when it comes time to commit work to Git. I have a bit of a workflow down, and I type the same few shortcuts frequently:

$ git st (expands to status)
$ git ks (expands to difftool, which opens Kaleidoscope)
$ git add -A
$ git ci (expands to commit)

Regularly, though, my fingers will transpose the t in Git and the space that follows it: gi tks.

This has become frequent enough that I finally took the time to address it by making the desired action still occur:

$ git config --global alias.tst status
$ git config --global alias.tks difftool
$ git config --global alias.tci commit

Then, in ~/.bash_profile:

alias gi=git

Now when I make a mistake, Git does what I want and I don’t lose my flow. It’s a small thing, but it’ll improve my day a little bit a dozen times a day.


Mentioned in this post: Kaleidoscope, the (mostly) fantastic diff visualizer...

Continue reading →


How to send a multiline file to Heroku Config

On occasion, I’ll need to add sensitive configuration data to a Heroku application that happens to be multiline or contains non-alphanumeric characters. For example, uploading a public or private key file, where whitespace (including vertical whitespace) is significant. Another example that I ran into recently was uploading a JSON file for Google Auth configuration.

The solution is pretty straightforward:

$ heroku config:set FOO="$(< /my/file.json)"

That’s it. If you feel like it, you can confirm that the data is represented accurately by checking heroku config.

Perhaps this will help you if you’re in a similar situation. Cheers!

View →


Don’t Disable My UI

I recently saw another designer using minimal-ui in his <meta name="viewport"> declaration. And then I saw Daniel Eden explain it on Twitter, and go so far as to include it on his own website.

I gave it a cursory look, and included it on my next project without much thought.

It wasn’t until I started working on mobile layout that I realized something was up. Dragging the page down (i.e. scrolling toward the top) in mobile Safari normally has the behavior of revealing the chrome on the bottom of the screen, including back, forward, bookmark, and tab-switching buttons.

With minimal-ui, however, this behavior was eliminated. Tapping, as suggested in the above referenced tweet, does not have any affect. The only way to reveal...

Continue reading →