Skip to content

Instantly share code, notes, and snippets.

View romgrk's full-sized avatar
♥️
hey

Rom Grk romgrk

♥️
hey
View GitHub Profile
warning: [email protected]: ToolExecError: Command "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "/home/romgrk/.local/share/nvim/lazy/vim-clap/target/release/build/onig_sys-e45f8b494a440f8d/out" "-I" "oniguruma/src" "-DHAVE_UNISTD_H=1" "-DHAVE_SYS_TYPES_H=1" "-DHAVE_SYS_TIME_H=1" "-o" "/home/romgrk/.local/share/nvim/lazy/vim-clap/target/release/build/onig_sys-e45f8b494a440f8d/out/c77b18e714869709-st.o" "-c" "oniguruma/src/st.c" with args cc did not execute successfully (status code exit status: 1).
error: failed to run custom build command for `onig_sys v69.8.1`
Caused by:
process didn't exit successfully: `/home/romgrk/.local/share/nvim/lazy/vim-clap/target/release/build/onig_sys-5a942f407f355d7e/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=RUSTONIG_DYNAMIC_LIBONIG
cargo:rerun-if-env-changed=RUSTONIG_STATIC_LIBONIG
cargo:rerun-if-env-changed=RUSTONIG_SYSTEM_LIBONIG
OUT_DIR = Some(/home/romgrk/.local/share/nvim/lazy/vim-clap/target/release/buil
@romgrk
romgrk / page.tsx
Created May 21, 2025 22:37
base-ui test case
'use client';
import * as React from 'react';
import { Flex } from '@joy-ui/react';
import { useRenderElement } from '@base-ui-components/react';
import './page.css';
import './perf-test.css'
diff --color -bur mui-master/Accordion/AccordionContext.js mui-new/Accordion/AccordionContext.js
--- mui-master/Accordion/AccordionContext.js 2025-05-15 04:27:00.978150724 -0400
+++ mui-new/Accordion/AccordionContext.js 2025-05-15 04:23:53.077302969 -0400
@@ -12,7 +12,5 @@
* @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>}
*/
const AccordionContext = /*#__PURE__*/React.createContext({});
-if (process.env.NODE_ENV !== 'production') {
- AccordionContext.displayName = 'AccordionContext';
-}
/*
* BorrowMap: (possibly) zero-copy mutable data structure in a react context
* =========================================================================
*
* The idea behind this concept is that we can have a mutable container in a
* React-linked store but ONLY IF we never share a reference to the mutable
* container itself. All the reads must be contained inside selectors. As long
* as no one has a second reference to the mutable container, then we are sure
* that no one is able to read/write it without us knowing.
*
@romgrk
romgrk / gist:e22d00073999daaa403fb0979ecec964
Created January 2, 2025 23:52
dig +trace lolawho.com
$ dig +trace lolawho.com   refactor-agnostic-button-props
; <<>> DiG 9.20.4 <<>> +trace lolawho.com
;; global options: +cmd
. 241826 IN NS a.root-servers.net.
. 241826 IN NS b.root-servers.net.
. 241826 IN NS c.root-servers.net.
. 241826 IN NS d.root-servers.net.
. 241826 IN NS e.root-servers.net.
. 241826 IN NS f.root-servers.net.
const focusedVirtualCellSelector = createSelectorMemoizedV8(
gridRenderContextSelector,
gridFocusCellSelector,
currentRowsSelector,
visibleColumnsSelector,
(currentRenderContext, focusedCell, currentRows, visibleColumns) => {
if (!focusedCell) {
function wrapSx(Component) {
const newComponent = (props) => {
const { sx, ...rest } = props
rest.className = useSx(sx)
return Component(rest)
}
newComponent.displayName = Component.displayName ?? Component.name
return newComponent
import {
Box,
Paper,
Container,
} from '@mui/material'
import sx from '@mui/system/styleFunctionSx'
function Row() {
return (
<div>
@romgrk
romgrk / Slow.jsx
Created October 30, 2024 05:36
Simulated slow react component
const WAIT_DURATION = 2
function Slow() {
const start = Date.now()
while ((Date.now() - start) < WAIT_DURATION) {}
return (
<span>slow</span>
)
}
4375 Noah Lemen (2%) [META]
7122 Jack Pope (3%) [META]
14077 Jan Kassens (6%) [META]
15291 Sebastian Silbermann (7%) [VERCEL]
24125 Rick Hanlon (10%) [META]
25050 Ruslan Lesiutin (11%) [META]
25240 Andrew Clark (11%) [VERCEL]
41302 Josh Story (18%) [VERCEL]
58361 Sebastian Markbåge (25%) [VERCEL]