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

Thursday, September 29, 2011

What is Symbolic link and Hard Link and how to create it on Mac

Symbolic link is the one file on your file system (FS) that holds in itself only one string that is the link to the specific file/directory/archive/etc in your FS.
Hard link is also some file that holds link on some file, but it should be one file on the same partition (and only a file, not a directory or anything else).

In order to create the Symbolic link go to the Terminal and use this command:
ln -s source_file file_name

Notice that file_name will be created even if source_file is not exist yet.

You can check this topic in wikipedia: 

Wednesday, September 28, 2011

How to figure out in Terminal the process on a specific port

In order to figure out the current process on a specific port use this command (for example ports 8888 and 9997):


lsof -w -n -i tcp:8888
kill -9 enter here the PID


lsof -w -n -i tcp:9997
kill -9 enter here the PID

How to set MAKE command on Mac

Actually, the MAKE command should be already installed on your Mac if you have Xcode installed. But in my case MAKE have been disappeared after update from Snow Leopard to Lion OSX. By some reason PATH to MAKE was changed. So what you need to do in this case in order to make MAKE available - fix PATH e.g:

Apples-MacBook-Pro:t0-mvn apple$ make
-bash: make: command not found
Apples-MacBook-Pro:t0-mvn apple$ ls /Developer/
.DS_Store                    Documentation/               Icon^M                       SDKs/
About Xcode and iOS SDK.pdf  Examples/                    Library/                     Tools/
About Xcode.pdf              Extras/                      Makefiles/                   usr/
Applications/                Headers/                     Platforms/                   
Apples-MacBook-Pro:t0-mvn apple$ ls /Developer/usr/
X11/          etc/          lib/          llvm-gcc-4.2/ sbin/         
bin/          include/      libexec/      local/        share/        
Apples-MacBook-Pro:t0-mvn apple$ ls /Developer/usr/bin/
Display all 173 possibilities? (y or n)
Apples-MacBook-Pro:t0-mvn apple$ ls /Developer/usr/bin/ma
make            malloc_history  mapc            
Apples-MacBook-Pro:t0-mvn apple$ ls /Developer/usr/bin/make 
/Developer/usr/bin/make
Apples-MacBook-Pro:t0-mvn apple$  /Developer/usr/bin/make 
make: *** No targets specified and no makefile found.  Stop.
Apples-MacBook-Pro:t0-mvn apple$ export PATH=$PATH:/Developer/usr/bin/
Apples-MacBook-Pro:t0-mvn apple$ make
make: *** No targets specified and no makefile found.  Stop.


Then you probably will want to change your PATH variable in your profile configuration. Do this:


$ vi ~/.profile


////
export PATH=/opt/subversion/bin:$PATH:/Developer/usr/bin