Skip to content

Instantly share code, notes, and snippets.

<!--
This is an example for HTML generation using octocode-mcp with this prompt:
https://github.com/bgauryy/octocode-mcp
"use octocode
Search for threejs examples
get top examples from top repositories
create a stunning, hyper-realistic video of a man walking through a futuristic city. be creative! blow my mind!"
-->
<!DOCTYPE html>
@bgauryy
bgauryy / React_Compiler_Function_Memoization_Analysis.md
Created July 27, 2025 11:36
React_Compiler_Function_Memoization_Analysis.md

React Compiler Function Memoization Analysis

Document Version: 1.0
Date: 7/27/25
Issue Reference: React Issue #34014
Research Tool: octocode-mcp

Executive Summary

The React Compiler exhibits conservative behavior when optimizing function calls returned from custom hooks, leading to missed memoization opportunities. Functions that are referentially stable and return deterministic values are not automatically memoized, requiring manual useMemo wrapping to achieve optimization. This document provides a comprehensive technical analysis of the root cause, current implementation details, and potential solutions.

@bgauryy
bgauryy / gist:fcd5edcfb9f198b89ae2dd11168186d3
Created July 25, 2025 10:03
vibecoding.mdc - Cursor rule that will help you vibe code better!
---
description: Senior engineer process for systematic code changes
alwaysApply: true
---
You are a senior software engineer. Follow this process before making any changes:
1. Validate the clarity and feasibility of the request.
2. Suggest refinements if needed — do not modify code yet.
3. Analyze how the change affects logic, structure, or flow.

MCP Explained by OctoCode MCP: Deep Dive and Comparison of Popular Code Search & Documentation MCPs (Context7, GitHub Official MCP, AWS MCP Suite)

About This Analysis

This research was conducted entirely using OctoCode MCP on July 21, 2025, to gather all MCP platform details, codebase data, and technical specifications. OctoCode MCP analyzed multiple MCP servers (including itself) by retrieving live data from GitHub repositories, npm packages, documentation, and API endpoints to create this comprehensive comparison.

What This Demonstrates:

  • Self-Referential Analysis: OctoCode MCP analyzing itself and competitors
  • Cross-Repository Research: Analysis spanning multiple codebases and ecosystems
  • Real-Time Intelligence: Live data gathering from GitHub, npm, and package registries with verified accuracy
@bgauryy
bgauryy / requestAnimationFrameMonitoring.js
Created May 14, 2022 10:32
requestAnimationFrame runtime monitoring tool
const ANIMATION_CHECK_INTERVAL_DELAY = 300;
const FRAMES_TO_CHECK = 100;
//This is a POC of a runtime monitoring tool that should detect flaky UX in web applications due to the delay of painting frames.
//It is done by calculating the average diff of requestAnimationFrame callbacks.
//It can be used to detect heavy executions that might decrease conversion in web applications (mostly on loading time)
monitorAnimationFrameRate((time) => {
//optimal - 16.7 (ms to render a frame)
console.log(`Animation Frame Rate: ${time.toFixed(2)}`);
var _0x34d5 = ['Q29udGVudC1UeXBl', 'YXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVk', 'c2V0UHVibGljS2V5', 'TUlJRUlqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0JBOEFNSUlFQ2dLQ0JBRUF3NTZoY3Z1R25QZHZaM0hGQWtLN1QyR2EweTJaS2hkdjJhVG9SU1BzbWtFRVAyR2RsY1FrTTY4a0VXeHliWXBDWG45eXg5OFJxTFNNYStDUjYvUkZKaFZMUVNLdHkrNm16U2IyTURSYitUVks3NWpCN1F5aGZ6TVdacFYySlBzdGFyMGxxRkxwR3owdFJIS1lTY1h0VnZnNWVUWThtcjZ0dXlZK0VHTEw1SFd3UzFqSnBtaHNEN0RxZGQ1TTkxbElRemVtTU5nNWp2RktNclNlU1NSQlFZR1lSRDFWekVremEra3A2UVdlS1ZocWVVL0xFdFlZYUU4SlRlWGwzV1E2UExVNmZleXJndlFrN0MxeEhmeEVTVWx2UVl6aFlsbmt0clVBTmxxQVRyQ2JyTGtDL0oyNWx0T08vY2lsb0xKV3I0TWFHbERWU01FS1ZLYTNsQUt6SlJoNUd4SkovWDB2M0hzT0hsVUR5aW5ZdlA0eGpBWXRnWFZoYVBLbldDelNndjV2eWpmdEczQWlmZHlsOVFLejRuejZKRS9lOXE2YjhhNGdCM25kNm4xVDlVdklpNXhpdHhzZHBPNDVwWm1uN0dXQTgxOUJORElTZHNIcEcvSG9LL080N2xZTXFoRHJHWVhoZ2oxZWNodmJLSXJOdGxZMGZmd1U3QzYxR1l5TGVLbzF1aWhkU0gvaUF3czZyY25iWXFNM0hXN3RibncyaDhOZm1haVVZcDF3ek1oZ0ozQ3grVHhjcXdGTU0wU01LajF1SHVsSWo0MTg0WVJFMW5weEl3T1VSd3FENnJNbko0WXZqMFl2ZnZMQmJJN1krZ1N3YTJoTHJqbEJwN0V6b3VqdjBa
@bgauryy
bgauryy / asyncTest.js
Last active May 18, 2019 11:45
Async callbacks in a nutshell
(function () {
const LIMIT = 5;
const bcA = new BroadcastChannel('id');
const bcB = new BroadcastChannel('id');
let flag = false, count = 0;
bcA.onmessage = () => {
console.log('(。_+)\BroadcastChannel');
};
const IPV4Reg = '((([0-9])|(1*[0-9][0-9])|(2[1-4][0-9])|(25[0-5]))\\.){3}(([0-9])|(1*[0-9][0-9])|(2[1-4][0-9])|(25[0-5]))';
const IP4 = `(^${IPV4Reg}$)|(^${IPV4Reg}\\:)|(^${IPV4Reg}\/)`;
function getIPDomain(url) {
const matches = new RegExp(IP4).exec(url);
if (matches && matches[0]) {
return matches[0].replace(/\:|\//, '');
}
}