1 年前更新 |git, 其它

Go:安装与配置

  1. 安装:参考官方Go安装方法
  2. Go代理设置:参考地址

    我使用的是设置临时环境变量:export GOPROXY=https://goproxy.ioexport GO111MODULE=on

PostgreSQL:安装与配置

  1. 安装:参考官方安装方法(ubuntu)
  2. 创建用户:
    1. 进入数据库 : sudo -u postgres psql
    2. 创建用户:create user gogs with password 'gogs';
    3. 创建数据库:CREATE DATABASE testdb OWNER gogs;
    4. 将gogs数据库的权限全部赋予gogs用户:GRANT ALL PRIVILEGES ON DATABASE gogs TO gogs;
    5. 退出:\q
1 年前更新 |其它
  1. 先随便找一个不能正常显示的头像的地址在浏览器中单独打开

    地址大概是这样的 https://avatars3.githubusercontent.com/u/5283258?s=60&u=17125d482bd87235abb59...

  2. 将地址中的 avatars3 依次改成avatars0, avatars1, avatars2, avatars4, avatars5,直到有一个头像能正常显示为止(注意:如果都不能显示此方法就不适用,需找另外的方法

1 年前更新 |node, Linux

Nodejs在Linux系统上安装方法(官方)

按照官方的方式执行 curl -sL https://deb.nodesource.com/setup_12.x | bash - 后出现错误提示:

## Confirming "n/a" is supported...


as n/a, is not currently supported, please contact NodeSource at https://github.com/nodesource/distributions/issues if you think this is incorrect or would like your distribution to be considered for support" heading="2" class="md-head head-2">Your distribution, identified as "n/a", is not currently supported, please contact NodeSource at https://github.com/nodesource/distributions/issues if you think this is incorrect or would like your distribution to be considered for support

1 年前更新 |MongoDB

查出数组长度等于3的记录

db.user.find({ books: { $size: 3} })
2 年前更新 |其它

Charles Proxy License

Charles 4.2目前是最新版,可用。

Registered Name: https://zhile.io License Key: 48891cf209c6d32bf4

https://zhile.io/2017/07/07/charles-proxy-usage-and-license.html

2 年前更新 |MongoDB
3 年前更新 |其它

以前网站使用的https是在腾讯云上免费申请的(1年),最近一直没关心过博客,今日一看才发现https到期了,导致网站不能正常访问。

在腾讯云上继续申请免费证书,发现一直处于待验证状态,不知道是什么原因。于是换了在freessl.org网站上申请。

freessl.org上申请也是遇到好多问题。打开freessl.org首页,输入一级域名,点击“创建免费的SSL证书”。在点击之前freessl.org提供了两种证书:TrustAsiaLet's Encrypt。 freessl.org推荐的TrustAsia,使用这个证书我一直没有通过,最后选择了Let's Encrypt才弄成功。

3 年前更新 |MongoDB

So, everytime when I have to start my node apps I often forgot to run my MongoDB service and it is a bit annoying where you have to have one tab dedicated to something you won't touch at all and I thought I should find a way to run this from my startup item on my Mac OS X.

Luckily, this post from Hunter Ford's blog explains how to run your MongoDB in your Startup item on Mac OS X and here is how:

Create a file call org.mongo.mongod.plist in /Library/LaunchDaemons/

If you use vim you can do like this:

sudo vim /Library/LaunchDaemons/org.mongo.mongod.plist
© 2016 - 2021 BY 禾惠 粤ICP备20027042号