Skip to content

Instantly share code, notes, and snippets.

View romgrk's full-sized avatar
♥️
hey

Rom Grk romgrk

♥️
hey
View GitHub Profile
import * as React from 'react';
import { flushSync } from 'react-dom';
import {
Button,
Container,
Checkbox,
Switch,
Box,
Paper,
TextField,
// See 2nd file in this gist for strings dataset
import b from 'benny';
import MurmurWasm from '/home/romgrk/src/emotion/packages/hash-rust/index'
import strings from './emotionStrings'
const inputs = [
'background-color:red;',
'background-color:red;color:white;border-radius:24px;font-size:12px;font-family:"Roboto";',
import * as React from 'react';
import { flushSync } from 'react-dom';
import {
Button,
Container,
Checkbox,
Switch,
Box,
Paper,
TextField,
import b from 'benny';
import { input, theme } from './data'
function slowMatch(objects: typeof input) {
const variants = theme.variants
const result = []
for (let i = 0; i < objects.length; i++) {
const props = objects[i] as any
impl eframe::App for MyApp {
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
if self.captures.is_none() {
self.captures = Some(take_screenshot());
}
egui::CentralPanel::default().show(ctx, |ui| {
egui::ScrollArea::both().show(ui, |ui| {
if let Some(captures) = &self.captures {
captures.iter().for_each(|capture| {
import * as React from 'react';
import { flushSync } from 'react-dom';
import {
Button,
Container,
Checkbox,
Switch,
Box,
Paper,
TextField,
import * as React from 'react';
import { flushSync } from 'react-dom';
import {
Button,
Container,
Checkbox,
Switch,
Box,
Paper,
TextField,
import * as React from 'react';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import CssBaseline from '@mui/material/CssBaseline';
const darkTheme = createTheme({
palette: {
mode: 'dark',
background: {
default: '#262626',
}
@romgrk
romgrk / index.js
Last active August 2, 2024 23:17
aoe4 leaderboard scraper
const fs = require('fs');
const axios = require('axios');
const jsdom = require('jsdom');
const { JSDOM } = jsdom;
const TABLE_SELECTOR = 'table.table-auto'
const LINK_NEXT_SELECTOR = 'a[rel="next"]'
let page = 1
let data = []
@romgrk
romgrk / reduce.js
Created June 6, 2024 16:34
reduce for valdemar <3
function reduce(array, callback, initial) {
let accumulator = initial
for (let i = 0; i < array.length; i++) {
let currentValue = array[i]
accumulator = callback(accumulator, currentValue)
}
return accumulator
}