Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
Content of the Gist is from a talk by Peggy Rayzis at Chain React 2017: Chain React 2017: Breaking Down Bridging in React Native by Peggy Rayzis
In order for a native code to talk to JS you would need a bridge.
| PASSWORD1 # Replace literal string 'PASSWORD1' with '***REMOVED***' (default) | |
| PASSWORD2==>examplePass # replace with 'examplePass' instead | |
| PASSWORD3==> # replace with the empty string | |
| regex:password=\w+==>password= # Replace, using a regex | |
| regex:\r(\n)==>$1 # Replace Windows newlines with Unix newlines |
| var session | |
| if (window.ApplePaySession) { | |
| var merchantIdentifier = 'merchant.com.canine-clothing' | |
| ApplePaySession.canMakePaymentsWithActiveCard(merchantIdentifier) | |
| .then(function (canMakePayments) { | |
| if (canMakePayments) { | |
| showApplePayButtons() | |
| } | |
| }); | |
| } |
| function applePayButtonClicked(event) | |
| { | |
| var paymentRequest = { | |
| // countryCode: The merchant’s ISO country code. | |
| countryCode: 'US', | |
| // currencyCode: The ISO currency code for the payment. | |
| currencyCode: 'USD', | |
| // total: The total amount for the payment. | |
| total: { | |
| label: 'Canine Clothing', |
| const aps = new ApplePaySession(1, { | |
| countryCode: 'GB', | |
| currencyCode: 'GBP', | |
| supportedNetworks: ['visa', 'masterCard', 'amex'], | |
| merchantCapabilities: ['supports3DS', 'supportsEMV'], | |
| total: { label: 'Test 2', amount: '10.00' }, | |
| }); | |
| someButton.on('click', () => aps.begin()); |
| /** | |
| * Simple userland CPU profiler using v8-profiler | |
| * Usage: require('[path_to]/CpuProfiler').init('datadir') | |
| * | |
| * @module CpuProfiler | |
| * @type {exports} | |
| */ | |
| var fs = require('fs'); | |
| var profiler = require('v8-profiler'); |
| import Promise from 'bluebird' | |
| import MongoDB from 'mongodb' | |
| Promise.promisifyAll(MongoDB) | |
| async function findEveryone(db) { | |
| const people = db.collection('people') | |
| const everyone = await people.find().toArrayAsync() | |
| return everyone.map( x => x.name ) | |
| } |
| <!DOCTYPE html> | |
| <html> | |
| <head lang="en"> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" /> | |
| <title>Mocha/Chai Basic Tests</title> | |
| <style> | |
| body { | |
| font: 18px/1.5 "Helvetica Neue", Helvetica, sans-serif; |
| /* | |
| * GitHub CSS for MacDown | |
| * https://gist.github.com/devxoul/8df5792ce330985a633b | |
| * http://sindresorhus.com/github-markdown-css/ | |
| */ | |
| @font-face { | |
| font-family: octicons-link; | |
| src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYF |