分类 Mac 下的文章

1、执行以下命令,安装run_multiple_commands插件:

cat > ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/run_multiple_commands.py << EOF
# run_multiple_commands.py
import sublime, sublime_plugin

# Takes an array of commands (same as those you'd provide to a key binding) with
# an optional context (defaults to view commands) & runs each command in order.
# Valid contexts are 'text', 'window', and 'app' for running a TextCommand,
# WindowCommands, or ApplicationCommand respectively.
class RunMultipleCommandsCommand(sublime_plugin.TextCommand):
  def exec_command(self, command):
    if not 'command' in command:
      raise Exception('No command name provided.')

    args = None
    if 'args' in command:
      args = command['args']

    # default context is the view since it's easiest to get the other contexts
    # from the view
    context = self.view
    if 'context' in command:
      context_name = command['context']
      if context_name == 'window':
        context = context.window()
      elif context_name == 'app':
        context = sublime
      elif context_name == 'text':
        pass
      else:
        # Workaround for sublime-evernote package, modified by Chien Chun
        pass
        # values = ','.join(str(v) for v in context_name)
        # raise Exception('Invalid command context "'+values+'".')


    # skip args if not needed
    if args is None:
      context.run_command(command['command'])
    else:
      context.run_command(command['command'], args)

  def run(self, edit, commands = None):
    if commands is None:
      return # not an error
    for command in commands:
      self.exec_command(command)
EOF

- 阅读剩余部分 -

1、安装中文版的Navicat Premium 12.1.24 for Mac
2、删掉钥匙串访问(Keychain.app)中所有由 Navicat 保存的密码
3、打开钥匙串访问,点击左上角的钥匙串访问,再点击证书助理中的创建证书,在弹出的创建证书窗口中输入和选择以下信息,然后点击创建按钮:

- 阅读剩余部分 -

1、在系统偏好设置-网络-你的VPN连接-高级,将通过VPN连接发送所有流量的选项取消勾选。
2、打开终端,执行以下命令,指定192.168.199.1至192.168.199.255的IP地址通过ppp0网关访问(其他IP地址走默认网关),ppp0是VPN连接的网关名称,通过ifconfig可以查看到VPN连接的网关名称,请将192.168.199.0和ppp0修改为你自己实际的值。

sudo touch /etc/ppp/ip-up
sudo chmod 755 /etc/ppp/ip-up
sudo sh -c 'cat /dev/null > /etc/ppp/ip-up'
sudo sh -c 'echo "#!/bin/sh" >> /etc/ppp/ip-up'
sudo sh -c 'echo "/sbin/route add -net 192.168.199.0/16 -interface ppp0" >> /etc/ppp/ip-up'

- 阅读剩余部分 -

1、打开系统偏好设置,选择用户与群组;
2、如果左下角有一个锁上的小锁,请点一下,然后输入管理员密码;
3、点一下右下角上方的登陆选项;
4、点右侧的网络账户服务器旁边的“加入”;
5、在弹出来的窗口右下部选择“打开目录实用工具…”;
6、在弹出的窗口的右下角,点一下小锁,输入管理员密码;
7、在全屏幕,注意是全屏幕的最上面的菜单,选择编辑,然后选择启用root账户;
8、为root账户输入两次密码,然后退出;