Friday, December 18, 2009

Aptitude Package search in Linux

We can search the packages available in the synaptic package manager without accessing Synaptic Manger GUI mode.

In Terminal

$sudo aptitude search package name


It will gives you the package list which contains your package name. It also tells you whether this package is installed in your machine or not.

Installed Package - starts with 'i'
Not installed Package - starts with 'p'

for eg.,

sudo aptitude search firefox-3
i A firefox-3.0 - safe and easy web browser from Mozilla
i A firefox-3.0-branding - Package that ships the firefox branding
p firefox-3.0-dev - Development files for Mozilla Firefox
p firefox-3.0-dom-inspector - dummy upgrade package for firefox-3.0-dom-inspector -> xulrunner-1.9-dom-inspect
p firefox-3.0-gnome-support - Support for Gnome in Mozilla Firefox
p firefox-3.0-venkman - dummy upgrade package for firefox-3.0-venkman -> xulrunner-1.9-venkman
p firefox-3.1 - dummy upgrade package for firefox-3.1 -> firefox-3.5
p firefox-3.1-branding - dummy upgrade package for firefox-3.1 -> firefox-3.5
p firefox-3.1-dbg - dummy upgrade package for firefox-3.1 -> firefox-3.5
p firefox-3.1-dev - dummy upgrade package for firefox-3.1 -> firefox-3.5
p firefox-3.1-gnome-support - dummy upgrade package for firefox-3.1 -> firefox-3.5
i firefox-3.5 - safe and easy web browser from Mozilla
i A firefox-3.5-branding - Package that ships the firefox branding
p firefox-3.5-dbg - firefox-3.5 debug symbols
p firefox-3.5-dev - Development files for Mozilla Firefox
p firefox-3.5-gnome-support - Support for Gnome in Mozilla Firefox

Thursday, December 17, 2009

IBM's Mainframe Machine Dresses up with Linux

IBM's new system uses IBM's specialty Linux processor and runs either Novell SUSE or Red Hat systems. They are not using mainframe operating system z/OS but includes mainframe management software as well as IBM's z/Virtual Machine system on that machine. So IBM Machines are going to rock with Linux...

Details from
http://www.computerworld.com/s/article/9142007/IBM_s_newest_mainframe_is_all_Linux_

Saturday, December 12, 2009

git revert wrong commits

If you made any mistake in newly committed data then you can revert the git HEAD to previous commit.
For that u have to run the command

git revert --hard

for eg.,

$git revert --hard ab343n78


you can get this hash value in git log file for that you run this command

$git log


This shows you the Commit details in your local machine

Tuesday, December 8, 2009

Using Jekyll - blog post for static website

Basically jekyll is the gem which is mainly used for blog aware and static web page generator.
Jekyll follows its own directory structure and we can write it in any markup languages such as HTML, Textile or markdown etc.

#Install Jekyll gem

$ sudo gem install jekyll

You should have your website directory like

|--_layout/
|----default.html
|--_post/
|----2009-12-8-how-to-post-a-blog-using-jekyll.html
|--css/
|----style.css
|--js/
|--index.html
|--_config.yml

The configuration for jekyll as follows

#_config.yml

destination: ./_site
auto: false # for auto updation without restarting jekyll server
lsi: true
server_port: 4000 #port number for server
permalink: date #Type of url generated for _posts


The _layout/ folder contains the default layout for website and you can have multiple layouts

The _post/ folder contains the blog post for your website Blog.

The post file name should be in this format "2009-12-8-how-to-post-a-blog-using-jekyll.html"
For reference

In terminal

cd website/ #give project directory
jekyll #It creates the _site/ in your website folder

The _site/ folder has the static web pages with blog posts...

For example:

Layout page i.e default.html has html, head and body tags

default.html:

Inside Body tag contains
{{ content }}

This will replace the content for each page..

The Index.html looks like

index.html

---
layout: default
title: Index Page
---

<------ content for index page ---------->


After runninng the jekyll all this convention are converted as static page.