This file contains hidden or 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
// ==UserScript== | |
// @name 剑灵怀旧服新闻中心新闻按时间重排序 | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0.0 | |
// @description 剑灵怀旧服新闻中心新闻按时间重排序 | |
// @author itning | |
// @match https://bns.qq.com/webplat/info/news_version3/1298/61649/m22759/list_1.shtml | |
// @icon https://bns.qq.com/favicon.ico | |
// @grant none | |
// @downloadURL https://gist.githubusercontent.com/itning/bba99a246f9137b553abb58404b90ada/raw/65cac9eb04fdac80c4013a0a8b92a6181b64b985/reset.js |
This file contains hidden or 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
docker run -p 2181:2181 -p 2888:2888 -p 3888:3888 --name some-zookeeper --restart always -d zookeeper:3.6.2 | |
docker run -d --net=host \ | |
--hostname=192.168.66.3 \ | |
-e MESOS_PORT=5050 \ | |
-e MESOS_ZK=zk://192.168.66.3:2181/mesos \ | |
-e MESOS_QUORUM=1 \ | |
-e MESOS_REGISTRY=in_memory \ | |
-e MESOS_LOG_DIR=/var/log/mesos \ | |
-e MESOS_WORK_DIR=/var/tmp/mesos \ |
This file contains hidden or 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
Google: http://www.gstatic.com/generate_204 / http://maps.google.com/generate_204 / http://mt0.google.com/generate_204 / http://mt1.google.com/generate_204 / http://mt2.google.com/generate_204 / http://mt3.google.com/generate_204 / http://clients3.google.com/generate_204 / ... | |
V2ex: https://www.v2ex.com/generate_204 (不建议使用,因为只支持 https,不支持 http,连接相对耗费资源,对于 wifi 需要跳转认证的情况支持页不好) | |
小米: http://connect.rom.miui.com/generate_204 | |
华为: http://connectivitycheck.platform.hicloud.com/generate_204 | |
Vivo: http://wifi.vivo.com.cn/generate_204 |
This file contains hidden or 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
/* | |
方案一: | |
来自 https://www.zhihu.com/question/381784377/answer/1099438784 | |
*/ | |
var table = "fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF", | |
tr = new Object(); | |
for (var i = 0; i < 58; i++) { | |
tr[table[i]] = i; | |
} | |
var s = [11, 10, 3, 8, 4, 6], |
This file contains hidden or 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
"auto"; | |
//保证屏幕1080x1920 | |
setScreenMetrics(1080, 1920); | |
/** | |
* 随机数生成函数 | |
* @param {*} min 最小 | |
* @param {*} max 最大 | |
*/ | |
function random(min, max) { | |
return parseInt(Math.random() * (max - min + 1) + min, 10); |
This file contains hidden or 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
#!/usr/bin/python | |
# -*- coding: UTF-8 -*- | |
username = input('请输入用户名:') | |
repositories = input('请输入项目名:') | |
language = input('请输入项目语言:') | |
file = open('./README.md', mode='w') | |
ic_line1 = [ | |
'[](https://github.com/{username}/{repositories}/stargazers)', |
This file contains hidden or 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
private const string CmdPath = @"C:\Windows\System32\cmd.exe"; | |
private static void RunCmd(string cmd, out string output) | |
{ | |
cmd = cmd.Trim().TrimEnd('&') + "&exit"; //说明:不管命令是否成功均执行exit命令,否则当调用ReadToEnd()方法时,会处于假死状态 | |
using (var p = new Process()) | |
{ | |
p.StartInfo.FileName = CmdPath; | |
p.StartInfo.UseShellExecute = false; //是否使用操作系统shell启动 | |
p.StartInfo.RedirectStandardInput = true; //接受来自调用程序的输入信息 | |
p.StartInfo.RedirectStandardOutput = true; //由调用程序获取输出信息 |
This file contains hidden or 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
private final Handler handler = new Handler(Looper.getMainLooper(), msg -> { | |
switch (msg.what) { | |
case CHECK_UP_HANDER_OK_MSG: { | |
checkPackageUpdate(); | |
return true; | |
} | |
case CHECK_UP_HANDER_ERR_MSG: { | |
Snackbar.make(tvversion, "检查更新失败,请检查网络!", Snackbar.LENGTH_LONG) | |
.addCallback(new BaseTransientBottomBar.BaseCallback<Snackbar>() { | |
@Override |
This file contains hidden or 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
import android.Manifest; | |
import android.os.Build; | |
/** | |
* @author itning | |
*/ | |
public final class Permission { | |
/** | |
* 日历 | |
*/ |
This file contains hidden or 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
// Android 8.0 上不限制的隐式广播 | |
/** | |
开机广播 | |
Intent.ACTION_LOCKED_BOOT_COMPLETED | |
Intent.ACTION_BOOT_COMPLETED | |
*/ | |
"保留原因:这些广播只在首次启动时发送一次,并且许多应用都需要接收此广播以便进行作业、闹铃等事项的安排。" | |
/** | |
增删用户 |
NewerOlder