pip install -r requirements.txt
Run the backend server
Note: if you want to skip history behind this, and just looking for final result see: rx-react-container
When I just started using RxJS with React, I was subscribing to observables in componentDidMount
and disposing subscriptions at componentWillUnmount
.
But, soon I realised that it is not fun to do all that subscriptions(that are just updating property in component state) manually, and written mixin for this...
Later I have rewritten it as "high order component" and added possibility to pass also obsarvers that will receive events from component.
Twisted==15.1.0 | |
hpack==1.0.0 | |
hyperframe==1.0.0 |
Why not? I thought it'd be interesting, and maybe useful.
/* bling.js */ | |
window.$ = document.querySelector.bind(document); | |
window.$$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
NodeList.prototype.__proto__ = Array.prototype; | |
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
import distutils.dir_util | |
import shutil | |
import os | |
def copytree(src, dst): | |
for item in os.listdir(src): | |
s, d = os.path.join(src, item), os.path.join(dst, item) | |
if os.path.isdir(s): | |
shutil.copytree(s, d, False, None) | |
else: |
#!/bin/sh | |
# Create a RAM disk with same perms as mountpoint | |
# Script based on http://itux.idev.pro/2012/04/iservice-speed-up-your-xcode-%D0%BD%D0%B5%D0%BA%D0%BE%D1%82%D0%BE%D1%80%D1%8B%D0%B5-%D1%81%D0%BF%D0%BE%D1%81%D0%BE%D0%B1%D1%8B/ with some additions | |
# Usage: sudo ./xcode_ramdisk.sh start | |
USERNAME=$(logname) | |
TMP_DIR="/private/tmp" | |
RUN_DIR="/var/run" |
#!/usr/bin/env python | |
# gpu_stat.py [DELAY [COUNT]] | |
# dump some gpu stats as a line of json | |
# {"util":{"PCIe":"0", "memory":"11", "video":"0", "graphics":"13"}, "used_mem":"161"} | |
import json, socket, subprocess, sys, time | |
try: | |
delay = int(sys.argv[1]) | |
except: | |
delay = 1 |
function check_password(pwd) { | |
// Copyright (c) 2015 Lee Sahghyuck <[email protected]> | |
// MIT License (http://opensource.org/licenses/mit-license.php) | |
// Author : Lee Sahghyuck <[email protected]> | |
// Date : 2015.02.17 | |
var char_type = 0; | |
if (/[a-z]/.test(pwd)) char_type = char_type + 1; | |
if (/[A-Z]/.test(pwd)) char_type = char_type + 1; | |
if (/[0-9]/.test(pwd)) char_type = char_type + 1; |