react + redux + RR
It uses https://gist.github.com/iNikNik/3c1b870f63dc0de67c38 for stores and actions.
1) create redux
const redux = createRedux(state);2) get requireAccess func => bindCheckAuth to redux
| /** | |
| * Converts an RGB color value to HSL. Conversion formula | |
| * adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
| * Assumes r, g, and b are contained in the set [0, 255] and | |
| * returns h, s, and l in the set [0, 1]. | |
| * | |
| * @param Number r The red color value | |
| * @param Number g The green color value | |
| * @param Number b The blue color value | |
| * @return Array The HSL representation |
react + redux + RR
It uses https://gist.github.com/iNikNik/3c1b870f63dc0de67c38 for stores and actions.
1) create redux
const redux = createRedux(state);2) get requireAccess func => bindCheckAuth to redux
| #!/usr/bin/env bash | |
| set -e # Exit on errors | |
| # A configurable, strict IPTables firewall | |
| # Save this to /usr/local/bin and modify to your needs | |
| # Config - edit this! | |
| ETH_INTERFACE="eth0" | |
| ALLOW_PORTS="22 80 443" |
I hereby claim:
To claim this, I am signing this object:
| function loadData(url){ | |
| return new Promise((resolve, reject) => { | |
| let xmlhttp = new XMLHttpRequest(); | |
| xmlhttp.onreadystatechange = function(){ | |
| if(xmlhttp.readyState === XMLHttpRequest.DONE){ | |
| if(xmlhttp.status === 200){ | |
| resolve(xmlhttp.responseText); | |
| }else{ | |
| reject(xmlhttp.status); | |
| } |