If you need to set a default for a timestamp field and your server settings don’t allow the use of a zero timestamp (see my article on NO_ZERO_DATE) then the next best option is ‘1970-01-01 00:00:01’. I was trying to do this recently and the server was preventing the creation of a table Continue reading “MySQL minimum timestamp not allowed”
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:
Here is a relatively simple solution to automatically refresh your active browser tab when any file in a directory tree changes. It works on MacOS but you need to have a little file monitoring program called fswatch installed via Homebrew.
Continue reading “Refresh browser on file change with MacOS”
What is the best website to search if you are looking to buy a car privately?
I carried out a little bit of research – searching in a 30 mile radius for a Volkswagen Golf, here’s the results:
|Exchange & Mart||74||1|
I would have thought that sites like eBay and Pistonheads would have been popular with private sellers but this isn’t the case. Exchange & Mart are much cheaper than AutoTrader but obviously not as popular with private sellers. The most prominent site to go to is Gumtree.
* eBay didn’t allow a 30 mile search radius so I had to use 25 instead.
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.