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
self.MonacoEnvironment = { | |
baseUrl: 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.13.1/min/' | |
} | |
importScripts('https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.13.1/min/vs/base/worker/workerMain.js') // eslint-disable-line |
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
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.13.1/min/vs/loader.js"></script> | |
<script> | |
require.config({ | |
paths: { | |
'vs': 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.13.1/min/vs' | |
} | |
}); | |
window.MonacoEnvironment = { | |
getWorkerUrl: function (workerId, label) { |
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
/** | |
* Example of running BrowserStacks Appium WikipediaSample test app locally | |
* using jest and async/await instead of promise chains. | |
* | |
* Before running, you should install appium and make sure that all dependencies | |
* are met with appium-doctor. Get started at: | |
* | |
* http://appium.io/docs/en/about-appium/getting-started/?lang=en | |
*/ |
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
module.exports = async () => { | |
const page = await browser.newPage() | |
await page.goto('https://www.example.com', { | |
waitUntil: 'networkidle' | |
}) | |
// const html = await page.content() | |
const buffer = await page.screenshot() | |
await page.close() |
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 React, { Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
class CatchGlobalClick extends Component { | |
static propTypes = { | |
onClick: PropTypes.func, | |
children: PropTypes.oneOfType([ | |
PropTypes.arrayOf(PropTypes.node), | |
PropTypes.node | |
]) |
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 input = require('./my-thing.gui') | |
const parse = (obj, html = "") => { | |
Object.keys(obj).forEach(key => { | |
const element = obj[key] | |
switch (element.type) { | |
case 'button': |
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
{ | |
"_id" : "N6ZdEa5aYVf76Pnp1Qlq", | |
... | |
// This part is new: | |
"parameters" : { | |
"worst" : [ | |
"5pZ5QMA9N1IaqVNXYMpX", // worst | |
"5pag70b0kXHYevkG8aEX" // second corst | |
] | |
}, |
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 it like in Metrics.js line 26 and forth for graphs. | |
// Just use "/feed/stress" instead of "/graphs/stress" | |
const parameters = { | |
workspaceId: this.props.params.workspaceId | |
} | |
Api.post(`/feed/stress`, parameters).then(({ items }) => { | |
console.log(items[0].date) // timestamp | |
console.log(items[0].text) // text |
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 dependencies | |
import React, { Component } from 'react' | |
// Import styles | |
import styles from './Panes.scss' | |
class Panes extends Component { | |
render() { | |
return ( | |
<div className={styles.Panes}> |
NewerOlder