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/fish | |
for e in (go env | awk -F '=' '{ print $1 }') | |
go env -u $e | |
end |
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/fish | |
# thread nums | |
set num 10 | |
for i in (seq $num) | |
echo $num | |
end | xargs -L 1 -P $num sh -c '<command you want to run>' |
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/fish | |
switch (id -u) | |
case 0 | |
dnf install -y xmlstarlet | |
case "*" | |
sudo dnf install -y xmlstarlet | |
end | |
set goog_json (curl -sL https://www.gstatic.com/ipranges/goog.json | string collect) |
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
[Unit] | |
Description=Cleaning screenshot pictures | |
[Service] | |
Type=oneshot | |
# ExecStart=/usr/bin/find 'Pictures' -name 'Screenshot_[0-9]*_[0-9]*.png' -delete | |
ExecStart=/usr/bin/find '图片' -name 'Screenshot_[0-9]*_[0-9]*.png' -delete | |
[Install] | |
WantedBy=graphical.target |
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
module nginx 1.0; | |
require { | |
type unconfined_service_t; | |
type var_t; | |
type var_run_t; | |
type http_port_t; | |
type httpd_t; | |
class process setrlimit; |
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 | |
EXTRA_PACKAGES=${EXTRA_PACKAGES:-"tar wget vim rpmconf sudo bind-utils fish sshguard jq"} | |
NEW_SSH_PORT=${NEW_PORT:-"$(shuf -i 10000-65535 -n 1)"} | |
function check_package_management() { | |
if command -v dnf >/dev/null; then | |
echo "package management: dnf" | |
pm=dnf | |
pm_install='dnf -y install' |
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 | |
chown -R v2ray:v2ray /etc/letsencrypt/ && systemctl restart v2ray.service |
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 | |
if [ $UID != "0" ]; then | |
echo "ERROR: You must run this script as root!" | |
exit 1 | |
fi | |
dnf install \ | |
@development-tools \ | |
ImageMagick-devel \ | |
ImageMagick-c++-devel \ |