Skip to content

Instantly share code, notes, and snippets.

View extJo's full-sized avatar

Sungyun(Hunt) Jo extJo

View GitHub Profile
@twaddington
twaddington / UserAgentInterceptor.java
Created October 12, 2017 02:17
Injects a User-Agent header into outgoing OkHttp requests.
package com.enlighthq.mobile.http;
import android.os.Build;
import java.io.IOException;
import java.util.Locale;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;
@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';
/*
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