Skip to content

Instantly share code, notes, and snippets.

View ch0c01d's full-sized avatar

Egar Rizki ch0c01d

View GitHub Profile
@ch0c01d
ch0c01d / ngrok-install.md
Created June 18, 2016 21:38
Expose localhost to the internet with Ngrok

Expose Localhost to the Internet With Ngrok

If you want a way to access your localhost easily on the public internet, lets say, to showcase the current work to a client, etc. This is where ngrok comes in. It allows us to establish a tunnel that forwards a port on our machine and make it available on the internet.

Ngrok is a Go program, distributed as a single executable file for all major desktop platforms. There are no additional frameworks to install or other dependencies.

This tutorial assumes you are using MAMP and have previously set up DNSMASQ.

@ch0c01d
ch0c01d / MAMP_Dynamic_Virtual_Hosts.md
Created June 18, 2016 21:38
Simplify Local Development with MAMP & DNSMASQ (& XIP.io)

Simplify Local Development with MAMP & DNSMASQ

When you sit down and start a new project, often times, you'll want to set up a virtual host, a spoof domain that will emulate a live environment. The effort is usually two parts: set up a domain in /etc/hosts, and then add a <VirtualHost> entry in /Applications/MAMP/conf/apache/httpd.conf to make your files accessible.

This tutorial is setting up a 'zero-configuration' development environment. We'll be setting up a spoof domain ending in .dev. In MAMP, we'll create a folder called dev. Any folder inside, the name will become the domain.