March 26, 2016

JavaScript: External Links in New Tabs

I've written before about my not so mild hatred for the request to open all external links in new tabs. For those who don't know, this is done by adding target="_blank" to the anchor tag. I don't like doing this for so many reasons, but I'll save that rant for another blog post.

Now, I've been asked to do this so often that automating this process was long overdue. I spent a few minutes and wrote some JavaScript that programmatically looks for external links and adds target="_blank"

JavaScriptWeb Development
March 13, 2016

Intro to D3.js and Data Visualization

Recently, I worked my way through the D3 Intro Course taught by Ian Johnson over at Front End Masters and have been practicing what I've learned ever since. I'm not great at it (yet), and I haven't made anything too amazing, but I am getting a better grasp of this awesome library (big thanks to…

March 09, 2016

Using && and || in Bash Scripts

I write about Bash so often you might start to think it's all I do. It's not, but considering I spend a good portion of my day in the terminal, I'm always on the look out for ways to make it a more efficient experience.

Recently, I came upon a simple trick for bash scripts that just has to be shared. It involves the operators && (AND) and || (OR). In most cases, && and || are…

Web Development
December 16, 2015

Update for Ripsum

Tonight, I released version 0.1.2 of the Ripsum gem. This version adds a new feature to the gem, a configurable library of words. The user can now pass in their own choice of placeholder text. Hipster Ipsum. Zombie Ipsum. Harry Potter Ipsum. Whatever you choose.

This is done by adding an initializer file in your application. If you're using Rails, creating a new file in config/initializers/ directory, perhaps named ripsum_initializer.rb

Web Development
December 06, 2015


A Ruby Gem for Generating a Random Amount of Lorem Ipsum with Each Page Load

Today, I published my first Ruby gem: Ripsum. Using Ripsum allows you to generate a random amount of lorem ipsum text with each page load. But why might we want to randomize how much text is output to a page?

I work with designers who frequently miss what might happen to a layout if a heading is too…

Web Development
September 10, 2015

My Favorite Git Aliases

If you're like me, you like to find patterns in your work and turn them into aliases and shortcuts in the terminal. I thought I'd share with you my current Git aliases, explaining a few along the way.

For starters, you'll want to add these aliases to your .gitconfig file.

  br = branch
  brm = branch --merged
  brnm = branch --no-merged
  ci = commit
  co = checkout
  copl = "!f() { git checkout $1 && git pull --rebase origin $1; }; f"
  df = diff
  lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
  mg = merge
  st = status
  plo = pull --rebase origin
  pho = push origin
  plod = pull --rebase origin dev
  phod = push origin dev
  plos = pull --rebase origin stage
  phos = push origin stage
  plom = pull --rebase origin master
  phom = push origin master
  reaper-nokill = remote prune --dry-run origin
  reaper = remote prune origin

Most of these aliases are…

Web Development