Aug 9, 2015

Airtel Cafe Coffee Day - Internet Access for free !


Just happened to sit in one of the Cafe Coffee Days in Noida sector 63 today. The store manager was not around and hence we could not request for free WI-FI access - the other option was to pay for the internet service. I thought let me just pay for the service.

The process was simple:

a) Try accessing  google.com and the pop up for Airtel Hot Spot popped up.
b) There was an option to buy data - irrespective of the option one choses - it redirected to 50 INR and 120 minutes internet access plan. (I guess no one even tested the feature once !)
c) The site asked for keying in the phone number for sending verification code and post providing the code redirected to select the plan (or was it other way round - not sure)
c) We selected to pay by Net Banking and selected our bank.
d) The payment gateway never came up for HDFC bank irrespective of the number of tries made.

At this point the internet start to work for a short duration and the interesting part is you can keep on repeating the process any number of times. I wanted to see how many times can one try until you get blocked - well I gave up after three tries. There should have been a check at this stage - someone requesting authorisation over and over again should be part of the expected scenario.

Just shows how screwed up Airtel is. The other day I tried for hours to edit the myBill plan to today I genuinely tried to pay for service. Somehow Airtel never cares !

I guess rather than trying to convince TRAI against Net Neutrality - Airtel should try to fix holes in its IT infrastructure which are causing them revenue leaks. 

Jun 24, 2015

TSV to CSV Quickie


Sed a very powerful editor on *IX/Mac allows to convert TSV to any delimited format. Basically a simple replacement in file which is quick and efficient.

sed "s/ /,/g" >

On linux box it is easier to identify a tab by \t however on mac one needs to press the Control + v and then hit the "tab" button.

The generic syntax to replace all occurrences of from_a with to_b is

sed "s/from_a /to_b/g" >

In case of optional delimiters also used when strings are always with double quotes (idiot sqldeveloper exporting data in my case"  following will do the trick
 sed -e 's#"##g' source  > destination

Use ">>" instead of ">" in case you want to append and not overwrite. 

Feb 26, 2015

Oracle installation - Enable Access from Another Machine : Newbie Oracle Tip


How many times have we installed Oracle any version on windows or unix (when the IP address is not static) and then found that even though you can connect to Database on the server through sqlplus  it is not accessible on other machines.

Personally there used to be a time in my previous organisation when most business and technical consultants installing oracle were clueless and ended up only talking to the database on their machine.

Oracle has a file called listner.ora in the directory $ORACLE_HOME\NETWORK\ADMIN
Here is the file from one of the installation





Notice that the server has the IP address 10.91.1.105 in this case. That's it ! Now how to check if your Oracle server is accepting connections? Simple my favourit utility is nmap. Just scan the ports on the server and the port (in our case the default 1521) will be open.

That's it !

Amazon SES Oracle: Production Access and still not able to send emails


Scenario: We received the AWS credentials but were not able to decide what was the quickest way to test if the mail service was working correctly.

Few minutes on google and there was a python script which we modified to our test case. All your need to do is key in your AWScredentials.



What is the good thing about this script? The script writes a detailed log so for example in our case the program was accidentally changed and the from email address was changed.  Even though we had Production access enabled we were not able to send emails at all.

I am attaching the script output for quick reference



Notice that it clearly says 554, 'Message rejected: Email address is not verified.'


Tip: The production access allows to send email to any email id but it restricts that the "from" address at least must be verified if not the domain. This was the culprit in our case as the from email id was not verified.