cfanzp

个人Linux开发笔记

skynet-给debug_console添加ag搜索

skynet:debug console添加搜索功能 为什么要给skynet的debug console添加搜索功能? 使用skynet一段时间后,发现,在动态创建skynet service的情况下,如果service很多,有时很难找到我们想要找到我们要找的那个skynet服务,用skynet的list命令会罗列所有的服务,因此我们需要像grep,ag这样的命令功能来搜索skynet的服务。 实现搜索命令ag 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 local function get_all_list(key_string) local table_list={} local all_services = skynet.call(".launcher", "lua", "LIST") local count = 0 for k,v in pairs(all_services) do if string.match(k, key_string) or string.match(v, key_string) then table_list[k] = v count = count + 1 end end table_list["total_count"] = count return table_list end function COMMAND.

git-ftp的使用

git-ftp的使用 git-ftp有什么用? git-ftp 能够方便的帮助我们将自己管理的git项目相关代码或资源提交到自己的ftp服务器上 git-ftp命令 1 2 git ftp init git ftp push 安装 首次使用需要下载安装git-ftp并进行配置 ubuntu安装 1 sudo apt-get install git-ftp mac 安装 1 brew install git-ftp mac安装过程中相关依赖可能会报错,我安装的时候遇到了报错问题,这里记录一下: 1 Error: No such file or directory @ rb_sysopen - /Users/zp/Library/Caches/Homebrew/downloads/8687c3e085e812f09d11aeca541ef9cdefbc8f971d9dd3c407c8b18bb3954957--libnghttp2-1.47.0.monterey.bottle.tar.gz 报错解决方案:安装相关库即可 1 2 3 4 5 6 brew install libnghttp2 brew install openldap brew install brotli brew install zstd brew install curl brew install git-ftp 配置 简单配置,修改.git/config添加如下配置 1 2 3 4 5 6 [git-ftp] url = your-ftp-url user = your-ftp-user password = your_ftp_url syncroot = your-local-upload-fullpath remote-root= your-ftp-upload-path(eg:htdocs) 参考 官方文档:https://github.

github资源整理

github资源整理 本文主要用于收集整理平时发现的一些优秀的github资源,以便后续学习使用 工具类 WindTerm: 一个ssh远程工具 源码:https://github.com/kingToolbox/WindTerm 下载地址:https://github.com/kingToolbox/WindTerm/releases 服务端框架 skynet框架:https://github.com/cloudwu/skynet c + lua 服务端开发框架 ftp工具 git-ftp:https://github.com/git-ftp/git-ftp

Lua开发手册

lua5.3开发手册 https://cloud.tencent.com/developer/doc/1141 云风翻译:http://cloudwu.github.io/lua53doc/manual.html lua5.4开发手册 官网英文版:http://www.lua.org/manual/5.4/manual.html lua匹配库Lpeg 官网: http://www.inf.puc-rio.br/~roberto/lpeg/ 帮助: https://www.jianshu.com/p/e8e1c5abfdbb tutorial: https://lua-users.org/wiki/LpegTutorial luasocket github: https://github.com/lunarmodules/luasocket 使用demo: https://blog.csdn.net/h1023417614/article/details/52297408 lua md5 github: https://github.com/keplerproject/md5 jemalloc http://jemalloc.net/

rust语言基础

rust语言基础 rust语言的优点 c/c++ 性能好,但是类型系统和内存都不太安全。 java/c#, 有GC,内存安全有很多优秀的特性,但性能不行。 Rust:安全,无需GC,易于维护 rust的缺点 难学 Rust特别擅长的领域 高性能Web Service WebAssemble 命令行工具 网络编程 嵌入式设备 系统编程 Rust的用户和案例 Google:新操作系统Fuschia,Rust:30% Amazon:基于Linux开发的直接可以在裸机、虚拟机上运行容器的操作系统 System76:纯Rust开发了下一代安全操作系统Redox 蚂蚁金服:库操作系统Occlum 斯坦福和密歇根大学:嵌入式实时操作系统,应用于Google的加密产品。 微软:Rust重写Windows系统中的一些低级组件 微软:WinRT/Rust项目 Dropbox、Yelp、LINE、npm、百度、华为、Deno等 注意 Rust有很多独有的概念,他们和现在大多主流语言都不通。 学习Rust必须从基础概念一步一步学,否则会懵。 参考教材 Rust权威指南(The rust programming language) Rust安装 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 curl --proto '=https' --tlsv1.

devtools-flameshot

flameshot 简介 flameshot 是一款跨平台的截图工具。 配置文件路经 1 2 3 4 linux: ~/.config/flameshot/flameshot.ini windows: C:\Users\{YOURNAME}\AppData\Roaming\flameshot\flameshot.ini github地址: 1 https://github.com/flameshot-org/flameshot 下载 1 https://github.com/flameshot-org/flameshot/releases/tag/v0.10.2 常见平台安装 MacOS 1 brew install --cask flameshot Manjaro 1 pacman -S flameshot Ubuntu 16.04 1 wget https://github.com/flameshot-org/flameshot/releases/download/v11.0.rc1/Flameshot-11.0.rc1.x86_64.AppImage Ubuntu 18.04+ 1 2 apt install flameshot # https://github.com/flameshot-org/flameshot/releases Ubuntu 20.04+ 下载deb包安装 1 2 3 https://github.com/flameshot-org/flameshot/releases wget http://github.com/flameshot-org/flameshot/releases/download/v11.0.0/flameshot-11.0.0-1.ubuntu-20.04.amd64.deb sudo apt install ./flameshot-11.0.0-1.ubuntu-20.04.amd64.deb Debian 10+ 1 apt install flameshot windows 直接下载安装包,下载地址: 1 https://github.com/flameshot-org/flameshot/releases/tag/v0.10.2 常用快捷键 1 2 3 4 按PrintScreen键 激活 Ctrl + c 拷贝到剪贴版 Ctrl + s 保存到文件 Ctrl + z 撤销 贴图功能 今天同事跟我show了一把截图软件的贴图功能,用的是一款收费的软件,我平时不怎么用,但是感觉比较好用也用flameshot设置了一下,快捷键F3