Skip to content

Instantly share code, notes, and snippets.

View binarybrat's full-sized avatar

Cloei binarybrat

View GitHub Profile
@binarybrat
binarybrat / Pagination_walkthrough.md
Created July 25, 2024 23:48 — forked from InterStella0/Pagination_walkthrough.md
A walkthrough on action based pagination in discord.py

Pagination Walkthrough in discord.py

In this tutorial I will go through the entire length of pagination in discord.py

I kindly ask you to go through the entire thing, as it is not recommended to skip the subtopics because they are interconnected in some way.

Table Content

@binarybrat
binarybrat / log.py
Created January 6, 2024 07:12 — forked from nguyenkims/log.py
Basic example on how setup a Python logger
import logging
import sys
from logging.handlers import TimedRotatingFileHandler
FORMATTER = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
LOG_FILE = "my_app.log"
def get_console_handler():
console_handler = logging.StreamHandler(sys.stdout)
console_handler.setFormatter(FORMATTER)
@binarybrat
binarybrat / afternoon discord.css
Created November 2, 2017 14:17 — forked from brussell98/afternoon discord.css
My custom theme for Discord. Made for dark theme
.app a {
color: #5294E2
}
.titlebar {
height: 5px
}
.guilds-wrapper {
background: #2a2f38
}
.guilds-wrapper .guilds .guild+.guild {
function calcEffec(input,numbers) {
for (var i = 0; i<input.length; i++)
{
for (var j = 1; j<numbers[i]; j++)
{
input.push(input[i]);
}
}
input.sort();
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@binarybrat
binarybrat / 0_reuse_code.js
Last active September 12, 2015 07:41
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console