Skip to content

Instantly share code, notes, and snippets.

View supersonictw's full-sized avatar
🦋

不知火 Shiranui supersonictw

🦋
View GitHub Profile
@supersonictw
supersonictw / cloudflared-openrc.conf
Last active February 7, 2025 18:35
CloudFlared OpenRC for Alpine Linux wget -O - https://ncurl.xyz/s/nUqux-KNg | sh
#!/sbin/openrc-run
# CloudFlared OpenRC for Alpine Linux
# https://github.com/cloudflare/cloudflared
# SPDX-License-Identifier: Apache-2.0
cloudflare_token="YOUR_TOKEN_HERE"
@supersonictw
supersonictw / wails-ci.yml
Last active January 20, 2025 08:48
Continuous Integration for Wails.io
# Continuous Integration for Wails.io
# SPDX-License-Identifier: MIT (https://ncurl.xyz/s/o_o6DVqIR)
name: Continuous Integration for Wails.io
on:
push:
branches:
- main
@supersonictw
supersonictw / daily_tasks.sh
Last active December 15, 2024 08:18
Execute daily tasks and sends a notification upon successful completion.
#!/bin/sh
# daily_tasks.sh - Execute daily tasks and sends a notification upon successful completion.
# SPDX-License-Identifier: MIT (https://ncurl.xyz/s/o_o6DVqIR)
# https://gist.github.com/supersonictw/ef01b51032cff6299246abe02de04099
# crontab -e
# 0 3 * * * sh /somewhere/daily_tasks.sh >/dev/null 2>&1 # execute silently at 3 a.m every day
NOTIFY() {
DATE_NOW="$(date)"
@supersonictw
supersonictw / install-nomad-openrc.sh
Last active December 1, 2024 13:40
Nomad OpenRC from Alpine Linux 3.17 wget -O - https://ncurl.xyz/s/HbaXC_7NR | sh -
#!/bin/sh
# install-nomad-openrc.sh
# SPDX-License-Identifier: MIT (https://ncurl.xyz/s/o_o6DVqIR)
wget -O "/etc/conf.d/nomad" "https://ncurl.xyz/s/ymx8l_nHg"
wget -O "/etc/init.d/nomad" "https://ncurl.xyz/s/G1Vsr_7NR"
chown root:root "/etc/conf.d/nomad" "/etc/init.d/nomad"
chmod +x "/etc/init.d/nomad"
@supersonictw
supersonictw / consul-openc.conf
Last active December 1, 2024 13:40
Consul OpenRC from Alpine Linux 3.17 wget -O - https://ncurl.xyz/s/9ksu-kVNR | sh -
# Consul OpenRC from Alpine Linux 3.17
# SPDX-License-Identifier: MPL-2.0
# https://pkgs.alpinelinux.org/package/v3.17/community/x86/consul-openrc
# /etc/conf.d/consul
# Consul startup
consul_opts="agent -config-dir=/etc/consul.d"
@supersonictw
supersonictw / _yb-cluster.md
Last active November 26, 2024 00:42
The powerful YugabyteDB systemd files for building bare metal cluster.

YugabyteDB cluster by bare metal

YugabyteDB is a high-performance transactional distributed SQL database.

TODO: add description and usage

@supersonictw
supersonictw / yugabyted.service
Last active November 26, 2024 00:42
The simplest YugabyteDB single host systemd file. https://docs.yugabyte.com/stable/quick-start
[Install]
WantedBy=multi-user.target
[Unit]
Description=YugabyteDB is a high-performance transactional distributed SQL database.
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
@supersonictw
supersonictw / nginx.conf
Last active December 12, 2024 08:53
Easy OpenAI reverse proxy gateway
# nginx.conf - Easy OpenAI reverse proxy gateway
# SPDX-License-Identifier: MIT (https://ncurl.xyz/s/o_o6DVqIR)
limit_req_zone $binary_remote_addr zone=ai_trial:1m rate=5r/s;
server {
# TODO: your server conf
location /ai/openai/ {
include proxy_params;
#!/bin/bash
# cloudflare_nginx_ip.sh
# SPDX-License-Identifier: MIT (https://ncurl.xyz/s/o_o6DVqIR)
# https://gist.github.com/supersonictw/2d19d98da8a4845c22c7cadb7ea02d38
# crontab -e
# 0 3 * * * /somewhere/cloudflare_nginx_ip.sh # update at 3 a.m every day
set -e
#!/bin/bash
# auto_x11vnc.sh
# SPDX-License-Identifier: MIT (https://ncurl.xyz/s/o_o6DVqIR)
# https://gist.github.com/supersonictw/14dc3cfc0c82b7c9cf430ad33d0a12da
SUDO=''
if [ "$EUID" != 0 ]; then
SUDO='sudo'
fi