Search This Blog

Wednesday, October 15, 2014

Beautify, unpack or deobfuscate JavaScript and HTML, make JSON/JSONP readable

jsbeautifier is a good tool to beatify your json/js/html/css code and make it readable. It also helps to unminifiy or deobfuscate minified versions of javascript or css.

Project home : http://jsbeautifier.org/


Saturday, June 28, 2014

Easy Shell - Eclipse Plugin

While working in eclipse you may want to open selected file from project explorer to windows/unix console. One way is by selecting file, go to properites, copying path and open command prompt and go to that path. It can be automated by using external tools(viz http://javadevtool.blogspot.in/2014/06/running-batch-files-in-eclipse.html). But Easy shell does a light weight(1.5MB) plugin that does this job in a single click as shown in below.


  • Install this plugin from eclipse market palce or download it from here
  • Select a file/folder and in context menu select Easy Shell. 
  • Select Open to open file in command prompt, Run to run this file in case of batch. Explore to open in file explorer, Copy Path to copy the file path. 
Done. 

Running batch files from eclipse

Eclipse provides external tools to configure and run ant scripts, batch files and many and others using workbench.
Let me show you how to run batch files using this utility.

  • Goto Run -> External Tools -> External Tools Configuration(Alt+R, E, E)
  • Click on programs and enter program name(User defined name).
  • Select the batch file, you can select from your workspace or from file system. You can also provide the variable(List of variable available). 
  • Finally click on run. Eclipse opens a new console and run your batch file. 
  • Once you run this command, next time you need not open this external tool preferences. You can see the recently used programs in external tools icon in eclipse toolbar. 


Some of the tasks that you can do using this utility
  • Open selected file  in command prompt 
    • Open External tools Configuration window
    • Create new program
    • Enter Location as ${env_var:SystemRoot}/System32/cmd.exe
    • Arguments as cd ${resource_loc}
  • Open selected file in Windows Explorer
    • Open External tools Configuration window
    • Create new program
    • Enter Location as ${env_var:SystemRoot}/explorer.exe
    • Arguments as ${resource_loc},/select
  • Running jar file
    • Open External tools Configuration window
    • Create new program
    • Enter Location as C:\Program Files\Java\jdk1.7.0_21\bin\javaw.exe
    • Arguments as -jar C:\software\jshint\jslint4java-2.0.5-dist\jslint4java-2.0.5\jslint4java-2.0.5.jar ${resource_loc}
Done. 

InstaSearch - Eclipse Plugin

InstaSearch is one of my favorite eclipse plugins. Although eclipse provides a search engine, most of the times we want to find some text in some text files which will take hell lot of time in eclipse if you have many projects loaded in your workspace. 
InstaSearch is one of the coolest light - weight eclipse plugin that based on Apache Lucene search engine. 


Features : 
  • Instantly shows search results
  • Shows suggestions using auto-completion and preview using relevant lines
  • Opens and highlights matches in files
  • Searches jar source attachments
Usage: 

  • Install this plugin and click on InstaSearch menu item from Search toolbar menu. 
  • Start typing your word to search.(viz preview below)



Drawbacks : 

  • It doesn't support regex pattern(By the time I write this). 

Done.
To install eclipse plugins : http://javadevtool.blogspot.in/2014/05/installation-of-plugins-in-eclipse.html
Project home : InstaSearch

Mouse Tips in Windows

This post is specific to Windows operating system. Mouse usage in windows is too frequent. Sometimes because of our ignorance we don't even know some hacks/tips that can reduce stress on our fingers. Here are some tips that can reduce your stress and help you to achieve some tasks using mouse within less clicks. I would like to have suggestions from you as well, so your suggestions are welcome .
Tip #1 : Copying a block of text
Whenever you want to select a block of text, if it is a small block then you can do it using small drag selection or using keyboard but if the text is too big then it is painful to drag such a big texts. In such a case you can use this keyboard/mouse combination tip to copy block of text.

  • First click on start of the block from where you want to copy. 
  • Without holding/dragging any thing simply go to the end of the text.
  • Hold shift key in key board and click at the end of the block. It selects a block of the text. 


Tip #2 : Replacing Double click 
Some people have to open folders on computers 100+ times. It must be surprising for you but its true. In our work place I see some testers who work with files and folders in their entire day. In such cases its better to have a single click option to open a folder(Just like a hyperlink). Windows has a feature to open folders in a single click.
Open My Computer  go to Tools - > Options(If you can't find tools it click on Alt + F), select Single-click to open an item radio button.(viz image below)


Tip #3 : ClipCube - clipboard history tool
It doesn't come as out of the box in windows. But this windows utility helps to keep track of your copy history. I like the way it stores previously copied texts. In many cases we would like to have more than on ctrl + c  buttons to copy two texts but it is not possible in windows. clipcube is the one of the portable windows utility that helps you to track your previous copy history. You just download this utility, run exe file and forget about it. Whenever you use ctrl + c  or copy in context menu, clicpcube stores that data in its files. If you want to check history you can open clicpcube from tray and check the history.

For more info : http://clipcube.wikispaces.com/

Saturday, May 3, 2014

Spket - Eclipse Plugin

Spket is an eclipse plugin for javascript libraries like Extjs 3.x,4.x, Angular JS...etc. If you are working in one of these frameworks using eclipse, then spket is a must have plugin for your eclipse.

Features: 

  • Code Completion (intellisense)
  • Syntax Highlighting
  • Javascript validation (For example missing commas, unequal brackets etc)
Usage: 
  • Download spket eclipse plugin and install it in your eclipse. 
  • Once you install this plugin, you need to create a profile and configure extjs builds. 
  • Steps to create Extjs profile : http://spket.com/extjs.html.
  • After profile creation, restart eclipse and open javascript files in spket editor. 
Drawbacks: 
  • Spket doesn't allow to customize javascript profile in free license version, for example if you want to change default indentation levels, you need to move to licensed version of it. 

Once configuration is complete, restart your eclipse,
To install eclipse plugins : http://javadevtool.blogspot.in/2014/05/installation-of-plugins-in-eclipse.html
Project home : http://spket.com
Done.

Extract column wise data from a text file

In general if you want to copy or cut data from a text file we can just drag it by mouse or we can use CTRL+C or CTRL+X. But this works only for row level. Some times we need to extract column wise. For example in an experiment we have text file in which we don't want some columns or if we copy some source code from internet it may consists of unwanted numbers line.

Method 1
  1. Open your text file in notepad++ (Or you can just drag and drop on to nodepad++) 
  2. Keep your cursor at the starting point of the column which ever you want to extract/cut hold ALT button and drag it.
  3. Copy/Cut the data and Paste it in a new file.
Method  2 
If you have Microsoft word, then copy your text and paste in MS-Word. Hold ALT + left key, drag and copy text. It is the easiest and simple technique.

Method 3
If you have eclipse, open file in eclipse and hold press Alt+Shift+A, then editor turns into block editor, now select empty block that you want to delete and delete it.
Done

File Merging/Comparison Tools

Eclipse provides file merging out of the box. Even though no additional plugins are required to use file merging, I personally don't prefer to open eclipse just for file comparison.

Windows tool
WinMerge is a open source comparing, synchronizing and merging tool for windows.
Features: 

  • Visual differencing and merging of text files
  • Flexible editor with syntax highlighting, line numbers and word-wrap
  • Moved lines detection
  • Folder comparision including sub folders
  • Works like a version control, creates patch files, resolve conflicts
Notepad++ plugin

 The simplest way to compare files is using npp compare plugin. After installation of this plugin, we can enable file comparison with a shortcut and it compares last two files opened in the notepad++ windows.

Java Decompiler - Eclipse Plugin

JDEClipse allows us to view decompiled source for a class even though source is not attached to the class. It can be shown as a plaing java class using eclipse default editor.

Features :
  • Decompiling java class files

To install eclipse plugins : http://javadevtool.blogspot.in/2014/05/installation-of-plugins-in-eclipse.html
Project home : http://mchr3k.github.io/jdeclipse-realign/
Done

SVN Plugin for Eclipse

Subclipse is an Eclipse plug-in providing support for subversion. 

Features : 

  • SVN Repository Browser
  • Check-in/Check-out/Other SVN Tasks from eclipse project explorer directly
  • Graphical representation of revision/merge graph

To install eclipse plugins : http://javadevtool.blogspot.in/2014/05/installation-of-plugins-in-eclipse.html
Project home : http://subclipse.tigris.org/
Done

Installation of Eclipse Plugins

Valid eclipse plugin will have two folders features and plugins. There are several ways to install plugins in eclipse.


  • Method 1 : Using eclipse UI 
Go to Help menu, click on Install New Software...

Click on Archive and select plugin file(zip file), it loads and shows the files to be installed. Select them and click on next -> Finish. (If you have url instead of zip file, you can paste URL in the below screen instead of clicking archive).

  • Method 2 
You can also install eclipse plugins manually. Unzip plugin zip file and paste them in eclipse installed folder in which eclipse has two folders features and plugins. It asks for confirmation to override these two folders, click on ok and restart the eclipse. 
  • Method 3 
Unzip your files in a folder and copy them in dropins folder(It will be there in eclipse installation folder). You can keep your files in any folder inside dropins folder, eclipse automatically detects them.  



For more info : https://wiki.eclipse.org/FAQ_How_do_I_install_new_plug-ins%3F

ER diagram - Eclipse plug-in

ERMaster is a graphical editor for drawing ER Diagrams in eclipse. It runs as eclipse plugin.

Features : 

  • It can be done graphically to making ER diagram.
  • Printing ER Diagram
  • Exporting DDL from diagram
  • Creating mock data
  • Importing from DB etc..
To install eclipse plugins : http://javadevtool.blogspot.in/2014/05/installation-of-plugins-in-eclipse.html
For more info :  user manual
Done

Log File Reader - Windows

Log Expert is one of the powerful log analysis tool for windows.

Features :
  • Tail mode
  • MDI-Interface with Tabs
  • Search function (including RegEx)
  • Bookmarks
  • A very flexible filter view
  • Highlighting lines via search criteria
  • Columnizers: This means splitting log lines into columns for some well defined logfile formats
  • Unicode support
  • log4j XML file support
  • 3rd party plugin support
  • SFTP support (loading files directly from SFTP)
  • Plugin API for more log file data sources

For More Info documentation

Screen Capture Tool

Snagit is a Chrome's Extension to capture screen. It automatically stores the captured screen shot into google's cloud.
Snipping Tool is a Windows 7 tool to take a screenshot of your screen.
FastStone Capture is a third party windows utility to capture screen .
Done

Simple Screen Recorder

Screen Castify is a simple screen record add-on to record your screen. It has following features.
  • You can select options to record your desktop, browser or a particular tab. 
  • Screen resolution can be adjustable
  • We can start/stop/pause/resume recording using shortcuts and shortcuts and configurable. 
  • It generates webm which can be viewed in chrome/firefox.(You don't need additional video player to view the video). 
Here is th addon 
https://chrome.google.com/webstore/detail/screencastify-screen-vide/mmeijimgabbpbgpdklnllpncmdofkcpn?hl=en


Cam Studio is able to record all your audio-video activity on your screen  and generates most popular avi format. You can include images, texts and callouts. It also includes the customization. It is a portable(<3MB) software and most importantly freeeware. 

Rest Service Client - Light Weight

Rest client or Advanced Rest client or light weight rest client addons for firefox and chrom respectively. These addons provide validation, formatted output and many more other options.

Personally I prefer Chrome's Advanced Rest Client.

Addons/Plugins
Firefox Addon - https://addons.mozilla.org/en-US/firefox/addon/restclient/
Chrome Addon - https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo

Desktop Version
Following jar is the desktop version rest client. Since it is a java application, we only need java installed on our machine. It is independent of the operating system. It also has command line utility to call your services from command prompt.
https://code.google.com/p/rest-client/downloads/detail?name=restclient-ui-3.2.2-jar-with-dependencies.jar&can=2&q=



JSON - XML formatter

devutilsonline is a free online tool to format, transform, validate and generate data for XSD, XML, HTML, XML, SQL, HTTP, BASE64 filetypes. It has a simple UI with multiple options in each of these categories. For example if you want to generate XSD from XML, you can select one of the design types from Russian Doll Design/Venetian Blind Design/Salami Slice Design  along  with other styling properties.

URL : http://devutilsonline.com


JSON Formatter

  • Above link also allows us to format JSON, but sometimes we might want offline application in such a case you can use following add-on for chrome. This add-on has provision to format file also. It has a rich styling interface. 

https://chrome.google.com/webstore/detail/json-editor/lhkmoheomjbkfloacpgllgjcamhihfaj?hl=en


  • If you have nodepad++ and prefer to format in notepad++, then you can install following plugins in notepad++. 
http://sourceforge.net/projects/nppjsonviewer for json and
http://sourceforge.net/projects/npp-plugins/files/XML%20Tools for xml