Skip to content

Instantly share code, notes, and snippets.

View thermz's full-sized avatar

Riccardo Muzzì thermz

View GitHub Profile
@thermz
thermz / java-macosx-gettingstarted.sh
Created March 10, 2023 17:28
A simple utility to get started as Java engineer on Mac OSx
#!/bin/zsh
echo "Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "Installing Google Chrome..."
brew install --cask google-chrome
echo "Making Google Chrome the default browser..."
open -a "Google Chrome" --args --make-default-browser
@thermz
thermz / get-jvm-params.sh
Created September 14, 2022 08:55
Simple AWK script to print all the JVM params of a running process on a linux machine
#!/bin/bash
ps aux | grep $1 | grep "\-XX" | awk '{ for(i=1;i<NF;i++){ if( match($i,/\-XX.*/)) { print $i } } }' | uniq
//Interface block
public interface Consumer<T> {
public T unchecked() throws Exception;
}
//unchecked static method that receive Consumer interface as a block
public static <T> T unchecked(Consumer<T> consumer){
try {
consumer.unchecked();
} catch(Exception e){
#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 8.x
#more :http://sukharevd.net/wildfly-8-installation.html
#author :Dmitriy Sukharev
#date :20140312
#usage :/bin/bash wildfly-install.sh
WILDFLY_VERSION=8.0.0.Final
WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION