Shallot allows you to create customized .onion addresses for Tor’s hidden services. (By customized, it is meant that part of the address can be selected. Choosing an entire address would take far longer than the universe is believed to have been in existence.) - Project Github page

Make sure you have Homebrew installed and start by installing the Homebrew OpenSSL package:

$ brew install openssl

Set the correct path to the OpenSSL header files and libraries:

$ export CFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib"

Configure and make the Shallot binary:

$ ./configure && make
$ ./shallot
Usage: shallot [-dmopv] [-f <file>] [-t count] [-x time] [-e limit] pattern
$ ./shallot ^sizeofcat

Read the Shallot and Tor documentation.