http://barisser.com/2015/10/consensus-and-identity/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// functional helper to execute every function in a list | |
// and return the value of the first function which not returns false | |
const firstResult = (...args) => functionList => | |
functionList.find(f => f(...args))(...args); | |
// Example (a stupid one): | |
const decisionList = [ | |
(a, b) => a > b ? 'a greater than b' : false, | |
(a, b) => a < b ? 'a smaller than b' : false, | |
() => 'a equal b', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array(5).fill().map((item, index) => index); | |
// [ 0, 1, 2, 3, 4 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Meteor.settings = { | |
PrerenderIO: { | |
token: '*', | |
prerenderServiceUrl: 'https://service.prerender.io' | |
}, | |
'galaxy.meteor.com': { | |
env: { | |
MONGO_URL: 'mongodb://*', | |
ROOT_URL: 'https://staging.melonport.com' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x6D32657f13e771472BdDCD31DE968de84397b7C6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x546457bbDdf5e09929399768AB5a9D588Cb0334d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="https://krysi-csrf-express.now.sh/transfer" method="POST"> | |
<input type="hidden" name="payee" value="eve" /> | |
<input type="hidden" name="amount" value="1234051234" /> | |
<button type="submit">If you're sexy and you know it, click me ;)</button> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Inspired from: https://github.com/xolvio/qualityfaster/blob/master/.scripts/ | |
import { exec } from 'child_process'; | |
const meteorCommand = process.argv[2]; | |
const chimpCommand = process.argv[3]; | |
const meteorProcess = exec(meteorCommand); // 'npm start' | |
meteorProcess.stdout.pipe(process.stdout); | |
meteorProcess.stderr.pipe(process.stderr); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |
- React is the V in MVP (Model-View-Controller)
- It's architecture is similar to the Web Components standard
- Simple said: You can create your "own html tags" like
- React then reassembles your components into the DOM and manages the expensive DOM updates (throught diffing a shadow DOM)