Since a month or so we're lending money through Kiva. Kiva's mission is to connect people through lending for the sake of alleviating poverty. Kiva is the world's first person-to-person micro-lending website, empowering individuals to lend to unique entrepreneurs around the globe. (Check it out).
After deciding to participate the next question was, what type of loans do we want to support? We came up with some simple criteria (Education and Health sectors) and searched for loans that matched these criteria using the Kiva Lend page. Unfortunately no loans matched our criteria. So I subscribed to the RSS feed that's available using Google Reader assuming loans matching our criteria would pop up in Google Reader on a regular basis. But....almost no loans popped up and if the did appear in Google Reader, by the time I noticed it the loan was already fulfilled by other lenders at Kiva (which is good of course!).
This last observation led to some further investigation and by checking Kiva Lend page for loans with status "Paying back" and sector "Education" I noticed that several loans did start recently but did not show up in Google Reader. Probably caused by the fact that Google Reader is not checking the RSS feed frequently enough and, by the time it is checking the RSS feed, the loan is already fulfilled and removed from the feed. Also, I'm not really on-top of my RSS feed all day so if a loan request did appear in the feed, by the time I notice it, it was already fulfilled.
So, I need another way to spot loans that meet our criteria. A more real-time notification kind of service. I googled a bit and was not able to find such a service, but did find the Kiva API documentation. Using the API it is possible to create a simple service that would frequently check Kiva for new loans that match our criteria and notify me via Twitter Direct Message. (Twitter notifications pop up on my Mac or iPhone immediately). This way I get notified shortly after the loan request is submitted to Kiva and can immediately check if it's a loan we would want to support.
To make it a learning experience for myself I decided to use Scala as the language and created a little program that does just what I want (see example screenshot on the right). So now I get notified when a new loan is submitted to Kiva that meets our criteria and I can immediately check it out and act on it.
Let me know what you think of this. If more people are interested I'll put a bit more effort into it and make it available for others to also use this service.
About a year ago I had some fun integrating Google Maps into the JAlbum Chameleon skin. Recently a couple of comments had been added to this blog post suggesting some improvements, so I sat down again, tried to remember how this worked and realized a couple of improvements. IMHO this solution could now easily be integrated into the standard JAlbum Chameleon skin.
What's improved?
- For album directories that contain multiple index pages, the Google Map on each index page now shows the images for that index page. Previously only the first index page contained a working Google Map and it included pinpoints for all index pages.
- The old version used an iframe to plug the Google Map into the JAlbum pages. This is no longer necessary because you can now use your Google Maps API key for a complete web domain (no longer bound to a specific directory). This now makes to generate all that is needed from JAlbum itself, no need to use an extra HTML file for the iframe that you had to manually put on your server.
If you'd want to use this Google Maps integration then:
- Get yourself a Google Maps API key. (Just specify the domainname and not the subdirectory where your webalbum is hosted.
- Download the slide.htt and index.htt files and place them in JAlbum/skins/Chameleon directory (make of backup if the originals).
- Specify the following user setting in Settings/Advanced/User Variables:
# The root where the webalbum will be hosted
skin.webroot=/your/webalbum/root# The Google MAP API key that you've have created for your site (see step 1)
googleMapsAPIKey=
- make them work in regular RSS readers like GoogleReader and NetNewsWire, and
- ensure that items in sub folders are included in the main feed
I recently turned on Google Sync for the iPhone to enable wireless syncing of my Google calendar and contacts with my iPhone. A limitation of the current version of Google Sync for the iPhone is that it only supports 5 Calendars. I've got more than 5 Calendars in Google Calendar so that's a problem. Fortunately, many of these Calendars are read only (e.g. public/school holidays, your favorite teams game schedule, etc.) and by combining multiple read-only calendars into 1 read-only calendar it is possible to get them all sync-ed between Google Calendar and you're iPhone.
Of course you can manually download the .ics files of the individual calendars and then import the combined .ics file into Google Calendar, but wouldn't it be nice is this is automated? Do do that I created a shell script that:
- downloads individual calendar .ics files. The URLs of these calendars are stored in a text file.
- kicks of the merge-ics python script to combine the .ics files
In addition I'm hosting that combined .ics file on my webserver, subscribed to it from Google Calendar and scheduled the script to run on a daily basis. So now I'm able to sync these read only calendars to my iPhone without further manual intervention.
Below are the shell script and an example text file contains the calendars to be merged. If you'd want to use it, make sure you update the variables at the beginning of the script and also update the variables in the merge-ics.py Python script. Needless to say that you'll need to download and install that script form the merge-ics site.
# Script takes one argument: filename containing the URLs of the
# Calendar .ics files to be downloaded.
TARGET_ICS_DIR=/var/tmp/merge_ics
TEMP_ICS_FILE=/tmp/temp.ics
MERGE_ICS_SCRIPT=/opt/merge_ics-1.6/merge_ics.py
ICALSFILE=$1
# Get new copies of the ICAL files
for url in `cat ${ICALSFILE}` ; do
# Only successfuly downloaded files are copied to
# ${TARGET_ICS_DIR} to be able to deal with temporarily
# unavailability of a calendar.
rm -f ${TEMP_ICS_FILE}
wget -q -O ${TEMP_ICS_FILE} ${url}
if [ $? -eq 0 ]; then
cp ${TEMP_ICS_FILE} ${TARGET_ICS_DIR}/`basename ${url}`
else
echo "Calendar ${url} could not be retrieved"
fi
done
# Run the merge_ics script
python ${MERGE_ICS_SCRIPT}
Example text file with input:
www.markthisdate.com/calendar/Schoolvakanties_2008_2009_Regio_Midden_Basisonderwijs_Speciaal_onderwijs_2533.ics
www.markthisdate.com/calendar/Vrije_dagen___feestdagen_Nederland_2007___2009_2067.ics