Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Always programming

Vitor Rodrigo Vezani vitorvezani

🎯
Always programming
View GitHub Profile
@vitorvezani
vitorvezani / .gitconfig_linux
Created Sep 2, 2016
gitconfig Linux Template
View .gitconfig_linux
[user]
name = [YOUR_NAME]
email = [YOUR_EMAIL]
[web]
browser = firefox
[help]
format = web
[color]
ui = auto
[color "branch"]
@vitorvezani
vitorvezani / printProperties.java
Created Mar 28, 2016
Show All Java VM properties
View printProperties.java
public void printProperties() {
RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
List<String> arguments = runtimeMxBean.getInputArguments();
System.out.println(Arrays.toString(arguments.toArray()));
}
View Singleton.java
public final class Singleton {
private static final Singleton INSTANCE = new Singleton();
private Singleton() {
if (INSTANCE != null) {
throw new IllegalStateException("Already instantiated");
}
}
View EnumSingleton.java
public enum EnumSingleton {
INSTANCE;
private final String[] favoriteSongs = { "Hound Dog", "Heartbreak Hotel" };
public void printFavorites() {
System.out.println(Arrays.toString(favoriteSongs));
}
@vitorvezani
vitorvezani / .gitconfig_windows
Last active Sep 2, 2016
.gitconfig Windows Template
View .gitconfig_windows
[user]
name = [YOUR_NAME]
email = [YOUR_EMAIL]
[web]
browser = google-chrome
[color]
ui = auto
[color "branch"]
current = yellow bold
local = green bold