os x: set file self destruct based on tag

If there’s one thing I dislike, it’s clutter. Once in a while, I like to do a purge of my downloaded files and things on my Desktop. What I kept finding, however, is that I was unsure about whether I needed certain files after even just a few weeks. This would lead to me putting […]

show maintenance page with flag file using .htaccess

Just a small trick I picked up while planning for site downtime and wanted to remember for myself. The following snippet will redirect to a (pre-existing) maintenance page if it detects the existence of another file: RewriteEngine on RewriteCond %{DOCUMENT_ROOT}/maintenance.flag -f RewriteCond %{SCRIPT_FILENAME} !maintenance.flag RewriteRule ^(.*)$ /503.html [L] This will look for the existence of […]