Skip to content

Instantly share code, notes, and snippets.

View RebornQ's full-sized avatar
👨‍💻
Working from Company

Reborn RebornQ

👨‍💻
Working from Company
View GitHub Profile
@viko16
viko16 / wget.md
Last active December 9, 2024 06:28
wget下载整站

wget -r -p -np -k http://aaa.com/

  • -r, --recursive(递归) specify recursive download.(指定递归下载)
  • -k, --convert-links(转换链接) make links in downloaded HTML point to local files.(将下载的HTML页面中的链接转换为相对链接即本地链接)
  • -p, --page-requisites(页面必需元素) get all images, etc. needed to display HTML page.(下载所有的图片等页面显示所需的内容)
  • -np, --no-parent(不追溯至父级) don't ascend to the parent directory.
  • 另外断点续传用-nc参数 日志 用-o参数
Intent intent = new Intent(Intent.ACTION_VIEW);
ComponentName cn = new ComponentName("com.tencent.mm", "com.tencent.mm.plugin.base.stub.WXCustomSchemeEntryActivity");
intent.setData(Uri.parse("weixin://dl/moments"));
intent.setFlags(Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP);
intent.setComponent(cn);
startActivity(intent);
@yantze
yantze / webdl.sh
Last active December 9, 2024 06:28
wget 整站下载
# 使用 wget 下载整个网站解释
# link: https://www.douban.com/note/536265958
# wget
# --recursive //回归递推也就是包括所有子目录子文件
# --no-clobber //不更改已经存在的文件,也不使用在文件名后添加 .#(# 为数字)的方法写入新的文件
# --page-requisites //下载所有显示完整网页所需的文件,例如图像。
# --html-extension //将所有text/html文档以.html扩展名保存
# --convert-links //转换非相对链接为相对链接
# --no-parent //不要追溯到父目录
# --level=0 // Specify recursion maximum depth level depth.
@xingstarx
xingstarx / MapDeserializerDoubleAsIntFix.java
Last active March 21, 2022 02:21
处理Gson中,json转换map造成的int变double的问题
/**
*最近在研究网络请求数据解析的问题,发现json数据被强制转换为map结构的时候,会出现int变成double的问题
*在stackoverflow上看到了一个这个How can I prevent gson from converting integers to doubles 的问题,采用了这个答案
*https://stackoverflow.com/a/36529534/5279354答案
*/
import com.google.gson.JsonArray;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
@zhuziyi1989
zhuziyi1989 / URL Schemes.md
Last active April 23, 2025 15:28
常用 URL Schemes 收集。

** 由于此文年事已久,可能某些 URL Schemes 已失效,可在评论区留言指出!(最后更新于 2024.10.28)

关于 URL Scheme 你知道多少?

iOS 系统中

由于苹果的各应用都是在沙盒中,不能够互相之间访问或共享数据。但是苹果还是给出了一个可以在 APP 之间跳转的方法:URL Scheme。简单的说,URL Scheme 就是一个可以让 APP 相互之间可以跳转的协议。每个 APP 的 URL Scheme 都是不一样的,如果存在一样的 URL Scheme,那么系统就会响应先安装那个 APP 的 URL Scheme,因为后安装的 APP 的 URL Scheme 被覆盖掉了,是不能被调用的。

Android 系统中

@zzpmaster
zzpmaster / formatBytes.dart
Last active April 21, 2025 17:26
convert bytes to kb mb in dart
static String formatBytes(int bytes, int decimals) {
if (bytes <= 0) return "0 B";
const suffixes = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
var i = (log(bytes) / log(1024)).floor();
return ((bytes / pow(1024, i)).toStringAsFixed(decimals)) +
' ' +
suffixes[i];
}
@Kautenja
Kautenja / piflix.css
Last active March 31, 2025 09:20
styles to make emby look like netflix
/*
EMBY THEME : piflix
# Table of Contents
1. ACCENT COLORS
1.1 Buttons
1.1.1 Checkboxes
1.1.2 Rectangles
1.1.3 Links & Text buttons
@bookfere
bookfere / fix-google-translate-cn.sh
Last active December 18, 2024 04:59
Fix Google Translate CN for macOS
#!/bin/bash
# Copyright (c)2022 https://bookfere.com
# This is a batch script for fixing Google Translate and making it available
# in the Chinese mainland. If you experience any problem, visit the page below:
# https://bookfere.com/post/1020.html
set -e
IPS=(
74.125.137.90
@noobnooc
noobnooc / cloudflare-worker-proxy.js
Last active April 15, 2025 22:43
cloudflare-worker-proxy
// Website you intended to retrieve for users.
const upstream = 'api.openai.com'
// Custom pathname for the upstream website.
const upstream_path = '/'
// Website you intended to retrieve for users using mobile devices.
const upstream_mobile = upstream
// Countries and regions where you wish to suspend your service.
@janlay
janlay / README.md
Last active April 16, 2023 16:27
OpenAPI Proxy for Cloudflare Workers