Skip to content

Instantly share code, notes, and snippets.

View YordanGeorgiev's full-sized avatar

Yordan Georgiev YordanGeorgiev

View GitHub Profile
@YordanGeorgiev
YordanGeorgiev / scala-foreach-loop.scala
Created February 17, 2018 10:06
[foreach loop with var] how-to assign a var into scala foreach loop #scala
// 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 */
}
@YordanGeorgiev
YordanGeorgiev / sbt-clean-up.sh
Last active April 11, 2019 08:13
[sbt-clean-update-test] how-to clean a scala project, update and test it without idea #sbt #scala #test #idea
#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
@YordanGeorgiev
YordanGeorgiev / pkk-auth.sh
Created February 17, 2018 09:52
public private key auth for ssh #linux #ssh #pkk
# 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
@YordanGeorgiev
YordanGeorgiev / how-to-create-a-symlink-on-linux
Created February 17, 2018 09:48
[create a symlink] how-to create a symlink on linux #linux #bash