Skip to content

Instantly share code, notes, and snippets.

View ysyun's full-sized avatar

YoungSik Yun ysyun

View GitHub Profile
@ysyun
ysyun / React Lifecycle Methods
Created February 6, 2018 14:09 — forked from fisherwebdev/React Lifecycle Methods
Cheatsheet for React lifecycle and update cycle methods
Lifecycle: | Update:
Mounting and Unmounting | New Props or State
--------------------------------+-----------------------------------
|
getDefaultProps() | componentWillReceiveProps()*
|
getInitialState() | shouldComponentUpdate()
|
componentWillMount() | componentWillUpdate()
|
@ysyun
ysyun / webtail.py
Created October 3, 2017 02:05 — forked from fiorix/webtail.py
tail -F and broadcast to all of your browsers via sse
#!/usr/bin/env python
# coding: utf-8
#
# start the server:
# python webtail.py /var/log/syslog
#
# point all your browsers to:
# http://localhost:8888
@ysyun
ysyun / index.html
Created July 1, 2017 01:30
High Order Observable-2
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GistRun</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Hello world!</h1>
<script src="script.js"></script>
@ysyun
ysyun / 1-observable.js
Last active June 30, 2017 07:28
RxJS High Order Observable
const dom = $('#operator');
const observable = Rx.Observable.interval(1000).take(5);
// const transform = observable.map((x) => 'hello-' + 10);
// transform.subscribe((x) => dom.append('<li>' + x + '</li>'));
// const highOrderObservable = observable.map(x => Rx.Observable.of(1,2));
// highOrderObservable.subscribe((x) => {
// x.subscribe((y) => {
// dom.append('<li>' + y + '</li>');
@ysyun
ysyun / 0-multiplebyten.js
Last active June 26, 2017 03:04
RxJS Subjects and Multicasting Operators
const dom = $('#operator');
const observable = Rx.Observable.interval(1000).take(5);
// function multipleBy(cb) {
// const source = this;
// return Rx.Observable.create( (observer) => {
// source.subscribe((x) => {
// const result = cb(x);
@ysyun
ysyun / 1-multiplyBy.js
Last active June 10, 2017 04:31
Creating Operator
const dom = $('#operator');
const foo = Rx.Observable.of(1, 2, 3, 4);
function multiplyByTen() {
const sourceObs = this;
const currentObs = Rx.Observable.create((observer) => {
sourceObs.subscribe(
(data) => observer.next(data * 10),
(err) => observer.error(err),
() => observer.complete()
@ysyun
ysyun / 5-1.js
Last active June 3, 2017 02:02
RxJS Basic - Creating Observable
let dom = document.getElementById('response');
let observable = Rx.Observable.from([10, 20]);
observable.subscribe((x) => dom.append(x + ','));
@ysyun
ysyun / StartingWithDocker.md
Created April 24, 2017 14:53 — forked from duluca/StartingWithDocker.md
Starting with Docker

What is Docker?

  • Docker is an open platform for developing, shipping, and running applications.
  • Combines a lightweight container virtualization platform with workflows and tooling that help manage and deploy applications.

Why is Containerization Important?

  • Containerization allows for encapsulation of app specific configuration concerns.
  • Encapsulation allows for decoupling of dependencies, so each app can depend on different versions.
  • Simpler dependency management results in a low friction IT environment, less things to learn and break.
  • Low friction allows to ship code faster, test faster, deploy faster, shortening the cycle between writing code and running code.
@ysyun
ysyun / index.html
Last active April 14, 2017 06:14
Cordova Plugin Test for L1_angular_firebase_tuotrial
<div id="deviceready" class="blink">
<p class="event listening">Connecting to Device</p>
<p class="event received">Device is Ready</p>
<p class="device-info"></p>
</div>
@ysyun
ysyun / world_map.json
Created March 8, 2017 04:51
world_map.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.