Skip to content

Instantly share code, notes, and snippets.

View pnxl's full-sized avatar

Jason pnxl

View GitHub Profile
@pnxl
pnxl / smbios.js
Last active March 25, 2022 15:28
Detect Mac SMBIOSes
function smbios(model) {
switch (model) {
case "MacBook1,1":
return "MacBook (13-inch, Mid 2006)";
case "MacBook2,1":
return "MacBook (13-inch, Late 2006)";
case "MacBook3,1":
return "MacBook (13-inch, Late 2007)";
case "MacBook4,1":
return "MacBook (13-inch, Early 2008)";
@pnxl
pnxl / minecraft.service
Created April 17, 2022 08:46
minecraft server as a service unit
[Unit]
Description=Minecraft server running under [ADDRESS].
[Service]
WorkingDirectory=[PATH TO SERVER DIR]
ExecStart=/usr/bin/java -jar -Xmx3G [PATH TO SERVER JAR]
ExecStop=/bin/kill -s SIGINT -$MAINPID & /bin/kill -s SIGINT -$MAINPID
Restart=always
RestartSec=10
StandardOutput=syslog