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
package com.htdocscat.disablehw; | |
import android.os.IBinder; | |
import android.os.Parcel; | |
import de.robv.android.xposed.IXposedHookLoadPackage; | |
import de.robv.android.xposed.XposedBridge; | |
import de.robv.android.xposed.XposedHelpers; | |
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam; |
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
private long getTotalRxBytes() { | |
String line; | |
String[] segs; | |
long received = 0; | |
int i; | |
long tmp = 0; | |
boolean isNum; | |
try { | |
FileReader fr = new FileReader("/proc/net/dev"); | |
BufferedReader in = new BufferedReader(fr); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// Generated by CoffeeScript 1.7.1 | |
(function() { | |
var app, fs, gate, genBgList, genFgList, okay, _; | |
app = angular.module('MyApp', ['ui.router', 'ngProgress']); | |
fs = require('fs-extra'); | |
_ = require('lodash'); |
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
i=582326 | |
while : | |
do | |
wget --user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36" -e robots=off --content-disposition --referer="http://www.nyaa.se/" --restrict-file-name=nocontrol "http://www.nyaa.se/?page=download&tid=$i" | |
i=$((i-1)) | |
done |
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
// Generated by CoffeeScript 1.7.1 | |
(function() { | |
var async, fs, i, q, request, start, wait, _fn, _i; | |
wait = require('wait.for'); | |
request = require('request'); | |
async = require('async'); |
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
fs = require 'fs' | |
_ = require 'lodash' | |
hl = require 'highland' | |
async = require 'async' | |
readline = require 'readline' | |
BSON = require("bson").BSONPure.BSON | |
tz = require 'timezone' | |
zlib = require 'zlib' |
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
import os, math | |
import numpy as np | |
#from matplotlib import pyplot as plt | |
import cv2 | |
img = cv2.resize(cv2.imread('img.jpg',1), (0,0), fx=0.5, fy=0.5) | |
def sort_cw(points): | |
points = sorted(points,key=lambda cnt: cnt[0][0]) | |
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
// Create a random ID for this session. | |
var sessionId = String.fromCharCode(Date.now() % 25 + 97) + | |
Math.random().toString(36).slice(2); // From uBlock | |
var port = chrome.runtime.connect({name: sessionId}), | |
channels = [], | |
// For receiving responses. | |
resp = new require('events').EventEmitter(); | |
class Channel { |
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
async getPages(){ | |
// 由于API权限不足,无法获取R-18作品数据(即使已经登录且设置允许R-18) | |
// 暂时不使用API方式,改用DOM + AJAX | |
var pages = []; | |
if ($('._illust_modal').length !== 0) { | |
// 对于单张图片,可以直接在页面上的._illust_modal当中找到URL | |
let url = $('.original-image').data('src'); | |
pages.push(url); | |
} else if ($('._ugoku-illust-player-container').length !== 0) { | |
// Ugoira(动图) |
OlderNewer