Category Archives: Snippets

Useful Find Commands

To act on the list of files found instead of simply listing them, try the -exec command. Find 10 largest files

List 10 largest directories in current directory

or  

iOS Safari web clip icons for home screens

Create custom web clip icons or “app logos” in various sizes to be displayed (instead of the default site snapshot) when users save your site to their Home screens. Across Safari iOS devices. Add in the in the same place you call your normal browser favicons. See the Apple Developer Docs to get it from […]

Simple Mobile and Smartphone Detection

Though an old post, this is my solution that’s been pieced together from various comments on this article.

.htaccess Basic Authenticaton

To restrict access to everything in a directory and everything below it, set up an .htaccess file and a corresponding password file. Generating the .htpass file Method 1 The -c directive creates a file .htpass in the directory somepath/outside/of/root/ containing a username user1. Be careful as this will overwrite an existing file of the same […]