Ruby on Rails 3 - Console options - Display version

To know the version of your Ruby just write on your console:

$ ruby -v

UNIX & GNU/Linux - tcsh - Setting prompt with country flags

If you have always dreamed to change the classic prompt of your favorite Shell, it is time to see how to do it. Open your tcsh's config that you can find in your home, it is called .tcshrc and inside, modify the line:

set prompt='(%n@%m %h)'


UNIX & GNU/Linux - gdb - With Emacs

To start gdb, we have to add the -g flag at the compilation time.
So it is easy to add it in a Makefile. We are also using the Emacs IDE for running gdb.
Note that the code below does not work because we want to see the segmentation fault with gdb.

C - Linked lists - Simple example

Below, certainly the most easy example of the linked lists.

Let's see this example as a FILO, meaning First In Last Out:

Drupal 7 - Where to find - HTML body

Where to find the HTML body of Drupal version 7? Here the tree file until it:


Drupal 7 - Where to find - HTML header

Where to find the HTML header of Drupal version 7?

Here the breadcrumb until the file:



UNIX & GNU/Linux - Tips and tricks - Change the screen resolution

The command to change the screen resolution is xrandr, To see all size available for your screen:

$ xrandr

To choose the another one resolution just use the -s option with the resolution, for example:

$ xrandr -s 800x600

UNIX & GNU/Linux - System calls - Using open()

The open() system call function is used to open a file.

UNIX & GNU/Linux - tar - The xvf command

The xvf command of the tar tool allows to extract files from a file with the .tgz extension, in the current folder. Let's see an example of the xvf command:

UNIX & GNU/Linux - gcc - Commands -v

With the -v command of the gcc, you can see all programs invoked by the compiler. Let's try with an example of the -v command:

gcc -v

Result (certainly different on your system):


Subscribe to RSS