Skip to content

Instantly share code, notes, and snippets.

View skypesky's full-sized avatar
🌏

JianChao skypesky

🌏
View GitHub Profile

Ubuntu && MacOS 之间如何复制文件

scp ~/local-folder skypesky@192.168.0.105:~/remote-folder

Ubuntu

sudo apt-get install zsh 
$ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Mac OS(M1) 下使用 UTM 安装 Ubuntu

安装 UTM 软件

访问 UTM 官网: https://mac.getutm.app/ ,点击 download 下载,自行完成安装即可。

image

安装 qemu

@skypesky
skypesky / all-mock.spec.js.md
Last active July 19, 2023 11:34
mock 写法大全

How to mock deeply nested objects?

const states = require('states');

jest.mock('states', () => ({ auditLog: { find: jest.fn(() => []) } }));

expect(states.auditLog.find).toBeCalled();