git pull 自动保存密码
进入项目目录,执行代码
git config --global credential.helper store
执行
git pull
- 输入账号及密码,验证通过后会自动保存
- 之后的pull不会再需要账号和密码
进入项目目录,执行代码
git config --global credential.helper store
执行
git pull
sublime安装OmniMarkupPreviewer后,按cmd+opt+o后,报404错误,类似如下:
Sorry, the requested URL 'http://127.0.0.1:51004/view/26' caused an error:
'buffer_id(52) is not valid (closed or unsupported file format)'
**NOTE:** If you run multiple instances of Sublime Text, you may want to adjust
the `server_port` option in order to get this plugin work again.
从网上找到常见三种处理方式:
更改服务器或端口
在Preferences
> Package Settings
> OmniMarkupPreviewer
> Settings - Default
里面更改:
{
// 原配置
"server_host": "127.0.0.1",
"server_port": 51004,
// 更改后的配置
"server_host": "0.0.0.0",
"server_port": 52000,
}
验证无效。
删除Strikethrough扩展
打开Preferences
> Package Settings
> OmniMarkupPreviewer
> Settings - User
粘贴以下内容,然后保存。
{
"renderer_options-MarkdownRenderer": {
"extensions": ["tables", "fenced_code", "codehilite"]
}
}
验证无效。
修复Strikethrough扩展
打开/Users//Library/Application Support/Sublime Text 3/Packages/OmniMarkupPreviewer/OmniMarkupLib/Renderers/libs/mdx_strikeout.py
:
将最后的
def makeExtension(configs=None):
return StrikeoutExtension(configs=configs)
修改为
def makeExtension(*args, **kwargs):
return StrikeoutExtension(*args, **kwargs)
验证仍然无效。
最后找到解决办法:
以方法2为基础,把扩展名称写全称:
{
"renderer_options-MarkdownRenderer": {
"extensions": ["markdown.extensions.tables", "markdown.extensions.fenced_code", "markdown.extensions.codehilite"]
}
}
验证有效!
参考来源:
https://www.wenjinyu.me/zh/3-solutions-to-OmniMarkupPreviewer-404-error/https://gitmemory.com/issue/timonwong/OmniMarkupPreviewer/138/562414026
ctrl+shift+2
可解决
参见:https://github.com/rime/squirrel/issues/85
brew更新出现LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 错误,而github可以正常访问。尝试更新源等均无效,一番搜索尝试后,最后关闭ipv6解决。
networksetup -setv6off Wi-Fi
参考来源:
https://blog.csdn.net/wufantastic/article/details/91488651
https://stackoverflow.com/questions/48987512/ssl-connect-ssl-error-syscall-in-connection-to-github-com443
1、nginx在宿主机,typecho和mysql安装在docker
2、编写Dockerfile
FROM php:7.2.3-fpm
LABEL maintainer="bernieyu" \
email="guin@bernieyu.com" \
version="7.2.3"
ENV TZ=Asia/Shanghai
RUN apt-get update\
&& docker-php-ext-install pdo_mysql \
&& echo "output_buffering = 4096" > /usr/local/etc/php/conf.d/php.ini
3、生成
docker build -t guin/php:7.2.3-fpm .
4、编辑mysql.env
# MySQL的root用户默认密码,这里自行更改
MYSQL_ROOT_PASSWORD=password
# MySQL镜像创建时自动创建的数据库名称
MYSQL_DATABASE=typecho
# MySQL镜像创建时自动创建的用户名
MYSQL_USER=typecho
# MySQL镜像创建时自动创建的用户密码
MYSQL_PASSWORD=password
5、编写docker-compose.yml
version: "3"
services:
php:
image: guin/php:7.2.3-fpm
container_name: www-php
restart: always
ports:
- "127.0.0.1:9000:9000"
volumes:
- ./typecho:/var/www/html
- ./log/php-fpm:/var/log/php-fpm
- ./log/php:/var/log/php
# - ./conf/php.ini:/usr/local/etc/php/conf.d/php.ini
# - ./conf/zzz-PHPSetting.conf:/usr/local/etc/php-fpm.d/zzz-PHPSetting.conf
environment:
- TZ=Asia/Shanghai
depends_on:
- mysql
networks:
- web
mysql:
image: mysql:5.7
container_name: www-mysql
restart: always
ports:
- "127.0.0.1:3306:3306"
volumes:
- ./mysql/data:/var/lib/mysql:rw
- ./mysql/logs:/var/log/mysql:rw
- ./mysql/conf:/etc/mysql/conf.d
env_file:
- mysql.env
networks:
- web
networks:
web:
6、启动
docker-compose up -d
7、nginx
server
{
listen 80;
listen 443 ssl http2;
server_name guin.cn; #你的域名,记得确认已经将*的A记录解析到
charset utf-8;
if ($server_port !~ 443){ #http跳转到https
rewrite ^(/.*)$ https://$host$1 permanent;
}
access_log /var/log/nginx/guin.cn.access.log;
error_log /var/log/nginx/guin.cn.error.log;
root /var/www/html; #docker内的路径
index index.php;
ssl_certificate /ca/xxx.pem; #这里写你ssl证书公钥(完整链)的位置,记得要给nginx访问这个文件的权限
ssl_certificate_key /ca/xxx.key; #这里写你ssl证书私钥的位置,记得要给nginx访问这个文件的权限
ssl_protocols TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
error_page 497 https://$host$request_uri;
# if (!-e $request_filename) {
# rewrite ^(.*)$ /index.php$1 last;
# break;
# }
location / {
root /var/www/html;
index index.html index.htm index.php;
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
location ~ .*\.(js|css)?$ {
root /www/typecho; #宿主机路径
expires 12h;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
root /opt/www/typecho;
expires 12h;
}
location ~ .*\.php(\/.*)*$ {
proxy_buffers 8 16k;
proxy_buffer_size 32k;
root /var/www/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
8、nginx 测试、重启
nginx -t
nginx -s reload
9、typecho安装时,mysql服务器地址输入mysql的docker容器名,即www-mysql,否则会找不到数据库