Recover MySQL root Password

You can recover MySQL database server password with following five easy steps. Step # 1: Stop the MySQL server process. # sudo /etc/init.d/mysql stop Step # 2: Start the MySQL (mysqld) server/daemon process with the –skip-grant-tables option so that it will not prompt for password. # sudo mysqld_safe –skip-grant-tables & Step # 3: Connect to […]

Easy Web Fonts with Google Font API

Web fonts allow you to step outside of the normal web-safe fonts by taking advantage of CSS’s @font-face rule. However, right now, browsers aren’t uniform in its implementation of @font-face. More specifically, web browsers differ in the types of font files they support (hopefully this will change with the WOFF standards). Additionally, you must be […]

Loading data from multiple files in Ruby using Hash

Loading data into Database reading from multiple files was never easy. I have been working on different projects lately, which required such exercise often. A general technique I followed to do that is explained here. In a gist, this is what it looks like: require ‘rubygems’ require ‘fastercsv’ files.each do |key, value| file = “#{RAILS_ROOT}/db/drugsatfda/” […]