Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env pwsh
# 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
$pinfo.Arguments = $Arguments
{
"stats": {},
"api": {
"services": [
"StatsService"
],
"tag": "api"
},
"policy": {
"levels": {
@asukakenji
asukakenji / 0-go-os-arch.md
Last active June 28, 2024 15:10
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

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

GOOS Values

GOOS Out of the Box
aix
android
@fotock
fotock / nginx.conf
Last active May 2, 2024 02:43 — forked from plentz/nginx.conf
Nginx SSL 安全配置最佳实践.
# 生成 dhparam.pem 文件, 在命令行执行任一方法:
# 方法1: 很慢
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
# 方法2: 较快
# 与方法1无明显区别. 2048位也足够用, 4096更强
openssl dhparam -dsaparam -out /etc/nginx/ssl/dhparam.pem 4096
@atais
atais / handbrake.sh
Created July 10, 2017 20:21
Batch convert DVD videos (with VIDEO_TS folder) to MKV using HandBrake CLI
#!/bin/bash
###########
#
# Batch convert DVD Videos with HandBrake CLI
# The script will recursively look for "VIDEO_TS" folders and parse them
#
# Read this to understand:
# https://mattgadient.com/2013/06/12/a-best-settings-guide-for-handbrake-0-9-9/
# http://www.thewebernets.com/2015/02/28/easiest-best-optimal-settings-for-handbrake-dvd-video-conversion-on-mac-windows-and-linux/
#