From 5b373f11c35ad067721963449849d494a7e16713 Mon Sep 17 00:00:00 2001 From: Luk Lu Date: Fri, 17 Apr 2020 13:31:32 +0800 Subject: [PATCH] u --- adjust-mac-launchpad.sh | 7 +++++++ ssh-expect.sh | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 adjust-mac-launchpad.sh create mode 100755 ssh-expect.sh diff --git a/adjust-mac-launchpad.sh b/adjust-mac-launchpad.sh new file mode 100644 index 0000000..1daaee0 --- /dev/null +++ b/adjust-mac-launchpad.sh @@ -0,0 +1,7 @@ +defaults write com.apple.dock springboard-rows 8 + +defaults write com.apple.dock springboard-columns 10 + +defaults write com.apple.dock ResetLaunchPad -bool true + +killall Dock diff --git a/ssh-expect.sh b/ssh-expect.sh new file mode 100755 index 0000000..0c1f616 --- /dev/null +++ b/ssh-expect.sh @@ -0,0 +1,18 @@ + +## Usage: expect this.sh [hostname] [port] [username] [password] + +set timeout 30 +spawn ssh -p [lindex $argv 1] [lindex $argv 2]@[lindex $argv 0] +expect { + "(yes/no)?" + {send "yes\n";exp_continue} + "password:" + {send "[lindex $argv 3]\n"} + ":~]" + {send "su\n";exp_continue} + "Password:" + {send "[lindex $argv 3]\n"} + "密码:" + {send "[lindex $argv 3]\n"} +} +interact