Skip to content

Instantly share code, notes, and snippets.

const musicNotify = () => {
const m = '/storage/emulated/0/Download/WeiXin/平凡之路.mp3'
media.playMusic(m);
sleep(media.getMusicDuration());
}
const to_mall_cart = () => {
shopping_cart_btn=id('img_shopping_cart').findOne()
@mischief1
mischief1 / brook crontab
Created July 2, 2020 23:08 — forked from ComeBey/brook crontab
CentOS7 brook crontab定时重启
一>校准时间同步本地时间
1.date -s "2019-09-21 19:00:38"
2.cp空格 /usr/share/zoneinfo/Asia/Shanghai 空格/etc/localtime
3.(一) yum -y install ntp ntpdate 安装ntpdate工具
(二) ntpdate cn.pool.ntp.org 设置系统时间与网络时间同步
(三) hwclock --systohc 将系统时间写入硬件时间
@mischief1
mischief1 / trojan-go-quickstart.sh
Created June 2, 2020 10:23 — forked from phlinhng/trojan-go-quickstart.sh
trojan-go-quickstart.sh
#!/bin/sh
echo "Getting the latest version of trojan-go"
latest_version="$(curl -s "https://api.github.com/repos/p4gefau1t/trojan-go/releases" | jq '.[0].tag_name' --raw-output)"
echo "${latest_version}"
trojango_link="https://github.com/p4gefau1t/trojan-go/releases/download/${latest_version}/trojan-go-linux-amd64.zip"
mkdir -p "/usr/bin/trojan-go"
mkdir -p "/etc/trojan-go"
@mischief1
mischief1 / a-v2ray-wss-cdn-without-proxy.md
Created June 2, 2020 10:23 — forked from phlinhng/a-v2ray-wss-cdn-without-proxy.md
v2ray wss不开cloudflare proxy套用cdn (让同一个域名既能直连也能通过cdn中转)

动机

在v2ray+ws+tls+web的情况下,不管cloudflare dns有没有开启云朵(proxy),都可以透过address填cf节点ip,ws头部host填域名的方式连接上v2Ray服务器。写这篇的目的是想测试在没有web的情况下使用同一招,让同一个域名既能直连也能通过cdn中转。

有web时的连接方法

地址: cloudflare.com (或1.1.1.1或任何cloudflare节点IP)
端口: web服务器的端口 (通常为443)
tls: 开
不安全连接: 不允许
混淆: websocket
@mischief1
mischief1 / Debian9 bbr
Created June 3, 2019 06:29 — forked from ComeBey/Debian9 bbr
Debian9 bbr
debian9 复制这条代码安装bbr加速如下:
方法一wget -N --no-check-certificate https://bit.ly/2VWUksq && chmod + hasan.sh && bash hasan.sh
备用代码:wget -N --no-check-certificate https://raw.githubusercontent.com/ComeBey/bbr/master/hasan.sh && chmod + hasan.sh && bash hasan.sh
第一步sudo -i
第二步.ubuntu/debian 系统安装 Curl 方法: apt-get update -y && apt-get install curl -y
第二步.(1).centos 系统安装 Curl 方法: yum update -y && yum install curl -y (2).yum install wget 下载wget工具
第三步.wget -N --no-check-certificate https://raw.githubusercontent.com/ComeBey/more-user-ssr/master/hasan.sh && chmod +x hasan.sh && bash hasan.sh
第四步:bash hasan.sh
@mischief1
mischief1 / v2ray 计划crontab
Created June 3, 2019 06:26 — forked from ComeBey/v2ray 计划crontab
v2ray定时重启服务crontab
以下同步时间选择其中一种,如果无法同步本地时间请google下(关键字centos7或者centos6或者debian时间同步本地时间等关键字)
方法一.校准时间同步本地时间 date -R 查看vps时间
sudo -i root权限进入
(一) yum -y install ntp ntpdate 安装ntpdate工具
(二) ntpdate cn.pool.ntp.org 设置系统时间与本地网络时间同步
(三) hwclock --systohc 将系统时间写入硬件时间
方法二.校准时间同步本地时间 date -R 查看vps时间
(1)yum install ntp //安装ntp服务
(2)systemctl enable ntpd //开机启动服务
@mischief1
mischief1 / ssr架设
Created June 3, 2019 06:26 — forked from ComeBey/ssr架设
ssr脚本架设
1. sudo -i
2. yum update 升级系统
4. curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" 下载pip
5. python get-pip.py 安装pip
6. pip install shadowsocks 安装ss
@mischief1
mischief1 / bbr.txt
Created June 3, 2019 06:25 — forked from ComeBey/bbr.txt
centos7 bbr
1、yum系统更新 yum update
---------------------
2、查看系统版本
cat /etc/redhat-release
输出如下则表示已升级到7.5或者更高版本
CentOS Linux release 7.5.1804 (Core)
---------------------
3、安装elrepo并升级内核
@mischief1
mischief1 / aria2_oneindex.md
Created December 12, 2018 08:55 — forked from hellokaton/aria2_oneindex.md
Aria2 + OneIndex 自动上传打造离线网盘

Aria2 + OneIndex 自动上传打造离线网盘

5ba334a75cd12

1. 安装 Nginx + PHP

yum -y install wget screen curl python git
wget http://mirrors.linuxeye.com/lnmp-full.tar.gz
tar xzf lnmp-full.tar.gz