Running unix scripts on Android

It’s a known problem on Android ecosystem that developers abuse the app development good practices by choosing to store their app data randomly on the internal storage (or external storage). They should instead be putting their data in /Android/data. Yet another abuse is by apps which store images and other media on the internal storage and don’t include a .nomedia file. This ends up polluting your Gallery app with images and media you don’t want to see in there.

Whatsapp is an app I use daily, has millions of users worldwide and pretty popular chat client in India. This app abuses both the good practices I noted above. While we can’t change the first, there is certainly something we can do about the second issue. Create a file in the directory Whatsapp stores the images (It’s usually /storage/emulated/0/Whatsapp/Media/Whatsapp Images), name it .nomedia and you should be done. Turns out, this is not enough. The .nomedia file’s functionality is overridden once Whatsapp stores new images in this folder. So, you need to be able to program your phone to create the .nomedia file periodically or create the .nomedia file every time Whatsapp writes a new image to it’s image directory.

There is an app on Android called Script Manager that let’s you run Unix scripts in your phone. So, you could install that app and create a script which creates a .nomedia file in the Whatsapp’s image directory. The app also lets you schedule your script to run at regular intervals. So, the following script scheduled to run once a day should take care of the issue noted above.

#!/system/bin/sh
touch /storage/emulated/0/Whatsapp/Media/Whatsapp\ Images/.nomedia

It would have been even better if we could run this script only when Whatsapp stored a new image in it’s images folder. I could not find a way to enable filesystem listeners to accomplish this. Do let me know if there is way to do this.

Posted in Technology, Uncategorized | Tagged , , | Leave a comment

Ruby script to change the desktop background periodically on Mac

There is this website that puts out geeky t-shirts for sale everyday – Teefury. I love their t-shirts and have bought a few from them. But here is the deal with it. You get to buy a tee only on the day it is put out, for $10. After 24 hours it is gone. So, if you forgot to check the website everyday you probably missed a tee you thought would be cool to have.

What could I do so that I don’t miss on any of the cool tees again? I figured if i could write a script that would set my computers background daily to that days teefury tee, then nothing like it. So this is how i wrote a crude script that helps achieve it.

Googling around pointed me to this command –

defaults write com.apple.desktop Background '{default = {ImageFilePath = "~/Downloads/Teefury-Wallpapers/wallpaper.jpg"; };}'

Once you have this, all the script needed was :
1. A HTML parser to parse the sites homepage to fetch the days teefury image.
2. A way to schedule your script to execute daily automatically.

And you get this. Suggestions and critiques welcome.

Posted in Technology | Tagged , | 1 Comment

Billmonk woes and a rudimentary solution

Over the past few weeks, I along with my roommates have been using Billmonk to track our expenses. Unfortunately, the sites uptime has been very bad lately. Heck, it won’t Billmonkeven allow adding new expenses anymore (as of 27-Aug-2012). I was very skeptical if the site will totally be abandoned in the near future. Hence, i decided to look around if there is a way to export the data we have been storing in it and voila! there is a way to export it. You can export your data in XML among other formats. Now, I had the data in hand but no easy way to summarize the expenses. So, I thought I would parse it and summarize the data. Feel free to go through the code, use it and let me know if there are any mistakes.

Posted in Technology | Tagged | Leave a comment

Find who unfriended you on Facebook. The Facebook way.

I was perusing my Facebook news feed today and blocking all the applications/games I do not want to be reading updates about. I realized I see wall posts from this app “Profile Visitor”, even though I have blocked this app numerous times. So is the case with another app “Find who unfriended you”. The latter, made me wonder if there is in fact a way to find out who unfriended me. Guess what, there indeed is a trivial way to figure this out.

If we check out our General Account Settings page, just beneath the language settings, there is this option to download all of our Facebook data. Click on that and it will prompt you for your password, after which you will get a feedback saying Facebook will contact you once the archive is ready to download. You will typically be notified that the archive is ready to be downloaded in about an hour. Once you get this archive, everything is pretty much straight forward. This archive has information on everything you have done on Facebook. From your comments to likes to photos to profile changes to subscriptions to everything you can think of. The information we are interested in, resides in the file friends.html. This has a list of all of your current friends.

Now, to figure out who unfriended you, is pretty trivial. Download your data periodically. Compare the current version of the friends.html to the copy from the previous archive and you have the list of people who unfriended you during that period. Let me know if there is a better approach to this. Not that I am obsessed with the friend count on Facebook.

Happy unfriend-ing 😛

Posted in Technology | Tagged | Leave a comment

ICICI net banking transactions from outside India

One of the concerns I had when I moved to the United States was if I will be able to ICICI net bankingmake net banking transactions from here. I had this concern since I was aware of the fact that ICICI sends you a One Time Password (OTP) on the cell phone number registered with them, every time you make a transaction from a new computer, and I was not using the registered cell phone number here in the U.S.

Turns out all you need to do is, call this ICICI U.S toll free number – 1-866-424-2448, key in your debit card number and the PIN when prompted by the automated voice assist, talk to a customer care executive and ask him for the OTP. I was on the webpage that asked for my OTP while I was doing this. Once, the OTP is successful, your computer in the new location must be recorded in the ICICI servers and it won’t ask you for an OTP for future transactions.

Posted in Uncategorized | Tagged | 1 Comment

The FNU conundrum

I had a memorable experience the other day at the Passport Seva Kendra (PSK) Bangalore and i thought it was worth sharing. I was one of the chosen ones with surname being blank in the passport. I was skimming through various articles around the internets about VISA procedures, getting a driving license in the United States and pretty much every random article pertaining to studying in the US. That is when i came across this conundrum of FNU – First Name Unknown. This typically happens when your family does not have a surname like mine. Up until my 10th grade, my name in all the records goes by S L Varun. Later, my pre-university board changed it to Varun S L. All my academic records beyond that point, state my name as Varun S L. At the time of filling up the form for my passport, I remember reading an instruction that the initials in the name must be fully expanded. Since I was using my 10th grade result card as proof for date of birth, i filled the Given Name column with Sattigarahalli Lingaraju Varun. And that’s how i got my passport, Surname : (blank) Given Name : Sattigarahalli Lingaraju Varun.

Fast forward 4 years, I was filling the form again, this time for re-issue of passport, for change in existing personal particulars. The procedure was straight forward. Fill your online form, take an appointment, submit your old passport and get the new one. Since, my present address is different from the present address mentioned in the old passport, I had to submit an address proof for the present address. So, I completed and submitted the online form. Getting an appointment at a PSK was the next challenge. I tried worthlessly all round the clock for a couple of days only to get the message “No appointment slots are available”. Googling around revealed that slots for Bangalore PSK are opened for booking at 6PM IST and are usually filled out in 2 minutes. So next day, i was ready for the challenge. I quit all applications running on my laptop, made sure the LAN cable was plugged in perfectly, cleared my table so that I have sufficient room to use my mouse, fired up the secret gateway to all Indian Government websites i.e., the Internet Explorer and logged in 5 minutes in advance. As the clock struck 6PM, I was in, I could see the time slots for the next day. I happily selected the 9AM slot for the next day, hit “Confirm Appointment” and BOOM. By the time the page refreshed i was greeted with “Sorry, that slot is booked, please start over”. That’s how i did NOT get the slot for the next day. Anyway, I was able to get an appointment the next day. I suggest restarting your laptop for better results, or may be even re-install the OS. On a serious note, it is better to target the slots for afternoon or evening, since everyone will pounce on the 9AM slot as soon as it is open for booking.

On the day of the appointment, i reached the PSK about 15 minutes early (which is 15 minutes after from the reporting time). It was all smooth. I stood in the queue for Tatkaal applicants. About 5 minutes later i was at the counter and the officer asked me for my old passport, a photocopy of the old passport and the address proof. They took those for the verification which took about 40 minutes. After that they let me in the main arena of the office. The main arena has 3 counters A, B and C. Counter A is where they take your photograph, collect the passport fees, verify all the stuff you have filled in (if you have any corrections to be made this is the place). I finished this process, and was queued for counter B. Counter B is where they verify your docs. It is usually a very swift process or so i had heard. But I had something very surprising awaiting for me. The officer at counter B found out a mistake in my date of birth in my old passport. I had never noticed that in the 4 years that i possessed my old passport! There was a DD-MM-YYYY MM-DD-YYYY goofup!. To be fair, it was a document verification mistake on their part too, but I was the one in need of a new passport quickly here and I did not argue over that. I was sent to counter C to discuss the issue. At counter C the officer pulled up my records, the scanned copy of the form i had filled in 2008 while applying for my first passport. And yes, it was my mistake. I had bungled up DD-MM-YYYY and MM-DD-YYYY. Once they established it was the applicants mistake, the officer gave me this look and I was in a terrible fix. I had no patience to start over all of this again. I politely asked him what is to be done. He asked me if i have any docs which can prove my correct date of birth. Luckily i had the original copy of my 10th grade marks card which has date of birth in words. But life can never be so simple, can it? They asked me to write an apology letter and pay 1000 rupees as a penalty. This is a standard procedure and they issue a receipt for the 1000 rupee penatly. They also hand out a penalty letter that has the legalese of the “crime” i had committed under the Passports Act 1967 (Applicant gives wrong information regarding his/her date of birth/place of birth). So, I had to start over from Counter A all over again. In a way, I was glad I did not have to start all over from Internet Explorer. This time it was indeed a breeze through the counters A, B and C. Five days later I had my new passport with the bifurcated name just the way i wanted.

Posted in Uncategorized | Tagged | Leave a comment

This is what i did on my 24th birthday

I woke up this morning on my birthday to the worst news I could hear. Steve Jobs, whom i idolized since past few years now, had passed away. The first thing i did was to reach out to my phone to see what was unfolding on twitter. It was saddening. I started skimming through all the articles/videos people were tweeting in honor of Steve. I spent all day today reading articles over articles about Steve, his life and his impact on other people’s lives.

Here are a few articles that i found were heart touching and inspiring

Walt Mosberg – The Steve Jobs I Knew

Vic Gundotra – Icon Ambulance

Michael Sippey – two minutes with steve

Brian Lam – Steve Jobs Was Always Kind To Me (Or, Regrets of An Asshole)

Frances Haugen  – Steve Job’s goodbye?

Robert Scoble – Dear Tim Cook: I’m sorry

Steve Jobs & Mona Simpson: A Story Too Good Not to Tell

Larry Page –https://plus.google.com/106189723444098348646/posts/4wkYwTCCgAc

Louis Gray – Steve Jobs: An Irreplaceable Icon

Sergey Brin –https://plus.google.com/109813896768294978296/posts/dwmWyNSoXTh

Steve Jobs The Crazy Ones

MG Siegler – http://parislemon.com/post/11101071134/speaking-of-the-steve-jobs-biography-its-author

In a Private Light: Diana Walker’s Photos of Steve Jobs

http://panic.com/ [cached here]

John Gruber – Universe Dented, Grass Underfoot

Neven Mrgan – Steve

Stuff added later :

the last time I saw Steve Jobs

A conversation with Woz

A Studio Chief Pens Revealing First-Person Steve Jobs Remembrance

Posted in Technology | Tagged | Leave a comment

Facebook’s new commenting system

Facebook, yesterday rolled out their new commenting system that will be rolled out to publishers and websites. It aims to replace the commenting engine on various blogs and websites that are currently mostly powered by DISQUS. Facebook definitely wants to pull more content that is on the web outside of facebook into facebook with this feature/plugin. I, for one do not like this feature at all.

Firstly, it changes the whole point of commenting on a public forum/website. I participate in the comments on a particular blog post because i like to read the views and opinions of other readers. Now, when one of the reader comments on a particular topic/article, along with his views i am shown what his facebook friends think about his comment. More often that not, these “sub-comments” if i may call so, may not be related to the article. Here is a post from TechCrunch that implemented the facebook commenting system as a test. As you can see there is a lot of noise not related to the post.

Secondly, atleast as of now it needs a facebook profile to comment and hence to participate in the discussion. Many people do not and might not want to be on facebook and these people are effectively ruled out of discussion if facebook commenting system does not allow third party login.

Thirdly, I would not want my opinions on some article on some random website to clutter the news feed of my friend on facebook. Although i agree that this feature is opt-out, it should have been an opt-in feature. Which means this feature is enabled by default. Many facebook users might be unaware of the fact that their comments on a website are being published on the their friends’ wall on facebook.

I am glad that the Facebook Disconnect extension for chrome blocks the new facebook commenting system 🙂

Posted in Technology | Tagged | Leave a comment

Whatsapp : a text messaging app

For the last couple of days, i have been playing with this app for text messaging on smartphones called Whatsapp. Its an app that allows smartphone users to text each other in realtime (pretty much the same experience like chatting on gTalk or skype). But what’s special about this one?

  • No sign-up required, it directly integrates with the contacts in your phone and whoever is using this app, will show up on your Whatsapp chat list.
  • Allows you to share images, videos, audio, your current location, contacts inline in the chat dialog.
  • Has group chat.
  • Allows scheduling of messages/texts to be sent at a later time.
  • Works on Wi-Fi, 3G, 2G (GPRS).

I have tried apps similar to Whatsapp namely Kik, Beluga but these are currently limited to iOS and android. What makes Whatsapp fit my needs is the fact that it is available for nokia and blackberry devices too. Since most of my friends use nokia phones, there is a higher probability that i can find most of my contacts using Whatsapp.

This app costs 99 cents(~Rs 50) on the iPhone app store but is free for all other platforms. The service although is free for the first year, it costs $2 from the second year. In my opinion for $2 (~Rs 100) a year, its a steal!

Download link

Posted in Technology | Tagged | Leave a comment

Startups i like – 2

Flipboard is an iPad app, that lets users consume RSS feeds, your Google Reader feeds, Twitter, Facebook, etc in a unique user interface that resembles a magazine. It makes reading a pleasant and clutter free (ads i am looking at you!) experience. 

This video gives you a demo of the app. – http://www.youtube.com/watch?v=v2vpvEDS00o

Robert Scoble’s interview with the co-founder and CEO of Flipboard, Mike McCue – http://www.youtube.com/watch?v=M7umqKbQ3PA

Posted in Technology | Tagged | Leave a comment