我的学习笔记

爱生活,爱折腾。。。

0%

问题描述

使用的系统是 macOS High Sierra ,已经安装了 Sublime Text 3176。但是无法在终端中使用 subl 命令。

解决办法

在终端中执行下面的命令,然后输入本机密码,回车即可:

1
sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl

如果是其他低版本的 Mac系统,上面的代码不起作用的话,可以尝试下面的代码:

1
sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl

其实解决问题的关键,就在于上面两行代码末尾中的文件路径。你可以使用访达的前往功能,试试看能打开哪个目录。如果你安装了 Node.JS 之类的环境,就会发现 node、npm 等命令,都在这个目录下。

WordPress 忘记管理员密码

问题描述

WordPress管理员密码忘记了,网站无法正常发送邮件,所以没办法通过邮箱找回密码,怎么办?

解决方法

进入 PHPmyadmin 或者其他数据库管理工具,执行下面的 SQL语句即可。

1
UPDATE wp_users SET user_pass = MD5('新密码') WHERE wp_users.user_login ='管理员账号' LIMIT 1;

例如:

1
UPDATE wp_users SET user_pass = MD5('xinmima') WHERE wp_users.user_login ='admin' LIMIT 1;

WordPress4.9.7 & PHPmyadmin 实测成功!

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment