Skip to content

Instantly share code, notes, and snippets.

if(commandName === 'uptime') {
let timestamp = new Date(body.stream.created_at).getTime();
uptime = countdown(timestamp, Date.now(), 158);
reply(uptime);
}
@sarimoko
sarimoko / https.md
Created July 4, 2021 06:23
HTTPS setup on Ubuntu

HTTPS Setup

Make Pem

mkdir /srv/ssl && cd /srv/ssl
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem

Alter Apache

echo "Update & Upgrading Apps & OS"
sudo apt update -qq && sudo apt dist-upgrade -y
echo "Initializing LAMP"
sudo apt install lamp-server^ -y
echo "ServerName yourwebsite.com" >> "/etc/apache2/apache2.conf"
@sarimoko
sarimoko / Redirect.html
Created June 8, 2018 03:41
Basic HTML Redirect
<!DOCTYPE HTML>
<!--
Redirect
-->
<html>
<meta http-equiv="refresh" content="0; URL='http://hello.world'" />
</html>
@sarimoko
sarimoko / Skins.json
Created February 17, 2018 14:35
a template for the Rust Oxide mod Skins at https://oxidemod.org/plugins/skins.2431/
{
"ChatCommand": "skin",
"PreventDefaultSkins": false,
"Workshop": {
"##############################": [],
"# A r m o r s ": [],
"##############################": [],
"bucket.helmet": [],
"coffeecan.helmet": [],
apt-get update && apt-get dist-upgrade

32bit
sudo apt-get install mailutils postfix curl wget file bzip2 gzip unzip bsdmainutils python util-linux ca-certificates binutils bc tmux libstdc++6 lib32z1

64bit
sudo dpkg --add-architecture i386; sudo apt-get update;sudo apt-get install mailutils postfix curl wget file bzip2 gzip unzip bsdmainutils python util-linux ca-certificates binutils bc tmux lib32gcc1 libstdc++6 libstdc++6:i386 lib32z1

adduser rustserver
#!/bin/sh
## Create a copy for each your instance
## Remote Administration Options
rcon_ip="66.172.11.151"
rcon_port=28088 # This port is TCP
rcon_password="yourPassword"
## Server configuration
To enter these into Rust access the Console via F1
# Admin Commands
```
debugcamera
spectate
respawn
noclip
ent who
ent kill

To enter these into Rust access the Console via F1

Admin

bind p noclip
bind o debugcamera
bind i ent who
bind l global.god
bind k "global.god off"
bind n "chat.say /nightvision"

These are to be used via rcon.web which I haven't tried yet or directing in the bat or sh

Server Stop/Reboot and Config

global.restart
global.quit
writecfg
save
readcfg