注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。
启动新会话:
tmux [new -s 会话名 -n 窗口名]
恢复会话:
| // 微信模块 | |
| // 开发文档见 http://mp.weixin.qq.com/wiki/ | |
| // 执行流程: | |
| // 1. 加载微信脚本(jweixin-1.0.0.js) | |
| // 2. 获取配置信息(调 config jsonp 接口) | |
| // 4. 执行 jWeixin.config | |
| //import asyncLoad from './_async-load'; | |
| //import config from './_config'; | |
| import el from './_el'; | |
| import loader from './_loader'; |
| <div id="app"> | |
| <h1 @click="toggleAppDesc">{{ appTitle }}</h1> | |
| <p v-if="toggleAppDesc">A simple Todo List app to demostrate how Vue.js works.</p> | |
| <input type="text" v-model="newTodo" @keyup.enter="addTodo"> | |
| <ul> | |
| <li v-for="todo in todoList"> | |
| <h2>{{ todo.title }}</h2> | |
| <p>{{ todo.desc }} <button @click="delTodo($index)">×</button></p> | |
| </li> | |
| </ul> |
| import { Component } from "React"; | |
| export var Enhance = ComposedComponent => class extends Component { | |
| constructor() { | |
| this.state = { data: null }; | |
| } | |
| componentDidMount() { | |
| this.setState({ data: 'Hello' }); | |
| } | |
| render() { |
| curl --silent --location https://rpm.nodesource.com/setup_6.x | bash - | |
| yum install nodejs | |
| yum groupinstall 'Development Tools' |
| const PROXY = 'SOCKS5 localhost:1080; DIRECT'; | |
| const NO_PROXY = 'DIRECT'; | |
| const WHITE_LIST = [ | |
| /126.net/, | |
| /163.com/, | |
| /360buying.com/, | |
| /alicdn.com/, | |
| /aliyun.com/, | |
| /baidu.com/, | |
| /bdimg.com/, |
| {"tips":"KeyNav","size":"362","docs":"css/dom/dom_events/go/html/http/javascript/jquery/jqueryui/lodash~4/node/openjdk~8/php/python~3.6/sqlite","hideDisabled":"1"} |
| import React from 'react'; | |
| import PropTypes from 'prop-types'; | |
| class App extends React.Component { | |
| render() { | |
| const { menu } = this.context; | |
| return menu === '????' | |
| ? <h1>???</h1> | |
| : <h1>xxx</h1>; | |
| } |
A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes:
| import jQuery from 'jquery'; | |
| jQuery.ajax({ | |
| type: 'POST', | |
| url: 'https://api.github.com', | |
| contentType: 'application/json; charset=UTF-8', | |
| processData: false, | |
| data: JSON.stringify({ foo: 'bar' }), |