This guide will walkthrough the ways to create a custom help command by subclassing HelpCommand.
# Script to send email with optional | |
# attachments using gmail | |
# | |
import re | |
import smtplib | |
from pathlib import Path | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.base import MIMEBase | |
from email.mime.text import MIMEText | |
from email.utils import COMMASPACE, formatdate |
$ wget https://github.com/grafana/loki/releases/download/v2.4.1/promtail-linux-amd64.zip | |
$ unzip promtail-linux-amd64.zip | |
$ mv promtail-linux-amd64 /usr/local/bin/ | |
$ ln -s /usr/local/bin/promtail-linux-amd64 /usr/local/bin/promtail | |
$ useradd --system promtail | |
$ gpasswd -a promtail adm | |
$ nano /etc/systemd/system/promtail.service | |
$ systemctl daemon-reload | |
$ systemctl start promtail.service |
#!/usr/bin/env python | |
""" | |
Name: Notifier | |
Description: A discord bot to handle schedules. | |
""" | |
import os | |
import discord | |
import asyncio | |
import sys | |
import requests |
''' | |
Timecheck Discord Bot | |
Reminds those in the list to get on at 2:35, then 2:40 | |
Only works with Python 3.6 as of 4/2/2019 | |
''' | |
# IMPORTS | |
import time, datetime, pytz, asyncio | |
asyncio | |
import discord |
# getenforce
Disabled
Also we need docker, docker-compose, certbot (if you need LetEncrypt)
mkdir -p /opt/graphite/conf /opt/graphite/data /opt/graphite/storage /opt/statsd /opt/grafana/log
/etc/docker/compose/graphite/docker-compose.yml
Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...
What this guide covers:
import logging | |
import discord | |
from discord import app_commands | |
from discord.ext import commands | |
LOGGER: logging.Logger = logging.getLogger(__name__) | |
This guide is kept up-to-date as Discord and available resources change!
A basic server template is available here
Hello! I'm jagrosh#4824! I'm writing this guide to try to help new server owners set up and grow their servers, which is a commonly-requested topic. It's very easy to go about this the wrong way, so it's best to be prepared and make smart decisions so that your community can flourish!
First, find the container that runs your MongoDB and ssh into it.
Then, find the collection you want to export:
mongo
show dbs
use <database>
show collections
exit