Macos 开启 Docker 端口

使用 socat 转发为 2375 端口 socat TCP-LISTEN:2375,reuseaddr,fork UNIX-CONNECT:/var/run/docker.sock

六月 27, 2018

Window 终端设置 UTF8

CMD 设置 首先,win+R –> regedit 打开注册表 在路径 计算机\HKEY_CURRENT_USER\Console%SystemRoot%_system32_cmd.exe 中找到 CodePage 数据数值修改为 0000fde9 PowerShell 设置 创建一个 PowerShell 配置文件,打开 PowerShell 执行 New-Item $PROFILE -ItemType File -Force 修改创建的配置文件 Microsoft.PowerShell_profile.ps1,加入内容 [System.Console]::OutputEncoding=[System.Text.Encoding]::GetEncoding(65001) 无法加载文件 X:\Users...\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1,因为在此系 。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。 修改 PowerShell 的执行策略 Execution Policy,执行: Set-ExecutionPolicy Unrestricted

五月 14, 2018

终端设置代理

Git 客户端设置代理 使用 Git 执行 git config --global http.proxy http://127.0.0.1:1080 git config --global https.proxy http://127.0.0.1:1080 Linux 平台 方法 1 在终端中直接运行命令,这个办法的好处是简单直接,并且影响面很小(只对当前终端有效,退出就不行了) export http_proxy=http://proxyAddress:port 如果你用的是 ss 代理,在当前终端运行以下命令,那么 wget curl 这类网络命令都会经过 ss 代理 export ALL_PROXY=socks5://127.0.0.1:1080 方法 2 把代理服务器地址写入 .bashrc 或者 .zshrc ,添加下面内容 export http_proxy="http://localhost:port" export https_proxy="http://localhost:port" 以使用 shadowsocks 代理为例,ss 的代理端口为 1080 ,那么应该设置为 export http_proxy="socks5://127.0.0.1:1080" export https_proxy="socks5://127.0.0.1:1080" 或者直接设置 ALL_PROXY export ALL_PROXY=socks5://127.0.0.1:1080 或者通过设置 alias 简写来简化操作,每次要用的时候输入 setproxy,不用了就 unsetproxy alias setproxy="export ALL_PROXY=socks5://127.0.0.1:1080" alias unsetproxy="unset ALL_PROXY" alias ip="curl -i http://ip....

七月 13, 2017

Github 密钥设置

设置 git 的 user.name 和 user.email git config --global user.name "kain" git config --global user.email "zhangtqx@vip.qq.com" 生成 RSA 密钥对 ssh-keygen -t rsa -C 将公钥内容上传至 git 服务器 或 github,测试一下 ssh git@github.com 生成以下内容代表成功 Warning: Permanently added 'github.com,192.30.255.112' (RSA) to the list of known hosts. PTY allocation request failed on channel 0 Hi kainOnly! You've successfully authenticated, but GitHub does not provide shell access.

十一月 8, 2016