Suramya's Blog : Welcome to my crazy life…

December 10, 2011

Thinking about changing Hosting providers. Any suggestions?

Filed under: Computer Related,Tech Related — Suramya @ 10:57 PM

I have been using 1and1.com as my hosting provider for a while now (since 2005) and have been happy with the service for the most par, however after their recent pricing change the service is getting to be a bit more expensive than I am comfortable with so I am thinking about changing webhosting providers. What hosting providers do you use and would recommend? I need the following feature sets in the service:

  • PHP4/5
  • MySQL DB: Fairly large no of databases with large storage allocations
  • Full SSH Shell Access
  • Unlimited Bandwidth (Have gotten bit by this a few times)
  • Email Accounts: A fairly high no with large quota’s (I never delete mails)
  • Perl Support
  • Multiple Domains allowed
  • High availability/uptime

Thanks in advance.

– Suramya

November 26, 2011

Harry Potter and yoga are evil according to the Catholic Church exorcist

Filed under: My Thoughts — Suramya @ 7:16 PM

Yes. You read that correctly, Catholic Church’s exorcist thinks that yoga and Harry potter are evil. I could understand if we were talking about Twilight :p 😉 but yoga? Seriously? Yoga has nothing to do with religion, it is a means to attain of a state of perfect spiritual insight and tranquility. Now this insight can be a belief in Christianity, Hinduism, Islam or just a way to calm yourself after a stressful day and get a toned body while you are at it. In certain religions yoga does have a big significance but that doesn’t make it evil. Just as anything that doesn’t fall under your narrow definition of good doesn’t make it evil.

Father Gabriele Amorth, who for years was the Vatican’s chief exorcist and claims to have cleansed hundreds of people of evil spirits, said yoga is Satanic because it leads to a worship of Hinduism and “all eastern religions are based on a false belief in reincarnation”.

Coming to Harry potter being evil, I find that even more silly than people believing that Yoga is evil. If your people can’t understand the difference between fantasy and reality then I am sorry but you have bigger problems to worry about. The books, even though they have magic are about how you can win against all odds if you have the determination and strength to persevere.

I am not a very religious person, if you are a religious person good for you. I don’t use religion to figure out what/who to like or what to ‘hate’, I make my own choices. If that makes me a sinner in your eyes that’s your problem not mine. We are like blind men trying to describe an elephant, and each one insisting that they have the only correct interpretation. Found this image a couple of days ago on the web and had to go find it again for this post as I find it apt.

Finally I would like to end this post with a quote “I don’t fear God, I fear those who claim to speak on his behalf”.

This is all for now. Will post more later.

– Suramya

Source: ‘Harry Potter and yoga are evil’, says Catholic Church exorcist – Telegraph

November 24, 2011

Happy Birthday dear Doctor

Filed under: My Thoughts — Suramya @ 1:14 PM

The famed science fiction series on BBC Doctor Who, celebrates its birthday today. It was 48 years ago we were introduced to the crazy loveable time traveling Doctor and his TARDIS.

I have been a fan of doctor who since the early 90’s when I read the novelizations of the series by Target. Then I went to the US and there managed to find the episodes themselves and was hooked. Now Dr Who is back on BBC and I make sure I don’t miss a single episode. The best part was when my mom saw my collection of Dr who books and told me that she used to watch the show and read the books when she was in college. Talk about a time loop.

If you haven’t seen it yet, check it out. You will love it. Don’t start at the very beginning as you ‘might’ not like it that much initially, my suggestion is that you start with the 2005 reboot of the show and then once you are hooked start watching the previous seasons.

Source: Happy Birthday to Doctor Who, Wired

– Suramya

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

« Newer Posts — Older Posts »

Powered by WordPress