Skip to content

SOFTWARE

OSS

MacOS-Typora-picgo

我的应用是通过 brew 管理的,brew - fnm - node(npm) - pnpm - picgo

bash
pnpm add picgo -g
picgo set uploader

select “Custom Command” : [your node path] [your picgo-core path] upload

✘ [which node] [which picgo] upload

✔ [which node] [npm root -g/picgo/bin/picgo] upload

PicGo

Config PicGo-Core Please edit config.json at following location

  • Linux / macOS → ~/.picgo/config.json
  • Windows → C:\Users\klaus\ .picgo\config.json

选择 PicGo-Core (Command line)下载或更新

bash
# 在此目录下 C:\Users\klaus\AppData\Roaming\Typora\picgo\win64
.\picgo.exe set uploader
.\picgo.exe use uploader
json
# Typora + Picgo + aliyun OSS https://zhuanlan.zhihu.com/p/104152479
# area(阿里云区域查询)https://help.aliyun.com/document_detail/31837.html
# area(七牛区域查询)https://developer.qiniu.com/kodo/1671/region-endpoint-fq
{
    "picBed": {
        "current": "qiniu",
        "aliyun": {
            "accessKeyId": "**************",
            "accessKeySecret": "**************",
            "bucket": "ulooklikeamovie",
            "area": "oss-cn-beijing",
            "path": "img/",
            "customUrl": "",
            "options": ""
        },
        "uploader": "qiniu",
        "transformer": "path",
        "qiniu": {
            "accessKey": "**************",
            "secretKey": "**************",
            "bucket": "chinatelecom",
            "url": "qiniu.viphimself.vip",
            "area": "z0",
            "options": "",
            "path": ""
        }
    },
    "picgoPlugins": {}
}

issues

🔺picgo + 七牛云华东-浙江2无法上传图片

Chrome offline

火狐开发者版切换语言

💔 开发者版参考 Firefox 官方更换语言指引不生效,前提是下载了语言包

  1. 在地址栏输入 about:config
  2. "Accept The Risk"
  3. 搜索框输入 intl.locale.requested
  4. 选择 string(字符串),然后点击右侧 ➕ 号
  5. 输入 zh-cn,en-us ... 只写其中一个
  6. 重启浏览器

PowerToys

image-20230308170748337

Brew 软件源配置

~/.zshrc中添加以下内容,然后执行source ~/.zshrc即可

bash
# Homebrew设置国内镜像
function set_china_source() {
  export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.ustc.edu.cn/brew.git"
  export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.ustc.edu.cn/homebrew-bottles"
  export HOMEBREW_API_DOMAIN="https://mirrors.ustc.edu.cn/homebrew-bottles/api"
  brew update
}

# Homebrew切换回官方源
function unset_china_source() {
  # brew 程序本身,Homebrew / Linuxbrew 相同
  unset HOMEBREW_BREW_GIT_REMOTE
  git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew
  unset HOMEBREW_API_DOMAIN
  unset HOMEBREW_BOTTLE_DOMAIN
  brew update
}

如果报错 Error: Another active Homebrew process is already in progress., 执行以下命令

bash
rm -rf $(brew --prefix)/var/homebrew/locks

powershell 设置代理

临时设置

powershell
$env:HTTP_PROXY = "http://localhost:7890"
$env:HTTPS_PROXY = "http://localhost:7890"

Released under the MIT License.