vim ~/.zshrc //打开这个配置文件 ZSH_THEME="robbyrussell" 找到这行主题配置 更换成以下的主题名就好 ZSH_THEME="agnoster" # (this is one of the fancy ones) # see https://github.com/robbyrussell/oh-my-zsh/wiki/Themes#agnoster
open . 在当前目录下打开finder ⌘ + return 全屏 ⌘ + f 所查找的内容会被自动复制 ⌘ + d 横着分屏 / ⌘ + shift + d 竖着分屏令 ⌘ + / 光标位置 ⌘ + r 只是换到新一屏,不会像 clear 一样创建一个空屏 ctrl + u 清除当前行 ctrl + a 到行首 ctrl + e 到行尾 ctrl + w 删除光标之前的单词 ctrl + k 删除到文本末尾 ⌘ + alt + 方向键 切换屏幕(用于hotkey window) ⌘ + 方向键 切换tab ctrl + _ Undo ctrl + y Paste the last thing to be cut
alias ga='git add' alias gb='git branch' alias gba='git branch -a' alias gbd='git branch -d' alias gcam='git commit -a -m' alias gcb='git checkout -b' alias gco='git checkout' alias gcm='git checkout master' alias gcp='git cherry-pick' alias gd='git diff' alias gfo='git fetch origin' alias ggpush='git push origin $(git_current_branch)' alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)' alias glgp='git log --stat -p' alias gm='git merge' alias gp='git push' alias gst='git status' alias gsta='git stash save' alias gstp='git stash pop' alias gl='git pull' alias glg='git log --stat' alias glgp='git log --stat -p'
安装成功如下: We've installed your MySQL database without a root password. To secure it run: mysql_secure_installation MySQL is configured to only allow connections from localhost by default To connect run: mysql -uroot To have launchd start mysql now and restart at login: brew services start mysql Or, if you don't want/need a background service you can just run: mysql.server start
mysql_secure_installation Securing the MySQL server deployment. Connecting to MySQL using a blank password. VALIDATE PASSWORD PLUGIN can be used to test passwords //密码验证插件,为了提高安全性,需要验证密码 and improve security. It checks the strength of password // 它会检查密码的强度 and allows the users to set only those passwords which are //只允许用户设置足够安全的密码 secure enough. Would you like to setup VALIDATE PASSWORD plugin? //你确定要安装验证密码插件吗? Press y|Y for Yes, any other key for No: y //确定安装 There are three levels of password validation policy: //三个等级的验证策略 LOW Length >= 8 //最小长度大于等于8个字符 MEDIUM Length >= 8, numeric, mixed case, and special characters //数字,字母,特殊字符 混合,具体的应该是至少1个数字,1个字母,1个特殊字符,长度不超过32个字符 STRONG Length >= 8, numeric, mixed case, special characters and dictionary file // 最严格,加上了,字典文件 Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 0 //这里我选择0最简单的, Please set the password for root here. New password: //输入密码 Re-enter new password: //重复输入密码 Estimated strength of the password: 50 //密码强度的评级 Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y //是否使用刚输入的密码? By default, a MySQL installation has an anonymous user, //默认情况下,MySQL有一个匿名用户, allowing anyone to log into MySQL without having to have //这个匿名用户,不必有一个用户为他们创建,匿名用户允许任何人登录到MySQL, a user account created for them. This is intended only for //这只是为了方便测试使用 testing, and to make the installation go a bit smoother. You should remove them before moving into a production //在正式环境使用的时候,建议你移除它 environment. Remove anonymous users? (Press y|Y for Yes, any other key for No) : y //提示移除匿名用户 Success. Normally, root should only be allowed to connect from //一般情况下,root用户只允许使用"localhost"方式登录, 'localhost'. This ensures that someone cannot guess at the root password from the network. // 以此确保,不能被某些人通过网络的方式访问 Disallow root login remotely? (Press y|Y for Yes, any other key for No) : no //不允许root远程登陆? ... skipping. By default, MySQL comes with a database named 'test' that //默认情况下,MySQL数据库中 anyone can access. This is also intended only for testing, //这也仅仅是为了测试 and should be removed before moving into a production // 在正式环境下,应该移除掉 environment. Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y //确认删除test数据库? - Dropping test database... Success. - Removing privileges on test database... Success. Reloading the privilege tables will ensure that all changes made so far will take effect immediately. //刷新权限表,以确保所有的修改可以立刻生效 Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y //确认刷新 Success. All done!