This is Lupo Montero's homepage - A personal blog where I post about my adventures in web technology

Recent posts

Parsing domain names in node.js and the browser

Parsing domain names in a useful way is a bitch. Top level domains have lots of exceptions and weird rules that are imposible to reflect in a sensible regular expression. The only reliable way of approaching this is using a regularly updated list of all known public suffixes and their basic rules. Thankfully, the Mozilla […]

Running nodejs 0.8.x (or any other version) on OpenShift

This week I had a quick look at Red Hat’s OpenShift platform. After a very good first impression I decided to create a sort of “hello world” node app to see the gears in motion. So I look around…. cartdriges… and voila! There it is, nodejs… but its 0.6… hmmm… scroll down a bit more… […]

jQuery plugin to fetch tweets using the Twitter JSON API

Over a year ago I posted a script showing how you could fetch tweets using jQuery and Twitter’s JSON API, and to my surprise it has had a decent amount of traffic. So now that I’ve been learning more JavaScript and jQuery I decided to re-write the script as a jQuery plugin. The plugin allows […]

Building a town/country picker using Google’s Geocoding API and jQuery

I’m currently working on a new “social” site for a startup and when building some of the forms, one of the bits of information we need to collect from users is their country and town or city. Nothing really new, but I didn’t want to build an enormous dropdown with every country in the world […]

Installing PHP’s OAuth PECL extension on Mac OS X Snow Leopard

I recently reinstalled the operating system on my Macbook and this time around I decided to use homebrew to manage packages. Since php comes pre-installed with OS X and homebrew encourages using the pre-installed binaries, I have been using the built-in install of php, and so far so good. But today I tried to install […]

Writing Node.js modules in C++

Today I found myself looking at how to write node.js modules in C++. I read @izs’s article on the How to Node website and felt tempted to explore the C++ route, being already familiar with their JavaScript counterparts. I am no C++ expert, in fact I’m quite a noobie, but I have read a lot […]

Using JavaScript closures to create private scopes

One of the best known problems in JavaScript is it’s dependance on a global scope, which basically means that any variables you declare outside of a function live in the same name space: the ominous window object. Because of the nature of web pages, many scripts from differnt sources can (and will) run on the […]

PHP 5.2.10 and PEAR – Notice: Undefined variable: dorest in PEAR/Command/Install.php on line 1220

Today, after upgrading packages with apt-get on a server running Debian Lenny my PEAR installation seemed to be broken. PHP had been updated to 5.2.10 and PEAR version was now 1.8.0. So when I realised that PEAR wasn’t the latest stable I tried upgrading PEAR using the command I’ve always used: pear upgrade pear, where […]

Screencast: Fetching tweets with jQuery and the Twitter JSON API

A very brief (5min) screencast based on the code used in my previous post “Fetching tweets with jQuery and the Twitter JSON API“. This screencast was made with screenr, so I was limited to 5min in length and no editing of the video…

Setting up a web server with Apache 2.2.x and PHP 5.2.x with extensions, PEAR, MySQL 5.x and pdo_mysql on FreeBSD 7 step by step tutorial

This quick tutorial will show you how to set up a FreeBSD machine (based on minimal install) to run as a web server using Apache 2.2.x, PHP 5 and MySQL 5. This tutorial is based on FreeBSD 7.2 (the current stable release at the time of this writing). This tutorial builds on the minimal installation […]