Merge branch 'master' into flutter_list

This commit is contained in:
ywxgod 2021-05-26 00:41:57 +08:00
commit f8735eabe1
27 changed files with 1378 additions and 1573 deletions

View File

@ -0,0 +1,145 @@
[#]: collector: (lujun9972)
[#]: translator: (ywxgod)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-13423-1.html)
[#]: subject: (6 predictions for JavaScript build tools)
[#]: via: (https://opensource.com/article/20/11/javascript-build-tools)
[#]: author: (Shedrack Akintayo https://opensource.com/users/shedrack-akintayo)
对 JavaScript 构建工具的 6 个预测
======
> JavaScript 前端工具的生态系统充满着变数和竞争,且只有最好的工具才会存活下来。
![](https://img.linux.net.cn/data/attachment/album/202105/25/112116d5z1lrywl6k25mur.jpg)
生产中使用的代码与开发中的有所不同. 在生产中,我们需要构建一些能运行得够快、能管理各种依赖关系、能自动执行任务、能加载外部模块等功能的包。而那些将开发中的代码转为生产代码的 [JavaScript][2] 工具我们就称之为 _构建工具。_
我们可以通过各个构建步骤以及其重要性来解释前端代码需要被“构建”的原因。
### 前端代码构建步骤
前端代码的构建涉及下面的四个步骤:
#### 1、转译
通过<ruby>转译<rt>Transpiling</rt></ruby>,开发者可以使用到语言最新、最热门的更新和扩展,并保持浏览器的兼容性等。下面是使用 [Babel][3] 的一个例子:
```
// 数组映射中的箭头函数语法
const double = [1, 2, 3].map((num) => num * 2);
// 转译后
const double = [1, 2, 3].map(function(num) {
return num * 2;
});
```
#### 2、分包
<ruby>分包<rt>Bundling</rt></ruby>是处理所有 `import` 与`require` 语句的过程;找到相匹配的 JavaScript 代码片段、包和库;将它们添加到适当的域中;然后将它们打包到一个大的 JavaScript 文件中。常用的分包器包括 Browserify、Webpack 与 Parcel。
#### 3、压缩
<ruby>压缩<rt>Minifing</rt></ruby>是通过删除空白和代码注释来减少最终的文件大小。在压缩过程中,我们还可以更进一步添加代码混淆步骤,混淆会更改变量名和方法名,使代码变得晦涩难懂,因此一旦代码交付到客户端,它就不是那么容易能让人读懂。下面是一个使用 Grunt 的例子:
```
// 压缩前
const double = [1, 2, 3].map(function(num) {
  return num * 2;
});
// 压缩后
const double=[1,2,3].map(function(num){return num*2;});
```
#### 4、打包
完成上面的所有步骤之后, 我们需要将这些具有兼容性、且经过分包、压缩/混淆过的文件放置到某个地方。<ruby>打包<rt>Packaging</rt></ruby>正是这样一个过程,它将上述步骤所产生的结果放置到开发者指定的某个位置上,这通常是通过打包器完成的。
### 前端构建工具
前端工具及构建工具可以分为以下几类:
* 包管理: NPM、Yarn
* 转译器: Babel 等
* 打包器: Webpack、Parcel、Browserify
* 压缩混淆: UglifyJS、Packer、Minify 等
JavaScript 生态系统中有各种各样的构建工具可以使用,包括下面的这些:
#### Grunt 和 Bower
[Grunt][4] 是作为命令行工具引入的,它仅提供一个脚本来指定和配置相关构建任务。[Bower][5] 作为包管理器,提供了一种客户端包的管理方法而紧追其后。这两者,再加上 NPM它们经常在一起使用它们看上去似乎可以满足大多数的自动化需求但 Grunt 的问题在于它无法提供给开发者配置更复杂任务的自由,而 Bower 使开发者管理的程序包是平常的两倍因为它将前端包、后台包分开了例如Bower 组件与 Node 模块)。
**Grunt 与 Bower 的未来:** Grunt 与 Bower 正在退出 JavaScript 工具生态,但是还有一些替代品。
#### Gulp 和 Browserify
[Gulp][6] 是在 Grunt 发布一年半之后才发布的。但 Gulp 却让大家感到很自然、舒服。用 JavaScript 来写构建脚本与用 JSON 来写相比更自由。你可以在 Gulp 的构建脚本中编写函数、即时创建变量、在任何地方使用条件语句 —— 但就这些,并不能说让我们的感觉变得特别自然和舒适,只能说这只是其中的一个可能的原因。[Browserify][7] 和 Gulp 可以配合使用Browserify 允许 NPM 包(用于后端 Node 服务器)被直接带入到前端,就这一点已经直接让 Bower 废了。而正是这种用一个包管理器来处理前后端包的方式让人感到更自然和更好。
**Gulp 的未来:** Gulp 可能会被改进以便匹配当前流行的构建工具但这完全取决于创造者的意愿。Gulp 仍在使用中,只是不再像以前那么流行了。
#### Webpack 和 NPM/Yarn 脚本
[Webpack][8] 是现代前端开发工具中最热门的宠儿,它是一个开源的 JavaScript 模块打包器。Webpack 主要是为处理 JavaScript 而创造的,但如果包含相应的加载器,它也可以转换 HTML、CSS 和图片等前端资源。通过 Webpack你也可以像 Gulp 一样编写构建脚本,并通过 [NPM/Yarn][9] 来执行它们。
**Webpack 的未来:** Webpack 是目前 JavaScript 工具生态系统中最热门的工具,最近几乎所有的 JavaScript 库都在使用 React 和 Webpack。Webpack 目前处于第四个版本不会很快消失。LCTT 译注Webpack 目前已经发布了第五个版本了,且还在火热更新中)
#### Parcel
[Parcel][10] 是一个 Web 应用打包器,于 2018 年推出因其开发者体验而与众不同。Parcel 能利用处理器多核功能提供极快的打包性能,且还零配置。但 Parcel 还是一个新星,对于一些大型应用,其采用率并不高。相比之下,开发人员更喜欢使用 Webpack因为 Webpack 有更广泛的支持和可定制性。
**Parcel 的未来:** Parcel 非常容易使用,如果你统计打包和构建时间,它会比 Webpack 更快而且它还提供了更好的开发者体验。Parcel 没有被大量采用的原因可能是它仍然比较新。在前端构建工具的生态系统中Parcel 的前景会非常光明,它将会存在一段时间。
#### Rollup
[Rollup][11] 是 JavaScript 的一个模块分包器它可将一小段代码编译为更大更复杂的库或应用。Rollup 一般建议用来构建 JavaScript 库,特别是那种导入和依赖的第三方库较少的那种库。
**Rollup 的未来:** Rollup 很酷,且正在被迅速采用。它有很多强大的功能,将在很长一段时间内作为前端工具生态系统的一个组成部分而存在。
### 了解更多
JavaScript 前端工具的生态系统充满着变数和竞争,且只有最好的工具才能存活下来。在不久的将来,我们的构建工具将具有更少(或没有)的配置,更方便的定制化,更好的扩展性的和更好的构建速度。
该用什么样的构建工具用于你的前端项目,你需要根据具体的项目需求来做出决定。至于选择什么样的工具,才是最合适自己的,大多数时候,需要我们自己作出取舍。
更多信息, 请看:
* [JavaScript tooling: The evolution and future of JS/frontend build tools][12]
* [Tools and modern workflow for frontend developers][13]
* [Modern frontend: The tools and build process explained][14]
* [Best build tools in frontend development][15]
* * *
_这篇文章最初发表在 [Shedrack Akintayo 的博客][16] 上经许可后重新发表。_
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/11/javascript-build-tools
作者:[Shedrack Akintayo][a]
选题:[lujun9972][b]
译者:[ywxgod](https://github.com/ywxgod)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/shedrack-akintayo
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/find-file-linux-code_magnifying_glass_zero.png?itok=E2HoPDg0 (Magnifying glass on code)
[2]: https://www.javascript.com/
[3]: https://babeljs.io/
[4]: https://gruntjs.com/
[5]: https://bower.io/
[6]: https://gulpjs.com/
[7]: http://browserify.org/
[8]: https://webpack.js.org/
[9]: https://github.com/yarnpkg/yarn
[10]: https://parceljs.org/
[11]: https://rollupjs.org/guide/en/
[12]: https://qmo.io/blog/javascript-tooling-the-evolution-and-future-of-js-front-end-build-tools/
[13]: https://blog.logrocket.com/tools-and-modern-workflow-for-front-end-developers-505c7227e917/
[14]: https://medium.com/@trevorpoppen/modern-front-end-the-tools-and-build-process-explained-36641b5c1a53
[15]: https://www.developerdrive.com/best-build-tools-frontend-development/
[16]: https://www.sheddy.xyz/posts/javascript-build-tools-past-and-beyond

View File

@ -0,0 +1,178 @@
[#]: subject: (4 tips for context switching in Git)
[#]: via: (https://opensource.com/article/21/4/context-switching-git)
[#]: author: (Olaf Alders https://opensource.com/users/oalders)
[#]: collector: (lujun9972)
[#]: translator: (Chao-zhi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-13422-1.html)
Git 中上下文切换的 4 种方式
======
> 比较 Git 中四种切换分支的方法的优缺点。
![](https://img.linux.net.cn/data/attachment/album/202105/25/091803a6ww3r7yo32oxdzx.jpg)
所有大量使用 Git 的人都会用到某种形式的上下文切换。有时这只会给你的工作流程增加少量的开销,但有时,这可能是一段痛苦的经历。
让我们用以下这个例子来讨论一些常见的上下文切换策略的优缺点:
> 假设你在一个名为 `feature-X` 的分支中工作。你刚刚发现你需要解决一个无关的问题。这不能在 `feature-X` 分支中完成。你需要在一个新的分支 `feature-Y` 中完成这项工作。
### 方案 1暂存 + 分支
解决此问题最常见的工作流程可能如下所示:
1. 停止分支 `feature-X` 上的工作
2. `git stash`
3. `git checkout -b feature-Y origin/main`
4. 一顿鼓捣,解决 `feature-Y` 的问题
5. `git checkout feature-X``git switch -`
6. `git stash pop`
7. 继续在 `feature-X` 中工作
**优点:** 这种方法的优点在于,对于简单的更改,这是一个相当简单的工作流程。它可以很好地工作,特别是对于小型仓库。
**缺点:** 使用此工作流程时,一次只能有一个工作区。另外,根据你的仓库的状态,使用暂存是一个麻烦的环节。
### 方案 2WIP 提交 + 分支
这个解决方案和前一个非常相似,但是它使用 WIP<ruby>正在进行的工作<rt>Work in Progress</rt></ruby>)提交而不是暂存。当你准备好切换回来,而不是弹出暂存时,`git reset HEAD~1` 会展开 WIP 提交,你可以自由地继续,就像之前的方案一样,但不会触及暂存。
1. 停止分支 `feature-X` 上的工作
2. `git add -u`(仅仅添加修改和删除的文件)
3. `git commit -m "WIP"`
4. `git checkout -b feature-Y origin/master`
5. 一顿鼓捣,解决 `feature-Y` 的问题
6. `git checkout feature-X``git switch -`
7. `git reset HEAD~1`
**优点:** 对于简单的更改,这是一个简单的工作流,也适合于小型仓库。你不需要使用暂存。
**缺点:** 任何时候都只能有一个工作区。此外如果你或你的代码审阅者不够谨慎WIP 提交可能会合并到最终产品。
使用此工作流时,你**永远**不要想着将 `--hard` 添加到 `git reset`。如果你不小心这样做了,你应该能够使用 `git reflog` 恢复提交,但是你最好完全避免这种情况发生,否则你会听到心碎的声音。
### 方案 3克隆一个新仓库
在这个解决方案中,不是创建新的分支,而是为每个新的功能分支创建存储库的新克隆。
**优点:** 你可以同时在多个工作区中工作。你不需要 `git stash` 或者是 WIP 提交。
**缺点:** 需要考虑仓库的大小,因为这可能会占用大量磁盘空间(浅层克隆可以帮助解决这种情况,但它们可能并不总是很合适。)此外,你的仓库克隆将互不可知。因为他们不能互相追踪,所以你必须手动追踪你的克隆的源仓库。如果需要 git 钩子,则需要为每个新克隆设置它们。
### 方案 4git 工作树
要使用此解决方案,你可能需要了解 `git add worktree`。如果你不熟悉 Git 中的工作树,请不要难过。许多人多年来都对这个概念一无所知。
#### 什么是工作树?
将工作树视为仓库中属于项目的文件。本质上,这是一种工作区。你可能没有意识到你已经在使用工作树了。开始使用 Git 时,你将自动获得第一个工作树。
```
$ mkdir /tmp/foo && cd /tmp/foo
$ git init
$ git worktree list
/tmp  0000000 [master]
```
你可以在以上代码看到,甚至在第一次提交前你就有了一个工作树。接下来去尝试再添加一个工作树到你的项目中吧。
#### 添加一个工作树
想要添加一个新的工作树你需要提供:
1. 硬盘上的一个位置
2. 一个分支名
3. 添加哪些分支
```
$ git clone https://github.com/oalders/http-browserdetect.git
$ cd http-browserdetect/
$ git worktree list
/Users/olaf/http-browserdetect 90772ae [master]
$ git worktree add ~/trees/oalders/feature-X -b oalders/feature-X origin/master
$ git worktree add ~/trees/oalders/feature-Y -b oalders/feature-Y e9df3c555e96b3f1
$ git worktree list
/Users/olaf/http-browserdetect 90772ae [master]
/Users/olaf/trees/oalders/feature-X 90772ae [oalders/feature-X]
/Users/olaf/trees/oalders/feature-Y e9df3c5 [oalders/feature-Y]
```
与大多数其他 Git 命令一样你需要在仓库路径下使用此命令。一旦创建了工作树就有了隔离的工作环境。Git 仓库会跟踪工作树在磁盘上的位置。如果 Git 钩子已经在父仓库中设置好了,那么它们也可以在工作树中使用。
请注意到,每个工作树只使用父仓库磁盘空间的一小部分。在这种情况下,工作树需要只大约三分之一的原始磁盘空间。这这非常适合进行扩展。如果你的仓库达到了千兆字节的级别,你就会真正体会到工作树对硬盘空间的节省。
```
$ du -sh /Users/olaf/http-browserdetect
2.9M
$ du -sh /Users/olaf/trees/oalders/feature-X
1.0M
```
**优点:** 你可以同时在多个工作区中工作。你不需要使用暂存。Git 会跟踪所有的工作树。你不需要设置 Git 钩子。这也比 `git clone` 更快,并且可以节省网络流量,因为你可以在飞行模式下执行此操作。你还可以更高效地使用磁盘空间,而无需借助于浅层克隆。
**缺点:** 这是个需要你额外学习和记忆的新东西,但是如果你能养成使用这个功能的习惯,它会给你丰厚的回报。
#### 额外的小技巧
有很多方式可以清除工作树,最受欢迎的方式是使用 Git 来移除工作树:
```
git worktree remove /Users/olaf/trees/oalders/feature-X
```
如果你喜欢 RM 大法,你也可以用 `rm -rf` 来删除工作树。
```
rm -rf /Users/olaf/trees/oalders/feature-X
```
但是,如果执行此操作,则可能需要使用 `git worktree prune` 清理所有剩余的文件。或者你现在可以跳过清理,这将在将来的某个时候通过 `git gc` 自行完成。
#### 注意事项
如果你准备尝试 `git worktree`,请记住以下几点:
* 删除工作树并不会删除该分支。
* 可以在工作树中切换分支。
* 你不能在多个工作树中同时签出同一个分支。
* 像其他命令一样,`git worktree` 需要从仓库内运行。
* 你可以同时拥有许多工作树。
* 要从同一个本地仓库签出创建工作树,否则它们将互不可知。
#### git rev-parse
最后一点注意:在使用 `git worktree` 时,仓库根所在的位置可能取决于上下文。幸运的是,`git rev parse` 可以让你区分这两者。
* 要查找父仓库的根目录,请执行以下操作:
```
git rev-parse --git-common-dir
```
* 要查找你当前所在仓库的根目录,请执行:
```
git rev-parse --show-toplevel
```
### 根据你的需要选择最好的方法
就像很多事情一样TIMTOWDI<ruby>条条大道通罗马<rt>there's more than one way to do it</rt></ruby>)。重要的是你要找到一个适合你需要的工作流程。你的需求可能因手头的问题而异。也许你偶尔会发现自己将 `git worktree` 作为版本控制工具箱中的一个方便工具。
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/4/context-switching-git
作者:[Olaf Alders][a]
选题:[lujun9972][b]
译者:[Chao-zhi](https://github.com/Chao-zhi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/oalders
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open)

View File

@ -4,35 +4,35 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: ( )
[#]: url: ( )
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-13420-1.html)
4 款值得一试的 Linux 终端多路复用器
======
> 比较 tmux、GNU Screen、Konsole 和 Terminator看看哪个最适合你。
![4 different color terminal windows with code][1]
![](https://img.linux.net.cn/data/attachment/album/202105/24/205044ez55fdw99alhhgn8.jpg)
Linux 用户通常需要大量的虚拟视觉空间。一个终端窗口是永远不够的,所以终端有了标签。一个桌面太受限制了,所以有了虚拟桌面。当然,应用程序窗口可以堆叠,但当它们堆叠起来时,又有多大的好处呢?哎呀,即使是后台文本控制台也有 F1 到 F7可以在任务之间来回翻转。
Linux 用户通常需要大量的虚拟视觉空间。一个终端窗口是永远不够的,所以终端有了标签。一个桌面太受限制了,所以有了虚拟桌面。当然,应用程序窗口可以堆叠,但当它们堆叠起来时,又有多大的好处呢?哎呀,即使是后台文本控制台也有 `F1``F7`,可以在任务之间来回翻转。
有了这么多的多任务处理方式,有人发明了终端 *多路复用器* 的概念就不奇怪了。诚然,这是一个令人困惑的术语。在传统的电子学中,“<ruby>多路复用器<rt>multiplexer</rt></ruby>”是一个接收多个输入信号并将选定的信号转发到单一输出的部件。终端多路复用器的作用正好相反。它从一个输入(人类在键盘上向一个终端窗口打字)接收指令,并将该输入转发给任数量的输出(例如,一组服务器)。
有了这么多的多任务处理方式,有人发明了终端 *多路复用器* 的概念就不奇怪了。诚然,这是一个令人困惑的术语。在传统的电子学中,“<ruby>多路复用器<rt>multiplexer</rt></ruby>”是一个接收多个输入信号并将选定的信号转发到单一输出的部件。终端多路复用器的作用正好相反。它从一个输入(人类在键盘上向一个终端窗口打字)接收指令,并将该输入转发给任数量的输出(例如,一组服务器)。
然后,“多路复用器”一词在美国也是一个流行的术语,指的是有许多屏幕的电影院(与“<ruby>影城<rt>cineplex</rt></ruby>”一词一个意思)。在某种程度上,这很好地描述了终端复用器的作用。它可以在一个框内提供许多屏幕。
不管这个词是什么意思,任何尝试过它的人都有自己的喜好的某一种多路复用器。因此,我决定看一看一些流行的终端多路复用器,看看每一个都怎么样。就我的评估标准而言,最低限度,我需要每个多路复用器能够分割*和*堆叠终端窗口。
不管这个词是什么意思,任何尝试过它的人都有自己的喜好的某一种多路复用器。因此,我决定考察一些流行的终端多路复用器,看看每一个都怎么样。就我的评估标准而言,最低限度,我需要每个多路复用器能够分割*和*堆叠终端窗口。
### tmux
![tmux][2]
据我所知,是从 tmux 开始使用“多路复用器”这个术语的。它工作很出色。
据我所知,是从 tmux 开始使用“多路复用器”这个术语的。它工作很出色。
它作为一个守护程序运行,这样即使你关闭了正在查看的终端模拟器,你的终端会话仍然处于活动状态。它将你的终端屏幕分割成多个面板,这样你就可以在每个面板上打开独特的终端提示符。
推而广之,这意味着你也可以远程连接到任何数量的系统,并在你的终端中打开它们。利用 tmux 的能力,镜像(或者以电子术语说是“反向多路复用”)输入到其他打开的窗格,就能从一个中央命令窗格同时控制几台计算机。
推而广之,这意味着你也可以远程连接到任何数量的系统,并在你的终端中打开它们。利用 tmux 的能力,将输入镜像(或者以电子术语说是“反向多路复用”)到其他打开的窗格,就能从一个中央命令窗格同时控制几台计算机。
tmux 在 GNU Screen 还只能水平分割的时候就有了垂直分割,这吸引了追求最大灵活性的粉丝。而灵活性正是用户在 tmux 中得到的。它可以分割、堆叠、选择和服务;几乎没有什么是它做不到的。
tmux 在 GNU Screen 还只能水平分割的时候就有了垂直分割能力,这吸引了追求最大灵活性的粉丝。而灵活性正是用户在 tmux 中得到的。它可以分割、堆叠、选择和提供服务;几乎没有什么是它做不到的。
#### 📦 软件包大小
@ -44,7 +44,7 @@ tmux 的默认触发键是 `Ctrl+B`,尽管很容易在其配置文件中重新
#### ⌨️ 黑客因子
即使你只是在学习如何使用终端,你也一定会觉得使用 tmux 的人很像黑客。它看起来很复杂,但一旦你了解了正确的键绑定,就很容易使用。它为你提供了很多有用的技巧,让你忙得不亦乐乎,而且它是一种快速构建一个 HUD抬头显示器的超简单方法可以把你需要的所有信息摆在你面前。
即使你只是在学习如何使用终端,你也一定会觉得使用 tmux 的人很像黑客。它看起来很复杂,但一旦你了解了正确的键绑定,就很容易使用。它为你提供了很多有用的技巧,让你玩的飞起,而且它是一种快速构建 HUD抬头显示器的超简单方法可以把你需要的所有信息摆在你面前。
### GNU Screen
@ -52,7 +52,7 @@ tmux 的默认触发键是 `Ctrl+B`,尽管很容易在其配置文件中重新
像 tmux 一样GNU Screen 也运行一个守护程序,所以即使你关闭了用来启动它的终端,你的 shell 仍然可用。你可以从不同的计算机上连接并共享屏幕。它可以将你的终端屏幕分割成水平或垂直的窗格。
与 tmux 不同的是GNU Screen 可以通过串行连接(`screen 9600 /dev/ttyUSB0` 就可以了),通过按键绑定可以方便地发出 `XON``XOFF` 信号。
与 tmux 不同的是GNU Screen 可以通过串行连接进行连接`screen 9600 /dev/ttyUSB0` 就可以了),通过按键绑定可以方便地发出 `XON``XOFF` 信号。
与 SSH 会话相比,在串行连接中需要多路复用器的情况可能并不常见,所以大多数用户并不了解 Screen 这个真正特殊的功能。不过GNU Screen 是一个很棒的多路复用器,有很多有用的选项。而如果你真的需要同时向多个服务器发送信号,还有专门的工具,比如 ClusterSSH 和 [Ansible][5]。
@ -74,9 +74,9 @@ GNU Screen 的默认触发键是 `Ctrl+A`,这对于熟悉 Bash 快捷键的人
对于没有标榜自己是多路复用器的 Konsole 来说,令人惊讶的是它也是其中一个。它可以使用 Qt 窗格和标签进行必要的窗口分割和堆叠,但它也可以通过“编辑(将输入复制到)”菜单中的一个选项将输入从一个窗格传到另一个(或全部)。
然而,它所最明显缺乏的功能是作为一个守护程序运行以进行远程重新连接的能力。与 tmux 和 GNU Screen 不同,你不能远程连接到运行 Konsole 的机器并加入会话。对于一些管理员来说,这可能不是一个问题。许多管理员 [VNC][7] 连接到机器的次数比用 [SSH][8] 还要多,所以“重新加入”一个会话就像在 VNC 客户端上点击 Konsole 窗口一样简单。
然而,它所最明显缺乏的功能是作为一个守护程序运行以进行远程重新连接的能力。与 tmux 和 GNU Screen 不同,你不能远程连接到运行 Konsole 的机器并加入会话。对于一些管理员来说,这可能不是一个问题。许多管理员 [VNC][7] 连接到机器的次数比用 [SSH][8] 还要多,所以“重新加入”一个会话就像在 VNC 客户端上点击 Konsole 窗口一样简单。
使用 Konsole 作为多路复用器是 KDE 极客们的大招。Konsole 是我使用的第一个 Linux 终端(直到今天,我有时也会按 `Ctrl+N` 来切换新标签),所以有能力使用这个熟悉的终端作为复用器是一个很大的便利。这绝不是必要的,因为无论如何 tmux 和 Screen 都可以在 Konsole 里面运行,但是通过让 Konsole 处理窗格,我就不必调整肌肉记忆。这种微妙的功能包容正是 [KDE 的伟大之处][9]。
使用 Konsole 作为多路复用器是 KDE 极客们的大招。Konsole 是我使用的第一个 Linux 终端(直到今天,我有时也会按 `Ctrl+N` 来切换新标签),所以有能力使用这个熟悉的终端作为多路复用器是一个很大的便利。这绝不是必要的,因为无论如何 tmux 和 Screen 都可以在 Konsole 里面运行,但是通过让 Konsole 处理窗格,我就不必调整肌肉记忆。这种微妙的功能包容正是 [KDE 的伟大之处][9]。
#### 📦 软件包大小
@ -88,7 +88,7 @@ Konsole 本身大约是 11KB但它依赖于 105 个 KDE 和 Qt 库,所以
#### ⌨️ 黑客因子
使用 Konsole 作为你的复用器让你有资格称自己为 KDE 高级用户。
使用 Konsole 作为你的多路复用器让你有资格称自己为 KDE 高级用户。
### Terminator

View File

@ -1,101 +0,0 @@
[#]: subject: (Googles FLoC is Based on the Right Idea, but With the Wrong Implementation)
[#]: via: (https://news.itsfoss.com/google-floc/)
[#]: author: (Jacob Crume https://news.itsfoss.com/author/jacob/)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Googles FLoC is Based on the Right Idea, but With the Wrong Implementation
======
Cookies, the well-known web technology, have been a key tool in web developers toolkits for years. They have given us the ability to store passwords, logins, and other essential data that allows us to use the modern web.
However, the technology has been used lately for more invasive purposes: serving creepily targeted ads.
Recently, Google claimed to have the solution to this privacy crisis with their new FLoC initiative.
### What is FLoC?
![][1]
FLoC (Federated Learning of Cohorts) is a new technology that aims to solve the privacy concerns associated with cookies. Unlike the old way of using 3rd party cookies to build an advertising ID, FLoC uses data from your searches to place you into a predefined group (called a cohort) of people interested in similar topics as you.
Advertisers can then serve the same ads to the group of people that are most likely to purchase their product. Because FLoC is built into Chrome, it can collect much more data than third-party cookies. For the average consumer, this should be a huge concern.
In simple terms, if cookies were bad, then FLoC is down-right evil.
### Whats Wrong With Floc?
Simply put, FLoC collects much more data than traditional cookies. This allows advertisers to serve more targeted ads, driving up sales.
Alongside the data concerns, there also some more specific issues associated with it. These include:
* More predictability
* Much easier browser fingerprinting
* The ability to link a user with their browsing habits
All of these issues join together to create the privacy disaster that FLoC is, with heaps of negative impacts on the user.
#### More Predictability
With the rise of machine learning and AI, companies such as Google and Facebook have gained the ability to make shockingly accurate predictions. With the extra data they will have because of FLoC, these predictions could be taken to a whole new level.
The result of this would be a new wave of highly-targeted ads and tracking. Because all your data is in your cohort id, it will be much better for companies to predict your interests and skills.
#### Browser Fingerprinting
Browser fingerprinting is the act of taking small and seemingly insignificant pieces of data to create an ID for a web browser. While no browser has managed to fully stop fingerprinting, some browsers (such as Tor) have managed to limit their fingerprinting abilities at the expense of some features.
Floc enables large corporations to take this shady practice to a whole new level through the extra data it presents.
#### Browsing Habit Linking
Your cohort id is supposed to be anonymous, but when combined with a login, it can be tracked right back to you. This effectively eliminates the privacy benefits FLoC has (standardized tracking) and further worsens the privacy crisis caused by this technology.
This combination of your login and cohort ID is effectively a goldmine for advertisers.
### Cookies are Bad, but so is FLoC
Cookies have been living on their last legs for the past decade. They have received widespread criticism for privacy issues, particularly from open-source advocates such as Mozilla and the FSF.
Instead of replacing them with an even more invasive technology, why not create an open and privacy respecting alternative? We can be sure that none of the large advertisers (Google and Facebook) would do such a thing as this is a crucial part of their profit-making ability.
Googles FLoC **not a sustainable replacement for cookies**, and it must go.
### Wrapping Up
With the amount of criticism Google has received in the past for their privacy policies, you would think they would improve. Unfortunately, this seems not to be the case, with their data collection becoming more widespread by the day.
FLoC seems to be the last nail in the coffin of privacy. If we want internet privacy, FLoC needs to go.
If you want to check if you have been FLoCed, you can check using a web tool by EFF [Am I FLoCed?][2], if you are using Google Chrome version 89 or newer.
What do you think about FLoC? Let me know in the comments below!
_The views and opinions expressed are those of the authors and do not necessarily reflect the official policy or position of Its FOSS._
#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You!
If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software.
I'm not interested
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/google-floc/
作者:[Jacob Crume][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/jacob/
[b]: https://github.com/lujun9972
[1]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzMyNCcgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4=
[2]: https://amifloced.org/

View File

@ -1,86 +0,0 @@
[#]: subject: (Nitrux Linux Is Demanding an Apology From DistroWatch)
[#]: via: (https://news.itsfoss.com/nitrux-linux-distrowatch-apology/)
[#]: author: (Ankush Das https://news.itsfoss.com/author/ankush/)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Nitrux Linux Is Demanding an Apology From DistroWatch
======
DistroWatch is a popular web portal that tracks new Linux distribution releases, informs the changes briefly and offers a catalog of details for almost every distribution.
Even though it provides essential information regarding most of the distros, it looks like it does not display correct details for Nitrux Linux. Of course, with tons of information to manage and update — it is highly likely that some information could be outdated or incorrect.
However, when [Uri Herrera][1] reached out to request correction, the maintainer of DistroWatch seems to believe that Nitrux is lying about the information being requested to be modified.
Hence, Nitrux Linux had to come up with an [open letter][2] where they explain more about the incident and demand an apology for making such kind of remarks.
### DistroWatch Information Page on Nitrux
![][3]
As you can notice in the screenshot above, DistroWatch lists it as a distro based on Ubuntu (LTS), which it isnt anymore.
In fact, we have previously reported that [Nitrux Linux ditched Ubuntu][4] favoring Debian as its base completely. Also, Nitrux wasnt totally based on Ubuntu, but utilized Ubuntu sources.
You can also go through our [interview with Uri Herrera][1] to explore more about Nitrux distribution.
In addition to that, there is also an interesting piece of information here:
> Registration with an e-mail address was required to download this distribution, however public downloads have been available since mid-2020
I think this may have been poorly worded. Nitrux was already publicly available to download.
It required sponsorship/donation to access and download the stable ISO while they offered development/minimal builds and the source for free.
![][5]
Not just limited to this, but DistroWatch also fails to mention the correct version number.
So, definitely, something needs correction while the creator of DistroWatch, **Jesse Smith** (@BlowingUpBits) does not seem to be on the same side as per this tweet:
> Confirmed. Nitrux is based on Ubuntu 20.04 and pulls from multiple Ubuntu repositories. Not sure why they keep lying about this on Twitter and their website.
>
> — BlowingUpBits (@BlowingUpBits) [May 6, 2021][6]
And, this led to the [open letter][2] where Uri Herrera mentions:
> Because of this, we make the request publicly that you or your staff amend the erroneous information that you display on your website about our product, including logos, names, links, descriptions, and versions. Additionally, _we demand an apology_ from you and the staff member responsible for the [incident][7] that finally led to this open letter. _Our request is non-negotiable, and we will not accept anything less for our demand._
### Closing Thoughts
If it isnt a surprise, this is a simple matter of correcting information while the creator of Nitrux Linux is trying to request the necessary changes.
Nitrux Linux has always been assumed as a “commercial” distribution in the past just because they had a paywall like Zorin OSs ultimate edition, which isnt true either. Nitrux Linux was always a free and open-source Linux distribution with a unique approach.
_What do you think about the points mentioned in the open letter? Should DistroWatch make amends here to display correct information? Let me know your thoughts in the comments below._
#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You!
If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software.
I'm not interested
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/nitrux-linux-distrowatch-apology/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/nitrux-linux/
[2]: https://nxos.org/other/open-letter-distrowatch/
[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzI4NScgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4=
[4]: https://news.itsfoss.com/nitrux-linux-debian/
[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzQ4OCcgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4=
[6]: https://twitter.com/BlowingUpBits/status/1390116053183868928?ref_src=twsrc%5Etfw
[7]: https://twitter.com/BlowingUpBits/status/1390116053183868928

View File

@ -1,77 +0,0 @@
[#]: subject: (Huawei Has Launched an ARM-Based Linux Laptop)
[#]: via: (https://news.itsfoss.com/huawei-arm-linux-laptop/)
[#]: author: (Ankush Das https://news.itsfoss.com/author/ankush/)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Huawei Has Launched an ARM-Based Linux Laptop
======
Huawei, is still a major manufacturer even after its significant decline in the market share after its sore business relations with the United States.
Now, in a decision to move away from Microsoft/Google for its Laptops, Huawei has launched an ARM-based laptop that runs on Linux, **with a catch** (find out as you read on).
Of course, potentially a good decision for them. But, this should also turn the heads of other major manufacturers to follow the suite, at least for specific countries to start with.
### Huawei **Qingyun L410**: Overview
Huaweis own Kirin 990 processor powers the **Huawei Qingyun L410** laptop as originally spotted by [ITHome][1] to be listed in an e-commerce website in China. While it is a fairly old 8-core ARM chip originally meant for its flagship smartphones, it is a good start.
![Image Credits: JD.com / Huawei Qingyun L410][2]
You will find a webcam pop up integrated to the keyboard along with a fingerprint sensor that also acts as the power button.
It packs in 8 GB of RAM and offers up to 512 GB storage.
Theres no official listing for the specifications of this laptop, but it is very similar to [Huaweis MateBook 14][3].
The laptop comes pre-installed with [Unity OS][4], which is a Deepin-based Linux distribution initially developed as part of a government initiative in China to move away from big foreign tech giants.
ITHome also believes that it will be replaced by [Harmony OS][5] in the near future. And, that wont be a surprise considering Huawei wants to have a seamless experience across its smartphone and laptops in the process of ditching Google services and Microsofts Windows.
Especially, considering other manufacturers like Xiaomi, OPPO, Vivo, and others also [interested to use Harmony OS][6], this is bound to happen.
Also, it will be available with/without an OS as per the customers requirement.
### Availability &amp; Pricing
While everything sounds exciting, **this laptop hasnt been official announced** and **not available outside China**. It is only available for enterprises and government agencies in China.
I know it is a bummer for a laptop that runs Linux to start with. However, companies like Huawei usually launch a different model for global markets — so theres still hope.
In case you did not know, you still have [places to buy Linux laptops][7] available outside China, but a MateBook with Linux sounds pretty exciting.
As of now, the laptop without any OS pre-installed is priced at **¥8,181 ($1,276)**, and the one with Unity OS costs **¥8,944 ($1,395)** as reported by [GizmoChina][8].
_Other than this, we do not have any official information on it, but I think this will be something interesting to keep an eye on. What do you think a Linux laptop by Huawei?_
#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You!
If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software.
I'm not interested
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/huawei-arm-linux-laptop/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://www.ithome.com/0/550/533.htm
[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ1MCIgd2lkdGg9IjQ1MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[3]: https://consumer.huawei.com/en/laptops/matebook-14-2021/
[4]: https://en.wikipedia.org/wiki/Unity_Operating_System
[5]: https://www.harmonyos.com/en/develop
[6]: https://www.slashgear.com/huawei-harmony-os-might-be-adopted-by-xiaomi-oppo-and-vivo-09672055/
[7]: https://itsfoss.com/get-linux-laptops/
[8]: https://www.gizmochina.com/2021/05/10/huawei-qingyun-l410-is-the-companys-first-arm-laptop-featuring-a-kirin-990-soc/

View File

@ -1,80 +0,0 @@
[#]: subject: (Lightweight Bodhi Linux 6.0 Introduces a New Look with Numerous Other Changes)
[#]: via: (https://news.itsfoss.com/bodhi-linux-6-release/)
[#]: author: (Ankush Das https://news.itsfoss.com/author/ankush/)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Lightweight Bodhi Linux 6.0 Introduces a New Look with Numerous Other Changes
======
Bodhi Linux is a lightweight distribution tailored for old systems. With its [Moksh desktop][1], it was a unique experience already.
Now, with a major release after more than a year, Bodhi Linux 6.0 brings in a refreshed look and several improvements across the board.
Let me briefly highlight whats new in this release.
### Bodhi Linux 6.0: Whats New?
![][2]
Bodhi Linux 5.1 was based on Ubuntu 18.04 LTS — so this time it brings in the latest [Ubuntu 20.04 LTS release][3] onboard, which automatically gives you all the [perks that you get with Ubuntu 20.04 LTS][4].
The desktop environment hasnt changed at its core and continues with development over Enlightenment 17 desktop. Visually, it may not a big makeover, but you will find a new choice of colors and subtle visual improvements.
The [announcement][5] mentions more about it:
> Our Arc-Green theme underwent a major revamp now featuring an animated background, updated splash screen, and numerous tweaks. The BL6 login screen now features the elegant slick greeter. Naturally, there also is a new Plymouth theme. The Moksha desktop environment has had numerous improvements and a few new features added.
As usual, the ISO file size is as minimum as possible without unnecessary pre-installed tools.
It comes baked in with Linux Kernel 5.4 and also offers a different ISO with Linux 5.8 [HWE][6] Kernel from Ubuntu 20.10.
![][7]
You will only find essential applications like Chromium web browser, Leafpad text editor, [Synaptic package manager][8] and more. Also, it is worth noting that Chromium is the default browser.
The release note also mentions a critical fix for Leafpad text editor that lead to data loss previously.
Thunar File Manager has also received important updates to improve the user experience and blend in better with the desktop environment i.e Moksh.
If you need more applications like VLC Media Player, LibreOffice suite, Geany editor, and more pre-installed, you can download the AppPack ISO when you need it.
### Download Bodhi Linux 6.0
You can grab the ISO (and can find torrents) from its official [download page][9]. You will also find a legacy release that supports 32-bit systems, which is based on Debian.
[Bodhi Linux 6.0][9]
_With a refreshed theme and rebased on Ubuntu 20.04 LTS, it looks pretty exciting to me. What do you think about Bodhi Linux 6.0?_
#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You!
If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software.
I'm not interested
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/bodhi-linux-6-release/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://github.com/JeffHoogland/moksha
[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQwMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[3]: https://itsfoss.com/download-ubuntu-20-04/
[4]: https://itsfoss.com/ubuntu-20-04-release-features/
[5]: https://www.bodhilinux.com/2021/05/12/bodhi-linux-6-0-0-released/
[6]: https://ubuntu.com/kernel/lifecycle
[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU2MyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[8]: https://itsfoss.com/synaptic-package-manager/
[9]: https://www.bodhilinux.com/download/

View File

@ -1,105 +0,0 @@
[#]: subject: (System76s Configurable Mechanical Keyboard is a Dream Come True for Open Source Enthusiasts)
[#]: via: (https://news.itsfoss.com/system76-launch-mechanical-keyboard/)
[#]: author: (Ankush Das https://news.itsfoss.com/author/ankush/)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
System76s Configurable Mechanical Keyboard is a Dream Come True for Open Source Enthusiasts
======
System76 is popularly known for its Pop!_OS Linux distribution and its laptops/desktop offerings tailored for Linux.
While we already had some of the details when [System76 teased its open-source Launch keyboard][1], it has been finally unveiled to the world.
This is System76s first accessory offering, along with the laptops/desktops available. Im sure that the new open source mechanical keyboard is just the start. And it is going to be a treat for open-source enthusiasts!
Here, let me briefly share the key highlights of this open-source configurable keyboard and what I think about it.
### Launch Keyboard: Open Source &amp; Fully Customizable
![][2]
The primary highlight of System76s TKL (tenkeyless) keyboard is the customizability, along with an open-source hardware and firmware. You can check out the available source code in their [GitHub page][3].
Here are the most important features worth mentioning:
* It lets you remap your keys, swap your keycaps, and add multiple layers to use different layouts or shortcuts.
* The open-source firmware puts you in control and only the user will decide if it should be updated or not.
* Kailh switches by default
* You can also use it as a high-speed USB hub with the help of its extra USB-C and USB-A ports
* RGB support
* Compatible with Linux, Windows, and macOS
![System76 Launch USB Hub][4]
On paper, it definitely sounds like an exciting open-source keyboard that you can customize to suit your personal needs to a great extent.
With an aluminum chassis, PBT keycaps, open-source firmware, and the customizability, there isnt much to complain.
![][5]
Not to forget, the presence of a high-speed USB hub makes a difference for users who want to connect more devices and make use of high-speed data transfers. Do note that the keyboard must be connected using USB 3.2 Gen 2 to get maximum potential speed.
In addition to this, you get two options for the switches — Royals and Jades. The first one is more on the silent side and the jade provides a satisfying sound if you want it.
Even though it does support RGB, without a hands-on, it would be tough to predict the experience of customizing it.
You can explore more about its technical specifications on its [official product page][6].
### Pricing &amp; Availability
It costs **$285** that includes one year of warranty coverage irrespective of the switch choice. You can add two more years of warranty extension for an extra **$35**.
Theres also a shipping coverage for Canadian customers only.
It is available for pre-orders and should start shipping from **June** **2020**.
[Buy System76 Launch Keyboard][6]
### Closing Thoughts
System76s Launch keyboard is certainly an impressive product. Im sure it has been carefully crafted for the intended users, but it is not for everyone.
Id say it is only for mechanical keyboard enthusiasts.
Of course, having a customizable mechanical keyboard and personalizing it over the years is an expensive hobby. But I feel the entry price for a product, which is their first iteration, is a bit high.
Also, the layout, with two space bars and a color theme that gives a classic vibe to it, might limit the interested customers.
Im currently using a mechanical keyboard [CoolerMaster Masterkeys Pro L][7], which is a full-sized keyboard that offers Cherry MX browns, four profiles, macro support, onboard memory, and a few more features that cost me under **$100**.
So, considering the price bracket of mainstream options, not open-source though, this might be a tough purchase decision. But, thats just me.
_What do you think about the open-source mechanical keyboard by System76? Feel free to share your thoughts in the comments below._
#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You!
If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software.
I'm not interested
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/system76-launch-mechanical-keyboard/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://news.itsfoss.com/system76-launch-keyboard/
[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQxMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[3]: https://github.com/system76/launch
[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE1NCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[5]: https://i0.wp.com/i.ytimg.com/vi/_fMXUVUuF8Y/hqdefault.jpg?w=780&ssl=1
[6]: https://system76.com/accessories/launch
[7]: https://www.coolermaster.com/catalog/peripheral/keyboards/masterkeys-pro-l-white/

View File

@ -1,97 +0,0 @@
[#]: subject: (Dear Google, When is the Linux Support for Google Drive Arriving?)
[#]: via: (https://news.itsfoss.com/google-drive-linux-promise/)
[#]: author: (Ankush Das https://news.itsfoss.com/author/ankush/)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Dear Google, When is the Linux Support for Google Drive Arriving?
======
Google Drive is a popular [cloud storage solution][1] that offers convenient features and often a reliable choice for many consumers out there.
It is also the default choice for many Android smartphone users to store their photos or phone backups. Not to forget, WhatsApp (the most popular instant messenger) also lets you back up your chats and media to Google Drive.
Google Drive also offers competitive regional pricing, which makes it easy for users in developing countries to use cloud storage.
I think it is safe to say that it is the best choice for many users across multiple platforms. It is available for Windows, Mac, Android, and iOS.
But it is not available for Linux—bummer.
### Google Made a promise nine Years Ago
I did not make this post to ask Google to consider Linux as a significant platform (dont we know that already?), but to remind them about the promise they made.
In a Google+ thread back in 2012, a lot of users were demanding the availability of Google Drive for Linux.
Of course, I cannot point you to the dead link, considering that Google killed the Google+ platform.
You can find a link from [Android Polices coverage in 2012][2], but it is not available in the web archive either.
So the only proof we have are the old coverage from the news outlets back then.
### Why Google Drive for Linux is Essential Today
Lets face it: the adoption of Linux as a platform for desktop was not popular a decade back.
Not to forget, online learning was not as accessible as it is today.
So, more eyes on Linux as a desktop platform and even more students/learners exploring Linux for a career.
No matter whether it is a part of a promotion drive or as a professional requirement, Linux as a desktop choice has a wider reach than ever before.
Especially amid the pandemic, some even chose Linux for their existing desktops by opting for lightweight Linux distributions.
I do not mean that Windows/Mac as your platform is not a wise choice, but there are endless reasons some users prefer Linux for their desktop as well. Unfortunately, without an official Google Drive client for Linux, many desktop users end up using a different operating system.
With that said, Google Drive is one of the essential online services used by millions to store and share files.
But whats stopping Google (a trillion-dollar company) to develop a basic Google Drive desktop client for Linux?
I understand that Google was not interested in developing a Google Drive client for Linux years back. Now, there are plenty of users on Linux platform. Moreover, Im sure some Linux users must be also using G Suite for work or the premium plans for more storage. So what is the hold up here?
### Current Unofficial Options to Sync Google Drive in Linux
Until Google wakes up, you have to rely on some unofficial options. Yes, there are great tools as standalone clients, but you will have to pay for them.
Some of the available options are [Insync][3], [Expandrive][4], and few more.
Of course, you can also use [Rclone to sync your cloud ][5]drive if youre willing to take some time configuring it.
### Closing Thoughts
You may disagree with me that an official Google Drive is not essential, but I believe it can help with two things:
* Encouraging users to pick Linux as a daily driver
* Empower the current Linux users to opt using Google Drive without hassle
Hence, I thought of writing something about it through our platform. What do you think about it?
#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You!
If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software.
I'm not interested
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/google-drive-linux-promise/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/cloud-services-linux/
[2]: https://www.androidpolice.com/2012/04/25/google-drive-support-is-coming-to-linux-pray-that-it-doesnt-involve-wine/
[3]: https://itsfoss.com/insync-linux-review/
[4]: https://www.expandrive.com/
[5]: https://itsfoss.com/use-onedrive-linux-rclone/

View File

@ -1,82 +0,0 @@
[#]: subject: (CloudLinux Launches TuxCare to Provide Linux Enterprise Support)
[#]: via: (https://news.itsfoss.com/cloudlinux-tuxcare/)
[#]: author: (Ankush Das https://news.itsfoss.com/author/ankush/)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
CloudLinux Launches TuxCare to Provide Linux Enterprise Support
======
Recently, CloudLinux announced [commercial support for its CentOS replacement][1] offering. Now, they have unveiled something more exciting.
A new brand [TuxCare][2] that aims to provide a range of Linux support services. This should enable various companies to easily opt for Linux enterprise support while harnessing the expertise of CloudLinux team over the years.
Let me briefly highlight what TuxCare is all about.
### TuxCare: Affordable Enterprise Support for Linux
![][3]
TuxCare is a vendor-neutral enterprise support system is definitely a good step to improve the commercial Linux ecosystem.
It provides live patching services, end-of-life Linux support services, and other Linux support services in general.
![][4]
The press release mentions:
> TuxCares Live Patching Services, formerly KernelCare, offers live patching for critical components in the Linux stack from the kernel all the way to widely-used shared libraries like glibc and openssl. This eliminates the need for lengthy and costly service disruptions while servers or services are restarted to install the latest security patches, and no longer requires a disruptive maintenance window.
The services offered should enable easy access to complete support or protection for Linux-powered operations to any enterprise.
The president of CloudLinux also mentioned more about the new brand:
> Building out a larger brand to house our rapidly-expanding set of services makes it easier for our customers and prospects to see everything we provide in one place,” said Jim Jackson, president and chief revenue officer of CloudLinux. “Under the new TuxCare umbrella customers can review and select everything they need from our cohesive collection of services to take care of their Linux infrastructure.
Especially, the support for end-of-life Linux. Even though it is not recommended, you still have the option to help from CloudLinuxs TuxCare services to keep your old Linux enterprise system for longer.
No matter whether you are building a new Linux system or want support for an existing one, the announcement mentions that it will completely integrate with existing management/monitoring systems like [Nessus][5] or [Qualys][6].
So it should not add any overheads, but reduce maintenance cost and let you get away from costly vendor-specific enterprise support options.
Live patching services, extended lifecycle support, and Linux support [pricing plans][7] seem to be affordable. The minimum subscription option starts at as low as $2 per month.
More support services will be added in the future that includes database and virtualization stack live patching.
### Wrapping Up
Vendor-neutral enterprise support is a game-changer when it comes to giving freedom to enterprises in choosing the Linux distribution of their choice.
Not just the affordability, but the ease of opting for an enterprise support will encourage more businesses to opt for it while providing stability and security of their Linux systems.
I think this is a nice offering bringing together multiple enterprise support options under a single roof. What do you think?
#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You!
If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software.
I'm not interested
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/cloudlinux-tuxcare/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://news.itsfoss.com/almalinux-commercial-support/
[2]: https://tuxcare.com
[3]: https://i2.wp.com/i.ytimg.com/vi/zIKUBgxqhpI/hqdefault.jpg?w=780&ssl=1
[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM3OSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[5]: https://www.tenable.com/products/nessus
[6]: https://www.qualys.com
[7]: https://tuxcare.com/pricing/

View File

@ -1,84 +0,0 @@
[#]: subject: (Ubuntu Touch OTA 17 Released)
[#]: via: (https://news.itsfoss.com/ubuntu-touch-ota-17-release/)
[#]: author: (Jacob Crume https://news.itsfoss.com/author/jacob/)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Ubuntu Touch OTA 17 Released
======
**Edit:** _Article edited for correction that previously mentioned that the release was based on Ubuntu 20.04._
[Ubuntu Touch][1], the community-developed mobile version of Ubuntu, has just released a brand-new version of their OS. This time, they have been quite light on new features for the sixteenth stable update.
It is still based on Ubuntu 16.04 but we may have something based on Ubuntu 20.04 next time.
Here we will be looking at what it is, what new features are present, and what future releases may look like.
### New Ubuntu Touch OTA 17 Features
![][2]
While it doesnt have that many new features, there are still a few. These include:
* NFC support on supported devices
* Camera flash, zoom, rotation, and focus was fixed on many devices
* A new Macedonian keyboard layout
* Updated Mir from 1.2.0 to 1.8.1
The reason for such a short list of features is because the focus of the Ubuntu Touch team is for a release based on Ubuntu 20.04. There was less time to review and merge fixes and add new features like the regular OTA releases.
The upcoming release with 20.04 is making good progress, as per the announcement, but they will release it only when completely ready:
> Weve made great progress on Ubuntu Touch based on Ubuntu 20.04. We are now able to launch Lomiri, launch apps to display in Lomiri, and launch apps via a systemd user session. The problem is that all of these are separate! Putting them all together will bring us much closer to our first public milestone for the project: providing the first Ubuntu Touch image based on Ubuntu 20.04.
Read on for a more detailed dive into these new features.
#### NFC Support On Some Devices
This is the main new feature of Ubuntu Touch OTA 17. Ubuntu Touch now has support for NFC hardware in most of our devices running with Android 9 hardware compatibility, including the Pixel 3a and Volla Phone.
This feature is really interesting as it opens the door to a new range of uses for these devices. One application that really stands out to me is a possible FOSS Google Pay alternative.
#### Camera Fixed On Many Devices
One issue associated with many of the past Ubuntu Touch releases has been the erratic behavior of the camera on many devices. This has since been fixed with the OTA 17 update.
You may read the [official release announcement here][3].
### Wrapping Up
While it isnt a particularly large release, Ubuntu Touch OTA 17 does bring a few new features and fixes.
It will be exciting to see what Ubuntu Touch OTA based on Ubuntu 20.04 has to offer in the near future!
It is great to see [UBports][4] release yet another update, especially during this busy period of development. Lets just hope that they manage to get their upgrade done soon.
#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You!
If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software.
I'm not interested
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/ubuntu-touch-ota-17-release/
作者:[Jacob Crume][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/jacob/
[b]: https://github.com/lujun9972
[1]: https://ubuntu-touch.io/
[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI0MiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[3]: https://ubports.com/blog/ubports-news-1/post/ubuntu-touch-ota-17-release-3755
[4]: https://ubports.com/

View File

@ -1,73 +0,0 @@
[#]: subject: (Mozilla Firefox Is Adding Capabilities to Defend Against Malicious Sites on Desktop)
[#]: via: (https://news.itsfoss.com/firefox-defending-malicious-sites/)
[#]: author: (Ankush Das https://news.itsfoss.com/author/ankush/)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Mozilla Firefox Is Adding Capabilities to Defend Against Malicious Sites on Desktop
======
Mozilla Firefox is a popular privacy-oriented, free and open-source web browser. While privacy and security were always the core focus of their offering, they are introducing a security architecture to isolated websites.
While this was something already present in Chromium, Mozilla has finally joined the party.
It basically changes the way how Mozilla Firefox works on desktop in the background, without affecting the user experience. It is available to test with Firefox beta/nightly, and will roll out to stable releases soon.
Here, I highlight the key takeaways from the [official announcement][1].
### Site Isolation to Protect Against Malicious Attacks
With site isolation security architecture, every website that you load will have a separate process in the operating system.
This will make sure that no malicious component of a website can access any information from another website that you access.
In other words, every website loaded stays isolated from each other by having unique processes in the operating system. Just like the Total Cookie Protection feature introduced with [Firefox 86][2], which separated cookies for every website.
![][3]
Heres what the announcement mentions about it:
> In more detail, whenever you open a website and enter a password, a credit card number, or any other sensitive information, you want to be sure that this information is kept secure and inaccessible to malicious actors.
>
> As a first line of defence Firefox enforces a variety of security mechanisms, e.g. the [same-origin policy][4] which prevents adversaries from accessing such information when loaded into the same application.
This is definitely something that should be useful in the long run because this happens automatically and you do not have to enable anything to activate the security feature.
### Secure Browsing Experience With Firefox
Technically, the site isolation still depends on the guarantees of the operating system memory protection, but it is a big step towards securing the browsing experience.
In addition to separating every website and its information, there are a couple of other benefits to this new addition as well.
Just because every website will have a different process, when one of the sites that you load require more computing power, it will not necessarily affect the responsiveness of other sites. Similarly, if a tab crashes, it will not affect other websites on other tabs.
Also, this will enable the browser to efficiently use multiple cores in a modern processor and going forward.
For more technical details, and how to test it, you can go through the [official details][1].
#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You!
If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software.
I'm not interested
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/firefox-defending-malicious-sites/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://hacks.mozilla.org/2021/05/introducing-firefox-new-site-isolation-security-architecture/
[2]: https://news.itsfoss.com/firefox-86-release/
[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjY2OCIgd2lkdGg9IjQ3MiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
[4]: https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy

View File

@ -0,0 +1,97 @@
[#]: subject: (Shutter Screenshot Tool May Soon Make its Re-entry to the Ubuntu Repository)
[#]: via: (https://news.itsfoss.com/shutter-0-96-release/)
[#]: author: (Ankush Das https://news.itsfoss.com/author/ankush/)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Shutter Screenshot Tool May Soon Make its Re-entry to the Ubuntu Repository
======
Only a few months back, [Shutter had its first major release in years][1] getting rid of the old libraries and dependencies.
Now, with a new 0.96 update, Shutter is prepping to make its way to the Ubuntu universe repository and other Linux distro repositories.
In case you did not know, Shutter was removed from the main Ubuntu repository and some other repos because outdated Gnome 2 libraries were dropped as well. Considering it is one of the best ways to [take a screenshot in Linux][2], Shutter getting back to repositories will be a good thing.
### Shutter 0.96 Release: Whats New?
With the latest 0.96 version release, Shutter aims to drop dependency on GTK 2 so that it could work just fine when included in the main Ubuntu repository.
Of course, [GTK 4][3] is the latest release that comes with GNOME 40, that will take a while for all Linux distros to adopt with their next upgrade.
However, Shutter 0.96 has managed to include **GTK 3 support**, better late than never.
With GTK 3 support onboard, it now relies on new dependencies that are present in the Ubuntu repositories. As per the [announcement][4], heres a list of them:
* Gtk3
* Gtk3::ImageView &gt;= 9
* GooCanvas2 
* GooCanvas2::CairoTypes
* Pango
* libwnck-3
It is worth noting that while goocanvas was an optional dependency for older releases, goocanvas2 is essentially needed for it to work.
In case youre curious about whats gone, heres a list for that:
* Gtk2
* Gtk2::ImageView
* Gtk2::Unique
* Gtk2::AppIndicator
* Gnome2::Wnck
* Goo::Canvas
Unfortunately, there are no significant feature additions with this release. In fact, a feature has been removed as per the announcement:
> The feature of taking a section of window is removed (or, rather, commented out), because it didnt work with the way how modern Qt and Gtk were drawing their windows anyway.
It makes sense while it wasnt the most used option for many users, I assume.
Also, there a few pointers mentioned in the release notes for potential issues which you can explore more about in their [GitHub page][5]:
* Multiple screens might or might not be broken
* HiDPI screens might do screenshot of a nested menu in a wrong place
[Download Shutter 0.96][6]
### Wrapping Up
While this is not entirely an exciting release for the users, the support for GTK 3 should help make Shutter available in the main Ubuntu repository.
Until then, you may have to rely on Linux Uprisings PPA to get the latest release. It should be also available via [AUR][7] for Arch Linux users.
#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You!
If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software.
I'm not interested
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/shutter-0-96-release/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://news.itsfoss.com/shutter-0-95-release/
[2]: https://itsfoss.com/take-screenshot-linux/
[3]: https://news.itsfoss.com/gtk-4-release/
[4]: https://shutter-project.org/releases/0.96/
[5]: https://github.com/shutter-project/shutter
[6]: https://shutter-project.org/downloads/third-party-packages/
[7]: https://itsfoss.com/aur-arch-linux/

View File

@ -1,13 +0,0 @@
[#]: subject: (Monitor your Raspberry Pi with Grafana Cloud)
[#]: via: (https://opensource.com/article/21/3/raspberry-pi-grafana-cloud)
[#]: author: (Matthew Helmke https://opensource.com/users/matthew-helmke)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Monitor your Raspberry Pi with Grafana Cloud
======
Find out what's going on in your Internet of Things environment without
having to host Grafana yourself.

View File

@ -2,7 +2,7 @@
[#]: via: (https://opensource.com/article/21/5/python-31-features)
[#]: author: (Moshe Zadka https://opensource.com/users/moshez)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -1,25 +0,0 @@
[#]: subject: ()
[#]: via: (https://www.2daygeek.com/install-media-codecs-ubuntu-fedora-opensuse/)
[#]: author: ( )
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
======
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/install-media-codecs-ubuntu-fedora-opensuse/
作者:[][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:
[b]: https://github.com/lujun9972

View File

@ -1,203 +0,0 @@
[#]: subject: (Looking back at what Python 3.4 did for enum)
[#]: via: (https://opensource.com/article/21/5/python-34-features)
[#]: author: (Moshe Zadka https://opensource.com/users/moshez)
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Looking back at what Python 3.4 did for enum
======
Plus explore some of the underutilized but still useful Python features.
![old school calculator][1]
This is the fifth in a series of articles about features that first appeared in a version of Python 3.x. Python 3.4 was first released in 2014, and even though it has been out for a long time, many of the features it introduced are underused and pretty cool. Here are three of them.
### enum
One of my favorite logic puzzles is the self-descriptive [Hardest Logic Puzzle Ever][2]. Among other things, it talks about three gods who are called A, B, and C. Their identities are True, False, and Random, in some order. You can ask them questions, but they only answer in the god language, where "da" and "ja" mean "yes" and "no," but you do not know which is which.
If you decide to use Python to solve the puzzle, how would you represent the gods' names and identities and the words in the god language? The traditional answer has been to use strings. However, strings can be misspelled with disastrous consequences.
If, in a critical part of your solution, you compare to the string `jaa` instead of `ja`, you will have an incorrect solution. While the puzzle does not specify what the stakes are, that's probably best avoided.
The `enum` module gives you the ability to define these things in a debuggable yet safe manner:
```
import enum
@enum.unique
class Name(enum.Enum):
    A = enum.auto()
    B = enum.auto()
    C = enum.auto()
   
@enum.unique
class Identity(enum.Enum):
    RANDOM = enum.auto()
    TRUE = enum.auto()
    FALSE = enum.auto()
       
@enum.unique
class Language(enum.Enum):
    ja = enum.auto()
    da = enum.auto()
```
One advantage of enums is that in debugging logs or exceptions, the enum is rendered helpfully:
```
name = Name.A
identity = Identity.RANDOM
answer = Language.da
print("I suspect", name, "is", identity, "because they answered", answer)
[/code] [code]`    I suspect Name.A is Identity.RANDOM because they answered Language.da`
```
### functools.singledispatch
While developing the "infrastructure" layer of a game, you want to deal with various game objects generically but still allow the objects to customize actions. To make the example easier to explain, assume it's a text-based game. When you use an object, most of the time, it will just print `You are using <x>`. But using a special sword might require a random roll, and it will fail otherwise.
When you acquire an object, it is usually added to the inventory. However, a particularly heavy rock will smash a random object; if that happens, the inventory will lose that object.
One way to approach this is to have methods `use` and `acquire` on objects. More and more of these methods will be added as the game's complexity increases, making game objects unwieldy to write.
Instead, `functools.singledispatch` allows you to add methods retroactively—in a safe and namespace-respecting manner.
You can define classes with no behavior:
```
class Torch:
    name="torch"
class Sword:
    name="sword"
class Rock:
    name="rock"
[/code] [code]
import functools
@functools.singledispatch
def use(x):
    print("You use", x.name)
@functools.singledispatch
def acquire(x, inventory):
    inventory.add(x)
```
For the torch, those generic implementations are enough:
```
inventory = set()
def deploy(thing):
    acquire(thing, inventory)
    use(thing)
    print("You have", [item.name for item in inventory])
deploy(Torch())
[/code] [code]
    You use torch
    You have ['torch']
```
However, the sword and the rock need some specialized functionality:
```
import random
@use.register(Sword)
def use_sword(sword):
    print("You try to use", sword.name)
    if random.random() &lt; 0.9:
        print("You succeed")
    else:
        print("You fail")
deploy(sword)
[/code] [code]
    You try to use sword
    You succeed
    You have ['sword', 'torch']
[/code] [code]
import random
@acquire.register(Rock)
def acquire_rock(rock, inventory):
    to_remove = random.choice(list(inventory))
    inventory.remove(to_remove)
    inventory.add(rock)
deploy(Rock())
[/code] [code]
    You use rock
    You have ['sword', 'rock']
```
The rock might have crushed the torch, but your code is much easier to read.
### pathlib
The interface to file paths in Python has been "smart-string manipulation" since the beginning of time. Now, with `pathlib`, Python has an object-oriented way to manipulate paths:
```
`import pathlib`[/code] [code]
gitconfig = pathlib.Path.home() / ".gitconfig"
text = gitconfig.read_text().splitlines()
```
Admittedly, using `/` as an operator to generate path names is a little cutesy, but it ends up being nice in practice. Methods like `.read_text()` allow you to get text out of small files without needing to open and close file handles manually.
This lets you concentrate on the important stuff:
```
for line in text:
    if not line.strip().startswith("name"):
        continue
    print(line.split("=")[1])
[/code] [code]`     Moshe Zadka`
```
### Welcome to 2014
Python 3.4 was released about seven years ago, but some of the features that first showed up in this release are cool—and underused. Add them to your toolkit if you haven't already.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/5/python-34-features
作者:[Moshe Zadka][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/moshez
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/math_money_financial_calculator_colors.jpg?itok=_yEVTST1 (old school calculator)
[2]: https://en.wikipedia.org/wiki/The_Hardest_Logic_Puzzle_Ever

View File

@ -1,84 +0,0 @@
[#]: subject: (What is serverless with Java?)
[#]: via: (https://opensource.com/article/21/5/what-serverless-java)
[#]: author: (Daniel Oh https://opensource.com/users/daniel-oh)
[#]: collector: (lujun9972)
[#]: translator: (DCOLIVERSUN)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
What is serverless with Java?
======
Java is still one of the most popular languages for developing
enterprise applications. So, why are serverless developers shying away
from it?
![Coffee beans and a cup of coffee][1]
For decades, enterprises have developed business-critical applications on various platforms, including physical servers, virtual machines, and cloud environments. The one thing these applications have in common across industries is they need to be continuously available (24x7x365) to guarantee stability, reliability, and performance, regardless of demand. Therefore, every enterprise must be responsible for the high costs of maintaining an infrastructure (e.g., CPU, memory, disk, networking, etc.) even if actual resource utilization is less than 50%.
Serverless architecture was developed to help solve these problems. Serverless allows developers to build and run applications on demand, guaranteeing high availability without having to manage servers in multi- and hybrid-cloud environments. Behind the scenes, there are still many servers in the serverless topology, but they are abstracted away from application development. Instead, cloud providers use serverless services for resource management, such as provisioning, maintaining, networking, and scaling server instances.
Because of its effectiveness, the serverless development model is now a requirement for enterprises that want to spin up their business applications on demand rather than running them all the time.
Many open source projects have been created to manage serverless applications on [Kubernetes][2] clusters with the Linux container package over virtual machines. The [CNCF's Interactive Serverless Landscape][3] is a guide to open source projects, tools, frameworks, and public cloud platforms that enable DevOps teams to handle serverless applications.
![CNCF Serverless Landscape][4]
([CNCF][3], [Apache License 2.0][5])
Developers can write code then deploy it quickly to various serverless environments. Then the serverless application responds to demand and automatically scales up and down as needed.
You may be wondering what programming language and runtime are best suited for serverless application development to integrate with the technologies in the figure above. There's not just one answer to this question, but let's take a step back to discuss the application runtime that is most popular for developing business applications in enterprise production environments: Java.
According to [Developer Economics][6], as of Q3 2020, more than 8 million enterprise developers are still using Java to achieve their business requirements. Yet, according to a [2020 NewRelic survey][7], Java (at 6%) is clearly not the top choice for forward-thinking developers using a popular cloud service.
![NewRelic data on serverless runtimes and languages][8]
Data from NewRelic's Serverless Benchmark Report (Daniel Oh, [CC BY-SA 4.0][9])
Resource usage, response times, and latency are critical in serverless development. Serverless offerings from public cloud providers are usually metered on-demand, charged only when a serverless application is up, through an event-driven execution model. Therefore, enterprises don't pay anything when a serverless application is idle or scaled down to zero.
### The state of Java with containers
With this background, you may be asking: "_Why_ _don't_ _developers try to use_ _the_ _Java stack for serverless application development_ _given that_ _existing business applications are most likely developed on Java technologies?_"
Here is the hidden truth: It's hard to optimize Java applications in the new immutable infrastructure, also known as container platforms (e.g., Kubernetes).
![Differences in memory resource usage][10]
(Daniel Oh, [CC BY-SA 4.0][9])
This diagram depicts the differences in memory resource usage between a Java process and competing languages and frameworks, such as [Node.js][11] and [Go][12]. Java HotSpot has the largest footprint, which includes the heap memory allocated per Java Virtual Machine (JVM) instance. The middle shows how much smaller each process is on Node.js compared to Java. And finally, Go is a compiled language popular on the cloud due to its low memory consumption.
As you can see, you get higher density as you go from left to right on this diagram. This is the reason developers shy away from Java (including [Spring Boot][13], an opinionated microservice Java framework) when writing serverless applications on the cloud, containers, and Kubernetes.
### What's next?
Enterprises can gain significant benefits by implementing serverless applications, but resource-density issues cause them to avoid using the Java stack for developing serverless application development on Kubernetes. But choosing a different language creates a burden on the millions of Java developers worldwide. Therefore, in the next article in this series, I will guide you on how to get started with Java serverless functions instead of choosing a different language.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/5/what-serverless-java
作者:[Daniel Oh][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/daniel-oh
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/java-coffee-mug.jpg?itok=Bj6rQo8r (Coffee beans and a cup of coffee)
[2]: https://opensource.com/article/19/6/reasons-kubernetes
[3]: https://landscape.cncf.io/serverless?zoom=150
[4]: https://opensource.com/sites/default/files/uploads/cncf-serverless-landscape.png (CNCF Serverless Landscape)
[5]: https://github.com/cncf/landscape/blob/master/LICENSE
[6]: https://developereconomics.com/
[7]: https://newrelic.com/resources/ebooks/serverless-benchmark-report-aws-lambda-2020
[8]: https://opensource.com/sites/default/files/uploads/newrelic_serverlessbenchmarkreport.png (NewRelic data on serverless runtimes and languages)
[9]: https://creativecommons.org/licenses/by-sa/4.0/
[10]: https://opensource.com/sites/default/files/uploads/java-containers.png (Differences in memory resource usage)
[11]: https://nodejs.org/
[12]: https://golang.org/
[13]: https://spring.io/projects/spring-boot

View File

@ -1,107 +0,0 @@
[#]: subject: (Joining Fedora Linux to an enterprise domain)
[#]: via: (https://fedoramagazine.org/join-fedora-linux-enterprise-domain/)
[#]: author: (ogutierrez https://fedoramagazine.org/author/ogutierrez/)
[#]: collector: (lujun9972)
[#]: translator: (Chao-zhi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Joining Fedora Linux to an enterprise domain
======
![][1]
Photo by [Gene Gallin][2] on [Unsplash][3]
When you think about corporate networks, the most widely used Linux-based operating system that comes to mind is Red Hat Enterprise Linux (RHEL), used mostly on servers, but also as workstations. Fedora Linux is also a very good choice for a workstation, and comes packed with lots of features to work in the corporate environment and makes management an easy task.
When you work with many machines in your network you need a way to manage users and machines in a centralized way. Thats why [FreeIPA][4] and [Active Directory][5] are the technologies of choice for this task. They allow a sysadmin to manage a huge amount of machines using a directory of all the entities in their network.
### Fedora and Active Directory
Active Directory is very common in corporate environments. Fedora and RHEL integrate well with services such as FreeIPA or Active Directory by using the System Security Services Daemon (SSSD). SSSD is a system service to access remote directories and authentication mechanisms. A machine using this software is able to authenticate with remote credentials and access other services available in that directory network.
To join a domain network, you need the domain administrators permission to add the machine. Maybe by setting special permissions on your domain credentials or doing the pre-configuration of that machine on your behalf. Fedora Linux has an option to configure a machine during installation called _Enterprise Login_. If your machine network is automatically configured for the enterprise domain network, then you can login with your domain credentials directly.
![][6]
In the case your configuration is not automated—or you have Fedora Linux already installed—you can join an Active Directory domain with a few configuration steps:
1. Set up the DNS for this machine. To connect to a directory service, you need first to be able to resolve the directory domain name. If your network sets up the correct DNS using DHCP, you can skip this step.
2. Change your machine name to reflect it will be part of the new domain. Edit the file _/etc/hostname_ and change the machine name to “machinename.my_domain”
3. Join the domain by executing this command: _sudo realm join my_domain -v_ (replace “my_domain” with the name of your domain)
After running this command, the system will ask for the credentials of a user allowed to join new machines in that domain. If there are no errors in the process, the machine will become part of the domain.
![][7]
Now that this machine is part of your domain you can:
* Login with a domain username into the machine
* Get kerberos tickets to access different services in the domain network
* Access other services, depending on how the domain is configured
### Manage Fedora Linux with Fleet Commander
Now the machine is part of your domain, you can manage it with the domain administrator tools for Active Directory. Since your machine is not running Windows, you are limited to authentication and access to network and directory services. You cannot set up things like desktop-related configuration on this machine.
Luckily, Fedora has a tool called [Fleet Commander][8].
#### Create configuration
Fleet Commander is a management tool that allows you to set up desktop configuration profiles for all Fedora Linux machines across your network.
This means, you can set up any configuration for GNOME desktop, Firefox, Chrome, LibreOffice, and other supported software in an easy way, and then make that configuration to be applied on login to the selected users/groups/machines in a granular way.
![][9]
To use this tool, install the fleet-commander-admin package
```
sudo dnf install fleet-commander-admin
```
Next, visit [http://localhost:9090][10] in your browser to log in. On the menu to the left, click on _Fleet Commander_.
Fleet Commander has a tool to set up the configuration profiles intuitively using a “live session” mechanism. It runs a VM that serves as a template of your base machines. You to manually make the configuration changes you want. Then you review all the configuration changes, select the ones you want to add to the profile, and deploy it.
#### Manage clients
In each of your Fedora Linux or RHEL machines, you will need to install the Fleet Commander client service. This services activates when a user logs in. It searches the domain for the profiles that apply to current user/machine, and applies the configuration for the session.
To install the fleet-commander-client:
```
sudo dnf install fleet-commander-client
```
The software will detect if the machine is part of a domain automatically. When a user logs in, it will set up the session with the profiles that apply to the user.
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/join-fedora-linux-enterprise-domain/
作者:[ogutierrez][a]
选题:[lujun9972][b]
译者:[Chao-zhi](https://github.com/Chao-zhi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://fedoramagazine.org/author/ogutierrez/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2021/05/enterprise-816x345.jpg
[2]: https://unsplash.com/@genefoto?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[3]: https://unsplash.com/s/photos/fleet?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[4]: https://www.freeipa.org/page/Main_Page
[5]: https://en.wikipedia.org/wiki/Active_Directory
[6]: https://lh5.googleusercontent.com/aIRYn2TDgaaUrErzBV_KPVgpm94OrVgySlwqlI3VsotslWKN5UnLQ0VYjESSFB12aZWf_UnbmOOwa_rcxvRoI-MB6gFaw8p-RgBP9Lswnb2YV3iIlQ8YeXgpwJC_-B5tPrFTfUe_
[7]: https://lh6.googleusercontent.com/DVvr7cHuZxvgqhAHk9v7jAYSER7VSP1G7CJ1xHx1kT5ZS-v1yt3rKMmwk9JhsLnYGfwAjOPPpSC2BGTpZtAdKrnx7XLUWgOZBhFFwB6SL7vR_q_2N1c_OGYp7YmNLRk7oRW8IEVB
[8]: https://fleet-commander.org/
[9]: https://lh6.googleusercontent.com/ATeNp5niX37MW7ARiMVSkqe9Vr5Fv4IN6eUW5xf1UPO0AMO1DxXLypw0CbqTNOfzLJYDM18ggc7Mrh3LZK8Foh80K1WjSW9LHQD081BbJg0owQJj_ZQdICLr0tGILmBRco-xbq92
[10]: http://localhost:9090/

View File

@ -0,0 +1,336 @@
[#]: subject: (4 steps to set up global modals in React)
[#]: via: (https://opensource.com/article/21/5/global-modals-react)
[#]: author: (Ajay Pratap https://opensource.com/users/ajaypratap)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
4 steps to set up global modals in React
======
Learn how to create interactive pop-up windows in a React web app.
![Digital creative of a browser on the internet][1]
A modal dialog is a window that appears on top of a web page and requires a user's interaction before it disappears. [React][2] has a couple of ways to help you generate and manage modals with minimal coding.
If you create them within a **local scope**, you must import modals into each component and then create a state to manage each modal's opening and closing status.
By using a **global state**, you don't need to import modals into each component, nor do you have to create a state for each. You can import all the modals in one place and use them anywhere.
In my opinion, the best way to manage modal dialogs in your React application is globally by using a React context rather than a local state.
### How to create global modals
Here are the steps (and code) to set up global modals in React. I'm using [Patternfly][3] as my foundation, but the principles apply to any project.
#### 1\. Create a global modal component
In a file called **GlobalModal.tsx**, create your modal definition:
```
import React, { useState, createContext, useContext } from 'react';
import { CreateModal, DeleteModal,UpdateModal } from './components';
export const MODAL_TYPES = {
CREATE_MODAL:”CREATE_MODAL”,
 DELETE_MODAL: “DELETE_MODAL”,
 UPDATE_MODAL: “UPDATE_MODAL”
};
const MODAL_COMPONENTS: any = {
 [MODAL_TYPES.CREATE_MODAL]: CreateModal,
 [MODAL_TYPES.DELETE_MODAL]: DeleteModal,
 [MODAL_TYPES.UPDATE_MODAL]: UpdateModal
};
type GlobalModalContext = {
 showModal: (modalType: string, modalProps?: any) =&gt; void;
 hideModal: () =&gt; void;
 store: any;
};
const initalState: GlobalModalContext = {
 showModal: () =&gt; {},
 hideModal: () =&gt; {},
 store: {},
};
const GlobalModalContext = createContext(initalState);
export const useGlobalModalContext = () =&gt; useContext(GlobalModalContext);
export const GlobalModal: React.FC&lt;{}&gt; = ({ children }) =&gt; {
 const [store, setStore] = useState();
 const { modalType, modalProps } = store || {};
 const showModal = (modalType: string, modalProps: any = {}) =&gt; {
   setStore({
     ...store,
     modalType,
     modalProps,
   });
 };
 const hideModal = () =&gt; {
   setStore({
     ...store,
     modalType: null,
     modalProps: {},
   });
 };
 const renderComponent = () =&gt; {
   const ModalComponent = MODAL_COMPONENTS[modalType];
   if (!modalType || !ModalComponent) {
     return null;
   }
   return &lt;ModalComponent id="global-modal" {...modalProps} /&gt;;
 };
 return (
   &lt;GlobalModalContext.Provider value={{ store, showModal, hideModal }}&gt;
     {renderComponent()}
     {children}
   &lt;/GlobalModalContext.Provider&gt;
 );
};
```
In this code, all dialog components are mapped with the modal type. The `showModal` and `hideModal` functions are used to open and close dialog boxes, respectively.
The `showModal` function takes two parameters: `modalType` and `modalProps`. The `modalProps` parameter is optional; it is used to pass any type of data to the modal as a prop.
The `hideModal` function doesn't have any parameters; calling it causes the current open modal to close.
#### 2\. Create modal dialog components
In a file called **CreateModal.tsx**, create a modal:
```
import React from "react";
import { Modal, ModalVariant, Button } from "@patternfly/react-core";
import { useGlobalModalContext } from "../GlobalModal";
export const CreateModal = () =&gt; {
 const { hideModal, store } = useGlobalModalContext();
 const { modalProps } = store || {};
 const { title, confirmBtn } = modalProps || {};
 const handleModalToggle = () =&gt; {
   hideModal();
 };
 return (
   &lt;Modal
     variant={ModalVariant.medium}
     title={title || "Create Modal"}
     isOpen={true}
     onClose={handleModalToggle}
     actions={[
       &lt;Button key="confirm" variant="primary" onClick={handleModalToggle}&gt;
         {confirmBtn || "Confirm button"}
       &lt;/Button&gt;,
       &lt;Button key="cancel" variant="link" onClick={handleModalToggle}&gt;
         Cancel
       &lt;/Button&gt;
     ]}
   &gt;
     Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
     tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
     veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
     commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
     velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
     cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
     est laborum.
   &lt;/Modal&gt;
 );
};
```
This has a custom hook, `useGlobalModalContext`, that provides store object from where you can access all the props and the functions `showModal` and `hideModal`. You can close the modal by using the `hideModal` function.
To delete a modal, create a file called **DeleteModal.tsx**:
```
import React from "react";
import { Modal, ModalVariant, Button } from "@patternfly/react-core";
import { useGlobalModalContext } from "../GlobalModal";
export const DeleteModal = () =&gt; {
 const { hideModal } = useGlobalModalContext();
 const handleModalToggle = () =&gt; {
   hideModal();
 };
 return (
   &lt;Modal
     variant={ModalVariant.medium}
     title="Delete Modal"
     isOpen={true}
     onClose={handleModalToggle}
     actions={[
       &lt;Button key="confirm" variant="primary" onClick={handleModalToggle}&gt;
         Confirm
       &lt;/Button&gt;,
       &lt;Button key="cancel" variant="link" onClick={handleModalToggle}&gt;
         Cancel
       &lt;/Button&gt;
     ]}
   &gt;
     Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
     tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
     veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
     commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
     velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
     cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
     est laborum.
   &lt;/Modal&gt;
 );
};
```
To update a modal, create a file called **UpdateModal.tsx** and add this code:
```
import React from "react";
import { Modal, ModalVariant, Button } from "@patternfly/react-core";
import { useGlobalModalContext } from "../GlobalModal";
export const UpdateModal = () =&gt; {
 const { hideModal } = useGlobalModalContext();
 const handleModalToggle = () =&gt; {
   hideModal();
 };
 return (
   &lt;Modal
     variant={ModalVariant.medium}
     title="Update Modal"
     isOpen={true}
     onClose={handleModalToggle}
     actions={[
       &lt;Button key="confirm" variant="primary" onClick={handleModalToggle}&gt;
         Confirm
       &lt;/Button&gt;,
       &lt;Button key="cancel" variant="link" onClick={handleModalToggle}&gt;
         Cancel
       &lt;/Button&gt;
     ]}
   &gt;
     Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
     tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
     veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
     commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
     velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
     cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
     est laborum.
   &lt;/Modal&gt;
 );
};
```
#### 3\. Integrate GlobalModal into the top-level component in your application
To integrate the new modal structure you've created into your app, you just import the global modal class you've created. Here's my sample **App.tsx** file:
```
import "@patternfly/react-core/dist/styles/base.css";
import "./fonts.css";
import { GlobalModal } from "./components/GlobalModal";
import { AppLayout } from "./AppLayout";
export default function App() {
 return (
   &lt;GlobalModal&gt;
     &lt;AppLayout /&gt;
   &lt;/GlobalModal&gt;
 );
}
```
App.tsx is the top-level component in your app, but you can add another component according to your application's structure. However, make sure it is one level above where you want to access modals.
`GlobalModal` is the root-level component where all your modal components are imported and mapped with their specific `modalType`.
#### 4\. Select the modal's button from the AppLayout component
Adding a button to your modal with **AppLayout.js**:
```
import React from "react";
import { Button, ButtonVariant } from "@patternfly/react-core";
import { useGlobalModalContext, MODAL_TYPES } from "./components/GlobalModal";
export const AppLayout = () =&gt; {
 const { showModal } = useGlobalModalContext();
 const createModal = () =&gt; {
   showModal(MODAL_TYPES.CREATE_MODAL, {
     title: "Create instance form",
     confirmBtn: "Save"
   });
 };
 const deleteModal = () =&gt; {
   showModal(MODAL_TYPES.DELETE_MODAL);
 };
 const updateModal = () =&gt; {
   showModal(MODAL_TYPES.UPDATE_MODAL);
 };
 return (
   &lt;&gt;
     &lt;Button variant={ButtonVariant.primary} onClick={createModal}&gt;
       Create Modal
     &lt;/Button&gt;
     &lt;br /&gt;
     &lt;br /&gt;
     &lt;Button variant={ButtonVariant.primary} onClick={deleteModal}&gt;
       Delete Modal
     &lt;/Button&gt;
     &lt;br /&gt;
     &lt;br /&gt;
     &lt;Button variant={ButtonVariant.primary} onClick={updateModal}&gt;
       Update Modal
     &lt;/Button&gt;
   &lt;/&gt;
 );
};
```
There are three buttons in the AppLayout component: create modal, delete modal, and update modal. Each modal is mapped with the corresponding `modalType`: `CREATE_MODAL`, `DELETE_MODAL`, or `UPDATE_MODAL`.
### Use global dialogs
Global modals are a clean and efficient way to handle dialogs in React. They are also easier to maintain in the long run. The next time you set up a project, keep these tips in mind.
If you'd like to see the code in action, I've included the [complete application][4] I created for this article in a sandbox.
Leslie Hinson sits down with Andrés Galante, an expert HTML and CSS coder who travels the world...
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/5/global-modals-react
作者:[Ajay Pratap][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/ajaypratap
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_web_internet_website.png?itok=g5B_Bw62 (Digital creative of a browser on the internet)
[2]: https://reactjs.org/
[3]: https://www.patternfly.org/v4/
[4]: https://codesandbox.io/s/affectionate-pine-gib74

View File

@ -0,0 +1,93 @@
[#]: subject: (Keep tabs on your Linux computer specs with this desktop application)
[#]: via: (https://opensource.com/article/21/5/linux-kinfocenter)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Keep tabs on your Linux computer specs with this desktop application
======
Get to know KDE Plasma's Info Center, a lifesaver when you need to know
your Linux machine's specs quickly.
![Puzzle pieces coming together to form a computer screen][1]
Whether I'm using a laptop my employer assigned to me or a workstation I built from vendor parts, I seem to have an endless capacity to forget my computer's specifications. One of the great things about Linux is its `/proc` filesystem, a dynamically populated virtual expression of the system's hardware. It's convenient when you want to see the specifics of your CPU (`cat /proc/cpuinfo`), uptime (`cat /proc/uptime`), a list of mounted filesystems (`ls -R /proc/fs/`), and so on.
Sometimes, though, it's nice to have everything you need (and what you don't know you need) all in one place for your perusal. The KDE Plasma desktop provides an application called Info Center (sometimes also called [KInfoCenter][2]), a place to help you know what, where, and how much you're running.
### Installing KInfoCenter
If you're already running the [KDE Plasma desktop][3], then KInfoCenter is probably already installed. Otherwise, you can find the application in your distribution's software repository.
For example, on Fedora or CentOS Stream:
```
`$ sudo dnf install kinfocenter`
```
### System information
When Info Center is launched, the default screen is the **About System** pane. This displays the versions of your Plasma desktop, KDE Frameworks, and Qt: all the technologies that work together to provide the desktop. It also displays the Linux kernel version and architecture and gives you a quick hardware overview, listing both your CPU and RAM.
![KInfoCenter's main display][4]
(Seth Kenlon, [CC BY-SA 4.0][5])
### Memory and resources
Maybe seeing the total RAM installed on your system isn't specific enough for you. In that case, you can open the **Memory** pane to see a detailed report about how your RAM is being used. This updates dynamically, so you can use it to monitor the effects an application or activity has on your system.
![KInfoCenter's Memory pane][6]
(Seth Kenlon, [CC BY-SA 4.0][5])
If you're on a laptop, **Energy Information** displays your power-saving settings. If you have file indexing active, you can view the status of the indexer in the **File Indexer Monitor** panel.
### Devices
The **Device Information** folder contains several panes you can access for details about the physical peripherals inside or connected to your computer. This covers _everything_, including USB devices, hard drives, processors, PCI slots, and more.
![KInfoCenter's Device Information pane][7]
(Seth Kenlon, [CC BY-SA 4.0][5])
This isn't just a broad overview, either. KInfoCenter gives you nearly everything there is to know about the components you're running. For hard drives, it provides a list of partitions, the SATA port the drive is connected to, the drive label or name you've given it, UUID, size, partition, the filesystem, whether it's mounted and where, and more. For the CPU, it provides the product name, vendor, number of cores (starting at 0), maximum clock speed, interrupt information, and supported instruction sets. The list goes on and on for every type of device you can think of.
### Network and IP address
Maybe you're tired of parsing the verbose output of `ip address show`. Maybe you're too lazy to create an alias for `ip address show | grep --only-matching "inet 10.*" | cut -f2 -d" "`. Whatever the reason, sometimes you want an easy way to get a machine's IP address. KInfoCenter is the answer because the **Network Information** panel contains its host's IP address. In fact, it lists both the active hardware-based IP addresses as well as active bridges for virtual machines.
It seems basic, but this simple KInfoCenter feature has saved me minutes of frustration when trying to obtain an IP address quickly over a support call so I could SSH into the machine in question and fix a problem. The network panel also provides information about [Samba shares][8], the open source file sharing service you can run locally to swap files between computers on your network easily.
### Graphics
As if that's not enough, KInfoCenter also features a **Graphical Information** panel so you can get details about your graphics server, whether you're running Wayland or X11. You can get data on your display's dimensions, resolution (you may remember when 72 DPI was standard, but this panel assures you that you're running a more modern 92 DPI), bit depth, and more. It also provides information on OpenGL or Vulkan, including what card is being used to render graphics, what extensions are in use, what kernel module is installed, and so on.
### KInfoCenter? More like KLifeSaver
I regularly pin KInfoCenter to the KDE Kicker or create a shortcut to it on the desktop so that users I support can get there easily whenever they need to know their architecture, RAM, or IP address. It's the most friendly aggregation of system information I've seen on any operating system, much less on any Linux desktop. Install KInfoCenter today. You might not use it right away, but you'll need it someday, and when you do, you'll be glad you have it.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/5/linux-kinfocenter
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/puzzle_computer_solve_fix_tool.png?itok=U0pH1uwj (Puzzle pieces coming together to form a computer screen)
[2]: https://userbase.kde.org/KInfoCenter
[3]: https://opensource.com/article/19/12/linux-kde-plasma
[4]: https://opensource.com/sites/default/files/uploads/kinfocenter-main.png (KInfoCenter's main display)
[5]: https://creativecommons.org/licenses/by-sa/4.0/
[6]: https://opensource.com/sites/default/files/uploads/kinfocenter-memory.png (KInfoCenter's Memory pane)
[7]: https://opensource.com/sites/default/files/uploads/kinfocenter-peripherals.png (KInfoCenter's Device Information pane)
[8]: https://opensource.com/article/21/4/share-files-linux-windows

View File

@ -0,0 +1,123 @@
[#]: subject: (Gromit-MPX Lets You Draw Anywhere On Linux Desktop Screen)
[#]: via: (https://itsfoss.com/gromit-mpx/)
[#]: author: (Sarvottam Kumar https://itsfoss.com/author/sarvottam/)
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Gromit-MPX Lets You Draw Anywhere On Linux Desktop Screen
======
Have you ever wished that you could freeze your Linux desktop screen and draw anything on it? Or, you may want to point out or highlight a part of your app or desktop to someone else while [screen recording on Linux][1]?
If so, Gromit-MPX is an easy-to-use on-screen annotation tool that you could use right now.
### Make Annotation On Screen Using Gromit-MPX
![Gromit-MPX][2]
[Gromit-MPX][3] (**GR**aphics **O**ver **MI**scellaneous **T**hings **M**ulti-**P**ointer **EX**tension) is a free and open-source tool that lets you annotate anywhere on the screen. The best thing about the app is it does not restrict you to use it only on one desktop environment.
Rather, Gromit-MPX is desktop-independent and supports [all Unix-based desktop environments][4] such as GNOME, KDE, and Xfce under both X11 and Wayland windowing sessions.
Even for X11, if you have a second pair of input devices and want to use it to annotate in place of the first pair, the app lets you set both a pointer for a dedicated annotation device and a multi-pointer at once.
Another thing that makes Gromit-MPX quite different from other available annotation tools is its easy-to-use and distraction-free philosophy.
What I mean to say is that, once you install and activate the app, you can either operate it using its tray icon (if your desktop has a system tray) or six default keys binding. Gromit-MPX does not draw or stick any UI widget of its own for making useful options available.
![Tray icon options][5]
You can toggle it on and off on the fly using a `F9` hotkey without interrupting your normal workflow. And whether you want to undo/redo your last draw or clear the screen completely, youre only one key away from performing the action: `F8` to undo the last stroke (max up to 4 stroke) and `SHIFT-F9` to clear the screen.
![Gromit-MPX Available Commands][6]
Of course, youre also completely free to change its default configuration for both key bindings and drawing tools.
One of the things that I think Gromit-MPX lacks is the availability of different shapes like rectangles, circles, and straight lines. Currently, you can annotate the desktop screen only using freehand drawing, which you may initially find difficult to handle.
![Upcoming feature in Gromit-MPX][7]
However, the good news is the functionality to draw straight lines in Gromit-MPX is under development and already planned to feature in the next version 1.5.
### Installing Gromit-MPX on Ubuntu and other Linux distributions
If youre using Debian-based distributions like Ubuntu, Gromit-MPX is already available in the repository. You only need to run a single command to install it.
```
sudo apt install gromit-mpx
```
However, for the older OS version, you may not get the latest version 1.4 of the app and miss some important features. If you want the current latest version 1.4, you need to install it from the [Flathub repository][8] using the universal package manager [Flatpak][9].
If youve not set up Flatpak on your system, check out the complete [Flatpak guide][10]. Once you enable the Flatpak support, you can run the following command to install Gromit-MPX.
```
flatpak install flathub net.christianbeier.Gromit-MPX
```
![Install Gromit-MPX Using Flatpak][11]
If you dont want the Flatpak package or your system doesnt support it, you can also download its [source code][3], compile and build the app on its own.
### How to change key binding and tool color in Gromit-MPX?
By default, Gromit-MPX uses red color for the tool. But it also provides other colors that you can switch to using hotkeys. For instance, once you toggle on drawing, you can hold `SHIFT` for turning tool color into blue, and `CONTROL` for yellow.
And if you wish your default color other than red or different color for different hotkeys, you can configure the same in the `gromit-mpx.cfg` file.
![Change tool color][12]
You can find the configuration file either in a directory listed in $XDG_CONFIG_HOME variable (usually ~/.config or ~/.var/app/net.christianbeier.Gromit-MPX/config/ if youve installed Flatpak package) or /etc/gromit-mpx/ if you have Debian package.
For changing the default Hotkey or Undo key, you need to add a new entry with a custom value in the same config file.
```
HOTKEY="F9"
UNDOKEY="F8"
```
### How to start Gromit-MPX automatically on boot?
In case youre using Gromit-MPX regularly, then you may want to mark it as a startup app instead of opening it manually each time you boot the system.
So, to autostart Gromit-MPX, you can either make use of the GUI [Startup Applications utility][13] or manually add a desktop entry with the below content at `~/.config/autostart/gromit-mpx.desktop`.
```
[Desktop Entry]
Type=Application
Exec=gromit-mpx
```
If youre using the Flatpak package, you need to replace `Exec=gromit-mpx` with `Exec=flatpak run net.christianbeier.Gromit-MPX`.
I hope you like this nifty tool. If you try it, dont forget to share your experience.
--------------------------------------------------------------------------------
via: https://itsfoss.com/gromit-mpx/
作者:[Sarvottam Kumar][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/sarvottam/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/best-linux-screen-recorders/
[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/05/Gromit-MPX.jpg?resize=800%2C450&ssl=1
[3]: https://github.com/bk138/gromit-mpx
[4]: https://itsfoss.com/best-linux-desktop-environments/
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/05/Tray-icon-options.jpg?resize=235%2C450&ssl=1
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/05/Gromit-MPX-Available-Commands.jpg?resize=800%2C361&ssl=1
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/05/Upcoming-feature-in-Gromit-MPX.jpg?resize=600%2C338&ssl=1
[8]: https://flathub.org/apps/details/net.christianbeier.Gromit-MPX
[9]: https://itsfoss.com/what-is-flatpak/
[10]: https://itsfoss.com/flatpak-guide/
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/05/Install-Gromit-MPX-Using-Flatpak.jpg?resize=800%2C325&ssl=1
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/05/Change-tool-color.jpg?resize=800%2C450&ssl=1
[13]: https://itsfoss.com/manage-startup-applications-ubuntu/

View File

@ -1,151 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (ywxgod)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (6 predictions for JavaScript build tools)
[#]: via: (https://opensource.com/article/20/11/javascript-build-tools)
[#]: author: (Shedrack Akintayo https://opensource.com/users/shedrack-akintayo)
对Javascript构建工具的6个预测
======
Javascript前端工具的生态系统充满着变数和竞争且只有最好的工具才会存活下来。
![Magnifying glass on code][1]
生产中的代码与开发中的有所不同. 在生产中,我们需要构建一些能运行得够快,能管理各种依赖关系,能自动执行任务,能加载外部模块等功能的包。而那些将开发中的代码转为生产代码的[javascript][2]工具我们就称之为 _构建工具。_
我们可以通过各个构建步骤以及其重要性来解释前端代码需要被“构建”的原因。
### 前端代码构建步骤
前端代码的构建涉及下面的四个步骤:
#### 1\. 转译
通过转译,开发者可以使用到语言最新,最热门的更新和扩展,以及浏览器兼容性的处理维护等。 下面是使用[Babel][3]的一个例子:
```
// arrow function syntax in array map
const double = [1, 2, 3].map((num) =&gt; num * 2);
// after being transpiled
const double = [1, 2, 3].map(function(num) {
  return num * 2;
});
```
#### 2\. 分包
分包是处理所有"import"与"require"语句的过程; 找到相匹配的JS代码片段包和库; 将它们添加到适当的域中; 然后将它们打包到一个JS文件中。常用的分包器包括Browserify, Webpack与Parcel。
#### 3\. 压缩
压缩是通过删除空白和代码注释来减少最终的文件大小。在压缩过程中我们还可以更进一步添加代码混淆混淆会更改变量名和方法名使代码变得晦涩难懂因此一旦代码交付到客户端它就不是那么容易能让人读懂。下面是一个使用Grunt的例子:
```
// before minifying
const double = [1, 2, 3].map(function(num) {
  return num * 2;
});
// after minifying
const double = [1, 2, 3].map(function(num) {
  return num * 2;
});
```
#### 4\. 打包
完成上面的所有步骤之后, 我们需要将这些具有兼容性,且经过分包,压缩/混淆过的文件放置到某个地方。打包正是这样一个过程,它将上述步骤所产生的结果放置到开发者指定的某个位置上,这通常是通过打包器完成的。
### 前端构建工具
前端工具及构建工具可以分为以下几类:
* 包管理: NPM, Yarn
* 转移器: Babel, etc.
* 打包器: Webpack, Parcel, Browserify
* 压缩混淆: UglifyJS, Packer, Minify, etc.
Javascript生态系统中有各种各样的构建工具可以使用包括下面的这些
#### Grunt and Bower
[Grunt][4] 作为一个命令行工具被引入,它仅提供一个脚本来指定和配置相关构建任务。[Bower][5] 作为包管理器提供了一种客户端包的管理方法而紧追其后。这两者再加上NPM它们经常被使用在一起它们看上去似乎可以满足大多数的自动化需求但Grunt的问题在于它无法提供给开发者配置更复杂任务的自由而Bower使开发者管理的程序包是平常的两倍因为它将前端包包、后台包分开了 (例如Bower components vs. Node modules)。
**Grunt与Bower的未来:** Grunt与Bower即将退出javascript工具生态但是还有一些替代品。
#### Gulp and Browserify
[Gulp][6]是在Grunt发布后的一年半才发布的。但Gulp却让大家感到很自然、舒服。用javascript来写构建脚本与用JSON来写相比更自由。你可以在Gulp的构建脚本中编写函数即时创建变量在任何地方使用条件语句--但就这些,并不能说让我们的感觉变得特别自然和舒适,只能说这只是其中的,一个可能的原因。[Browserify][7]和Gulp可以配合使用Browserify允许NPM包(用于后端Node服务器)被直接带入到前端就这一点已经直接让Bower废了。而正是这种用一个包管理器来处理前后台包的方式让人感到更自然和更好。
**Gulp的未来:** Gulp可能会被改进以便匹配当前流行的构建工具但这完全取决于创作者的意愿。Gulp还在使用中只是不再有以前那么流行了。
#### Webpack and NPM/Yarn scripts
[Webpack][8]是现代前端开发工具中最热门的宠儿它是一个开源的javascript模块打包器。Webpack主要是为处理javascript而创作的但它如果包含相应的loaders它也可以转换HTML、CSS和图片等前端资源。通过Webpack你也可以像Gulp一样编写构建脚本并通过[NPM/Yarn][9]来执行这些脚本。
**Webpack的未来:** Webpack是目前Javascript工具生态系统中最热门的工具最近几乎所有的JS库都在使用React和Webpack。Webpack目前处于第四个版本不会很快消失。译者注webpack目前已经发布了第五个版本了且还在火热更新中
#### Parcel
[Parcel][10]是一个web应用打包器于2018年推出因其有着不同的开发者体验而与众不同。Parcel能利用处理器多核功能提供极快的打包性能且还零配置。但Parcel还是一个新星对于一些大型应用其采用率并不高。与Webpack相比开发人员更喜欢使用Webpack因为Webpack有更广泛的支持和可定制性。
**Parcel的未来:** Parcel非常容易使用如果你统计打包和构建时间它会比Webpack更快而且它还提供了更好的开发者体验。Parcel没有被大量采用的原因可能是它仍然比较新。在前端构建工具的生态系统中Parcel的前景会非常光明它将会存在一段时间。
#### Rollup
[Rollup][11]是Javascript的一个模块分包器它可将一小段代码编译为更大更复杂的库或应用。Rollup一般建议用来构建JS库特别是那种导入和依赖的第三方库较少的那种JS库。
**Rollup的未来:** Rollup很酷且正在被迅速采用。它有很多强大的功能将在很长一段时间内作为前端工具生态系统的一个组成部分而存在。
### 了解更多
Javascript前端工具的生态系统充满着变数和竞争且只有最好的工具才能存活下来。 在不久的将来,我们的构建工具将具有更少(或没有)的配置,更方便的定制化,更好的扩展性的和更好的构建速度。
该用什么样的构建工具用于你的前端项目,你需要根据具体的项目需求来做出决定。至于选择什么样的工具,才是最合适自己的,大多数时候,需要我们自己作出取舍。
更多信息, 请看:
* [JavaScript tooling: The evolution and future of JS/frontend build tools][12]
* [Tools and modern workflow for frontend developers][13]
* [Modern frontend: The tools and build process explained][14]
* [Best build tools in frontend development][15]
* * *
_这篇文章最初发表在[Shedrack Akintayo的博客][16]上,经他许可后重新发表在这里._
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/11/javascript-build-tools
作者:[Shedrack Akintayo][a]
选题:[lujun9972][b]
译者:[ywxgod](https://github.com/ywxgod)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/shedrack-akintayo
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/find-file-linux-code_magnifying_glass_zero.png?itok=E2HoPDg0 (Magnifying glass on code)
[2]: https://www.javascript.com/
[3]: https://babeljs.io/
[4]: https://gruntjs.com/
[5]: https://bower.io/
[6]: https://gulpjs.com/
[7]: http://browserify.org/
[8]: https://webpack.js.org/
[9]: https://github.com/yarnpkg/yarn
[10]: https://parceljs.org/
[11]: https://rollupjs.org/guide/en/
[12]: https://qmo.io/blog/javascript-tooling-the-evolution-and-future-of-js-front-end-build-tools/
[13]: https://blog.logrocket.com/tools-and-modern-workflow-for-front-end-developers-505c7227e917/
[14]: https://medium.com/@trevorpoppen/modern-front-end-the-tools-and-build-process-explained-36641b5c1a53
[15]: https://www.developerdrive.com/best-build-tools-frontend-development/
[16]: https://www.sheddy.xyz/posts/javascript-build-tools-past-and-beyond

View File

@ -1,190 +0,0 @@
[#]: subject: (4 tips for context switching in Git)
[#]: via: (https://opensource.com/article/21/4/context-switching-git)
[#]: author: (Olaf Alders https://opensource.com/users/oalders)
[#]: collector: (lujun9972)
[#]: translator: (Chao-zhi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Git 中内容分支切换的 4 个方案
======
比较 Git 中四种切换分支的方法的优缺点。
![打开文件或窗口的计算机屏幕][1]
所有需要大量使用 Git 的人都会用到分支切换。有时这仅仅占用少量时间和精力,但有时,这个操作会带来一段痛苦的经历。
让我们用以下这个例子来讨论一些处理上下文转换的常用策略的优缺点:
> 假设您在一个名为 `feature-X` 的分支中工作。你刚刚发现你需要解决一个无关的问题。这不能在 `feature-X` 中完成。你需要在一个新的分支 ` feature-Y` 中完成这项工作。
### 方案 1stash + branch
解决此问题最常见的工作流可能如下所示:
1. 终止分支 `feature-X` 上的工作
2. `git stash`
3. `git checkout -b feature-Y origin/main`
4. 一顿鼓捣,解决 `feature-Y` 的问题
5. `git checkout feature-X``git switch -`
6. `git stash pop`
7. 继续在 `feature-X` 中工作
**优点:** 这种方法的优点在于,对于简单的更改,这是一个相当简单的工作流。它可以很好地工作,特别是对于小型仓库。
**缺点:** 使用此工作流时,一次只能有一个工作区。另外,根据仓库的状态,使用 stash 是一个麻烦的环节。
### 方案 2WIP commit + branch
这个解决方案和前一个非常相似,但是它使用 WIPWorkin Progress提交而不是 stash。当您准备好切换回来而不是弹出 stash 时,`git reset HEAD~1` 会展开 WIP 提交,您可以自由地继续,就像之前的方案一样,但不会触及 stash。
1. 终止分支 `feature-X` 上的工作
2. `git add -u` (仅仅添加修改和删除的操作)
3. `git commit -m "WIP"`
4. `git checkout -b feature-Y origin/master`
5. 一顿鼓捣,解决 `feature-Y` 的问题
6. `git checkout feature-X``git switch -`
7. `git reset HEAD~1`
**优点:** 对于简单的更改,这是一个简单的工作流,对于小型仓库来说很好用。你不需要使用 stash。
**缺点:** 任何时候都只能有一个工作区。此外如果您或您的代码审阅者不够谨慎WIP 提交可能会合并到最终产品。
使用此工作流时,您**永远**不要想着将 `--hard` 添加到 `git reset`。如果您不小心这样做了,您应该能够使用 `git reflog` 恢复提交,但是您最好完全避免这种情况发生,否则你会听到心碎的声音。
### 方案 3: 克隆一个新仓库
在这个解决方案中,不是创建新的分支,而是为每个新的功能分支创建存储库的新克隆。
**优点:** 您可以同时在多个工作区中工作。你不需要 `git stash` 或者是 WIP 提交。
**缺点:** 需要考虑仓库的大小,因为这可能会占用大量磁盘空间(浅层克隆可以帮助解决这种情况,但它们可能并不总是很合适。)此外,您的仓库克隆将互不可知。因为他们不能互相追踪,所以你必须手动追踪你的克隆的源仓库。如果需要 git 钩子,则需要为每个新克隆设置它们。
### 方案 4: git worktree
要使用此解决方案,您可能需要了解 `git add worktree`。如果您不熟悉 Git 中的 worktrees请不要难过。许多人多年来都对这个概念一无所知。
#### 什么是 worktree?
将 worktree 视为仓库中属于项目的文件。本质上,这是一种工作空间。你可能没有意识到你已经在使用 worktrees 了。开始使用 Git 时,您将自动获得第一个 worktree。
```
$ mkdir /tmp/foo &amp;&amp; cd /tmp/foo
$ git init
$ git worktree list
/tmp  0000000 [master]
```
你可以在以上代码看到,甚至在第一次 commit 前你就有了一个 worktree。接下来去尝试再添加一个 worktree 到你的项目中吧。
#### 添加一个 worktree
想要添加一个新的 worktree 你需要提供:
1. 硬盘上的一个位置
2. 一个分支名
3. 添加哪些分支
```
$ git clone <https://github.com/oalders/http-browserdetect.git>
$ cd http-browserdetect/
$ git worktree list
/Users/olaf/http-browserdetect  90772ae [master]
$ git worktree add ~/trees/oalders/feature-X -b oalders/feature-X origin/master
$ git worktree add ~/trees/oalders/feature-Y -b oalders/feature-Y e9df3c555e96b3f1
$ git worktree list
/Users/olaf/http-browserdetect       90772ae [master]
/Users/olaf/trees/oalders/feature-X  90772ae [oalders/feature-X]
/Users/olaf/trees/oalders/feature-Y  e9df3c5 [oalders/feature-Y]
```
与大多数其他 Git 命令一样,需要在仓库路径下使用此命令。一旦创建了 worktree 就有了隔离的工作环境。Git 仓库跟踪 worktree 在磁盘上的位置。如果 Git 钩子已经在父仓库中设置好了,那么它们也可以在 worktree 中使用。
请注意到,每个 worktree 只使用父仓库磁盘空间的一小部分。在这种情况下worktree 需要只大约三分之一的原始磁盘空间。这这非常适合进行扩展。如果您的仓库达到了千兆字节的级别,您就会真正体会到 worktree 对硬盘空间的节省。
```
$ du -sh /Users/olaf/http-browserdetect
2.9M
$ du -sh /Users/olaf/trees/oalders/feature-X
1.0M
```
**优点:** 您可以同时在多个工作区中工作。你不需要使用 stash。Git 跟踪所有的 worktree。你不需要设置 Git 钩子。这也比 `git clone` 更快,并且可以节省网络流量,因为您可以在飞行模式下执行此操作。您还可以更高效地使用磁盘空间,而无需使用浅层克隆。
**缺点:** 这是个需要你额外学习和记忆的新东西,但是如果你能养成使用这个功能的习惯,它会给你丰厚的回报。
### 额外的小技巧
有很多方式可以清除 worktrees最受欢迎的方式是使用 Git 来移除 worktree
```
`git worktree remove /Users/olaf/trees/oalders/feature-X`
```
如果你喜欢 rm 大法,你也可以用 `rm -rf` 来删除 worktree。
```
`rm -rf /Users/olaf/trees/oalders/feature-X`
```
但是,如果执行此操作,则可能需要使用 `git worktree prune` 清理所有剩余的文件。或者您现在可以跳过 `prune`,这将在将来的某个时候通过 `git gc` 自行完成。
### 注意事项
如果你准备尝试 `git worktree`, 请记住以下几点:
* 删除 worktree 不会删除分支。
* 可以在 worktree 中切换分支。
* 不能同时签出多个 worktree 中的同一分支。
* 像其他命令一样,`git worktree` 需要从仓库内运行。
* 你可以同时拥有许多 worktree。
* 要从同一个本地签出创建 worktree否则它们将互不可知。
### git rev-parse
最后一点注意:在使用 `git worktree` 时,仓库根所在的位置可能取决于文本。幸运的是,`git rev parse`允许您区分这两者。
* 要查找父仓库的根目录,请执行以下操作:
```
git rev-parse --git-common-dir
```
* 要查找你当前所在仓库的更目录,请执行:
```
git rev-parse --show-toplevel
```
### 根据你的需要选择最好的方法
就像很多事情一样TIMTOWDI (there's more than one way to do it有不止一种方法解决问题。重要的是你要找到一个适合你需要的工作流程。您的需求可能因手头的问题而异。也许你偶尔会发现自己将 `git worktree` 作为版本控制工具箱中的一个方便工具。
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/4/context-switching-git
作者:[Olaf Alders][a]
选题:[lujun9972][b]
译者:[Chao-zhi](https://github.com/Chao-zhi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/oalders
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open)

View File

@ -0,0 +1,204 @@
[#]: subject: (Looking back at what Python 3.4 did for enum)
[#]: via: (https://opensource.com/article/21/5/python-34-features)
[#]: author: (Moshe Zadka https://opensource.com/users/moshez)
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
回顾一下 Python 3.4 对枚举的做法
======
另外探索一些未被充分利用但仍然有用的 Python 特性。
![old school calculator][1]
这是关于首次出现在 Python 3.x 版本中的特性的系列文章的第五篇。Python 3.4 在 2014 年首次发布,尽管它已经发布了很长时间,但它引入的许多特性都没有被充分利用,而且相当酷。下面是其中的三个。
### 枚举
我最喜欢的逻辑谜题之一是自我描述的[史上最难的逻辑谜题][2]。除了其他的之外,它谈到了三个神,他们被称为 A、B 和 C他们的身份是真、假和随机按一定顺序排列。你可以问他们问题但他们只用神的语言回答其中 “da” 和 “ja” 表示 “是” 和 “不是”,但你不知道哪个是哪个。
如果你决定使用 Python 来解决这个问题,你将如何表示神的名字和身份以及神的语言中的词语?传统的答案是使用字符串。然而,字符串的拼写错误可能会带来灾难性的后果。
如果在解题的关键部分,你用字符串 “jaa” 而不是 “ja” 进行比较,你就会得到一个错误的答案。虽然谜题没有说明风险是什么,但这可能是最好的避免方式。
`enum` 模块让你能够以一种可调试但安全的方式来定义这些东西:
```
import enum
@enum.unique
class Name(enum.Enum):
A = enum.auto()
B = enum.auto()
C = enum.auto()
@enum.unique
class Identity(enum.Enum):
RANDOM = enum.auto()
TRUE = enum.auto()
FALSE = enum.auto()
@enum.unique
class Language(enum.Enum):
ja = enum.auto()
da = enum.auto()
```
枚举的一个好处是,在调试日志或异常中,枚举的呈现方式是有帮助的:
```
name = Name.A
identity = Identity.RANDOM
answer = Language.da
print("I suspect", name, "is", identity, "because they answered", answer)
[/code] [code]` I suspect Name.A is Identity.RANDOM because they answered Language.da`
```
### functools.singledispatch
在开发游戏的“基础设施”层时,你想通用地处理各种游戏对象,但仍然允许这些对象自定义动作。为了使这个例子更容易解释,假设这是一个基于文本的游戏。当你使用一个对象时,大多数情况下,它只会打印 `You are using <x>`。但是使用一把特殊的剑可能需要随机滚动,否则会失败。
当你获得一个物品时,它通常会被添加到库存中。然而,一块特别重的石头会砸碎一个随机物品。如果发生这种情况,库存中会失去该物体。
处理这个问题的一个方法是在物品上设置 `use``acquire` 方法。随着游戏复杂性的增加,这些方法会越来越多,使游戏对象变得难以编写。
相反,`functools.singledispatch` 允许你以安全和尊重命名空间的方式追溯性地添加方法。
你可以定义没有行为的类:
```
class Torch:
name="torch"
class Sword:
name="sword"
class Rock:
name="rock"
[/code] [code]
import functools
@functools.singledispatch
def use(x):
print("You use", x.name)
@functools.singledispatch
def acquire(x, inventory):
inventory.add(x)
```
对于火炬来说,这些通用的实现已经足够了:
```
inventory = set()
def deploy(thing):
acquire(thing, inventory)
use(thing)
print("You have", [item.name for item in inventory])
deploy(Torch())
[/code] [code]
You use torch
You have ['torch']
```
然而,剑和石头需要一些专门的功能:
```
import random
@use.register(Sword)
def use_sword(sword):
print("You try to use", sword.name)
if random.random() &lt; 0.9:
print("You succeed")
else:
print("You fail")
deploy(sword)
[/code] [code]
You try to use sword
You succeed
You have ['sword', 'torch']
[/code] [code]
import random
@acquire.register(Rock)
def acquire_rock(rock, inventory):
to_remove = random.choice(list(inventory))
inventory.remove(to_remove)
inventory.add(rock)
deploy(Rock())
[/code] [code]
You use rock
You have ['sword', 'rock']
```
岩石可能压碎了火炬,但你的代码更容易阅读。
### pathlib
从一开始Python 中文件路径的接口就是“智能字符串操作”。现在,通过 `pathlib`Python 有了一种面向对象的方法来操作路径。
```
`import pathlib`[/code] [code]
gitconfig = pathlib.Path.home() / ".gitconfig"
text = gitconfig.read_text().splitlines()
```
诚然,用 `/` 作为操作符来生成路径名有点俗气,但在实践中却不错。像 `.read_text()` 这样的方法允许你从小文件中获取文本,而不需要手动打开和关闭文件句柄。
这使你可以集中精力处理重要的事情:
```
for line in text:
if not line.strip().startswith("name"):
continue
print(line.split("=")[1])
[/code] [code]` Moshe Zadka`
```
### 欢迎来到 2014 年
Python 3.4 大约在七年前就发布了,但是在这个版本中首次出现的一些功能非常酷,而且没有得到充分利用。如果你还没使用,那么将他们添加到你的工具箱中。
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/5/python-34-features
作者:[Moshe Zadka][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/moshez
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/math_money_financial_calculator_colors.jpg?itok=_yEVTST1 (old school calculator)
[2]: https://en.wikipedia.org/wiki/The_Hardest_Logic_Puzzle_Ever

View File

@ -0,0 +1,82 @@
[#]: subject: (What is serverless with Java?)
[#]: via: (https://opensource.com/article/21/5/what-serverless-java)
[#]: author: (Daniel Oh https://opensource.com/users/daniel-oh)
[#]: collector: (lujun9972)
[#]: translator: (DCOLIVERSUN)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
什么是 Java 的无服务器化?
======
Java 仍是开发企业应用程序最流行的语言之一。那么,为什么<ruby>无服务器<rt>serverless</rt></ruby>开发人员回避它?
![Coffee beans and a cup of coffee][1]
几十年来企业已经在各类平台上开发了关键业务应用程序包括物理服务器、虚拟机和云环境。这些应用程序在各行各业都有一个共同点那就是无论需求如何它们都需要持续可用24x7x365保证稳定性、可靠性和性能。因此即使实际资源利用率低于 50%,每个企业都必须付出高额成本维护基础架构(如 CPU、内存、磁盘、网络等
无服务器架构是为了帮助解决这些问题而产生的。无服务器允许开发人员按需构建和运行应用程序,保证高可用性,不必在多云和混合云环境中管理服务器。在幕后,无服务器拓扑中仍有很多服务器,但它们是从应用程序开发中抽象出来的。相反,云提供商使用无服务器进行资源管理,例如配置、维护、联网和扩展服务器实例。
由于其高效性,无服务器开发模式现在是一些企业的需求,这些企业希望按需启动服务,而不是一直运行服务。
许多新建开源项目用来在 [Kubernetes][2] 集群上通过 Linux 容器包来管理无服务器应用程序。[CNCF 交互式无服务器环境][3]是开源项目、工具、框架和公共云平台的指南,帮助 DevOps 团队处理无服务器应用程序。
![CNCF Serverless Landscape][4]
([CNCF][3], [Apache License 2.0][5])
开发人员可以编写代码,然后将其快速部署到各种无服务器环境中。然后,无服务器应用程序响应需求,并根据需要自动上下扩展。
你可能想知道什么编程语言和运行环境最适合无服务器应用程序开发以便与上图中的技术集成。这个问题不只一个答案但是让我们退一步来讨论在企业生产环境中开发业务应用程序最流行的应用程序运行环境Java。
据 [Developer Economics][6] 称,截至 2020 年第三季度,仍有 800 多万家企业开发人员在使用 Java 来实现其业务需求。然而,根据 2020 年的一项调查Java6%)显然不是有前瞻意识的开发人员的首选,他们使用当前云服务做开发。
![NewRelic data on serverless runtimes and languages][8]
来自 NewRelic 无服务器基准报告的数据Daniel Oh, [CC BY-SA 4.0][9]
资源使用、响应时间和延迟在无服务器开发中至关重要。公共云提供商提供的无服务器产品通常是按需计量的,只有在无服务器应用程序启动时,才会通过事件驱动的执行模式收费。因此,当无服务器应用程序闲置或缩减为零时,企业无需支付任何费用。
### 带有容器的 Java 状态
在这种背景下你可能会问“_既然现有业务应用程序很可能是在 Java 技术上开发的,那么开发人员为什么不尝试使用 Java 栈进行无服务器应用程序开发呢_”
隐藏的事实是:很难在不可变更的新基础设施中优化 Java 应用程序,这种基础设施也被称为容器平台(例如 Kubernetes
![Differences in memory resource usage][10]
(Daniel Oh, [CC BY-SA 4.0][9])
该图描述了 Java 进程与竞争语言、框架(如 [Node.js][11] 和 [Go][12]之间内存资源使用的差异。Java HotSpot 占用空间最大,其中包括每个<ruby> Java 虚拟机<rt>Java Virtual Machine</rt></ruby>(JVM)实例分配的堆内存。中间显示 Node.js 每个进程要比 Java 小得多。最后Go 是一种在云上流行的编程语言,因为它的内存消耗最低。
如你所见,当你在这张图从左到右走,你会看到更密的节点。这就是开发人员在云、容器和 Kubernetes 上编写无服务器应用程序时回避 Java包括 [Spring Boot][13],一种固定的微服务 Java 框架)的原因。
### 下一步是什么?
企业可以通过实现无服务器应用程序获得明显的好处,但是资源密度问题导致他们避免使用 Java 堆栈在 Kubernetes 上开发无服务器应用程序开发。但是选择其他语言会给全球数百万 Java 开发人员带来负担。因此,在本系列的下一篇文章中,我将指导你如何开始使用 Java 无服务器函数,而不是使用其他语言。
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/5/what-serverless-java
作者:[Daniel Oh][a]
选题:[lujun9972][b]
译者:[DCOLIVERSUN](https://github.com/DCOLIVERSUN)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/daniel-oh
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/java-coffee-mug.jpg?itok=Bj6rQo8r (Coffee beans and a cup of coffee)
[2]: https://opensource.com/article/19/6/reasons-kubernetes
[3]: https://landscape.cncf.io/serverless?zoom=150
[4]: https://opensource.com/sites/default/files/uploads/cncf-serverless-landscape.png (CNCF Serverless Landscape)
[5]: https://github.com/cncf/landscape/blob/master/LICENSE
[6]: https://developereconomics.com/
[7]: https://newrelic.com/resources/ebooks/serverless-benchmark-report-aws-lambda-2020
[8]: https://opensource.com/sites/default/files/uploads/newrelic_serverlessbenchmarkreport.png (NewRelic data on serverless runtimes and languages)
[9]: https://creativecommons.org/licenses/by-sa/4.0/
[10]: https://opensource.com/sites/default/files/uploads/java-containers.png (Differences in memory resource usage)
[11]: https://nodejs.org/
[12]: https://golang.org/
[13]: https://spring.io/projects/spring-boot

View File

@ -0,0 +1,105 @@
[#]: subject: (Joining Fedora Linux to an enterprise domain)
[#]: via: (https://fedoramagazine.org/join-fedora-linux-enterprise-domain/)
[#]: author: (ogutierrez https://fedoramagazine.org/author/ogutierrez/)
[#]: collector: (lujun9972)
[#]: translator: (Chao-zhi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
将 Fedora Linux 系统添加到企业域中
======
![][1]
图片来自 [Gene Gallin][2] 发表在 [Unsplash][3]
在企业互联网场景中,一般情况下最广泛使用的基于 Linux 的操作系统是 Red Hat Enterprise LinuxRHEL它主要用于服务器但也可以用作工作站。fedora linux 其实也是工作站系统的一个很好的选择,它提供了许多在企业环境中工作的特性,使管理成为一项简单的任务。
当您的工作网络中有许多机器时,您需要一种以集中方式管理用户和机器的方法。这就是为什么 [FreeIPA][4] 和 [Active Directory][5] 是这个任务的首选技术。它们允许系统管理员操作网络中所有实体的目录来管理大量的机器。
### Fedora 中的 Active Directory
Active Directory 在公司环境中非常常见。Fedora 和 RHEL 通过使用 SSSD (<ruby> 系统安全服务守护进程 <rt>System Security Services Daemon</rt></ruby> 与 FreeIPA 或 Active Directory 等服务很好地集成。SSSD 是一种访问远程目录和身份验证机制的系统服务。使用此软件的计算机能够使用远程凭据进行身份验证,并访问该目录网络中可用的其他服务。
要加入域网络您需要域管理员的权限才能添加计算机。可以通过在域凭据上设置特殊权限或代表您对该计算机进行预配置。Fedora Linux 有一个选项,可以在安装过程中配置一台名为 _Enterprise Login_ 的机器。如果您的计算机网络自动配置为企业域网络,那么您可以直接使用域凭据登录。
![][6]
如果您的配置不是自动的,或者您已经安装了 Fedora Linux您可以通过以下几个配置步骤加入 Active Directory 域:
1。设置此计算机的 DNS。要连接到目录服务首先需要能够解析目录域名。如果您的网络使用 DHCP 设置正确的 DNS则可以跳过此步骤。
2。更改您的计算机名称以反映它将是新域的一部分。编辑文件 `/etc/hostname`,并将机器名更改为 “machinename.my_domain”
3。通过执行以下命令加入域`sudo realm join my_domain -v` 用域名称替换 “my_domain”
运行此命令后,系统将请求允许加入该域中新计算机的用户的凭据。如果进程中没有错误,则机器将成为域的一部分。
![][7]
现在,此计算机已成为您的域的一部分,您可以:
* 使用域用户名登录到计算机
* 获取 kerberos tickets 以访问域网络中的不同服务
* 访问其他服务,具体取决于域的配置方式
### 使用 Fleet Commander 管理 Fedora Linux
现在计算机是您的域的一部分,您可以使用 Active Directory 的域管理员工具来管理它。由于您的计算机没有运行 Windows因此您只能进行身份验证以及访问网络和目录服务。无法在此计算机上设置与桌面相关的配置。
幸运的是Fedora 有个工具叫 [Fleet Commander][8]。
#### 创建配置
Fleet Commander 是一个管理工具,允许您为网络中的所有 Fedora Linux 机器设置桌面配置文件。
这意味着,您可以简单地为 GNOME desktop、Firefox、Chrome、LibreOffice 和其他支持的软件设置任何配置,然后在登录到选定的用户/组/计算机时以细粒度的方式应用该配置。
![][9]
要使用这个工具首先安装 fleet-commander-admin 软件包:
```
sudo dnf install fleet-commander-admin
```
然后,用浏览器访问 [http://localhost:9090][10] 来登陆。在左边的菜单中,点击 `Fleet Commander`
Fleet Commander 有一个工具,可以使用“实时会话”机制直观地设置配置概要文件。它运行一个 VM作为基本机器的模板。您需要手动进行所需的配置更改。然后检查所有配置更改选择要添加到概要文件中的更改然后部署它。
#### 管理客户端
在每个 Fedora Linux 或 RHEL 机器中,您都需要安装 Fleet Commander 客户端服务。此服务在用户登录时激活。它在域中搜索应用于当前用户/计算机的配置文件,并应用这个配置。
安装 fleet-commander-client:
```
sudo dnf install fleet-commander-client
```
软件将自动检测机器是否是域的一部分。当用户登录时,它将使用应用于该用户的配置文件来设置会话。
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/join-fedora-linux-enterprise-domain/
作者:[ogutierrez][a]
选题:[lujun9972][b]
译者:[Chao-zhi](https://github.com/Chao-zhi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://fedoramagazine.org/author/ogutierrez/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2021/05/enterprise-816x345.jpg
[2]: https://unsplash.com/@genefoto?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[3]: https://unsplash.com/s/photos/fleet?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
[4]: https://www.freeipa.org/page/Main_Page
[5]: https://en.wikipedia.org/wiki/Active_Directory
[6]: https://lh5.googleusercontent.com/aIRYn2TDgaaUrErzBV_KPVgpm94OrVgySlwqlI3VsotslWKN5UnLQ0VYjESSFB12aZWf_UnbmOOwa_rcxvRoI-MB6gFaw8p-RgBP9Lswnb2YV3iIlQ8YeXgpwJC_-B5tPrFTfUe_
[7]: https://lh6.googleusercontent.com/DVvr7cHuZxvgqhAHk9v7jAYSER7VSP1G7CJ1xHx1kT5ZS-v1yt3rKMmwk9JhsLnYGfwAjOPPpSC2BGTpZtAdKrnx7XLUWgOZBhFFwB6SL7vR_q_2N1c_OGYp7YmNLRk7oRW8IEVB
[8]: https://fleet-commander.org/
[9]: https://lh6.googleusercontent.com/ATeNp5niX37MW7ARiMVSkqe9Vr5Fv4IN6eUW5xf1UPO0AMO1DxXLypw0CbqTNOfzLJYDM18ggc7Mrh3LZK8Foh80K1WjSW9LHQD081BbJg0owQJj_ZQdICLr0tGILmBRco-xbq92
[10]: http://localhost:9090/