Skip to content

Instantly share code, notes, and snippets.

View Kaligraphy247's full-sized avatar
💭
Probably Available

James Ononogbu Kaligraphy247

💭
Probably Available
View GitHub Profile
@Kaligraphy247
Kaligraphy247 / cache.ts
Created November 13, 2024 18:48 — forked from rallisf1/cache.ts
Simple Typescript Memory Cache
export const cache = {
data: new Map(),
timers: new Map(),
set: (k: string, v: any, ttl: number) => {
if (cache.timers.has(k)) {
clearTimeout(cache.timers.get(k))
}
cache.timers.set(
k,
setTimeout(() => cache.delete(k), ttl * 1000)
// Inspired by Tailwind Daisy UI progress bar: https://daisyui.com/components/radial-progress/
// This is a custom-made progress circular/radial progress bar with centered percentage text.
// Tested with Tailwind 3.x. Should work with lower versions of Tailwind CSS as well.
STEP 1: Add the following custom CSS:
.progress-ring__circle {
transition: stroke-dashoffset 0.35s;
transform: rotate(-90deg);
transform-origin: 50% 50%;
@Kaligraphy247
Kaligraphy247 / tkinterlist.py
Created December 13, 2020 10:50 — forked from athiyadeviyani/tkinterlist.py
Python GUI cheatsheet
# BASIC TKINTER CHEATSHEET
# Build basic GUIs with Python
from tkinter import *
from tkinter import scrolledtext
from tkinter import messagebox
from tkinter.ttk import Progressbar
from tkinter import filedialog
from tkinter import Menu