Tuesday, November 28, 2017

Read a text file in only one line of Java code

Since Java 7, you can do this with this wonderfull line :

new String(Files.readAllBytes(Paths.get(this.getClass().getResource("/file.txt").toURI())))

That makes Java powerfull and I love that.

Remove ugly bash (shell) directory highlight colors

Tired of green over blue colors in default Ubuntu shell for directories ? Just type this from your shell console to update your bash profi...