Friday, January 9, 2015

Launch application from Mac terminal

This post will be useful for those who recently started using mac and working on Mac terminal. I have recently switched to MacBook Pro, thanks to my employer, using terminal for day to day activities. I have switched from windows command prompt to Mac Terminal and many things were new to me. One of it is launching any application from Terminal. 

I wanted to open any text file in the text editor of my choice. After some googling I found out the way to configure the terminal to configure your own command to open any application.

Here I am configuring custom command for my MAC terminal to open any file in text editor of my choice. Copy following command in your ~/.bash_profile

alias text=' open -a /Applications/TextWrangler.app '

So next time you open your terminal you should able to use 'text ' to open the same file in TextWrangler 

Configuring custom command for Mac Terminal

Tuesday, March 13, 2012

Samsung Galaxy S2 USB connect problem

After latest firmware update update I was facing problem with connecting my Galasy S2 with PC/Kies using USB. Windows was unable to find required drivers when connected. I have tried all possible ways but unable to resolve driver missing error.

After lot of googling I have found out the main cause , phone USB connection mode was wrong. Followed the steps below and suddenly everything start working

1. Either install latest Kies OR just install compatible USB drivers
2. Before connecting the phone, open the keypad and dial *#7284#
you will see a menu for UART and USB.

SC20120313-182001
3. Under USB, select PDA. If PDA is already selected, select MODEM and then back to PDA
4. Don't worry about USB debugging or anything, just connect your phone to the PC
Everything will work as it is intended to whether you use Kies, no Kies or just Mass storage

Friday, May 27, 2011

Firefox 4 : Quick way to access frequently used sites.

Firefox 4 has introduced an quick way to access frequently access websites. Most of the people keep open particular set of website all the time for example for checking mail or any social networking site. For one click access to such websites Firefox has introduced “App Tabs”, this allow to keep frequently used or favorite websites tabs available all the time on browser’s tab bar.

To add an app tab to you Firefox 4 browser just open corresponding web site , right click on tab and choose ”Pin as App Tab”.

2011-05-27_1510

After pinning any opened tab as App Tab, it will be always available with respective favicon.

2011-05-27_1511

As shown in above figure, these app tabs will serve as one click access to your favorite/ frequently used websites.

Friday, March 25, 2011

Compiling and Running Java program from Notepad ++

 

I am great fan of Edit+ for compiling and running java programs. But now days Edit+ is no more available for free Sad smile. So I have shifted to Notepad ++ , it is powerful and easy to use editor. One of the major features of Edit+ is ease of configuring java environment to compile/run Java program, that’s missing in Notepad++.

Recently I have found out configuring Notepad Plus Plus so that one can compile and run run java program right from it. Just follow below few steps

  • Locate Run option on Notepad ++ on main menu bar.

2011-03-25_2147

2011-03-25_2154

  • Here we are going to use Notepad++’s environment variables . Copy following text in run dialog box

javac -classpath $(CURRENT_DIRECTORY) $(FULL_CURRENT_PATH)

  • Select Save as option and then provide title “javac” and shortcut information.

2011-03-25_2232

After these steps , you will notice new option “javac” under “Run” menu.

2011-03-25_2231

This will compile current opened java class and creates .class file under same directory. Same above steps need to followed to create “java” run option  to run compiled java class. Use following command string in run dialog box.

java -classpath $(CURRENT_DIRECTORY) $(NAME_PART)

 2011-03-25_2233

 

References: http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Defining_User_Commands

Friday, March 18, 2011

Capture active window using “PrntScrn”

I don’t need to tell about well known Windows’s “PrntScrn” functionality Smile. Yes, it capture current screen and you can paste that any picture editing application.  There are many efficient and more powerful screen capturing tools are available, but Window’s “PrntScrn” option is most simple option without installing any third party software.

Most of the time we need to capture only Active window rather than complete screen. I am very happy to see there is already a way to capture only active window using Fn + Alt + “PrntScrn”

 

image

Fn + Alt + PrntScrn

Ctrl + V in Paint application

image

You can notice , only current active window gets captured ( pasted in Paint application).

Saturday, January 29, 2011

Make an executable searchable in Windows 7

I am very impressed with Windows 7 start search window. Its an one stop place to find all executable file on few key strokes.
2011-01-29_2245.png

I used to use Launchy application on Windows XP platform to get same kind of functionality.
Now my requirements have raised , being human being Smile, I want to make an executable appear in windows start search. I have found out how to get it done, just follow these steps
  1. Create shortcut of the executable file
  2. Copy it to C:\ProgramData\Microsoft\Windows\Start Menu\Programs
I have done the steps for Console, it comes to you as zip file and you just need to open .exe file. I have copied the .exe file in above mentioned “Start Menu” folder and result is here, I got Console in start search
2011-01-29_2257

Wednesday, January 26, 2011

Installing XML Tools Plugin to Notepad ++

         I am great fan of Notepad ++ for all text editing needs from plan text file to xml files. Notepad++ has very robust plugin framework and many useful plugins already developed. I wanted to install XML Tool plugin to NPP , I thought it would be as straight forward as any other plugin installations. But I have straggled lot while installing XML Tool plugin , at the end I have succeed Smile

Here I am putting my endeavor

  1. Download Notepad ++ from here and install it.
  2. Download XML Tools plugin from here and unzip it <Install_Home>/plugin folder.
    • Please note that external libs are required. It has been documented that I can be loaded the 'Notepad++ Plugins' project page. Here the problem starts, I didn’t find any such link where I can download external libs.
  3. Go to Plugins >> Plugin Manager >> Show Plugin Manager, select “Installed” tab and select “XML Tools” and click on reinstall.

2011-01-26_2248

Now you are get set to use XML Tools plugin.