Skip to content

Instantly share code, notes, and snippets.

View ColinShark's full-sized avatar
🦈
Being Sharky :3

ColinShark ColinShark

🦈
Being Sharky :3
View GitHub Profile

Easily upload your Minecraft Server Logs to mclo.gs with a single script.

Put the above bash file into your servers root directory (eg ~/mc/log.sh), chmod +x log.sh it, and then you can execute it with ./log.sh. You'll get a simple plaintext URL in the stdout which you can copy-paste into your browser.

@ColinShark
ColinShark / PyroPay.md
Last active May 18, 2022 05:58
Simple demonstration of Payments with Pyrogram

Payments with Pyrogram

[pyrogram]
api_id = 123456
api_hash = 123abc456def789ghi
bot_token = 123456:abcdefg

[paybot]
stripe_token = 123456:TEST:somerandomsecret
@ColinShark
ColinShark / 1.md
Last active December 25, 2021 08:51
start(), idle() and stop() multiple Pyrogram Clients at once.

OUTDATED

These are outdated as they haven't been updated for Pyrogram v1.

If you know what you're doing, feel free to use these as a guide.

For any questions, head to @PyrogramLounge.

Update

@Pokurt has updated these scripts to Pyrogram v1

@ColinShark
ColinShark / rateLimitDecorator.py
Last active February 20, 2022 00:08 — forked from gregburek/rateLimitDecorator.py
Rate limiting function calls with Python Decorators [Py3]
import time
def rate_limit(max_per_second=2):
min_interval = 1.0 / float(max_per_second)
def decorate(func):
last_time_called = [0.0]
def rate_limited_func(*args, **kargs):