2LeggedSpider

links for 2009-12-21

Posted in Daily Links by Sumit Thomas on December 21, 2009

Another URL Shortener and it is from Google

Posted in google, technology by Sumit Thomas on December 18, 2009

[tweetmeme style=”compact”]Twitter has opened the way for a new stream of online service – URL Shortening! and cousin, the business is booming! 🙂

Goo.gl is Google’s version of URL Shortening service. Unlike its counterpart tinyurl.com or bit.ly, Goo.gl is not a stand alone tool to generate short URLs. For now, the only way you can shorten a URL using Goo.gl is by using the Google Toolbar or if you have a Feedburner account, integrate your Feedburner feeds with your Twitter account.

If you are a Google Chrome user, you can install this extension which lets you use Goo.gl without the toolbar. But it works only in the Google Chrome Beta version though.

Facebook has its own URL Shortener as well fb.me. I am not sure when it started but I’ve seen couple of tweets with fb.me URL. It will be very interesting to know the long term objective of Google and FB and what it will do to the existing players.

Tagged with: , ,

Enabling jQuery Intellisense in VS 2008

Posted in jquery by Sumit Thomas on December 18, 2009

[tweetmeme style=”compact”]This post is for all my friends who still don’t have jQuery intellisense enabled in their VS 2008. This came as a shock to my when one my colleagues asked me how come your VS has jQuery intellisense and mine does not?

So here is how you get it….

1) Download and install VS 2008 SP1 from here

2) Download and install the VS 2008 Patch from here. This patch helps VS 2008 check for -vsdoc.js files when a JavaScript file is in use and drive the JS intellisense engine.

VSDOC.js

jquery-1.3.2-vsdoc.js file is available in the Scripts folder of your ASP.NET MVC Web Application by default. If you don’t find it there then download it from here

That should do it!

Tagged with: , ,

Generating a Shorter URL using bit.ly API and jQuery

Posted in AJAX, jquery by Sumit Thomas on December 18, 2009

[tweetmeme style=”compact”]Here is a simple jQuery script to generate shorter URL using the bit.ly API.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>URL Shortening</title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

    <script type="text/javascript">
        $(document).ready(function() {
            $("#btnShort").click(function() {
                var longUrl = $("#longUrl").val();
                var shortUrl = $("#shortUrl");
                shortUrl.html("Loading...");
                var params = {
                    version: "2.0.1",
                    longUrl: longUrl,
                    login: "bitlyapidemo",
                    apiKey: "R_0da49e0a9118ff35f52f629d2d71bf07"
                };
 
                $.getJSON("http://api.bit.ly/shorten",
                { version: params.version, longUrl: params.longUrl, login: params.login, apiKey: params.apiKey },
                function(data) {
                    shortUrl.html(data.results[longUrl].shortUrl);
                });
            });
        });
 
    </script>

</head>
<body>
    <input type="text" id="longUrl" /><input type="button" id="btnShort" value="Shorten!" />
    <br />
    <div id="shortUrl" />
</body>
</html>

URL Shortening

You can go through the bit.ly API documentation and try out the remaining methods as well.

Tagged with: , ,

Son of a geek!!!

Posted in Offbeat by Sumit Thomas on December 17, 2009

[tweetmeme style=”compact”]If you ever wondered what happens when geeks have kids, here is a video to tell you all about it. Here is Nikhil, son of my good friend RK who is playing with his dad’s iPhone. Now to tell you a bit about RK…he worships Steve Jobs and anything that has an Apple logo. Nikhil is surely following daddy footsteps. Talk about spoiling kids with technology! 😉

Tagged with: ,

Retweet button for your WordPress.com blog

Posted in Tips by Sumit Thomas on December 17, 2009

[tweetmeme style=”compact”]Wordpress.com blogs does not allow you to add plugins so here is a simple way to add Retweet buttons to your blog posts.


<a href="http://api.tweetmeme.com/share?url=[Your Blog post's URL]&service=[URL Shortening service]"><img align="left" style="border-style:none;" src="http://api.tweetmeme.com/imagebutton.gif?url=[Your Blog post's URL]&service=[URL Shortening service]" alt="" width="51" height="61" /></a>

You will get a nice button like this Retweet

align=”left” will left align the button in your paragraph.

style=”border-style:none;” removes the border around the retweet button that may be applied in some WordPress.com blog themes.

service=[URL Shortening service] is optional but I would recommend it. URL Shortening service will generate a shorter url that fits well in the twitter textbox. You can use URL Shorteners such as bit.ly, tinyurl.com etc.

Update!

There is a better way!