This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
log_format custom_format '$remote_addr - $remote_user [$time_local] "$host $request" ' | |
'$status $body_bytes_sent "$http_referer" ' | |
'"$http_user_agent" "$http_x_forwarded_for" ' | |
'$request_time'; | |
access_log /var/log/nginx/access.log custom_format; |
example: https://10.0.0.1:8123
Add the extra_hosts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import subprocess | |
base_directory = "/path/to/source" # 输入目录的基本路径 | |
output_directory = "/path/to/dest" # 切割后的音频文件保存的目录 | |
segment_duration = 180 # 切割的每个片段的时长(以秒为单位) | |
def get_audio_encoding(input_path): | |
command = f'ffprobe -v error -select_streams a:0 -show_entries stream=codec_name -of default=noprint_wrappers=1:nokey=1 "{input_path}"' | |
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//this works. | |
const puppeteer = require('puppeteer'); | |
const fs = require('fs') | |
const path = require('path') | |
const { promisify } = require('util') | |
const readFileAsync = promisify(fs.readFile) | |
const writeFileAsync = promisify(fs.writeFile); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### | |
# URL: https://stackoverflow.com/a/37877244 | |
#### | |
log_format main '$http_x_forwarded_for - $remote_user [$time_local] ' | |
'"$request_method $scheme://$host$request_uri $server_protocol" ' | |
'$status $body_bytes_sent "$http_referer" ' | |
'"$http_user_agent" $request_time'; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from audioop import add | |
import os, json | |
def main(): | |
outbounds = [] | |
inbounds = [] | |
inbound_template = """ | |
{{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Database credentials | |
user="root" | |
password="xxx" | |
host="" | |
db_name="database_name" | |
# Other options | |
backup_path="/root/backup/mysql" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Data Import Wizard provides a way to generate or update content from an external file. | |
.DESCRIPTION | |
The import file uses the properties "Name" and "Id" to help match existing items. | |
.NOTES | |
Requires Sitecore PowerShell Extensions 4.6 or newer. | |
NewerOlder