How do I increase the ulimit -n on 10.10.3
Now it's easier with OSX 10.11.4 
sysctl.conf does now exist, or can be created if it doesn't.
First line above

echo 'kern.maxfiles=20480' | sudo tee -a /etc/sysctl.conf


Second line above.Setting environment variables.
Can be set up ... Use this link. A short but useful how-to.

Third line above:
/etc/profile exists.

echo 'ulimit -n 4096' | sudo tee -a /etc/profile