Skip to content

Instantly share code, notes, and snippets.

@joeshub
joeshub / ST3-with-iCloud-Drive.sh
Last active May 17, 2023 05:20
Sync your Sublime Text 3 Settings using iCloud Drive on multiple Macs
# Notes
# Using iCloud Drive, you can sync your Sublime Text 3
# plugins and prefs so you can always have the same setup
# Prerequisites
# Make sure both machines have the latest version of OSX 10.10.x with
# Yosemite or higher and iCloud Drive turned on
# Quit ST3
@yaci
yaci / google-drive-md5-checksum
Last active May 31, 2024 15:50
List google drive md5 checksum for all files
#!/usr/bin/python3
"""
!! IMPORTANT !!
!! READ THIS !!
In order to run this script you need python3 and pip3 installed.
You also need some additional python modules. Please run
sudo pip3 install httplib2 oauth2client
sudo pip3 install --upgrade google-api-python-client
NetLimiter 3
Registration name: Peter Raheli
Registration code: C99A2-QSSUD-2CSBG-TSRPN-A2BEB
NetLimiter 4
Registration Name: Vladimir Putin #2
Registration Code: XLEVD-PNASB-6A3BD-Z72GJ-SPAH7
https://www.netlimiter.com/download
# Netlimiter Full Netlimiter Activated Netlimiter cracked Netlimiter Full Version Netlimiter Serial Netlimiter keygen Netlimiter crack Netlimiter 4 serial Netlimiter 4 Crack Netlimiter 4 register Netlimiter 4 patch Netlimiter full Full version Netlimiter 4 Activated Netlimiter 4 Cracked Netlimiter Pro
@fireattack
fireattack / DumpAZW6_py3.py
Last active April 3, 2024 08:01
Py3 version
#!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
import sys
import os, getopt, struct
import imghdr
def get_image_type(imgname, imgdata=None):
imgtype = imghdr.what(imgname, imgdata)
@gzxu
gzxu / QuickXorHash.rs
Last active June 15, 2022 07:41
Implementing the QuickXorHash Algorithm used by the Microsoft Graph API on OneDrive for Business
use std::env;
use std::fs;
// extern crate base64;
// From the specification
// https://docs.microsoft.com/en-us/onedrive/developer/code-snippets/quickxorhash
// According to the spec, the block is "big-endian"
type Block = [u8; 20]; // Intrinsically with Copy trait
@banyudu
banyudu / free-docker-space-in-wsl2.blog.md
Last active July 19, 2024 07:02
WSL2 Docker释放磁盘空间

WSL2 Docker释放磁盘空间

Docker使用久了,会残留很多中间生成的镜像,占用磁盘空间。

要清理Docker镜像,本来是挺简单的,一条命令就搞定了:

@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文件以两种方式开放给用户, 一种为直接下载, 另一种为在线预览

// https://op-prod-tr.ozan.com/api/(oauth/token\?grant_type=pre_verification|users/update-mobile-number)
const url = $request.url
var new_hdrs = {}
for (var k in $request.headers) {
new_hdrs[k.toLowerCase()] = $request.headers[k]
}
function main() {
if (url == 'https://op-prod-tr.ozan.com/api/oauth/token?grant_type=pre_verification') {
if (!($request.body.includes('mfa_code') && $request.body.includes('mfa_token'))) {