PHP Bandsintown Library Release
Hot of the heals of the application launch of tourmappr, I've decided to release the custom PHP Library that I built to connect to Bandsintown's API services. The PHP library is very straight forward - however is currently in alpha - so it might have some bugs. I've tested with their 4 main API functions - Event Search, Artist Search, Artist Info, and Event Recommendations - and they work flawless.
So if you want to build your own awesome application with Bandsintown - head over to the project home - and download it now! All the documentation is listed in the Wiki pages. If you run into any issues - I ask that you put them in the issue tracker within the project home.
Launch of @tourmappr!
iPadless

Love What You Do
I've been watching a lot of TV lately, because of the football playoffs, and time and time again, I've seen these Blackberry commercials, featuring random people dancing and signing - with the catchy song by the Beatles "Love is all you You Need". If you haven't seen it - here's an example:
Introducing: shrtcuts.org
There was a time when you wanted to figure out how to something better. Usually that involved you searching through numerous Google sites to find out the shortcut to do a certain activity on your keyboard. It took time and when you finally found it - it didn't work. Introducing shrtcuts.org - a nice easy way to learn new and helpful shortcuts that will help you do things better. If you have a shortcut that you want us to write about - send us a message @shrtcuts. Enjoy!
Early Christmas Present - Javascript Relative Time
So today - instead of shopping and getting in the holiday sprit - I coded. Why? Well because its fun. I ran into an issue that I though I would share. Currently - I'm working a social networking site than run their own home grown Twitter Application. I wanted it to be in a real time - and adjust the timestamps as it performs an AJAX call to see if there any new messages.
// usage
var rel = relativeTime("Thu, 24 Dec 2009 09:45:33 -0800");
// returns
"One Hour Ago"
// code
function relativeTime(pastTime)
{
var origStamp = Date.parse(pastTime);
var cDate = new Date();
var currentStamp = cDate.getTime();
var difference = parseInt((currentStamp - origStamp)/1000);
if(difference < 0) return false;
if(difference <= 5) return "Just now";
if(difference <= 20) return "Just Seconds ago";
if(difference <= 60) return "A minute ago";
if(difference < 3600) return parseInt(difference/60)+" minutes ago";
if(difference <= 1.5*3600) return "One hour ago";
if(difference < 23.5*3600) return Math.round(difference/3600)+" hours ago";
if(difference < 1.5*24*3600) return "One day ago";
var days = difference / (1.5*24*3600);
if (days <= 10)
{
return Math.round(days) + " days ago";
}
else
{
var dateArr = pastTime.split(' ');
var t = dateArr[4].split(":");
var time_format = "";
if (parseInt(t[0]) > 12)
{
var a = parseInt(t) - 12
time_format = dateArr[2] + " " + dateArr[1] + " " + a + ":" + t[1] + " PM";
}
else
{
var first = "";
if (t[0].substring(0, 1) == "0")
{
first = t[0].substring(1, 2);
}
else
{
first = t[0];
}
time_format = dateArr[2] + " " + dateArr[1] + " " + first + ":" + t[1] + " AM";
}
return time_format;
}
}
Launching of greg.in
So the past couple of days - I've been pretty bored - so I decided to create a stupid website. Something that was so dumb - that no one would use it. Well - today, I launch that service - greg.in. It's not really a service per say - but more like fun productivity decreases.
The site is called greg.in - and it basically puts my picture into anything you can imagine.Like i said - its pretty simple and stupid - but it hella fun making it. Go ahead and try it and search your favorite topic and see what happens!
I hope you enjoy. Feel free to leave a comment or catch me on twitter, @gregavola, and leave some feedback.
- Greg









0 Comments