Skip to content

Instantly share code, notes, and snippets.

View mvrozanti's full-sized avatar

Marcelo mvrozanti

View GitHub Profile
@mvrozanti
mvrozanti / chess-com-downloader.js
Created September 6, 2023 15:48
Download chess.com games en masse
(async () => {
year=2023
username = 'hikaru'
for(var month=1; month<=12; month++) {
let url = `https://api.chess.com/pub/player/${username}/games/${year}/${month}/pgn`
response = await fetch(url)
const bodyText = await response.text();
const blob = new Blob([bodyText], { type: 'text/plain' });
const a = document.createElement('a');
a.style.display = 'none';
@mvrozanti
mvrozanti / remove-reddit-attribution-banner.py
Last active January 13, 2024 03:51
Script to remove the reddit attribution banner using Pillow in python
#!/usr/bin/env python
import argparse
from PIL import Image
import os
def remove_reddit_banner(image_path, dry_run=False):
image = Image.open(image_path)
try:
has_banner = has_reddit_banner(image)
except: