First, edit your hosts file.
$ sublime /etc/hosts
Add your new host, ie.
127.0.0.1 example.dev
Edit your (MAMP-) apache httpd.conf file
$ sublime /Applications/MAMP/conf/apache/httpd.conf
And add the new host
NameVirtualHost * (add this line just once)
<VirtualHost *>
DocumentRoot "/path/to/your/project/"
ServerName example.dev
</VirtualHost>
Restart MAMP and you are good to go