Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Jean Soares Fernandes jeansf

🏠
Working from home
View GitHub Profile
@jeansf
jeansf / mod_token_moderation.lua
Last active May 14, 2021 16:28
Jitsi Token Moderation
View mod_token_moderation.lua
-- 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;
@jeansf
jeansf / fix-nat.sh
Last active September 5, 2020 17:31
BBB Support
View fix-nat.sh
PIP=111.111.111.111
DIP=222.222.222.222
iptables -t nat -A OUTPUT -j DNAT -d $PIP --to-destination $DIP
@jeansf
jeansf / Dockerfile apache
Created December 6, 2019 21:26
Docker Images
View Dockerfile apache
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
@jeansf
jeansf / backend.sh
Last active February 11, 2022 15:07
PIX Shell Script Update
View backend.sh
#!/bin/sh
echo ""
echo "╔════════════════════════════════════════════════════════════════════════════════════════╗"
echo "║ ██████╗ █████╗ ██████╗██╗ ██╗ ███████╗███╗ ██╗██████╗ ║"
echo "║ ██╔══██╗██╔══██╗██╔════╝██║ ██╔╝ ██╔════╝████╗ ██║██╔══██╗ ║"
echo "║ ██████╔╝███████║██║ █████╔╝█████╗█████╗ ██╔██╗ ██║██║ ██║ ║"
echo "║ ██╔══██╗██╔══██║██║ ██╔═██╗╚════╝██╔══╝ ██║╚██╗██║██║ ██║ ║"
echo "║ ██████╔╝██║ ██║╚██████╗██║ ██╗ ███████╗██║ ╚████║██████╔╝ ║"
echo "║ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝╚═════╝ ║"
echo "╚════════════════════════════════════════════════════════════════════════════════════════╝"
@jeansf
jeansf / backend.sh
Last active February 11, 2022 15:07
Shell Script Update
View backend.sh
#!/bin/sh
echo ""
echo "╔════════════════════════════════════════════════════════════════════════════════════════╗"
echo "║ ██████╗ █████╗ ██████╗██╗ ██╗ ███████╗███╗ ██╗██████╗ ║"
echo "║ ██╔══██╗██╔══██╗██╔════╝██║ ██╔╝ ██╔════╝████╗ ██║██╔══██╗ ║"
echo "║ ██████╔╝███████║██║ █████╔╝█████╗█████╗ ██╔██╗ ██║██║ ██║ ║"
echo "║ ██╔══██╗██╔══██║██║ ██╔═██╗╚════╝██╔══╝ ██║╚██╗██║██║ ██║ ║"
echo "║ ██████╔╝██║ ██║╚██████╗██║ ██╗ ███████╗██║ ╚████║██████╔╝ ║"
echo "║ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝╚═════╝ ║"
echo "╚════════════════════════════════════════════════════════════════════════════════════════╝"