Skip to content

Instantly share code, notes, and snippets.

View extJo's full-sized avatar

Sungyun(Hunt) Jo extJo

View GitHub Profile
@extJo
extJo / count_provider.dart
Created August 3, 2019 08:56
Flutter count App with Provider
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter State Demo',
@extJo
extJo / count_scoped_model.dart
Created August 3, 2019 08:40
Flutter count App with ScopedModel
import 'package:flutter/material.dart';
import 'package:scoped_model/scoped_model.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter State Demo',
@extJo
extJo / count_inherited_widget.dart
Created August 3, 2019 07:21
Flutter count App with InheritedWidget
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter State Demo',
theme: ThemeData(
@extJo
extJo / count_base_sample.dart
Last active August 3, 2019 06:12
Flutter count App with setState, StatefulWidget
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter State Demo',
theme: ThemeData(
/*
ModelBinding<T>: a simple class for binding a Flutter app to a immutable
model of type T.
This is a complete application. The app shows the state of an instance of
MyModel in a button's label, and replaces its MyModel instance when the
button is pressed.
ModelBinding is an inherited widget that must be created in a context above
@extJo
extJo / logger.js
Last active April 5, 2018 05:58
지극히 주관적인 node.js 의 logging 전략 (with winston)
const DailyRotateFile = require('winston-daily-rotate-file');
const moment = require('moment');
const fs = require('fs');
const { createLogger, format, transports } = require('winston');
const {
printf, combine, timestamp, prettyPrint,
} = format;
const logDir = 'logs';
@extJo
extJo / mondrian
Created March 27, 2018 10:29
mondrian.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="본인 파일 context 넣으세요"
android:weightSum="5"
android:orientation="horizontal"
android:background="#000">