nginx 允许跨域
location / { if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; # # Custom header…
mac rust 开发配置
镜像 告别等待,请先配置镜像 => 清华镜像 安装 brew install rustup-init rustup-init Standalone installers 模式下,无法使用rustup命令所以不建议: brew install rust
Ubuntu 修改交 swap 分区的大小
一、准备工作 执行“sudo swapon -s”命令,查看是否已经存在swap file 二、修改swap file 如果第一步存在swap.img则需要先禁用 sudo swapoff /swapfile 修改swap 空间的大小为2G sudo dd if=/dev/zero of=/swapfile bs=2G count=1 设置文件为“…
解决粘贴到vim缩进错乱问题
关闭自动缩进 # 进入 paste 模式 :set paste # 退出 paste 模式 :set nopaste 如果不想每次都执行这个命令,可以在 ~/.vimrc 中添加一行配置 set pastetoggle=<F9> ,这样就可以通过<F9>快速在paste模式中切换。
Ubuntu刷新dns
sudo systemd-resolve - -flush-caches 1人点赞Linux
Mac 调整打开文件数量
This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x Th…
mac 禁用 swap
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist
git代理设置和取消
git config --global https.proxy http://127.0.0.1:1080 git config --global https.proxy https://127.0.0.1:1080 git config --global --unset http.proxy git config --global --unset…