Skip to content

Instantly share code, notes, and snippets.

View ryerh's full-sized avatar
🎯
Focusing

荷包蛋扣肉 ryerh

🎯
Focusing
View GitHub Profile
@ryerh
ryerh / tmux-cheatsheet.markdown
Last active October 30, 2024 08:09 — forked from MohamedAlaa/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表 & 简明教程

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

@ryerh
ryerh / wechat.js
Created March 30, 2016 12:43
wrap wechat js-sdk
// 微信模块
// 开发文档见 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)">&times;</button></p>
</li>
</ul>
@ryerh
ryerh / Enhance.js
Created July 14, 2016 03:31 — forked from sebmarkbage/Enhance.js
Higher-order Components
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'
@ryerh
ryerh / proxy.pac
Last active August 22, 2017 09:41
Proxy PAC
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/,
@ryerh
ryerh / devdocs.json
Created September 12, 2017 00:42
Devdocs preference
{"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"}
@ryerh
ryerh / App.jsx
Last active January 1, 2018 03:06
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>;
}
@ryerh
ryerh / jekyll-and-liquid.md
Created April 16, 2018 15:35 — forked from magicznyleszek/jekyll-and-liquid.md
Jekyll & Liquid Cheatsheet

Jekyll & Liquid Cheatsheet

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

Running a local server for testing purposes:

@ryerh
ryerh / ajax.js
Created May 3, 2018 07:39
jQuery ajax
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' }),