admin

 

So, I wanted to host a small project made in web.py on my current server. I am running lighttpd as my HTTP server.

The process to set it up is pretty straight forward as explained in the webpy documentation.

I am writing this how-to to cover a couple of things which I didn’t find well documented and had to search around a lot to find

  • To get web.py running with lighttpd and fastcgi you need to install the package flup. In debian it is known as python-flup.
  • On this server, I run php based sites as well so I had to setup fastcgi for both. Here’s what the code looks like:
fastcgi.server = ( ".php" => (( 
"bin-path" => "/usr/bin/php5-cgi", 
"socket" => "/tmp/php.socket",
"max-procs" => 1,
"bin-environment" => (
 "PHP_FCGI_CHILDREN" => "4",
 "PHP_FCGI_MAX_REQUESTS" => "1000"
)
)),
"/code.py" => ((
"socket" => "/tmp/fastcgi.socket",
"bin-path" => "/path-to/webpy-app/code.py",
"max-procs" => 1,
"bin-environment" => (
 "REAL_SCRIPT_NAME" => ""
),
"check-local" => "disable"
))
)
  • To use web sockets instead of unix sockets change
"socket" => "/tmp/fastcgi.socket",
to
"host" => "127.0.0.1",
"port" => "8081",

 

 

 

Unfortunately, there’s no guide available for installing mediawiki on dotcloud and googling for it doesn’t turn up anything much useful. But, I had to move out LUG wiki to dotcloud. I proceeded with it while refering to drupal documentation. At the moment, I don’t have a guide on installing mediawiki but I can highlight the problem I faced.
The big problem lies in the fact that the setup of MediaWiki was done on Apache and dotcloud runs nginx. So, the problem occured mainly with getting the path right.
The savior comes in form of the MediaWiki documentation for nginx.

Some of the changes I had to make were

LocalSettings.php

$wgUsePathInfo = true;

nginx.conf

try_files $uri $uri/ /index.php?title=$1&$args;

fastcgi.conf

fastcgi_param  PATH_INFO          $fastcgi_path_info;

 

This isn’t a full fledged guide or a how-to but hopefully a pointer for people who are stuck while getting started with MediaWiki on dotcloud or nginx.

 

After getting my new HDD couple of days back, I decided to install Arch Linux on it. The idea with Arch is to sufficiently control what goes into my system but without too much management overhead unlike in Gentoo. Thus, I installed stated with Core install of Arch and added fluxbox over it as my default WM(I am not running any DM as of now, but might go with qingy). Thus, I have tried to avoid any GNOME or KDE libraries and do as much via minimal system as possible.

Since I disconnected my broadband a few months back, I have been living on Mobile Internet connectivity. So far I had been tethering my phone to the wifi router and then using LAN cable to connect to the PC. Horrible way to go, I agree! To simplify matters I got a USB GSM modem. It was as easy as pie to set up the connection on Ubuntu using Network Manager but with Arch, I decided not to go for nm-applet but manage it via CLI.

First I setup NetworkManager as instructed on the Arch Wiki and I got Wired Connection working in no time. The most important tool at this juncture was nmcli. I checked

nmcli dev

and it showed that gsm modem is being detected. But, on checking

nmcli con

It only showed the wired ethernet connection. Going through the man pages and googling for hints didn’t help at all. I finally turned to #nm IRC channel on Freenode.

Thanks to some excellent support, I was connected using the GSM Modem in no time.

Here’s the quick rundown

  1. Create a new file in /etc/NetworkManager/system-connections and as per the sample file. PS: You can generate uuid using uuidgen or input any random UUID as long it isn’t in use elsewhere in your system.
  2. Now, chmod the file to 0600.
  3. Restart NetworkManager
  4. Voila! What have we here. I could now see the new connection in the list.

Now to get connected to the new connection. First we disconnect the Wired connection

nmcli dev disconnect iface <iface name>

And then connect to the new interface

nmcli con up id <connection id>

For those using MTNL Mumbai, you can use my settings

[connection]
id=MTNL
uuid=15d742f1-2b5a-421e-9f27-fcb1fc26d72c
type=gsm
autoconnect=true

[ipv4]
method=auto

[gsm]
number=*99#
username=mtnl
password=mtnl123
apn=gprsppsmum

[serial]
baud=115200

 

 

 

 

Do you find performance of your WordPress blog to be lousy? And have no clue on where to start with it?

There are lots of articles on the Internet which will tell you what to do. So, instead of repeating the same, I’ll cover each aspect and links to articles which provide useful how-to’s on the same which I have come across while working on OnlyGizmos and iPhoneHelp

I’ll divide it into sections on basis of the type of hosting as it is usually the limiting factor on how much tuning you can do.

Shared Hosting

Having your blog on shared hosting means there’s not much you can change but this is what will suffice for huge number of bloggers out there.

  • Caching Plugin: W3 total cache is the best and highly recommended plugin. With tons of features besides caching like Minification, CDN support, mobile support, Cloudflare integration it is by far the best cache plugin I have come across. For installation and configuration see this wonderful how-to from wpbeginner
  • Theme: Use themes which have been designed with SEO in mind. These themes follow the best practices to speed up your page loading time e.g. putting stylesheets at the top and minify them. The theme framework I would recommend is Thesis. It is a paid theme but having worked with it, I can say that it’s worth the price if you are serious about your website.
  • Scripts: Put javascript files at bottom as recommended in YSlow. This can be handled by W3 Total Cache.

Single Server

In addition to the above, if you have control over your server e.g. VPS or Dedicated server you can take following extra steps -

  • HTTP Server: Move over from Apache to Nginx. Here’s a good guide on moving over your wordpress blog to nginx.
  • MySQL Tuning: Run the mysqltuner script and follow the recommendations given by it to improve MySQL performance.
  • PHP Accelerators: Install PHP Accelerator like APC or XCache. List of accelerators is available on wikipedia. I recommend APC since it’s stable and is likely to be merged into PHP 6.
  • CDN: If you serve lot of static content and media do consider going with a CDN. And if you think you cannot afford CDN’s as they are too costly, think it over. MaxCDN offers excellent CDN at an affordable price of $39.95 for the 1st TB. Do check them out.

Multiple Servers

  • Memcached: One of the components I am yet to personally handle but have heard a lot of good stuff about it. It can provide superior object caching. It has a good support in W3 Total Cache thus making your work of integrating with wordpress easier.
  • Varnish: Place varnish in front of your HTTP server and see your websites fly. Here’s a good article on setting up varnish with nginx, w3tc and APC. And if it isn’t enough official website provides excellent documentation.

These are the things that I have learnt in the past one year. If you have something which I have not covered please share it with us in the comments.

 

Many people have been asking me as to why I quit twitter? And haven't got a proper reply from me. I do owe them a reply, and here it is.
I have been a bit prone to mood swings, and at the beginning of December when I started feeling low, I thought it was just one of those days. But, it went on happening for a couple of weeks with no solution in sight. And some of you on twitter may also have noticed me cribbing about some nonsense stuff. Twitter and Facebook were in a way contributing and making me feel worse. So, finally after pondering over the decision for 3-4 days I decided I will quit both Twitter and Facebook.
At the same time, I did not want to miss some of the amazing people I met on these sites. Thus, I decided I will back up my profile and keep it safe so I have it available if I ever decide to return. I know, I will be missing some of these people, I already do. But, I had to take that decision and stick with it.
I still don't know if I will ever return back to those websites or not. Thankfully, facebook allows me to deactivate my profile and preserves it. I have backed up my twitter 'Friends' too.

And as to my mood, I have had the most amazing week of my life, coincidently after quitting Twitter and Facebook – 3 days cycling trip to Pune and Panchgani, a close friends wedding, nice tweetup where I met lots of people. The time spent outdoors and in real life is just what I needed. It has given me a much needed high. And with some of my very good friends likely to meet me this month, I hope it will be just what I needed.

 

The Problem

With each passing day, the traffic situation in Mumbai is worsening. Big traffic jams, accicents, parking woes, etc. Various solutions have been proposed to combat this problem.

Here's a slightly outdated statistical information on the traffic growth in Mumbai from 2005 to 2008. An annualised growth of 12%! That was 1.5 years ago, it has worsened further now.

""

This problem has been widely debated and discussed topic everywhere. I had the opportunity to be a part of it on two occasions, once on twitter and once during Raxit's session at BCM6. This prompted me to express my views on the topic on this blog.

Many solutions have been proposed to solve our traffic problems – promote public transport, improved road conditions, car pooling, levying of taxes in certain zones, allowing different vehicles on odd and even numbered days.

Preferred Solution

Public transport is the most viable solution, according to me. I am basing this on certain assumptions

  • Only road transport is covered
  • The scenario described is that of Mumbai, it may or may not apply to other places

Reasons

  1. Less Congestion: Mass means of transport like buses and trains can carry higher number of passengers in lesser space compared to vehicles like cars and bikes.
  2. Reusability: Once a person reaches their destination, the same space can be taken up by somebody else. Thus, there's resusability of the same space. In case of private vehicles the space lies vacant till used again.
  3. Space Saving: Since public transport is reusable, we need a lower number of public transport vehicles. Also, that mass means of transport can fit in more people per area. This leads to saving of space for parking and while plying the vehicles on the road.
  4. Flexibility of Timing: As compared to other options like car pooling, public transport is much more flexible with respect to time. Trains are much faster over longer distances, over shorter distances cabs and autorickshaws can take you to your destination as quickly.
  5. Lower Total Cost: Mass transport options like buses and trains are cheaper to travel. Though, cabs and rickshaws may sound expensive, when considered with option of sharing it becomes cheaper. Add to that, the cost of maintenance is to be borne by the vehicle owner unlike public transport.

My Story

But, there are reasons why I use public transport lesser:

  • Is much less fun unless when travelling in a big group over longer distances.
  • Going out and exploring some nice places is better done in your cycle, bike, car as compared to public transport
  • Going out biking with a group of friends once in a while is a must.
  • Trains and buses are too crowded, which makes me choose my 2 wheeler over those.
  • Still, I tend to balance between using public transport and my bicycle (now that my bike is stolen), though I tend much more heavily towards my bicycle.

 

The 6th edition of our favourite unconference – BarCamp Mumbai will be held on Sunday, October 11th, 2009 at S. P. Jain Institute of Management and Research.

""
BarCamp Mumbai is an ad-hoc gathering of people born from the desire to share and learn in an open environment. It is an event with discussions, demos and interaction from participants.

BarCamp Mumbai is in essence a conference without a pre-set agenda. We prefer the term ‘unconference’ actually. A bunch of smart people meet up over the weekend, put up a schedule on a wall and spend the rest of their time taking up sessions and discussions with each other. There is no audience. Only participants.

So host a session, help out with planning, ask questions, spread the word- Everybody is invited. There really are no walls – or rules for that matter!

You can register your attendance for the event at http://bcm6.eventbrite.com. If you wish to speak, you can register your topic at http://barcampmumbai.org/register.

Looking forward to meeting you there!

Address:

Sunday, October 11th, 2009.
S. P. Jain Institute of Management and Research,
Bhavans College Campus,
Munshi Nagar, Dadabhai Nagar Road,
Andheri West,
Mumbai

You can find more details on how to reach there on the website.

Curious about the last BarCamp in Mumbai? Check out photographs, and the newspaper coverage from previous barcamps: Photos and News.

 

Mumbai is popularly known as city that never sleeps. I have been a witness and contributor to it since college days. Those days we used to spend time with friends sitting around Churchgate station having chai and bun maska or go out with my bike and travel and length and breadth of Mumbai. Mumbai is far from quiet at that hour. It's abuzz with activities from night time food hawkers to merry party goers to cars owners racing on the empty roads to various kinds of shady people lining the streets to make money.
Amongst such night creatures is us new breed of cyclists, who enjoy going out for rides in the night. Joined by a group of 10-15 cycling enthusiasts from all across the city, we gather at a pre-determined starting point and cycle around the city. We are greeted to the sights of curious passer-by's who inquisitively ask us about cycling, teenagers driving around rashly, deserted by-lanes of the city and so much more.

Some of my memorable moments from night ride are:-

  • Wide empty roads of Reclamation.
  • Climb up Mt. Mary road and fast paced descent down to Bandstand.
  • Silent lanes around Carter Road.
  • Curious people popping around to cheer us cyclists.
  • Sitting in group and late night grub at Dadar and CST.
  • Busted party at Worli Seaface.
  • Enjoying the breeze and waves at Worli Seaface and Marine Drive.
  • The tiring steep climb opposite PDP.
 

Have you been unfairly charged by our service providers? I am sure all of us have faced such a situation at some point in our life. So what do we do? Here's my experience with Vodafone recently.

The Problem
Last week, accidentally a few key presses caused caller tunes to get activated on my Vodafone number. This led to deduction of Rs. 50 from my balance and activation of a crappy ringtone. So, the next day I called up Vodafone Customer Care. They informed me that nothing can be done to deactivate and get back my balance. Instead he had the audacity to tell me "Now that you've activated it, just use it." Like he pays for my bills!

The steps
So, the next day I tweeted about the same. To this, I got a negative reply that there's no chance of getting it back. And two people who experienced the same and never got their money back.
I still decided to go ahead and give it a try. First step was to have a written, verifiable record. Doing this in writing and submitting it at a Vodafone store is difficult to manage with work timings. Thus, I visited the vodafone website and visited "Got a problem" page. So, the best way forward was to contact them. My chosen medium was e-mail.
This was the email sent by me to vodafonecare.mum at vodafone.com

Dear Sir,
   On Saturday i accidentally dialed a friend's number and numbers
8*2 got pressed accidently while the call was in progress. This
incident activated caller tune on my number, without any additional
intimation or warning. I just got a SMS to inform me that a caller
tune has been activated on my number. A call to the customer care
proved to be futile. I don't need or want to have a caller tune. I
would just like to have my balance back.
  And while at it, it would be surely preferable if an esteemed
telecom company like you stop using such cheap tactics. Just an
additional SMS to confirm the activation of caller tune would be so
much more convenient and error proof. I would urge you to take steps
in this direction and thereby avoiding your customer losing faith in
your services.
  Hoping for a positive response.
With Regards
Mehul Ved.

The Response
There was no response to the email. Just as I was considering reaching to the nodal officer, there was a reply. Finally!! 4 days later they reply to me by email that they will get back to me shortly.

Dear Mr.Ved,
Thank you for taking the time to speak with us. We hope we have addressed your concern regarding Caller tune charges for your Vodafone mobile number 9819XXXXXX.
In case you need any further assistance, do call or email us, We'll do our best to help you. 
Happy to help

I decided to wait for another couple of days to see what happens next.
Finally I got a call 3 days later from Vodafone. I was anxious as to what will be the reply. Luckily they agreed to reverse the charges but made it sounds like they were doing me some favour by saying that they are doing it just this once as a goodwill gesture. Balls they've got.

The Followup
Two days later I did get a refund. But, the refund was worth Rs. 45 instead of Rs. 50 which was originally cut. Something better than nothing.
This was followed up with an email from my side as to how they can improve the system to remove this inconvenience. Here's the text from the email

Thank you for addressing my query. I would appreciate if steps are
taken to correct the fault in the procedure for copying caller tunes
from friend. The current procedure is causing inconvenience and
feeling of dissatisfaction amongst many customers of Vodafone. The
current procedure is
1) Dial your friend's number
2) Press  while the friend's caller tune is playing
3) Send SMS to inform of activation of service.
If you notice here, there is no step for confirmation in accidental
press of  button.
This procedure could be easily corrected by implementing the following steps
1) Dial your friend's number
2) Press * while the friend's caller tune is playing
3) Send SMS that a request has been sent for activation of caller
tunes. Do you want to really activate caller tune?
4) Once the confirmation SMS is sent, activate the caller tunes
5) Send SMS to inform of activation of service.

I hope this post will help others who've been bullied by their service providers and have been unfairly charged for services. If you do have such experiences of your own, please do post it on your blog to give it a visibility and motivate people to not take the atrocities of the service providers, just lying down.

 

I started cycling in my school days and used to ride my bicycle regularly but almost gave it up ever since I came in the college. But, a year back I returned back to cycling after buying a new bicycle.

But, I was hit by cycling bug last month after reading tweets from Mrugesh, Aalaap and Shakti on cycling.

It first started with cycling off to work, which has slowly become a regular activity for me. I end up cycling about 100-150km per week. One downside to this activity is the amount of sweat that I end up with. The scorching heat doesn't help any, adding to the amount of sweating. And the lack of bath rooms means I have to make do with 2 pairs of shirts each day. But, totally worth it. It's also fun to have a look at people who stare at me as if I was an alien just cos I wear formals while cycling. Kya kare there's no way out.

Besides cycling to work, I go cycling on Sunday morning with the group at cyclists.in. The event, started by Aalaap, is known as Ride The Weekend. A group of people numbering from 2-6 people meet up at Shivaji Park at &lt;s&gt;7 a.m.&lt;/s&gt; 6:30 a.m. and go to different locations around Mumbai. In the 5 RTW's that have happened so far we have been to Bandra, Marine Drive, Wadala and Worli Seaface. Each ride has been awesome – meeting new people, learning more about bicycles in the process.
Lately, a event has been happening on Saturday mornings too. People gather at Bandra at 6:30 a.m. and go riding. I am looking forward to join them this week. If I can find a place to have a bath along the way, I could stay for the whole event.
Among my cycling to do list is getting a helmet, always be safe than sorry. And prolly buy a new bicycle in the next couple of months. My current Hero Hawk was never bought with such long rides in mind.

If you're into cycling and in India, do join cyclists.in they have lots of people spread around India and visiting different places. And if you live in Mumbai you could join us for RTW and other events.

© 2012 Sneek-A-PeekSuffusion theme by Sayontan Sinha

Switch to our mobile site