split -l 100000 -d access.log part/access_ --verbose # 按行切割
split -b 100m access.log -d part/access_ --verbose # 按字节大小切割
cat part/access_* > access.log # 合并
cat part.mp4 >> main.mp4 # 追加 part.mp4 到 main.mp4 末尾
bash -c "cat part.mp4 >> main.mp4" >> /dev/null # 静默执行
let wm = {
startDate: Date.now(),
remove: () => {
try {
document.querySelectorAll('.copyrightInfo-div').forEach(c => {
c.style.transform = "translateY(9999px)"
})
document.querySelectorAll('div').forEach(node => {
if (node.innerHTML.trim().startsWith("正在试用功能——")) {
# 配置参数(开始)===
ymd=$(date +%Y%m%d)
echo "日期:$ymd"
echo
keepday=5
echo "保留最近天数:$keepday"
echo
dirsync="/package/autosync/sync"
echo "同步目录:$dirsync"
# 配置参数(开始)===
ymd=$(date +%Y%m%d)
echo "日期:$ymd"
echo
keepday=5
echo "保留最近天数:$keepday"
echo
dirsync=/package/autosync/sync
echo "同步目录:$dirsync"
cat .git/config # note <github-uri>
rm -rf .git
git init
git branch -M main # 修改分支,可设置默认分支为 main: git config --global init.defaultBranch main
git add .
git commit -m "Initial commit"
git remote add origin git@github.com:netnr/proxy.git # 改成自己对应的仓库
git push -u --force origin main
# 设置用户名、邮箱
git config --global user.name "netnr"
git config --global user.email "netnr@netnr.com"
# 查看
cd ~/.ssh && ls
# 生成密钥(ED25519 更小更快更安全,需要 OpenSSH 6.5 以上,推荐),密钥均为 256 位
ssh-keygen -t ed25519 -C "netnr"
# 生成私钥,4 位以上的密码
# genra 生成RSA私钥;-des3 des3算法;-out server.key 生成的私钥文件名;2048 私钥长度
openssl genrsa -des3 -out server.pass.key 2048
# 去除密码
openssl rsa -in server.pass.key -out server.key
# 生成 CSR (证书签名请求)
# req 生成证书签名请求;-new 新生成;-key 私钥文件;-out 生成的CSR文件;-subj 生成CSR证书的参数
openssl req -new -key server.key -out server.csr -subj "/C=CN/ST=Beijing/L=Beijing/O=dev/OU=dev/CN=dev.cn"
# 脚本安装
wget https://dot.net/v1/dotnet-install.ps1 # PowerShell (Windows)
wget https://dot.net/v1/dotnet-install.sh # Bash (Linux/macOS)
./dotnet-install.sh # 默认安装 LTS
./dotnet-install.sh -c Current # 当前最新
./dotnet-install.sh -c 5.0 # 指定版本
docker pull mcr.microsoft.com/azure-sql-edge:latest # 下载镜像
# 开发版
docker run --cap-add SYS_PTRACE -e 'ACCEPT_EULA=1' -e 'MSSQL_SA_PASSWORD=yourStrong(!)Password' -p 1433:1433 --name sqledge -d mcr.microsoft.com/azure-sql-edge
# 高级版
docker run --cap-add SYS_PTRACE -e 'ACCEPT_EULA=1' -e 'MSSQL_SA_PASSWORD=yourStrong(!)Password' -e 'MSSQL_PID=Premium' -p 1433:1433 --name sqledge -d mcr.microsoft.com/azure-sql-edge
# 配置
https://learn.microsoft.com/en-us/azure/azure-sql-edge/configure
# 安装
yum install iptables
yum update iptables
yum install iptables-services
service iptables status
iptables -L # 列表
iptables -nL --line
iptables -A INPUT -p tcp --dport ssh -j ACCEPT # 开启 SSH
# docker 安装 12.8
docker run --restart=always --name=pg \
-e POSTGRES_PASSWORD=<MySecretPassword> \
-e PGDATA=/var/lib/postgresql/data/pgdata \
-v /package/pgdb:/var/lib/postgresql/data \
-p 5432:5432 -d postgres:12.8
# help
https://hub.docker.com/_/postgres
npm install -g browserify # 安装 yarn global add browserify
browserify index.js -o bundle.js # 捆绑打包
# help
http://browserify.org/
dotnet publish # 跨平台环境依赖版
dotnet publish ~/projects/app1/app1.csproj # 发布指定项目
dotnet publish -c Release -r linux-x64 # 发布指定平台 linux-64 独立版
dotnet publish -c Release -r win-x64 --self-contained false # 发布指定平台环境依赖版
# 参数说明
# -p:PublishReadyToRun=true 缩短应用程序的启动时间,但代价是增加应用程序的大小
# -p:PublishSingleFile=true 打包到特定于平台的单个文件可执行文件中
# -p:PublishTrimmed=true 剪裁未使用的库以减小应用的部署大小
# --self-contained [true|false] 运行时随应用程序一同发布,默认为 true
Option Explicit
ValidationMode = True
InteractiveMode = im_Batch
Dim mdl ' 当前模型
' 获取当前模型
Set mdl = ActiveModel
If (mdl Is Nothing) Then
MsgBox "没有打开一个模型"
ElseIf Not mdl.IsKindOf(PdPDM.cls_Model) Then
MsgBox "当前模型不是一个PDM"
crontab -l # 列表
crontab -e # 编辑
vi /etc/crontab # 编辑
crontab /etc/crontab # 生效
# 注意末尾保留一空行
crontab -h # 帮助
# 生成密钥
ssh-keygen -t ed25519 -C "netnr"
# 服务器端配置公钥,拷贝客户端公钥 id_ed25519.pub 内容写入服务器
vi ~/.ssh/authorized_keys
# 其它配置(以上配置完成已经可以了)
# 文件权限要求
chmod 600 authorized_keys
chmod 700 ~/.ssh
# 全局变量
vi /etc/profile # 编辑
PATH=$PATH:/package/app/node/bin
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL # 在该行前面加
source /etc/profile # 生效
# 局部变量
vi ~/.bash_profile # 编辑
alias nodejs=/package/app/node/bin
source ~/.bash_profile # 生效
- 下载地址:https://dev.mysql.com/downloads/mysql
- 解压包,放置一个目录下(不含中文或空格的路径)
- 在 **bin** 同级目录创建 **my.ini** 文件和 **data** 文件夹
- my.ini 文件内容
```
[mysqld]
# 设置 3306 端口
port=3306
# 设置 mysql 的安装目录
basedir=E:\\mysql-8.0.22-winx64
# 按用户导出
expdp system/oracle@orcl schemas=$user dumpfile=$dbname.dmp logfile=$dbname.log directory=DATA_PUMP_DIR
# 按表名导出
expdp system/oracle@orcl tables=($TABLE1,$TABLE2) dumpfile=$dbname.dmp logfile=$dbname.log directory=DATA_PUMP_DIR
# 按用户导入(表覆盖)
impdp system/oracle@orcl schemas=$user dumpfile=$dbname.dmp logfile=$dbname.log directory=DATA_PUMP_DIR table_exists_action=REPLACE
# 按用户导入(转换空间)
impdp system/oracle@orcl schemas=$user TRANSFORM=segment_attributes:n dumpfile=$dbname.dmp logfile=$dbname.log directory=DATA_PUMP_DIR table_exists_action=REPLACE
# 导入导出包权限设置
:: 显示监听的IP列表
netsh http show iplisten
:: 添加监听IP
netsh http add iplisten ipaddress=127.0.0.1
:: 删除监听IP
netsh http delete iplisten 127.0.0.1
@echo off
title .NET Framework Register IIS
color 5f
echo.---------- .NET Framework v2 Register IIS
echo.
%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -i
@echo off
title Install IIS
color 5f
echo.---------- Install IIS about 3-5 Minutes
echo.
dism /Online /Enable-Feature /FeatureName:IIS-ApplicationDevelopment /FeatureName:IIS-ASP /FeatureName:IIS-ASPNET /FeatureName:IIS-BasicAuthentication /FeatureName:IIS-CGI /FeatureName:IIS-ClientCertificateMappingAuthentication /FeatureName:IIS-CommonHttpFeatures /FeatureName:IIS-CustomLogging /FeatureName:IIS-DefaultDocument /FeatureName:IIS-DigestAuthentication /FeatureName:IIS-DirectoryBrowsing /FeatureName:IIS-FTPExtensibility /FeatureName:IIS-FTPServer /FeatureName:IIS-FTPSvc /FeatureName:IIS-HealthAndDiagnostics /FeatureName:IIS-HostableWebCore /FeatureName:IIS-HttpCompressionDynamic /FeatureName:IIS-HttpCompressionStatic /FeatureName:IIS-HttpErrors /FeatureName:IIS-HttpLogging /FeatureName:IIS-HttpRedirect /FeatureName:IIS-HttpTracing /FeatureName:IIS-IIS6ManagementCompatibility /FeatureName:IIS-IISCertificateMappingAuthentication /FeatureName:IIS-IPSecurity /FeatureName:IIS-ISAPIExtensions /FeatureName:IIS-ISAPIFilter /FeatureName:IIS-LegacyScripts /FeatureName:IIS-LegacySnapIn /FeatureName:IIS-LoggingLibraries /FeatureName:IIS-ManagementConsole /FeatureName:IIS-ManagementScriptingTools /FeatureName:IIS-ManagementService /FeatureName:IIS-Metabase /FeatureName:IIS-NetFxExtensibility /FeatureName:IIS-ODBCLogging /FeatureName:IIS-Performance /FeatureName:IIS-RequestFiltering /FeatureName:IIS-RequestMonitor /FeatureName:IIS-Security /FeatureName:IIS-ServerSideIncludes /FeatureName:IIS-StaticContent /FeatureName:IIS-URLAuthorization /FeatureName:IIS-WebDAV /FeatureName:IIS-WebServer /FeatureName:IIS-WebServerManagementTools /FeatureName:IIS-WebServerRole /FeatureName:IIS-WindowsAuthentication /FeatureName:IIS-WMICompatibility /FeatureName:WAS-ConfigurationAPI /FeatureName:WAS-NetFxEnvironment /FeatureName:WAS-ProcessModel /FeatureName:WAS-WindowsActivationService
dism /online /enable-feature /featurename:IIS-ISAPIFilter
dism /online /enable-feature /featurename:IIS-ISAPIExtensions