The good old PhantomJS times are over. The project is not maintained anymore and it is recommended to switch over to Chrome headless. Just run a local Selenium standalone server:
$ java -jar Sites/selenium-server-standalone-3.4.0.jar| // In v2/3 you did this: | |
| import ReactDOM from 'react-dom' | |
| import { Router, browserHistory, Route } from 'react-router' | |
| ReactDOM.render( | |
| <Router> | |
| <Route path="/about" component={About}/> | |
| <Route path="/:username" component={User}/> | |
| </Router> | |
| ) |
| import React from 'react'; | |
| import EventComponent from './EventComponent'; | |
| import { mount } from 'enzyme'; | |
| import { | |
| createStartTouchEventObject, | |
| createMoveTouchEventObject | |
| } from './EventHelpers.js'; | |
| describe('EventComponent', () => { |
| """ | |
| License: MIT - https://opensource.org/licenses/MIT | |
| ChromeLogger is a protocol which allows sending logging messages to the Browser. | |
| This module implements simple support for Django. It consists of two components: | |
| * `LoggingMiddleware` which is responsible for sending all log messages | |
| associated with the request to the browser. | |
| * `ChromeLoggerHandler` a python logging handler which collects all messages. |
cd /Library/Preferences
sudo rm com.sophos.sav.plist
cd /Library/Application\ Support/Sophos/cloud/Installer.app/Contents/MacOS/tools/
sudo ./InstallationDeployer —force_remove
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
| var head = document.getElementsByTagName('head')[0]; | |
| // Save the original method | |
| var insertBefore = head.insertBefore; | |
| // Replace it! | |
| head.insertBefore = function (newElement, referenceElement) { | |
| if (newElement.href && newElement.href.indexOf('https://fonts.googleapis.com/css?family=Roboto') === 0) { | |
| return; |
| import React from "react"; | |
| import { render } from "react-dom"; | |
| const ParentComponent = React.createClass({ | |
| getDefaultProps: function() { | |
| console.log("ParentComponent - getDefaultProps"); | |
| }, | |
| getInitialState: function() { | |
| console.log("ParentComponent - getInitialState"); | |
| return { text: "" }; |
| import sys, cv2 | |
| # Refactored https://realpython.com/blog/python/face-recognition-with-python/ | |
| def cascade_detect(cascade, image): | |
| gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) | |
| return cascade.detectMultiScale( | |
| gray_image, | |
| scaleFactor = 1.15, | |
| minNeighbors = 5, |
| .link { | |
| //desktop styles | |
| color: $color-brand-white; | |
| &:hover { | |
| color: $color-brand-red; | |
| } | |
| //overwrite for touch - uses modernizr to overwrite link pseudo classes | |
| .touch &:link, |