Skip to content

Instantly share code, notes, and snippets.

View davidcralph's full-sized avatar
🐧

David Ralph davidcralph

🐧
View GitHub Profile
@davidcralph
davidcralph / noughtsandcrosses.py
Last active May 12, 2022 08:33
Noughts and crosses in Python
from colorama import init, Fore, Back, Style
from emoji import emojize
# init
init() # this is for terminal colors, yes
player = {
1: Fore.RED + "X" + Style.RESET_ALL,
2: Fore.YELLOW + "O" + Style.RESET_ALL,
}
board = {
@davidcralph
davidcralph / malworker.js
Last active August 7, 2021 21:25
MAL Redirect Worker
addEventListener('fetch', (event) => {
event.respondWith(
handleRequest(event.request).catch(
(err) => new Response(err.stack, { status: 500 })
)
);
});
async function handleRequest(request) {
const { pathname } = new URL(request.url);
@davidcralph
davidcralph / recent-activity.txt
Created January 18, 2020 13:25
⚡️ Recent activity
test
@davidcralph
davidcralph / 📊 Weekly development breakdown
Last active November 15, 2020 09:32
📊 Weekly development breakdown
JSX 1 hr 16 mins █████████░░░░░░░░░░░░ 43.1%
JSON 39 mins ████▋░░░░░░░░░░░░░░░░ 22.3%
JavaScript 36 mins ████▎░░░░░░░░░░░░░░░░ 20.7%
SCSS 19 mins ██▎░░░░░░░░░░░░░░░░░░ 11.3%
Markdown 4 mins ▌░░░░░░░░░░░░░░░░░░░░ 2.5%
@davidcralph
davidcralph / rules.txt
Created September 3, 2019 16:59
MAL (MyAnimeList) Adblocker Rules
myanimelist.net##.js-scrollfix-bottom-rel > div:nth-of-type(1) > .mal-ad-unit > table > tbody > tr:nth-of-type(1) > td
myanimelist.net##.js-scrollfix-bottom-rel > div:nth-of-type(1) > .mal-ad-unit > table > tbody > tr:nth-of-type(2) > td
myanimelist.net##.js-scrollfix-bottom-rel > div:nth-of-type(1) > .mal-ad-unit > table > tbody > tr:nth-of-type(3) > td
myanimelist.net##.border_top > div:nth-of-type(2)
myanimelist.net##.border_top > div:nth-of-type(1)
myanimelist.net##.mt16.mauto.clearfix > .mal-ad-unit > table > tbody > tr:nth-of-type(1) > td
myanimelist.net##.mt16.mauto.clearfix > .mal-ad-unit > table > tbody > tr:nth-of-type(2) > td
myanimelist.net##.mt16.mauto.clearfix > .mal-ad-unit > table > tbody > tr:nth-of-type(3) > td
myanimelist.net##.js-scrollfix-bottom-rel > div:nth-of-type(1) > .mal-ad-unit > table
myanimelist.net##.mal-ad-unit > table > tbody > tr:nth-of-type(1) > td
@davidcralph
davidcralph / style.css
Last active December 31, 2018 22:12
DBL Fixed CSS
/* Created by ohlookitsderpy, credit if used! */
/* FIXES */
.footer-links {
cursor: pointer !important; /* fix dark theme slider */
}
/* fixing weird text colour */
.botname,
@davidcralph
davidcralph / rules.txt
Last active March 26, 2022 11:52
DBL Adblocker Rules
discordbots.org###doublevoting
discordbots.org###medal
discordbots.org###bots > div.container.is-fullhd:first-child > div.bot-list-section:last-child > ul.columns.is-tablet:last-child > li.column.bot-card.is-one-fourth:last-child
discordbots.org###bots > div.container.is-fullhd:first-child > div.bot-list-section:last-child > ul.columns.is-tablet:first-child > li.column.bot-card.is-one-fourth:first-child
discordbots.org###bots > div.container.is-fullhd:nth-child(3) > div.bot-list-section:last-child > ul.columns.is-tablet:first-child > li.column.bot-card.is-one-fourth:first-child
discordbots.org###bots > div.container.is-fullhd:last-child > div.bot-list-section:last-child > ul.columns.is-tablet:first-child > li.column.bot-card.is-one-fourth:first-child
discordbots.org###bots > div.container.is-fullhd:last-child > div.bot-list-section:last-child > ul.columns.is-tablet:last-child > li.column.bot-card.is-one-fourth:last-child
discordbots.org###bot-list > div.bot-list-section > ul.columns.is-multiline.is-tablet > l