Skip to content

Instantly share code, notes, and snippets.

@Chunlin-Li
Chunlin-Li / cpu.md
Last active July 21, 2016 17:37
linux 系统下 修改 modify cpu pstate p-state cpufreq cpu freq turbo
@Chunlin-Li
Chunlin-Li / 1469273091275.md
Last active July 23, 2016 11:49
webstorm git integration combine multiple commit when push to remote. squash commit into one.

当前分支上, 本地已经有多个 commit 了. 此时想将这些零散的 commit 合并成一个.

context menu -> git -> repository -> rebase

勾选 interactive

onto 选定的是 remote 上对应当前本地分支的分支. 如 refs/remotes/origin/master

from 什么都不选

@Chunlin-Li
Chunlin-Li / 2_keyboard_shortcuts.md
Last active August 1, 2016 04:40
Here are some things you can do with Gists in GistBox.

Create documentation for your projects. Like so:


Most popular keyboard shortcuts within GistBox

  • Up/Down - Previous/Next Gist
  • Ctrl+e - Edit a selected Gist
  • Ctrl+s - Save Gist
@Chunlin-Li
Chunlin-Li / index.js
Created March 20, 2017 12:08
co-body v5.0.3 reproduce
'use strict';
var koa = require('koa');
var bodyParse = require('koa-bodyparser');
var app = new koa();
app.use(function *(next) {
let bodyData = [];
this.req.on('data', (chunk) => {
@Chunlin-Li
Chunlin-Li / index.js
Last active April 28, 2017 09:32
test
/**
* SMS services.
*/
"use strict";
const http = require("http");
const URL = require("url");
@Chunlin-Li
Chunlin-Li / runService.sh
Created July 24, 2017 06:25
项目启动脚本 (10.8.8.8 使用)
#!/usr/bin/env bash
ProjectName="sundries" # 项目名称
Port=3030 # 服务监听端口 , 通过设置 NODE_PORT 环境变量实现
CleanNodeModules=true # 是否每次都清除 node_modules
NodeVersion=8.1.2 # node 版本, 需确保 nvm 有该版本
Restart=true # 是否每次都重启服务
if [[ -e $1 ]]; then
@Chunlin-Li
Chunlin-Li / 20180529.md
Last active June 21, 2018 02:19
MarketManagmentAPI