Skip to content

Instantly share code, notes, and snippets.

View asynchroza's full-sized avatar
🌴
On vacation

Michael Bozhilov asynchroza

🌴
On vacation
View GitHub Profile

Sleep Token - This place will become your tomb
Flobots - Platypus
Carlos Viola - Blasphemous

@asynchroza
asynchroza / flyweight-fix.js
Created August 31, 2024 20:21
Flyweight example fix
class Book {
constructor(title, author, isbn) {
this.title = title;
this.author = author;
this.isbn = isbn;
}
}
const isbnNumbers = new Set();
const bookList = [];
import { useCallback, useState } from "react"
import { DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "../ui/dialog"
import { FileUploadPage } from "./pages/upload"
import { PageProps } from "./pages/types"
import { ModalControlButton } from "./control-button"
import { SelectTargetPage } from "./pages/select-target"
type Page = {
title: string,
component: (props: PageProps) => JSX.Element
@asynchroza
asynchroza / graphql_and_sql_task_one.md
Created December 4, 2023 19:49
GraphQL and SQL task

Task: GraphQL and SQL for Company-User Associations

Imagine you're developing a website similar to LinkedIn, where users are affiliated with particular companies, and some users may be associated with multiple companies. Your objective is to build a GraphQL API integrated with an SQL database to achieve the following:

  • Fetch details about a company and all its linked users in a single database transaction.
  • Implement the capability to update a company's information, with the restriction that the publicly facing name can be changed only once per week.
@asynchroza
asynchroza / swap.sh
Created February 6, 2023 20:47
Swap tilde and non us backlash on MacOS
hidutil property --set '{"UserKeyMapping":[
{"HIDKeyboardModifierMappingSrc":0x700000035,"HIDKeyboardModifierMappingDst":0x700000064},
{"HIDKeyboardModifierMappingSrc":0x700000064,"HIDKeyboardModifierMappingDst":0x700000035}
]}'