Skip to content

Instantly share code, notes, and snippets.

View skypesky's full-sized avatar
🌏

JianChao Ye skypesky

🌏
View GitHub Profile
@skypesky
skypesky / nginx.grafana.json
Created May 6, 2025 14:09
Nginx Grafana Dashboard Json
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
@skypesky
skypesky / pm2.grafana.json
Last active May 6, 2025 14:03
monitor system
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,

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

scp ~/local-folder [email protected]:~/remote-folder

Ubuntu

sudo apt-get install zsh 
$ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# sudo apt -y install ubuntu-desktop task-gnome-desktop
# sudo reboot
@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();