понедельник, 23 апреля 2012 г.

Best /etc/hosts ever


127.0.0.1 localhost

# Distracting sites
127.0.0.1 vkontakte.ru
127.0.0.1 vk.com
127.0.0.1 facebook.com
127.0.0.1 fb.me
127.0.0.1 mamba.ru
127.0.0.1 plus.google.com
127.0.0.1 twitter.com
127.0.0.1 odnoklassniki.ru
127.0.0.1 moikrug.ru
127.0.0.1 linkedin.com

127.0.0.1 youtube.com
127.0.0.1 habrahabr.ru

четверг, 19 апреля 2012 г.

How to set a bookmark in Emacs?


  • ‘C-x r m’ – set a bookmark at the current location (e.g. in a file)
  • ‘C-x r b’ – jump to a bookmark
  • ‘C-x r l’ – list your bookmarks
  • ‘M-x bookmark-delete’ – delete a bookmark by name

среда, 18 апреля 2012 г.

How to configure clean Debian machine for Ruby development

# apt-get update
# sudo apt-get install emacs wget ruby-full ruby-dev build-essential libpq-dev sudo libsqlite3-dev apache2
# wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.22.tgz
# tar xzf rubygems-1.8.22.tgz
# cd rubygems-1.8.22
# sudo ruby setup.rb
# gem install rails
# adduser gennad

# apt-get install -y libcurl4-openssl-dev  zlib1g-dev apache2-prefork-dev libapr1-dev libaprutil1-dev
# gem install passenger
# passenger-install-apache2-module
# rails new myapp
echo "gem 'therubyracer'" >> myapp/Gemfile
cd myapp
bundle install

# emacs /etc/sudoers  # edit sudoers t include gennad user there
# su gennad

# emacs config/environments/production.rb
...
config.assets.compile = true