Posts

Using YQL servers as proxy to load resources cross domain

To load a HTML5 file from another domain use this  query . select * from html where url="https://www.yahoo.com/" and compat="html5" and xpath='*' This will return the whole HTML page in the results tag of the generated XML. If you want to use JSONP just add a "callback=[funcName]" query parameter in the end and instead of an XML a JSON will be sent out. Here is an  example  of how it will be sent out. I am using callback function as "test". Depending on which framework or library you are using you will need to set it accordingly. Also the YQL servers support CORS so it won't be that difficult if you do a direct XHR to get the file instead of using script tags for JSONP. I also tested it using text files and they can also be downloaded using this method. If you want other types of resources which are less than 25KB you can use another YQL query to get the results. select * from data.uri where url="http://l.yimg.com/a/i/u...

Using CONNECT method on a http proxy using telnet

The simplest way to connect to an external server using a proxyserver. C:\Work>telnet proxyserver 8080 Trying 192.168.1.20... Connected to proxyserver. Escape character is '^]'. CONNECT irc.freenode.org:6667 HTTP/1.1 HTTP/1.1 200 Connection established :kornbluth.freenode.net NOTICE * :*** Looking up your hostname... :kornbluth.freenode.net NOTICE * :*** Checking Ident :kornbluth.freenode.net NOTICE * :*** Found your hostname :kornbluth.freenode.net NOTICE * :*** No Ident response In this case we are connecting to a proxyserver on port 8080. After that we open a http tunnel to irc.freenode.org on port 6667. Then you need to press enter twice to establish the connection. After that you have an open socket and you can send the commands accordingly based on the protocol being used. Here we connect to an IRC server. We could do the same thing by connecting to a HTTP server. You can apply the logic by opening a socket to the proxy server and then sending and receiving ...

The best tool for clipping backgrounds

Been using this amazing tool to clip backgrounds which otherwise is a real pain to do in most other software. Really like the simplicity of the application. Visit   http://clippingmagic.com to see it in action. Only 4 steps after that. Upload photo Select background Select object to extract  Wait for magic and you are done.

Recharge Airtel prepaid STV online

http://www.airtel.in/mobile/prepaid/recharge-online

2012 in a nutshell

This year has been relaxed (lack of a better word) to say the least. Did nothing much besides work. For once in many years I did not work or passionately work on any personal project. The list of personal projects is still there but have not been able to find the right structure to get it done. And for once I really enjoyed being lazy at home. Hopefully I have had enough rest and get something going in 2013 as far as personal projects are concerned. There is the next version of pics.fefoo, fefoo.com and the windows based twitter client which has been languishing in the dark for the last 3 years now. Not sure if it will ever be used by anyone else but me. I like using it but still need to get the kinks out and reduce the number of features and make a public version that someone else besides me can use and test. Here is hoping I release something in 2013 and also streamline my webhosting accounts.

Chrome OS and WinRT

I still don't get WinRT or the new windows applications. If I really wanted to go back 20 years where I could run one application at a time I would use an iPad instead. This whole paradigm shift brings me to Chrome OS which works fine on ARM architecture and since most of the applications are just web applications I really don't see any difference from the WinRT applications. Maybe in a year or two I might have to eat my own words but at this point of time I don't see WinRT going anywhere. If WinRT does work out it will surely push Chrome OS adoption as well. Its cheaper and lighter than WinRT.

Using the ASUS RT-B13U with Tata DOCOMO eStick

To setup the router for Tata DOCOMO eStick set the following values and it should work. You don't need to do anything else. 3G/3.5G USB Adapter AUTO APN service(optional) Username I bought the router from flipkart and it took 3 weeks to get it. I had posted this a review but flipkart removed it.  Dear Customer, Thank you for posting your review for "Asus RT-N13U", dated 28th September 2012. We sincerely apologize for the poor service you experienced with Flipkart. We have shared your feedback with our customer support team for further follow-up. As per our review policy ( www.Flipkart.com/s/help ), we solicit only product-specific reviews on the product page and hence your review on our service has been removed. We are in the process of rolling out a customer-centric forum welcoming your experiences and feedback on our services and products. In the meanwhile, please feel free to share your concerns or queries with us at  cs@flipkart.com . Yours Sincerely, [na...

Panchkula Electricity Complaint Numbers

I've been trying to search for a customer care number to file a complaint but its so difficult to find the numbers. So in case you are one of the unlucky ones here are the numbers. 9316065982, 2591033, 2591037, 2595549 Toll free- 155333 Its almost impossible to get through the 93* number. But thankfully people tend to pick up the landlines. If you still have a landline then it should be easy to call up on their toll free number.

Installing Android SDK without or a slow internet conection

If you are on slow internet connection this blog post should help . The only change is that to get the latest APIs instead of using  https://dl-ssl.google.com/android/repository/repository.xml  use  https://dl-ssl.google.com/android/repository/repository-7.xml  or keep whichever is the latest version. Some more information is available at  http://www.hariadi.org/android/manual-download-of-android-sdk-components/

Using Voicemail with Airtel Prepaid Karnataka

Call  *321*671# to activate the service on your phone. It will ask you for permission if you want to enable it. To customize the account dial 52555 To disable voicemail dial *321*673# You can also activate it by sending out a SMS Send START VMS to 54321 for activation  Send STOP VMS to 54321 for de-activation  This post if for my own reference. If you have any questions leave a comment and if I know about it I will try and answer it.

Which mobile OS will win the battle?

tl;dr If I had to predict today which OS will finally win the battle it has to be Android. Once the market stabilizes there are only so many OS's that can survive. Android is to the mobile what Windows is to the PC. It might not be the best to begin with but given enough time it can finally catch up to the competition. There are only that many new features that you can add. Once you've added those there will hardly be any differentiating feature amongst the competing OS's. In the end it will be about hardware. And as of now only Android is the only OS which can run from a very low end smartphone to the top of the line phone.

Running node.js on windows without using Cygwin

Finally node.js is available as a windows binary without requiring Cygwin to be installed. As of writing this post you can download the node.js binary 0.5.6 . Currently npm does not work with node.js on windows. You need to download and use ryppi.py instead of npm . It works similar to npm but requires python. To setup node.js first set the PATH and NODE_PATH to the where you have copied node.exe.              set PATH=%PATH%;c:\node              set NODE_PATH=c:\node It is better to set these environment variables in the System Properties so that you don't have to set these variables every time. Follow the following steps to do that. Right-click  Computer , and then click  Properties . Click the Advanced system settings in the left side bar. Click the  Advanced  tab. Click  Environment variables . Append the node path to the PATH variable Create a new variable...

TIL: In JavaScript function.length returns the number of arguments it supports

function test(a, b, c) { } alert(test.length); In this piece of code if you use .length on a function it returns the number of named arguments that this function accepts.

Conditional compilation in IE

I normally know about conditional compilation of JS in IE using <!--[if gt IE 6] --> but here is something new I figured out today. var IE; //@cc_on IE = parseFloat(navigator.appVersion); The best part here is that the JS code stays in your JS files and does not uglify the HTML if you ever have to use conditional compilation. Here is some more information about it from MSDN article Conditional Compilation (Windows Scripting - JScript) .

Speed up your JavaScript

Image
This post is just for my own reference. Here are the slides and the video of the presentation by Nicholas Zakas. Goes into great detail in ways to improve the speed of your javascript code. Speed Up Your JavaScript View more presentations from Nicholas Zakas The article summarizes most of the points in the slides and video http://james.padolsey.com/javascript/zakas-javascript-performance-tips/

Is this finally the year of Linux on the desktop?

If I have a new system the only things I install are a browser, IM clients and some development environment. But the thing that has really changed now is that I can do the same thing on Linux without thinking too much. I can install Chrome/Firefox, the IM's are pre-installed and most of the development environments are available on Linux. You could do that earlier as well but now the main thing that has changed is that there are new tools that are only available on Linux or Mac. The main softwares coming to mind are GIT and node.js . They are available on Windows but often seem crippled. If you really want to use them you will move to Linux or Mac. That is where things have really shifted. There are half a dozen twitter clients for Mac and quite a few for Linux but have a look around the only twitter clients you will find on Windows are Adobe Air based clients. No one seems to be writing native or .net based clients. To be fair there are some obscure .net based clients which no on...

New theme for the blog

Image
The previous theme was supposed to be there for a few months but it ended up being there for years. In this new theme I got rid of all the junk that had ended up in the sidebars. There are no advertisements as those were just distractions and since its a personal blog there was no real need to put them in. Also removed the twitter, soup and the other blog feeds. They were adding too much distractions to the content. Have got rid of search, rss feeds and a dozen other distractions that were coming in the way of the main content. This new theme is supposed to be a little better as it puts focus on the content. And hopefully with twitter going towards the dark side I just might end up blogging again. There are so many topics that are in the drafts mode. Whenever I get sometime to polish them a little I will do that. Overtime this blog has turned from being about technology to being about me. All the unpublished posts are about technology so lets see when they finally go public. Had plann...

Finally cleared up the mess created up by hackers

Some of my websites hosted on dreamhost were compromised and iframe pointing to a url http://alcobro.net/t.php was added to all the index.html and index.php files. Had to wack my brains a bit to find the solution though. Finally saw the solution on the dreamhost wiki article Recovering from an iframe injection hack . The solution was relatively easy but the difficult part was figuring out how they got in. Also the mess of changing all the passwords is not something I really enjoy. If nothing else this exercise made me realize that I need to create separate user and profile for each domain. Though it will be a little messy but still better than having all the domains hacked in one go. Wasted a whole day in cleaning the mess and creating backups and removing things that I did not need on the server.

Birthday blues and the year gone by..

Another year just went by and I never even realized it. This year was exciting and quite a bit happened. Moved to a new company and city. With each passing year I did have my share of birthday blues but this time I feel a lot more calmer. The title is there just to make it sound a little melodramatic and also keeping with the tradition of the birthday blogpost titles . In that sense this year I feel a lot more stable. I know where I am heading, though not sure when I will get there, but there is a plan . This year saw a lot of ups and downs in terms of where I was heading. Finally moved to Bangalore which is the last thing I would have ever imagined. So far not really regretting the decision. In terms of blogging and tweeting did nothing amazing. None of my blogpost were on reddit, digg or slashdot ( Since I did not write anything ). I made nothing amazing in terms of s/w or released anything that would be noteworthy. Actually there was one thing that I did release pics.fefoo.com . It ...

The best mobile development platform for hobbyist programmer - IV

The best mobile development platform for hobbyist programmer - I The best mobile development platform for hobbyist programmer - II The best mobile development platform for hobbyist programmer - III Over the last few years the whole mobile landscape has completely changed. Now the contenders have also changed. When I last wrote about the topic there was no SDK for the iPhone and Android had not launched. Since then the whole landscape has changed. iPhone is the king amongst the platforms. Android is a close second. J2ME is a platform which still goes unnoticed since its just not part of most new smartphones. The process to develop Windows Mobile apps has gone a complete transformation with a completely brand new way of developing apps. Symbian is in its last leg, Nokia will be moving to MeeGo soon enough. Palm development also changed completely with the launch of Web OS. If you plan to develop today here is how you can go about it. 1) iOS Development - SDK for iDevices 2) Android 3) P...