linux

Tags:  •    •    •  

There are some importatnt step to install Nginx with passenger on a newly installed Ubuntu server.

1. step: Install RVM in multi-user mode
2. step: install dependencie for MRI ruby. There are a list in the end of rvm install message. Install these packages.
3. step: rvm install 1.9.2
4. step: After ruby installed successfully you need to install passenger with gem install passenger command.
5. step: You have got passenger gem, but haven't got nginx yet. Compile it from source: download, unpack, configure, make, make install.
6. step: nginx configuration

Tags:  •    •  

Some useful git command with branches and remote repositories.

Remote operations

List remotes:

git remote -v

Add remote gitosis server:

git remote add <remote_name> git@myhostname.com:my_project_name.git
git push <remote_name> master

Where master is your branch name

Main git branch orperations

list branches:

git branch -v

-v is optional, you use it to get more verbose output

Create new branch:

git checkout -b <new_branch_name>
Tags:  •    •    •    •  

Make config.ru with following content:

require 'rubygems'
require 'sinatra'
require './my_sinatra_application.rb'
 
run Sinatra::Application

You have to run bundle command. This will be install all necessary gems that listed in Gemfile.

You find debug log in default apache 2 error log files. This is /var/log/apache2/error.log in my case.

Tags:  •    •    •    •  

This small tutorial work on Ubuntu Hardy (8.04), Lucid 10.04 and Maverick (10.10)

Install Imagemagick and GraphicsMagick

apt-get install imagemagick graphicsmagick

Install Image Magick development files

apt-get install libmagickcore-dev libmagickwand-dev
gem install rmagick

On Hardy:
Install imagemagick from source and after it install development files:

sudo apt-get install libmagick9-dev
Tags:  •    •    •    •    •    •  

There are some easy steps to install Phusion Passenger for ruby 1.9.2 and apache2 on Ubuntu Linux.

1. Install rvm system wide

sudo bash < <( curl -L http://bit.ly/rvm-install-system-wide )

2. Install ruby 1.9.2

rvm install 1.9.2

3. add new line in /etc/bash.bashrc

[[ -s /usr/local/lib/rvm ]] && . /usr/local/lib/rvm

4. install passenger

sudo -i # you need root shell
rvm use 1.9.2-p0@global # or your version, use: rvm list

Tags:  •    •    •  

This blog entry show you how to use pivot or portre mode on your LCD monitor under Linux. I know the way that NVidia card owners can rotate their screen. You have to use official NVidia driver for this method.

Tags:  •    •    •  

You can use Google's browser on Linux. The early access release of Chrome .deb package is available from site of Chromium.

Tags:  •    •  

Antialased fonts will be after this 3 easy step in Emacs (Ubuntu 8.10).

Tags:  •    •    •  

The well known way is svn export. Some times this command is not applicable. You can use this simple shell command in this case (Linux/*nix only).

Tags:  •    •    •    •  

When I upgraded my Ubuntu Linux from "Gutsy Gibbon" to "Hardy Heron" my gnome-terminal not shown some characters correctly anymore. I tried change the character encoding to UTF-8, but next time back again to ANSI_X3.4-1968. And I have found the solution.