Method lookup in Ruby

Rules: Search for method in: Its class Modules mixed into its class, in reverse order of inclusion The class’s superclass Modules mixed into the superclass, in reverse order of inclusion Likewise, up to Object (and…

Keyboard shortcuts on Lubuntu

Unfortunately LXDE doesn’t have option to edit shortcuts by default, but it’s easily can be done by editing some xml file sudo leafpad ~/.config/openbox/lubuntu-rc.xml <!— Lock the screen on Ctrl + Alt + f—> <keybind key=»C-A-f»> <action…

Getting mysql socket address

mysqladmin variables | grep socket will give you something like: | socket | /var/run/mysqld/mysqld.sock

Format flash drive from terminal

First of all type the below command for know the name of your pen dmesg | tail Then unmount your pen drive using the following command. sudo umount /dev/sdb1 Then enter the following command to…

Working with Heroku (tips)

To reset DB in Heroku run: heroku pg:info you will get something like === HEROKU_POSTGRESQL_ONYX_URL (DATABASE_URL) then run: heroku pg:reset HEROKU_POSTGRESQL_ONYX_URL To see live logs, just run:  heroku logs -t To access console: heroku run…