Skip to content

Instantly share code, notes, and snippets.

View 0neday's full-sized avatar
🤭
I may be slow to respond.

COOLSTAR 0neday

🤭
I may be slow to respond.
View GitHub Profile
@0neday
0neday / tomcat init script
Last active May 21, 2017 02:53 — forked from miglen/Apache Tomcat 8 Start stop script init.d script
Apache Tomcat init script (or startup/controll script). Works fine for version 7/8. Read the comments for release history. Feel free to modify, copy and give suggestions. (c) GNU General Public License
#!/bin/bash
#
# description: Apache Tomcat init script
# processname: tomcat
# chkconfig: 234 20 80
#
#
# Copyright (C) 2014 Miglen Evlogiev
#
# This program is free software: you can redistribute it and/or modify it under
keytool -genkey -alias lyuap -keyalg RSA -keypass changeit -storepass changeit -keystore lyuap.keystore -keysize 2048 -validity 3600
keytool -export -alias lyuap -keystore lyuap.keystore -file lyuap.crt
keytool -import -alias lyuap -file lyuap.crt -keystore cacerts
从jks导出私钥为pkcs12格式:
@0neday
0neday / nginx init srcript
Last active May 24, 2017 07:45
nginx configuration
#!/bin/bash
#
# nginx - this script starts and stops the nginx daemon
#
# chkconfig: - 85 15
# description: NGINX is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /etc/nginx/nginx.conf
# config: /etc/sysconfig/nginx
$ . /usr/local/bin/oraenv
$ sqlplus /nolog
sql> connect sys/passwd as sysdba
sql> startup
sql> exit
@0neday
0neday / let-netflix-play-on-vultr.sh
Last active November 8, 2021 18:28
If you have a sharing ss-server which is not running sniproxy, you could use this method to let your vultr vps play netflix.
#### for shadowsocks-libev 2.3.6 +, using ipset
# set in dnsmasq.conf
ipset=/fast.com/netflix
ipset=/nflxext.com/netflix
ipset=/nflximg.com/netflix
ipset=/nflximg.net/netflix
ipset=/nflxso.net/netflix
ipset=/nflxvideo.net/netflix
ipset=/nflxvideo.net/netflix
@0neday
0neday / ss-libev-aarch64.sh
Last active November 24, 2023 11:20
cross build shadowsocks-libev arm static binary using bootlin toolchains.
#!/bin/bash
set -e
set -x
BASE=`pwd`
########### #################################################################
# zlib # ####################################################################
########### #################################################################
wget -c https://zlib.net/zlib-1.2.11.tar.gz
@0neday
0neday / stunnel-aarch64.sh
Last active January 4, 2024 14:37
Cross compile statically stunnel for aarch64
### just for arm64
````
BASE=`pwd`
## cross-compile toolchain
git clone https://github.com/0neday/buildroot
cd buildroot
make menuconfig
### select aarch64 and enable ssp , c++ support
make -j$(nproc) toolchain
@0neday
0neday / client.conf
Created April 13, 2021 02:49
stunnel configuration
setuid = root
setgid = root
pid = /var/run/stunnel.pid
;debug = debug
;output = /tmp/stunnel.log
verifyPeer = yes
checkHost = yourdomain.com
sni = yourdomain.com
@0neday
0neday / _shadowsocks-libev-for-lxc.sh
Created July 11, 2021 03:49
start shadowsocks on hs8145x6 lxc contianer
#!/bin/sh
SS_CONFIG_FILE=/mnt/jffs2/hw/ss.json
SS_REDIR_BIN=/mnt/jffs2/app/shadowsocks-libev-2.6.3/ss-redir
SS_TUNNEL_BIN=/mnt/jffs2/app/shadowsocks-libev-2.6.3/ss-tunnel
GFW_FILE_PATH=/mnt/jffs2/hw/etc/gfw-nat
IPTABLES_BIN=/mnt/jffs2/plug/app/bin/iptables
IPTABLES_RESTORE_BIN=/mnt/jffs2/plug/app/bin/iptables-restore
DNSFORWARD_BIN=/mnt/jffs2/plug/app/bin/dns-forwarder
SERVER_IP=`cat $SS_CONFIG_FILE |grep '"server"' | awk -F '"' '{print $4}'`
@0neday
0neday / cloudflare-update-record.sh
Last active February 2, 2023 02:56 — forked from benkulbertis/cloudflare-update-record.sh
Cloudflare API v4 and v6 Dynamic DNS Update in Bash
#!/bin/sh
#BIN_DIR=
BIN_DIR=/mnt/jffs2/plug/app/busybox
export PATH=$BIN_DIR/bin:$BIN_DIR/sbin:$BIN_DIR/usr/bin:$BIN_DIR/usr/sbin
#set -x
# cloudflare api
AUTH_EMAIL=""