-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8c81d7
commit 63fa0d8
Showing
43 changed files
with
884 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# https://squidfunk.github.io/mkdocs-material/publishing-your-site/#with-github-actions | ||
name: deploy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '.vscode/**' | ||
- '.github/**' | ||
- '.pre-commit-config.yaml' | ||
permissions: | ||
contents: write | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
cache: pip | ||
cache-dependency-path: justfile | ||
- uses: extractions/setup-just@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- run: just bootstrap | ||
- run: mkdocs gh-deploy --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.env | ||
/site/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
exclude_types: | ||
- svg | ||
- id: check-yaml | ||
args: | ||
- "--unsafe" # Allow tags | ||
- id: check-added-large-files | ||
- repo: https://github.com/crate-ci/typos | ||
rev: v1.16.1 | ||
hooks: | ||
- id: typos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"recommendations": [ | ||
"redhat.vscode-yaml" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"元数据": { | ||
"scope": "markdown", | ||
"prefix": "meta", | ||
"body": [ | ||
"> :fontawesome-regular-face-grin: ${1:独角鬼王}", | ||
">", | ||
"> :material-clock-edit-outline: ${2:2023年6月11日 16:43:33}", | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"yaml.schemas": { | ||
"https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml" | ||
}, | ||
"yaml.customTags": [ | ||
"!ENV scalar", | ||
"!ENV sequence", | ||
"tag:yaml.org,2002:python/name:materialx.emoji.to_svg", | ||
"tag:yaml.org,2002:python/name:materialx.emoji.twemoji", | ||
"tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format" | ||
], | ||
"python.analysis.typeCheckingMode": "basic", | ||
"markdown.copyFiles.destination": { | ||
"*.md": "${documentWorkspaceFolder}/docs/assets/" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Serve", | ||
"command": "just", | ||
"type": "process", | ||
"args": [ | ||
"serve", | ||
// "--dirtyreload", | ||
], | ||
"group": "build", | ||
"isBackground": true, | ||
"problemMatcher": { | ||
"owner": "mkdocs", | ||
"pattern": { | ||
"regexp": "^(WARNING|ERROR)\\s+-\\s+(.+)$", | ||
"kind": "file", | ||
"severity": 1, | ||
"message": 2, | ||
}, | ||
"background": { | ||
"activeOnStart": true, | ||
"beginsPattern": "^INFO\\s+-\\s+\\[\\d{2}:\\d{2}:\\d{2}\\]\\s+Detected file changes", | ||
"endsPattern": "^INFO\\s+-\\s+(\\[\\d{2}:\\d{2}:\\d{2}\\]\\s+Reloading browsers|Documentation built in)", | ||
}, | ||
}, | ||
"presentation": { | ||
"reveal": "silent", | ||
"revealProblems": "onProblem", | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# 组织部芝士虾 | ||
|
||
2023年夏。 | ||
2023年夏在QQ群“2022网协组织部”发生的 stand alone complex 现象。 | ||
|
||
![](docs/assets/Laughing_man.svg) | ||
|
||
原初版本:[组织部知识侠 – BITNP博客](https://blog.bitnp.net/shuoshuo/%e7%bb%84%e7%bb%87%e9%83%a8%e7%9f%a5%e8%af%86%e4%be%a0)([WebVPN](https://webvpn.bit.edu.cn/https/77726476706e69737468656265737421f2fb4e9b693261447018c7a29d41/shuoshuo/%e7%bb%84%e7%bb%87%e9%83%a8%e7%9f%a5%e8%af%86%e4%be%a0))。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Windows 上 Path 的长度 | ||
|
||
> :fontawesome-regular-face-grin: 独角鬼王 | ||
> | ||
> :material-clock-edit-outline: 2023年6月11日 16:43:33 | ||
每天一个冷知识:Windows系统上,Path 在系统选项卡里最大长度是2047,在 Command Prompt(`cmd.exe`)`setx`中限制为1024,还会贴心地帮你裁断;在注册表里不限制长度。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# PowerShell 历史记录 | ||
|
||
> :fontawesome-regular-face-grin: 祖郎 | ||
> | ||
> :material-clock-edit-outline: 2023年6月12日 23:16:54 | ||
冷知识:在 PowerShell 中,你可以使用`Get-History`命令来获取你在当前会话中输入的命令的历史记录。但是,这个命令提供的历史记录是基于命令的标识号而不是时间顺序来排序的。要按时间顺序查看 PowerShell 历史记录,可以使用以下命令。 | ||
|
||
```powershell | ||
> Get-History | Sort-Object -Property StartTime | ||
``` | ||
|
||
--- | ||
|
||
试试`h`?这是[`Get-History`的别名](https://learn.microsoft.com/zh-cn/powershell/module/microsoft.powershell.core/get-history?view=powershell-7.3#notes)。 | ||
|
||
--- | ||
|
||
:material-eye-arrow-right-outline: [启用预测 IntelliSense - 关于 PSReadLine - PowerShell | Microsoft Learn](https://learn.microsoft.com/zh-cn/powershell/module/psreadline/about/about_psreadline?view=powershell-7.2#predictive-intellisense) | ||
|
||
```powershell | ||
> Set-PSReadLineOption -PredictionSource History | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# ASCII 艺术 | ||
|
||
> :fontawesome-regular-face-grin: 何苗 | ||
> | ||
> :material-clock-edit-outline: 2023年6月13日 23:37:52 | ||
## Star Wars ASCII | ||
|
||
在命令提示符中输入`telnet towel.blinkenlights.nl`,然后按下回车键,你将能够观看以 ASCII 艺术形式呈现的《星球大战》(*Star Wars*)电影。 | ||
|
||
![](assets/star-wars-ascii.jpg) | ||
|
||
--- | ||
|
||
可能需要到“启用或关闭 Windows 功能”启用“Telnet 客户端”。 | ||
|
||
## Matrix ASCII | ||
|
||
在命令提示符中输入`notepad`,然后按下回车键打开记事本。在记事本中不输入任何内容,直接按下++caps-lock++。接下来按下++shift+alt+print-screen++。然后按下回车键,你将看到一个仿照《黑客帝国》(*The Matrix*)电影的 ASCII 动画。 | ||
|
||
--- | ||
|
||
:material-eye-arrow-right-outline: [The Matrix](https://parambirs.github.io/matrix/) | ||
|
||
:material-eye-arrow-right-outline: [Lively Wallpaper by rocksdanister](https://www.rocksdanister.com/lively/) | ||
|
||
## 其它补充 | ||
|
||
```shell | ||
ssh git.charm.sh | ||
``` | ||
|
||
--- | ||
|
||
```shell | ||
$ tldr telnet | ||
|
||
Connect to a specified port of a host using the telnet protocol. | ||
More information: <https://manned.org/telnet>. | ||
|
||
Telnet to the default port of a host: | ||
|
||
telnet host | ||
|
||
Telnet to a specific port of a host: | ||
|
||
telnet ip_address port | ||
|
||
Exit a telnet session: | ||
|
||
quit | ||
|
||
Emit the default escape character combination for terminating the session: | ||
|
||
Ctrl + ] | ||
|
||
Start telnet with "x" as the session termination character: | ||
|
||
telnet -e x ip_address port | ||
|
||
Telnet to Star Wars animation: | ||
|
||
telnet towel.blinkenlights.nl | ||
``` | ||
|
||
[Tealdeer](https://dbrgn.github.io/tealdeer/) is a very fast implementation of [tldr](https://github.com/tldr-pages/tldr) in Rust. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Ghost in the Shell —— Fork Bomb | ||
|
||
> :fontawesome-regular-face-grin: 扁鹊 | ||
> | ||
> :material-clock-edit-outline: 2023年6月15日 0:43:10 | ||
一行短短的 shell 语句也可以很邪乎。 | ||
|
||
下面这条称作 fork bomb,适用于 bash 等 shell,它会按几何级数创建进程,最终可能耗尽计算机资源,十分危险。 | ||
|
||
```bash | ||
$ :(){ :|:& };: | ||
``` | ||
|
||
这是什么鬼呢?我们一点点来看。 | ||
|
||
1. `:() { … }`定义了一个函数,名叫`:`,无需参数,函数体为`{ … }`的内容。 | ||
2. `:`调用这个函数。 | ||
3. `A | B`创建两个进程,分别执行`A`、`B`,同时把前一个进程的输出(stdout)作为后一个进程的输入(stdin),这称作 pipe。如果两个进程都执行`:`函数,就是`: | :`了。 | ||
4. `U; V`先执行`U`,再执行`V`。 | ||
5. `C &`开始在后台执行`C`,并立即返回。稍后可用`fg`(foreground)回到前台。对 fork bomb 而言,`&`的作用在于掩盖情况,欺骗你。 | ||
6. 后面的分析作为读者练习。 | ||
|
||
--- | ||
|
||
Pipeline 不是串行,不然`tail -f`(follow)很可能就实现不了了。 | ||
|
||
--- | ||
|
||
> 谢谢,电脑瞬间跑满CPU,内存在数秒内涨满15G,幸好我关机关得快。 | ||
--- | ||
|
||
在 Windows 可用 Git Bash,或者尝试 PowerShell。 | ||
|
||
```powershell | ||
> Function fork() { fork | fork & }; fork | ||
``` | ||
|
||
也许 PowerShell 7 才有`&`……要不直接去掉试试? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Antigravity | ||
|
||
> :fontawesome-regular-face-grin: 曹德 | ||
> | ||
> :material-clock-edit-outline: 2023年6月16日 0:07:31 | ||
进入 Python 交互式界面,`import antigravity`。 | ||
|
||
<figure markdown> | ||
![](https://imgs.xkcd.com/comics/python.png) | ||
<figcaption markdown>[xkcd: Python](https://xkcd.com/353/)</figcaption> | ||
</figure> | ||
|
||
--- | ||
|
||
Title text: I wrote 20 short programs in Python yesterday. It was wonderful. Perl, I'm leaving you. | ||
|
||
:material-eye-arrow-right-outline: [353: Python - explain xkcd](https://explainxkcd.com/wiki/index.php/353:_Python) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Simple is better than complex | ||
|
||
> :fontawesome-regular-face-grin: 孙尚香 | ||
> | ||
> :material-clock-edit-outline: 2023年6月17日 0:24:55 | ||
`this.py`: Simple is better than complex. | ||
|
||
```python | ||
s = """Gur Mra bs Clguba, ol Gvz Crgref | ||
Ornhgvshy vf orggre guna htyl. | ||
Rkcyvpvg vf orggre guna vzcyvpvg. | ||
Fvzcyr vf orggre guna pbzcyrk. | ||
Pbzcyrk vf orggre guna pbzcyvpngrq. | ||
Syng vf orggre guna arfgrq. | ||
Fcnefr vf orggre guna qrafr. | ||
Ernqnovyvgl pbhagf. | ||
Fcrpvny pnfrf nera'g fcrpvny rabhtu gb oernx gur ehyrf. | ||
Nygubhtu cenpgvpnyvgl orngf chevgl. | ||
Reebef fubhyq arire cnff fvyragyl. | ||
Hayrff rkcyvpvgyl fvyraprq. | ||
Va gur snpr bs nzovthvgl, ershfr gur grzcgngvba gb thrff. | ||
Gurer fubhyq or bar-- naq cersrenoyl bayl bar --boivbhf jnl gb qb vg. | ||
Nygubhtu gung jnl znl abg or boivbhf ng svefg hayrff lbh'er Qhgpu. | ||
Abj vf orggre guna arire. | ||
Nygubhtu arire vf bsgra orggre guna *evtug* abj. | ||
Vs gur vzcyrzragngvba vf uneq gb rkcynva, vg'f n onq vqrn. | ||
Vs gur vzcyrzragngvba vf rnfl gb rkcynva, vg znl or n tbbq vqrn. | ||
Anzrfcnprf ner bar ubaxvat terng vqrn -- yrg'f qb zber bs gubfr!""" | ||
|
||
d = {} | ||
for c in (65, 97): | ||
for i in range(26): | ||
d[chr(i+c)] = chr((i+13) % 26 + c) | ||
|
||
print("".join([d.get(c, c) for c in s])) | ||
``` | ||
|
||
:material-eye-arrow-right-outline: [Python 10 was a success, commemorate it\! · python/cpython@63cd9bf](https://github.com/python/cpython/commit/63cd9bf4887cd4603ead4db29c772fa370e68a25) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# 996 ICU | ||
|
||
> :fontawesome-regular-face-grin: 天文生 | ||
> | ||
> :material-clock-edit-outline: 2023年6月18日 0:03:48 | ||
:material-eye-arrow-right-outline: [996icu/996.ICU: Repo for counting stars and contributing. Press F to pay respect to glorious developers.](https://github.com/996icu/996.ICU) | ||
|
||
这个项目是针对中国工作时间制度中”996”(每周工作6天,每天工作9小时)的抗议和讨论,也是一种关注工作伦理和员工权益的倡议。 | ||
|
||
有趣的是,这个仓库在昨天(2023年6月16日)被设为了archived模式。 | ||
|
||
作者的说法是: | ||
|
||
> Due to some recent drama, this repository will be temporarily archived. To dispel rumors: | ||
> | ||
> 1. I am an individual, not a team. | ||
> 2. I am at home, not in prison. | ||
> 3. I have not received any funding or donations. Everything can be traced on the blockchain. | ||
996.ICU是指“工作996,生病ICU”。这是中国程序员之间的一种自嘲说法,意思是如果按照996的模式工作,那以后就得进ICU了。 | ||
|
||
:material-eye-arrow-right-outline: [996.ICU](https://996.icu/#/) | ||
|
||
更有趣的是,这段文字在QQ发不出来。 | ||
|
||
--- | ||
|
||
好像能发出来? |
Oops, something went wrong.