Tags: tool

Linux: Get size of sub-directores in current directory

Edit: Now that I’m more familiar with the Linux command line, I realize that I was trying to reinvent the wheel. I don’t know if I missed this part of the du manpage or what, but the functionality I was looking for is baked in:

du -hd 1

The h flag is for “human-readable format”, and d 1 tells the program to go “no deeper than 1 level from the given folder”. (With no folder specified, the current directory is used.)


The following string of commands can be used to not only list the immediate sub-directories of the current directory, but also print their size in human-readable format (kilobytes):

du -sh `ls -l | grep '^d' | awk '{print $9}'`

Here’s how it works: Read More →

Photobucket thumbnail bookmarklet

I’ve built a pretty simple little utility for turning the URL of an image hosted on Photobucket into a thumbnail which links to the full-sized image. I’ve designed one version for building bbCode (forum) mark-up, and one for building a basic HTML thumbnail link. Save the links below to use them:

bbCode Thumbnailer
HTML Thumbnailer

Have a look at the code yourself: Read More →

View live page source with Javascript

Have you ever been working on an AJAX-enabled webpage, or a page with complex redirects and permissions, and tried to view its source? What you wind up getting generally looks nothing like the current state of the page in question. You are viewing its initial state, since the browser loads a fresh copy for the source view. That’s just fine if everything you need to check was all set up and ready to go when the page was initially loaded; but that is rarely the case with AJAX. Read More →