Tatva-Artha

meaning of "it"

Archive for June, 2009

Vonage charges: what your 24.99 deal will actually cost you

with one comment

Talking about hidden charges, telephone companies are one of the most notorious. It is not entirely their fault since a lot of the add on charges are imposed by governenment etc. Vonage is not different. I just signed up and here is what my advertized 24.99 bill looks like:

Charges Detail:

Residential Premium Unlimited Plan for 1-(XXX)XXX-XXX (08/Mar-07/Apr) $24.99
Regulatory Recovery Fee $0.99
Emergency 911 Cost Recovery $0.99
State Communications Service Tax $2.01
Federal Program Fee $1.75
Local Communications Service Tax $1.72
County 911 Fee $1.25
State Telecom Infrastructure Maintenance Fee $0.14
Total Amount $33.84

Written by Sharad

June 24th, 2009 at 11:12 pm

Posted in All

Tagged with , ,

Pillars of Ayurvedic Treatment

without comments

Listening to Baba Ramdev‘s program on Zee TV.. heard these 4 pillars of Ayurvedic treatment:

  1. Ayurved
  2. Acupressure
  3. Balanced lifestyle: food that restrains intake of milk, ghee/butter, oil and sugar/sweets.
  4. Yoga

Written by Sharad

June 15th, 2009 at 2:18 am

Posted in All

Tagged with , ,

mysql user management idiosyncracies

without comments

Ok, we are all used to adding new user in mysql with following command:

GRANT ALL ON [db].* TO [user].’%’ IDENTIFIED BY ‘[PASS]‘

So, what happens when you added user before creating the said database. Well, as I found out, mysql won’t complain. Oh well, so what happens if you create the database for the user after the fact. No, it won’t back fix the privileges.

So, I had to delete and recreate the user. Having not done this before, I just tried:

DROP USER [user]

and it worked! The only caveat here is if you added the original user for a particular host, you have to specify host when deleting, like this:

DROP User [user]@’[host]‘

Re-creating the user fixed the problem.

Enjoy!

Written by Sharad

June 5th, 2009 at 7:26 pm

Posted in All,Technology

Tagged with

Twittering my blogs using twitter-tools

without comments

Now that I have been using twitter regularly to post my random thoughts, I also wanted to hook it upto my blog so my new blogs get twitted automatically. As I realize there are tons of plugins for this for my wordpress blogging engine. Without any deeper feature comparision, I went with twitter-tools. I guess this is the most common twitter plugin for wordpress. It was as easy as to install and setup as it can be and seems to have most of the things I can think of. And yes, this is my first blog after that.

Happy blog twittering!

Written by Sharad

June 5th, 2009 at 3:40 am

Posted in All,Technology

Tagged with ,

Hosts file on Windows Vista

without comments

Getting hosts file (for DNS resolution) to work on Windows vista could be aggravating because of all the security and access control that it has in place. In my case, I couldn’t get it to honor the entries in my hosts file. Commonly proposed solutions modifying UAC, and flushing DNS cache didn’t work for me.

Today I found this. stopping/restarting dns cache service worked. Not sure how this is different from flushing-dns but it worked for me.

> net stop dnscache

> net start dnscache

Written by Sharad

June 4th, 2009 at 2:47 pm

Posted in All,Technology

Tagged with , ,

Stick with ERB or move to Haml

with one comment

Haml is gaining popularity in Rails community. It claims higher productivity compared to defacto ERB templating. Not everybody agrees though. I see 2 short-term problem with haml.

  1. ERB is similar to it pre-decessor and hence easier to learn. Compared to JSP etc. ERB is similar, you still see lots of HTML tag with interleaved ruby (or Java). Although verbose, it is closer to how your HTML would finally look like.
  2. If your team has a dedicated HTML programmer (Designer as we may call them). These folks are very good at plain HTML and don’t want the trouble of converting files and having all the plumbing around when working. It is not efficient for them.

Despite this, I see Haml as valid alternative for following reasons:

Read the rest of this entry »

Written by Sharad

June 3rd, 2009 at 3:03 pm

Posted in All,Technology

Tagged with , , ,

Rails Following Core development

without comments

If you are a passionate ruby/rails developer, you ought to be following the discussion at rubyonrails-core. Why? because the discussion (like this) that goes on about how to fix current deficiencies are really really exciting. It not only explains what the creators of the framework had in mind when designing bits and pieces and why and why not something should be changed. Whether or not something gets accepted into the framework, it does reveal the full-truth behind the correct usability of a feature.

Great stuff. Enjoy!

Written by Sharad

June 3rd, 2009 at 2:36 pm

Posted in All,Technology

Tagged with ,

Passenger, Apache, Ruby configuration

without comments

Installing passenger to work with apache for rails application is especially pleasant since it gives you direction to setup apache passenger module properly. I have done it several times and it has always worked. Recently I had to change the version of ruby that passenger uses and all I had to do is change the PassengerRuby directive in httpd.conf (or apache.conf) as follows:

#LoadModule passenger_module /opt/ruby-enterprise-1.8.6-20090421/lib/ruby/gems/1.8/gems/passenger-2.2.2/ext/apache2/mod_passenger.so
#PassengerRoot /opt/ruby-enterprise-1.8.6-20090421/lib/ruby/gems/1.8/gems/passenger-2.2.2
#PassengerRuby /opt/ruby-enterprise-1.8.6-20090421/bin/ruby

LoadModule passenger_module /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.1.2/ext/apache2/mod_passenger.so
PassengerRoot /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.1.2
PassengerRuby /opt/ruby/bin/ruby

I am not sure if this is the recommended way but it worked for me.

Enjoy!

Written by Sharad

June 2nd, 2009 at 3:45 pm

Posted in All,Technology

Tagged with , ,

Redirecting from http to https

without comments

Quick Info:

<VirtualHost *:80>
...
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</IfModule>
</VirtualHost>

Enjoy

Written by Sharad

June 2nd, 2009 at 3:20 pm

Posted in All,Technology

Tagged with ,

Rails Constants: Location matters

without comments

Rails framework provides a standard location for defining application specific constants. All default constants go in constant/environment.rb and any environment specific overrides go in config/environments/<env>.rb file. Normally, any constant that is overridden in environment specific file takes precedence. However, there is a catch. If a constant is defined outside of Rails::Initializer.run block then it overrides all other definition preceding it.

Hence, when defining constants in default config/environment.rb file, beware:

require File.join(File.dirname(__FILE__), 'boot')
Rails::Initializer.run do |config|
A_CONSTANT = "value"
end
# Do not define environment specific constants here.

Enjoy!

Written by admin

June 1st, 2009 at 9:42 pm

Posted in All,Technology

Tagged with ,