Skip to content

Instantly share code, notes, and snippets.

View shenqihui's full-sized avatar
💭
I may be slow to respond.

大饼 shenqihui

💭
I may be slow to respond.
View GitHub Profile
@shenqihui
shenqihui / README.md
Last active April 13, 2023 07:46
系统对时脚本

时间对时:

all_host.txt 参考 pssh 的参数来写

下载这个 https://github.com/angeloc/htpdate 并且解压到 cd /root/htpdate-1.2.6

prsync -h all_host.txt /root/htpdate-1.2.6/ /root/htpdate-1.2.6/

pssh -h all_host.txt 'timedatectl set-local-rtc 0'

@shenqihui
shenqihui / README.md
Created August 30, 2022 08:48
同一宿主机不同docker-compose组使用外部ip

依赖

docker >= 20 docker-compose >= 2

如何运行:

创建虚拟网卡

注意下面的要针对自己改动: 如 192.168.12 改成自己网段

@shenqihui
shenqihui / README.md
Last active February 27, 2024 13:15
闪电 swap 套利代码

套利的说明

提前提示:

合约只是套利的10%,剩下90%工作才是大头。

这个代码并非最佳的代码,你可以在网上随便一搜就搜出很多类似套利 swap 的代码。

如何进行套利

1,发掘链上全部的交易对。

@shenqihui
shenqihui / file-linter.js
Created December 21, 2021 03:50
husky custom linter
#!/usr/bin/env node
// 这个需要加 x 权限,记得
const argv = require('yargs').argv;
const path = require('path');
// const fs = require('fs-extra');
const _ = require('lodash');
function imgLinter() {
const base = path.resolve(__dirname, 'src', 'assets');
@shenqihui
shenqihui / func.js
Last active January 13, 2021 02:30
遍历对象,将数字精确化
import NP from 'number-precision';
import _ from 'lodash';
function eachAttrFormatFloat(formatElem) {
if (formatElem instanceof FormData) {
return formatElem;
}
if ('number' === typeof formatElem) {
if (_.isInteger(formatElem)) {

前端面试面谈题

基础问题

css 基础

display,举值, none, block ,inline,inline-block,flex,table, table-cell 等等。 div div 中,最快的垂直上下居中问题,不考虑兼容性。 less 和 sass 还有 styl 之类,喜欢哪个,有啥不同。

js 基础

有数据

var area = [
{id:110000000000,pid: 0, name:"北京"},
{id:120000000000,pid: 0, name:"天津"},
{id:130000000000,pid: 0, name:"河北省"},
{id:140000000000,pid: 0, name:"山西省"},
{id:150000000000,pid: 0, name:"内蒙古自治区"},
{id:210000000000,pid: 0, name:"辽宁省"},
{id:220000000000,pid: 0, name:"吉林省"},
@shenqihui
shenqihui / keybase.md
Created February 29, 2020 13:06
keybase.md

Keybase proof

I hereby claim:

  • I am shenqihui on github.
  • I am shenqi0920 (https://keybase.io/shenqi0920) on keybase.
  • I have a public key whose fingerprint is 4DF3 87B9 D59D C804 CD48 7DB2 0858 7D4E 7FB1 54AD

To claim this, I am signing this object:

@shenqihui
shenqihui / exam_issue_rule.js
Last active February 5, 2020 06:33
问卷题目配置规则
const healthExamObj = {
// begin_time: 0,
// end_time: 999999999999,
exam_id: 1,
issues: [
{
key: 'name', // 后面我想直接去掉这个 key ,不过如果只用 issue_id 的话,不可读,麻烦。
issue_id: 0,
title: '姓名',
type: 'input',