Will be updated if any tip is founded in Unix area.


1. GCC


a. How to check gcc default settings

    >> echo "" | g++ - -xc -v -E


b. How to see a full list of compiler defined macro.

>> gcc -dM -E - < /dev/null


2. Ubuntu

a. Installation of 32 bits libraries which enable to run 32 bit app on Ubuntu 64 bits ( Simpler method than b)

$ echo foreign-architecture i386 | sudo tee /etc/dpkg/dpkg.cfg.d/multiarch
$ sudo apt-get update
$ sudo apt-get install ia32-libs


b. Installation of 32 bits libraries which enable to run 32 bit app on Ubuntu 12.04 64 bits( I recommend use above way instead of this because a is much simpler. )



Answer: Refer to below description

(Original source: http://askubuntu.com/a/190419)


I had a similar problem with broken dependencies when trying to install wine and acroread, and a complaint when trying to install ia32-libs-multiarch, just after upgrading to 12.04 from 11.04 (passing over 11.10). It seems that some ppa's I had in 11.04 installed newer versions of applications in the system. After upgrading, the remains of these apps seemed to do some mess in the dependencies.

The solution that seems to work (until now), was found on a german ubuntu board (http://forum.ubuntuusers.de, posts from user Lasall):

First a downgrade is required and done with the following: create the 'preferences' file:

sudo vi /etc/apt/preferences

and insert the following lines:

Package: *       
Pin: release a=precise*
Pin-Priority: 2012

enter:wq to write the file. Pin-Priority must be greater than 1000.

Then you may downgrade the offending applications with:

sudo apt-get dist-upgrade

Then you may install packages that complained about dependencies, like sudo apt-get install ia32-libs-multiarch, or sudo apt-get install ia32-libs.

Finally, you should remove the file you just created:

sudo rm /etc/apt/preferences

because else no new updates would be found.

Hope this helps you too!



3. Continuous dmesg output (from: http://www.backtrack-linux.org/forums/showthread.php?t=35966)

Run dmesg | tail first so that you can see the end then run the following and it will update whenever/ if something changes from the above. 

Code:
 root@nerd:~#  watch --differences dmesg | tail

4. git usage

    - Create archive in zip format from repository.

       git archive --format zip --output /full/path/to/zipfile.zip master


5. cat multiple files into single file


cat $(ls frame-*.raw | sort -n -t - -k 2) > full.file


explanation


-n: sorts numerically
-t: field separator '-'
-k: sort on second field, in your case the numbers after the first '-'

$() : The standard output of command in $() is fed to cat.

Posted by kevino
,