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
// how-to assign var in foreach loop | |
val objFileHandler = new FileHandler () | |
objFileHandler.getFileTree( new File ( dataCsvDir ) ) | |
.filter(_.getName.endsWith(".csv")) | |
.foreach{ | |
x => { | |
var f = x; | |
println ( f.toString() ) | |
/* some operation */ | |
} |
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
#file: src/bash/sbt-clean-update-test.sh | |
#aim: compile and test scala in the shell without idea ... | |
alias find=find # probably obsolete in your env | |
find ~/.sbt ~/.ivy2 -name '*.lock' -print -delete | |
alias find="find -L" | |
rm -fvr ~/.sbt/0.13/plugins/target | |
rm -fvr ~/.sbt/0.13/plugins/project/target | |
rm -fvr ~/.sbt/1.0/plugins/target |
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
# START === how-to implement public private key ( pkk ) authentication | |
# create pub priv keys on server | |
# START copy | |
ssh-keygen -t rsa | |
# Hit enter twice | |
# copy the rsa pub key to the ssh server | |
scp ~/.ssh/id_rsa.pub $ssh_user@$ssh_server:/home/$ssh_user/ | |
# STOP copy | |
# now go on the server | |
ssh $ssh_user@$ssh_server |
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
# START === create symlink | |
export link_path=/opt/ysg | |
export target_path=/vagrant/opt/ysg | |
mkdir -p `dirname $link_path` | |
unlink $link_path | |
ln -s "$target_path" "$link_path" | |
ls -la $link_path; | |
# STOP === create symlink |
NewerOlder