Resolving a large list of domains from CSV

This script is pretty simple, I was tasked with taking a CSV file that had about 5000 domains and seeing if any resolved to a particular IP address.

Straightforward and does the trick

Installing PG gem under OS X when Bundle install fails

The other day a coworker ran into an issue installing the postgres gem on her laptop while doing a bundle install. I have ran into the issue a couple of times myself and its a quick fix however the first time I encountered it it took a few minutes longer than it probably should to figure out.


 

This is a pretty simple fix, first we need to ensure that you have postgres installed. You can download and install postgres here: http://www.postgresql.org/download/

After that is installed, simple locate your pg_config file (an alernative would be to do a (find / -type d -name “pg_config”) although this may take a while. You could also do which psql91 (or whatever version you have installed) and look at the symlink in that directory. Generally your install should be in /opt/local/lib/.

What we are looking for is the pg_config directory we simply install the gem manually by running the below.

And there we go installed and a bundle install should now complete without issue.