rails authentication: authlogic to devise

Originally posted on Nakshtra:
Are you using authlogic for authentication purpose in your rails application and now want to switch to Devise? Overview of Authlogic: user = User.find_by_email(‘test2@endpoint.com’) actual_password = “password” digest = “#{actual_password}#{user.salt}” 20.times { digest = Digest::SHA512.hexdigest(digest) } # compare digest and user.crypted_password here to verify password Note that the stretches value for…

git today: know your work

Originally posted on Nakshtra:
Do you want to know all your git commits from different repositories and even from different branches? First, create this alias: git config –global alias.today “log –since=midnight –author=’John Roy’ –oneline” Here replace author name with yours. You can avoid hard-coding your name as follows: git config –global alias.today ‘!git log –since=midnight –author=”$(git config user.name)”…

Send email from application via postmark

Postmark is widely used email delivery service for the web application. The “Postmark-Rails” Gem is a drop-in plug-in for ActionMailer to send emails via Postmark. Links: Postmark-app , Postmark-rails gem , Postmark Developer’s Blog To integrate it with your application: 1. Create an account on postmark.com (it also provides free account), set your-email as sender’s signature. This email-signature only you…

Heroku – How to Setup on local

To Setup Heroku on local machine we first need to add the heroku gem using, gem install heroku then we need to add heroku plugins using, heroku plugins:install git://github.com/ddollar/heroku-accounts.git we then need to add heroku account using, heroku accounts:add project –auto where “project” can be any name that’s meaningful to you, the name is only…