Skip to content

Instantly share code, notes, and snippets.

View GZShi's full-sized avatar
🎯
Focusing

Guozhong Shi GZShi

🎯
Focusing
View GitHub Profile
@GZShi
GZShi / cmd_font.reg
Last active August 10, 2018 01:01
windows控制台的字体设置
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont]
"00932"="Inziu IosevkaCC J"
"00936"="Inziu IosevkaCC SC"
"0932"="Inziu Iosevka J"
"0936"="Inziu Iosevka SC"
"000"="IosevkaCC"
@GZShi
GZShi / cmd_color.reg
Created August 10, 2018 00:58
windows 控制台中的颜色,使用ubuntu配色
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Console]
"ColorTable00"=dword:00240a30
"ColorTable01"=dword:00a46534
"ColorTable02"=dword:00069a4e
"ColorTable03"=dword:009a9806
"ColorTable04"=dword:000000cc
"ColorTable05"=dword:007b5075
"ColorTable06"=dword:0000a0c4
// url: https://leetcode-cn.com/problems/longest-common-prefix/description/
// date: 2018-07-01
// author: gzshi
/*
编写一个函数来查找字符串数组中的最长公共前缀。
如果不存在公共前缀,返回空字符串 ""。
示例 1:
@GZShi
GZShi / merge two table 3.yaml
Created May 30, 2018 12:26
与Script Lab共享
name: merge two table 3
description: ''
author: GZShi
host: EXCEL
api_set: {}
script:
content: |-
/** Default helper for invoking an action and handling errors. */
async function tryCatchExcelRun(callback) {
try {
@GZShi
GZShi / merge two table 2.yaml
Last active May 29, 2018 15:15
与Script Lab共享
name: merge two table 2
description: ''
author: GZShi
host: EXCEL
api_set: {}
script:
content: |-
/** Default helper for invoking an action and handling errors. */
async function tryCatchExcelRun(callback) {
try {
@GZShi
GZShi / merge two table.yaml
Last active May 29, 2018 14:42
与Script Lab共享
name: merge two table
description: ''
author: GZShi
host: EXCEL
api_set: {}
script:
content: |-
/** Default helper for invoking an action and handling errors. */
async function tryCatchExcelRun(callback) {
try {
@GZShi
GZShi / Merge table by key.yaml
Last active May 29, 2018 13:12
与Script Lab共享
name: Merge table by key
description: ''
author: GZShi
host: EXCEL
api_set: {}
script:
content: |-
/** Default helper for invoking an action and handling errors. */
async function tryCatchExcelRun(callback) {
try {
import zs from 'ZSBridge.js'
;(async function () {
try {
let { account, apass } = await zs.getAccount()
console.log(`current account is ${account}`)
} catch(ex) {
console.log(`failed: ${ex}`)
}
})()
@GZShi
GZShi / day601398.csv
Created February 23, 2018 08:54
行情日线数据
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 16 columns, instead of 6. in line 8.
日期,股票代码,名称,收盘价,最高价,最低价,开盘价,前收盘,涨跌额,涨跌幅,换手率,成交量,成交金额,总市值,流通市值,成交笔数
2018-02-23,'601398,工商银行,7.01,7.04,6.93,7.03,7.0,0.01,0.1429,0.0703,189504305,1324991245.0,2.49840786219e+12,1.8899816099e+12,None
2018-02-22,'601398,工商银行,7.0,7.08,6.96,7.03,6.88,0.12,1.7442,0.0945,254663105,1789568288.0,2.49484379962e+12,1.88728548777e+12,None
2018-02-14,'601398,工商银行,6.88,6.9,6.73,6.79,6.8,0.08,1.1765,0.067,180573419,1234093936.0,2.45207504877e+12,1.85493202227e+12,None
2018-02-13,'601398,工商银行,6.8,6.88,6.64,6.66,6.61,0.19,2.8744,0.1572,423909448,2865744342.0,2.42356254821e+12,1.83336304527e+12,None
2018-02-12,'601398,工商银行,6.61,6.71,6.52,6.64,6.68,-0.07,-1.0479,0.1315,354442241,2344434626.0,2.35584535936e+12,1.78213672488e+12,None
2018-02-09,'601398,工商银行,6.68,6.72,6.43,6.58,6.82,-0.14,-2.0528,0.2242,604381155,3985698498.0,2.38079379735e+12,1.80100957976e+12,None
2018-02-08,'601398,工商银行,6.82,7.08,6.69,7.05,7.13,-0.31,-4.3478,0.2006,540920379,3715985911.0,2.43069067335e+12,1.83875528952e+12,None
2018-02-07,'601398,工商银行,7.13,7.67,7
@GZShi
GZShi / qqmail_bills.js
Last active February 23, 2018 01:16
QQ邮箱账单助手数据导出
!function () {
let divs = document.querySelectorAll('.month_row .month_summary')
divs = Array.prototype.slice.call(divs)
let bills = divs.map(div => {
let parent = div.parentElement
let date = parent.id.replace('bill.month_$$', '')
let valNode = div.querySelector('.currency')
let money = valNode.innerText.replace(/\s*¥\s*/g, '').replace(/\s*(人民币)\s*/g, '').replace(',', '')
money = parseFloat(money) || 0