Skip to content

Instantly share code, notes, and snippets.

View sujinleeme's full-sized avatar
🎯
Focusing

Sujin Lee sujinleeme

🎯
Focusing
View GitHub Profile
@sujinleeme
sujinleeme / sample.json
Last active February 10, 2021 17:25
sample.json
{
"type":"object",
"require": true,
"patternProperties":{
"[A-Za-z:0-9]":{
"type":"object",
"additionalProperties":false,
"required":[
"time",
"timestamp",
@sujinleeme
sujinleeme / MockFile.js
Created February 14, 2021 12:56 — forked from josephhanson/MockFile.js
Mock file for JavaScript based file upload - with basic test harness
// mock file
function MockFile() { };
MockFile.prototype.create = function (name, size, mimeType) {
name = name || "mock.txt";
size = size || 1024;
mimeType = mimeType || 'plain/txt';
function range(count) {
var output = "";
import { useState, useEffect } from "react";
interface Dimensions {
width: number | null;
height: number | null;
}
export const useWindowDimensions = (): Dimensions => {
const hasWindow = typeof window !== "undefined";