How to insert tabs in a textarea

I’ve always found it annoying that tabs don’t, well, tab in textareas on HTML pages. To be fair, they do what they’re supposed to and move on to the next field. But for a web app I’m working on I needed a way for the tab key to insert a tab.

addthis_url [...]

rm * - Argument list too long

Going through and cleaning out a temporary folder I came across a problem using rm *. It came back with the error Argument list too long. Turns out it’s some type of limit in how many files can be passed and the 110,000 that were in the folder was too many.
So I wrote [...]

Generating element IDs with JavaScript and counters

The code that I posted in my previous post on creating a unique ID in JavaScript is fairly similar to code that’s all over the internet and seemed like it should work. And to be fair, it did work, although with one major problem. If the code runs too quickly it’s possible for [...]

How to generate a unique id in JavaScript

PHP makes it pretty easy to generate a unique it with the uniqid() command. JavaScript doesn’t have that command, but using the getTime() function of the Date object we can do almost the same thing.
PLAIN TEXT
JavaScript:

function uniqid()

    {

    var newDate = new Date;

    return newDate.getTime();

    }

The function returns [...]

Using $_GET and $_POST together

I find myself writing PHP scripts to do backend Ajax work.  One of the problems I often come up against is that I need to be able to call the same script either using a query string and pulling the variables from $_GET or via a form and calling the variables from $_POST.  I usually [...]