-
Static IP
vi /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet NAME=eth0
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
# docker-compose.yml | |
version: "3" | |
services: | |
caddy: | |
image: caddy:2.8-alpine | |
restart: unless-stopped | |
ports: | |
- "80:80" | |
volumes: |
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
use num::BigInt; | |
fn main() { | |
let a = "-80538738812075974".parse::<BigInt>().unwrap(); | |
let b = "80435758145817515".parse::<BigInt>().unwrap(); | |
let c = "12602123297335631".parse::<BigInt>().unwrap(); | |
let a3 = a.pow(3); | |
let b3 = b.pow(3); | |
let c3 = c.pow(3); |
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
use std::collections::{HashMap, HashSet}; | |
#[derive(Clone, Debug)] | |
struct Item { | |
start: i64, | |
end: i64, | |
id: i32, | |
} | |
impl Item { |
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
# /etc/systemd/system/sd-webui.service | |
[Service] | |
ExecStart=/bin/bash /home/ubuntu/stable-diffusion-webui/webui.sh --listen --api | |
Restart=always | |
WorkingDirectory=/home/ubuntu/stable-diffusion-webui | |
StandardOutput=syslog | |
StandardError=syslog | |
SyslogIdentifier=sd-webui |
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 | |
GLOBAL_PYTHON=$(which python3.10) | |
if [ -z "$GLOBAL_PYTHON" ]; then | |
GLOBAL_PYTHON=$(which python3) | |
fi | |
echo "Using global python: $GLOBAL_PYTHON" | |
CWD=$(pwd) |
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
rm -rf config | |
mkdir config | |
docker run --rm \ | |
--name=swag \ | |
--cap-add=NET_ADMIN \ | |
-e PUID=1000 \ | |
-e PGID=1000 \ | |
-e TZ=Europe/London \ | |
-e URL=$2 \ |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>sleepy.caffeinate</string> | |
<key>LimitLoadToSessionType</key> | |
<array> | |
<string>Aqua</string> | |
<string>Background</string> |
from https://techviewleo.com/install-node-js-on-centos-linux/
-
Node.js packages are provided through the NodeSource Node.js Binary Distributions via .rpm. Add the repository to the system using the commands below:
curl -fsSL https://rpm.nodesource.com/setup_16.x | sudo bash -
-
Tencent OpenCloudOS is not in the supported list
from:https://blog.csdn.net/ithinking110/article/details/112028638
exception thrown: RuntimeError: float unrepresentable in integer range
NewerOlder