View mod_token_moderation.lua
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
-- Token moderation | |
-- this module looks for a field on incoming JWT tokens called "moderator". | |
-- If it is true the user is added to the room as a moderator, otherwise they are set to a normal user. | |
-- Note this may well break other affiliation based features like banning or login-based admins | |
local log = module._log; | |
local jid_bare = require "util.jid".bare; | |
local json = require "cjson"; | |
local basexx = require "basexx"; | |
local um_is_admin = require "core.usermanager".is_admin; |
View fix-nat.sh
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
PIP=111.111.111.111 | |
DIP=222.222.222.222 | |
iptables -t nat -A OUTPUT -j DNAT -d $PIP --to-destination $DIP |
View Dockerfile apache
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
FROM debian:buster-slim | |
MAINTAINER Jean Soares Fernandes <jeansf> | |
# Setup timezone | |
ENV TZ=America/Sao_Paulo | |
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | |
# Update sources | |
RUN apt-get update -y |
View backend.sh
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/sh | |
echo "" | |
echo "╔════════════════════════════════════════════════════════════════════════════════════════╗" | |
echo "║ ██████╗ █████╗ ██████╗██╗ ██╗ ███████╗███╗ ██╗██████╗ ║" | |
echo "║ ██╔══██╗██╔══██╗██╔════╝██║ ██╔╝ ██╔════╝████╗ ██║██╔══██╗ ║" | |
echo "║ ██████╔╝███████║██║ █████╔╝█████╗█████╗ ██╔██╗ ██║██║ ██║ ║" | |
echo "║ ██╔══██╗██╔══██║██║ ██╔═██╗╚════╝██╔══╝ ██║╚██╗██║██║ ██║ ║" | |
echo "║ ██████╔╝██║ ██║╚██████╗██║ ██╗ ███████╗██║ ╚████║██████╔╝ ║" | |
echo "║ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝╚═════╝ ║" | |
echo "╚════════════════════════════════════════════════════════════════════════════════════════╝" |
View backend.sh
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/sh | |
echo "" | |
echo "╔════════════════════════════════════════════════════════════════════════════════════════╗" | |
echo "║ ██████╗ █████╗ ██████╗██╗ ██╗ ███████╗███╗ ██╗██████╗ ║" | |
echo "║ ██╔══██╗██╔══██╗██╔════╝██║ ██╔╝ ██╔════╝████╗ ██║██╔══██╗ ║" | |
echo "║ ██████╔╝███████║██║ █████╔╝█████╗█████╗ ██╔██╗ ██║██║ ██║ ║" | |
echo "║ ██╔══██╗██╔══██║██║ ██╔═██╗╚════╝██╔══╝ ██║╚██╗██║██║ ██║ ║" | |
echo "║ ██████╔╝██║ ██║╚██████╗██║ ██╗ ███████╗██║ ╚████║██████╔╝ ║" | |
echo "║ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝╚═════╝ ║" | |
echo "╚════════════════════════════════════════════════════════════════════════════════════════╝" |