Friday, November 13, 2009

Finding out your external IP address

If you want to find out what external IP address your router has assigned to it, you can either search the Internet for sites that can display that said IP address or you can use the Linux command line:

wget -O - -q icanhazip.com


wget options:
'-O -' will display output on terminal instead of saving it in a file.
'-q' will suppress wget's output (e.g. connecting ,saving)

This are other sites which can be used instead of icanhasip.com
http://www.canyouseeme.org/
http://www.formyip.com/
http://www.checkip.org/
http://www.whatismyip.org/

Monday, November 9, 2009

Multiple line comments and designs

Have you ever wondered how do people make fancy design around comments like

/**************************/
/* Different all twisty a */
/* of in maze are you, */
/* passages little. */
/**************************/


or like
__ _,--="=--,_ __
/ \." .-. "./ \
/ ,/ _ : : _ \/` \
\ `| /o\ :_: /o\ |\__/
`-'| :="~` _ `~"=: |
\` (_) `/
.-"-. \ | / .-"-.
.---{ }--| /,.-'-.,\ |--{ }---.
) (_)_)_) \_/`~-===-~`\_/ (_(_(_) (
( qwe )
) asd (
( zxc )
) (
'---------------------------------------'


I even tried creating a one in one of my files. Then I had to change my message and my design was screwed.

Today in casual browsing I found this and all questions which have been there for years were solved.

All you need to do is
1. yum/apt-get install boxes

2. Open vim select the text you want inside the box in visual mode.

3. Type : (Prompt will be :'<,'>)
4. And then type !boxes (Prompt will be :'<,'>!boxes)

And you will have nice designed comments.

If you want to undo boxes, select the whole box using visual mode(only box,not starting of next line), and say !boxes -r

Friday, November 6, 2009

Cross-platform Browser Sync - Xmarks

I have 3 machines, each one with Linux/windows installation. Its really a pain to sync my browsers for bookmarks and ....
But now I found this and its really working great. I suggest you to try this out too.
http://www.xmarks.com/