Skip to content

Instantly share code, notes, and snippets.

View agurtovoy's full-sized avatar
💥
Be all you can be

Aleksey Gurtovoy agurtovoy

💥
Be all you can be
  • Iowa City, IA
View GitHub Profile
@agurtovoy
agurtovoy / f256-disk-image.sh
Last active March 24, 2025 05:49
A script to create MAME-compatible FAT32 disk image for the Foenix F256 on a Mac
#!/bin/bash
if [ "$#" -lt 2 ]; then
echo "Usage: $0 [-q] <disk_name> <size_in_mb>"
exit 1
fi
QUIET=false
while getopts "q" opt; do
case $opt in
@agurtovoy
agurtovoy / findDOMNode.ts
Created January 11, 2025 18:37
Using `react-reconciler` to reimplement `findDOMNode`
import { Component } from 'react'
//@ts-ignore
import { findCurrentHostFiber } from 'react-reconciler/reflection'
// https://github.com/facebook/react/blob/main/packages/shared/ReactInstanceMap.js#L18
export function getInstance(key: any) {
return key._reactInternals
}
// https://github.com/facebook/react/blob/main/packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js#L167
@agurtovoy
agurtovoy / Dockerfile
Created June 7, 2021 01:30
Docker build image for OpenCV running in AWS Lambda
# build OpenCV
FROM public.ecr.aws/lambda/python:3.8
# install prerequisites
RUN yum update -y && yum install -y wget tar binutils make
RUN yum install -y cmake3 && ln -s /usr/bin/cmake3 /usr/bin/cmake
RUN yum install -y ninja-build && ln -s /usr/bin/ninja-build /usr/bin/ninja
RUN yum install -y gcc10 gcc10-c++ && ln -s /usr/bin/gcc10-gcc /usr/bin/gcc && ln -s /usr/bin/gcc10-c++ /usr/bin/g++
# building from sources, see https://docs.opencv.org/3.4/dd/dd5/tutorial_py_setup_in_fedora.html
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://json-schema.org/draft-07/schema#",
"title": "Core schema meta-schema",
"definitions": {
"schemaArray": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#"

Using your hw7/problem1 solution as a starting point, implement a Rectangle class template that would play well wtih Point, but otherwise with an interface that would make sense to you.

Keybase proof

I hereby claim:

  • I am agurtovoy on github.
  • I am agurtovoy (https://keybase.io/agurtovoy) on keybase.
  • I have a public key ASD7qbo6K25bpkn0g2Pow_x-S9d8za0WgMyU5EQkVGkqlgo

To claim this, I am signing this object: