Posts

Showing posts from May, 2012

Italic font rendering issue in Ubuntu 11 04

In Ubuntu 11.04 I had to install ttf-dejavu-extra fonts for rendering italic fonts properly $ sudo apt-get install ttf-dejavu-extra This helped me find the solution -  http://support.mozilla.org/en-US/questions/886261 After installing it is now rendering italic characters properly :)

Rails 3 with aws s3

Send emails with Amazon SES in Rails 3 I have been using aws-ses gem quite successfully in Production env. In your Gemfile add: create an initializer in config/initializers Configure ActionMailer   Set delivery mehtod to amazon ses in environment.rb or in a specific environment as needed eg. config/environments/production.rb  

Very good post to understand basic regex Expressations

Image
http://net.tutsplus.com/tutorials/other/8-regular-expressions-you-should-know/ Here is a wonderful post to understand how regex can be used for most basic matches and valiadations in general. This can help better understanding for making more complex use In computing, regular expressions provide a concise and flexible means for identifying strings of text of interest, such as particular characters, words, or patterns of characters.

Changing session to database based in Rails 3

In config/initializers/session_store.rb:

Difference between rake db:migrate db:reset and db:schema:load

db:migrate   runs (single) migrations that have not run yet. db:create   creates the database db:drop   deletes the database db:schema:load   creates tables and columns within the (existing) database following schema.rb db:setup   does db:create, db:schema:load, db:seed db:reset   does db:drop, db:setup   Normally, db:migrate used after having made changes to the schema via new migration files after creating db i.e when db already exists. db:schema:load is used when you setup a new instance of your app.

Basic Linux survial commands list

<  The humble Linux cheat sheet  > A small Linux cheat sheet, introducing the very basic and very essential commands for surviving at the Linux CLI. Moving around in the file system Command Action pwd "Print working directory" - show what dir you're in. ls List the contents of a dir. ls -l List the contents of a dir and show additional info of the files. ls -a List all files, including hidden files. cd Change directory. cd .. Go to the parent directory. Examining files Command Action file Determine the type of a file. cat Concatenate a file. less View text files and paginate them if needed. Manipulating files and directories Command Action cp Copy a file. cp -i Copy a file and ask before overwriting. cp -r Copy a directory with its contents. mv Move or rename a file. mv -i Move or rename a file and ask before overwriting. rm Remove a file. rm -r Remove a directory with its contents. rm -i Ask before removing a file. Good to use with th

Extract uri from String in ruby

URI.extract makes it easy to find links in pages. "Extracts URIs from a string. If block given, iterates through all matched URIs. Returns nil if block given or array with matches."

Some good tech websites to follow

This is just a small list of tech website I personally found worth following. Ars Technica  – This site caters to computer enthusiasts and covers a wide array of technology, science and gaming news. It is one of the sites most-linked-to by tech blogs and news sites. Cnet.com  – This site is the one which we consider to be Engadget’s counterpart in the business-oriented world of tech reporting. It’s stable of reliable news and rumor sources still deliver breaking news and exclusives reported in a professional, business-like style of writing. Computer World  – The site is one of the tech industry’s oldest and leading source of technology news and information for IT influencers. It is still one of the leading source for breaking news, industry analysis and opinions. Droid Life  – Another Android-centric tech news site. The site covers anything and everything about the Android platform including lineups of DROID phones, apps, reviews and videos. Electronista  - The general t