http://rerun.me/2014/09/11/introducing-actors-akka-notes-part-1/
http://rerun.me/2014/09/19/akka-notes-actor-messaging-1/
http://rerun.me/2014/10/06/akka-notes-actor-messaging-request-and-response-3/
Wednesday, April 15, 2015
Saturday, April 11, 2015
Expect for Java
https://github.com/dacr/jassh
#!/bin/sh
exec java -jar jassh.jar "$0" "$@"
!#
jassh.SSH.once("localhost", "test", "testtest") { ssh =>
print(sh.execute("""echo "Hello World from `hostname`" """))
}
#!/bin/sh
exec java -jar jassh.jar "$0" "$@"
!#
jassh.SSH.shell("localhost", "test", "testtest") { sh =>
import sh._
println(s"initial directory is ${pwd}")
cd("/tmp")
println(s"now it is ${pwd}")
}
https://github.com/ronniedong/Expect-for-Java
try {
JSch jsch = new JSch();
Session session = jsch.getSession(USER, HOST);
session.setPassword(PASSWD);
session.setConfig("StrictHostKeyChecking", "no");
session.connect(60 * 1000);
Channel channel = session.openChannel("shell");
Expect expect = new Expect(channel.getInputStream(),
channel.getOutputStream());
channel.connect();
expect.expect("$");
System.out.println(expect.before + expect.match);
expect.send("ls\n");
expect.expect("$");
System.out.println(expect.before + expect.match);
expect.send("exit\n");
expect.expectEOF();
System.out.println(expect.before);
expect.close();
session.disconnect();
} catch (JSchException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
http://www.jcraft.com/jsch/
Friday, April 3, 2015
Automation tools
http://javauto.org/ - Java based cross platform automation
https://code.google.com/p/autokey/
http://alternativeto.net/software/xdotool/
http://alternativeto.net/software/sikuli/
Subscribe to:
Posts (Atom)