$ uname -r
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 { mountWithIntl } from 'helpers/intl-enzyme-test-helper.js'; | |
| const wrapper = mountWithIntl( | |
| <CustomComponent /> | |
| ); | |
| expect(wrapper.state('foo')).to.equal('bar'); // OK | |
| expect(wrapper.text()).to.equal('Hello World!'); // OK |
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 { EditorState, Modifier, Entity, SelectionState } from 'draft-js' | |
| import linkifyIt from 'linkify-it' | |
| import tlds from 'tlds' | |
| const linkify = linkifyIt() | |
| linkify.tlds(tlds) | |
| const linkifyEditorState = (editorState) => { | |
| const contentState = editorState.getCurrentContent() |
- usb_modeswitch, usb_modeswitch-data
- libusb1
- libusb-devel(Fedora), libusb-dev(Debian based)
By default, your linux box would register your Huawei E8372 as a Mass Storage device and not (somehow) as a modem. First, make sure you have the exace same device we're talking about. This can be confirmed by looking at two values using the following command (while the dongle is plugged in): As an elevated user:
# lsusb | grep Huawei
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 R from 'ramda' | |
| const isObject = R.compose(R.equals('Object'), R.type); | |
| const allAreObjects = R.compose(R.all(isObject), R.values); | |
| const hasLeft = R.has('left'); | |
| const hasRight = R.has('right'); | |
| const hasBoth = R.both(hasLeft, hasRight); | |
| const isEqual = R.both(hasBoth, R.compose(R.apply(R.equals), R.values)); | |
| const markAdded = R.compose(R.append(undefined), R.values); |
#Angular 2 - Fast and Furious
- Slides Highload - http://www.slideshare.net/OleksiiOkhrymenko/angular-2-68487997
- Slides Perm - http://www.slideshare.net/OleksiiOkhrymenko/angular-2-69831356
This recipe is useful for cooking up chained API calls as a result of a single action.
In the below example, a single action called POST_REPO is dispatched and it's intention is to create a new repostiory on GitHub then update the README with new data after it is created.
For this to happen there are 4 API calls necessary to the GitHub API:
- POST a new repostiry
- GET the master branch of the new repository
- GET the files on the master branch
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 isHubspotUrl(url) { | |
| var hubspotUrls = [ | |
| 'https://local.hubspot.com', | |
| 'https://app.hubspotqa.com', | |
| 'https://app.hubspot.com', | |
| 'https://meetings.hubspot.com' | |
| ]; | |
| return hubspotUrls.indexOf(url) > -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
| Horizontal layer | Examples | |
|---|---|---|
| Business logic | Application-specific logic, domain logic, validation rules | |
| Persistence | WebStorage, IndexedDB, File System Access API, HTTP, WebSocket, GraphQL, Firebase, Meteor | |
| Messaging | WebRTC, WebSocket, Push API, Server-Sent Events | |
| I/O | Web Bluetooth, WebUSB, NFC, camera, microphone, proximity sensor, ambient light sensor | |
| Presentation | DOM manipulation, event listeners, formatting | |
| User interaction | UI behaviour, form validation | |
| State management | Application state management, application-specific events |
OlderNewer