Blog


Linux: Colorful Bash Prompt

Lately I have been working with my server a lot, and noticed that its Bash prompt is rather boring and with no color at all:

stock Bash prompt

So I decided to change this and bring some color to my server! Also, I wanted to use different colors for ordinary users and root, so it is easy to see if I am currently in the danger zone (i.e. root).


Linux: Predictable Names For Multiple Identical USB-To-Serial-Converters

This blog post demonstrates how to achieve predictable names for multiple identical USB-to-serial-converters.


Keep Gradle Build Scripts DRY With Closures

Every now and then I was wondering how a more complex Gradle build script can be written in a manner, which does not violate the DRY (do not repeat yourself) principle.


Java: Endless Stream of Alternating 0s and 1s

This article shows how to create an endless series of zeros and ones using the Java 8 stream API.

The result should look like this:

010101010101010101....

Hello World!

Or more appropriately:

First Sign of Life
1
2
3
4
5
6
public class HelloWorld {

  public static void main( String[] args ) {
    System.out.println( "Hello World!" );
  }
}

My website www.luossfi.org finally got published. Yay!