This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ps aux | grep $1 | grep "\-XX" | awk '{ for(i=1;i<NF;i++){ if( match($i,/\-XX.*/)) { print $i } } }' | uniq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |