How to install Imagemagick on linux and check Imagemagick

In this tutorial we will give information about, How to install Imagemagick on linux and check Imagemagick. Imagemagick is great application for image manipulation on linux box.

What is Imagemagick?

ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

install Imagemagick on linux

The functionality of ImageMagick is typically utilized from the command-line or you can use the features from programs written in your favorite language. Choose from these interfaces: G2F (Ada), MagickCore (C), MagickWand (C), ChMagick (Ch), ImageMagickObject (COM+), Magick++ (C++), JMagick (Java), L-Magick (Lisp), Lua (LuaJIT), NMagick (Neko/haXe), Magick.NET (.NET), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), IMagick (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images dynamically and automagically.

Use following command for Installing the Imagemagick
#su
#YOUR_PASSWORD
#yum install imagemagik

OR binary installtion follow this:
tar -xzf imagemagic1.2.3.4.5.6.tar.gz
cd imagemagic1.2.3.4.5.6
./configure
make
make check
make install

How to check Imagemagick on Fedora:
[root@siwank-pc html]# rpm -ql ImageMagick
/usr/bin/animate
/usr/bin/compare
/usr/bin/composite
/usr/bin/conjure
/usr/bin/convert
/usr/bin/display
/usr/bin/identify
/usr/bin/import
/usr/bin/mogrify
/usr/bin/montage
/usr/bin/stream
…….

For running the ImageMagick use following commands
#animate or #display

Solved trailing slash issue with Nginx server

I added following block in my nginx.conf file. You should add following lines in your server { } block.

We Solved trailing slash issue with Nginx server

If you want use URL without ending trailing slash. then use following code.
#code block added for trailing slash issue solving
server_name_in_redirect off;
optimize_server_names off;
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_access group:rw all:r;
create_full_put_path on;

if (-d $request_filename) { rewrite ^(.*[^/])$ $1/ break; }
if ($request_method = MKCOL) { rewrite ^(.*[^/])$ $1/ break; }
Above code will check if folder is present then fetch data from there. If you have some idea about MKCOL then you will know above code in better way.
If Your problem will not solved from above code then use following code.
#here we are adding trailing slash end of Url
if ($request_uri ~* “^[\w\-\/]+[^\/?]$”) {rewrite ^(.*)$ $scheme://$host$1/ permanent;}
This will add the ending slash to your url.

How to Install IE6 and IE7 on Fedora

Here in this article we will guide you to Install IE6 and IE7 on Fedora or any linux system. Now days I6 and IE7 is not used by people still I am updating this post.

Note: Don’t became root because these files will crash your linux.

Use following commands for installing the IE7 on your box.
#su
#ROOT_PASSWORD
#yum install wine cabextract
#exit
Here we are exiting the root user

#cd /tmp
#wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
#tar xvfz ies4linux-latest.tar.gz
#cd ies4linux-*
#./ies4linux –no-flash –install-ie7

I tried following command multiple times than I got succeed(6 or 7 times). Many times this command not executed properly.
#./ies4linux –no-flash –install-ie7

To launch IE6 Type on command prompt:
#ie6

To launch IE7 Type on command prompt:
#ie7

My comments
IE6 and 7 is running properly on my machine but some time it gives me error about IE7.
I am looking forward to solve that issue.

How to install Google Chrome on Linux or Fedora

Just open the following URL;
http://www.google.com/chrome/eula.html

Download your rpm file for installtion.

#rpm -i google-chrome-beta_current_i386.rpm

That sit.

After installtion you can install very usefull Google Chrome Extensions.

https://chrome.google.com/extensions/

16 best firefox addons for Programmers and Developers

Mozilla Firefox is becoming more and more powerful tool in these days. Using right add-ons it will start to become a tool, You can`t live without as web-developer! Each of these plugins can make certain things easier and that`s especially important for web-developers

1. ColorZilla
ColorZilla offers You an advanced eyedropper, colorPicker, page Zoomer and other colorful goodies.

2.Delicious Bookmarks
Delicious bookmarks is official Firefox addon for del.icio.us. It integrates your browser bookmarks and tags, to keep them in order and “easy to find” way.

3. Domain Details
Displays Server Type, Headers, IP Address, Location Flag, and links to Whois Reports. Shows links to check server status and cache when page fails to load.

4. DOM Inspector
DOM Inspector is a tool that can be used to inspect and edit the live DOM of any web document or XUL application. The DOM hierarchy can be navigated using a two-paned window that allows for a variety of different views on the document and all nodes within.

Check my firefox plugins screenshot.

5. Firebug
Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page…
6. Firephp
FirePHP enables you to log to your Firebug Console using a simple PHP method call.

7. IE NetRenderer
Render the current page with IE NetRenderer

8. JavaScript Debugger
A powerful JavaScript debugging environment for Mozilla based browsers.

9. JavaScript Options
Provides advanced JavaScript options for Firefox.

10. MeasureIt
Little Firefox extension that enables you to draw a ruler across any webpage to check the width or height of a element.

11. ScreenGrab!
Screengrab saves entire web pages as images. This tool will allow You to take screenshots of what is currently on your screen – you can even choose the portion of the screen you want to “grab”!

12. Speed dial
Direct access to your most visited websites

13.StumbleUpon
StumbleUpon helps you to find new sites very easy.If you are a web-developer, StumbleUpon can drive a huge amount of visitors to your website.

14. View Cookies
It adds a tab to the Page Info dialog box, which shows the cookies belonging to the current page.

15. View Source Chart
HTML Source Code GUI

16. Web developer
Web Developer`s tool bar probably will become one of the best plugins You`ve ever seen. It comes with his own tool bar that gives many useful tools for analyzing, validating and optimizing web-pages. The great thing about this plugin is that it’s on a few different browsers, so if you switch between them you will be able to use the same plugin on all.

MS-paint on Linux or Fedora or MS-paint options on Linux

I am big fan of Ms-paint. Ms-paint is really good tool for editing images.
But searched paint for linux os. I got really alternative solutions.

kolorpaint is the solution. I am using the Fedoa 11.
Go to following URL:
http://kolourpaint.sourceforge.net/download.html

Download the rpm for as per linux version.
User following commands for installing kolorpaint.

[root@siwank-pc Download]# rpm -ivh kolourpaint-1.2.2-2.fc7.rf.i386.rpm
warning: kolourpaint-1.2.2-2.fc7.rf.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1aa78495
Preparing…                ########################################### [100%]
1:kolourpaint            ########################################### [100%]
[root@siwank-pc Download]#

Here is screen shot of kolorpaint.

How to change the computer name in linux

Follow me if you want to change the computer name on Linux
[siwan@localhost ~]$ hostname siwan
hostname: you must be root to change the host name
[siwan@localhost ~]$ su
Password:
[root@localhost siwan]# hostname siwan
[root@localhost siwan]#

close the terminal or command prompt and start again

[siwan@siwan ~]$

your Pc name will be siwan

command : hostname your_desired_computer_name

How to host multiple rails site on Nginx

Nginx famous now. We given information for how to host multiple rails site on Nginx. we given the configuration code along with their detailed information.

How to host multiple rails site on Nginx

User following code in Nginx.conf file.. and paste into that file.
#vim /etc/nginx/nginx.conf


http {
include       /etc/nginx/mime.types;
default_type  application/octet-stream;
access_log  /var/log/nginx/access.log  main;
sendfile        on;

upstream mongrel_cluster_example1 {
server 127.0.0.1:8000;
server 127.0.0.1:8001;
server 127.0.0.1:8002;
}

upstream mongrel_cluster_example2 {
server 127.0.0.1:3000;
server 127.0.0.1:3001;
server 127.0.0.1:3002;
}

# Load config files from the /etc/nginx/conf.d directory
include /etc/nginx/conf.d/*.conf;

server {
listen       80;
server_name  example1.com example2.net;
client_max_body_size 120M;

set $myroot /var/www/html;
if ($host ~* example1\.com$) {
set $myroot /home/example1/public;
}

if ($host ~* example2\.net$) {
set $myroot /home/example2/public;
}

root $myroot;

location ~* ^/(images|stylesheets|javascripts).+\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$
{
root $myroot;
}

location / {

if ($host ~* example1\.com$) {
proxy_pass      http://mongrel_cluster_example1;
} #if check for domain qa.teenangel ends here

if ($host ~* example2\.net$) {
root /home/rail_project/myproject/public;
proxy_pass      http://mongrel_cluster_example2;

} #if check for domain ends here

}

}

}

USA State list for Rails

Every time we need this migration script for our projects
Use following command for Model generate
[siwan@localhost siwan]$ ruby script/generate model UsStates
exists app/models/
exists test/unit/
exists test/fixtures/
create app/models/us_states.rb
create test/unit/us_states_test.rb
create test/fixtures/us_states.yml
exists db/migrate
create db/migrate/20091117115011_create_us_states.rb
[siwan@localhost siwan]$

Open the /db/migrate/20091117115011_create_us_states.rb file and paste following code:

class CreateUsStates ‘Alabama’, :abbreviation => ‘AL’
UsStates.create :name => ‘Alaska’, :abbreviation => ‘AK’
UsStates.create :name => ‘Arizona’, :abbreviation => ‘AZ’
UsStates.create :name => ‘Arkansas’, :abbreviation => ‘AR’
UsStates.create :name => ‘California’, :abbreviation => ‘CA’
UsStates.create :name => ‘Colorado’, :abbreviation => ‘CO’
UsStates.create :name => ‘Connecticut’, :abbreviation => ‘CT’
UsStates.create :name => ‘Delaware’, :abbreviation => ‘DE’
UsStates.create :name => ‘District of Columbia’, :abbreviation => ‘DC’
UsStates.create :name => ‘Florida’, :abbreviation => ‘FL’
UsStates.create :name => ‘Georgia’, :abbreviation => ‘GA’
UsStates.create :name => ‘Hawaii’, :abbreviation => ‘HI’
UsStates.create :name => ‘Idaho’, :abbreviation => ‘ID’
UsStates.create :name => ‘Illinois’, :abbreviation => ‘IL’
UsStates.create :name => ‘Indiana’, :abbreviation => ‘IN’
UsStates.create :name => ‘Iowa’, :abbreviation => ‘IA’
UsStates.create :name => ‘Kansas’, :abbreviation => ‘KS’
UsStates.create :name => ‘Kentucky’, :abbreviation => ‘KY’
UsStates.create :name => ‘Louisiana’, :abbreviation => ‘LA’
UsStates.create :name => ‘Maine’, :abbreviation => ‘ME’
UsStates.create :name => ‘Maryland’, :abbreviation => ‘MD’
UsStates.create :name => ‘Massachutsetts’, :abbreviation => ‘MA’
UsStates.create :name => ‘Michigan’, :abbreviation => ‘MI’
UsStates.create :name => ‘Minnesota’, :abbreviation => ‘MN’
UsStates.create :name => ‘Mississippi’, :abbreviation => ‘MS’
UsStates.create :name => ‘Missouri’, :abbreviation => ‘MO’
UsStates.create :name => ‘Montana’, :abbreviation => ‘MT’
UsStates.create :name => ‘Nebraska’, :abbreviation => ‘NE’
UsStates.create :name => ‘Nevada’, :abbreviation => ‘NV’
UsStates.create :name => ‘New Hampshire’, :abbreviation => ‘NH’
UsStates.create :name => ‘New Jersey’, :abbreviation => ‘NJ’
UsStates.create :name => ‘New Mexico’, :abbreviation => ‘NM’
UsStates.create :name => ‘New York’, :abbreviation => ‘NY’
UsStates.create :name => ‘North Carolina’, :abbreviation => ‘NC’
UsStates.create :name => ‘North Dakota’, :abbreviation => ‘ND’
UsStates.create :name => ‘Ohio’, :abbreviation => ‘OH’
UsStates.create :name => ‘Oklahoma’, :abbreviation => ‘OK’
UsStates.create :name => ‘Oregon’, :abbreviation => ‘OR’
UsStates.create :name => ‘Pennsylvania’, :abbreviation => ‘PA’
UsStates.create :name => ‘Rhode Island’, :abbreviation => ‘RI’
UsStates.create :name => ‘South Carolina’, :abbreviation => ‘SC’
UsStates.create :name => ‘South Dakota’, :abbreviation => ‘SD’
UsStates.create :name => ‘Tennessee’, :abbreviation => ‘TN’
UsStates.create :name => ‘Texas’, :abbreviation => ‘TX’
UsStates.create :name => ‘Utah’, :abbreviation => ‘UT’
UsStates.create :name => ‘Vermont’, :abbreviation => ‘VT’
UsStates.create :name => ‘Virginia’, :abbreviation => ‘VA’
UsStates.create :name => ‘Washington’, :abbreviation => ‘WA’
UsStates.create :name => ‘West Virginia’, :abbreviation => ‘WV’
UsStates.create :name => ‘Wisconsin’, :abbreviation => ‘WI’
UsStates.create :name => ‘Wyoming’, :abbreviation => ‘WY’

end

def self.down
drop_table :us_states
end
end

Goodlunk, This code will save your problem of fetching USA state names and abbreviations as per id

Check my controller code…Just put in your controller

@us_states = USStates.find(:all)

<% form_for :customer, @customer, :url => { :action => “new_application” } do |f| %>
<%= f.select :state_id,  @us_states.collect {|state| [ state.abbreviation, state.id ] } %>
<% end %>