# 查询分支间 up and down
git rev-list --left-right ${base_commit}...${compare_commit}
# 支持传入 commit 和 分支名
git rev-list --left-right 1520533d110efae320801bde33770ac9fc1fee8a...origin/master
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
:root { | |
--fg: #eed; | |
--bg: #000; | |
--text-accent: #eee; | |
--text-1-accent: #eee; | |
--text-2-accent: #eea; | |
--text-link: #fe9; | |
--text-link-dark: #cc7; | |
--text-second: #eee; | |
--text-input: #ddd; |
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
/* eslint-disable node/no-deprecated-api */ | |
const fs = require('fs') | |
const t = require('@babel/types') | |
const parser = require('@babel/parser') | |
const generator = require('@babel/generator').default | |
const traverse = require('@babel/traverse').default | |
/** | |
* 将 es6 的 routes 转为 cjs 用于 node 脚本直接使用 |
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
const precinct = require('precinct') | |
const compiler = require('vue-template-compiler') | |
const fs = require('fs') | |
const path = require('path') | |
const cabinet = require('filing-cabinet') | |
const debug = require('debug')('vue-madge polyfill'); | |
// 修饰 precinct.paperwork, 令之遇到vue文件, 去除template部分, 当作js文件处理 | |
function decoratePrecinct() { |
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
#!/bin/sh | |
## [without test folder created] create ~/test/test Then put files | |
## [with test folder created] create ~/test/test Then put files | |
rsync -avz --exclude='node_modules/' --exclude='_static/' ./test ali:test | |
## [without] create ~/test Then put files | |
## [with] create ~/test Then put files | |
rsync -avz --exclude='node_modules/' --exclude='_static/' ./test/ ali:test |
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
var fs = require("fs"); | |
var selfsigned = require("selfsigned"); | |
const SITE_PATTERN = "*.local.dev"; | |
var attrs = [ | |
{ name: "commonName", value: SITE_PATTERN }, | |
{ name: "countryName", value: "cn" }, | |
{ name: "localityName", value: "sz" }, | |
{ name: "stateOrProvinceName", value: "gd" }, |
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
/** | |
* 使用 nodejs 打开 | |
*/ | |
const { spawnSync } = require("child_process"); | |
// 关闭 tmux-session | |
spawnSync("tmux", ["kill-session", "-t", "developing"]); | |
// 打开上方 `open-tmux.sh` | |
spawnSync("osascript", [ |
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
/** | |
* interface OOO { o: string } | |
* key in keyof OOO | |
* 等价于 key in 'o' | 'o' | |
* 等价于 key in 'o' | |
* 一定程度绕过直观上需要传入generic type的场景 function t<T,B>():<T<B>>{return {} as any} | |
*/ | |
function geta<KEY extends string = 'data'>(aa: string) { | |
const b: { [key in KEY]: any } = { |
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
'use strict'; | |
var __importDefault = | |
(this && this.__importDefault) || | |
function(mod) { | |
return mod && mod.__esModule ? mod : { default: mod }; | |
}; | |
var __importStar = | |
(this && this.__importStar) || | |
function(mod) { | |
if (mod && mod.__esModule) return mod; |
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) Microsoft Corporation. All rights reserved. | |
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. | |
#------------------------------------------------------------------------------------------------------------- | |
FROM node:lts | |
# Configure apt | |
ENV DEBIAN_FRONTEND=noninteractive |
NewerOlder