Skip to content

Instantly share code, notes, and snippets.

Democratizing information


Democratizing information
View GitHub Profile
TheOnlyWayUp /
Created September 19, 2022 10:25
Personal Cookie Handler script with Redis
TheOnlyWayUp / main.css
Created August 30, 2022 17:47
The goal of this gist to display how requests to arbitrary requests can be sent on page load, how custom text can be added to the download button and how one can hide the tooltip text on using the CSS Editor.
View main.css
a[rel="noopener noreferrer"] {
background: url(get_sent_req_on_load_url);
background-color: slategray;
a[rel="noopener noreferrer"]:after {
background-color: blue;
content: '\AHi!';
display: block;
TheOnlyWayUp / App.svelte
Last active August 21, 2022 16:52
The aim of this gist is to explain how one can modify attributes in their HTML (<html>) tag when working with a svelte project.
View App.svelte
export let HTMLParent; <!-- Declares HTMLParent as a prop -->
let DataTheme = "business";
HTMLParent.setAttribute('data-theme', DataTheme) <!-- Sets the data-theme attribute on the HTML Tag to the value of DataTheme, leading to `<HTML data-theme="business">`.
That's it, we've managed to grab and modify the top-level <HTML> Tag. You can make further modifications to it by accessing the HTMLParent variable
TheOnlyWayUp /
Last active August 2, 2022 12:43
Basic OOP-Based Fibonacci Sequence in Python
class UserList:
def __init__(self, initlist: list = []): = initlist
class FiboList(UserList):
def __init__(self):
super().__init__([0, 1])
def __next__(self):
sum_ = sum(
TheOnlyWayUp /
Last active June 25, 2022 07:47
I was having some trouble with Zoho's OAuth, after lots of research, this is what I came up with. The goal of using Zoho's OAuth is mostly to verify that the person logging in is from a specific domain..

Zoho OAuth Identification Example

The goal of this snippet is to help you figure out the email/identity of the person OAUthing to your application. Made this to help out anyone else that's trying to do the same thing. - Just a short aiohttp snippet regarding what requests you need to make to get the access token, and the user's information. - A FastAPI implementation of this.

NOTE = You need to select the server based applications option when creating your Application at Zoho's Console. Then you need to run a webserver, add that server's domain (you need to have a domain iirc) as an authorized redirect url. Think

This attempts to abstarct away the standard way of using `__init__`,
the problem it tries to solve is the repetetiveness of using init purely
to store it's parameters into the instance under the exactly same name, i.e.:
class Stock:
def __init__(name, shares, price): = name
self.shares = shares
self.price = price
View 404.html
<!DOCTYPE html>
<html lang="en">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="{{ status_code }}, {{ detail }}">
<meta charset="utf-8">
<meta property="og:title" content="">
TheOnlyWayUp / readme.diff
Last active February 22, 2022 06:40
Contact Me
View readme.diff
+Thanks for checking my profile out
+Contact me at TheOnlyWayUp#1231
TheOnlyWayUp /
Last active March 6, 2022 14:01
Example of BytesIO and PIL for modifying images without saving them
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("") as resp:
TheOnlyWayUp /
Created February 13, 2022 08:39
Creates a list of all loaded cogs, made in response to in the r/discord_bots discord server.
def setup(bot):
bot.loadedCogs.append('cog name')
def teardown(bot):
bot.loadedCogs.remove('cog name')