Skip to content

Instantly share code, notes, and snippets.

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 — 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
View tomcat init script
#!/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
View java crt
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格式:
View oracle reboot
$ . /usr/local/bin/oraenv
$ sqlplus /nolog
sql> connect sys/passwd as sysdba
sql> startup
sql> exit
@0neday
0neday / nginx init srcript
Last active May 24, 2017
nginx configuration
View nginx init srcript
#!/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
@0neday
0neday / client.conf
Created Apr 13, 2021
stunnel configuration
View client.conf
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 Jul 11, 2021
start shadowsocks on hs8145x6 lxc contianer
View _shadowsocks-libev-for-lxc.sh
#!/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 / block_douyin.conf
Created Sep 30, 2021
block douyin hosts
View block_douyin.conf
# douyin
address=/douyinvod.com/0.0.0.0
address=/ixigua.com/0.0.0.0
address=/douyinpic.com/0.0.0.0
address=/snssdk.com/0.0.0.0
address=/huoshanstatic.com/0.0.0.0
address=/amemv.com/0.0.0.0
address=/douyincdn.com/0.0.0.0
address=/pstatp.com/0.0.0.0
@0neday
0neday / vultr_ddns.sh
Created Oct 2, 2021
vultr api v2 ddns shell scripts
View vultr_ddns.sh
#!/bin/bash
BIN_DIR=/mnt/jffs2/plug/app/busybox
export PATH=$BIN_DIR/bin:$BIN_DIR/sbin:$BIN_DIR/usr/bin:$BIN_DIR/usr/sbin
DOMAIN=''
NAME=''
APIKEY=''
CAFILE="/mnt/jffs2/hw/etc/ssl/certs/ca-certificates.crt"
CURL_BIN="/mnt/jffs2/plug/app/bin/curl"
@0neday
0neday / let-netflix-play-on-vultr.sh
Last active Nov 8, 2021
If you have a sharing ss-server which is not running sniproxy, you could use this method to let your vultr vps play netflix.
View let-netflix-play-on-vultr.sh
#### 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 Jan 12, 2022
cross build shadowsocks-libev arm static binary using bootlin toolchains.
View ss-libev-aarch64.sh
#!/bin/bash
set -e
set -x
BASE=`pwd`
########### #################################################################
# zlib # ####################################################################
########### #################################################################
wget -c https://zlib.net/zlib-1.2.11.tar.gz