I noticed a while back that Google has implemented a Captcha test for Gmail logins if you fail your login attempt a few times repeatedly (seen below). I must be honest, I think this is a great idea: Regular users are inconvenienced (by the task of typing in the contents of a box) a small percent of the time, while attackers attempting to brute force a password will encounter the test a majority of the time. This is the kind of security trade off we should be eager to make.




P.S. I've noticed that certain actions (like changing your username, rather than just different passwords) seem to make this happen sooner. Weird.


I've got this nifty, though horribly overpriced, service on my cellphone. If I need to find out what a song that I'm listening to (on the radio, in a club, on tv whatever) I can dial #DJ, hold the phone up and within a minute or two I will get a text message with the artist and song title.


iTunes should hop on this bandwagon with a 1-800 number you can call that does essentially the same thing, only tied in with your iTunes account, so it's a one click process when you get home to buy the song on iTunes. Preferably the process would be cheap/free if you decided to buy the song on iTunes. The use cases seem to make a lot more sense than the ones associated with paying $2 for a crappy ringtone.


As part of trying to take better part of myself this year (unrelated to those new year resolutions things, I just think that after the myriad of health issues (which, the interested should note, have all turned out to be nothing, I'm healthy) I had last year I should really start doing a better job of taking care of myself), and apart from all the usual things like getting more exercise and eating better, I'm also trying to take better care of my teeth. They’re in decent shape, but I should really be brushing more often, and, according to four out of five dentists (the last guy is either a dick, or doesn't accept bribes from the expensive string industry), flossing.


I'm not really sure I understand the entire concept of flossing. Every year (or many years for some of us) we head on over to the dentist, where the dental hygienist pokes, prods, and scrapes your gums for twenty minutes with implements that look like scale replicas of 18th century torture devices. Then, low and behold, when your gums bleed, they blame it on your lack of flossing. Somehow, putting string in my mouth will give my gums the magical power to resist damage when struck by needle sharp surgical stainless steel. I'm not buying it. Unless there's Kevlar on that floss, that somehow releases from the string and bonds to my gums to create a bullet proof (and more important, sharp metal stick proof) barrier, I don't see that plan working. Maybe it's just me.


The other thing they say the flossing will help is the 'pockets' my gums have. Apparently there are these pockets around your teeth where the gums aren't actually attached to the tooth. Somehow, through some branch of physics I don't yet comprehend, shoving something up into these pockets (namely string) on a daily basis is going to make them... get this: smaller! In my experience pushing something on a daily basis makes it bigger, not smaller, but who am I to talk. Maybe the fifth dentist agrees with me, but he doesn't get kickbacks and high paying commercial gigs, so no one ever hears from him.


Anyways, I'm not really sure I know how to floss. Sure, the (cute) dental hygienist asked me if I knew how to floss last time I was in there, but she was pointing something shiny and sharp at me at the time, so I got the impression there was only one right answer, and dutifully nodded. I'm good at flossing the front few teeth, on the top, on the left side. But other than that it's not going to well. Somehow as I get further and further back (or, God forbid, try the bottom) things get all tangled up, and I forget which way I'm supposed to be going. Then, after either strangling myself, or somehow tying my fingers to my molars (which makes typing a lot harder by the way), I give up, and presume that dental hygienists are just S&M addicts with day jobs.


...we buy stickers


When you go to the store and buy software, it comes in a fancy little box, with lots of manuals, complicated registration schemes, and a couple of CDs. This is all essentially worthless. The only thing there worth anything is the little sticker either on the CD, a small separate card, or the back of a manual. If you lose that sticker, those CDs are now coasters since you can't get it back.


I've helped several people I know well in the past who have lost that sticker, and for one reason or another need to re-install that software. We looked high and low, but to no avail, it was no where to be found. What they did next depended primarily on their fiscal resources. A few dutifully went to the store, and purchased a second identical copy of the software, and vowed not to lose the sticker. The rest looked at me with a lost expression, and I located a serial number via one of the nearly infinite methods the Internet presents.


I have no ethical problems with this, even though I 'went legit' a couple years ago.


They bought the software, I can see the fancy CDs, the books, and in some cases the existing version sitting right there on their hard drive. They everything but the sticker. So using the magical powers of the internet I find out what valid cd-key/product-key/license-key is, enter it in, and all is well.


Whatever method the person chooses, I don't really think it's fair: If they buy the software again they paid twice for a package they're only using once. If they use a key from an illegitimate source there's always the chance that they will get screwed over down the road when some update/patch etc. doesn't work. A few of my friends have called the appropriate company explaining the situation, and the answer has been universal "You're screwed, send us money and we will give you a new one, while I have you on the line would you also like to buy these other fine products".


What's a techie to do?


A bunch of people I know posted wish lists before Christmas, generally in hopes of receiving a few of those items in the season. Often the lists were via Amazon or some other major online merchant.


I have a wish-list, though it's a bit different (besides being late). These are all smallish software programs that would make my life a lot easier, if I just had them (or if they existed). If you know of anything that accomplishes these, please post a comment with some linkage :-). It's like a free Christmas in January present!

  1. Html Entity Replacer


    I do a lot of stuff for the web, often mixing code with content I want displayed as is. As such, it would be great if I had a little TSR for windows that would let me select text with the mouse, and hit some keyboard shortcut, it would then magically do all the HTML Entity Replacements in place (see php's html entities function for an example of what I want)

  2. Local folder to server magic


    A lot of people I know are either behind some crazy firewall or using some not quite compliant IM program, so in order to send them a file I generally upload it to my web server. I want a folder on my desktop, I just drag files into it, then they are magically (preferably transparently) uploaded to my server via SFTP. It should sync on startup, request, or when new files are added locally. I have Subversion, I know about CVS, I want something really easy without any effort on my part, I also don't require the advance functionality they provide.

  3. Digital Egg Timer


    A dead easy timer, let me set an alarm for like 10, 20, 45 minutes whatever. I should be able to set a timer and dismiss the app in less than 10 seconds

  4. IM smiley to real letters replacement


    I code, my friends code, we send each other code via IM, it's freaking annoying trying to read code when it's interspersed with smiley faces, frowns, angry faces and crying babies. When I highlight emoticons, they should just magically turn back into regular characters again.

  5. Master log collator/reader


    I use three different IM clients on two computers, I'm willing to do the work to get the logs centrally accessible if I can have one central app to read them. I use Trillian, MSN & AIM, or some combination thereof on my desktop and laptop, the app should be able to combine the logs by timestamp, then let me look/search/whatever to my hearts content.


Outside the past eight weeks I don't think I've made a real trip to the doctor in at least four years. Then, towards the end of November my body basically started falling apart. This has finally come to a head, and I must spend two days with various self-adhesive pads taped to my chest in a configuration scientifically designed to be as uncomfortable as possible. Hopefully the fact that I've been unable to eat a full meal so far this year won't hinder my eye clearing up.


I'm working on a pet project that I'm tentatively calling 'Iterate This', for it I need to do some semblance of a diff. Hitting up php.net looking for a diff tool I come across xdiff_string_diff. As it turns out, this is only available via a pecl extension. No Fear! The xdiff page informs me that I can install xdiff by using the pear installer, easy as pie!
pear -v install xdiff

Not quite so easy, I get an error, I need libxdiff first, I dutifully Google it, download and install it, then run the pear command again. Success! Not quite, the install finished, but it doesn't appear in PHP. I first need to move the xdiff.so file somewhere convenient (probably within the directory specified by extension_dir in php.ini), then add extension=xdiff.so to php.ini, and restart apache.


So in the end the steps were something like this:

1. Resolve dependencies for the package you are installing

2. Install package via pear

3. Move the created .so file to the directory specified by the extension_dir directive in php.ini

4. Edit php.ini, add in the extension= in the appropriate section

5. Restart apache

6. Check phpinfo()'s output for your extension

7. ..

8. Profit!


Pretty simple, but a tad confusing if it's your first time.


I use webalizer to handle my webstats, it was relatively easy to install (though I never figured out how to do the reverse ip/geo locate stuff) and I ran across a simple shell script that makes it easy to generate stats for all the various domains I host:


#!/bin/bash

for i in /etc/webalizer/*.conf; do /usr/local/bin/webalizer -c $i; done


In the appropriate directory I just have a short conf file for every domain:


LogFile /etc/httpd/logs/preinheimer_access_log

OutputDir /www/admin.example.com/webalizer/www.preinheimer.com

HistoryName webalizer.hist

ReportTitle Usage Statistics for www.preinheimer.com

HostName www.preinheimer.com


A problem came up when a friend expressed desire in having a few additions to the basic logging. Asking Webalizer to add those stats was easy the problem came up with the detailed information on referrer and the like. It appears that the font size=-1 tag is hard coded. To get around that I added some CSS via one of the tags I could edit (HTMLHead), which fixed it, in a few browsers. Unfortunately, since webalizer is apparently creating invalid HTML, your mileage would vary. If I fixed the HTML (to be valid) things worked well, I just needed to automate that process.


I ended up setting Tidy up to run every night fixing the webalizer html right after webalizer creates it. It's an ugly hack, there's going to be a minute or two window between the HTML being updated and Tidy fixing it, but it works.


I ended up with conf files that look like this


LogFile /etc/httpd/logs/preinheimer_access_log

OutputDir /www/admin.example.com/webalizer/www.preinheimer.com

HistoryName webalizer.hist

ReportTitle Usage Statistics for www.preinheimer.com

HostName www.preinheimer.com

PageType htm*

PageType cgi

PageType php

PageType php*

HideReferrer preinheimer.com/

AllReferrers yes

AllSites yes

AllURLs yes

AllAgents yes

AllSearchStr yes

AllUsers yes

HTMLHead <META NAME="author" CONTENT="The Webalizer">

HTMLHead <style type="text/css">

HTMLHead pre {font-size: 14px;}

HTMLHead table {margin-left:auto; margin-right:auto;}

HTMLHead </style>


and a nightly script that looks like this:


#!/bin/bash

for i in /etc/webalizer/*.conf; do /usr/local/bin/webalizer -c $i; done

for i in `\ls /www/admin.example.com/webalizer/`; do cd /www/admin.example.com/webalizer/$i; /usr/local/bin/tidy -iqmc -wrap 200 *.html; done




By the way, Tidy is the bomb.

Hi, I’m Paul Reinheimer, a developer working on the web.

I co-founded WonderProxy which provides access to over 200 proxies around the world to enable testing of geoip sensitive applications. We've since expanded to offer more granular tooling through Where's it Up

My hobbies are cycling, photography, travel, and engaging Allison Moore in intelligent discourse. I frequently write about PHP and other related technologies.

Search