This file contains 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 | |
function needsRebootUpdate() # Returns OK if system needs to reboot | |
{ | |
if [ -f /var/run/reboot-required ] | |
then | |
exit 0 | |
else | |
exit 1 | |
fi | |
} |
This file contains 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 class ThreadedCashier { | |
public static void main(String[] args) { | |
Client client1 = new Client("Client 1", new int[]{2, 2, 1, 5, 2, 3, 1, 6, 1, 2, 1, 5}); | |
Client client2 = new Client("Client 2", new int[]{1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2}); | |
long initialTime = System.currentTimeMillis(); | |
Cashier cashier1 = new Cashier("Cashier 1", client1, initialTime); | |
Cashier cashier2 = new Cashier("Cashier 2", client2, initialTime); |
This file contains 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.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
public class SonCommand { | |
public static void main(String[] args) { | |
try { | |
Process pSon = Runtime.getRuntime().exec("cmd /c dir"); |
This file contains 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 OFF | |
TITLE Java Console | |
PROMPT : | |
CD %1 | |
SET CLASSPATH=%~1 | |
CMD |
This file contains 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 | |
#============================================================================ | |
#title :vmangos.sh | |
#description :VMaNGOS deploy script for Ubuntu 16.04 | |
#author :canseco.me | |
#date :20181122 | |
#version :0.8.1 | |
#============================================================================ | |
## Utilities |
This file contains 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
function setSTime(t) { | |
tshock_exec(tshock_server(), "/stime " + t); | |
} | |
function addZero(i) { | |
if (i < 10) { | |
i = "0" + i; | |
} | |
return i; | |
} |