Fixing UNIX permissions en masse

Every once in a while I need to “fix” the unix permissions on a directory. This is usually a web directory, so all the folders need to be readable and executable (i.e. 755), and the files need to be readable (i.e. 644). A preventative measure might be to set the umask appropriately (i.e. 022), so [...]

Date math and documentation

The other day I found this little nugget in the comments of the date page of PHP manual. The real lesson is in the first paragraph: “One of the most useful skills you can utilize when performing date math is taking full advantage of the UNIX timestamp. The UNIX timestamp was built for this kind [...]