Useful Linux Commands for Beginners

Useful Linux Commands for Beginners

Useful Linux Commands for Beginners: 1. free -h | RAM usage details (use -h to get the details in MB/GB, else you will get the details in KB, which is quiet difficult to calculate and understand) 2. du -h | Disk usage details 3. sudo du /temp -h –max-depth=2 | sort -k2 | Disk usage of particular directory here temp is the directory, if you want to see for all the directories then use this command, du $dir -hk –max-depth=2…

Read More Read More

42 total views, 4 views today

How to deploy angular 2/4/5/6 application from bitbucket to Nginx Server in AWS EC2

How to deploy angular 2/4/5/6 application from bitbucket to Nginx Server in AWS EC2

How to deploy angular 2/4/5/6 application from bitbucket to Nginx Server in AWS EC2: Prerequisite: Make sure you have installed following in your linux machines: Nginx server. git. Account in bitbucket (atleast in github to clone some angular app).   1. Create temp folder in root path and do git clone: sudo git clone -b my-Branch https://YOURUSERNAME@bitbucket.org/YOURUSERNAME/YOURPROJECT Here my-Branch is branch name, if you want the master to be cloned then your url will be like this, sudo git clone…

Read More Read More

78 total views, 4 views today

Connecting aws ec2 mysql from workbench

Connecting aws ec2 mysql from workbench

Hello all, After a lot of struggle I finally made connection to aws ec2 mysql from workbench, posting here to help you guys. Connecting aws ec2 mysql from workbench:     If you are getting any other exceptions then do validate the below steps once again,   Step 1: Creating root user with all the privileges: CREATE USER ‘root’@’18.188.178.178’ IDENTIFIED BY ‘root1’; GRANT ALL PRIVILEGES ON javadomain.* TO ‘root’@’18.188.178.178’; javadomain => database schema (which I created directly in linux mysql…

Read More Read More

141 total views, no views today

Angular 6 access control using ngx-permission

Angular 6 access control using ngx-permission

Angular 6 access control using ngx-permission: We can’t see any enterprise applications without access control management as this is the most important feature which all the sites must have to avoid security violations and control the views for different user groups. In angular this can be easily achieved using ngx-permission, I personally used it in my application developments and did not face any issues so far, and even if you face any issues developer is so active to respond as…

Read More Read More

182 total views, 1 views today

How to get JPA Project option in Eclipse STS ?

How to get JPA Project option in Eclipse STS ?

How to get JPA Project option in Eclipse STS ? By default JPA project option is not there when you check under New project in STS eclipse. To make it available install hibernate tools plugin(which is currently Jboss Tools)     Now you will be able to create the JPA Project,   Hope this helps!   534 total views, no views today

534 total views, no views today

How to disable the default spring security in spring boot ?

How to disable the default spring security in spring boot ?

How to disable the default spring security in spring boot ? To disable the spring boot’s default spring security / to disable the security for all the urls then include the below method in your custom security class which extends WebSecurityConfigurerAdapter Method to include: /* to permit all */ @Override protected void configure(HttpSecurity http) throws Exception { http.csrf().disable().authorizeRequests().anyRequest().permitAll(); } Full class for reference:   @Configuration @EnableWebSecurity @EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) public class CustomJDSecurityConfig extends WebSecurityConfigurerAdapter { protected void…

Read More Read More

528 total views, no views today

Installing curl on windows 10

Installing curl on windows 10

Installing curl on windows 10:   Downloading Curl for Windows: Curl for Windows Portable Edition Curl for Windows   Installing CURL in windows: Once you downloaded the msi (or) exe file (or) portable from the above link double click and install it, if is is portable then just configure the environment variable alone like this,   Environment Variable Path Setting: Start Program -> My computer (Right click) -> Properties -> Advanced system settings     Enter the CURL installed path,…

Read More Read More

287 total views, no views today

Tomcat 7 Default Administrator Password

Tomcat 7 Default Administrator Password

Tomcat 7 Default Administrator Password By default you can see the below content in tomcat-users.xml file under (apache-tomcat-7.0.88\conf) By default nothing is configured so add your own username and password for manager-gui roles to get the access for Manager App & Host Managers. <?xml version=’1.0′ encoding=’utf-8′?> <!– Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file…

Read More Read More

253 total views, no views today

Arraylist to Array Using ToArray() in java

Arraylist to Array Using ToArray() in java

Syntax: <T> T[] toArray(T[] a) Eg : String[] y = x.toArray(new String[0]); T – the runtime type of the array to contain the collection Parameters: a – the array into which the elements of this list are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose. Returns: an array containing the elements of this list Throws: ArrayStoreException – if the runtime type of the specified array is not a…

Read More Read More

592 total views, 2 views today

hashMap Vs TreeMap Vs LinkedHashMap

hashMap Vs TreeMap Vs LinkedHashMap

════════════╦═════════════════════╦═══════════════════╦═════════════════════╗ ║ Property ║ HashMap ║ TreeMap ║ LinkedHashMap ║ ╠══════════════╬═════════════════════╬═══════════════════╬═════════════════════╣ ║ Iteration ║ no guarantee order ║ sorted according ║ ║ ║ Order ║ will remain constant║ to the natural ║ insertion-order ║ ║ ║ over time ║ ordering ║ ║ ╠══════════════╬═════════════════════╬═══════════════════╬═════════════════════╣ ║ Get/put ║ ║ ║ ║ ║ remove ║ O(1) ║ O(log(n)) ║ O(1) ║ ║ containsKey ║ ║ ║ ║ ╠══════════════╬═════════════════════╬═══════════════════╬═════════════════════╣ ║ ║ ║ NavigableMap ║ ║ ║ Interfaces ║ Map ║ Map ║ Map ║…

Read More Read More

598 total views, no views today