Skip to content

Instantly share code, notes, and snippets.

View Rhilip's full-sized avatar
👻
I may be slow to respond.

Rhilip Rhilip

👻
I may be slow to respond.
View GitHub Profile
@lzghzr
lzghzr / openstd.samr.gov.cn(原gb688)PDF文件载入流程.md
Last active September 7, 2023 07:03
openstd.samr.gov.cn(原gb688)PDF文件载入流程

0. 免责声明

没啥卵用, 但依然要说明一下, 本文未包含版权内容, 且未对所诉网站之程序进行破坏, 文章内容均为学习交流之用

1. 前言

2021年前, gb688 手机版使用的明文 pdf, 可直接下载, 不需要额外处理
2021年开始, 新站 openstd, 开始全面启用 pdf.js, 至此, 手机版也使用与 pc 同样加密技术
2022年4月, 网站弃用 pdf.js, 全面使用图片拼接模式, 本文内容已过时

2. 文件预览

openstd文件以两种方式开放给用户, 一种为直接下载, 另一种为在线预览

@denniskupec
denniskupec / gm_requests.js
Created October 28, 2017 06:21
GM_xmlhttpRequest + GM_download => Promises
// GM_download
function Download(url, name, opt={}) {
Object.assign(opt, { url, name })
return new Promise((resolve, reject) => {
opt.onerror = reject
opt.onload = resolve
GM_download(opt)
})
@littleya
littleya / delugeAutoDelete.py
Last active February 20, 2024 00:39
u2@share
# -*- coding:utf-8 -*-
# !/usr/bin/env python3
'''
Author: ayasakinagi
Email: xyz.wang@outlook.com
环境: Python3
依赖: deluge_client
使用: 修改host, port, username, password, limitSize, dataPath变量
@nimasdj
nimasdj / MimeTypes.php
Last active April 2, 2023 22:21
List of MimeTypes mapped to file extensions
<?php
// I made this array by joining all the following lists + .php extension which is missing in all of them.
// please contribute to this list to make it as accurate and complete as possible.
// https://gist.github.com/plasticbrain/3887245
// http://pastie.org/5668002
// http://pastebin.com/iuTy6K6d
// total: 1223 extensions as of 16 November 2015
$mime_types = array(
'3dm' => array('x-world/x-3dmf'),
'3dmf' => array('x-world/x-3dmf'),
@simonrw
simonrw / python_pymysql_notes.md
Created September 18, 2015 19:01
Notes about pymysql connections

Database transactions

pymysql

  • Defaults to autocommit=False
connection = pymysql.connect(user='user', db='test')
cursor = connection.cursor()
cursor.execute('insert into test (value) values (10)')
@todiadiyatmo
todiadiyatmo / nginx cloudflare
Last active January 21, 2020 22:24
nginx cloudflare
#CloudFlare
set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 104.16.0.0/12;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 162.158.0.0/15;
set_real_ip_from 172.64.0.0/13;
set_real_ip_from 173.245.48.0/20;
@gschora
gschora / configure_apcupsd
Last active April 4, 2024 11:33
configuring apcupsd to suspend all running VM and then shutdown the esxi 5.5 u1 host
###############################################################################################################
# these are instructions for automating the suspend and shutdown of esxi vm's and host in case of a
# power failure.
# works with apc smartups 750xl and esxi 5.5u1
###############################################################################################################
0# make a new VM and install Ubuntu-Server on it
1# install apcupsd
apt-get install apcupsd
@tott
tott / ip_in_range.php
Created November 27, 2013 22:46
php check if IP is in given network range
/**
* Check if a given ip is in a network
* @param string $ip IP to check in IPV4 format eg. 127.0.0.1
* @param string $range IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 is accepted and /32 assumed
* @return boolean true if the ip is in this range / false if not.
*/
function ip_in_range( $ip, $range ) {
if ( strpos( $range, '/' ) == false ) {
$range .= '/32';
}
@adamloving
adamloving / temporary-email-address-domains
Last active May 18, 2024 23:14
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com