Skip to content

Instantly share code, notes, and snippets.

View ChangJoo-Park's full-sized avatar
:octocat:
🌱

ChangJoo Park(박창주) ChangJoo-Park

:octocat:
🌱
View GitHub Profile
@ChangJoo-Park
ChangJoo-Park / rescript-react-hashmode-router.res
Created May 21, 2021 01:29
Rescript react hashmode routing
@module("./logo.svg") external logo: string = "default"
%%raw(`import './App.css';`)
@react.component
let make = () => {
let url = RescriptReactRouter.useUrl()
switch url.hash {
| "" => <Home />
const { fetch } = useFetch(async () => {
const { data } = await usePrefetchStore("dashboard", "/api/dashboard");
// data를 필요한 변수에 바인딩
})
fetch()
const fetcher = (url) => fetch(url).then(response => response.json())
const store = {}
const defaultPrefetchOption = {
ttl: 1000 * 10,
resetCache: false,
}
/**
@ChangJoo-Park
ChangJoo-Park / app.ts
Last active February 6, 2021 15:39
Simple Deno API Server using standard library
import {
listenAndServe,
ServerRequest,
} from "https://deno.land/std/http/server.ts";
const options: Deno.ListenOptions = { port: 8000 };
class Router {
_get: { [k: string]: (req: ServerRequest) => void } = {};
@ChangJoo-Park
ChangJoo-Park / lean-canvas.vue
Last active September 26, 2020 14:46
Lean Canvas Vue
<template>
<div class="hello">
<div v-if="loading">불러오는 중</div>
<div v-else>
<ul>
<li v-for="(canvas, index) in canvases" :key="index">{{ canvas.title }}</li>
</ul>
<div v-if="currentCanvas">
<div> {{ currentCanvasKey }} {{ currentCanvas.title }}</div>
<div v-if="currentItems">
const wordsGerman =['wie','ich','seine','dass','er','war','für','auf','sind','mit','sie','sein','bei','ein','haben','dies','aus','durch','heiß','Wort','aber','was','einige','ist','es','Sie','oder','hatte','die','von','zu','und','ein','bei','wir','können','aus','andere','waren','die','tun','ihre','Zeit','wenn','werden','wie','sagte','ein','jeder','sagen','tut','Satz','drei','wollen','Luft','gut','auch','spielen','klein','Ende','setzen','Zuhause','lesen','seits','Hafen','groß','buchstabieren','hinzufügen','auch','Lande','hier','muss','groß','hoch','so','folgen','Akt','warum','fragen','Männer','Veränderung','ging','Licht','Art','aus','müssen','Haus','Bild','versuchen','uns','wieder','Tier','Punkt','Mutter','Welt','in der Nähe von','bauen','selbst','Erde','Vater','jeder','neu','Arbeit','Teil','nehmen','erhalten','Ort','gemacht','leben','wo','nach','zurück','wenig','nur','Runde','Mann','Jahr','kam','zeigen','jeder','gut','mir','geben','unsere','unter','Name','sehr','durch','nur','Formular','Satz','groß','denken','
# 최 상위 EditorConfig 파일
root = true
# 모든 파일에 유닉스 스타일의 줄바꿈과 파일 끝을 지정합니다
[*]
end_of_line = lf
insert_final_newline = true
# 여러 유형의 확장자에 대한 기본 문자열 설정을 합니다
[*.{js,py}]
@ChangJoo-Park
ChangJoo-Park / platform_switch.dart
Created February 6, 2020 13:39
platform aware switch widget
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@ChangJoo-Park
ChangJoo-Park / stateful_dialog.dart
Created January 29, 2020 00:26
Using State in Dialog
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@ChangJoo-Park
ChangJoo-Park / flutter_facebook_newsfeed.dart
Created January 24, 2020 13:14
Flutter facebook newsfeed refactoring with method (anti-pattern)
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override