sudo lsof -i :3000
kill -9 {PID}
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
language: node_js | |
node_js: | |
- "node" | |
env: | |
- NODE_ENV=TEST | |
before_script: | |
- npm install | |
script: | |
- npm run test |
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 { connect } from 'react-redux'; | |
export default (ChildComponent) => { | |
class ComposedComponent extends Component { | |
// Our component just got rendered | |
componentDidMount() { | |
this.shouldNavigateAway(); | |
} |
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 { connect } from 'react-redux'; | |
export default (ChildComponent) => { | |
class ComposedComponent extends Component { | |
// Our component just got rendered | |
componentDidMount() { | |
this.shouldNavigateAway(); | |
} | |
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
// IFRAME | |
(function () { | |
const scrollParentWindow = (x = 0, y = 0) => { | |
const parentWin = window.parent, | |
parentExpectedUrl = 'PARENT_URL_HERE', | |
currentParentUrl = `http://${parentWin.location.hostname}` | |
if (parentExpectedUrl === currentParentUrl) { | |
parentWin.postMessage({ | |
xAxis: x, |
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
// PARENT WINDOW | |
(function () { | |
function scrollWindow(evt) { | |
var message; | |
if (evt.origin !== "iframe_URL_HERE" ) { | |
message = "Action cannnot be performed"; | |
} else { | |
var x = evt.data.xAxis || 0; | |
var y = evt.data.yAxis || 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
class ParentComponent extends Component{ | |
state = { | |
parentValue: '' | |
} | |
handleParentValueChange = (value) => { | |
this.setState({parentValue: value}); | |
} | |
render() { |
NewerOlder