This file contains hidden or 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 | |
# 安装 Docker & Docker Compose | |
echo ">>> Installing Docker & Docker Compose..." | |
curl -sSL https://get.docker.com | bash | |
# Xboard 安装及配置 | |
echo ">>> Installing and configuring Xboard..." | |
# 获取Docker compose 文件 |
This file contains hidden or 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
[Unit] | |
Description=Ollama Service | |
After=network-online.target | |
[Service] | |
ExecStart=/usr/local/bin/ollama serve | |
User=ollama | |
Group=ollama | |
Restart=always | |
RestartSec=3 |
This file contains hidden or 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
sudo sqlite3 /etc/x-ui/x-ui.db << EOF | |
INSERT INTO inbounds (user_id, up, down, total, remark, enable, expiry_time, listen, port, protocol, settings, stream_settings, tag, sniffing) | |
VALUES (1, 0, 0, 0, 'default', 1, 0, '', "$GCPPORT", 'vmess', '{"clients": [{"id": "$GCPID", "alterId": 0}], "disableInsecureEncryption": false}', '{"network": "ws", "security": "none", "wsSettings": {"path": "/", "headers": {"Host": "$GCPHOST"}}}', 'inbound-"$GCPPORT"', '{"enabled": true, "destOverride": ["http", "tls"]}') | |
EOF |
This file contains hidden or 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": null, | |
"routing": { | |
"rules": [ | |
{ | |
"inboundTag": [ | |
"api" | |
], | |
"outboundTag": "api", | |
"type": "field" |
This file contains hidden or 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
class PageManager { | |
constructor() { | |
this.conditionalWorks = []; | |
this.activeConditionWork = null; | |
setInterval(() => { | |
this.conditionalWorks.forEach(cw => { | |
cw.conditionWork.report(); | |
}); | |
}, 1000); | |
} |
This file contains hidden or 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 | |
# update package | |
apt-get update -y | |
apt install shadowsocks-libev -y | |
echo "{ | |
\"server\": \"SERVER_IP\", | |
\"server_port\": 443, |
This file contains hidden or 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
###################### | |
## shadowsocks-libev | |
###################### | |
# install dependencies | |
yum install epel-release -y | |
yum-config-manager --enable epel | |
yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto udns-devel libev-devel wget libsodium -y | |
# install shadowsocks-libev |
This file contains hidden or 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
Private Sub m_SetBytes(ByRef DestValue As Long, ByVal SourceValue As Long, ByVal Offset As Long, ByVal Length As Long) | |
m_CopyMemory DestValue, SourceValue, Offset, 0, Length | |
End Sub | |
Private Sub m_CopyMemory(ByRef DestValue As Long, ByVal SourceValue As Long, ByVal DestOffset As Long, ByVal SourceOffset As Long, ByVal Length As Long) | |
CopyMemory ByVal VarPtr(DestValue) + DestOffset, ByVal VarPtr(SourceValue) + SourceOffset, Length | |
End Sub |
This file contains hidden or 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 | |
red=`tput setaf 1` | |
green=`tput setaf 2` | |
reset=`tput sgr0` | |
echo_green() | |
{ | |
echo "${green}$1${reset}" | |
} |