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 3I 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:migrateruns (single) migrations that have not run yet.
db:createcreates the database
db:dropdeletes the database
db:schema:loadcreates tables and columns within the (existing) database following schema.rb
db:setupdoes db:create, db:schema:load, db:seed
db:resetdoes 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 systemCommandActionpwd"Print working directory" - show what dir you're in.lsList the contents of a dir.ls -lList the contents of a dir and show additional info of the files.ls -aList all files, including hidden files.cdChange directory.cd ..Go to the parent directory.Examining filesCommandActionfileDetermine the type of a file.catConcatenate a file.lessView text files and paginate them if needed.Manipulating files and directoriesCommandActioncpCopy a file.cp -iCopy a file and ask before overwriting.

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 tech and gadget arm of th…