Skip to content

Instantly share code, notes, and snippets.

View isocroft's full-sized avatar
😜
Seriously fooling around!

Ifeora Okechukwu Patrick isocroft

😜
Seriously fooling around!
View GitHub Profile
@isocroft
isocroft / online_dating_app_design_database.sql
Created October 29, 2025 00:35
A database schema for a Tinder-clone dating app using either MySQL, SQLite or PostgreSQL as primary database
-- MySQL v8.0.16
-- PostgresSQL v16.9.2
CREATE DATABASE IF NOT EXISTS `test`
DEFAULT CHARACTER SET utf8 -- utf8mb4
DEFAULT COLLATE utf8_general_ci; -- utf8mb4_unicode_ci
SET default_storage_engine = INNODB;
CREATE TABLE ();
@isocroft
isocroft / project_management_app_design_database.sql
Last active October 23, 2025 11:23
A database schema for a Trello-clone project management app or managing and tracking tasks, timelines and deliverables using either MySQL, SQLite or PostgreSQL as primary database
-- MySQL v8.0.16
-- PostgresSQL v16.9.2
CREATE DATABASE IF NOT EXISTS `test`
DEFAULT CHARACTER SET utf8 -- utf8mb4
DEFAULT COLLATE utf8_general_ci; -- utf8mb4_unicode_ci
SET default_storage_engine = INNODB;
CREATE TABLE organizations (
@isocroft
isocroft / useObserveDOMMutations.js
Last active October 25, 2025 16:32
a ReactJS hook for observing DOM mutations as they occur upon DOM manipuation
import { useState, useEffect } from "react";
function useObserveDOMMutations (callback = (() => undefined), options = { childList: true, subtree: true, attributes: false, attributeFilter: [], attributeOldValue: false, characterData: false, characterOldValue: false }, rootElementId = '#root') {
const [observer] = useState(() => (typeof window !== "undefined" ? new MutationObserver(function (mutations, instance) {
const reactAppRootElem = window.document.querySelector(rootElementId);
if (!reactAppRootElem) {
instance.disconnect();
return;
}
@isocroft
isocroft / lyrics_display.py
Last active October 25, 2025 22:06
A python cli script to that prints the lyrics to a song character by character and line by line with timer delays using an idle wait on the main thread
from time import time
import sys
def display_lyrics():
song_lyrics_with_roll_timing = [
("They say, \"the holy waters' watered down\"", 0.020),
("and this towns' lost its' faith.", 0.030),
("Our colors will fade", 0.015),
("eventually", 0.001)
]
@isocroft
isocroft / processlist.sql
Created July 24, 2025 22:30 — forked from romuald/processlist.sql
Show PostgreSQL current (running) process list;
SELECT user, pid, client_addr, waiting, query, query_start, NOW() - query_start AS elapsed
FROM pg_stat_activity
WHERE query != '<IDLE>'
-- AND EXTRACT(EPOCH FROM (NOW() - query_start)) > 1
ORDER BY elapsed DESC;
@isocroft
isocroft / low_budget_ride_hailing_app_design_database.sql
Last active November 2, 2025 19:54
A database schema for an InDrive-clone ride hailing app that helps link riders to drivers on frequently-travelled transport routes (pricing based on a fair bargain) based on OpenStreet Maps info using either MySQL, SQLite or PostgreSQL as primary database
-- MySQL v8.0.16
-- PostgresSQL v16.9.2
CREATE DATABASE IF NOT EXISTS `test`
DEFAULT CHARACTER SET utf8 -- utf8mb4
DEFAULT COLLATE utf8_general_ci; -- utf8mb4_unicode_ci
SET default_storage_engine = INNODB;
CREATE TABLE rider_details (
@isocroft
isocroft / mid_budget_ecommerce_storefront_plus_backoffice_app_design_database.sql
Last active November 2, 2025 12:21
A database schema for an single-DB_shared-schema multi-tenant SaaS e-commerce storefront with inventory+backoffice that specializes in selling apparels and ready-made clothing as well as smartphones using either MySQL, SQLite or PostgreSQL as primary database
-- MySQL v8.0.16
-- PostgresSQL v16.9.2
CREATE DATABASE IF NOT EXISTS `test`
DEFAULT CHARACTER SET utf8 -- utf8mb4
DEFAULT COLLATE utf8_general_ci; -- utf8mb4_unicode_ci
SET default_storage_engine = INNODB;
CREATE TABLE organizations (
@isocroft
isocroft / low_budget_fintech_wallet_ledger_app_design_database.sql
Last active November 5, 2025 15:03
A database schema for a (ChipperCash-like) fin-tech multi-currency wallet app with types, accounts and transactions using either MySQL, SQLite or PostgreSQL as primary database
-- MySQL v8.0.16
-- PostgresSQL v16.9.2
CREATE DATABASE IF NOT EXISTS `test`
DEFAULT CHARACTER SET utf8 -- utf8mb4
DEFAULT COLLATE utf8_general_ci; -- utf8mb4_unicode_ci
SET default_storage_engine = INNODB;
CREATE TABLE user_details (
@isocroft
isocroft / low_budget_social_media_app_design_database.sql
Last active October 25, 2025 16:10
The database schema for a low-budget social media site (Reddit-like or BlueSky-like) using either MySQL, SQLite or PostgreSQL as primary database
-- MySQL v8.0.16
-- PostgresSQL v16.9.2
CREATE DATABASE IF NOT EXISTS `test`
DEFAULT CHARACTER SET utf8 -- utf8mb4
DEFAULT COLLATE utf8_general_ci; -- utf8mb4_unicode_ci
SET default_storage_engine = INNODB;
CREATE TABLE user_details (
@isocroft
isocroft / exercise_file--bruteForce_dictionary_generator.sh
Last active November 3, 2025 22:09
A bash script for generating all possible unique passwords (dictionary) for brute-forcing a web servers' login endpoint without adequate security protections
#!/bin/bash
# BrutePassGen v1.0
# Coded by: github.com/isocroft
# X: @isocroft
# @HINT: A very minimal yet specific `readarray`-like implementation using `read`.
# @INFO: Older versions of bash (v3 and below) do not support `readarray(...)` or `mapfile(...)`.
if ! type -t readintoarray >/dev/null; then