DeeCheung

DeeCheung

V2EX 第 13339 号会员,加入于 2011-11-05 09:34:57 +08:00
今日活跃度排名 17822
根据 DeeCheung 的设置,主题列表被隐藏
二手交易 相关的信息,包括已关闭的交易,不会被隐藏
DeeCheung 最近回复了
我觉得挺好的,支持 OP ,我也觉得放在 URL 栏最方便
首发入的 Realme GT7Pro ,我最大的目的就是续航和可以 Root ,目前已 Root 感觉良好。

版本停留 150 续航亮屏 12 小时左右,待机两天没问题,两天一充杜绝续航焦虑,早上没电出门前充 30 分钟洗漱也够充满。有过出厂版本(更新 105 ),刷 B 站 8 小时才掉 50%的记录,续航可以到亮屏 15+

等每月 1 号深度申请过了后,获取资格通过后,Root 还是比较简单的。然后就是把内置不要的全干掉了。
屏幕是不错,现在还能补贴,建议可以入竞速版即可,差别不大,最差的是 usb 2.0
322 天前
回复了 joenlee 创建的主题 宽带症候群 如何安全又方便的访问家里 nas?
Wireguard + HairpinNet 即可,就算你 wg 一直开着也没关系,全内网,要不要 dns 都无所谓,在跑好几年
2024-03-20 23:32:09 +08:00
回复了 LxnChan 创建的主题 Linux 求推荐一个以 Linux 为基础的自建私有开源团队云盘
dufs
2023-12-15 00:03:27 +08:00
回复了 liyafe1997 创建的主题 Google 有什么方法能稳定下载 Google Drive 上的巨大文件(几百 G)
gdrive 是支持断点续传的,用 oauth2 client token 后可以导出到 aria2 里下载,6 小时过期后新 token 继续下就行,经常从团队盘里搬百 G 蓝光原盘的路过
我自己用 `Bun(自带 sqlite) + js` 解析提取,一个 Bun 二进制+脚本即可,你也可以打包在一起单文件当 cli 用,缺点不支持 win

``` js
// TODO v11 v12
import { Database } from 'bun:sqlite'
import { createDecipheriv, pbkdf2Sync } from 'node:crypto'

const KEY_LENGTH = 16
const SALT = 'saltysalt'
const IV = Buffer.alloc(KEY_LENGTH).fill(' ')
const password = 'peanuts'
const key = getDerivedKey(password, 1)

function getDerivedKey(password, iterations) {
return pbkdf2Sync(password, SALT, iterations, KEY_LENGTH, 'sha1')
}

function decryptorCookie(encryptedCookie) {
const decipher = createDecipheriv('AES-128-CBC', key, IV)
const decryptedCookie = decipher.update(encryptedCookie.slice(3))
return decryptedCookie.toString() + decipher.final('utf8')
}

function parseExpiresUtc(n) {
return new Date(n / 1e3 - 116444736e5)
}

function parseCookie(item) {
const { name, host_key, encrypted_value: str, expires_utc, has_expires } = item
// V10
const val = decryptorCookie(str)
const expires = parseExpiresUtc(expires_utc)
const unixTime = +(expires / 1e3).toFixed(0)
const out = { key: name, val, has_expires, expires, host: host_key, unixTime }
return out
}

const DefaultDbPath = '~/.config/chromium/Default/Cookies'
export function getCookies(sql, dbPath = DefaultDbPath) {
const db = new Database(dbPath)
const query = db.query(sql)
const items = query.all()
return items.map(parseCookie)
}

export function toNetscapeCookieFile(arr) {
const lines = arr
.map(c => {
return `${c.host} TRUE / TRUE ${c.unixTime} ${c.key} ${c.val}`
})
.join('\n')
return `# Netscape HTTP Cookie File
# This file is generated by yt-dlp. Do not edit.

${lines}`
}

export function toHeadersCookie(arr) {
return arr.map(c => `${c.key}=${c.val}`).join('; ')
}

if (import.meta.main) {
const sql = `SELECT * FROM cookies where host_key = '.aliyundrive.com' and name = 'cookie2';`
console.log(getCookies(sql))

const sql1 = `SELECT * FROM cookies where host_key = '.bilibili.com' and name = 'SESSDATA';`
const cookies = await getCookies(sql)
console.log(toNetscapeCookieFile(cookies))
}

```
2023-07-21 09:05:25 +08:00
回复了 wy315700 创建的主题 V2EX 3000 天签到成就达成
手签 3605 ,中间断过很多次
2023-05-05 08:59:33 +08:00
回复了 aqtata 创建的主题 程序员 有什么批量转换文件编码的工具推荐吗?
fd xargs conv
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   932 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 21:04 · PVG 05:04 · LAX 14:04 · JFK 17:04
Developed with CodeLauncher
♥ Do have faith in what you're doing.