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
| license: mit |
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
| license: gpl-3.0 | |
| height: 700 | |
| border: no |
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
| # Install Google Chrome | |
| # https://askubuntu.com/questions/79280/how-to-install-chrome-browser-properly-via-command-line | |
| sudo apt-get install libxss1 libappindicator1 libindicator7 | |
| wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
| sudo dpkg -i google-chrome*.deb # Might show "errors", fixed by next line | |
| sudo apt-get install -f | |
| # Install Node Stable (v7) | |
| curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - | |
| sudo apt-get install -y nodejs |
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 CDP = require('chrome-remote-interface'); | |
| const argv = require('minimist')(process.argv.slice(2)); | |
| const file = require('fs'); | |
| // CLI Args | |
| const url = argv.url || 'https://www.google.com'; | |
| const format = argv.format === 'jpeg' ? 'jpeg' : 'png'; | |
| const viewportWidth = argv.viewportWidth || 1440; | |
| const viewportHeight = argv.viewportHeight || 900; | |
| const delay = argv.delay || 0; |
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
| license: mit |
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
| license: mit |
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
| function wait (ms) { | |
| return new Promise(resolve => setTimeout(() => resolve(), ms)); | |
| } | |
| export default async function capture(browser, url) { | |
| // Load the specified page | |
| const page = await browser.newPage(); | |
| await page.goto(url, {waitUntil: 'load'}); | |
| // Get the height of the rendered page |
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
| license: mit |
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
| import {defaultProps} from 'recompose'; | |
| import glamorous from 'glamorous'; | |
| import {AutocompleteBase} from './Autocomplete'; | |
| export const $Root = glamorous.div({ | |
| border: '1px solid #ccc', | |
| width: '300px', | |
| margin: '0 auto', | |
| }); |
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
| // App.js | |
| render() { | |
| <Autocomplete | |
| options={this.props.products} | |
| overrides={{ | |
| Root: { | |
| props: {'aria-label': 'Select an option'}, | |
| style: ({$isOpen}) => ({borderColor: $isOpen ? 'blue' : 'grey'}), | |
| }, | |
| Option: { |
OlderNewer