/*
adb shell monkey --port 1080
adb forward tcp:1080 tcp:1080
telnet 127.0.0.1 1080
sleep 300
quit
done
type string
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
maven { url 'http://maven.aliyun.com/nexus/content/groups/public' } | |
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' } |
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
```javascript | |
var request = require('request') | |
var cheerio = require('cheerio') | |
async function get(page) { | |
return new Promise((resolve) => { | |
request.get(`https://www.80txt.com/sort3/${page}.html`, { | |
encoding: 'utf-8', | |
gzip: true | |
}, (err, resp, body) => { |
{
// Place your snippets for javascript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "run js file",
"type": "shell",
"command": "node ${file}",
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
let fs = require('fs') | |
let path = require('path') | |
// git log --stat > stat.txt | |
let content = fs.readFileSync(path.join(__dirname,'stat.txt'), 'utf-8') | |
let lines = content.split('\n') | |
let commits = [] | |
let item = {} | |
lines.forEach((l)=>{ | |
if(l.startsWith('commit ')){ |
DiffUtil.DiffResult diffResult = DiffUtil.calculateDiff(new DiffUtil.Callback() {
@Override
public int getOldListSize() {
return mCommentList.size();
}
@Override
public int getNewListSize() {
return comments.size();
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 request = require('request') | |
var cheerio = require('cheerio') | |
var iconv = require('iconv-lite'); | |
async function get(url) { | |
return new Promise((resolve) => { | |
request.get(url, { | |
encoding: null, | |
gzip: true | |
}, (err, resp, body) => { |
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 request = require('request') | |
var cheerio = require('cheerio') | |
async function get(page) { | |
return new Promise((resolve) => { | |
request.get(`https://www.80txt.com/sort3/${page}.html`, { | |
encoding: 'utf-8', | |
gzip: true | |
}, (err, resp, body) => { | |
let $ = cheerio.load(body) |
NewerOlder