Suramya's Blog : Welcome to my crazy life…

November 23, 2011

Requirements to become Cleartripper of the year are quite flexible

Filed under: My Thoughts — Suramya @ 8:04 PM

Today I checked my email and saw an email from Cleartrip asking me ‘Are you Cleartripper of the year?” and the following text:

Dear Suramya

You have completed 9 trips with Cleartrip in the last 6 months and you are 4 bookings away from becoming the Cleartripper of the Year!

Since I wasn’t interested I read through and then deleted the mail. After a little while I checked my gmail account and I had the same email sitting over there as well (I had booked a couple of flights using that email address in the past) with the following different text:

Dear Suramya

You have completed 2 trips with Cleartrip in the last 6 months and you are 2 bookings away from becoming the Cleartripper of the Year!

So for my suramya.com account I have flown 9 times I need 4 trips more before I was eligible to become the Cleartripper of the year but for my gmail account using which I have flown 2 trips I only have to complete 2 more trips to get the same ‘benefits’. Now that’s what I call being flexible! Wonder if anyone else caught this.

– Suramya

PS: and yes before you ask, I have been flying around a lot these past few months.

November 20, 2011

Stupidty has no limits: Saudi women with sexy eyes may be forced to cover them

Filed under: My Thoughts — Suramya @ 11:32 PM

I mean, seriously? This is getting to the point where its ridiculous. Don’t you know, its basic human psychology that if you try to hide something or make it inaccessable people are going to try to find out more about it? The idea is to resist temptation, not remove it so that you don’t even get a chance to resist it. If you have such that little control over yourself that looking at ‘tempting’ eyes is enough to corrupt you then you are probably a gone case anyways and will be tempted by something else.

RIYADH, Saudi Arabia – Saudi women with attractive eyes may be forced to cover them up, the news website Bikya Masr reported, in a move that could mark the latest repressive measure taken against women by the Islamic state.

A spokesperson for Saudi Arabia’s Committee for the Promotion of Virtue and the Prevention of Vice (CPVPV), Sheikh Motlab al Nabet, said the committee had the right to stop women revealing “tempting” eyes in public.

At times I really feel sorry for women in these countries. and all because some men don’t have the self control to resist temptation…

Source: Saudi Women with Sexy Eyes May Be Forced to Cover Them Up

November 8, 2011

Being exposed to a more varied Bacteria limits baby allergy risk

Filed under: My Thoughts — Suramya @ 2:42 AM

Now there is actual ‘proof’ about something that all of us have known about/believed in for a long time (at least I have). According to a study published in the Journal of Allergy and Clinical Immunology; infants who encounter a wide range of bacteria are less at risk of developing allergies later in life. So if you coddle a kid too much you are putting them at an higher risk of having health issues later in life. Which means a kid that is out there playing in the field is less likely to have allergies than a kid who is kept in a sterile environment. BTW, just to be clear I am not saying that all kids should be made to play in a dumpster, just that its ok for them to play in a bit of mud and rain etc.

Infants who encounter a wide range of bacteria are at less risk of developing allergies later in life, researchers in Denmark said. Professor Hans Bisgaard of Gentofte Hospital and the University of Copenhagen said 25 percent of the population of Denmark suffer from allergies.

Before I went to US, I didn’t know anyone with any dairy allergies or peanut allergies etc. Its only when I got to the US I found people with such allergies and found it a bit surprising. I think it has to do with the more outdoor games all kids in my friend circle/acquaintances played. We were usually out in the field playing soccer or running around in the mud or just on the field having outdoor picnics instead of playing video games. I didn’t die of weird diseases although I believe I did get a stomach upset a couple of times. I think kids should be allowed to be kids and play. Not saying that they shouldn’t be stopped from eating mud or harmful chemicals but if they managed to swallow a bit of mud, its not the end of the world.

Now even in India a lot of kids have allergies and similar issues and I think it has to do with the limited exposure these kids have to the outside world. A lot of the schools are now air conditioned, and most houses are as well which removes all the pollens/dust etc from the air thanks to the filtering. In the evening most of the kids are over at a friends place or at home playing video games instead of being out in the field/pool. (atleast that’s the perception I have talking to my niece and younger cousins) So this limited exposure to outside world means more health issues and more medicines etc.

What do you think?

– Suramya

Source: UPI.com Health news

November 5, 2011

India formally presents a proposal for government takeover of the Internet in the UN

Filed under: My Thoughts,News/Articles — Suramya @ 2:01 AM

Not satisfied with finally getting having access to blackberry messages for ‘security’ surveillance, the Indian government has formally put a proposal that a UN body should take over the running of the whole internet in front of the UN General Assembly in New York. Basically they have asked for a new UN body called the United Nations Committee for Internet-Related Policies (CIRP) to be created which would then develop Internet policies, oversee all Internet standards bodies and policy organizations, negotiate Internet-related treaties, and act as an arbitrator in Internet-related disputes.

In theory this sounds really good but in practice its a really bad idea. The whole idea behind the internet is to have a system that is not centrally controlled so there is no one point of failure or control, now if this new body is brought into the picture they will start enforcing rules that may not make sense to the majority of people using the net but are forced to follow because they are told to by a central agency.

Keep in mind that the folks ‘administering’ the internet are the same folks who are trying to get legislation’s/treaties like ACTA and E-PARASITE passed. And don’t forget the three strikes law from France or other similar insane policies that politicians that have no clue about the internet and are still sticking to the old ways of doing things want to enact.

Do you really want these folks to have formal control of the internet? I sure don’t. If this becomes reality maybe its time for folks to start building an alternate internet without the ‘big brother’ or the politicians.

Sources:

November 1, 2011

What do you do with 50 tons of plastic?

Filed under: Interesting Sites,My Thoughts,News/Articles — Suramya @ 11:55 PM

What do you do with 50 Tons of Plastic? You can’t bury it because it doesn’t decompose, you can’t leave it lying around because it will poison the soil and be an eye sore.

Folks at Vertech Limited along with Dawyck Estates, Cass Hayward LLP, Cardiff University’s School of Engineering, Rutgers University’s AAMIPP Department and Axion International seem to have figured out a way to use this so that that is both useful and doesn’t look ugly.

They recycled the 50 tons of plastic and converted it into a 90 feet Thermoplastic road bridge over the River Tweed at Easter Dawyck in Peeblesshire. This is one of the first of its kind in Europe and was built in just over 2 weeks including the four days to assemble it on site.

A bridge made of plastic has a lot of advantages over regular bridges. It won’t rust and doesn’t require to be painted which is another cost saving. Plus that’s 50 tons of plastic that is not cluttering a land fill somewhere and the best part is that it is 100 percent recyclable, so when the local community decide they don’t want it any more, it can be broken up and turned into another bridge elsewhere.

We should support more of these projects and initiatives so that 30 years down the line we are not living in a mountain of trash.

Source: 50 Tons of Plastic Recycled Into Scottish Foot Bridge & World Architecture News

– Suramya

October 28, 2011

Royal Society journal archive made permanently free to access

Filed under: Interesting Sites,News/Articles — Suramya @ 4:38 PM

The Royal Society which is the worlds oldest publisher has made its entire archive of more than 69,000 articles open and given free access to everyone. For those of you who are wondering what Royal Society is all about, here’s a brief introduction:

Founded in 1660, the ‘Royal Society of London for Improving Natural Knowledge’, was granted, two years later, a charter to publish by Charles II. On March 6th, 1655, the first issue of Philosophical Transactions of the Royal Society was published under the editorship of Henry Oldenburg, who was also Secretary of the Royal Society at the time. He stipulated that the journal should be ‘licensed by the council of the Society, being first reviewed by some of the members of the same’ and Philosophical Transactions of the Royal Society thus became the first ever peer-reviewed journal.

The Royal Society is the world’s oldest scientific publisher and, as such, our archive is the most comprehensive in science. Treasures in the archive include Isaac Newton’s first published scientific paper, geological work by a young Charles Darwin, and Benjamin Franklin’s celebrated account of his electrical kite experiment. Readers willing to delve a little deeper may find some undiscovered gems from the dawn of the scientific revolution – including Robert Boyle’s account of monstrous calves, grisly tales of students being struck by lightning, and early experiments on to how to cool drinks ‘without the Help of Snow, Ice, Haile, Wind or Niter, and That at Any Time of the Year.’

Now anyone with a net connection can read Benjamin Franklin’s account of his kite experiment in his own words or other similar landmark issues and who knows what idea one of these might spark in someone’s mind. After all you never know what might spark an idea and inspire a person to create the next great thing. These issues are an amazing treasure for people interested in the history of science and just reading them gives the reader an idea of how science evolved over the ages.

These journals are available for online browsing or for download as PDF files. However at a quick glance I couldn’t figure out if they allow mirroring of this stuff on other sites or not. I have reached out to them for permission to mirror the content but I don’t know if it will be granted or not. I hope it is, but you never know.

Source: Royal Society Publishing & History Today

– Suramya

October 26, 2011

Connecting a WordPress blog to Facebook

Filed under: Computer Software,Linux/Unix Related,Tech Related,Tutorials — Suramya @ 5:01 PM

Over the past few months I have been trying to connect my blog to my Facebook account so that whenever a post is made on the blog it automatically gets posted on Facebook to varying degree’s of success. Most of the attempts would work for a while and then stop. I even tried using some of the existing plugins for WordPress but since they required a developer account (which needs a valid phone no or CC#) and for some reason I never get the validation code on my cell I was never able to get them to work.

Then I found an article on Linux Magazine on a Command Line interface for Facebook and decided to build on top of that to get the linkage working. Now this is a very hackey way and is not at all elegant or anything but it gets the work done which is what I wanted, so I am good. 🙂 All the work was done in about 2 hours including testing so that should tell you something on its own.

I had to install this on my local system since my webhost didn’t have all the per-requisites to get this to work. That and the fact that I can’t connect to my MySQL db’s from a machine outside of my hosting provider is why this convoluted method was created. The steps I followed to get this to work are as follows.

Install Facebook Commandline

To install Facebook Commandline, follow the instructions on their site.

Authenticate the Application to be able to talk to Facebook

For some reason there was a difference when I run the application from the commandline and when I run it from the web, in as to where the preferences file and the session details were saved, so all the steps have to be done either from the command line or via the web, you can’t interchange the two.

Creating a Web interface for the FBCMD

Since I wanted to be able to get data from WordPress and pass it on to FBCMD I created a new PHP page called run.php that basically pulls the data from WordPress and then passes it to FBCMD as command line parameters. I know that using passthru is probably not very secure and I should have modified the FBCMD file to accept parameters as a URL but didn’t want to spend that much time trying to get this to work. (Hey! I told you it was a quick and dirty ‘fix’).

The contents of this file are very simple:

error_reporting(E_ALL);
$handle = fopen('https://www.suramya.com/blog/LatestPost.php', 'r');
$current = fopen('/var/www/fbcmd/latest.dat', 'r');
$current_id = fgets($current, 4096);
fclose ($current);

if ($handle) 
{
 $ID = fgets($handle, 4096);
 $link = fgets($handle, 4096);
 $title = fgets($handle, 4096);
 $content = fgets($handle, 596);
 $content = chunk_split(htmlspecialchars(strip_tags($content)), 500) . "...";

 if($ID != $current_id)
 {
  // If we have a new post then call FBCMD to make a post
  $command = '/usr/bin/php /var/www/fbcmd/lib/fbcmd/fbcmd.php POST " " "' . chop($title) . '" "' . 
              chop($link) . '" "' . $content . '"';
  passthru ($command);
  // Write the new PostID to a file
  $current = fopen('/var/www/fbcmd/latest.dat', 'w');
  fputs($current, $ID);
  fclose($current);
 }
}

The file basically calls ‘LatestPost.php’ and gets the latest post details on the blog(see below for details), then it checks if the post made is newer than the last post processed and if so it proceeds to post to Facebook using FBCMD.

‘LatestPost.php’ file looks like this:

< ?php

define('WP_USE_THEMES', true);
require_once( dirname(__FILE__) . '/wp-load.php' );

$month = $_GET['month'];
$year = $_GET['year'];

$args = array( 'numberposts' => 1);
$myposts = get_posts( $args );

//print_r($myposts);

foreach( $myposts as $post ) : setup_postdata($post); 
echo $post->ID . "\n";
the_permalink();
echo "\n";
the_title();
echo "\n";
the_content();
endforeach; ?>

This file need to be put on the server in the WordPress Root directory and when called returns an output in the following format:

Post ID
Post Link
Post Title
Post Content

Once all this is done and the FBCMD has access to post to Facebook all we need is a cron job to run on a frequent basis to run the code. So I created a shell script that contains the following line and have it run every 15 mins.

/usr/bin/curl http://localhost/fbcmd/run.php > /tmp/FBPost.out

That’s it. So far it looks like its working great and if this post shows up on my FB wall then all is well. If not, then its back to the code to see what went wrong this time.

– Suramya

October 25, 2011

Bio computers come a bit closer to reality

Filed under: My Thoughts,News/Articles,Tech Related — Suramya @ 6:29 PM

Readers of this blog (all 2 of you 🙂 ) and people who know me, know that I have always been interested in Bio/DNA computers and have even written about them in the past. But to my sorrow most of the current work on Bio computers is still in the very theoretical stage.

Recently, Researchers at Imperial College London have claimed to have successfully built logic gates out of bacteria and DNA. The team built an AND gate using e-coli (Escherichia coli) bacteria which is normally found in the lower intestine and another team built on top of that to create a NAND gate which is basically an AND gate combined with a NOT gate.

While this doesn’t sound like much it is indeed a step forward because all computers are basically a collection of logic gates and if the team can manage to connect more of them together then we have the beginnings of a working Bio computer.

More details on their work is available at: Scientists create computing building blocks from bacteria and DNA

The study can be downloaded from here.

Sources: ZEE News & Wired UK

As always if I find more information I will post a follow-up entry here.

– Suramya

October 15, 2011

Solar plant that continues to work at night

Filed under: News/Articles — Suramya @ 11:21 PM

A major problem with Solar plants is that once the sun sets or its cloudy they are pretty much just taking up space and if I have spent a few million on a powerful solar plant I would want to be able to get as much use out of it as possible. People have tried various ways to work around the problem but till recently none of them were too successful.

Now a new solar plant has come up just outside Seville, Spain that claims to fix this problem, infact if their claims are to be believed it can function for upto 15 hours of dark. From their news release:

More than 2,600 concentrically-arranged mirrors at the Gemasolar installation just outside of Seville, Spain concentrate solar energy towards a centrally located molten nitrate salt tank. As the rays converge, they super-heat the salt to over 900 degrees Celsius, causing water around the tank to boil and drive steam turbines. In addition, any superfluous heat generated during the day is stored within the liquefied salt. It acts like a giant thermal battery for driving the turbines at night and during overcast days—up to 15 hours at a time with no sunlight.

This is pretty interesting and cool, however the price tag of $410 million is not that cool so don’t expect similar plants to start popping up all over the place anytime soon. But still… This plant alone will reduce atmospheric CO2 emissions by more than 30,000 tons a year and can produce up to 20 megawatts of power.

Source: The World’s First Solar Plant to Generate Electricity Even at Night

– Suramya

October 14, 2011

How I fix computers…

Filed under: Humor — Suramya @ 1:14 AM

This is so true…

– Suramya

« Newer PostsOlder Posts »

Powered by WordPress