Git include default configuration files then ignore further changes

You may want to add a default configuration file to Git so that if someone else picks up the code they only have to enter their particular details – however once you’ve configured it yourself you don’t want those changes tracked.

The solution is to use: git update-index --assume-unchanged path/to/file

To check which files in your repo are marked in that way use: git ls-files -v | grep ^[a-z]

How to install CodeIgniter with Composer

Run the command below to install CodeIgniter via Composer. This may be useful if GitHub has an outage and you can’t download a zipped version of the source.

composer require codeigniter/framework

You will then need to look in vendor/codeigniter/framework for the usual folder structure.

We all have days like this one:

GitHub can have problems

Using ngrok to access multiple homestead sites remotely

ngrok can be used to provide access to a local homestead or vagrant site remotely i.e. to a client.

You need to use header rewriting to work with the homestead configuration, the syntax for using a single site looks like:

ngrok http -host-header=rewrite mysite.app:80

If you have multiple sites then you will need to use ngrok with a config file, stored in ~/.ngrox.config.yml. The docs are vague on how to do the rewriting in the config file so here it is for reference:

tunnels:
    mysite:
        addr: mysite.app:80
        proto: http
        host_header: rewrite
    myapi:
        addr: myapi.app:80
        proto: http
        host_header: rewrite

Note that host header rewriting doesn’t work nicely with cookies which seriously limits this.

See http://stackoverflow.com/questions/41523847/fail-to-create-cookies-while-using-ngrok-with-header-rewrite