Wednesday, October 26, 2011

How to create TGZ archive with TAR

First of all: extension *.tar is the as tar.gz

Create tgz Archive with this command:
tar -cvzf newArchive.tgz sourceFileOrFolderNameForArchive


What is -cvzf:
c - "create" it means you want to create this archive
- "verbose" if you want to see the process... it shows details about the results of running tar.
- "zip" it means you want to compress file. tar will use the `compress' program.
- "filename" it means you  want to name archive with the specific name.

If you want to read the TAR manual in Terminal type in Terminal man tar
Or read this here http://ss64.com/bash/tar.html

TextWrangler is the Python Free Editor for Mac

TextWrangler is a good free Python Editor for Mac made on the base of TextEdit.
TextWrangler knows how highligh the syntax of Python (Simultron don't) etc.

The link for download of TextWrangler is this http://www.barebones.com/products/textwrangler/download.html

Open files from the Terminal with the appropriate application


open foo.jpg

open -a Preview foo.jpg

open -a "Adobe Photoshop 10.0" foo.jpg

Refer to this link http://hints.macworld.com/article.php?story=2004012218171997

Tuesday, October 25, 2011

eclipse error unbound classpath variable m2_repo

Everything was great until I changed workspace in Eclipse for other directory. When I opened th project I've got a bunche of errors "unbound classpath variable m2_repo". In this case do this:

1. Go to Preferences/Java/Build PAth/Classpath Variables
2. If there is no such variable as M2_REPO - add it (press New...)
3. Ussually a correct path for this variable is ${user.home}/.m2/repository

That's all.

How to extract *.tgz archives on Mac

If you need make archive *.tgz etc use a good wrapper archiver application for Mac - GUI Tar. It could execute complicated UNIX operations of Extracting and Compressing files.

Here is the link for download http://www.macupdate.com/app/mac/14503/gui-tar

How to login to the new Dynamic view of Blogger

I've changed view of my blog iPaniov.blogspot.com for a new dynamic view which I really like it, but there is no way to login. I spent some time until I understood that this view is for READERS only, so this why there is no login form. So in order to login to your blog on bloodspot.com you should go to the Blogger.com and do login there. Only this way you will be able administrate your blog.

I think there is the lack of clarification about this from the part of Google.

Monday, October 24, 2011

Top 10 Programming Fonts

This is the list of Top 10 Fonts for Programming:

1. INCONSOLATA (free) it is similar to TheSansMono. Author Raph Levin
2. CONSOLAS (comercial) from Microsoft
3. DEJA VU SANS MONO (download) Deja Vu font family
4. DROID SANS MONO (download) the best for Android
5. PROGGY (download)
6. MONOFUR (download) I think this is not the best choice as for me
7. PROFRONT (download) it is too small
8. MONACO is the default monospace font on the Mac
9. ANDALE MONO
10. COURIER all systems ship with a version of Courier

Some of my colleagues argued for other fonts e.g.:
* UBUNTU MONO (download)
* VERDANA all systems ship with a version of Verdana (for sure in Mac)

For more details and examples refer to this post "Top 10 Programming fonts":

Monday, October 3, 2011

How to copy whole directory with SCP

If you want to copy whole directory with scp command just add -r flag like this:
scp -r source-directory-path destination-directory-path

How to get files to your local Mac Desktop from remote server

In order to get files to your local Mac Desktop from remote server do this:


1. Make sure your VPN is working;
2. Use this command in Terminal:
scp root@ip-addres:/root/dir1/dir2/t0backend/dist/mw.rpm \~/Desktop/Icinga_rpms/

If you want to send some files from your local Mac Desktop to some OS (e.g. Linux) on DevVM do this:

1. Make sure your VM is running;
2. Use this command in Terminal:
scp ~/Desktop/Icinga_rpms/mw.rpm \devvm@192.168.188.130:~/Desktop