This file contains hidden or 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 | |
//bin/true && SCRIPT_DIR="$(dirname $(readlink -f "${0}"))" | |
//bin/true && exec groovy -cp "${SCRIPT_DIR}/lib" "${0}" "${@}"; exit $? | |
@Grab(group='ch.ethz.ganymed', module='ganymed-ssh2', version='262') | |
import ch.ethz.ssh2.* | |
String hostname = "localhost"; | |
String username = "gsus"; |
This file contains hidden or 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
String proxyIpAddress = "192.168.0.1"; | |
String proxyPort = "80"; | |
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection( | |
new Proxy( Proxy.Type.HTTP, | |
new InetSocketAddress(proxyIpAddress, proxyPort) ) //close new Proxy | |
); //close url.openConnection |
This file contains hidden or 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 | |
//bin/true && SCRIPT_DIR="$(dirname $(readlink -f "${0}"))" | |
//bin/true && exec groovy -cp "${SCRIPT_DIR}/lib" "${0}" "${@}"; exit $? | |
/* | |
* Given N elements (with N = 6): | |
* | |
* ['C', 'G', 'Q', 'F', 'M', 'E'] | |
* | |
* and given a matrix NxP where P is the number of permutations of N |
This file contains hidden or 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
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
//Example Input Strings | |
//String filterby = [ "13|123.12|123.service|1.12|123.service|2", "service|1.12|123.service|2", "service|1.service|2", "13|123.12|123.12|123", "13|123", "service|1" ] | |
//Filter services from filterby | |
String[] results = filterby.split("\\.?service\\|\\d+"); | |
StringBuilder sb = new StringBuilder(); | |
for( String result in results) { |
NewerOlder