Skip to content

Instantly share code, notes, and snippets.

@HereOrCode
Last active November 13, 2021 13:23
Show Gist options
  • Save HereOrCode/324aa6be8d1f5d552f14a6975070aaba to your computer and use it in GitHub Desktop.
Save HereOrCode/324aa6be8d1f5d552f14a6975070aaba to your computer and use it in GitHub Desktop.
Configuration file differences
{
"commands": [
{
"Work": [
{
"cmd": "ping www.bing.com",
"name": "Ping Bing"
},
{
"cmd": "ps aux",
"name": "PS"
},
{
"cmd": "top -n 10",
"name": "Top10"
}
],
},
{
"cmd": "ssh root@ip -p 22",
"name": "Amazon HK VPS"
},
{
"cmd": "ssh root@ip -p 22",
"name": "Amazon JP VPS"
},
{
"cmd": "ssh root@ip -p 22",
"name": "DigitalOcean HK VPS"
},
{
"cmd": "ssh root@ip -p 22",
"name": "DigitalOcean JP VPS"
}
]
}
[
{
"name": "google",
"command": "echo webpage",
"sendToClipboard":true
},
{
"name": "apple",
"children": [
{
"name": "iOS",
"children": [
{
"name": "iPhone",
"command": "echo iPhone"
},
{
"name": "iPad",
"children": [
{
"name": "iPad1",
"command": "echo iPad1"
},
{
"name": "iPad2",
"command": "echo iPad2"
}
]
},
{
"name": "iWatch",
"command": "echo iWatch"
}
]
}
]
},
{
"name": "amicrosoft",
"command": "echo microsoft"
}
]

Switch2 Field Description

  • name: the command title.

  • command: commands to be executed.

  • sendToClipboard: copy the command to the clipboard without executing.

  • children: N-level directory, N > 1.

Video Demo

sendToClipboard

LPu2xH

children

FKg149

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment