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
| # On the first host | |
| curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --node-ip=192.168.100.1 --flannel-iface=edge0" sh - | |
| cat /var/lib/rancher/k3s/server/node-token # Find the token here | |
| # On the second host | |
| curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="agent --token=K108fda6a9dcd1995b3b93d53468d918df95ef5cc0c763846240ebf3a6baa8c8e62::server:7ccc91c12c8ae498b200a390e02533f6 --node-ip=192.168.100.2 --server=https://192.168.100.1:6443 --flannel-iface=edge0" sh - |
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
| # On both hosts | |
| curl -L -o /tmp/apt-ntop-stable.deb https://packages.ntop.org/apt-stable/buster/all/apt-ntop-stable.deb | |
| apt install -y /tmp/apt-ntop-stable.deb | |
| apt update | |
| apt install -y n2n | |
| # On the first host (104.248.195.171) | |
| supernode -l 7777 | |
| edge -A3 -c code-and-chill -k cacpass -a 192.168.100.1 -f -l 104.248.195.171:7777 | |
| # On the second host | |
| edge -A3 -c code-and-chill -k cacpass -a 192.168.100.2 -f -l 104.248.195.171:7777 |
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
| [Unit] | |
| Description=Starting n2n supernode | |
| [Service] | |
| ExecStart=/usr/sbin/supernode -l 7777 | |
| Restart=on-failure | |
| [Install] | |
| WantedBy=multi-user.target |
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
| [Unit] | |
| Description=Connecting to supernode | |
| [Service] | |
| ExecStart=/usr/sbin/edge -A3 -c name -k password -a 192.168.100.1 -f -l 168.119.56.189:7777 | |
| Restart=on-failure | |
| [Install] | |
| WantedBy=multi-user.target |
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
| package appl_alg_interpreter; | |
| import java.io.File; | |
| public class ExpressionParser { | |
| static ProgramScanner psc; | |
| static String NAME = "[a-zA-Z_][a-zA-Z_0-9]*"; | |
| static String NUMBER = "(^|\\s+)((\\-?[0-9]+(\\.[0-9]*)?)|(-?\\.[0-9]+))($|\\s+)"; |
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
| package appl_alg_interpreter; | |
| import java.io.File; | |
| public class ExpressionParser { | |
| static ProgramScanner psc; | |
| static String NAME = "[a-zA-Z_][a-zA-Z_0-9]*"; | |
| static String NUMBER = "(^|\\s+)((\\-?[0-9]+(\\.[0-9]*)?)|(-?\\.[0-9]+))($|\\s+)"; |
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
| package appl_alg_interpreter; | |
| import java.io.File; | |
| public class ExpressionParser { | |
| static ProgramScanner psc; | |
| static String NAME = "[a-zA-Z_][a-zA-Z_0-9]*"; | |
| static String NUMBER = "(^|\\s+)((\\-?[0-9]+(\\.[0-9]*)?)|(-?\\.[0-9]+))($|\\s+)"; |
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
| package Main; | |
| import java.io.IOException; | |
| import java.util.Scanner; | |
| /** | |
| * Main class of this program | |
| * @version 1.0.0 | |
| * @author Jakob Waibel, Maximilian Dolbaum, Lukas Kleinau | |
| */ |
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
| public static void main( String[] args ) throws IOException { | |
| BufferedReader fileReader = new BufferedReader(new FileReader("/home/jakobwaibel/IdeaProjects/test-push/src/main/java/org/example/test.txt")); | |
| String currentLine; | |
| while (((currentLine = fileReader.readLine()) != null)) { | |
| System.out.println(currentLine); | |
| } | |
| } |
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
| echo '{"opcode":"ready", "mac":"1235"}' | netcat -N localhost 8080 |
OlderNewer