Skip to content

Instantly share code, notes, and snippets.

View xgqfrms's full-sized avatar
💭
🎉 👻 💻 🕵️‍♂️

xgqfrms xgqfrms

💭
🎉 👻 💻 🕵️‍♂️
View GitHub Profile
@xgqfrms
xgqfrms / js Map.groupBy bug.md
Last active September 2, 2023 13:44
js Map.groupBy bug ❌

js Map.groupBy bug ❌

image

// polyfill all actual features - stable ES, web standards and stage 3 ES proposals:
// import "core-js/actual/index.js";
// ❌
// import "core-js/actual";
@xgqfrms
xgqfrms / ES6 Arrow Function returns an Object.md
Created July 5, 2023 16:43
ES6 Arrow Function returns an Object

ES6 Arrow Function returns an Object

the right ways

  1. normal function return an object
const getUser = user => {
 // do something
@xgqfrms
xgqfrms / fix: The domain name cannot be resolved temporarily.md
Created July 1, 2023 02:18
fix: `暂时不能解析域名“mirrors.tuna.tsinghua.edu.cn”` bug

fix: 暂时不能解析域名“mirrors.tuna.tsinghua.edu.cn” bug

$ sudo vim /etc/resolv.conf
# 添加如下内容
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 127.0.0.1
# 输入 Esc,:wq,保存并退出
@xgqfrms
xgqfrms / Node.js fs API promises.d.ts.md
Created June 19, 2023 15:04
Node.js fs API `promises.d.ts`

Node.js fs API promises.d.ts

/Users/xgqfrms-mm/Library/Caches/typescript/5.2/node_modules/@types/node/fs/promises.d.ts

/**
 * The `fs/promises` API provides asynchronous file system methods that return
 * promises.
@xgqfrms
xgqfrms / 上海外国语大学松江校区.md
Created June 6, 2023 08:27
上海外国语大学松江校区

松江大学城 上海外国语大学

上海外国语大学松江校区

@xgqfrms
xgqfrms / 东华大学松江校区.md
Created June 6, 2023 08:26
东华大学松江校区

松江大学城 东华大学 面积最大的大学

东华大学松江校区

东华大学松江校区占地面积约 1500亩,已有建筑面积近33万平方米,拥有图书馆、体育馆、多媒体教室、基础与专业实验室、分析测试中心、会议中心、影剧院、活动室和多功能餐厅等先进的教学、科研及生活用设施,现共有近1万名博士、硕士和本科生在松江校区学习生活。

https://www.dhu.edu.cn/sjxq/list.psp

东华大学松江校区坐落在松江新城区,位于松江大学园区的东北部,北临佘山国家旅游度假区,南倚历史文化名镇——松江。松江大学园区距上海市中心30公里, 周围有沪杭高速公路、沪青平高速公路、318 国道、轨道交通9号线等道路纵横交错, 交通十分便捷。

@xgqfrms
xgqfrms / app.js
Last active May 23, 2023 09:53
ESM export modules demos
// import { autoReport, manualReport, } from "./index.js";
import Metrics, { autoReport, manualReport, } from "./index.js";
if(autoReport && manualReport) {
console.log(`app ✅`);
autoReport();
manualReport();
console.log(`Metrics ✅`);
Metrics.autoReport();
Metrics.manualReport();
@xgqfrms
xgqfrms / a Raspberry Pi rc.local file.md
Last active April 16, 2023 19:24
Raspberry Pi /etc/rc.local file in Action

Raspberry Pi /etc/rc.local file in Action

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
@xgqfrms
xgqfrms / use the .gitattributes file to ignore some language's types.md
Last active April 15, 2023 12:58
use the .gitattributes file to ignore some language's types
@xgqfrms
xgqfrms / freecodecamp All In One.md
Created March 23, 2023 15:25
freecodecamp All In One