Skip to content

Instantly share code, notes, and snippets.

View tomlin7's full-sized avatar
๐ŸŒ
busy with uni

Billy tomlin7

๐ŸŒ
busy with uni
View GitHub Profile
@tomlin7
tomlin7 / keepassdiff.md
Created December 8, 2024 10:14
Making a Diff tool for KeePassXC databases

Making a Diff tool for KeePassXC databases

I started using KeePass back in 2021 and I have been using it since then to store my passwords. But I didn't set up a proper way to sync the database between my devices. So I ended up with multiple databases with different passwords and entries. I wanted to sort of diff the databases and merge them into one, like git diff -- resolving conflicts, reverting, etc. Well, KeePass doesn't provide a way to diff two databases. Hence this project.

Usage

  1. Open two KeePass databases in diff.
  2. See the differences and conflicting entries between the two databases.
  3. Then using merge left, merge right options decide which entries or groups to keep and which to discard.
  4. Finally, export the merged database.
import math, random
import numpy as np
import tkinter as tk
vertices = [
(100, 100, 100),
(100, 100, -100),
(100, -100, 100),
(100, -100, -100),
(-100, 100, 100),
import math
import numpy as np
import tkinter as tk
vertices = [
(100, 100, 100),
(100, 100, -100),
(100, -100, 100),
(100, -100, -100),
(-100, 100, 100),
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2021 billyeatcookies
import json
from colorama import Fore, Back, init, Style
init(autoreset=True)
@tomlin7
tomlin7 / MegaGreeter.rb
Created January 26, 2021 05:02
A greeting class for understanding basics of ruby.
class MegaGreeter
attr_accessor :names
# Create the object
def initialize(names = 'world')
@names = names
end
# say hi to everybody
def say_hi
@tomlin7
tomlin7 / sqlite-create-and-insert.py
Created December 26, 2020 07:16
Create an sqlite database & table and insert data to it
import sqlite3
db = sqlite3.connect('scores.db')
c = db.cursor()
c.execute('''CREATE TABLE stocks
(date text, trans text, symbol text, qty real, price real)''')
c.execute("INSERT INTO stocks VALUES ('2006-01-05','BUY','RHAT',100,35.14)")
@tomlin7
tomlin7 / pagination.py
Created December 21, 2020 17:08
a custom discord.py pagination class
import asyncio
import logging
import typing as t
from contextlib import suppress
import discord
from discord.abc import User
from discord.ext.commands import Context, Paginator
from bot import constants
@tomlin7
tomlin7 / poll.py
Last active September 8, 2022 05:38
Poll Command Discord.py
import discord
from discord.ext import commands
class QuickPoll(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command(pass_context=True)
async def poll(self, ctx, question, *options: str):