search unix2dos search dos2unix
[ apt | brew | yum ] install unix2dos
name: PR 预处理 | |
on: | |
push: | |
branches: | |
- 'feature/**' | |
permissions: | |
pull-requests: write | |
jobs: |
name: 编译测试 | |
# 该脚本仅在 PR MERGE 的时候进行测试,不建议 将测试结果上传到 github | |
# 可以通过变量来判断,比如 PR close 的时候 发布 github release & tag | |
on: | |
pull_request: | |
branches: | |
- master # 正式版本 | |
types: | |
- synchronize |
if curl -s -m 5 -o /dev/null -w "%{http_code}" www.google.com | grep -q "200"; then | |
echo "true" | |
else | |
echo "false" | |
fi |
FROM ubuntu:20.04 | |
WORKDIR /app | |
RUN apt-get -qq update \ | |
&& apt-get -qq upgrade \ | |
&& ln -sf "/usr/share/zoneinfo/${TZ}" /etc/localtime \ | |
&& echo "${TZ}" > /etc/timezone \ | |
&& ln -sf "$(which bash)" "$(which sh)" \ | |
&& apt-get -qq full-upgrade \ |
search unix2dos search dos2unix
[ apt | brew | yum ] install unix2dos
module testnetwork | |
go 1.18 | |
require github.com/fatih/color v1.13.0 | |
require ( | |
github.com/mattn/go-colorable v0.1.9 // indirect | |
github.com/mattn/go-isatty v0.0.14 // indirect | |
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect |
TOKEN="ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | |
USER_NAME="Ran-Xing" | |
jq '.[].ssh_url' <(curl \ | |
-s \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: token $TOKEN" \ | |
"https://api.github.com/users/$USER_NAME/repos?type=all&sort=&direction=&per_page=100&page=") \ | |
| grep $USER_NAME | |
$portvalue = 33891 | |
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "PortNumber" -Value $portvalue | |
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp' -name "PortNumber" -Value $portvalue | |
New-NetFirewallRule -DisplayName 'RDPPORTLatest-TCP-In' -Program "%SystemRoot%\system32\svchost.exe" -Profile Any -Direction Inbound -Action Allow -Protocol TCP -LocalPort $portvalue | |
New-NetFirewallRule -DisplayName 'RDPPORTLatest-UDP-In' -Program "%SystemRoot%\system32\svchost.exe" -Profile Any -Direction Inbound -Action Allow -Protocol UDP -LocalPort $portvalue | |
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "PortNumber" | |
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp' -name "PortNumber" |
#!/usr/bin/env bash | |
/bin/bash -c "$(curl -fsSL https://mirror.ghproxy.com/https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | sed -e "s|https://github.com|https://mirror.ghproxy.com/https://github.com|g;s|https://raw.githubusercontent.com|https://mirror.ghproxy.com/https://raw.githubusercontent.com|g")" |
#!/usr/bin/env bash | |
#set -ex | |
Owner="$1" | |
GITHUB_API_TOKEN="$2" | |
NewOwner=$3 | |
REPOS="$( | |
curl -s -H "Authorization: token $GITHUB_API_TOKEN" \ |