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
const Zone = { | |
_currentZone: {}, | |
get current() { | |
return { | |
...this._currentZone, | |
fork: (zone) => { | |
this._currentZone = { | |
...this._currentZone, | |
...zone, | |
}; |
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
const { | |
executionAsyncId, | |
createHook, | |
} = require("async_hooks"); | |
const { writeSync: fsWrite } = require("fs"); | |
const log = (...args) => fsWrite(1, `${args.join(" ")}\n`); | |
const Storage = {}; | |
Storage[executionAsyncId()] = {}; |
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
// ==UserScript== | |
// @name Privatter Nopassword | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://privatter.net/* | |
// @grant none | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name 完成种子显示做种人数 | |
// @namespace com.xingoxu | |
// @version 0.1 | |
// @author xingo | |
// @include /^https:\/\/u2.dmhy.org\/userdetails.php/ | |
// @grant none | |
// ==/UserScript== | |
ajax.update = function (url, elm) { |
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
Array.prototype.shuffle = function shuffle() { | |
for (let i = 0; i < this.length; i++){ | |
let randomI = Math.floor(Math.random() * (this.length - i)) + i; | |
let temp = this[i]; | |
this[i] = this[randomI]; | |
this[randomI] = temp; | |
} | |
return this; | |
} |
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/sh | |
# cross & static compile shadowsocks-libev | |
PCRE_VER=8.40 | |
PCRE_FILE="http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-$PCRE_VER.tar.gz" | |
MBEDTLS_VER=2.4.2 | |
MBEDTLS_FILE="https://tls.mbed.org/download/mbedtls-$MBEDTLS_VER-gpl.tgz" |
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
/** | |
* Created by xingo on 2017/03/06. | |
*/ | |
let httpClient = require('request'); | |
let domEnv = require('jsdom').env, | |
jQInit = require('jquery'); | |
function fetchTimeline(username, page) { | |
return new Promise((resolve, reject) => { | |
httpClient.get({ |
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
/** | |
* Created by xingo on 2017/03/06. | |
*/ | |
let httpClient = require('request'); | |
function fetchPage(username) { | |
return new Promise((resolve, reject) => { | |
httpClient.get({ | |
url: `https://github.com/${username}`, |
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 webpack = require('webpack'); | |
const webpackConfig = { | |
entry: './app.js', | |
output: { | |
filename: 'bundle.js', | |
path: './' | |
}, | |
module: { | |
rules: [ |