Skip to content

Instantly share code, notes, and snippets.

View oirodolfo's full-sized avatar
🏳️‍🌈

Rod Kisten (Costa) oirodolfo

🏳️‍🌈
View GitHub Profile
@oirodolfo
oirodolfo / ZSHuserscript.user.js
Last active May 13, 2026 12:20
ZSH userscript.user.js
// ==UserScript==
// @name Zsh Manual Mobile Reader - v7
// @namespace https://migos.club/userscripts
// @version 1.0.0
// @description Mobile-first Zsh manual reader with resilient parsing, full-width wrapped Highlight.js code blocks, cleaner anchors, and compact repeated module links.
// @match https://zsh.sourceforge.io/Doc/**/*
// @run-at document-end
// @grant none
// ==/UserScript==
your npm username: oirodolfo
the email on the npm account: [email protected]
Nocturnal Pastry Monster
@oirodolfo
oirodolfo / listAllEventListeners.js
Created March 24, 2023 15:20 — forked from tkafka/listAllEventListeners.js
List all event listeners in a document
console.table((function listAllEventListeners() {
const allElements = Array.prototype.slice.call(document.querySelectorAll('*'));
allElements.push(document); // we also want document events
const types = [];
for (let ev in window) {
if (/^on/.test(ev)) types[types.length] = ev;
}
let elements = [];
for (let i = 0; i < allElements.length; i++) {
@oirodolfo
oirodolfo / listAllEventListeners.js
Created March 24, 2023 15:20 — forked from dmnsgn/listAllEventListeners.js
List all event listeners in a document
const listeners = (function listAllEventListeners() {
let elements = [];
const allElements = document.querySelectorAll('*');
const types = [];
for (let ev in window) {
if (/^on/.test(ev)) types[types.length] = ev;
}
for (let i = 0; i < allElements.length; i++) {
const currentElement = allElements[i];
@oirodolfo
oirodolfo / tailwind-plugin-patcher.py
Created December 21, 2022 15:17 — forked from liautaud/tailwind-plugin-patcher.py
Small Python script to patch the IntelliJ TailwindCSS plugin.
import re
from zipfile import ZipFile, Path
"""
TailwindCSS plugin patcher for IntelliJ IDEA
--------------------------------------------
1. Download the latest ZIP of the plugin compatible with your version of IntelliJ here:
https://plugins.jetbrains.com/plugin/15321-tailwind-css/versions
2. Fill `CLASS_ATTRIBUTES` to specify which XML attributes can contain Tailwind classes.
header.dashboard-header {
background-color: #fbfbfb;
}
header.dashboard-header nav .navbar-header {
width: 800px;
}
header.dashboard-header nav .navbar-brand {
font-weight: normal;
padding: 12px 150px;
width: 100%;
@oirodolfo
oirodolfo / ListEvents.md
Created August 7, 2022 22:24 — forked from cmbaughman/ListEvents.md
List all events on element with vanilla Javascript
  Element.prototype._addEventListener = Element.prototype.addEventListener;
  Element.prototype.addEventListener = function(a,b,c) {
    if(c==undefined)
      c=false;
    this._addEventListener(a,b,c);
    if(!this.eventListenerList)
      this.eventListenerList = {};
    if(!this.eventListenerList[a])
function useCachedAbortiveQuery<T>(
query: DocumentNode,
variables: Record<string, unknown>,
deps: Array<any>
) {
const apolloClient = useApolloClient();
const [data, setData] = useState<T>();
const [error, setError] = useState<Error | null>(null);
const [loading, setLoading] = useState<boolean>(true);
@oirodolfo
oirodolfo / retry-action.ts
Created February 10, 2022 16:43 — forked from markmur/retry-action.ts
TypeScript retry util helper
export interface RetryConfig {
timeout: number
max: number
}
export const retryAction = (
fn: (...args: any[]) => Promise<any>,
{ timeout, max }: RetryConfig
): Promise<any | void> => {
// Keep a count of the retries