Skip to content

Instantly share code, notes, and snippets.

View 5aaee9's full-sized avatar
🌏
Alive

5aaee9 5aaee9

🌏
Alive
View GitHub Profile
Feb 12 16:53:46 laptop systemd[2925]: fcitx5-daemon.service: Consumed 1.492s CPU time.
Feb 12 16:54:00 laptop systemd[2925]: Started fcitx5-daemon.service.
Feb 12 16:54:00 laptop fcitx5-daemon-start[5729]: I2022-02-12 16:54:00.024048 instance.cpp:1404] Override Enabled Addons: {}
Feb 12 16:54:00 laptop fcitx5-daemon-start[5729]: I2022-02-12 16:54:00.024091 instance.cpp:1405] Override Disabled Addons: {}
Feb 12 16:54:00 laptop fcitx5-daemon-start[5729]: I2022-02-12 16:54:00.025906 addonmanager.cpp:191] Loaded addon wayland
Feb 12 16:54:00 laptop fcitx5-daemon-start[5729]: I2022-02-12 16:54:00.027866 addonmanager.cpp:191] Loaded addon xcb
Feb 12 16:54:00 laptop fcitx5-daemon-start[5729]: I2022-02-12 16:54:00.029231 addonmanager.cpp:191] Loaded addon quickphrase
Feb 12 16:54:00 laptop fcitx5-daemon-start[5729]: I2022-02-12 16:54:00.029656 addonmanager.cpp:191] Loaded addon clipboard
Feb 12 16:54:00 laptop fcitx5-daemon-start[5729]: I2022-02-12 16:54:00.029795 addonmanager.cpp:191] Loaded addon unicode
Feb 12 16:
"""
Hetzner server rescue reinstall script
pip3 install fire==0.3.1
pip3 install paramiko==2.7.1
pip3 install lxml==4.5.1
"""
import requests
from lxml import html, etree
#!/bin/sh
for i in `seq 0 1`; do
ip link add link eth0.2 name vth$i type macvlan
ifconfig vth$i up
done
sleep 5
for i in `seq 0 1`; do
IP=`ifconfig | grep -A1 'vth'$i | grep inet | awk '{print $2}' | awk -F : '{print $2}'`
echo "IP addr: "$IP
const fs = require('fs')
const localPrefix = 'omnifactory.quest.'
const data = JSON.parse(fs.readFileSync('DefaultQuests.json').toString())
function editKey(dbName, keyName) {
const r = []
const db = data[dbName]
const keys = Object.keys(db)
@5aaee9
5aaee9 / install.sh
Last active March 26, 2020 12:31
Install sspanel
# export DB_PASS="P@55w0rD" # 数据库密码
read -p "输入 数据库密码: " DB_PASS
curl -sSL get.docker.com | bash
systemctl enable --now docker
docker volume create mariadb
docker run \
    --name database -d \
    -e MYSQL_ROOT_PASSWORD=$DB_PASS \
    -v mariadb:/var/lib/mysql \
starship init fish | source
0.0.0.0 v1-dy.ixigua.com
0.0.0.0 v2-dy.ixigua.com
0.0.0.0 v3-dy.ixigua.com
0.0.0.0 v4-dy.ixigua.com
0.0.0.0 v5-dy.ixigua.com
0.0.0.0 v6-dy.ixigua.com
0.0.0.0 v7-dy.ixigua.com
0.0.0.0 v8-dy.ixigua.com
0.0.0.0 v9-dy.ixigua.com
0.0.0.0 v1.pstatp.com
@5aaee9
5aaee9 / surge.d.ts
Created October 31, 2019 15:02
NSS Surge Type Define
/**
* Surge utils class
**/
declare class $utils {
/**
* Perform a GeoIP lookup. Results are in ISO 3166 code.
*
* @param ip the ip that you want to query
*/
static geoip(ip: string): string
@5aaee9
5aaee9 / k3s.sh
Created April 26, 2019 15:34
Rancher k3s with Alpine Linux
#!/bin/sh
@5aaee9
5aaee9 / cilium.yaml
Created April 15, 2019 08:59
cilium-in-k3s
---
apiVersion: v1
kind: ConfigMap
metadata:
name: cilium-config
namespace: kube-system
data:
# This etcd-config contains the etcd endpoints of your cluster. If you use
# TLS please make sure you follow the tutorial in https://cilium.link/etcd-config
etcd-config: |-