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
| ( export PKG=eslint-config-airbnb; npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs yarn add -D "$PKG@latest"; ) | |
| yarn add babel-eslint | |
| echo "{ | |
| \"parser\": \"babel-eslint\", | |
| \"env\": { | |
| \"browser\": true, | |
| \"node\": true, | |
| \"jest\": true, | |
| }, | |
| \"extends\": \"airbnb\", |
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
| this._panResponder = PanResponder.create({ | |
| // ----------- NEGOTIATION: | |
| // A view can become the touch responder by implementing the correct negotiation methods. | |
| // Should child views be prevented from becoming responder on first touch? | |
| onStartShouldSetPanResponderCapture: (evt, gestureState) => () => { | |
| console.info('onStartShouldSetPanResponderCapture'); | |
| return true; | |
| }, |
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
| How to convert existing phoenix app to an umbrella app. | |
| https://elixir-lang.slack.com/archives/phoenix/p1472921051000134 | |
| chrismccord [10:14 PM] | |
| @alanpeabody yes, it's straightforward | |
| [10:14] | |
| 1) mix new my_umbrella --umbrella |
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 {action1, action2} from "myActions"; | |
| import {bindActionCreators} from "redux"; | |
| const mapDispatchToProps(dispatch) => { | |
| return { | |
| manuallyBoundAction : (...args) => dispatch(action1(...args)), | |
| autoBoundAction : bindActionCreators(action2, dispatch), | |
| multipleActionsTogether : bindActionCreators({action1, action2}, dispatch) | |
| } | |
| }; |
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
| #!/bin/sh | |
| set -e | |
| if [ -z "$1" ]; then | |
| shot_path=$(date +%Y-%m-%d-%H-%M-%S).mp4 | |
| else | |
| shot_path="$*" | |
| fi |
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 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: "" }; |
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
| /* | |
| * var person = { firstName: 'bill', lastName: 'johnson' } | |
| * | |
| * person = _.rename(person, 'firstName', 'first') | |
| * person = _.rename(person, 'lastName', 'last') | |
| * | |
| * console.log(person) // { first: 'bill', last: 'johnson' } | |
| */ | |
| _.rename = function(obj, key, newKey) { |
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
| http://jaketrent.com/post/pagination-headers-with-kaminari/ | |
| https://developer.github.com/v3/#pagination | |
| Kaminari provides easy pagination in a rails app. It’s great to use. We’ll make it better by adding a little function to your controllers to provide useful pagination headers. | |
| kaminari pagination | |
| Pagination from Kaminari |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>AWS Cognito + Facebook Login JavaScript Example</title> | |
| <meta charset="UTF-8"> | |
| </head> | |
| <body> | |
| <script src="https://sdk.amazonaws.com/js/aws-sdk-2.1.41.min.js"></script> | |
| <script> | |
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
| MQTT Client is starting... | |
| MQTT client connected | |
| MQTT client subscribing to broker/someTopic... | |
| subscribe granted: [ { topic: 'broker/someTopic', qos: 1 } ] | |
| ######################################### | |
| MQTT client received message | |
| * topic broker/someTopic | |
| * message <Buffer 7b 22 66 69 65 6c 64 41 22 3a 22 61 22 2c 22 66 69 65 6c 64 42 22 3a 22 62 22 7d> |