http://blog.andyhunt.info/2011/11/26/apache-ssl-on-max-osx-lion-10-7/
Category: Uncategorized
Show current Mercurial branch in shell (like in Git Bash)
hgBranch() { if [ -d .hg ]; then printf "$1" "$(hg branch)" fi } export PS1='${USER}@${HOSTNAME}:\w$(hgBranch " [\033[1;31m(%s)\033[0m]")$ '
Power of grep
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).
How to move several commits between branches in Mercurial (from stackoverflow)
Enable mq extension
[extensions] mq=
Do next things
hg qimport -r 1:3 # convert revisions to patches hg qpop -a # remove all them from history hg branch new # start a new branch hg qpush -a # push them all back into history hg qfin -a # finalize the patches
Vim game
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
Install dependencies:
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
Enjoy!