Skip to content

Instantly share code, notes, and snippets.

💻
hacking on projects!

Heechul Ryu ryuheechul

💻
hacking on projects!
Block or report user

Report or block ryuheechul

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ryuheechul
ryuheechul / use-stream.js
Last active Nov 3, 2019
useStream React Hook
View use-stream.js
import { useEffect, useState } from "react";
export function useStream($) {
const [value, setValue] = useState([]);
useEffect(() => {
const subs = $.subscribe({
next: v => setValue(v),
complete: () => console.log("stream completed in useStream"),
error: e => { console.error(e)}
});
@ryuheechul
ryuheechul / patter-match-ish.ts
Last active Oct 25, 2019
My approach to deal with pattern matching types in Typescript
View patter-match-ish.ts
// Type enum (meta type)
enum Type {
Animal,
Digit
}
// types
enum Animal {
Cat,
Dog
@ryuheechul
ryuheechul / README.md
Created May 14, 2019
Prototyping software with yaml
View README.md

Why?

  • Sometimes I want to develop just the logic or the flow of apps not the implementations.
  • I wanted to prototype with "simpler" code.
  • It would be nice to see working without actually writing real code yet.
@ryuheechul
ryuheechul / Playground-for-Keytty-streams.md
Last active Mar 31, 2019
Playground for Keytty reactive streams
@ryuheechul
ryuheechul / 0-Initial-thoughts.md
Created Mar 31, 2019
If keytty was made of reactive streams
View 0-Initial-thoughts.md

After a while since I discovered Functional Reactive Programming, I believe this is the way Keytty should be built.

Articles that convinced me

Currently, Keytty is mostly made up with proactive OOP written in Objective C.

There are several issues that I found when I try to maintain the code and add more features. such as:

  • Controller has too many responsibilities and gets more complex over time.
View useful-regexs.md
/\bHTTP_(?!HOST\b)(.)+/g

HTTP_HOST // not match
HTTP_NOTHOST // match
HTTP_HOSTS // match
HTTP_hHOST // match
HTTP_HOST_3 // match
@ryuheechul
ryuheechul / special-number-36.md
Last active Jan 20, 2019
Something special about the number 36
View special-number-36.md

I just turned age 36 (by Korean standards) and noticed that some of my friends seem to be sad to have such a "big" number as their age.

So I thought about whether there could be anything special about the number 36 and I found a simple and interesting pattern for that number.

When you divide 36 by 2, the answer is 18 (36 / 2 == 18); and when you multiply each digit of 36 individually, the answer is also 18 (3 * 6 == 18)!

So it seemed kind of special to me and then I wondered if there is any natural number that has these same features (except 0)

As a non-math person, the shocking discovery was that 36 seems to be the only number under 10M.

You can’t perform that action at this time.