Skip to content

Instantly share code, notes, and snippets.

View minhoryang's full-sized avatar
😍
Happy Today!

Minho Ryang minhoryang

😍
Happy Today!
View GitHub Profile
@minhoryang
minhoryang / Dockerfile
Created May 16, 2025 08:58 — forked from adtac/Dockerfile
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@minhoryang
minhoryang / async-iterable-to-observable.ts
Created March 25, 2025 11:08 — forked from lhr0909/async-iterable-to-observable.ts
Conversion between AsyncIterable (AsyncIterator) and Observable
function asyncIterableToObservable<T>(iterable: AsyncIterable<T>): Observable<T> {
return new Observable<T>(
(observer: Subscriber<T>) =>
void (async () => {
try {
for await (const item of iterable) {
if (observer.closed) {
return;
}
observer.next(item);
@minhoryang
minhoryang / The Rules.md
Created June 26, 2024 12:55 — forked from sebmarkbage/The Rules.md
The Rules of React

The Rules of React

All libraries have subtle rules that you have to follow for them to work well. Often these are implied and undocumented rules that you have to learn as you go. This is an attempt to document the rules of React renders. Ideally a type system could enforce it.

What Functions Are "Pure"?

A number of methods in React are assumed to be "pure".

On classes that's the constructor, getDerivedStateFromProps, shouldComponentUpdate and render.

@minhoryang
minhoryang / vmware.md
Created February 27, 2024 12:38 — forked from ayebrian/vmware.md
VMware ESXI 8 / VCSA 8/ vCenter 8 / Workstation 17 8 license key 2024

vCenter Server 8 Standard

Key Tested
4F282-0MLD2-M8869-T89G0-CF240
0F41K-0MJ4H-M88U1-0C3N0-0A214

ESXi 8

Key Tested
4V492-44210-48830-931GK-2PRJ4
vSphere 6 Enterprise Plus:
1C20K-4Z214-H84U1-T92EP-92838
1A2JU-DEH12-48460-CT956-AC84D
MC28R-4L006-484D1-VV8NK-C7R58
5C6TK-4C39J-48E00-PH0XH-828Q4
4A4X0-69HE3-M8548-6L1QK-1Y240
vSphere with Operations Management 6 Enterprise:
4Y2NU-4Z301-085C8-M18EP-2K8M8
1Y48R-0EJEK-084R0-GK9XM-23R52
#!/usr/bin/python3
import time
import os
from watchdog.observers import Observer
from watchdog.events import *
CMD_MOUNT = "modprobe g_mass_storage file=/piusb.bin stall=0 ro=1"
CMD_UNMOUNT = "modprobe -r g_mass_storage"
CMD_SYNC = "sync"
#!/usr/bin/env bash
{ set +x; } 2>/dev/null
IFS=$'\n'
set "$@" $(find ~ -name ".*" ! -name ".CFUserTextEncoding" ! -type l -mindepth 1 -maxdepth 1) # dotfiles
set "$@" $(find ~ -name "Google *" -mindepth 1 -maxdepth 1) # Google Drive
set "$@" ~/git # store on github/etc :)
set "$@" ~/node_modules
set "$@" ~/Applications # install apps with brew cask
@minhoryang
minhoryang / screenshot.sh
Last active June 1, 2018 04:50
Screenshot of X11 Window.
#!/bin/bash
import -window $(xwininfo | grep -Po 'Window id: .*? ' | grep -Po '0x.* ') screenshot.jpg
@minhoryang
minhoryang / cloudSettings
Last active November 6, 2018 07:29 — forked from AilisObrian/cloudSettings
Visual Studio Code Sync Settings Gist
{"lastUpload":"2017-08-10T11:51:57.295Z","extensionVersion":"v2.8.2"}
@minhoryang
minhoryang / build_dm_awsec2.sh
Last active August 12, 2017 07:32 — forked from pahud/build_dm_awsec2.sh
build your docker-machine on AWS EC2 instance
#!/bin/bash
machine=$(python -c "import uuid;print(uuid.uuid4())")
# NEEDED: AmazonEC2FullAccess, AmazonEC2SpotFleetRole
AWS_ACCESS_KEY_ID=$(aws configure get aws_access_key_id)
AWS_DEFAULT_REGION=$(aws configure get region)
AWS_SECRET_ACCESS_KEY=$(aws configure get aws_secret_access_key)
VPC=$(aws ec2 describe-vpcs | jq -r '.Vpcs[0].VpcId')