Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env pwsh
$InputPath = $args[0]
# https://stackoverflow.com/questions/8761888/capturing-standard-out-and-error-with-start-process
function Start-Command ([String]$Path, [String]$Arguments) {
$pinfo = New-Object System.Diagnostics.ProcessStartInfo
$pinfo.FileName = $Path
$pinfo.RedirectStandardError = $true
$pinfo.RedirectStandardOutput = $true
$pinfo.UseShellExecute = $false
@lizkes
lizkes / powershell配置
Created August 10, 2021 02:03
shell配置
#------------------------------- Import Modules BEGIN -------------------------------
# 引入 posh-git
Import-Module posh-git
# 引入 oh-my-posh
Import-Module oh-my-posh
# 设置 PowerShell 主题
Set-PoshPrompt -Theme iterm2
#------------------------------- Import Modules END -------------------------------
@lizkes
lizkes / gist:73c34fca4240a4fa4d212fc3a9329c93
Created August 3, 2021 06:00
openssl generate ecc key
openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-256 -out privkey_ecc.pem
openssl pkey -in privkey_ecc.pem -out pubkey_ecc.pem -pubout
@lizkes
lizkes / go-os-arch.md
Created January 10, 2021 17:05 — forked from asukakenji/0-go-os-arch.md
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.14.7 darwin/amd64.

A list of valid GOOS values

(Bold = supported by go out of the box, ie. without the help of a C compiler, etc.)

  • aix
  • android
@lizkes
lizkes / github_ssh_proxy.md
Last active January 7, 2021 17:04
windows下github ssh走代理

修改 ~/.ssh/config 文件(不存在则新建):

# 必须是 github.com
Host github.com
   HostName github.com
   User git
   # 走 HTTP 代理
   # ProxyCommand socat - PROXY:127.0.0.1:%h:%p,proxyport=10809
   # 走 socks5 代理(如 Shadowsocks)
 # ProxyCommand connect -S 127.0.0.1:10808 %h %p