Os bins foram ordenados pelo início dos 4 primeiros dígitos.
- 4011
- 4389 3 5
- 4514 1 6
- 4576
| #!/usr/bin/env bash | |
| set -e | |
| echo "Installing nvm..." | |
| [ -d ~/.nvm ] && rm -rf ~/.nvm | |
| git clone https://github.com/creationix/nvm.git ~/.nvm | |
| cd ~/.nvm | |
| git checkout `git describe --abbrev=0 --tags` | |
| cd - >/dev/null |
We run multiple server processes in two data centers. Each process listens on two ports, one for HTTP and one for HTTPS. HTTPS is terminated by Apache prior to reaching node.js. HTTP goes directly from the client to node.js (through a master load balancer). We do not use clusters. We slice our physical servers into thin virtual machines running SmartOS, each with about 3GB of memory designed for a single node.js process.
Our node.js servers are hapi.js servers using the composer functionality and plugins architecture. We have three sets of plugins loaded: mobile web front end experience (single page app), legacy API reverse proxy, and monitoring.
We also serve original node.js services off another server zone which runs closed source plugins using hapi.
| /** | |
| * KH: Warning! This is part of a prototype made during our early 2016 hacking days and is not suitable for production! | |
| */ | |
| const VERSION = 's24-wokl-social-v6' | |
| const CACHE_FILES = [ | |
| '/', | |
| '/index.html', | |
| '/public/css/card.css', |
| /* | |
| * WARNING: Mutates the fetchContext argument (by default the window or global context). | |
| * | |
| * A crude way to intercept fetch responses, and dispatch actions as needed. Using this | |
| * for more global app concerns, where I may want to dispatch actions depending on the response | |
| * status or body. e.g. When seeing a 401, dispatch a logout action. | |
| * | |
| * In most cases, I'd recommend using a middlware as shown in redux's real-world example. | |
| * (https://github.com/reactjs/redux/blob/master/examples/real-world/middleware/api.js) | |
| * |
| let brands = {}; | |
| brands["elo"] = { | |
| regexpBin: /^401178|^401179|^431274|^438935|^451416|^457393|^457631|^457632|^504175|^627780|^636297|^636368|^(506699|5067[0-6]\d|50677[0-8])|^(50900\d|5090[1-9]\d|509[1-9]\d{2})|^65003[1-3]|^(65003[5-9]|65004\d|65005[0-1])|^(65040[5-9]|6504[1-3]\d)|^(65048[5-9]|65049\d|6505[0-2]\d|65053 [0-8])|^(65054[1-9]|6505[5-8]\d|65059[0-8])|^(65070\d|65071[0-8])|^65072[0-7]|^(65090[1-9]|65091\d|650920)|^(65165[2-9]|6516[6-7]\d)|^(65500\d|65501\d)|^(65502[1-9]|6550[3-4]\d|65505[0-8])/, | |
| regexpFull: /^(401178|401179|431274|438935|451416|457393|457631|457632|504175|627780|636297|636368|(506699|5067[0-6]\d|50677[0-8])|(50900\d|5090[1-9]\d|509[1-9]\d{2})|65003[1-3]|(65003[5-9]|65004\d|65005[0-1])|(65040[5-9]|6504[1-3]\d)|(65048[5-9]|65049\d|6505[0-2]\d|65053[0-8])|(65054[1-9]| 6505[5-8]\d|65059[0-8])|(65070\d|65071[0-8])|65072[0-7]|(65090[1-9]|65091\d|650920)|(65165[2-9]|6516[6-7]\d)|(65500\d|65501\d)|(65502[1-9]|6550[3-4]\d|65505[0-8]))[0-9]{10,12}/, | |
| regexpCvv: /^\d{3}$/, | |
| }; |
| //campo para validação da bandeira de cartão | |
| function getCreditCardLabel(c){ | |
| // SOMENTE NÚMEROS | |
| let re = new RegExp("^\d+$"); | |
| if (c.match(re) != null) | |
| return false; |