Jason Vertucio

You know me! ™

Daily Regex: Google Analytics Tracking IDs

This won’t be a daily thing. But I just put together a quick Google Analytics Tracking ID for one of the apps I’m putting together. You know, to make sure you enter the correct one. It’s super easy.

function isGoogleAnalyticsTrackingId(id) {
var pattern = /^UA-\d{2,}-\d{1,2}$/;
return pattern.test(id);

Now, I’m sure you, astute readers, will be able to pick apart any errors in this. So, have at it!

Another reason why I hate Android

Screen Shot 2013-09-16 at 14.20.20

I’m sitting here at work wondering why this Mobile Framework that I’m developing works flawlessly on my iOS Simulator and on my iPhones and iPad, but literally doesn’t even have my stylesheets on Android.

Turns out—ready for this?

Turns out that I stash my framework in a folder called _framework. And you’ll never guess which folder of files wasn’t reading!

Seriously. Everyone goes on and on about how Android is better than the mobile Apple OS.

  1. I hate programming for every splintered version out there (over 30% are still running such an obsolete, two versions ago version of Android)
  2. I hate that I literally wasted three hours trying to figure out that when I renamed _framework to framework everything worked fine! IT DIDN’T WORK BECAUSE OF A STUPID UNDERSCORE. AND NOW IT WORKS.
  3. Actually, that’s a lie. Because now I’m getting errors with DOM elements not being found, even though there they are in my Chrome Desktop environment, and also on all the iOS devices!!!!!!!


iOS, I love you. I love you because you take the time to be as stable as possible. You run on, at most, six different devices.  And people don’t say of you, “Just don’t upgrade the OS.” And I love you because when I program something for you, I don’t have to worry about you not working.

For all interested, once I’ve had a successful deployment of this MOB Framework, I will release it. Maybe you’ll try it out. Maybe you’ll love it.

I build a little demo of the Instagram API

I’m learning how to use the Instagram API. Originally I signed up to use it so I can see if I could just mass-delete all my photos. By the way, I can’t. And now it doesn’t matter so much.

Oh, in case you missed it, they changed their ToS back to the version where they won’t have the right to use your photos with no compensation back to you. So, since they fixed that, I’m staying.

I put together a quick demo of the API. The only demo I have is one that goes through all of your followers and everyone you follow, and puts everyone onto a single screen where you can see if a user follows you or not, and likewise for your relationship with them.

If you want to see it, you can find the demo at jasonvertucio.com/demo/instagram_api. And if you try it out, let me know what you think in the comments below. If you find a problem, post it so I know what I need to work on to get it running.

What’s the best environment for developing websites?

I used to use Dreamweaver. Made it up to CS5.5 thanks to various jobs and stuff. At my current job they have Dreamweaver CS5.5, but lately I’ve been using my Mac for other projects, like at home and stuff.  I use Coda, because it has built-in FTP and it’s easy to use. I wish I could install it on my computer at work, but they seem to not allow installing software.

And, well, that’s for the best.

Anyway, inspired by this post on LinkedIn, I decided to ask you, the readers to this little blog, what your opinion is on the matter. I actually set up a poll on the right to answer. So, I’ll just sit back and await the responses.

If you answer OTHER, please add a comment below or write me on Twitter (@jayv and follow me coz I recently went private). I’ll add the option and let you know so you can change your vote. The plug-in I use (UPM)  doesn’t allow one to add poll answers.

Foundation Framework

For the past day or so I’ve been staring at Foundation. It’s a Framework that claims to be responsive and has a lot of great little UI and layout things prepared for you. Also has two cool plugins built-in, Orbit and Reveal (an image slider and modal window, respectively).

So far, pretty cool. I want a reason to use this thing, it looks pretty awesome. I’ve been meaning to change up one of my websites for a while now. Maybe I’ll base it off Foundation.

In other news, I wish Kat Dennings would continue writing in her blog. Either that or I missed a memo where she moved?

SendMail Class (PHP Programming)

In case you’re one of those people who doesn’t care about . . . you know . . . web programming . . . . here’s a fun picture of how we all feel about the new Total Recall film.

For all the rest of you . . . I created a little PHP class that I’d been using for about three years, and updating on and off during that period. It’s simply called SendMail (although for some reason I called the class tofSendMail, which I’ll fix in the next release), and it was developed to easily handle the creation and sending of emails.

For the first public release, I have given you simple features such as the obvious:

  • To, From, Subject
  • CC, BCC
  • HTML and Text versions
  • Sending via PHP’s built-in mail function
And of course:
  • Attaching a file
  • Loading and parsing a text file to send

It’s nothing spectacular, but I decided to release it under the GPL license. I wanted to make it public because I don’t know what else to do with it. I figure you guys can point me in the right direction. It’s currently functional, so you could use it in a live site today. Actually, I may plan to use it on a project I have coming to me this weekend.

If you end up using the PHP class, please let me know. If you want to fork and contribute, definitely let me know. And if you find any bugs or want to see any other features in it, it is compulsory that I know. Also, this is the first time I’m ever using GitHub. If this repo is a rousing success I’ll drop in some other bits of PHP that I had written in the past for everyone to enjoy.


How to fix Password-protected directories on a WordPress blog

Here’s something I’d been struggling with for the better half of the day. I’ve been trying to get my server to password-protect a directory, since one of the Confidentiality rules I have to follow includes not posting work publicly. And yet, the only way I can do some of the work is by putting it on a public web server. Sorry. You don’t need to know that. You just need to know what happens and how to fix it. Well, here we go.
Continue reading “How to fix Password-protected directories on a WordPress blog” »