ffmpeg -re -rtsp_transport tcp -i "rtsp://[username]:[password]@[host]:[port]" -c:v libx264 -vprofile baseline -s 712x400 -c:a aac -ar 44100 -strict -2 -ac 1 -f flv "rtmp://example.local"
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
/** | |
* - | |
* @param {string} fmt - | |
* @returns {string} - | |
*/ | |
Date.prototype.format = function (fmt) { | |
const dateObject = { | |
"y+": this.getFullYear(), | |
"M+": this.getMonth() + 1, // 月份 | |
"d+": this.getDate(), // 日 |
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
{ | |
"type": "module", | |
"dependencies": { | |
"@alicloud/openapi-client": "^0.3.3", | |
"@alicloud/tea-typescript": "^1.7.1", | |
"@alicloud/vod20170321": "^2.0.1", | |
"ali-oss": "^6.15.0" | |
} | |
} |
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/sh | |
#+ip 指定监听的IP | |
#-port 指定端口,个性建服 | |
#-condebug 记录熊孩子的破坏经过 | |
MAP="+map 指定地图名" | |
CONF="$HOME/server.cfg" | |
L4D2_DIR="$HOME/.steam/steamapps/common/Left 4 Dead 2 Dedicated Server" | |
START_PARAMS="-console -game left4dead2 -secure +ip 0.0.0.0 -port 27017 -nomaster -condebug" |
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
package main | |
import ( | |
"log" | |
"os/exec" | |
"runtime" | |
"strconv" | |
"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
pub fn convert_path(path_str: &str) -> String { | |
if cfg!(target_os = "windows") { | |
String::from(path_str.replace("\\", "/")) | |
} else { | |
String::from(path_str) | |
} | |
} | |
fn main() { | |
println!("hello world!"); |
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
package main | |
import ( | |
"bufio" | |
"bytes" | |
"flag" | |
"github.com/gogs/chardet" | |
"golang.org/x/text/encoding/japanese" | |
"golang.org/x/text/encoding/korean" | |
"golang.org/x/text/encoding/simplifiedchinese" |
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
//枚举的使用 | |
enum OSName { | |
windows, | |
darwin, | |
linux, | |
centos, | |
fedora, | |
debian, | |
ubuntu, | |
suse, |
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
// golang 热加载配置文件 | |
// golang config hot reload | |
package main | |
import ( | |
"encoding/json" | |
"io/ioutil" | |
"log" | |
"os" |
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
// golang 获取系统版本号 (windows, linux, darwin or macos) | |
// golang obtain the system version number (windows, linux, darwin or macos) | |
package main | |
import ( | |
"bytes" | |
"io/ioutil" | |
"log" | |
"os" |