This blog is rated  R⃣ , viewer discretion is advised

Microsoft 官网的 403 错误

$ curl -H "User-Agent: User-Agent: Mozilla/5" -kvs 'http://www.microsoft.com'
*   Trying 118.123.102.107...
* TCP_NODELAY set
* Connected to www.microsoft.com (118.123.102.107) port 80 (#0)
> GET / HTTP/1.1
> Host: www.microsoft.com
> Accept: */*
> User-Agent: User-Agent: Mozilla/5
>
< HTTP/1.1 403 Forbidden
< Server …

Posted

stdout

Chrome 阉割指南

不折腾不舒服。继之前 Edge调教 之后记录一下 Chrome V70怎么阉割。

下载:

win 32 | win 64 | Mac

上面的链接已经年久失修了,对比了一下获取 …

Posted

stdout

认识「洋节」

都说 xmas eve 是洋节,我们就来数一数到底有哪些洋节

  1. 元旦1月1日。由北「洋」军阀袁世凯设立。依据是内务部总长朱启钤《定四 …

Posted

stdout

如何可视化跟踪分析 Python import 耗时

首先在本地安装 pip install tuna

然后跑个分,需要 CPython >= 3.7,输入

PYTHONPROFILEIMPORTTIME=1 python3 myscript.py 2>1.log

tuna

然后 tuna 1.log ,会自动打开浏览器围观 import 耗时分布 …

Posted

stdout

4句话自动换win10壁纸

  1. 获取当前用户 sid。cmd下设变量如此复杂。而且 | 的转义字符居然是 ^|
  2. 读取 LogonUI 的自动壁纸。reg query输出极其不友好。需要 tokens=3
  3. 设置为 …

Posted

stderr

FastAPI/Starlette支持静态文件支持SPA

FastAPI 官方支持 from fastapi.staticfiles import StaticFiles 充当一个静态文件服务器

其实实现是 starlette。这玩意可以在 directory 下放一个 404.html,恰好单页应用也需要用 …

Posted

stdout

苏35的UI汉化

原文禁止转载,那我就转载原文的原文

日前,俄罗斯《消息报》采访了俄罗斯无线电电子技术集团(俄罗斯技术集团下属企业 …

Posted

stdin

Python 3.X ctypes 和 greenlet size changed 坑三则

安装 setup.py 的时候 No module named '_ctypes' 报错

  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/usr/local/python3/lib/python3.9/site-packages/setuptools/__init__.py", line 18, in <module>
      from setuptools.dist import Distribution
    File "/usr/local/python3/lib/python3 …

Posted

stdout

reverse proxy FastCGI (fcgi) with uWSGI

People are still using FastCGI, and it's hard. I used uWSGI to convert FCGI traffic to regular http/1.0 so I can keep my existing http service running without apache mod_fcgi shit.

CGI environ variables

This is some ancient knowledge, better keep them noted

KEY description
AUTH_TYPE …

Posted

stdout

淘宝同一手机最多绑定6个小号

总结一些没用的知识

  1. 淘宝/阿里账号,可以一个手机最多绑定6个账号。淘宝注册的时候点击「企业注册」然后用邮箱注册,最 …

Posted

stdout

《兵车行》竖排实验

群里闲聊起究竟生男好还是生女好,就想起了这首诗

兵车行——杜甫 车辚辚,马萧萧,行人弓箭各在腰。 耶娘妻子走相送,尘埃不 …

Posted

stdout

Re-index page on Google Search Console

Request indexing webpage with Google used to be fun and simple, now it's a tedious task especially when you have tons of old pages ready to be crawled yet Google is reluctant to move.

Here is a simple script to speed up the stacks of page you have click in …

Posted

stdout