How to highlight results in ls output:
ls|grep -E --color "sh$|$"
This will highlight all files with *.sh extension in current directory.
Where -E means that we’re matching entries with regex,
|$ means that we don’t want to skip entries that do not match our regex (passing pipe further and closing it with dollar sign).
To learn Vim with fun I started to search for some interactive guide with some practical step-by-step tasks.
I found a game that helps to remember the main Vim shortcuts:
git clone git://github.com/kikuchiyo/vim_game.git
Although I needed to spend some time to find out how to compile Ruby app with all dependencies.
Here is the recipe that worked for me:
First of all you need have installed MySQL server and Ruby itself:
sudo apt-get install mysql-server sudo apt-get install ruby
Then install bundler (dependency tool for Ruby):
sudo apt-get install ruby-bundler
You’ll also need Qt 4 (couldn’t completely compile app with Qt 5 but I guess it should be installed as well):
sudo apt-get install qt4-default
sudo apt-get install libqt5webkit5-dev sudo apt-get install qtquick1-5-dev qtlocation5-dev qtsensors5-dev qtdeclarative5-dev sudo apt-get install libsqlite3-dev libmysql-ruby libmysqlclient-dev
Then try to set up the application itself:
bundle install bundle exec rake db:drop db:create db:schema:load db:migrate bundle exec rails s