Bash commands

1. Some handy bash commands

Diff

Compare two files and get list of differences.

Link

Support colors in cygwin bash terminal

Open  file “.bashrc” in your home folder and uncomment commands aliases with some additional parameters as “–color”:

ssh

You can ssh into machine with command:

 

2. Add bash.exe as terminal in Visual Studio Code

Open user settings profile and add command:

The terminal is opened inside IDE as “Terminal window” with current project folder.

 

3. Add bash.exe as terminal in IntelliJ IDEA IDE

Open “File/Settings/Terminal” and enter shell path in application settings section :

When you open terminal you get bash shell inside IDE :

 

Netbeans and Polymer

Polymer HTML code completion for Netbeans 8.2

Thanks to this wonderful extension I can get rid of annoying errors in HTML editor when I edit polymer components in html files.

Because I use maven project type and netbeans , there is no “.nbproject” folder. In that case the “customs.json” file must be present in src/main/webapp folder.

2016-12-10-11_08_11

Recreate new version of customs.json

Because not all attributes are recognized by customs.json I will recreate it as explained in project documentation.

After downloading master zip file, you need to create “dist” folder under src folder and then run index.js file.

New copy of customs.json will be created in dist folder, just copy it to the webapp folder and that’s it.

Merge changes back to project file

Don’t forget if you already used customization and added something, you need to merge old version with new one or you will lose your changes…

Well, it’s not so simple, looks like after you add few changes to customs.json with HTML editor, the file (customs.json) changed very  dramatically. Looks like netbeans  reorganize whole structure or something.

 

 

 

 

Spring boot and Netbeans

Setup spring boot application

Simplest way to create “netbeans” ready project is to create project zip file with spring web wizard and unpack it somewhere. Open the wizard page and switch to the full version.

2016-12-07-22_04_31-spring-initializrSelect all needed dependency, for example “web”, “jax-rs”, jOOQ etc.

After you click on “Generate project” or press Alt+Return, you will get zip file “save as” dialog. This file is created with all necessary configurations to start developing web application.   Just extract it somewhere and open project folder from netbeans.

Created project is maven project with “pom.xml” definition file, you will need maven installed on your system.

 

Maven – installation

How to install Maven on Windows 10

  1. Download Apache Maven ZIP file and unzip it to some folder (example: C:\Programs\apache-maven-3.3.9 ).
  2. Add maven folder to environment variables:
  • MAVEN_HOME = C:\Programs\apache-maven-3.3.9
  • M2_HOME = %MAVEN_HOME%
  • add to path = %MAVEN_HOME%\bin

Test:

$ mvn –version