Creating an alias that migrates both development and test databases in rails project


In your rails project very often, after creating a new migration, you have to run the migration in the development database and then in the test database.


A neat way to combine both these steps as one, taken from the book Rails 4 in Action, is to create an alias in your ~/.bashrc configuration file with the following, so that you only have to run migrate after each migration that would apply the migration in both development and test databases:

alias migrate='bin/rake db:migrate && bin/rake db:test:prepare'

Resetting the web-gui dd-wrt password with telnet


You have forgotten your web-gui credentials to login into your dd-wrt router but you have still telnet access to it.


Login with telnet to your router and then run the following two commands to reset the web interface:

nvram set http_passwd=
nvram commit

and then go to your Web interface to set a new one.

* Based on this post