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
{ | |
//于CSScomb for sublime配置,根据 mozilla 官方推荐的CSS书写顺序整理而成,请根据实际IDE和构建config自定义配置 | |
//参考: https://www.mozilla.org/css/base/content.css | |
// | |
// If plugin has trouble finding Node.js, replace this string with path | |
// to your `node` bin | |
"node-path" : ":/usr/local/bin", | |
// Full list of supported options and acceptable values can be found here: | |
// https://github.com/csscomb/csscomb.js/blob/master/doc/options.md |
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 | |
#by luolei 方便快捷登录到指定服务器 | |
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/root/bin | |
clear | |
serverListStore=/Users/yuewen-luolei/Desktop/all | |
serverListGen=/Users/yuewen-luolei/Desktop/.server_list | |
> $serverListGen | |
Num=1 | |
function main(){ |
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 | |
# 服务端 ss 进程watch | |
# crontab监控: * * * * * /data/runtime/watchSS.sh | |
PORT=8388 | |
if lsof -Pi :$PORT -sTCP:LISTEN -t >/dev/null ; then | |
echo '[SS] shadowsocks is running' | |
else | |
echo '[SS] shadowsocks is down' | |
ssserver -p 8388 -k luolei -m aes-256-cfb -d start |
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 | |
#by luolei 快速启动ngrok穿透 | |
pushd `dirname $0` > /dev/null | |
SCRIPTPATH=`pwd -P` #设置当前路径 | |
popd > /dev/null | |
online='.pub.is26.com' | |
domain=$1 | |
port=$2 |
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 | |
# Author luolei | |
# Updated 2017-09-25 | |
LOGFILE=/data/logs/ars/ars_preclean.log | |
ZERO=`date +%s%N` | |
echo '====================' >> $LOGFILE | |
echo 'Start the preclean process ...' >> $LOGFILE | |
echo 'Param: ' $1 >> $LOGFILE |
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
var cheerio = require('cheerio'); | |
var http = require('http'); | |
var iconv = require('iconv-lite'); | |
var express = require('express'); | |
var app = express(); | |
app.get('/api/baidu/:keyword', function(req, res) { | |
var keyword = req.param('keyword'); | |
var encodeKey = encodeURIComponent(keyword); | |
var url = 'http://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=0&rsv_idx=1&tn=baidu&wd=' + encodeKey + '&rsv_pq=d1bc678500027fae&rsv_t=b1baqnanzIu6%2B%2B6jgA5UgJY9hPGjPUfG2I03drYiQCZLKs41hn1TBNqN2tg&rqlang=cn&rsv_enter=1&rsv_sug3=14&rsv_sug1=13&rsv_sug7=100&rsv_sug2=0&inputT=1230&rsv_sug4=1231' |
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
curl -w " \ntime_namelookup:%{time_namelookup}\ntime_connect: %{time_connect}\ntime_appconnect: %{time_appconnect}\ntime_redirect: %{time_redirect}\ntime_pretransfer: %{time_pretransfer}\ntime_starttransfer: %{time_starttransfer}\n----------\ntime_total: %{time_total}\n" -o /dev/null -s -L "https://www.google.com" |
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
server { | |
listen 80; | |
listen 443 ssl http2; | |
server_name demo.domain.com; | |
index index.php index.html index.htm default.php default.htm default.html; | |
root /www/wwwroot/demo.domain.com; | |
recursive_error_pages on; | |
proxy_intercept_errors on; |
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 | |
# 配合定时脚本使用 | |
# 订阅后台接口,建议自己搭建,参考 https://github.com/tindy2013/subconverter | |
SERVER_API_URL="https://any.sub.domain/subconver" | |
# 输出的目录位置, nginx 解析目录 | |
OUTPUT_FOLDER="/www/wwwroot/sub.domain.com" | |
# bark 推动提醒地址 |
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 | |
# 记录日志时间 | |
log_time=$(TZ=UTC-8 date +"%Y-%m-%d-%H:%M:%S") | |
log_dir="/www/wwwlogs/" | |
server_name="DHCP" | |
# 获取 ens192 网卡对应的 IP 地址和子网掩码 | |
ipaddr=$(ip addr show ens192 | grep -w inet | awk '{print $2}') | |
netmask=$(ip addr show ens192 | grep -w inet | awk '{print $2}' | awk -F '/' '{print $2}') | |
# 判断 IP 地址是否为局域网 IPV4 地址(以 10.x.x.x、172.16.x.x 至 172.31.x.x、192.168.x.x 开头) |