This file contains 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
$ sudo su - | |
$ cd /opt | |
$ wget https://github.com/prometheus/node_exporter/releases/download/v0.15.2/node_exporter-0.15.2.linux-amd64.tar.gz | |
$ tar xzvf node_exporter-0.15.2.linux-amd64.tar.gz | |
$ mv node_exporter-0.15.2.linux-amd64.tar.gz /usr/local/src/ | |
$ mv node_exporter-0.15.2.linux-amd64 node_exporter | |
$ vim /etc/systemd/system/node_exporter.service | |
$ vim /etc/default/node_exporter | |
$ systemctl daemon-reload | |
$ systemctl enable node_exporter.service |
This file contains 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 { | |
ART, | |
AppRegistry, | |
StyleSheet, | |
View, | |
Text, | |
Dimensions, | |
Button | |
} from 'react-native' |
This file contains 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 { Alert, Linking, WebView } from 'react-native' | |
const ATS_ERROR_CODE = -1022 | |
export default class WebViewSample extends Component { | |
constructor(props) { | |
super(props) |
This file contains 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
/** | |
* Copyright (c) 2015-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
*/ | |
#import "AppDelegate.h" |
This file contains 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
onSubmit(e) { | |
e.preventDefault() | |
const fd = new FormData() | |
fd.append('user[name]', this.state.name) | |
fd.append('user[email]', this.state.email) | |
fetch('http://example.com/users', { | |
method: 'POST', | |
body: fd | |
}).then(response => | |
response.json() |
This file contains 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' | |
import { fetchReposIfNeeded } from '../actions' | |
import Form from '../components/Form' | |
import Repos from '../components/Repos' | |
class AsyncApp extends Component { | |
constructor(props) { | |
super(props) | |
this.handleSubmit = this.handleSubmit.bind(this) |
This file contains 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' | |
export default class Frame extends Component { | |
componentDidMount() { | |
const appearin = this.props.appearIn | |
const roomName = this.props.match.params.roomName | |
appearin.addRoomToElementById("appearin-frame", roomName) | |
} | |
render() { |
This file contains 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 { Link, Route, Switch } from 'react-router-dom' | |
import Form from './Form' | |
import Todo from './Todo' | |
import TodoList from './TodoList' | |
const Top = () => ( | |
<div>Top</div> | |
) |
This file contains 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 Form from './Form'; | |
import TodoList from './TodoList'; | |
export default class App extends Component { | |
constructor() { | |
super(); | |
this.state = { | |
todos: [] | |
}; |
This file contains 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 Square from './Square'; | |
class Board extends Component { | |
renderSquare(i) { | |
return <Square key={i} | |
value={this.props.squares[i].value} | |
onClick={() => this.props.onClick(i)} | |
highlighted={this.props.squares[i].highlighted} />; | |
} |
NewerOlder