Grab your access token, update run.rb, then run this command:
$ ruby run.rb
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" creator="Oregon 400t" version="1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd">
<metadata>
<link href="http://www.foursquare.com">
<text>Foursquare Checkins</text>
</link>
<time>2013-01-01T22:00:37-05:00</time>
</metadata>
<trk>
<name>Four Points by Sheraton Mississauga Meadowvale</name>
<trkseg>
<trkpt lat="43.60141615721874" lon="-79.7555046835973">
<time>2012-11-01T17:24:18-04:00</time>
</trkpt>
</trkseg>
</trk>
<trk>
<name>InterContinental Hotel</name>
<trkseg>
<trkpt lat="40.75850533742767" lon="-73.98914337158203">
<time>2012-10-28T18:09:30-04:00</time>
</trkpt>
</trkseg>
</trk>
</gpx>
To save this just pipe the output to a file:
$ ruby run.rb > foursquare.gpx
That will save the XML content in the file, or you can miss out the second half to get a preview.
If like me you are a massive Fog of World geek then just set up Dropbox imports on the iPhone application and share like this:
$ ruby run.rb > ~/Dropbox/Apps/Fog\ of\ World/GPX/foursquare.gpx