Skip to content

Instantly share code, notes, and snippets.

View dougwithseismic's full-sized avatar
🎯
For Hire

Doug silkstone dougwithseismic

🎯
For Hire
View GitHub Profile
@dougwithseismic
dougwithseismic / Find common state management patterns and print them.js
Last active June 29, 2024 16:37
Start Reversing Literally ANY React App
// Configuration object for the search
const searchConfig = {
searchCriteria: { user: { id: true, email: true } }, // What we're looking for
maxDepth: 50, // How deep to search in the tree
stopAfterFirst: false, // Whether to stop after finding the first match
searchPaths: ["memoizedProps", "memoizedState"], // Where to look in each node
mainSelector: "#__next", // The root element of our React app
callback: (matchingObjects) => {
matchingObjects.forEach(({ matchingObject, fiberNode }) => {
console.log("Found matching object:", matchingObject);
import { getCalApi } from "@calcom/embed-react"
import { useRef, useEffect } from "react"
const useCalDotCom = (namespace: string, link: string, config: object) => {
const calRef = useRef<any>(null)
useEffect(() => {
const initCal = async () => {
const cal = await getCalApi()
@dougwithseismic
dougwithseismic / clientsite.html
Last active September 1, 2022 13:21
JavaScript Express / Node : How can I serve different scripts to different customers like Hotjar does?
<script defer src='https://my.backend.io/v1/library/customer-xyz123/ />