Skip to content

Instantly share code, notes, and snippets.

View kevin-lee's full-sized avatar
🏠
Working from home

Kevin Lee kevin-lee

🏠
Working from home
View GitHub Profile
@kevin-lee
kevin-lee / Create Symbolic Link to JDK on Mac OSX.md
Last active April 20, 2019 08:47
Scala Script to create a symbolic link to JDK for Mac OS X
@kevin-lee
kevin-lee / 1-XShapeIn2DCollection.md
Last active October 13, 2019 12:10
Fill 2D collection to draw X shape / Multiplication table

Drawing X shape in 2D collection

Common Error Type

case class Error(message: String)
@kevin-lee
kevin-lee / Java8UniqueWords.java
Created April 1, 2015 12:56
Old Java vs Java 8 - read file and keep unique words
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.Scanner;
import java.util.stream.Stream;
import static java.util.stream.Collectors.joining;
/**

This script currently works on Mac OSX only.

Prerequisite

Run the following command to create ~/.ssh folder if it doesn't already exist and set the right access permission.

{ { { mkdir ~/.ssh && echo "No ~/.ssh found so just created" } || { echo "~/.ssh already exists"; false }  } ; chmod 700 ~/.ssh }

Once done, please check if you have the folder with the right access permission.

@kevin-lee
kevin-lee / README.md
Created February 25, 2017 10:38
Shellscript to install fonts for macOS and Linux

How to Use

# Move the the folder where the fonts are available. This script supports only otf and ttf.
# Then simply run the script like
$ ./path/to/script/install-fonts.sh 

Or you can add an alias to the ~/.bashrc or ~/.zshrc

alias install-fonts='/path/to/script/install-fonts.sh' 
@kevin-lee
kevin-lee / JProfiler-with-Docker.md
Created August 10, 2016 15:55
JVM Profiler with Docker

JProfiler with Docker

Docker

DockerFile

DockerFile should have JProfiler installation.

RUN wget <JProfiler file location> -P /tmp/ && \
  tar -xzf /tmp/<JProfiler file> -C /usr/local && \
  rm /tmp/<JProfiler file>