You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
📰
Democratizing information
Dhanush R
TheOnlyWayUp
📰
Democratizing information
🥪 Full Stack Developer
8️⃣ Years of experience
💬 Contact me at hi@towu.dev / theonlywayup on discord
🔥 Love to Learn
This is a living document. Everything in this document is made in good
faith of being accurate, but like I just said; we don't yet know everything
about what's going on.
Background
On March 29th, 2024, a backdoor was discovered in
xz-utils, a suite of software that
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
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
Dockerfile for projects with Python Backends and Javascript Frontends. Star if useful, thanks!
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
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
Example of BytesIO and PIL for modifying images without saving them
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
domain = 'watermark' # just an example of how to use bytesio with PIL, works better if you know more about the images you're using instead of using random ones which can have random dimensions.
import aiohttp
from urllib.parse import unquote
from io import BytesIO
from PIL import Image, ImageDraw, ImageFont
async def returnRandomCat():
async with aiohttp.ClientSession() as session:
async with session.get("https://aws.random.cat/meow") as resp:
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
Discord is now slowly rolling out the ability to send colored messages within code blocks. It uses the ANSI color codes, so if you've tried to print colored text in your terminal or console with Python or other languages then it will be easy for you.
Quick Explanation
To be able to send a colored text, you need to use the ansi language for your code block and provide a prefix of this format before writing your text:
\u001b[{format};{color}m
\u001b is the unicode escape for ESCAPE/ESC, meant to be used in the source of your bot (see ).If you wish to send colored text without using your bot you need to copy the character from the website.
A gist which shows/tells you how to make buttons using discord.py v2(version 2.0.0a)
Note: Before we go any further. Let me make this real clear that the following gist uses the OFFICIAL discord.py library and not forks like discord_components, nextcord, etc... So when your using this code but a different library and fuck up don't comment something mean or go to a help channel in the server and say "this gist is misleading" or "bad gist who wrote this" when your at fault, trust me I'm going to fuck you up😅
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
#Call is like os.system, it runs pip install upgrade and the join essentially seperates all the packages with a " ", ex if you had the packages discord and setuptools installed, the list would become ["discord", "setuptools"] and it would run pip install -upgrade discord setuptools