Skip to content

Instantly share code, notes, and snippets.

View ifndefdeadmau5's full-sized avatar
🦉
uhoo hoo

Alucard ifndefdeadmau5

🦉
uhoo hoo
View GitHub Profile
@ifndefdeadmau5
ifndefdeadmau5 / refine-schema.graphql
Created January 19, 2023 02:38
refine-schema.graphql
scalar DateTime
scalar Date
type Tag {
name: String
}
interface Sortable {
orderId: Int!
}
import type { ReactElement } from 'react';
import { describe } from '@asdgf/core';
import { assert } from '@asdgf/testing-helpers/uvu/assert/index.js';
import { composeStories, render, screen, waitFor, fireEvent } from 'test/render';
import { StoriesToComposeStories } from 'types/storybook';
import * as stories from './CurriculumTable.stories';
const { DefaultStory } = composeStories(stories) as StoriesToComposeStories<typeof stories>;
async function renderWithOptions(story: ReactElement) {
@ifndefdeadmau5
ifndefdeadmau5 / flaky-test.js
Last active January 1, 2022 08:31
flaky-test.js
import '@testing-library/jest-dom/extend-expect'
import * as React from 'react'
import {render, screen} from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import SimpleList from '../SimpleList'
test('can remove items from the list', () => {
render(<SimpleList />)
const deleteButton = fireEvent.click(screen.queryAllByTestId('delete-button')[0] as HTMLElement)
userEvent.click(deleteButton)
@ifndefdeadmau5
ifndefdeadmau5 / minesweeper.ts
Created August 20, 2021 01:38
leetcode medium
type Coordinate = [number, number];
function updateBoard(board: string[][], click: number[]): string[][] {
const boardCopy = [...board];
const coordinates: Coordinate = [click[0], click[1]];
const result = traverse(boardCopy, coordinates);
return result;
};
[
{
status: 'fulfilled',
value: {
status: 200,
statusText: 'OK',
headers: [Object],
config: [Object],
request: [ClientRequest],
data: [Object]
@ifndefdeadmau5
ifndefdeadmau5 / cloudSettings
Last active December 15, 2020 06:06
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-12-15T06:05:55.266Z","extensionVersion":"v3.4.3"}
@ifndefdeadmau5
ifndefdeadmau5 / cloudSettings
Last active November 18, 2019 09:11
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-11-18T09:11:00.859Z","extensionVersion":"v3.4.3"}
@ifndefdeadmau5
ifndefdeadmau5 / Declarative.js
Created June 28, 2019 00:38
Declarative.js
import React, { useState } from 'react';
import List from './List';
import Item from './Item';
export default () => {
const [input, setInput] = useState('');
const [todos, setTodos] = useState([]);
return (
<div>
@ifndefdeadmau5
ifndefdeadmau5 / Imperative.js
Last active June 28, 2019 00:36
Imperative.js
import React, { useState } from 'react';
import List from './List';
export default () => {
const [input, setInput] = useState('');
let todos = [];
return (
<div>
<input
@ifndefdeadmau5
ifndefdeadmau5 / BestPracticeCollection.md
Created June 21, 2019 00:37
프론트엔드 Coding Best Practice

Frontend Guidelines

HTML

Semantics

HTML5 provides us with lots of semantic elements aimed to describe precisely the content. Make sure you benefit from its rich vocabulary.

<!-- bad -->