Class names are CamelCase.
Methods and variables are snake_case.
Methods with a ? suffix will return a boolean.
| 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; | |
| }, |
| 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 |
| 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) | |
| } | |
| }; |
| #!/bin/sh | |
| set -e | |
| if [ -z "$1" ]; then | |
| shot_path=$(date +%Y-%m-%d-%H-%M-%S).mp4 | |
| else | |
| shot_path="$*" | |
| fi |
| 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: "" }; |
| /* | |
| * 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) { |
| 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 |
| <!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> | |
| 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> |