计算机
c base
c++ 基础 作用域及生命周期
c++ template
c++ 内存视角
c++ 函数指针
c++ 基础 基础语法
c++ 多线程
c++ 性能
c++ 类 基础
c++ 类 对象模型 类析构
c++ 类 设计模式
cmake
CMAKE环境搭建 windows
创建第一个cmakelists.txt
构建稍复杂的项目
动态链接库
EX1
EX1 START
EX1 ANSWER
EX2
EX2 START
EX2 ANSWER
EX3
EX3 START
EX3 ANSWER
变量
控制流程
函数和宏
查找和使用外部库
生成器表达式
qt 开发环境
qt c++
理解QObject 1
理解QObject 4
qt index
qt qml quick
qt ui
qt 多线程
数据结构 数组
PC问题监控及排查
PC程序性能优化
OS
TOOL
C++ STL
编程漫谈
C++实战-生产者 消费者流水线
C++实战 IO
本站点使用 MrDoc 构建
-
+
TOOL
# photoshop 工作流程 第一阶段:准备工作(建楼前的图纸) 新建文档(Ctrl+N): 用途:根据最终用途设置尺寸。如果是印刷品(如海报、画册),单位选厘米/毫米,分辨率设300像素/英寸,颜色模式CMYK。如果是屏幕显示(如网页、朋友圈海报),单位选像素,分辨率72像素/英寸,颜色模式RGB。 出血线:如果设计内容需要铺满印刷品边缘(比如背景色铺满整个页面),在新建时设置"出血"(通常3mm),这样印刷裁切后不会留白边。 置入素材与归档: 执行"文件 > 置入嵌入对象",将所有需要用到的图片、logo拖入PS。 养成好习惯:在图层面板里,把每个图层双击改名(比如"背景图"、"主标题"、"抠出的人物"),方便后续查找。 第二阶段:搭建骨架(构图与布局) 这一阶段的目标是把所有的视觉元素都摆放到位。 建立辅助线: 按 Ctrl + R 调出标尺,从标尺边缘拖出参考线,划分出版面的区域(如页眉、主体位置、页脚)。专业的参考线布局有助于提升作品的秩序感。 处理素材(结合你的技能): 抠图:使用你之前了解的钢笔工具或快速选择工具,将主体从背景中分离出来,添加图层蒙版。 调色:新建色相/饱和度或曲线调整图层(剪贴蒙版到素材层),让不同素材的色调统一,避免出现"脸色发黄的人站在冷色调背景里"的情况。 确定层级: 调整图层顺序(背景层在下,主体层在上,文字层在最上)。 第三阶段:精雕细琢(添加效果与细节) 这是最出效果的一步,也是让设计"活起来"的关键。 添加图层样式: 双击需要添加效果的图层,调出图层样式面板。 投影:给文字或产品添加淡淡的投影,使其从背景中浮起来。 描边:让文字更清晰可辨。 渐变叠加:给背景或形状添加丰富的色彩过渡。 光影塑造: 新建一个图层,混合模式改为柔光,用柔边画笔(不透明度10%-20%),前景色选白色在受光面涂抹提亮,选黑色在背光面涂抹压暗。这个技巧能让平面素材变得立体。 文字排版: 使用文字工具(T)。注意字号大小的对比(标题要大、内文要小)、字体的搭配(黑体配黑体、衬线体配衬线体,不超过三种字体)。 第四阶段:输出交付(收尾与导出) 盖印与检查: 按 Ctrl + Alt + Shift + E,可以在最上方将所有可见图层合并成一个新图层(这叫"盖印"),方便查看整体效果。 检查是否有错别字、素材是否缺失。 存储源文件: 保存一份 PSD 格式的文件,保留所有图层、蒙版、效果,方便以后修改。 导出成图: 菜单:文件 > 导出 > 导出为。 JPG/PNG:用于网络发布或预览。如果背景是透明的(如logo),选PNG。 PDF:用于印刷或发送给客户打印。 一个简单的海报设计流程示例 新建:A4大小、300分辨率、CMYK。 背景:拖入一张天空图片,用"曲线"调整图层压暗颜色,方便后续放白色文字。 主体:用钢笔工具抠出产品(比如一瓶香水),放在画面中央偏下。 效果:给香水图层添加投影,让它"站"在背景上。新建柔光图层,给香水的高光点涂白色。 文字:打上标题,添加渐变叠加效果,颜色从金色到浅黄。 导出:保存PSD,另存一份JPG发给甲方。 ref 快速选择工具: 智能抠图 魔棒工具 局部颜色修改 智能抠图 # # anki 插件 472573498 1468920185 2055492159 yomitan asbplayer 909420026 # scoop 安装scoop ```c powershell: irm get.scoop.sh | iex Start-Process powershell -Verb RunAsUser //以非管理员的身份运行 scoop Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force //绕过策略限制 scoop .\install.ps1 -ScoopDir 'D:\softwares\Scoop' -ScoopGlobalDir 'F:\softwares\Scoop\GlobalScoopApps' -NoProxy scoop bucket add <bucket> <bocketurl> # 添加 Bucket scoop install <bucket>/<app> # 安装指定 Bucket 中的 App scoop install git scoop bucket rm main scoop bucket add main 'https://gitee.com/scoop-bucket/main' scoop bucket add extras 'https://gitee.com/scoop-bucket/extras' scoop bucket add main 'https://hub.fgit.ml/ScoopInstaller/Main' scoop bucket add extras 'https://hub.fgit.ml/ScoopInstaller/scoop-extras' scoop bucket add versions 'https://hub.fgit.ml/ScoopInstaller/Versions' scoop bucket add jetbrains 'https://hub.fgit.ml/Ash258/Scoop-JetBrains' scoop bucket add java 'https://hub.fgit.ml/ScoopInstaller/Java' scoop bucket add dorado 'https://hub.fgit.ml/chawyehsu/dorado' scoop bucket add scoopet 'https://hub.fgit.ml/ivaquero/scoopet' ``` # icloud mklink /D "C:\iCloudDrive" "D:\icloud\iCloudDrive" # conda conda config --set auto_activate_base false //打开终端,conda虚拟环境启动默认关闭 # vscode ctrl+shift+p \\打开命令面板 ctrl+shift+e \\打开资源管理器 # 威纶通 连接 工程文件下载、上载 # vim :scriptnames \\查看所有被加载的脚本文件 :verbose \\查看vim加载的详细过程 :echo $MYVIMRC \\当前正在使用的配置文件路径 Ctrl + F:向下滚动一页 Ctrl + B:向上滚动一页 Ctrl + D:向下滚动半页 Ctrl + U:向上滚动半页 G:跳转到文件的最后一行 gg:跳转到文件的第一行 :99%:跳转到文件的99%位置 :reg 列出所有的录制宏 # docsify - 安装 ```bash // install node.js node -v //查看node版本 npm -v //查看npm版本 npm i docsify-cli -g ``` - 内容编排 docsify init docs //初始化 \ README为首页展示文件,index.html中编写配置项(需熟悉html、css、javascript) - 部署 docsify serve docs -p 4000 //打开服务器 - 配置 支持latex公式:简单来说,用js脚本解析、展示 - ref [](https://angry-swanson-b4e47b.netlify.app/zh-cn/configuration) [github docsify-latex](https://scruel.github.io/docsify-latex/#/) [](https://katex.org/docs/supported) # msys2 msys2 download https://mirrors.aliyun.com/msys2/distrib/x86_64/ - [ ] msys配置 # solidworks 视图: ctrl+xx 平移 ctrl+中键 alt+中键 shift+中键 特征操作: alt+左键+xx 特征操作 # Docker docker安装的bash脚本放在了虚拟机 ``` docker install sudo apt remove docker docker-engine docker.io containerd runc sudo apt update sudo apt install -y ca-certificates curl gnupg lsb-release sudo mkdir -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt update sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin sudo docker run hello-world ``` sudo apt install docker - add mirror web /etc/docker/deamon.json { "registry-mirrors": [ "https://registry.docker-cn.com" ] } $ sudo systemctl daemon-reload $ sudo systemctl restart docker - 容器 docker run [OPTIONS] IMAGE [COMMAND] [ARG...] docker run -itd --rm --name mysql-test -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 mysql docker port xx -v bind mount a volume -e set envi variables -p 3306:3306 -i 交互式操作 -t 终端 --rm 退出容器后删除 -d --detach run container in background and print container ID - 镜像 docker hub docker search mysql docker pull [OPTIONS] NAME[:TAG|@DIGEST] -a -q pull from library/mysql ;; tag:latest $ docker image ls $ docker image rm $ docker system df $ docker build start a build - 数据问题 docker volume list - Dockerfile docker ps docker logs docker command --help - 概述 docker是一种虚拟化手段,通过重新组织计算机资源,并提供一套管理系统,来达到摆脱具体的计算机硬件的目的\ docker提供一套文件系统,所以其具有原生Linux调用资源的速度\ [rsc : dockerhub](https://hub.docker.com/search?q=) - 安装 ```bash curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun curl -sSL https://get.daocloud.io/docker | sh ``` - 架构 - 使用 环境构建: 操作系统\ 网络\ ```bash Usage: docker [OPTIONS] COMMAND A self-sufficient runtime for containers Common Commands: run Create and run a new container from an image exec Execute a command in a running container ps List containers build Build an image from a Dockerfile pull Download an image from a registry push Upload an image to a registry images List images login Log in to a registry logout Log out from a registry search Search Docker Hub for images version Show the Docker version information info Display system-wide information Management Commands: builder Manage builds buildx* Docker Buildx (Docker Inc., v0.13.0) checkpoint Manage checkpoints compose* Docker Compose (Docker Inc., v2.24.7) container Manage containers context Manage contexts image Manage images manifest Manage Docker image manifests and manifest lists network Manage networks plugin Manage plugins system Manage Docker trust Manage trust on Docker images volume Manage volumes Swarm Commands: config Manage Swarm configs node Manage Swarm nodes secret Manage Swarm secrets service Manage Swarm services stack Manage Swarm stacks swarm Manage Swarm Commands: attach Attach local standard input, output, and error streams to a running container commit Create a new image from a container's changes cp Copy files/folders between a container and the local filesystem create Create a new container diff Inspect changes to files or directories on a container's filesystem events Get real time events from the server export Export a container's filesystem as a tar archive history Show the history of an image import Import the contents from a tarball to create a filesystem image inspect Return low-level information on Docker objects kill Kill one or more running containers load Load an image from a tar archive or STDIN logs Fetch the logs of a container pause Pause all processes within one or more containers port List port mappings or a specific mapping for the container rename Rename a container restart Restart one or more containers rm Remove one or more containers rmi Remove one or more images save Save one or more images to a tar archive (streamed to STDOUT by default) start Start one or more stopped containers stats Display a live stream of container(s) resource usage statistics stop Stop one or more running containers tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE top Display the running processes of a container unpause Unpause all processes within one or more containers update Update configuration of one or more containers wait Block until one or more containers stop, then print their exit codes Global Options: --config string Location of client config files (default "/home/shuai/.docker") -c, --context string Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with "docker context use") -D, --debug Enable debug mode -H, --host list Daemon socket to connect to -l, --log-level string Set the logging level ("debug", "info", "warn", "error", "fatal") (default "info") --tls Use TLS; implied by --tlsverify --tlscacert string Trust certs signed only by this CA (default "/home/shuai/.docker/ca.pem") --tlscert string Path to TLS certificate file (default "/home/shuai/.docker/cert.pem") --tlskey string Path to TLS key file (default "/home/shuai/.docker/key.pem") --tlsverify Use TLS and verify the remote -v, --version Print version information and quit Run 'docker COMMAND --help' for more information on a command. ``` - 容器 ```bash docker ps docker ps -a docker run [选项] [镜像名] [命令] docker start/stop/rm [容器id] docker export docker inspect <container_id> ``` - image - volume ```bash docker [OPTIONS] command <<run>> docker run docker run [OPTIONS] IMAGE [COMMAND] [ARG...] OPTION -i interactive -t allocate a pseudo-TTY -v bind mount a volume -d detach (run container in background and print container) --rm mine: docker run ubuntu:15.10 /bin/echo "hello world" sudo docker run -itd --rm --name mysql-test -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 mysql sudo docker run --rm -ti -v /home/shuai/apeishuai:/nikola dragas/nikola nikola init docker run <coinxx-id> -it bin/bash docker安装的bash脚本放在了虚拟机 ``` ```bash >image [[g:/emacs-notes/Tool/inbox/Docker.org::build][build]] 通过Dockerfile构建docker镜像 Dockerfile 的指令每执行一次都会在 docker 上新建一层。 [[g:/emacs-notes/Tool/inbox/Docker.org::run][run]] docker system/image/container prune 清理未使用过的镜像、容器、网络和卷 docker logs [容器id] docker inspect [容器id] >xx docker network inspect [网络id] docker cp [] []:[] docker exec -it [容器id] [命令] >build > composed exec ps pull images login logout search version info image volume compose* builder ``` - 网络(容器互访) ```bash [[https://www.cnblogs.com/shenh/p/9714547.html][Docker容器互访三种方式 - 三只松鼠 - 博客园]]\ /Entered on/ [2023-04-24 周一 15:27] Usage: docker network COMMAND Manage networks Commands: connect Connect a container to a network create Create a network disconnect Disconnect a container from a network inspect Display detailed information on one or more networks ls List networks prune Remove all unused networks rm Remove one or more networks Usage: docker network create [OPTIONS] NETWORK Create a network Options: --attachable Enable manual container attachment --aux-address map Auxiliary IPv4 or IPv6 addresses used by Network driver (default map[]) --config-from string The network from which to copy the configuration --config-only Create a configuration only network -d, --driver string Driver to manage the Network (default "bridge") --gateway strings IPv4 or IPv6 Gateway for the master subnet --ingress Create swarm routing-mesh network --internal Restrict external access to the network --ip-range strings Allocate container ip from a sub-range --ipam-driver string IP Address Management Driver (default "default") --ipam-opt map Set IPAM driver specific options (default map[]) --ipv6 Enable IPv6 networking --label list Set metadata on a network -o, --opt map Set driver specific options (default map[]) --scope string Control the network's scope --subnet strings Subnet in CIDR format that represents a network segment bridge 默认,每个容器都会获得一个独立ip host 使用宿主机的网络堆栈 overlay 创建一个覆盖网络,用于docker swarm集群 macvaln 创建一个MAC虚拟局域网,每个容器都会获得一个独立的MAC地址 none 创建一个没有任何网络接口的网络 transparent 创建一个透明模式的网络,通常与第三方网络插件一块用 docker network create -d macvlan \ --subnet=192.168.1.0/24 \ --gateway=192.168.1.1 \ -o parent=eth0 \ my_macvlan_network docker run -it --name --network <vridge> --network-alias <><> ``` - xxx - 本地image构建 docker build -t your_image_name .\ [[https://zhuanlan.zhihu.com/p/34488175][使用 Docker 构建自己的镜像 - 知乎]]\ /Entered on/ [2023-04-24 周一 15:29] config: <<build>> FROM centos RUN yum -y yum install wget \ && wget -O redis.tar.gz && tar -xvf redis.tar.gz cmd: docker build -tn nginx:v3 - 数据保存 -v <host_path>:<container_path>\ -p <host_port>:<container_port>\ sudo docker run --rm -ti -v /yourpath:/nikola dragas/nikola nikola init\ sudo docker list - 配置 - dockerfile ```bash from xx workdir /app run apt-get update && \ apt-get install -y python3 && \ apt-get clean env lang c.utf-8 cmd ["python3","app.py"] env set environment variables from create a new build stage from a base image label add metadata to an image run execute build commands volume create volume mounts workdir change working directory https://docs.docker.com/reference/dockerfile/#overview ``` - docker-compose ```bash version: '3' service: web: db: port depends_on environment volume networks: mynetwork: external: true ``` - ref [Docker安装指南](https://www.moha.online/en/node/111) # GDB * GDB 查看源码 [[/media/shuai/wxf files/shuai-files/Tool/test/gdb_Program.c][example 1]] [[/media/shuai/wxf files/shuai-files/Reference/《GDB》.org][GDB handout]] * Reference [[https://felix-knorr.net/posts/2022-02-27-direct-gdb.html][Felix Blog - Debugging with GDB]] /Entered on/ [2022-05-07 六 20:49] [[https://zhuanlan.zhihu.com/p/483372519][用 gdb 学 C 语言 - 知乎]] /Entered on/ [2022-05-16 一 00:05] [[https://www.adacore.com/gems/gem-119-gdb-scripting-part-1][Gem #119 : GDB Scripting— Part 1 | AdaCore]] /Entered on/ [2022-05-27 五 19:19] [[https://www.adacore.com/gems/gem-120-gdb-scripting-part-2][Gem #120 : GDB Scripting — Part 2 | AdaCore]] /Entered on/ [2022-05-27 五 19:19] * 知识点分解 GDB命令:大类、小类 ptype GDB使用流程 b run n s p x GDB原理 GDB案例 * get in and out of gdb * running programs under gdb * stop and continue * examining the stack * examining source files * examining data * examining the symbol table * alter execution # Emacs * orgmode C-c C-, src:插入代码块 无序列表 以 - * +字符开头 有序列表 以 1. 1)字符开头 脚注: C-c C-x f:在当前光标位置自动添加一个脚注,并跳转光标到文档末尾的脚注描述位置 ` * RSS [[https://www.maxieewong.com/Maxiee%20%E7%9A%84%20Emacs%20%E4%B9%8B%E6%97%85%EF%BC%9ARSS%20%E9%98%85%E8%AF%BB%E5%99%A8.html][fleed rss]] [[https://maxieewong.com/Maxiee%20%E7%9A%84%20Emacs%20%E4%B9%8B%E6%97%85%EF%BC%9ARSS%20%E9%98%85%E8%AF%BB%E5%99%A8.html][Maxiee 的 Emacs 之旅:RSS 阅读器 - Maxiee Blog]] /Entered on/ [2022-11-29 周二 10:51] [[http://blog.lujun9972.win/emacs-document/blog/2016/09/06/%E5%9C%A8emacs%E4%B8%AD%E7%94%A8elfeed%E9%98%85%E8%AF%BB%E4%BD%A0%E7%9A%84rss-feeds/index.html][在Emacs中用elfeed阅读你的RSS-feeds - EMACS-DOCUMENT]] /Entered on/ [2022-11-29 周二 17:15] [[https://nullprogram.com/blog/2015/12/03/][9 Elfeed Features You Might Not Know]] /Entered on/ [2022-11-30 周三 22:19] [[https://koustuvsinha.com/post/emacs_research_workflow/][A workflow xx ML rearch papers with Emacs]] /Entered on/ [2022-11-30 周三 22:19] <2022-11-29 周二 16:29>测试,elfeed能正常抓取信息 配置代理,能正常抓取信息。怎么测试订阅源有效呢 <2023-01-25 周三 11:22>在打开entry的瞬间,用电量会显示非常大,电源非常热,为什么呢?但是性能较好的电脑依然可以正常显示rss,没问题的 * other GTD: tool efficiency environment 如何测量函数的运行时间 #+BEGIN_SRC emacs-lisp (benchmark-elapse (sleep-for 2) (message "Hello!")) #+END_SRC * Now Emacs功能列表 1 GTD(基于org-mode,emacs本身)+ OKR 2 find-file and search-text(command: grep and find) windows(GUNwin):https://gnuwin32.sourceforge.net/packages.html linux shell command 具有稳定性 (解析中文有点问题,是一个依赖的问题吗) <2023-01-25 周三 11:16> 关键词放一份中文拼音缩写就行了+GTD 就很完美 3 org-protocol capture bookmark: [[http://tech.memoryimprintstudio.com/org-capture-from-external-applications/][Org Capture from External Applications – Emacs, Arduino, Raspberry Pi, Linux and Programming etc]] /Entered on/ [2022-10-31 一 14:41] [[https://zhuanlan.zhihu.com/p/58215837][在 Firefox 上使用 Org 协议捕获 URL - 知乎]] /Entered on/ [2022-11-10 周四 20:53] [[https://orgmode.org/worg/org-contrib/org-protocol.html][org-protocol.el – Intercept calls from emacsclient to trigger custom actions]] /Entered on/ [2023-01-25 周三 11:27] [[https://zhuanlan.zhihu.com/p/58215837][在 Firefox 上使用 Org 协议捕获 URL - 知乎]] /Entered on/ [2023-01-25 周三 11:28] <2022-11-08 周二 22:26> 作用机理:emacs打开时会打开server服务 javascript调用protcol服务与server通讯,按照模板弹出一个frame,C-c C-c弹窗消失 windows下为什么成功不了呢? <2022-11-10 周四 20:54> 好吧,是javascript的问题,不管了 <2023-01-25 周三 10:37> 迁移尝试了一下,就是个索引文件的问题,需要注册表和环境变量配合 [[file:images/2023-01-25_11-18-22.png][Capture-2023-01-25_11-18-22.png]] 注册表 [[file:images/2023-01-25_11-19-03.png][Capture-2023-01-25_11-19-03.png]] 环境变量 4 screenshot win: snipaste etc linux: gnome-screenshot <2023-01-25 周三 10:43> 重新测试 msys需要引入windows的环境变量 [[file:images/2023-01-25_11-19-22.png][Capture-2023-01-25_11-19-22.png]] 环境变量 5 记账系统 ledger 只要有数据文件,因为其是一个单命令行程序,哪个系统都行 6 rss read (finished) 6 写博客 nikola 7 Latex C-c C-x C-l org-mode下显示latex 8 Elpa package management: 9 写代码 etags: https://blog.csdn.net/Emacx/article/details/6067415 * 实际需求 环境变量 M-x getenv * Emacs help system apropos-command show all commands that match a given pattern Info Manual: C-h i Apropos: variable key C-h a Describe system: C-h m You have typed C-h, the help character t Start the Emacs learn-by-doing tutorial. C-a Information about Emacs. i Start the Info documentation reader: read included manuals. e Go to the *Messages* buffer which logs echo-area messages. f FUNCTION Display documentation for the given function. F COMMAND Show the Emacs manual’s section that describes the command. C-f Emacs FAQ. C-h m runs the command describe-mode (found in global-map), which is an interactive compiled Lisp function in ‘help.el’. It is bound to C-h m, <f1> m, <help> m, <menu-bar> <help-menu> <describe> <describe-mode>. (describe-mode &optional BUFFER) documentation of current major mode and minor modes. A brief summary of the minor modes comes first, followed by the major mode description. This is followed by detailed descriptions of the minor modes, each on a separate page.e * Emacs 结构 frame buffer mode key-board buffer displayed in a window Buffer: the buffer is the data structure all files are buffers:talk to another process I/O minibuffer Terminal emacs session Mode Dired-mode : mode for "editing" directory listing : Ctrl+h dired 环境变量: Most major modes run one or more mode hooks as the last step of initialization. Mode hooks are a convenient way to customize the behavior of individual modes; they are always normal. For example, here’s how to set up a hook to turn on Auto Fill mode in Text mode and other modes based on Text mode: A lambda expression, by itself, has no name; it is an anonymous function. * Log <2021-01-14 四 00:44> 我现在觉得emacs就是一堆函数和一堆变量组成的,除了这些,还有elisp语法,如add-to-list,setq,car cdr cons 和scheme类似,基本的数据结构只有一种:列表,剩下的就是对列表的各种操作,语法糖 <2021-05-01 六 14:02>emacs使用emacs lisp,函数式编程 《若为自由故》 <2021-01-21 四 19:04> 基础:变量 函数 运算符 正则表达式 布尔运算 setq defun if when cond while let* message dolist mapcar <2021-05-01 六 13:58>重回命令行 <2021-06-30 三 18:02>org+nikola [[~/shuai-files/Reference/Agenda View.org][Agenda View]] <2021-10-17 日 13:47>这次是真的重回命令行 <2022-11-18 周五 23:11> emacs占用了我太多时间,后面花时间完善工作流后就不管了 * Ref http://ergoemacs.org/index.html https://github.com/empenguinxh/emacs-tutorial-in-chinese/blob/master/start_from_0_emacs_tutorial_2015.md https://space.bilibili.com/210738994/channel/detail?cid=125953 https://www.bilibili.com/video/BV1MW411i72D https://github.com/emacs-tw/emacs-101-beginner-survival-guide [[~/shuai-files/book-notes/MasterEmacs.org][book mastering emacs]] [[https://github.com/mgmart/capture][mgmart/capture: emacs org-mode protocol handler for macOS]] /Entered on/ [2022-11-14 周一 11:24] [[chrome-distiller://c036243e-b18b-42c7-afdc-da7bfea2dcd8_7ebe6d04a0849cf69e10bac71cb8570124ba89d11dba0540bb1a3eb3f16f8f6b/?title=Emacs+%E6%8F%92%E4%BB%B6%E5%BC%80%E5%8F%91%E6%89%8B%E5%86%8C&time=12006525&url=https%3A%2F%2Fmanateelazycat.github.io%2Femacs%2F2022%2F11%2F18%2Fwrite-emacs-plugin.html][Emacs 插件开发手册 - 阅读器模式]] /Entered on/ [2022-11-18 周五 23:10] [[https://www.gnu.org/software/emacs/manual/html_node/elisp/index.html][Top (GNU Emacs Lisp Reference Manual)]] /Entered on/ [2022-11-18 周五 23:10] powershell 权限 https://www.jianshu.com/p/4eaad2163567 image screenshot emacs https://www.reddit.com/r/emacs/comments/jczcv0/paste_an_image_into_an_org_file_windows/ [[https://www.bilibili.com/video/BV13g4y167Zn?p=51&spm_id_from=pageDriver][Emacs高手修炼手册]] /Entered on/ [2022-02-09 三 00:40] [[https://github.com/ginqi7/dictionary-overlay][ginqi7/dictionary-overlay: dictionary-overlay]] /Entered on/ [2022-11-17 周四 18:00] * 其他 C-x C-e ^eval-expression ^eval-buffer (setq a 111) (setq b "abc") ;; (defun hello (a)) ;; (message "") (interactive) + - * / string: concat substring list (setq mylist '("a" "b" 1 2)) car cdr cons() statement: (if) (cond) (while) (or/and) (dolist) (let*) (mapcar) (shell-command-to-string "echo hello") M-x (helm-M-x) M-! (shell-command) 定位emacs命令 C-h k C-x C-f C-h a (查找需要的命令) M-x eval-buffer M-x eval-region M-x eval-expression C-x C-e (global-set-key keysequence command) 假如我清除了某些函数,好像这个函数的索引存在,对执行有影响 ** 包管理 1 elpa包管理 配置melpa吃尽了苦头,我决定用科学上网,这样一来就没那么多破事 改变变量就可以,真的是 2 command package-list (use-package) 管理包 M-x list-packages 打开包列表 基于dired •【Enter ↵】 显示包相关帮助 •【i】 标记为要安装 •【u】取消安装或卸载标记 •【d】 标记为要卸载 •【x】 执行安装或卸载 •【r】 刷新列表 •【f】 输入关键字过滤列表,按q恢复完整列表 3 非1 2包管理: load-path export EMACSLOADPATH=/home/foo/.emacs.d/lisp: [[https://zhuanlan.zhihu.com/p/80184476][pdf阅读器--Zethu]] eww 输入url地址 [[https://www.itdaan.com/blog/2014/10/22/40eb801695d23b57da87c194f2b8fa3c.html][emacs做思维导图]] [[https://graphviz.gitlab.io/doc/info/lang.html][graphviz reference dot language]] https://graphviz.gitlab.io/pdf/dotguide.pdf [[http://www.graphviz.org/doc/info/attrs.html][refrerence attrs]] [[https://www.cnblogs.com/chenfanyu/archive/2013/01/27/2878845.html#sec-3-1][使用 emacs org-mode 画图 - chenfanyu - 博客园]] /Entered on/ [2022-02-08 二 17:25] 1 写完一个buffer,M-x eval-buffer ,buffer就会更新;eval-expression可以测试写的函数(这是测试elisp的方法) 2 Ctrl+h 最常用组合键 一般查询 f(function) v(variable) k(keybinding) P(package) 具体得根据你的emacs配置,如果没有就自己配置。我用的Spacemacs,C-c . 插入日期,C-u C-c . 插入日期+时间 Ctrl+g Ctrl+_ 撤销撤销 Ctrl+_ 撤销 ** org-mode each entry has a heading line that starts with one or more ‘*’ characters. any line that begins with the ‘#’ character is treated as a comment. 嵌入代码块:#+BEGIN_SRC [[http://www.360doc.com/content/14/1219/13/20545288_434126794.shtml][org-mode]] [[https://www.cnblogs.com/yangwen0228/p/6287455.html][插入图片 org-mode]] [[https://www.xuebuyuan.com/217288.html][图片自动显示 org-mode]] <2021-05-12 三 20:41> 文件操作: d x yes Ctrl+x Ctrl+q 字体操作: *粗体* /斜体/ 链接: 内部链接(锚点) <<happy>> [happy]] 注:数字不顶用,中文可能也不顶用 查找过程:关键词,没有解决;看原文档,没有解决;再次查找,解决(二手信息),效率不高(需要做优化) C-c l 保存至buffer中 C-c C-l 插入链接 C-c C-o 打开链接 C-c % 记忆位置 C-c & 从%的记录中回溯 ** GTD系统 [[https://blog.jethro.dev/posts/capturing_inbox/][01 jethro workflow]] [[https://github.com/rougier/emacs-gtd][02 rougier workflow]] 4.4.1 规划时间 ~~~~~~~~~~~~~~~ * C-c C-s 规划日程 * C-c C-s 设置期限 4.4.2 记录时间 ~~~~~~~~~~~~~~~ * C-c C-x c-i 开始计时 * C-c C-x C-o 结束计时 * C-c C-x C-x 取消计时 4.4.3 分析时间 ~~~~~~~~~~~~~~~ * C-c C-x C-r 创建今日的时间统计表格 * C-c a agenda view * R 创建时间统计表格 4.5 导出 ========= * C-c C-e ** Latex环境配置 Linux安装Latex: 1 sudo apt-get install textlive-full [[https://max.book118.com/html/2018/0103/147043242.shtm][emacs配置latex]] <2021-09-16 四 23:25>经过排查发现,latex-mode的配置有一部分并没起作用,要真的吃透emacs,不然这样的问题还会发生 (pushnew! initial-frame-alist '(width . 200) '(height . 55)) (add-hook 'window-setup-hook #'toggle-frame-maximized) (add-hook 'window-setup-hook #'toggle-frame-fullscreen) 第一行是调整窗口大小,第二行是最大化,第三行是全屏。根据需要选择,放在config.el里就行。 Language Server Protocol http://ergoemacs.org/emacs/emacs_alias.html find-my-files plugin Ctrl h i $PATH $HOME auto-mode-alist :when file open, it use related mode major mode setting minor mode setting different buffer has different function *Message* show what your emacs changed *scratch* write your thoughts conveniently mbsync mpop isync is a command-line application that synchronizes mailboxes isync is a project name, mbsync is the current executable name 1 mu download mu is a index/search tool for searching email. mu is a tool for dealing with e-mail messages stored un the Maildir-format,or Unix-like system 2 mu4e download mu4e is an email client for Emacs. it`s based on the mu email indexer/searcher 3 offlineimap offline is a python tility to sync from IMAP servers. it does not work with the POP3 protocol or mbox, and is usually paired with a MUA such as Mutt 4 mbsync mpop sync emails between remote email server and a local folder on computer Kail安装racekt-mode: racket-mode 配置“tab”自动补全 配置快捷键 # manictime - 破解版下载(某些功能破解版才有) - 层级标签 没有层级标签,用组合标签;组合标签能自动合并,比如(1,2,3)包含了标签1、2、3 群组查看: - 筛选 + "expression" "Telegram Web - Google Chrome" + #"regular expression" -".*/ X.*" 这个是twitter内容 "Telegram Web - Google Chrome" group:chrome group:note group:firefox google group:"google chrome"(microsoft or yahoo),包含里面字词的 manictime duration>1m end<6:00PM duration>1m10s <1h start>22:00 end>10:00PM - 数据备份与恢复 - sqlite pacman -Ss sqlite operate:\ sqlite3 testDB.db (create a new database) - 基本构成 Table : row column\ select # from table - start .help\ .show - database .databases list all the database \ .quit\ .dump | sqlite3 testDB.db .dump > testDB.sql\ - table create TABLE table_name()\ drop TABLE table_name\ insert into table_name values()\ alter TABLE table_name ADD column xxx TEXT\ delete from table_name\ where condition\ update table_name\ set column1 = value1, column2 = value2\ where [condition];\ .tables list all the tables\ .schema list all info about tables\ - ref [mysql 8.3 reference manual](https://dev.mysql.com/doc/refman/8.3/en/identifiers.html) [SQLite 附加数据库 | 菜鸟教程](https://www.runoob.com/sqlite/sqlite-attach-database.html)\ /Entered on/ [2022-11-26 周六 16:04] [千锋linux dba](https://www.bilibili.com/video/BV1Nb411e7YF?from=search&seid=12646141100636457968&spm_id_from=333.337.0.0)\ /Entered on/ [2022-02-07 一 13:53]\ [自学SQL网(教程 视频 练习全套)](http://xuesql.cn/)\ /Entered on/ [2022-06-01 三 12:57]\ [sqlzoo](https://sqlzoo.net/wiki/SQL_Tutorial)\ [自学sql网 answer](https://blog.csdn.net/LongYuTianTang/article/details/109443181)\ - Archive centos7\ download and install mysql # fxd - 思路 check酱检查网页变动\ server酱推送消息\ server酱严重依赖微信,pushdeer想要将推送功能慢慢从微信隔离,但是效果一般 - fxd安装 环境:linux 执行命令 ```bash 安装fxd-cli 首先使用终端进入你想要存放 fxd 代码的目录,没有可以创建一个,记为 FoldA。 npm install fxd-cli fxd-app-core 安装命令行和核心应用。 sudo ln -s $PWD/node_modules/fxd-cli/index.js /usr/local/bin/fxd 创建快捷命令。 (ps Windows 下建议使用 WSL 来运行) Check酱2 进入 FoldA npm install fxd-app-check-chan 安装Check酱2 sudo npx playwright install-deps 安装无头浏览器框架 playwright 依赖 ``` - check酱 ```bash fxd checkChan --url="https://ftqq.com/" --selectors=".entry-title" --list=true 监控ftqq网站,css选择器为.entry-title的元素,如果有变动就推送至server酱 ``` 用自己的云服务器搭建一个网页,就监控最简单的h1标签,看能否推送网页变化消息至手机 ```bash cd /home/shuai/tmp_site vim index.md python3 -m http.server 6500 gxd checkChan --url="http://xxx.xx.xx.xx(云服务器ip地址):6500" --selectors="h1",执行命令,当我们创建的h1标签内容变动时,手机appserver酱就会发出通知 ``` ```bash $ fxd chakChan help Version: 1.0.24 Usage: fxd check-chan [command] [options] Command - main|check|watch: --url <string> 要打开的页面 URL (required) --headless <boolean> 是否使用后台模式 (default: true) --selectors <string> 要检测的元素的 CSS 选择器,多个用逗号分隔 (default: body) (required) --prejs <string> 页面加载完成后执行的自定义 JavaScript 代码 --prejs_args <string> 自定义 JavaScript 代码的参数 --preplay <string> 页面加载完成后执行的自定义 Playwright 代码 --timeout <number> Playwright 操作超时时间,单位毫秒 (default: 60000) --list <boolean> 选择器是否返回元素列表 (default: false) --user <string> 浏览器使用的用户目录 (default: default) --format <string> 返回的数据格式 (default: text) --wait_type <string> 等待元素出现的方式 (default: domcontentloaded) Command - watch: --sendkey <string> 填入后,检测到变化时会调用Server酱发消息 --apprise_server_url <string> apprise的Server URL;需安装 apprise 命令行以后才可使用 --task_title <string> 显示在动态中,非命令行模式则无需填写 --task_icon <string> 显示在动态中,非命令行模式则无需填写 --feed_publish <boolean> 是否发布为Feed,将显示在动态页面 (default: false) --feed_as_public <boolean> Feed 是否公开 (default: true) ``` - server酱 [server酱](https://sct.ftqq.com/sendkey)\ 该网址微信登录,拿到key  通道用原生app,pushdeer不好使  原理是我们向server酱服务器发送消息,sever酱服务器通过具体通道传递消息 - ref [fxd check酱](http://fxd-doc.ftqq.com/cmd.html#%E9%80%9A%E8%BF%87server%E9%85%B1%E5%8F%91%E9%80%81%E9%80%9A%E7%9F%A5)\ [pushdeer](https://www.pushdeer.com/dev.html)\ [server酱](https://sct.ftqq.com/sendkey) # wireshark wireshark fliter display: tcp.port in {80, 443, 8080} tcp.port == 80 || tcp.port == 443 || tcp.port == 8080 [wireshark display fliter](https://www.wireshark.org/docs/wsug_html_chunked/ChWorkBuildDisplayFilterSection.html) - normal ```c normal usage: tshark -D // list all interface tshark -i x -c x -w x // capture and export file ``` ```c -D, --list-interfaces print list of interfaces and exit -c <packet count> stop after n packets (def: infinite) -w <outfile|-> write packets to a pcapng-format file named "outfile" -i <interface>, --interface <interface> ``` - man ```c TShark (Wireshark) 4.2.3 (v4.2.3-0-ga15d7331476c) Dump and analyze network traffic. See https://www.wireshark.org for more information. Usage: tshark [options] ... Capture interface: -i <interface>, --interface <interface> name or idx of interface (def: first non-loopback) -f <capture filter> packet filter in libpcap filter syntax -s <snaplen>, --snapshot-length <snaplen> packet snapshot length (def: appropriate maximum) -p, --no-promiscuous-mode don't capture in promiscuous mode -I, --monitor-mode capture in monitor mode, if available -B <buffer size>, --buffer-size <buffer size> size of kernel buffer (def: 2MB) -y <link type>, --linktype <link type> link layer type (def: first appropriate) --time-stamp-type <type> timestamp method for interface -D, --list-interfaces print list of interfaces and exit -L, --list-data-link-types print list of link-layer types of iface and exit --list-time-stamp-types print list of timestamp types for iface and exit --update-interval interval between updates with new packets (def: 100ms) Capture stop conditions: -c <packet count> stop after n packets (def: infinite) -a <autostop cond.> ..., --autostop <autostop cond.> ... duration:NUM - stop after NUM seconds filesize:NUM - stop this file after NUM KB files:NUM - stop after NUM files packets:NUM - stop after NUM packets Capture output: -b <ringbuffer opt.> ..., --ring-buffer <ringbuffer opt.> duration:NUM - switch to next file after NUM secs filesize:NUM - switch to next file after NUM KB files:NUM - ringbuffer: replace after NUM files packets:NUM - switch to next file after NUM packets interval:NUM - switch to next file when the time is an exact multiple of NUM secs RPCAP options: -A <user>:<password> use RPCAP password authentication Input file: -r <infile>, --read-file <infile> set the filename to read from (or '-' for stdin) Processing: -2 perform a two-pass analysis -M <packet count> perform session auto reset -R <read filter>, --read-filter <read filter> packet Read filter in Wireshark display filter syntax (requires -2) -Y <display filter>, --display-filter <display filter> packet displaY filter in Wireshark display filter syntax -n disable all name resolutions (def: "mNd" enabled, or as set in preferences) -N <name resolve flags> enable specific name resolution(s): "mnNtdv" -d <layer_type>==<selector>,<decode_as_protocol> ... "Decode As", see the man page for details Example: tcp.port==8888,http -H <hosts file> read a list of entries from a hosts file, which will then be written to a capture file. (Implies -W n) --enable-protocol <proto_name> enable dissection of proto_name --disable-protocol <proto_name> disable dissection of proto_name --only-protocols <protocols> Only enable dissection of these protocols, comma separated. Disable everything else --disable-all-protocols Disable dissection of all protocols --enable-heuristic <short_name> enable dissection of heuristic protocol --disable-heuristic <short_name> disable dissection of heuristic protocol Output: -w <outfile|-> write packets to a pcapng-format file named "outfile" (or '-' for stdout) --capture-comment <comment> add a capture file comment, if supported -C <config profile> start with specified configuration profile -F <output file type> set the output file type, default is pcapng an empty "-F" option will list the file types -V add output of packet tree (Packet Details) -O <protocols> Only show packet details of these protocols, comma separated -P, --print print packet summary even when writing to a file -S <separator> the line separator to print between packets -x add output of hex and ASCII dump (Packet Bytes) --hexdump <hexoption> add hexdump, set options for data source and ASCII dump all dump all data sources (-x default) frames dump only frame data source ascii include ASCII dump text (-x default) delimit delimit ASCII dump text with '|' characters noascii exclude ASCII dump text help display help for --hexdump and exit -T pdml|ps|psml|json|jsonraw|ek|tabs|text|fields|? format of text output (def: text) -j <protocolfilter> protocols layers filter if -T ek|pdml|json selected (e.g. "ip ip.flags text", filter does not expand child nodes, unless child is specified also in the filter) -J <protocolfilter> top level protocol filter if -T ek|pdml|json selected (e.g. "http tcp", filter which expands all child nodes) -e <field> field to print if -Tfields selected (e.g. tcp.port, _ws.col.info) this option can be repeated to print multiple fields -E<fieldsoption>=<value> set options for output when -Tfields selected: bom=y|n print a UTF-8 BOM header=y|n switch headers on and off separator=/t|/s|<char> select tab, space, printable character as separator occurrence=f|l|a print first, last or all occurrences of each field aggregator=,|/s|<char> select comma, space, printable character as aggregator quote=d|s|n select double, single, no quotes for values -t (a|ad|adoy|d|dd|e|r|u|ud|udoy)[.[N]]|.[N] output format of time stamps (def: r: rel. to first) -u s|hms output format of seconds (def: s: seconds) -l flush standard output after each packet -q be more quiet on stdout (e.g. when using statistics) -Q only log true errors to stderr (quieter than -q) -g enable group read access on the output file(s) -W n Save extra information in the file, if supported. n = write network address resolution information -X <key>:<value> eXtension options, see the man page for details -U tap_name PDUs export mode, see the man page for details -z <statistics> various statistics, see the man page for details --export-objects <protocol>,<destdir> save exported objects for a protocol to a directory named "destdir" --export-tls-session-keys <keyfile> export TLS Session Keys to a file named "keyfile" --color color output text similarly to the Wireshark GUI, requires a terminal with 24-bit color support Also supplies color attributes to pdml and psml formats (Note that attributes are nonstandard) --no-duplicate-keys If -T json is specified, merge duplicate keys in an object into a single key with as value a json array containing all values --elastic-mapping-filter <protocols> If -G elastic-mapping is specified, put only the specified protocols within the mapping file --temp-dir <directory> write temporary files to this directory (default: D:\softwares\msys64\tmp) Diagnostic output: --log-level <level> sets the active log level ("critical", "warning", etc.) --log-fatal <level> sets level to abort the program ("critical" or "warning") --log-domains <[!]list> comma-separated list of the active log domains --log-fatal-domains <list> list of domains that cause the program to abort --log-debug <[!]list> list of domains with "debug" level --log-noisy <[!]list> list of domains with "noisy" level --log-file <path> file to output messages to (in addition to stderr) Miscellaneous: -h, --help display this help and exit -v, --version display version info and exit -o <name>:<value> ... override preference setting -K <keytab> keytab file to use for kerberos decryption -G [report] dump one of several available reports and exit default report="fields" use "-G help" for more help ``` # yacy 安装docker、安装wsl2,执行该脚本即可 # docker安装 ```bash docker run -d --name yacy_search_server -p 8090:8090 -p 8443:8443 -v yacy_search_server_data:/opt/yacy_search_server/DATA --restart unless-stopped --log-opt max-size=200m --log-opt max-file=2 yacy/yacy_search_server:latest 这个脚本是用于在 Docker 中运行 YaCy 搜索服务器(YaCy Search Server)的命令。让我逐步解释这个脚本中的各个参数和选项: docker run:这是 Docker 命令,用于在容器中运行一个新的容器。 -d:这个选项表示在后台运行容器(detached 模式),即容器会在后台运行而不会占用当前终端。 --name yacy_search_server:这个选项指定了容器的名称为 yacy_search_server,方便后续对容器进行管理和操作。 -p 8090:8090 和 -p 8443:8443:这两个选项指定了容器内部端口和主机(宿主机)之间的映射关系。容器内的端口 8090 映射到主机的端口 8090,容器内的端口 8443 映射到主机的端口 8443,这样可以通过主机的这两个端口访问 YaCy 搜索服务器。 -v yacy_search_server_data:/opt/yacy_search_server/DATA:这个选项指定了容器内的一个数据卷挂载。将主机上的 yacy_search_server_data 卷挂载到容器内的 /opt/yacy_search_server/DATA 目录,这样可以在主机和容器之间共享数据。 --restart unless-stopped:这个选项指定了容器在退出时会自动重启,除非手动停止容器。 --log-opt max-size=200m --log-opt max-file=2:这两个选项指定了容器的日志设置。max-size=200m 表示单个日志文件的最大大小为 200MB,max-file=2 表示最多保留两个日志文件。 yacy/yacy_search_server:latest:这是要运行的容器的镜像名称和标签。在这里使用的是 YaCy 搜索服务器的最新版本。 ``` - 使用 本地浏览器打开"127.0.0.1:8090",如果部署到远程服务器,打开相应ip:port\ 登录初始化账号  批量输入想要爬取的网址  监控爬虫状态,可以随时终止  其他的一些定制化工作就不用做了\ 检索测试效果 - ref [yacy website](https://yacy.net/) # autohotkey - unit test - ref [autohotkey handbook](https://wyagd001.github.io/v2/docs/index.htm)
peipeo
2026年5月6日 20:06
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
Markdown文件
PDF文档(打印)
分享
链接
类型
密码
更新密码