magicdawn's recent timeline updates
magicdawn's repos on GitHub
TypeScript · 752 watchers
Bilibili-Gate
[UserScript] Bilibili 自定义首页
TypeScript · 113 watchers
clash-config-manager
macOS ClashX 配置生成器
JavaScript · 25 watchers
magicdawn
个人学习 / 代码 / 总结 / 读书笔记
Go · 21 watchers
go-co
coroutine , async/await for golang
JavaScript · 16 watchers
browserify-handbook
browserify handbook 简体中文 翻译
JavaScript · 10 watchers
awesome-nodejs-precise
same as awesome-nodejs, but more precise
JavaScript · 9 watchers
baijiaxing.js
baijiaxing = 百家姓
JavaScript · 8 watchers
express-modern
use async function or generator function with express
TypeScript · 7 watchers
dl-vampire
Download file like a vampire
TypeScript · 7 watchers
handy-img
handy img tool and API
JavaScript · 6 watchers
impress-router
express style router for koa2
JavaScript · 5 watchers
bitbar-pm25
Vue · 5 watchers
bj-hospital-vis
北京社保定点医院-可视化
JavaScript · 4 watchers
esformatter-curly
keep original curly fot import & one line object literal
JavaScript · 3 watchers
my-google
Google Search
JavaScript · 2 watchers
ff-helper
ffmpeg helper by napi-rs binding
C# · 2 watchers
Magicdawn-Library
TypeScript · 1 watchers
alfred-issue-search
1 watchers
ant-design
An enterprise-class UI design language and React UI library
JavaScript · 1 watchers
antd-tree-shaking-demo
1 watchers
ascii-progress
🍓 Ascii progress-bar(s) in the terminal.
1 watchers
astro
The all-in-one web framework designed for speed. ⭐️ Star to support our work!
JavaScript · 1 watchers
atom-zoom
support zoom in atom
1 watchers
autocomplete
Fig adds autocomplete to your terminal.
JavaScript · 1 watchers
base-settings
settings Base Class like node express, get/set enable/disable enabled/disabled
TypeScript · 1 watchers
create-with-generator
use `pnpm create` / `yarn create` / `npm init` with yeoman generator
TypeScript · 1 watchers
esbuild-node-builtin
esbuild plugin let u use node builtin modules
1 watchers
EverPhotoCheckin
时光相册签到助手,利用GitHub Actions每天自动执行。
TypeScript · 1 watchers
generator-magicdawn
Yeoman generator for self use
JavaScript · 1 watchers
generator-tampermonkey
yo generator for tampermonkey scripts
HTML · 1 watchers
http-static-server
simple http static server
TypeScript · 1 watchers
iina-plugin-bilibili
IINA + Bilibili
TypeScript · 1 watchers
iina-userland
iina-userland: yeoman generator to create iina plugins and more
TypeScript · 1 watchers
img-tailor
JavaScript · 1 watchers
iya
[WIP] iya = 哎呀
JavaScript · 1 watchers
jshint-config-builder
jshint-config-builder
JavaScript · 1 watchers
koa-generic-views
koa generic views
TypeScript · 1 watchers
last-cjs-version
get last cjs version of a module
TypeScript · 1 watchers
mac-helper
useful helper for macOS
C# · 0 watchers
BBDown
Bilibili Downloader. 一款命令行式哔哩哔哩下载器.
TypeScript · 0 watchers
bilibili-dynamic-saver
bilibili dynamic saver
CSS · 0 watchers
bilibili-fav-refine
[user.css] B站收藏夹样式优化
0 watchers
bililive-go
一个直播录制工具
JavaScript · 0 watchers
book-audio-downloader
TypeScript · 0 watchers
bvid
bilibili bvid
TypeScript · 0 watchers
clash-rules-yaml
yaml version of clash rules
0 watchers
ClashX.Meta
0 watchers
claude-code-source-code
It will be revised soon.
JavaScript · 0 watchers
clip-spy
clipboard api for Node.js & Electron via rust napi bindings.
0 watchers
clipanion
Type-safe CLI library / framework with no runtime dependencies
0 watchers
common-docs
common docs for my projects
JavaScript · 0 watchers
cowrap
co.wrap but keep function length
0 watchers
cssinjs
Vue · 0 watchers
doniai-desktop
一款个人工具软件助手,采用electron开发!
0 watchers
easy-peasy
Vegetarian friendly state for React
TypeScript · 0 watchers
easy-yargs
type-safe yargs usage
JavaScript · 0 watchers
egg-compose
compose koa middleware to an egg.js action
C# · 0 watchers
Encoder-And-Decoder
TypeScript · 0 watchers
epubcheck-assets
epubcheck jar assets
TypeScript · 0 watchers
eslint-config
eslint-config for self use
JavaScript · 0 watchers
eslint-plugin-magicdawn
eslint plugin for self use
JavaScript · 0 watchers
eval-string-interpolation
string interpolation with eval for node.js
0 watchers
exifr
📷 The fastest and most versatile JS EXIF reading library.
TypeScript · 0 watchers
fast-sort-lens
API wrapper around fast-sort
TypeScript · 0 watchers
finder-sort
Sort file names in order meaningful for humans (inspired by OSX Finder)
JavaScript · 0 watchers
fixed-set-js
fixed size set for JavaScript
JavaScript · 0 watchers
generator-predator
yoeman generator for predator like preject
0 watchers
get-cursor-position
🐾 Get the cursor's current position in your terminal.
JavaScript · 0 watchers
get-steady
A simple `throttle` implemantation
Go · 0 watchers
go-promise-util
extra util for golang promise
TypeScript · 0 watchers
greasyfork-feedback-filter
[UserScript] Help U to hide or filter script feedbacks
JavaScript · 0 watchers
gulp-gather-template
gather templates into a .js file
JavaScript · 0 watchers
gulp-razor-tmpl
gulp plugin for razor-tmpl
JavaScript · 0 watchers
html-external-webpack-plugin
add external js,css to html-webpack-plugin
Swift · 0 watchers
iina
The modern video player for macOS.
JavaScript · 0 watchers
iina-plugin-danmaku
0 watchers
iina-plugin-definition
Type definitions for IINA plugin API (WIP).
TypeScript · 0 watchers
iina-plugin-thunder-subtitle
IINA plugin: fetch subtitle from thunder.app
0 watchers
images
images
JavaScript · 0 watchers
impress-router-benchmark
impress-router-benchmark
JavaScript · 0 watchers
impress-router-table
Sails.js like routing for koa.js
JavaScript · 0 watchers
ip-kit
some ip utils
JavaScript · 0 watchers
js-hyperclick
A hyperclick provider that lets you jump to where variables are defined.
TypeScript · 0 watchers
jxa-common-used
d.ts for common used app
JavaScript · 0 watchers
koa-jayson-rpc
koa json rpc powered by jason
JavaScript · 0 watchers
koa-map-local
Charles map local for Koa.js
TypeScript · 0 watchers
less-modules-in-ts
css-modules + css-in-js = css-modules-in-js, then less-modules-in-ts
JavaScript · 0 watchers
lesspack
[WIP] lesspack is a less build tool
JavaScript · 0 watchers
log-reject-error
Dead Simple unhandledRejection handler
0 watchers
log-symbols
Colored symbols for various log levels
TypeScript · 0 watchers
m-pashua
Shell · 0 watchers
mpv-config
my mpv config
0 watchers
mt
yet another media thumber. Generate Video Contat Sheets easily. http://mutschler.github.io/mt
JavaScript · 0 watchers
musicAPI
Hiring! Please send email to [email protected] or WeChat: liukai730219
JavaScript · 0 watchers
my-workers-proxy
C# · 0 watchers
MYMusic
JavaScript · 0 watchers
MYWeb
Own playground about ASP.NET MVC & C# on AppHarbor
JavaScript · 0 watchers
ncepu
大华电的Repository - 哈哈哈哈
magicdawn
ONLINE

magicdawn

V2EX member #63811, joined on 2014-05-28 23:47:26 +08:00
Today's activity rank 8858
iOS 15 Developer Beta 太卡了, 发热, 掉电贼快
Apple  •  magicdawn  •  Jun 21, 2021  •  Lastly replied by aero99
19
clash-config-manager clashX 配置管理.
分享创造  •  magicdawn  •  Oct 1, 2020  •  Lastly replied by magicdawn
7
bj-hospital-vis 北京-医保定点医院-可视化
分享创造  •  magicdawn  •  May 7, 2021  •  Lastly replied by liangchen1ce
21
[北京] 滴滴出行招聘前端实习生
酷工作  •  magicdawn  •  Mar 10, 2018  •  Lastly replied by magicdawn
5
APNs 正确的姿势是啥
iDev  •  magicdawn  •  Dec 16, 2016  •  Lastly replied by lokig
12
V8 Release 5.4
Node.js  •  magicdawn  •  Sep 10, 2016  •  Lastly replied by magicdawn
4
pyenv 真是个好东西
Python  •  magicdawn  •  Jun 13, 2016  •  Lastly replied by whnzy
22
magicdawn's recent replies
vscode 后面也会分两个 App: 编辑器 + Agents
@jaff #7 Pypi 也有投毒啊...

之前的 litellm

这次 mistralai 2.4.6
https://socket.dev/blog/tanstack-npm-packages-compromised-mini-shai-hulud-supply-chain-attack
刚充好 USDT ,7 块的就没了。。。
搞笑又扎心
@uni #9 为什么不去了解一下背景呢?大 npm 包被影视站利用,成本你出么?

如果你嫌弃就不要用,没有收费为何要承担被你喷的困境。

是的你没有了解背景的义务,但同时你也没有喷的权利。
npmmirror v.s tencent mirror ,坐标湖北武汉, 结果:

=== Final Result (sorted by tarball avg) ===

npmmirror
metadata avg: 229.4 ms
metadata p50: 253.9 ms
metadata p90: 409.2 ms
tarball avg: 435.1 ms
tarball p50: 266.1 ms
tarball p90: 906.1 ms


tencent
metadata avg: 777.0 ms
metadata p50: 700.7 ms
metadata p90: 1336.7 ms
tarball avg: 508.6 ms
tarball p50: 440.9 ms
tarball p90: 938.3 ms

脚本 via ChatGPT
```js
#!/usr/bin/env node
import { performance } from 'node:perf_hooks'

const registries = [
{
name: 'npmmirror',
base: 'https://registry.npmmirror.com',
},
{
name: 'tencent',
base: 'http://mirrors.tencent.com/npm',
},
]

// 👉 多包(覆盖不同大小 & 热门程度)
const PACKAGES = [
{ name: 'react', version: '18.2.0' },
{ name: 'lodash', version: '4.17.21' },
{ name: 'typescript', version: '5.4.5' },
{ name: 'axios', version: '1.6.7' },
]

// 👉 多轮(建议 ≥10 )
const RUNS = 10

// 👉 并发数(模拟 npm )
const CONCURRENCY = 4

async function fetchWithTiming(url) {
const start = performance.now()
const res = await fetch(url)
await res.arrayBuffer()
return performance.now() - start
}

// 简单并发控制
async function runPool(tasks, limit) {
const results = []
let i = 0

async function worker() {
while (i < tasks.length) {
const idx = i++
results[idx] = await tasks[idx]()
}
}

await Promise.all(Array.from({ length: limit }, worker))
return results
}

async function testRegistry(registry) {
const metadataTimes = []
const tarballTimes = []

for (let run = 0; run < RUNS; run++) {
const tasks = []

for (const pkg of PACKAGES) {
const metadataUrl = `${registry.base}/${pkg.name}`
const tarballUrl = `${registry.base}/${pkg.name}/-/${pkg.name}-${pkg.version}.tgz`

tasks.push(async () => {
const t = await fetchWithTiming(metadataUrl)
metadataTimes.push(t)
})

tasks.push(async () => {
const t = await fetchWithTiming(tarballUrl)
tarballTimes.push(t)
})
}

await runPool(tasks, CONCURRENCY)
console.log(`[${registry.name}] run ${run + 1}/${RUNS} done`)
}

function stats(arr) {
const sorted = [...arr].sort((a, b) => a - b)
const avg = arr.reduce((a, b) => a + b, 0) / arr.length
const p50 = sorted[Math.floor(sorted.length * 0.5)]
const p90 = sorted[Math.floor(sorted.length * 0.9)]
return { avg, p50, p90 }
}

return {
name: registry.name,
metadata: stats(metadataTimes),
tarball: stats(tarballTimes),
}
}

async function main() {
const results = []

for (const r of registries) {
console.log(`\nTesting ${r.name}...`)
const res = await testRegistry(r)
results.push(res)
}

console.log('\n=== Final Result (sorted by tarball avg) ===')

results.sort((a, b) => a.tarball.avg - b.tarball.avg)

for (const r of results) {
console.log(`
${r.name}
metadata avg: ${r.metadata.avg.toFixed(1)} ms
metadata p50: ${r.metadata.p50.toFixed(1)} ms
metadata p90: ${r.metadata.p90.toFixed(1)} ms
tarball avg: ${r.tarball.avg.toFixed(1)} ms
tarball p50: ${r.tarball.p50.toFixed(1)} ms
tarball p90: ${r.tarball.p90.toFixed(1)} ms
`)
}
}

main()
```


这个包水平低下,严重浪费开发者磁盘,建议停用
https://www.npmjs.com/package/effect-solutions?activeTab=code
这是个公益站,恶心不用就是。没有收你一分钱哦~
因为我觉得很好,必须站出来说句好
因为 npmmirror 我的常用命令 `corepack use pnpm@latest && ncu-safe && pi && p dedupe && p prune` 快了不少

export COREPACK_NPM_REGISTRY=https://registry.npmmirror.com


```sh
❯ where ncu-safe
ncu-safe: aliased to ncu -t minor -u

❯ where pi
pi: aliased to pnpm install

❯ where p
p: aliased to pnpm
```
确实烦,但是一个包 325MB 就不得不反思为什么 npm 包要这么大?
npm 应该用来分发代码, assets 请自建分发,参考 puppeteer 下载浏览器实例.

> 325793115 / 1000 / 1000
325.793115
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2950 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 31ms · UTC 09:34 · PVG 17:34 · LAX 02:34 · JFK 05:34
♥ Do have faith in what you're doing.