Comma delimited list of United States Abbreviations

I’m putting this here because I sometimes need a comma delimited list of the fifty states.

"AK", "AL", "AR", "AZ", "CA", "CO", "CT", "DE", "FL", "GA", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MI", "MN", "MO", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VT", "WA", "WI", "WV", "WY"

Update 2020-01-28

There have been several comments adding a few helpful bits to this post. I figure I’d pull them up here.

Joe pointed out that we could be including the armed forces abbreviations as well as DC.

Comma Delimited List of States with Armed Forces and DC

"AA", "AE", "AK", "AL", "AP", "AR", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "GA", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MI", "MN", "MO", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VT", "WA", "WI", "WV", "WY"

James Ball, provided the same list with single quotes as well as a list of Canadian provinces.

Single Quote comma Delimited List of United States Abbreviations

'AK', 'AL', 'AR', 'AZ', 'CA', 'CO', 'CT', 'DE', 'FL', 'GA', 'HI', 'IA', 'ID', 'IL', 'IN', 'KS', 'KY', 'LA', 'MA', 'MD', 'ME', 'MI', 'MN', 'MO', 'MS', 'MT', 'NC', 'ND', 'NE', 'NH', 'NJ', 'NM', 'NV', 'NY', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VA', 'VT', 'WA', 'WI', 'WV', 'WY'

With Armed Forces and DC.

'AA', 'AE', 'AK', 'AL', 'AP', 'AR', 'AZ', 'CA', 'CO', 'CT', 'DC', 'DE', 'FL', 'GA', 'HI', 'IA', 'ID', 'IL', 'IN', 'KS', 'KY', 'LA', 'MA', 'MD', 'ME', 'MI', 'MN', 'MO', 'MS', 'MT', 'NC', 'ND', 'NE', 'NH', 'NJ', 'NM', 'NV', 'NY', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VA', 'VT', 'WA', 'WI', 'WV', 'WY'

Comma Delimited list of Canadian Provinces & Territories

With double quotes.

"AB", "BC", "MB", "NB", "NL", "NS", "NT", "NU", "ON", "PE", "QC", "SK", "YT"

With single quotes.

'AB', 'BC', 'MB', 'NB', 'NL', 'NS', 'NT', 'NU', 'ON', 'PE', 'QC', 'SK', 'YT'

Thanks for the comments!

Git-SVN, Retrieve your Repo URL

Hi. My name is Jeremy and I use git-svn. You can cry for me if you would like, it’s fine. I’ll give you a moment.

Do you feel better now? Good!

Here is my problem. I often forget where my SVN repo is located. That’s probably because I spend most of my time working in Git and completely oblivious that an SVN repository even exists.

So here goes. You can get your SVN repo url by running the following git-svn command.

git svn info --url

See it’s easy. It’s just not easy to remember. But now it is forever written down for me to find in the future. Hi future Jeremy! I hope life is great!

MailTo Links Not Working Correctly

Backstory

Once upon a time there was a person named Jeremy. He used Google Chrome as a browser. He was very happy. One day Jeremy clicked on a mailto: link. Some program (Google Chrome or Windows) helpfully asked how it could handle that action. Jeremy, who hates modal windows and was not paying attention, hastily clicked on the first thing that looked like it would close the modal. He soon found that his hasty actions lead to a larger problem. Now, mailto: links did not do anything when clicked on within Google Chrome.

Present Day

(Spoiler: Jeremy is me.)
Today I got fed up with mailto: links not working as they should in Google Chrome. So I went looking for a solution. I found several different potential solutions. My goal was to get mailto: links to open in Mozilla Thunderbird.

  1. Remove the mailto: handler from chrome://settings/handlers.

    I tried this, unfortunately there were no handlers listed under: chrome://settings/handlers.

  2. Register a new setting with registerProtocolHandler

    I stumbled upon this Paul Irish post. However, it seemed hacky to use a handler to open Thunderbird.

  3. Finally

    I decided to take a look at my Windows settings. I’m using Windows 10 so I brought up the Start Menu and searched for “Default Programs”. I found Control Panel\Programs\Default Programs. From there I saw an option to “Associate a file type or protocol with a specific program”. This led me to Control Panel\Programs\Default Programs\Set Associations which displays a LONG list of associations, and unfortunately no intuitive way to search through them. So I scrolled and scrolled and eventually found an option named “MAILTO”.

Mail To Default Association
The Current Default is now Thunderbird

Lo and behold the Current Default for this option was set to “Google Chrome”. That looked suspicious. So… I changed the Current Default to “Thunderbird”. Saved the setting, restarted Google Chrome, and BOOM, mailto: links started working correctly.

Meld rocks for Merging Code Conflicts

I’ve tried a number of different merge/differencing tools in the past. BeyondCompare, TortoiseMerge, WinMerge, etc…

I’ve never found one that’s as easy to use and as understandable as Meld is. Do yourself a favor and head over to http://meldmerge.org/ and grab yourself a copy. It’s great.

When you’ve got it go ahead and throw this in your git config. (Psst, the command for that is: git config --global --edit)

[merge]
tool = meld
[mergetool "meld"]
cmd = 'C:/Program Files (x86)/Meld/meld.exe' $REMOTE $MERGED $LOCAL

You’ll probs want to update the path to your Meld exe.

BOOM.