Code Yard updates
December 16th, 2006
I just updated and added a few PHP scripts to Code Yard that might be useful for some
- Updated and fixed some bugs in parseCSV{} and parseINI{}.
- speedometer{} — Class for simplifying calculation of script execution time.
- walkDir{} — Class for recursively getting a list of directory contents. It returns both a multi-dimentional array, and a plain array with full paths, both types of output are optional increase performance. The number of directory levels to walk down into is also configurable.
- rfile() & wfile() — Functions for reading and writeing to local files. I wrote these about 3-4 years ago, and i’ve used them ever since, they’ve undergone some slight modifications since then, but their still basically the same. Their quite flexible, fast, and save a lot of time.
- randpass() — Function with a quite self-explanatory name. Generates a random password of any desired length using the character ranges you specify. It can be made more flexible, but its perfect for most situations when you need to generate a random password.
Cleaning Up After SVN
December 12th, 2006
If you’re using SVN for keeping your source safe for web apps, you may notice uploading the working folder also uploads all those hidden .svn folders. Not ideal.
Here’s the shell command to delete all those .svn files from your working directory:
find -d "your/working/directory" -name ".svn" -exec rm -r '{}' ; -print
The -d flag (-depth) means the find command will “process each directory’s contents before the directory itself” so the rm (delete) command won’t complain it can’t find a file in the structure it just deleted.
(I am not responsible if this screws up your project, I assume if you’re a developer and you’re using SVN you *should* know what you’re doing. However, just in case you don’t, once you run this command you won’t be able to update your working copy, nor commit or anything else, so… [insert cautionary advice here])
cmd+tab+scroll wheel = crazy delicious
December 5th, 2006
I usually hit cmd+tab and then mouse over the app icon i’m looking for and let go to switch to that app; it’s faster than cmd+tab+tab+(repeat for every app open). I randomly (read: accidentally) scrolled with the mouse while while doing this once, and surprisingly, it scrolled through the app icons.
I had no idea it would work like this, nor have I read any thing that hinted to that behavior, but it seems really handy for people with multiple displays who like to use the cmd+tab/mouse app switch combo.
How do YOU switch? How does YOUR productivity workflow look? And finally, does anyone even use that “crazy delicious” formula meme anymore?