Wednesday, September 08, 2021

copy paste in git bash

right click on top of the window(title bar)

 choose options, and click on the last option "Ctrk+Shift+letter short cuts" 

 

after that you can use ctrl+shift+v to paste the text in git bash in windows 10

Thursday, June 10, 2021

download zipped/gz file and unzip and use in java

 Example code for downloading a zipped file and unzipping in java

public static void main(String[] args) throws Exception {
String mmdb = "https://someaddress/somefile.gz";
String zipFilename = "somefile.gz";
if (!Files.exists(Path.of(zipFilename))) {
System.out.println(mmdb);
Files.copy(
new URL(mmdb).openStream(),
Paths.get(zipFilename));
try (GZIPInputStream gis = new GZIPInputStream(new FileInputStream(Path.of(zipFilename).toFile()))) {
Files.copy(gis, Path.of(dbFileName));
}
}

SpringApplication.run(Application.class, args);
}

Friday, January 22, 2021

linux mint install jdk 15

 I have been using linux mint 20.1 and I needed to install java 15 but when I search I could not find proper commands, here they are


 

adoptopenjdk is openjdk delivery system, details in case for different linux versions redhat or opensuse check