{"id":19845506,"url":"https://github.com/smileexpression/memo","last_synced_at":"2026-03-02T22:34:14.141Z","repository":{"id":208204741,"uuid":"721058166","full_name":"smileexpression/Memo","owner":"smileexpression","description":"A repo to store solutions to problems I've encountered on the way to learning.","archived":false,"fork":false,"pushed_at":"2024-03-19T09:07:31.000Z","size":591401,"stargazers_count":1,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-11T12:32:38.049Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smileexpression.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-20T09:19:49.000Z","updated_at":"2024-01-19T06:46:45.000Z","dependencies_parsed_at":"2023-12-04T05:27:42.458Z","dependency_job_id":"6a8d35e5-7951-4082-8580-f51dbd91a3a0","html_url":"https://github.com/smileexpression/Memo","commit_stats":null,"previous_names":["arronvague/memo","smileexpression/memo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smileexpression%2FMemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smileexpression%2FMemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smileexpression%2FMemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smileexpression%2FMemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smileexpression","download_url":"https://codeload.github.com/smileexpression/Memo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241224394,"owners_count":19929919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T13:08:13.132Z","updated_at":"2026-03-02T22:34:14.097Z","avatar_url":"https://github.com/smileexpression.png","language":"TeX","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Memo\n A repo to store solutions to problems I've encountered on the way to learning.\n\nNew problems will be added to issues.\n\n## Problems\n\n### 在ubuntu 18.04/22.04使用clash-linux-amd64-v1.2.0（弃用，不方便）\n\n**下载clash-linux-amd64-v1.2.0**\n\n~~[clash下载地址 github](https://github.com/Dreamacro/clash/releases)~~（已跑路）\n\n~~[别人下载好的](https://disk.pku.edu.cn/#/link/60D2F38BE69B49D11C6B32FEB32F31A3)~~（已失效）\n\n```bash\ncd ~\n\nmkdir clash\n\ncd clash\n// 将下载好的clash安装包放到这个文件夹\n\ngzip -d clash-linux-amd64-xx.gz\n// 将clash-linux-amd64-xx.gz更换成你下载的版本\n\nchmod +x clash-linux-amd64-xx\n```\n\n**配置clash**\n\n在windows下获取clash的config.yaml和Country.mmdb\n\n**获取config.yaml**\n\n文件路径\n\n```bash\nC:\\Users\\你的名字\\.config\\clash\\profiles\n```\n\n选择最新的.yml文件，如1694746034143.yml，注意不是list.yml。将这个文件复制一份，重命名为config.yaml。\n\n**获取Country.mmdb**\n\n文件路径\n\n```bash\nC:\\Users\\你的名字\\.config\\clash\n```\n\n看到Country.mmdb。\n\n将刚才重命名的config.yaml和Country.mmdb放到ubuntu系统下。\n\n```bash\nmkdir    ~/.config/clash\nsudo mv   Country.mmdb    ~/.config/clash\nsudo mv    config.yaml     ~/.config/clash\n```\n\n**配置ubuntu网络代理**\n\n配置系统网络代理Network Proxy\n\nHTTP Proxy 127.0.0.1 7890\n\nHTTPS Proxy 127.0.0.1 7890\n\nSocks Host 127.0.0.1 7891\n\n其余默认。\n\n**运行**\n\n```bash\ncd ~/clash\n./clash-linux-amd64-xx\n```\n\n注意：此时可以使用浏览器访问谷歌，但是终端网络不会经过clash。需要\n\n```bash\nexport http_proxy=http://127.0.0.1:7890\nexport https_proxy=http://127.0.0.1:7890\n```\n\n且仅在当前终端生效。\n\n**终端长期使用**\n\n长期生效需要将上面两条命令写入~/.bashrc文件中，写到最后即可。\n\n**配置APT代理（没试过）**\n\n终端中的APT包管理器默认不使用系统代理。为了让APT也通过Clash进行网络连接，您需要编辑APT的配置文件。打开终端并运行以下命令编辑`apt.conf`文件：\n\n```bash\nsudo nano /etc/apt/apt.conf\n\n// 在打开的文件中添加以下内容：\nAcquire::http::Proxy \"[http://127.0.0.1:7890/](http://127.0.0.1:7890/)\";  \nAcquire::https::Proxy \"[http://127.0.0.1:7890/](http://127.0.0.1:7890/)\";\n```\n\n### 在ubuntu 18.04/22.04使用Clash.for.Windows-0.20.39-x64-linux\n\n最后一版clash，哀悼一秒。\n\n**下载Clash.for.Windows-0.20.39-x64-linux**\n\n[下载地址](https://archive.org/download/clash_for_windows_pkg)\n\n下载Clash.for.Windows-0.20.39-x64-linux.tar.gz\n\n放到ubuntu\n\n执行解压命令\n\n```bash\n解压\ntar -zxvf xxx.tar.gz\n改下文件夹名\nsudo mv Clash\\ for\\ Windows-0.20.39-x64-linux clash\n```\n\n**配置ubuntu网络代理**\n\n配置系统网络代理Network Proxy\n\nHTTP Proxy 127.0.0.1 7890\n\nHTTPS Proxy 127.0.0.1 7890\n\nSocks Host 127.0.0.1 7891\n\n其余默认。\n\n**运行**\n\n```bash\ncd clash\n./cfw\n```\n\n**导入订阅链接**\n\n和windows下使用没什么不同，懂得都懂。\n\n### 多电脑使用相同虚拟机\n\n[VMware虚拟机从一台电脑复制到另一台电脑](https://zhuanlan.zhihu.com/p/603483636#:~:text=%E5%9C%A8%E4%B8%80%E5%8F%B0%E7%94%B5%E8%84%91%E4%B8%8A,%E7%94%B5%E8%84%91%E4%B8%8A%EF%BC%8C%E7%9C%81%E6%97%B6%E7%9C%81%E5%8A%9B%E3%80%82)\n\n### 虚拟机迁移后无法联网\n\n虚拟机迁移后遇到突然连不上网的问题\n\n1. 宿主windows中，settings -\u003e Betwork \u0026 internet -\u003e Advanced network settings，允许虚拟机的网络适配器\n\n2. 虚拟机中\n\n   ```bash\n   sudo dhclient ens33\n   ```\n\n### vscode设置自动换行\n\nlinux/windows中 `ctrl + ,` 搜索word wrap，改为on\n\n### Ubuntu 18.04/20.04默认全局缩放修改\n\n[Ubuntu 20.04默认全局缩放修改，简单五步即可实现](https://blog.csdn.net/Pthumeru/article/details/119304019)\n\n### win11使用wsl\n\n**方法一：直接下载**\n\n直接下载，会自动安装最新的ubuntu\n\n```bash\nwsl -l\n```\n\n**方法二：导入**\n\n**导入**\n\n```bash\nwsl --import \u003cDistribution Name\u003e \u003cInstallLocation\u003e \u003cFileName\u003e\n```\n\n例如\n\n```bash\nwsl --import compilers D://Software/SoftwareData/compilers D://Software/SoftwareData/compilers/compilers.tar\n```\n\n**运行**\n\n```bash\nwsl -d \u003cDistribution Name\u003e\n```\n\n**设置用户账户**\n\n```bash\nNEW_USER=\u003cUSERNAME\u003e // \u003cUSERNAME\u003e替换成你的用户名\nuseradd -m -G sudo -s /bin/bash \"$NEW_USER\"\npasswd \"$NEW_USER\"\n```\n\n**设定默认用户**\n\n```bash\ntee /etc/wsl.conf \u003c\u003c_EOF\n[user]\ndefault=${NEW_USER}\n_EOF\n```\n\n#### 配置代理\n\n**问题**\n\n```bash\nwsl: A localhost proxy configuration was detected but not mirrored into WSL. WSL in NAT mode does not support localhost proxies.\n```\n\n**方法一：开启TUN MODE**\n\n把clash或其他代理客户端开TUN MODE。\n\n**方法二：WSL2配置代理**\n\n**新建脚本`proxy.sh`**\n\n```sh\n#!/bin/sh\nhostip=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')\nwslip=$(hostname -I | awk '{print $1}')\nport=7890\n \nPROXY_HTTP=\"http://${hostip}:${port}\"\n \nset_proxy(){\n  export http_proxy=\"${PROXY_HTTP}\"\n  export HTTP_PROXY=\"${PROXY_HTTP}\"\n \n  export https_proxy=\"${PROXY_HTTP}\"\n  export HTTPS_proxy=\"${PROXY_HTTP}\"\n \n  export ALL_PROXY=\"${PROXY_SOCKS5}\"\n  export all_proxy=${PROXY_SOCKS5}\n \n  git config --global http.proxy ${PROXY_HTTP}\n  git config --global https.proxy ${PROXY_HTTP}\n \n  echo \"Proxy has been opened.\"\n}\n \nunset_proxy(){\n  unset http_proxy\n  unset HTTP_PROXY\n  unset https_proxy\n  unset HTTPS_PROXY\n  unset ALL_PROXY\n  unset all_proxy\n  git config --global --unset http.proxy\n  git config --global --unset https.proxy\n \n  echo \"Proxy has been closed.\"\n}\n \ntest_setting(){\n  echo \"Host IP:\" ${hostip}\n  echo \"WSL IP:\" ${wslip}\n  echo \"Try to connect to Google...\"\n  resp=$(curl -I -s --connect-timeout 5 -m 5 -w \"%{http_code}\" -o /dev/null www.google.com)\n  if [ ${resp} = 200 ]; then\n    echo \"Proxy setup succeeded!\"\n  else\n    echo \"Proxy setup failed!\"\n  fi\n}\n \nif [ \"$1\" = \"set\" ]\nthen\n  set_proxy\n \nelif [ \"$1\" = \"unset\" ]\nthen\n  unset_proxy\n \nelif [ \"$1\" = \"test\" ]\nthen\n  test_setting\nelse\n  echo \"Unsupported arguments.\"\nfi\n```\n\n注意：其中第4行的`port`更换为自己的代理端口号。\n\n- `source ./proxy.sh set`：开启代理\n- `source ./proxy.sh unset`：关闭代理\n- `source ./proxy.sh test`：查看代理状态\n\n**任意路径下开启代理**\n\n可以在`~/.bashrc`中添加如下内容，并将其中的路径修改为上述脚本的路径：\n\n```bash\nalias proxy=\"source /path/to/proxy.sh\"\n```\n\n然后输入如下命令：\n\n```bash\nsource ~/.bashrc\n```\n\n那么可以直接在任何路径下使用如下命令：\n\n- `proxy set`：开启代理\n- `proxy unset`：关闭代理\n- `proxy test`：查看代理状态\n\n**自动设置代理**\n\n也可以在`~/.bashrc`添加如下内容，即在每次shell启动时自动设置代理，同样的，更改其中的路径为自己的脚本路径：\n\n```bash\n. /path/to/proxy.sh set\n```\n\n使用`curl`即可验证代理是否成功，如果有返回值则说明代理成功。\n\n```bash\ncurl www.google.com\n```\n\n**参考文献**\n\n[WSL2配置代理](https://www.cnblogs.com/tuilk/p/16287472.html)\n\n### gitee的draw.io\n\n没有适配长名字的仓库，提交.drawio时要求输入文件名，却因为仓库名太长而导致输入框隐藏。\n\n直接检查元素找到那一块前端代码，将仓库名改短。\n\n### Folder name\n\nAvoid using spaces if possible. I tried to use path as\n\n```bash\n../../lab05/Priests and Devils/README.md\n```\n\nIt worked in marktext, but not in github\n\nThe final solution is to replace spaces with `%20` beacause github will automatically replace spaces in path with `%20`.\n\n### github markdown中latex块内公式换行\n\nhttps://github.com/flysnow-org/maupassant-hugo/issues/21\n\n懒得试，自行尝试。想要在github上渲染出来，会导致pdf很丑。为了兼顾导出的pdf和github上渲染出来的效果，直接开新块了。\n\n### vscode跟随系统切换主题\n\nsettings搜索auto detect color scheme，勾上。\n\n### github markdown中latex对于小于号\u003c的渲染\n\n又是一个逆天的问题。\n\n可以渲染出`\u003e`，就是不能渲染出`\u003c`。只能用`\\textless`。\n\n### github管理unity项目\n\n.gitignore中不能忽略.meta后缀的文件。新生成的.meta文件，guid与删除文件之前不同。\n\n### Acrobat打开PDF时，出现“内容准备进度。正在准备文档以供阅读，请稍候。”状态：正在处理第 页，共 _ 页”\n\nhttps://helpx.adobe.com/cn/acrobat/kb/message-content-preparation-progress-opening.html\n\n### conda环境安装cvxopt\n\n```bash\nconda install -c conda-forge cvxopt\n```\n\n### vscode使用mysql\n\n安装相关扩展。\n\n![mysql_extension](pic/mysql_extension.png)\n\n至此可以连接数据库\n\n**format sql文件**\n\n安装sql formatter。\n\n`alt + shift + f`配置mysql默认format为sql formatter。\n\n保存时可自动格式化。\n\n### Ubuntu配置环境时老是出现依赖的套娃问题\n\n听我的，用aptitude。\n\n```bash\nsudo apt-get update\nsudo apt-get install aptitude\n```\n\n然后用aptitude替换apt-get。\n\n### conda安装各种库时报错Solving environment: failed with initial frozen solve. Retrying with flexible solve.\n\n更新conda（我用这个方法解决了）\n\n```bash\nconda update --all --yes\n```\n\n如果还没解决的话，尝试创建一个新的、比较纯净的虚拟环境，再安装。\n\n### ubuntu使用pyenv管理python版本\n\n要在Ubuntu上安装pyenv，可以按照以下步骤进行操作：\n\n1. 更新系统软件包列表。打开终端并运行以下命令：\n\n   ```bash\n   sudo apt update\n   ```\n\n2. 安装pyenv的依赖项。运行以下命令：\n\n   ```bash\n   sudo apt install curl git\n   ```\n\n3. 使用curl命令安装pyenv。运行以下命令：\n\n   ```bash\n   curl https://pyenv.run | bash\n   这将下载并运行pyenv的安装脚本。\n   ```\n\n4. 添加pyenv到你的bash配置文件。打开你的bash配置文件（例如：\n\n   ```bash\n   .bashrc\n   ```\n\n   ```bash\n   .bash_profile\n   ```\n\n   或\n\n   ```bash\n   .zshrc\n   ```\n\n   ）并在末尾添加以下行：\n\n   ```bash\n   export PATH=\"$HOME/.pyenv/bin:$PATH\"\n   eval \"$(pyenv init -)\"\n   eval \"$(pyenv virtualenv-init -)\"\n   \n   保存并关闭文件后，运行以下命令使配置文件生效：\n   source ~/.bashrc\n   ```\n\n5. 验证pyenv是否成功安装。运行以下命令：\n\n   ```bash\n   pyenv --version\n   \n   如果显示pyenv的版本信息，则表示安装成功。\n   ```\n\n6. 安装Python版本。现在你可以使用pyenv来安装不同的Python版本。例如，要安装Python 3.9.0，运行以下命令：\n\n   ```bash\n   pyenv install 3.9.0\n   \n   等待安装完成。\n   ```\n\n7. 设置全局Python版本。如果你想将Python 3.9.0设置为全局Python版本，运行以下命令：\n\n   ```bash\n   pyenv global 3.9.0\n   \n   这将在系统中将Python 3.9.0设置为默认版本。\n   ```\n\n### windows系统powershell/terminal无法使用conda虚拟环境\n\n```bash\nconda init powershell\n```\n\n重启终端即可\n\n### [Git merge \u0026 rebase 区别和用法](https://www.bilibili.com/video/BV1Vc411S7gv/?spm_id_from=333.1007.top_right_bar_window_history.content.click\u0026vd_source=212ff176b778171e26249f81cfb5bdbc)\n\n## Remember\n\n### 农的各种api\n\n英雄信息、原画等。\n\nhttps://blog.csdn.net/qq_39046854/article/details/118499126\n\n英雄最低战力\n\nhttps://zhuanlan.zhihu.com/p/520449999\n\n### 充电宝选购\n\n**10000 - 20000mAh（不含20000）**\n\n- 京东京造JP266 ￥89.9\n- 倍思自带线充电宝 ￥85\n- 爱国者C10PD ￥79.9\n- 华为66W充电宝 ￥339\n- 品胜充电宝 ￥99\n- 小米充电宝 33W 口袋版 ￥179\n- 酷态科 10号超级电能棒 ￥199（听说是唯一真神）\n- 紫米 迷你移动电源 ￥179\n- 紫米充电宝 - 口袋版 ￥109\n- 纽曼自带线充电宝 ￥69\n- 羽博 二合一充电宝 ￥85\n- 半岛铁盒A12充电宝 ￥59.9\n- 机乐堂 充电宝 ￥149\n- 机乐堂小果冻 ￥139\n- 小米 自带线充电宝 ￥129\n- OPPO 闪充充电宝 ￥179\n\n**20000mAh以上**\n\n- 绿联 PB201 ￥129\n- ~~小米移动电源3~~ ￥199（没有数显）\n- ~~京造 JP256~~ ￥89.9（没有数显）\n- 罗马仕 Sense 6+ ￥99（性价比不如京造。接口多）\n- 紫米20号移动电源 ￥374（100W pd快充）\n- ~~科诺克 迷你充电宝~~ ￥69（疑似虚标）\n- 倍思明充电宝 ￥159（似乎有点慢）\n- 冇心幻音 充电宝 ￥178\n- 哇牛能量块 3号 ￥179（轻、自带线）\n- 睿量 充电宝 ￥229\n\n**参考文献**\n\nhttps://www.bilibili.com/video/BV1fN4y127BM/?spm_id_from=333.337.search-card.all.click\u0026vd_source=212ff176b778171e26249f81cfb5bdbc\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmileexpression%2Fmemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmileexpression%2Fmemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmileexpression%2Fmemo/lists"}