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 / react-router-dom-v.6.02.prompt.blocker.js
Created January 12, 2026 13:04 — forked from rmorse/react-router-dom-v.6.02.prompt.blocker.js
Adds back in `useBlocker` and `usePrompt` to `react-router-dom` version 6.0.2 (they removed after the 6.0.0 beta, temporarily)
/**
* These hooks re-implement the now removed useBlocker and usePrompt hooks in 'react-router-dom'.
* Thanks for the idea @piecyk https://github.com/remix-run/react-router/issues/8139#issuecomment-953816315
* Source: https://github.com/remix-run/react-router/commit/256cad70d3fd4500b1abcfea66f3ee622fb90874#diff-b60f1a2d4276b2a605c05e19816634111de2e8a4186fe9dd7de8e344b65ed4d3L344-L381
*/
import { useContext, useEffect, useCallback } from 'react';
import { UNSAFE_NavigationContext as NavigationContext } from 'react-router-dom';
/**
* Blocks all navigation attempts. This is useful for preventing the page from
* changing until some condition is met, like saving form data.
@isocroft
isocroft / inferal-workspace-architecture.md
Created December 24, 2025 21:50 — forked from yrashk/inferal-workspace-architecture.md
Inferal Workspace Architecture

Inferal Workspace Architecture

Your org's brain that AI can use

This document describes the conceptual architecture of the Inferal Workspace - a text-based, version-controlled knowledge and operations hub designed to replace tools like Notion and Webflow while being natively accessible to AI assistants.

Why We Built This

As an engineering-driven organization, we found ourselves fighting our tools instead of using them. Notion couldn't keep up with how we actually work - context scattered across pages, no version control, and AI that could read but not act. Webflow meant our website lived in a silo, disconnected from our codebase and deployment pipelines. Every tool was another tab, another context switch, another place where knowledge went to die.

@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 / crawler.go
Created January 10, 2025 13:44 — forked from hacktivist123/crawler.go
A simple web crawler
package main
import (
"bytes"
"crypto/tls"
"fmt"
"log"
@isocroft
isocroft / object-watch.js
Created July 15, 2024 09:09 — forked from eligrey/object-watch.js
object.watch polyfill in ES5
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/