Skip to content

Instantly share code, notes, and snippets.

@skamensky
skamensky / clean_ditto_db.py
Last active December 19, 2024 01:44
This script is intended to be used in conjunction with the Ditto clipboard manager (https://ditto-cp.sourceforge.io/). This script queries the ditto.db file for any images, writes the images to disk, and deletes the data from the ditto.db file.
import sqlite3
import os
from io import BytesIO
from PIL import Image
from pathlib import Path
import argparse
# Parse command-line arguments
parser = argparse.ArgumentParser(description='Process some data.')
parser.add_argument('--skip-backup', action='store_true', help='Do not write files to disk')
@danielquisbert
danielquisbert / Key_starUML.md
Last active October 9, 2025 16:00
Key para starUML
@tixastronauta
tixastronauta / facebook_leads.md
Last active April 7, 2025 17:35
Receiving Facebook Leads on a Webhook
@bryhal
bryhal / gist:4129042
Created November 22, 2012 02:08
MYSQL: Generate Calendar Table
DROP TABLE IF EXISTS time_dimension;
CREATE TABLE time_dimension (
id INTEGER PRIMARY KEY, -- year*10000+month*100+day
db_date DATE NOT NULL,
year INTEGER NOT NULL,
month INTEGER NOT NULL, -- 1 to 12
day INTEGER NOT NULL, -- 1 to 31
quarter INTEGER NOT NULL, -- 1 to 4
week INTEGER NOT NULL, -- 1 to 52/53
day_name VARCHAR(9) NOT NULL, -- 'Monday', 'Tuesday'...