Skip to content

Instantly share code, notes, and snippets.

View timwattenberg's full-sized avatar

Tim Wattenberg timwattenberg

View GitHub Profile
#!/bin/bash
echo -e "=== danceComp-Server-Setup ===\n"
echo -e "+++ Adding users... +++"
adduser --gecos "" admin
echo
adduser --disabled-login --shell /bin/false --gecos "" tnw
echo -e "--- done. ---\n"
echo -e "+++ Setting hostname... +++"
import java.io.IOException;
import java.net.*;
public class HostDiscoveryResponder implements Runnable {
DatagramSocket socket;
public static void main(String[] args) {
System.setProperty("java.net.preferIPv4Stack", "true");
Thread discoveryThread = new Thread(new HostDiscoveryResponder());
discoveryThread.start();