Skip to content

Instantly share code, notes, and snippets.

@preindex
preindex / openlab_setup.sh
Last active April 8, 2026 04:52
Automated installer of an OpenLab clone using WSL2.
#!/bin/bash
set -e
echo "Creating OpenLab user..."
if ! id -u openlab >/dev/null 2>&1; then
useradd -m -s /bin/bash openlab
fi
touch /home/openlab/.bashrc
@preindex
preindex / discord-bot-post-message.lua
Last active March 17, 2022 16:49 — forked from ianklatzco/discord-bot-post-message.py
sends messages to a discord channel using a bot via http POST
-- Post a message to discord api via a bot
-- Originally created by ianklatzco, forked and ported to lua by xxxYoloxxx999#2166 (preindex)
-- You don't need a library to do this, you just need something that runs lua to execute and a request function.
local channelId = 'your_id_goes_here'
local botToken = 'your_token_here'
local ToPost = { -- Stuff you need to post
['content'] = 'hello world!'
}