Monday, May 28, 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 :)

Friday, May 18, 2012

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


 

Thursday, May 17, 2012

Very good post to understand basic regex Expressations




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.


Wednesday, May 16, 2012

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
CommandAction
pwd"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 files
CommandAction
fileDetermine the type of a file.
catConcatenate a file.
lessView text files and paginate them if needed.
Manipulating files and directories
CommandAction
cpCopy a file.
cp -iCopy a file and ask before overwriting.
cp -rCopy a directory with its contents.
mvMove or rename a file.
mv -iMove or rename a file and ask before overwriting.
rmRemove a file.
rm -rRemove a directory with its contents.
rm -iAsk before removing a file. Good to use with the -r option.
mkdirMake a directory.
rmdirRemove an empty directory.

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 the Macintosh News Network continues to provide us with the latest news on technology, gadgets, mobile phones, DV, GPS, and digital photography.
Engadget – The world’s foremost source of breaking tech news and exclusives, all of which are updated around the clock simply  continues to sizzle. The question is, with the departure of its founder, Joshua Topolsky, can the site maintain the same witty, salient, and short articles that made it the number one tech site?
Gizmodo – Crunchgear’s closest rival continues to offer gadget reviews and breaking news on new gizmos and cutting-edge consumer electronics. While Gizmodo and Crunchgear offer much the same topics, their style of writing, staff, and voices are definitely distinct.
Google Mobile Blog – If you want the latest news about the Android platform, Android tablets, Google mobile apps on both iPhone and Android devices, this site should be one of your RSS feeds.
Inside Facebook – A Facebook-focused news site updated almost daily. It’s pool of writers are social media and social networking experts based on professional ties and experience.
Lifehacker – This may be everybody’s favorite go-to site for tech-related productivity tips, news and how-to articles. Lifehacker continues to help all of us work smarter and save time via recommended app and software downloads that we would miss if not for this site’s coverage.
Mashable – Another widely read tech news site, Mashable clearly deserves it’s reputation for being among the foremost providers of in-depth news and analysis of of all Web 2.0 startups and applications. The site continues to provide us with feature top lists, startup reviews, and comprehensive industry-specific comparative articles. The addition of Mashable Job Board has also been a welcome feature.
PCWorld – The online version of the popular magazine, this site provides quick access to authoritative reviews of tech products, pricing information, news and freeware and shareware downloads.
Pocket-Lint – Another great tech news site offering a one-stop site for gadgets, technology and consumer electronic news, reviews, commentary, videos and photos.
ReadWriteWeb – This site is perhaps Mashable’s closest rival when it comes to delivering web 2.0, social media and startup-centric news. Its articles stand out from the crowd for being comprehensive and incisive.
Slashgear – This site covers everything from cutting-edge tech gear and gizmo to the latest digital lifestyle trend. Their articles are distinctive, informative and fresh, covering news and reviews, as well as commentary. with a unique voice.
Techcrunch – Completing the web’s top three widely read and major tech news site (the other two being Engadget and Mashable), Techcrunch still may be the ultimate source for anything and everything on startups, Web 2.0, social networking and of course VCs. Whether the site is breaking interesting news or providing exclusive coverage, TC is among the premiere source of information.
Technology-Africa - Technology-Africa is an independent online news site dedicated to covering digital culture, social media and technology. Tecnology-Africa is fast becoming one of the most engaged online news communities in Africa and the world.  Technology-Africa is headquartered in Manchester, UK with offices in Nigeria and South Africa.
TheNextWeb – This site’s strength lies in providing news and views from an international perspective, with writers coming from Europe, Australasia, Middle East, Asia, Africa, North and South America. The site’s informal design is a welcome respite from many of the tech sites we see every day.
TheRegister – The premiere source of tech industry news in the UK stays in the game and plays it innings pretty well. The site continues to provide us with views, opinions and reviews with British bent.
Slashdot – The site offers a great variety of news from around the Web as well as from the Linux and Open Source industry.
Unwired View – For anything and everything about the wireless industry, this site beats most others for breaking news about mobile phones, accessories and apps.
Apple Insider – The site not only gives you Apple-centric news and reviews but also price and buying guides for all Apple-related machines and accessories.
Anand Tech - If you’re looking for hardcore analysis of news about hardware, this is the site for you. The site covers CPUs, motherboards, mobile and more.