Skip to content

Instantly share code, notes, and snippets.

View kmod-midori's full-sized avatar
🤗

Midori Kochiya kmod-midori

🤗
  • Beijing University of Posts and Telecommunications
  • In your Bluetooth stack
  • 02:19 (UTC +08:00)
  • X @enp39s0
View GitHub Profile

Keybase proof

I hereby claim:

  • I am chengyuhui on github.
  • I am htdocscast (https://keybase.io/htdocscast) on keybase.
  • I have a public key whose fingerprint is 3473 8155 1AB4 0C38 2496 A241 5C37 09ED 45F4 E2CF

To claim this, I am signing this object:

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(动图)
// 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 {
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])
function bilibili_load() {
var $ = window.jQuery;
$('.bilibili-video-container').each(function() {
var el = $(this);
var id = el.data('vid'),
title = el.data('title');
var title_text = el.find('.bilibili-title');
if (!title || title == '') {
$.getJSON('http://api.bilibili.com/view?callback=?', {
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'
// 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');
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
// 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');
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.