This is a CFP for ReactiveConf 2017's open call for Lightning talks. If you'd like to see this talk become a reality, please ⭐ star this gist. #ReactiveConf
This file contains hidden or 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
| <body> | |
| <div id="⚛️"></div> | |
| <script src="https://unpkg.com/[email protected]/umd/react.development.js"></script> | |
| <script src="https://unpkg.com/[email protected]/umd/react-dom.development.js"></script> | |
| <script src="https://unpkg.com/[email protected]/babel.js"></script> | |
| <script type="text/babel"> | |
| ReactDOM.render(<div>Hello World!</div>, document.getElementById('⚛️')) | |
| </script> | |
| </body> |
This file contains hidden or 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
| https://api.themoviedb.org/3/tv/1399?api_key=###&append_to_response=season/1 |
This file contains hidden or 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
| console.group("Cloning objects"); | |
| const firstObject = { | |
| name: 'Mohammad', | |
| }; | |
| const clonedObject = Object.assign({}, firstObject); |
This file contains hidden or 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
| 'use strict'; | |
| // Dependencies | |
| const gcloud = require('google-cloud', { | |
| projectId: 'sara-bigquery', | |
| keyfileName: 'keyfile.json' | |
| }); | |
| const vision = gcloud.vision(); | |
| const fs = require('fs'); | |
| const async = require('async'); |
This file contains hidden or 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
| // 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works | |
| const axios = require('axios'); // promised based requests - like fetch() | |
| function getCoffee() { | |
| return new Promise(resolve => { | |
| setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee | |
| }); | |
| } |
This file contains hidden or 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
| // in preload scripts, we have access to node.js and electron APIs | |
| // the remote web app will not have access, so this is safe | |
| const { ipcRenderer: ipc, remote } = require('electron'); | |
| init(); | |
| function init() { | |
| // Expose a bridging API to by setting an global on `window`. | |
| // We'll add methods to it here first, and when the remote web app loads, | |
| // it'll add some additional methods as well. |
This file contains hidden or 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
| const { resolve } = require('path'); | |
| const webpack = require('webpack'); | |
| // plugins | |
| const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
| module.exports = (env) => { | |
| return { |
This file contains hidden or 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
| /* We call layoutIfNeeded() immediately after reloadData() | |
| * to force table view to perform layout immediately | |
| * This is required to let the setContentOffset() in dispatch block to be executed | |
| * after table view has completed performing its layout to scroll to the correct offset | |
| * For further explanations, please see: http://goo.gl/BpzlA5 and http://goo.gl/6CH64b | |
| */ | |
| self.tableView.reloadData() | |
| self.tableView.layoutIfNeeded() | |
| dispatch_async(dispatch_get_main_queue(), { |
This file contains hidden or 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
| { fontWeight: '100' }, // Thin | |
| { fontWeight: '200' }, // Ultra Light | |
| { fontWeight: '300' }, // Light | |
| { fontWeight: '400' }, // Regular | |
| { fontWeight: '500' }, // Medium | |
| { fontWeight: '600' }, // Semibold | |
| { fontWeight: '700' }, // Bold | |
| { fontWeight: '800' }, // Heavy | |
| { fontWeight: '900' }, // Black |
