mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-31 23:30:11 +08:00
commit
43ec2a0f78
104
published/20200110 5 ops hacks for sysadmins.md
Normal file
104
published/20200110 5 ops hacks for sysadmins.md
Normal file
@ -0,0 +1,104 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-14232-1.html)
|
||||
[#]: subject: (5 ops hacks for sysadmins)
|
||||
[#]: via: (https://opensource.com/article/20/1/ops-hacks-sysadmins)
|
||||
[#]: author: (Stephen Bancroft https://opensource.com/users/stevereaver)
|
||||
|
||||
系统管理员排除故障的五种武器
|
||||
======
|
||||
|
||||
> 当你不知道从哪里开始时,这五个工具可以帮助你找到用户的 IT 问题的源头。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202202/01/005623l3v5lm73vzv755nn.jpg)
|
||||
|
||||
作为系统管理员,我每天都面临着需要快速解决的问题,用户和管理人员期望事情能够顺利地进行。在我管理的这样的一个大型环境中,几乎不可能从头到尾了解所有的系统和产品,所以我必须使用创造性的技术来找到问题的根源,并(希望可以)提出解决方案。
|
||||
|
||||
这是我 20 多年来的日常经验!每天上班时,我从不知道会发生什么。因此,我有一些快速而简陋的技巧,当一个问题落在我的身上,而我又不知道从哪里开始时,我一般就会采用这些技巧。
|
||||
|
||||
但等一下!在你直接打开命令行之前,请花一些时间与你的用户交谈。是的,这可能很乏味,但他们可能会有一些好的信息给你。请记住,用户可能没有你那么多的经验,你需要对他们说的东西进行一些解释。试着清楚地了解正在发生什么和应该发生什么,然后用技术语言自己描述故障。请注意,大多数用户并不阅读他们面前的屏幕上的内容;这很可悲,但却是事实。确保你和用户都阅读了所有的文字,以收集尽可能多的信息。一旦你收集到了这些信息,就打开命令行,使用这五个工具。
|
||||
|
||||
### Telnet
|
||||
|
||||
让我从一个经典开始。[Telnet][2] 是 SSH 的前身,在过去,它在 Unix 系统上用来连接到远程终端,就像 SSH 一样,但它没有加密。Telnet 在诊断网络连接问题方面有一个非常巧妙和宝贵的技巧:你可以 Telnet 到不是专属于它 TCP 端口(23/TCP)。要做到这一点,可以像平时一样使用 Telnet,但在末尾加上 TCP 端口(例如 `telnet localhost 80`),以连接到一个网络服务器。这可以让你能够检查一个服务器,看看服务是否正在运行,或者防火墙是否阻挡了它。因此,在没有应用程序客户端,甚至没有登录应用程序的情况下,你可以检查 TCP 端口是否有反应。如果你知道怎么做,有时你可以通过在 Telnet 提示符手动输入并获得响应以检查。网络服务器和邮件服务器是你可以这样做的两个例子。
|
||||
|
||||
![用 Telnet 获得网络服务器的响应][3]
|
||||
|
||||
### Tcpdump
|
||||
|
||||
[tcpdump][4] 工具可以让你检查网络上正在传输的数据。大多数网络协议都相当简单,如果你把 `tcpdump` 和一个像 [Wireshark][5] 这样的工具结合起来,你会得到一个简单而好用的方法来浏览你所捕获的流量。在如下的例子中,我在下面的窗口中检查数据包,在上面的窗口连接到 TCP 3260 端口。
|
||||
|
||||
![用 tcpdump 实时检查数据包][6]
|
||||
|
||||
这张截图显示了在现实世界中使用 Wireshark 查看 iSCSI 协议的情况;在这种情况下,我能够确定我们的 QNAP 网络附加存储的配置方式有问题。
|
||||
|
||||
![使用 Wireshark 检查 TCP 会话][7]
|
||||
|
||||
### find
|
||||
|
||||
如果你不知道从哪里开始,[find][8] 命令就是最好的工具。在其最简单的形式中,你可以用它来“寻找”文件。例如,如果我想在所有的目录中进行递归搜索,得到一个 conf 文件的列表,我可以输入:
|
||||
|
||||
```
|
||||
find . -name '*.conf'.
|
||||
```
|
||||
|
||||
![find 命令输出][9]
|
||||
|
||||
但是,`find` 的一个隐藏的宝藏是,你可以用它对它找到的每个项目执行一个命令。例如,如果我想得到每个文件的长列表,我可以输入;
|
||||
|
||||
```
|
||||
find . -name '*.conf' -exec ls -las {}\;
|
||||
```
|
||||
|
||||
![查找命令输出][10]
|
||||
|
||||
一旦你掌握了这种技术,你就可以用各种创造性的方法来寻找、搜索和以特定方式执行程序。
|
||||
|
||||
### strace
|
||||
|
||||
我是在 Solaris 上认识 [strace][11] 这个概念的,在那里它被称为 `truss`。今天,它仍然像多年前一样有用。`strace` 允许你在进程实时运行时检查它在做什么。使用它很简单,只要使用命令 `ps -ef`,找到你感兴趣的进程 ID。用 `strace -p <进程 ID>` 启动 `strace`,它会开始打印出一大堆东西,一开始看起来像垃圾信息。但如果你仔细观察,你会看到你认识的文字,如 `OPEN` 和 `CLOSE` 这样的词和文件名。如果你想弄清楚一个程序为什么不工作,这可以引导你走向正确的方向。
|
||||
|
||||
### grep
|
||||
|
||||
把最好的留到最后:[grep][12]。这个工具是如此有用和强大,以至于我很难想出一个简洁的方法来描述它。简单地说,它是一个搜索工具,但它的搜索方式使它如此强大。在问题分析中,我通常会用 `grep` 搜索一堆日志来寻找一些东西。一个叫 `zgrep` 的配套命令可以对压缩文件做同样的事情。在下面的例子中,我使用 `zgrep bancroft /var/log/*` 在所有的日志文件中进行 grep,以查看我在系统中的工作情况。我使用 `zgrep` 是因为该目录中有压缩文件。
|
||||
|
||||
![grep 命令输出][13]
|
||||
|
||||
使用 `grep` 的另一个好方法是将其他工具的输出通过管道输送到它里面;这样,它就可以作为一种过滤器来使用。在下面的例子中,我列出了 auth 文件,并通过使用 `cat auth.log |grep bancroft` 来搜索我的登录信息,看看我都做了什么。这也可以写成 `grep bancroft auth.log`,但我这里用管道(`|`)来证明这一点。
|
||||
|
||||
![grep 命令输出][14]
|
||||
|
||||
### 其他需要考虑的工具
|
||||
|
||||
你可以用这些工具做更多的事情,但我希望这个简单的介绍能给你一个窗口,让你了解如何用它们来解决你遇到的讨厌的问题。另一个值得你注意的工具是 [Nmap][15],我没有包括它,因为它是如此全面,需要一整篇文章(或更多)来解释它。最后,我建议学习一些白帽和黑客技术;在试图找出问题的根源时,它们可能非常有益,因为它们可以帮助你收集对决策至关重要的信息。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/1/ops-hacks-sysadmins
|
||||
|
||||
作者:[Stephen Bancroft][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/stevereaver
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_osyearbook2016_sysadmin_cc.png?itok=Y1AHCKI4 (Wratchet set tools)
|
||||
[2]: https://en.wikipedia.org/wiki/Telnet
|
||||
[3]: https://opensource.com/sites/default/files/uploads/telnet_1.png (Getting a response from a webserver with Telnet)
|
||||
[4]: https://www.tcpdump.org/
|
||||
[5]: https://www.wireshark.org/
|
||||
[6]: https://opensource.com/sites/default/files/uploads/tcpdump_1.png (Inspecting packets in real time with tcpdump)
|
||||
[7]: https://opensource.com/sites/default/files/uploads/tcpdump_2.png (Using Wireshark to inspect a TCP session)
|
||||
[8]: https://en.wikipedia.org/wiki/Find_%28Unix%29
|
||||
[9]: https://opensource.com/sites/default/files/uploads/find_1_0.png (find command output)
|
||||
[10]: https://opensource.com/sites/default/files/uploads/find_2.png (find command output)
|
||||
[11]: https://strace.io/
|
||||
[12]: https://en.wikipedia.org/wiki/Grep
|
||||
[13]: https://opensource.com/sites/default/files/uploads/grep_1.png (grep command output)
|
||||
[14]: https://opensource.com/sites/default/files/uploads/grep_2.png (grep command output)
|
||||
[15]: https://nmap.org/
|
@ -0,0 +1,132 @@
|
||||
[#]: subject: "Revolt: An Open-Source Alternative to Discord"
|
||||
[#]: via: "https://itsfoss.com/revolt/"
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14221-1.html"
|
||||
|
||||
Revolt:Discord 的开源替代品
|
||||
======
|
||||
|
||||
> Revolt 是一个有前途的自由和开源的 Discord 替代品。在这里,让我们看一下它所提供的东西以及它的初步印象。
|
||||
|
||||
Discord 是一个功能丰富的协作平台,主要为游戏玩家量身定做。尽管你可以在 Linux 上毫无问题地使用 Discord,但它仍然是一个专有解决方案。
|
||||
|
||||
你可以选择使用 [Element][1] 作为一个开源的解决方案协作平台,但它不是一个替代品。
|
||||
|
||||
但是,Revolt 是一个令人印象深刻的 Discord 替代品,它是开源的。
|
||||
|
||||
> 注意:
|
||||
>
|
||||
> Revolt 正处于公开测试阶段,不提供任何移动应用。它可能缺乏一些你在 Discord 上找到的基本功能。
|
||||
|
||||
我会重点说一下 Revolt 的功能,以及它是否可以成为 Linux 上 Discord 的替代品。
|
||||
|
||||
### 一个你可以自行托管的开源 Discord 替代品
|
||||
|
||||
![][2]
|
||||
|
||||
Revolt 不仅仅是一个简单的开源替代品,而且你还可以自我托管。
|
||||
|
||||
它确实缺少 Discord 提供的各种功能,但你可以获得许多基本功能,可以先体验一下。
|
||||
|
||||
即使缺乏一些功能,但它也是一个功能丰富的开源客户端。让我们来看看现有的功能。
|
||||
|
||||
### Revolt 的功能
|
||||
|
||||
![][3]
|
||||
|
||||
它看起来和感觉已经很像 Discord,这是一些关键的亮点:
|
||||
|
||||
* 能够创建你自己的服务器
|
||||
* 创建文字频道和语音频道
|
||||
* 在服务器中分配用户角色
|
||||
* 调整主题(深色/浅色)
|
||||
* 改变强调色
|
||||
* 从可用选项中管理字体和表情包
|
||||
* 支持自定义 CSS
|
||||
* 能够添加机器人
|
||||
* 易于管理文本/语音频道的权限
|
||||
* 向其他用户发送朋友请求
|
||||
* 保存的笔记
|
||||
* 能够控制通知
|
||||
* 支持硬件加速
|
||||
* 专门的桌面设置
|
||||
* 使用 Docker 进行自我托管
|
||||
* 用户状态和自定义状态支持
|
||||
|
||||
因此,作为处于公开测试阶段的东西,它听起来对初学者来说非常好。你已经拥有了大部分的核心功能,但你可能想等着看它成为一个成熟的 Discord 替代品。
|
||||
|
||||
### 使用 Revolt 的初步印象
|
||||
|
||||
![][4]
|
||||
|
||||
如果你使用过 Discord,用户体验会感觉很熟悉。这是一件好事。
|
||||
|
||||
对于这篇快速亮点介绍,我没有比较 Discord 和 Revolt 的资源使用情况,因为它仍然处于测试阶段,不是同等级的比较。
|
||||
|
||||
然而,在我简短的测试中,它感觉很快速,除了第一次加载一个文本频道时。在发表这篇文章时,它没有双因素认证(2FA)功能,但应该会在他们的第一个里程碑(第一版)版本中添加。
|
||||
|
||||
![][5]
|
||||
|
||||
一些功能如用户状态、权限管理和外观调整看起来很有用。但是,当涉及到语音频道时,它和 Discord 的工作方式不一样,至少现在是这样。
|
||||
|
||||
我不知道他们是否打算用同样的方式,但 Discord 的语音频道功能是直观的、快速的,而且有更好的控制。
|
||||
|
||||
不要忘了,Discord 还提供 “Discord Stage”,这是一个类似 Clubhouse 的音频聊天室功能。
|
||||
|
||||
其他一些我找不到的功能包括:
|
||||
|
||||
* 对信息作出反应的能力
|
||||
* 抑制噪音的功能
|
||||
* 改变服务器
|
||||
* 服务器日志
|
||||
* 各种有用的机器人
|
||||
|
||||
当然,要赶上 Discord 提供的功能还需要大量的时间,但至少我们现在有一个开源的 Discord 解决方案。
|
||||
|
||||
你可以了解他们的 [项目路线图/发布跟踪器][6],看看你可以在其最终/未来的版本中期待什么。
|
||||
|
||||
### 在 Linux 中安装 Revolt
|
||||
|
||||
Revolt 可用于 Linux 和 Windows。你可以选择在你的网络浏览器上使用它,而不需要一个单独的应用。
|
||||
|
||||
但是,如果你需要在你的桌面上使用它,他们提供了一个 AppImage 文件和一个 deb 包,你可以从它的 [GitHub 发布页][7] 下载。
|
||||
|
||||
如果你是 Linux 的新手,可以参考我们关于 [使用 AppImage 文件][8] 和 [安装 deb 包][9] 的资源来开始学习。
|
||||
|
||||
如果你想用你的错误报告和建议来帮助他们改进,请随时前往 [反馈页面][10]。此外,你还可以浏览他们的 [GitHub 页面][11] 以了解更多信息。
|
||||
|
||||
- [Revolt][12]
|
||||
|
||||
你觉得 Revolt 怎么样?你认为它有可能成为 Linux 上 Discord 的一个很好的开源替代品吗?
|
||||
|
||||
请在下面的评论中告诉我你的想法!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/revolt/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/element/
|
||||
[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/revolt-screenshot.png?resize=800%2C506&ssl=1
|
||||
[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/revolt-desktop-settings.png?resize=800%2C501&ssl=1
|
||||
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/revolt-screenshot1.png?resize=800%2C509&ssl=1
|
||||
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/revolt-appearance-setting.png?resize=800%2C524&ssl=1
|
||||
[6]: https://github.com/orgs/revoltchat/projects/2
|
||||
[7]: https://github.com/revoltchat/desktop/releases/tag/v1.0.2
|
||||
[8]: https://itsfoss.com/use-appimage-linux/
|
||||
[9]: https://itsfoss.com/install-deb-files-ubuntu/
|
||||
[10]: https://app.revolt.chat/settings/feedback
|
||||
[11]: https://github.com/revoltchat
|
||||
[12]: https://revolt.chat
|
@ -0,0 +1,73 @@
|
||||
[#]: subject: "Why now is a great time to consider a career in open source hardware"
|
||||
[#]: via: "https://opensource.com/article/21/11/open-source-hardware-careers"
|
||||
[#]: author: "Joshua Pearce https://opensource.com/users/jmpearce"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "zengyi1001"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14206-1.html"
|
||||
|
||||
现在是考虑从事开源硬件职业的好时机
|
||||
======
|
||||
|
||||
> 开源硬件现在是一个独立领域,并且正在快速的成长中。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202201/23/102054w2jnwennn8rwh27w.jpg)
|
||||
|
||||
在软件行业中,各种类型的程序员写代码的职业已经变得很普遍,这些代码通过开源许可证发布到公共场所。业界的猎头们通常要求查看这些代码来审查未来员工候选人。那些将自己职业生涯专注在开源项目开发的人得到了回报。从 payscale.com 网站得知,Linux 系统管理员的收入比 Windows 管理员要高,这表明从事开源软件领域可以获得更高的报酬和更稳定的工作机会。分享你的工作会让你感觉良好(这甚至可能是一种因果报应),你知道自己正在为整个世界创造价值。历史上,这样的机会可从来没有为我们这些从事于开源硬件领域的人存在过。
|
||||
|
||||
二十多年前,几乎没有人知道开源硬件是什么,更别说围绕它规划自己的职业生涯了。举例而言,在 2000 年全世界发表了超过 200 万篇学术论文,却只有 7 篇文章提到过“开源硬件”。在我第一次写《[开源实验室][2]》 的时候,我收集了每一个案例(其实也就几十个),并且可以轻松的跟上和阅读每一篇发布的关于开源硬件的文章,还把它们发布到维基上。我很高兴的报告大家,这种情况现在已经实际上不可能了。今年已经有超过 1500 篇文章在讨论“开源硬件”,而且我相信年底的时候还会有更多的文章发表出来。开源硬件现在已经是一个独立的领域,有一些专门报导它的杂志(比如说 《[HardwareX][3]》 和 《[Journal of Open Hardware][4]》)。在更多的领域中,数十种传统杂志现在也会定期报道最新的开源硬件的发展。
|
||||
|
||||
![Smart open source 3-D printing][5]
|
||||
|
||||
*开发智能开源硬件 3-D 打印 (Joshua Pearce, [GNU-FDL][6])*
|
||||
|
||||
即使是在十年前,从职业生涯的角度看,强调开源硬件开发在某种程度上也是一种冒险。我记得在我上一份工作的简历中,我淡化了和它相关的内容,更多的强调了我的传统工作。工业界和学术界的管理人员难以明白如果这些设计被送出去并在其他地方生产制造,你又怎样获得收益。这一切都在改变。和自由与开源的软件一样,开源硬件开发更快,而且我敢说,会优于专有开发模式。
|
||||
|
||||
![Open source recycle bot][7]
|
||||
|
||||
*(Joshua Pearce, [GNU-FDL][6])*
|
||||
|
||||
每种企业都有大量成功的 [开放硬件商业模式][8]。随着数字制造的兴起(主要是由于开源开发),开源软件和开源硬件之间的界限变得模糊。像 [FreeCAD][9] 这样的开源软件可以制作开源设计,然后在内置 CAM 中使用,在开源激光切割机、CNC 铣床或 3D 打印机上进行制造。[OpenSCAD][10] 是一个基于开源脚本的 CAD 包,尤其是它确实模糊了软件和硬件之间的界限,以至于代码和物理设计成为同义词。我们中的许多人开始公开谈论开源硬件。我把它作为我研究项目的核心主旨,首先让我自己的设备开源,然后为其他人开发开源硬件。我并不孤单。作为一个社区,我们已经获得了足够的临界质量,于 2012 年成立了 [开源硬件协会][11](OSHWA)。如今,差不多十年后,开源硬件的职业前景完全不同:已经有了数百个开源硬件硬件公司,互联网上涌现出数百万(数百万!)个开源设计,学术文献中对开源硬件的兴趣也呈指数级增长。
|
||||
|
||||
![Open source production for solar photovoltaics][12]
|
||||
|
||||
*为太阳能光伏开发开源产品。(Joshua Pearce, [GNU-FDL][6])*
|
||||
|
||||
甚至有些工作的目标就是促进更快过渡到无处不在的开源硬件。例如,<ruby>生产互联网<rt>Internet of Production</rt></ruby>(IoP)联盟在开发<ruby>开放数据标准<rt>Open Data Standards</rt></ruby>和发展这些标准的用户社区方面,现在已经为运营和通信官、数据标准社区支持经理和 DevOps 工程师提供了 [职位][13]。由于 **我在开源硬件上方面的工作**,我刚被聘为 [加拿大西部大学][14](世界排名前 1% 的大学)的终身讲席教授。该职位是与加拿大排名第一的商学院 [毅伟商学院][15] 交叉任职的。我的工作是帮助大学快速发展,抓住开源技术发展机会。说到做到,我现在正 [招聘][16] 硕士和博士水平的毕业生,包含全额奖学金和生活津贴。这些 [免费适用的可持续性技术(FAST)实验室][17] 的研究生工程职位专门用于开发开源硬件,用于太阳能光伏系统、分布式回收和紧急食品生产等一系列应用。这种工作得到了那些想要最大化 [他们的研究投资回报][18] 的资助者的更多的资助。整个国家都在朝着这个方向前进。最近的一个好例子是法国,它刚刚发布了 [第二个开放科学计划][19]。我注意到 [GrantForward][20] 上列出的,用于美国开源资金的“开源”关键字资助的数量显着增加。许多基金会已经清晰明了地收到了开源备忘录 —— 因此开源研发的机会越来越多。
|
||||
|
||||
因此,如果你还没开始的话,也许是时候考虑将开源作为一种职业,即使你是一名喜欢开发硬件的工程师。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/11/open-source-hardware-careers
|
||||
|
||||
作者:[Joshua Pearce][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[zengyi1001](https://github.com/zengyi1001)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/jmpearce
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open-source-hardware.png?itok=vS4MBRSh (shaking hands open source hardware)
|
||||
[2]: https://www.appropedia.org/Open-source_Lab
|
||||
[3]: https://www.hardware-x.com/
|
||||
[4]: https://openhardware.metajnl.com/
|
||||
[5]: https://img.linux.net.cn/data/attachment/album/202201/23/102227iur7uut1dyyhyb2r.jpg (Smart open source 3-D printing)
|
||||
[6]: https://www.gnu.org/licenses/fdl-1.3.en.html
|
||||
[7]: https://img.linux.net.cn/data/attachment/album/202201/23/102236djy2djyy101b8g1x.jpg (Open source recycle bot)
|
||||
[8]: https://doi.org/10.5334/joh.4
|
||||
[9]: https://www.freecadweb.org/
|
||||
[10]: https://openscad.org/
|
||||
[11]: https://www.oshwa.org/
|
||||
[12]: https://img.linux.net.cn/data/attachment/album/202201/23/102243x383b7bh3884bdb8.jpg (Open source production for solar photovoltaics)
|
||||
[13]: https://www.internetofproduction.org/hiring
|
||||
[14]: https://www.uwo.ca/
|
||||
[15]: https://www.ivey.uwo.ca/
|
||||
[16]: https://www.appropedia.org/FAST_application_process
|
||||
[17]: https://www.appropedia.org/Category:FAST
|
||||
[18]: https://www.academia.edu/13799962/Return_on_Investment_for_Open_Source_Hardware_Development
|
||||
[19]: https://www.ouvrirlascience.fr/wp-content/uploads/2021/10/Second_French_Plan-for-Open-Science_web.pdf
|
||||
[20]: https://www.grantforward.com/index
|
@ -0,0 +1,172 @@
|
||||
[#]: subject: "10 holiday gift ideas for open source enthusiasts"
|
||||
[#]: via: "https://opensource.com/article/21/11/open-source-holiday-gifts"
|
||||
[#]: author: "Joshua Allen Holm https://opensource.com/users/holmja"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14227-1.html"
|
||||
|
||||
给开源爱好者的 10 个节日礼物创意
|
||||
======
|
||||
|
||||
> 从 DIY 项目到电脑再到书籍,这份清单提供了培养创造力、学习和探索的礼物创意。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202201/30/133910x5rav7vduwrvpudr.jpg)
|
||||
|
||||
你是否正在为你的节日购物清单上的人寻找很酷的礼物,或者为你自己的愿望清单寻找建议?如果是这样,请考虑以下十条建议。这些礼物建议中的每一个都以某种方式与开源精神相联系。从 DIY 项目到电脑再到书籍,这份清单提供了培养创造力、学习和探索的礼物建议。
|
||||
|
||||
### System76 电脑
|
||||
|
||||
![System76 Thelio][2]
|
||||
|
||||
你身边的某人需要一个新的台式机、笔记本电脑或服务器吗?[System76][4] 应该是你首先应该寻找的地方之一。想找一些轻巧的移动设备吗?轻巧的 14 英寸 [Lemur Pro][5] 笔记本电脑是一个很好的选择。需要一个有大量处理能力、内存和存储空间的台式机?各种 [Thelio][3] 台式机中就有一款是你要找的。还有很多介于两者之间的其他选择。他们的电脑配备了 Ubuntu 或 Pop!_OS,这是该公司自己的基于 Ubuntu 的 Linux 发行版,并有终身支持。System76 也支持 [维修权法案][6]。虽然不是唯一一家销售安装 Linux 系统的电脑的厂商,但他们肯定是最受欢迎的厂商之一。
|
||||
|
||||
- **价格不一**
|
||||
|
||||
### 树莓派 400 个人电脑套件
|
||||
|
||||
![Raspberry Pi 400 Kit][7]
|
||||
|
||||
树莓派几乎不需要介绍。自从 2012 年第一款树莓派风靡全球以来,树莓派一直是最受欢迎的单板计算机之一,可用于教育、业余爱好者和手工爱好者们。[树莓派 400 个人电脑套件][8] 延续了这一趋势。除了一个显示器之外,这个套件包含了人们开始使用所需的一切。花 100.00 美元,你就可以得到树莓派 400(树莓派 4 系列的一个变种,内置于一个键盘外壳中)、一只鼠标、电源、micro HDMI 转 HDMI 电缆、一张预装树莓派操作系统的 SD 卡,以及一本《树莓派初学者指南》。虽然树莓派 400 不是世界上最强大的计算机,但对于你的礼物清单上的孩子来说,树莓派 400 完全可以作为一个得当的入门计算机。
|
||||
|
||||
- **价格:100.00 美元**
|
||||
|
||||
### 树莓派 Build HAT
|
||||
|
||||
![Raspberry Pi Build HAT][9]
|
||||
|
||||
树莓派的诸多优势之一是它能够通过各种附加板进行扩展。最近推出的一款附加板 —— [树莓派 Build HAT][10],可以用树莓派来控制多达四个乐高技术电机或 [乐高教育 SPIKE][11] 产品系列的传感器。Build HAT 适用于任何带有 40 针 GPIO 接头的树莓派。你可以使用专门开发的 Python 库对项目进行编码。Build HAT 可以使用外部 8V 直流电源(如 [官方 Built HAT 电源][12])或 7.5V 电池组为自身、树莓派板以及乐高电机和传感器供电。
|
||||
|
||||
- **价格:25.00 美元(加上一个项目所需的零件和配件的费用)**
|
||||
|
||||
### CrowPi2
|
||||
|
||||
![CrowPi][13]
|
||||
|
||||
[CrowPi2][14] 是一个 STEM 学习项目集合,放在一个由树莓派驱动的笔记本电脑式的机箱里。CrowPi2 套件有三种尺寸:基本型、高级型和豪华型。基本型套件包括一些附件,但不包括树莓派。高级套装配备了一个拥有 4GB 内存的树莓派 4B,并有比基本套装更多的配件选择。豪华套装配备了最多的配件和一个拥有 8GB 内存的树莓派 4B。所有三个套件都有太空灰或银色可供选择。一个可选的移动电源可以在不插入电源插座时为 CrowPi2 提供电源。如果你想了解更多关于 CrowPi2 的信息,你可以阅读 Seth Kenlon 的 [对 CrowPi2 的点评][15]。
|
||||
|
||||
- **基本套件:339.99 美元**
|
||||
- **高级套件:469.99 美元**
|
||||
- **豪华套装:529.99 美元**
|
||||
- **可选的移动电源:19.00 美元**
|
||||
|
||||
### Keebio Quefrency 键盘
|
||||
|
||||
推荐人:John Hall
|
||||
|
||||
![Keebio Quefrency键盘][16]
|
||||
|
||||
[Keebio Quefrency 键盘][17] 对于任何想组装自己的键盘的人来说,都是一个很好的节日礼物!它是一款 65% 键盘,这可能是大多数人愿意去做的最小的键盘,因为它有 Home、PgUp、PgDn 和方向键。它是一个分体式的人体工程学键盘,但如果你难以适应分体式的键盘,你可以将两半重新组合起来。最重要的是,最新版本的 Quefrency 有热插拔插座,所以你可以在不需要焊接任何东西的情况下组装它。
|
||||
|
||||
下面是一个廉价的 Quefrency 键盘组件:
|
||||
|
||||
* [Quefrency rev4 PCBs][18] 带有热插拔插座,加上 FR4 板(左边没有宏,右边有 65%)
|
||||
* 80 + 28 美元
|
||||
* [2u 稳定器(5 个)][19]
|
||||
* 10 美元
|
||||
* [按键开关(70 个)][20]
|
||||
* 16 美元
|
||||
* [键帽][21]
|
||||
* 45 美元
|
||||
* [2.25u G20 左空格键][22] 和 [2.75u G20 右空格键][23]
|
||||
* 8 + 8 美元
|
||||
* [USB C 到 USB C 键盘连接器][24]
|
||||
* 4 美元
|
||||
* **共计 199 美元**(不包括运费)
|
||||
|
||||
正如零件清单中指出的,Keebio Quefrency rev4 需要五个稳定器:
|
||||
|
||||
1. 左 Shift 键
|
||||
2. 左空格键
|
||||
3. 右空格键
|
||||
4. 回车键
|
||||
5. 退格键
|
||||
|
||||
Keebio Quefrency rev4 目标是构建 65% 键盘,它有一个缩短的右 Shift 键,不需要稳定器。许多键帽套装,甚至是相对便宜的套装,如 Artifact Bloom 和 Glorious GPBT,包括一个缩短的右 Shift 键,适合大多数像这样的键盘。难的是找到匹配的分体式空格键键帽。但你可以从 Pimp My Keyboard 等地方买到空格键的键帽,效果很好。不幸的是,几乎不可能从不同的制造商那里得到匹配的颜色。即使你选择白色键帽和白色空格键,其中一个也可能比另一个更灰。为什么不接受这种差异呢?试着将白色和灰色的键帽与红色或蓝色的空格键配对一下。
|
||||
|
||||
### Petoi Nybble 开源机器猫
|
||||
|
||||
![Petoi Nybble][25]
|
||||
|
||||
[Petoi Nybble 开源机器猫][26] 是一个用于建造机器宠物猫的套件。该套件包含了建造该项目所需的一切,但不包括电池。Nybble 需要两块 14500 锂离子可充电 3.7V 电池,可提供约 45 分钟的游戏时间。一旦组装完成,可以使用 Arduino IDE、Python API 或 Android/iOS 应用程序对该猫进行编程/控制。查看 [Nybble 用户手册][27] 了解更多细节。
|
||||
|
||||
- **价格:249.00 美元**
|
||||
|
||||
### 《苍穹浩瀚》小说系列
|
||||
|
||||
![《苍穹浩瀚》合集][28]
|
||||
|
||||
James S.A. Corey 的《<ruby>[苍穹浩瀚][29]<rt>Expanse</rt></ruby>》系列的最后一部小说正好在假日送礼季节推出。定于 11 月 30 日发行的《<ruby>[利维坦瀑布][30]<rt>Leviathan Falls</rt></ruby>》将结束这个史诗般的九部科幻小说系列的主要叙事,探索人类在太空的未来。按顺序,该系列的九本书是《<ruby>利维坦觉醒<rt>Leviathan Wakes</rt></ruby>》、《<ruby>卡利班之战<rt>Caliban's War</rt></ruby>》、《<ruby>阿巴顿之门<rt>Abaddon's Gate</rt></ruby>》、《<ruby>西波拉燃烧<rt>Cibola Burn</rt></ruby>》、《<ruby>复仇游戏<rt>Nemesis Games</rt></ruby>》、《<ruby>巴比伦的灰烬<rt>Babylon's Ashes</rt></ruby>》、《<ruby>波斯波利斯的崛起<rt>Persepolis Rising</rt></ruby>》、《<ruby>提亚马特之怒<rt>Tiamat's Wrath</rt></ruby>》和《<ruby>利维坦瀑布<rt>Leviathan Falls</rt></ruby>》。明年还将出版一本短篇小说和长篇小说集。这些故事和长篇小说中的大部分已经有了电子书格式,但这是第一次的印刷合集。给你身边的科幻小说读者购买该系列的第一本书,让他们开始阅读,或者给他们购买整个系列。
|
||||
|
||||
- **第一至第六本:17.99 美元(平装本)**
|
||||
- **第七本和第八本:18.99 美元(平装本)**
|
||||
- **第九本:30.00 美元(精装本)**
|
||||
|
||||
### 书籍
|
||||
|
||||
如果你正在寻找书籍推荐,而《苍穹浩瀚》的推荐并不符合你的需求,可以考虑 [这份 2021 年夏季阅读清单][31] 中的书籍。这份清单包含八本适合各种阅读口味的书籍推荐。从《<ruby>贝奥武夫<rt>Beowulf</rt></ruby>》的现代翻译到关于技术的非小说类书籍,那里应该有适合你生活中的读者的东西。如果 2021 年夏季阅读清单中没有你要找的东西,这篇文章还包含了以前所有夏季阅读清单的链接,其中提供了十多份建议清单。
|
||||
|
||||
- **价格不一**
|
||||
|
||||
### 贴纸
|
||||
|
||||
![终极贴纸包][32]
|
||||
|
||||
大流行期间的虚拟会议的一个缺点是,你无法带走从各个供应商摊位上收集的贴纸。对于那些喜欢用贴纸装饰笔记本电脑的人来说,这可能意味着他们最新的笔记本电脑目前还没有通常的装饰品。如果这听起来像你生活中的某个人,考虑给他们买一个来自 Sticker Mule 的 [Unixstickers 包][33]。该包有三种不同的尺寸:专业版,包含十张贴纸;精英版,包含专业版中的所有贴纸,再加十张贴纸;终极版,包含精英版中的所有内容,再加十张贴纸。这些贴纸涵盖了许多开源项目,使这些捆绑包成为参观供应商展位和亲临会议的贴纸交换台的下一个最佳选择。
|
||||
|
||||
- **专业包:1.00 美元**
|
||||
- **精英包:19.00 美元**
|
||||
- **终极包:24.00 美元**
|
||||
|
||||
### 向开源组织慈善捐赠
|
||||
|
||||
如果你购物清单上的人已经拥有了一切(或者不想要任何有形的礼物),可以考虑以他们的名义向开源项目进行慈善捐赠。这个 [开源组织][34] 列表中有很多组织供你选择。你、以其名义捐款的人和收到你捐款的组织都会很高兴,你的礼物有助于使开源变得更好。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/11/open-source-holiday-gifts
|
||||
|
||||
作者:[Joshua Allen Holm][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/holmja
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_gift_giveaway_box_520x292.png?itok=w1YQhNH1 (Gift box opens with colors coming out)
|
||||
[2]: https://opensource.com/sites/default/files/styles/medium/public/uploads/system76_thelio.png?itok=E6HBZoMA (System76 Thelio)
|
||||
[3]: https://system76.com/desktops/
|
||||
[4]: https://system76.com
|
||||
[5]: https://system76.com/laptops/lemur
|
||||
[6]: https://blog.system76.com/post/646726872371200000/carl-testimony-hb21-1199mp3
|
||||
[7]: https://opensource.com/sites/default/files/styles/medium/public/uploads/raspberry_pi_400_kit.jpg?itok=AnVA_OP9 (Raspberry Pi 400 Kit)
|
||||
[8]: https://www.raspberrypi.com/products/raspberry-pi-400/
|
||||
[9]: https://opensource.com/sites/default/files/styles/medium/public/uploads/raspberry_pi_build_hat.png?itok=8YVyNM-c (Raspberry Pi Build HAT)
|
||||
[10]: https://www.raspberrypi.com/products/build-hat/
|
||||
[11]: https://education.lego.com/
|
||||
[12]: https://www.raspberrypi.com/products/build-hat-power-supply/
|
||||
[13]: https://opensource.com/sites/default/files/styles/medium/public/uploads/crowpi2.png?itok=hJDaPaaz (CrowPi)
|
||||
[14]: https://www.crowpi.cc/
|
||||
[15]: https://opensource.com/article/21/9/raspberry-pi-crowpi2
|
||||
[16]: https://opensource.com/sites/default/files/styles/medium/public/uploads/keebio_quefrency_keyboard_pcb.png?itok=M0JVlcRK (Keebio Quefrency Keyboard)
|
||||
[17]: https://keeb.io/collections/quefrency-split-staggered-65-keyboard
|
||||
[18]: https://keeb.io/collections/quefrency-split-staggered-65-keyboard/products/quefrency-rev-4-65-split-staggered-keyboard
|
||||
[19]: https://keeb.io/collections/diy-parts/products/cherry-mx-stabilizer?variant=43449871046
|
||||
[20]: https://divinikey.com/collections/linear-switches/products/gateron-milky-yellow-linear-switches?variant=32193385201729
|
||||
[21]: https://drop.com/buy/artifact-bloom-series-keycap-set-vintage
|
||||
[22]: https://pimpmykeyboard.com/g20-2-25-space-pack-of-4/
|
||||
[23]: https://pimpmykeyboard.com/g20-2-75-space-pack-of-4/
|
||||
[24]: https://keeb.io/products/usb-c-to-usb-c-cable?variant=32313985728606
|
||||
[25]: https://opensource.com/sites/default/files/styles/medium/public/uploads/petoi_nybble_open_source_robotic_cat.png?itok=zhvvBReE (Petoi Nybble)
|
||||
[26]: https://www.petoi.com/pages/petoi-nybble-overview
|
||||
[27]: https://nybble.petoi.com/
|
||||
[28]: https://opensource.com/sites/default/files/styles/medium/public/uploads/the_expanse_books.jpg?itok=FkuizWic (The Expanse books)
|
||||
[29]: https://www.jamessacorey.com/writing-type/books/
|
||||
[30]: https://www.jamessacorey.com/books/leviathan-falls/
|
||||
[31]: https://opensource.com/article/21/6/2021-opensourcecom-summer-reading-list
|
||||
[32]: https://opensource.com/sites/default/files/uploads/ultimate_sticker_pack.png (Ultimate sticker pack)
|
||||
[33]: https://www.stickermule.com/unixstickers
|
||||
[34]: https://opensource.com/resources/organizations
|
@ -0,0 +1,85 @@
|
||||
[#]: subject: "10 reasons to love Linux in 2021"
|
||||
[#]: via: "https://opensource.com/article/21/12/reasons-love-linux"
|
||||
[#]: author: "Joshua Allen Holm https://opensource.com/users/holmja"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14207-1.html"
|
||||
|
||||
2021 总结:Linux 方面的 10 篇好文章
|
||||
======
|
||||
|
||||
> 以下是 10 篇最受欢迎的 Linux 文章。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202201/23/171708xzs53zvp9occmgcy.jpg)
|
||||
|
||||
2021 年,我们发表了远超 [150 篇的 Linux 方面的文章][2]。从桌面 Linux 用户小工具的文章到将 Linux 作为服务器操作系统的教程,以及介乎于两者之间的各种场景,这些文章已经涵盖了 Linux 生态系统的许多方面。所有这些文章都值得你花时间去阅读,但你可以从今年发表的这十篇好文章开始阅读。
|
||||
|
||||
### 3 个开源工具,使 Linux 成为理想的工作站
|
||||
|
||||
在这篇文章中,Seth Kenlon 介绍了 LibreOffice、AbiWord、Gnumeric 和 Pandoc,涵盖了 [使 Linux 成为理想工作站的工具][3]。他解释了在使用 Linux 作为桌面操作系统时,这些应用程序如何使你的工作效率提高。文章探讨了一些高级功能,如 LibreOffice 的无头模式,并提供了如何充分利用每个应用程序的小技巧。
|
||||
|
||||
### 为什么我在 Linux 上使用 exa 而不是 ls
|
||||
|
||||
`ls` 命令是 Linux 中最常用的终端命令之一,但你知道它有一个现代的替代品,提供了许多有益的改进吗?Sudeshna Sur 的 [文章][4] 介绍了 `exa` 命令以及它相比 `ls` 的优势,讨论了 `exa` 如何跟踪添加到 Git 仓库的新文件、显示目录和文件树等等。
|
||||
|
||||
### 我喜欢在 Linux 上编码的 5 个原因
|
||||
|
||||
像许多人一样,Seth Kenlon 喜欢在 Linux 上编码。在这篇文章中,他分享了这样做的 [五个原因][5]。他喜欢在 Linux 上编码,因为它建立在逻辑的基础上,可以让你欣赏代码之间的关联,提供了源代码,并提供直接访问外设和抽象层的能力,使编写代码更容易。
|
||||
|
||||
### 在 Linux 上使用可启动的 USB 驱动器来拯救 Windows 用户
|
||||
|
||||
即使你喜欢 Linux,但有时你可能需要修复一台 Windows 电脑或为某人安装 Windows。在 Linux 上从 Windows ISO 创建一个可启动的 U 盘,并不像为 Linux 发行版制作一个可启动的 U 盘那样简单明了。在这个教程中,Don Watkins 演示了 [如何使用 WoeUSB][6],这个工具可以为用户处理这个过程中所有棘手的部分。
|
||||
|
||||
### 4 个用于运行 Linux 服务器的开源工具
|
||||
|
||||
当使用 Linux 作为服务器操作系统时,Seth Kenlon 推荐了这 [四个开源工具][7]: Samba、Snapdrop、VLC 和 PulseAudio。正如 Seth 在他的文章中所指出的,这四个工具使得用 Linux 进行文件共享和流媒体变得很容易。
|
||||
|
||||
### 3 个你需要尝试的 Linux 终端
|
||||
|
||||
Linux 有许多不同的终端模拟器。Seth Kenlon 的这篇文章推荐了 [3 个 Linux 终端][8],值得一试:Xfce 终端、rxvt-unicode 和 Konsole。他提供了每一个的简要概述,并指出了每个终端模拟器的优势。
|
||||
|
||||
### 在你的 Linux 家庭实验室中运行 Kubernetes 的另外 5 个理由
|
||||
|
||||
在 Seth Kenlon 2020 年的文章《[在树莓派家庭实验室上运行 Kubernetes 的五个理由][9]》的续篇中,他给出了 [在 Linux 家庭实验室中运行 Kubernetes 的另外五个理由][10]:Kubernetes 建立在Linux 的基础上,它很灵活,学习它可以为你提供个人发展,它使容器变得有意义,而且它有利于云原生开发。他还提供了一个额外的理由:因为它很有趣。
|
||||
|
||||
### 6 个开源工具和技巧,为初学者保障 Linux 服务器的安全
|
||||
|
||||
Sahana Sreeram 提供了 [保证 Linux 服务器安全的六个优秀技巧][11]。这个教程着眼于更新软件、启用防火墙、加强密码保护、禁用非必要的服务、检查监听端口,以及扫描恶意软件。Sahana 提供的技巧可以帮助 Linux 初学者学习保持 Linux 服务器安全的基本知识。
|
||||
|
||||
### Linux 如何使一所学校为大流行病做好准备
|
||||
|
||||
Don Watkins 采访了威斯康星州莫诺纳市 [圣心玛利亚学校][12] 的教师 Robert Maynord,介绍了该校 [将他们的电脑换成 Linux][13] 的情况。Maynord 分享了关于他是如何对 Linux 感兴趣的轶事,他为把学校的计算机换成 Linux 所采取的第一个步骤,Linux 如何使学校受益等等。Don 在这次采访中提出了许多很好的问题,Maynord 为有意采用 Linux 的学校提供了许多有用的信息。
|
||||
|
||||
### 在 Linux 上运行你喜欢的 Windows 应用程序
|
||||
|
||||
有时,在切换到 Linux 之后,你仍然需要那个只在 Windows 下运行的特定应用程序,或者真的想玩那个只能在 Windows 下运行的游戏。在这篇文章中,Seth Kenlon 提供了一个关于如何 [在 Linux 上运行你喜欢的 Windows 应用程序][14] 的教程。做到这一点的工具是 WINE。Seth 解释了什么是 WINE,它是如何工作的,以及如何在你的 Linux 计算机上安装它,以便你可以运行你最喜欢的 Windows 应用程序。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/12/reasons-love-linux
|
||||
|
||||
作者:[Joshua Allen Holm][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/holmja
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/car-penguin-drive-linux-yellow.png?itok=twWGlYAc (Penguin driving a car with a yellow background)
|
||||
[2]: https://opensource.com/tags/linux
|
||||
[3]: https://linux.cn/article-13133-1.html
|
||||
[4]: https://linux.cn/article-13972-1.html
|
||||
[5]: https://opensource.com/article/21/2/linux-programming
|
||||
[6]: https://linux.cn/article-13143-1.html
|
||||
[7]: https://linux.cn/article-13192-1.html
|
||||
[8]: https://linux.cn/article-13186-1.html
|
||||
[9]: https://opensource.com/article/20/8/kubernetes-raspberry-pi
|
||||
[10]: https://opensource.com/article/21/6/kubernetes-linux-homelab
|
||||
[11]: https://linux.cn/article-13298-1.html
|
||||
[12]: https://www.ihmcatholicschool.org/
|
||||
[13]: https://opensource.com/article/21/5/linux-school-servers
|
||||
[14]: https://linux.cn/article-13184-1.html
|
@ -3,43 +3,41 @@
|
||||
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14204-1.html"
|
||||
|
||||
在 2022 年尝试 FreeDOS
|
||||
2021 总结:尝试 FreeDOS
|
||||
======
|
||||
为这个免费操作系统的新用户和老用户提供 15 种资源。
|
||||
![Puzzle pieces coming together to form a computer screen][1]
|
||||
|
||||
在整个 80 年代和 90 年代,DOS 是桌面之王。世界各地的程序员不满足于 DOS 的专利版本,他们共同创建了一个名为 FreeDOS 的开源版本,该版本于 1994 年首次推出。[FreeDOS 项目][2] 在 2021 年及以后继续发展。
|
||||
> 为这个自由操作系统的新用户和老用户提供 15 种资源。
|
||||
|
||||
我们在 Opensource.com 上发表了几篇关于 FreeDOS 的文章,以帮助新用户开始使用 FreeDOS 和学习新程序。以下是去年我们最受欢迎的几篇 FreeDOS 文章。
|
||||
![](https://img.linux.net.cn/data/attachment/album/202201/22/112846m55u0f3u5rh6i6e3.jpg)
|
||||
|
||||
在整个上世纪 80 年代和 90 年代,DOS 是桌面之王。世界各地的程序员不满足于 DOS 的专有版本,他们共同创建了一个名为 FreeDOS 的开源版本,该版本于 1994 年首次推出。[FreeDOS 项目][2] 在 2021 年及以后还在继续发展。
|
||||
|
||||
我们发表了几篇关于 FreeDOS 的文章,以帮助新用户开始使用 FreeDOS 和学习新程序。以下是去年我们最受欢迎的几篇 FreeDOS 文章。
|
||||
|
||||
### 初学 FreeDOS
|
||||
|
||||
你是 FreeDOS 的新手吗?如果你想了解如何启动和运行 FreeDOS 的基本知识,请查看这些文章:
|
||||
|
||||
* [开始使用 FreeDOS][3]:它看起来像复古的计算机,但 FreeDOS 是一个现代的操作系统,你可以用它来完成事情。
|
||||
* [FreeDOS 如何启动][4]:了解你的计算机是如何引导和启动 FreeDOS 的,从开机到命令行提示。
|
||||
* [开始使用 FreeDOS][3]:它看起来像复古计算时代,但 FreeDOS 是一个现代的操作系统,你可以用它来完成事情。
|
||||
* [FreeDOS 如何启动][4]:了解你的计算机是如何引导和启动 FreeDOS 的,从开机到命令行提示符。
|
||||
* [用纯文本配置 FreeDOS][5]:学习如何用 `fdconfig.sys` 文件来配置 FreeDOS。
|
||||
* [如何用 CD 和 DIR 浏览 FreeDOS][6]:只需掌握两个命令,`DIR` 和 `CD`,你就可以在命令行中浏览你的 FreeDOS 系统。
|
||||
* [在 FreeDOS 中设置和使用环境变量][7]:环境变量在几乎所有的命令行环境中都有帮助,包括 FreeDOS。
|
||||
|
||||
|
||||
* [在 FreeDOS 中设置和使用环境变量][7]:环境变量在几乎所有的命令行环境中都有用,包括 FreeDOS。
|
||||
|
||||
### Linux 用户的 FreeDOS
|
||||
|
||||
如果你已经熟悉了 Linux 的命令行,你可能想试试这些在 FreeDOS 上创造类似环境的命令和程序:
|
||||
|
||||
* [给 Linux 爱好者的 FreeDOS命令][8]:如果你已经熟悉了 Linux 的命令行,可以试试这些命令来帮助你轻松进入 FreeDOS。
|
||||
* [给 Linux 爱好者的 FreeDOS 命令][8]:如果你已经熟悉了 Linux 的命令行,可以试试这些命令来帮助你轻松进入 FreeDOS。
|
||||
* [在 FreeDOS 中像 Emacs 一样编辑文本][9]:如果你已经熟悉了 GNU Emacs,你应该在 Freemacs 中感到很自在。
|
||||
* [在 Linux 和 FreeDOS 之间复制文件][10]:学习如何在 FreeDOS 虚拟机和 Linux 桌面系统之间传输文件。
|
||||
* [如何在 FreeDOS 上归档文件][11]:在 FreeDOS 版本的 **`tar`**,但在 DOS 上归档的标准方法是 Zip 和 Unzip。
|
||||
* [如何在 FreeDOS 上归档文件][11]:这是 FreeDOS 版本的 `tar`,在 DOS 上归档的标准方法是 Zip 和 Unzip。
|
||||
* [在 FreeDOS 上使用这个怀旧的文本编辑器][12]:让人联想到 Linux ed(1),当你想用老式的方法编辑文本时,Edlin 是一种乐趣。
|
||||
|
||||
|
||||
|
||||
### 使用 FreeDOS
|
||||
|
||||
当你启动进入 FreeDOS,你可以使用这些很棒的工具和应用来完成工作或安装其他软件:
|
||||
@ -50,11 +48,9 @@
|
||||
* [为什么我喜欢用 GW-BASIC 在 FreeDOS 上编程][16]:BASIC 是我进入计算机编程的起点。我已经很多年没有写过 BASIC 代码了,但我对 BASIC 和 GW-BASIC 永远怀有好感。
|
||||
* [用 Bywater BASIC 在 FreeDOS 上编程][17]:在你的 FreeDOS 系统上安装 Bywater BASIC,并开始尝试使用 BASIC 编程。
|
||||
|
||||
在其近 30 年的历程中,FreeDOS 一直试图成为一个现代 DOS。如果你想了解更多,你可以在 [FreeDOS 简史][18] 中阅读关于 FreeDOS 的起源和发展。另外,请看 Don Watkins 关于 FreeDOS 的采访:[一个大学生是如何创立一个自由和开源的操作系统][19]。
|
||||
|
||||
|
||||
在其近 30 年的历程中,FreeDOS 一直试图成为一个现代 DOS。如果你想了解更多,你可以在 [FreeDOS 简史][18]中阅读关于 FreeDOS 的起源和发展。另外,请看 Don Watkins 关于 FreeDOS 的采访:[一个大学生是如何创立一个自由和开源的操作系统][19]。
|
||||
|
||||
如果你想尝试 FreeDOS,请下载 2021 年 12 月发布的 FreeDOS 1.3 RC5。这个版本有大量的新变化和改进,包括更新的内核和命令 shell,新的程序和游戏,更好的国际支持,以及网络支持。从[FreeDOS 网站][2]下载 FreeDOS 1.3 RC5。
|
||||
如果你想尝试 FreeDOS,请下载 2021 年 12 月发布的 FreeDOS 1.3 RC5。这个版本有大量的新变化和改进,包括更新的内核和命令 shell,新的程序和游戏,更好的国际支持,以及网络支持。从 [FreeDOS 网站][2]下载 FreeDOS 1.3 RC5。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -63,7 +59,7 @@ via: https://opensource.com/article/22/1/try-freedos
|
||||
作者:[Jim Hall][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
@ -71,20 +67,20 @@ via: https://opensource.com/article/22/1/try-freedos
|
||||
[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://www.freedos.org/
|
||||
[3]: https://opensource.com/article/21/6/get-started-freedos
|
||||
[4]: https://opensource.com/article/21/6/freedos-boots
|
||||
[5]: https://opensource.com/article/21/6/freedos-fdconfigsys
|
||||
[3]: https://linux.cn/article-13492-1.html
|
||||
[4]: https://linux.cn/article-13503-1.html
|
||||
[5]: https://linux.cn/article-14061-1.html
|
||||
[6]: https://opensource.com/article/21/6/navigate-freedos-cd-dir
|
||||
[7]: https://opensource.com/article/21/6/freedos-environment-variables
|
||||
[8]: https://opensource.com/article/21/6/freedos-linux-users
|
||||
[7]: https://linux.cn/article-13995-1.html
|
||||
[8]: https://linux.cn/article-14092-1.html
|
||||
[9]: https://opensource.com/article/21/6/freemacs
|
||||
[10]: https://opensource.com/article/21/6/copy-files-linux-freedos
|
||||
[11]: https://opensource.com/article/21/6/archive-files-freedos
|
||||
[10]: https://linux.cn/article-13548-1.html
|
||||
[11]: https://linux.cn/article-13567-1.html
|
||||
[12]: https://opensource.com/article/21/6/edlin-freedos
|
||||
[13]: https://opensource.com/article/21/6/freedos-text-editor
|
||||
[14]: https://opensource.com/article/21/6/listen-music-freedos
|
||||
[15]: https://opensource.com/article/21/6/freedos-package-manager
|
||||
[15]: https://linux.cn/article-14031-1.html
|
||||
[16]: https://opensource.com/article/21/6/freedos-gw-basic
|
||||
[17]: https://opensource.com/article/21/6/freedos-bywater-basic
|
||||
[18]: https://opensource.com/article/21/6/history-freedos
|
||||
[18]: https://linux.cn/article-13601-1.html
|
||||
[19]: https://opensource.com/article/21/6/freedos-founder
|
@ -0,0 +1,177 @@
|
||||
[#]: subject: "Brave vs. Google Chrome: Which is the better browser for you?"
|
||||
[#]: via: "https://itsfoss.com/brave-vs-chrome/"
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14213-1.html"
|
||||
|
||||
Brave vs. Google Chrome:哪个浏览器更适合你?
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202201/25/163210d15a580twwpwyzmw.jpg)
|
||||
|
||||
Google Chrome 无疑是 [可用于 Linux 的最佳网页浏览器][1] 之一。无论你在什么平台上使用它,它都提供了用户体验和功能集的良好融合。
|
||||
|
||||
另一方面,Brave 作为跨平台可用的、以隐私为中心的开源选项而广受欢迎。
|
||||
|
||||
那么,你应该选择哪一个作为首选网页浏览器呢?Chrome 适合你吗?谁应该使用 Brave?
|
||||
|
||||
在这里,我们比较了两种浏览器的所有重要方面(包括基准测试),以帮助你做出决定。
|
||||
|
||||
### 用户界面
|
||||
|
||||
![][2]
|
||||
|
||||
[Google Chrome][3] 用户界面干净、开箱即用,没有不必要的干扰。
|
||||
|
||||
根据我的经验,默认情况下,它与 Linux 上的(GTK)系统主题融为一体。因此,根据你的自定义设置,它可能看起来有点不同。
|
||||
|
||||
![][4]
|
||||
|
||||
如果你不在 Linux 上使用它,那么除了配色方案外,其他所有界面都基本相似。
|
||||
|
||||
而对于 [Brave][5],它并不能开箱即用地适应你的系统配色方案。但是,你可以在它的外观设置里启用 GTK 主题。
|
||||
|
||||
Brave 与 Chrome 的用户界面接近,但有一些独有的调整/选项。
|
||||
|
||||
![][6]
|
||||
|
||||
就用户界面而言,两者都不错,都很容易使用。
|
||||
|
||||
但是,Brave 提供了一些自定义外观的附加选项,例如删除选项卡搜索按钮(左侧到最小化按钮)、显示完整的 URL 等。
|
||||
|
||||
![][7]
|
||||
|
||||
如果你觉得这对你有用,Brave 就更适合你。使用 Google Chrome,你在 UI 定制方面没有太多控制权。
|
||||
|
||||
### 开源与专有
|
||||
|
||||
![][8]
|
||||
|
||||
Brave 是一个基于 Chromium 的开源网页浏览器。顺便说一句,我们还有一份 [不基于 Chromium 的开源浏览器][9] 的列表。
|
||||
|
||||
Google Chrome 也基于 Chromium,但它添加了几个专有元素,使其成为一个闭源产品。
|
||||
|
||||
虽然你可以期待 Brave 的开源和透明度带来的好处,但考虑到 Google 有专门的安全团队,他们在修补问题时可以非常快。
|
||||
|
||||
对于普通用户来说,这些都是不太关注的地方。但是,如果你更在意开源和具有透明度的软件,那么 Brave 应该是首选。另一方面,如果你不在意是否是专有代码,并且信任 Google 的产品,那么 Google Chrome 是一个选择。
|
||||
|
||||
如果你想要一个与 Chrome 具有相似 UI 的开源浏览器,你可能想要看看我们对 [Chrome 和 Chromium][10] 的比较来选择一个。
|
||||
|
||||
### 功能差异
|
||||
|
||||
你应该会发现两个浏览器的所有基本功能都是相似的。
|
||||
|
||||
但是,两者之间存在一些显著差异。
|
||||
|
||||
如上所述,你会注意到自定义外观的能力存在差异。
|
||||
|
||||
在多个设备之间同步浏览器数据的能力也存在很大差异。
|
||||
|
||||
![][11]
|
||||
|
||||
使用 Google Chrome,你可以快速登录你的 Google 账户并将所有内容同步到你的手机和其他设备。
|
||||
|
||||
Brave 也可以让你同步,但对某些人来说可能不方便。你需要访问你已经使用 Brave 成功同步的设备之一。
|
||||
|
||||
你的同步数据并未存储在云中。因此,你必须使用二维码或密码授权将浏览数据传输/同步到另一台设备。
|
||||
|
||||
![][12]
|
||||
|
||||
因此,你必须导出书签和其他相关数据以进行外部备份。
|
||||
|
||||
值得庆幸的是,如果你既想要方便的同步,也想要开源浏览器,还有另一种选择。看看我们的 [Firefox 和 Brave 比较][13] 文章,了解为什么这对你来说是一个不错的选择。
|
||||
|
||||
除了这些差异之外,Brave 还支持 [IPFS 协议][14],这是一种旨在对抗审查的点对点安全协议。
|
||||
|
||||
也不要忘记,Brave 默认带有 [Brave Search][15] 作为其搜索引擎。所以,如果你更喜欢它而不是将谷歌作为 [私人搜索引擎][16],那也是一件好事。
|
||||
|
||||
Brave Rewards 也是一个有趣的附加功能,你可以通过启用 Brave 的隐私友好型广告获得奖励,并将其回馈给你经常访问的网站。
|
||||
|
||||
如果云存储服务或任何在线平台阻止了这些,你可以将使用它的资源直接共享给接收者。
|
||||
|
||||
总的来说,Brave 提供了许多有趣的东西。但是,Chrome 浏览器是一个更简单的选择,对许多人来说是一个方便的选择。
|
||||
|
||||
### 隐私角度
|
||||
|
||||
Brave 的跟踪保护应该有利于注重隐私的人。你可以使用 Shield 功能阻止广告和跟踪器。除此之外,如果你想要更积极阻止广告(这可能会破坏网站显示和功能),还有几个可切换使用的过滤器。
|
||||
|
||||
Chrome 浏览器不提供此功能。但是,你总可以使用一些以隐私为重点的 Chrome 扩展程序,而 Google 的安全浏览功能应该可以保护你免受恶意网站的侵害。
|
||||
|
||||
一般来说,如果你不访问黑幕网站,应该可以使用 Chrome 浏览器。而如果你关注隐私,Brave 可能是更好的选择。
|
||||
|
||||
### 表现
|
||||
|
||||
虽然 Brave 通常被认为是最快的,但在我的基准测试中似乎并非如此。这真令人吃惊!
|
||||
|
||||
但是,对于大多数人来说,实际的差异应该不明显。
|
||||
|
||||
![][17]
|
||||
|
||||
我使用了流行的基准测试:[JetStream 2][18]、[Speedometer 2.0][19] 和 [Basemark Web 3.0][20]。
|
||||
|
||||
请注意,我使用的 Linux 发行版是 **Pop!_OS 21.10**,测试的浏览器版本是 **Chrome 97.0.4692.71** 和 **Brave 97.0.4692.71**。
|
||||
|
||||
当然,除了浏览器之外,我没有在后台运行任何东西。我的 PC 是由 **Intel i5-11600k @4.7 GHz、32 GB 3200 MHz RAM 和 1050ti Nvidia Graphics** 驱动的。
|
||||
|
||||
### 安装
|
||||
|
||||
![][21]
|
||||
|
||||
Chrome 浏览器提供的 DEB/RPM 软件包以在 Ubuntu、Debian、Fedora 或 openSUSE 上下载和安装。
|
||||
|
||||
Brave 也支持相同的 Linux 发行版,但你必须使用终端,并按照下载页面中提到的命令进行安装。
|
||||
|
||||
![][22]
|
||||
|
||||
你可以按照我们的安装指南 [在 Fedora 中安装 Brave][23]。
|
||||
|
||||
它们都不能通过软件中心安装。此外,你也找不到任何 [Flatpak 包][24] 或 Snap 包。
|
||||
|
||||
如果你想要直接从软件中心安装,或找到一个 flatpak 包或 Snap 包,Firefox 可以满足你的需求。
|
||||
|
||||
### 你应该选择什么?
|
||||
|
||||
如果你想要更多自定义和高级功能,Brave 应该是一个令人印象深刻的选择。但是,如果你对在 Linux 发行版上使用专有浏览器没有问题,并且想要稍微更好的性能,那么 Google Chrome 是一个可行的选择。
|
||||
|
||||
对于注重隐私的用户来说,答案是显而易见的。但是,你必须考虑同步的便利性。因此,如果你对自己到底最在意什么感到困惑,我建议你先评估你的要求并决定你想要什么。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/brave-vs-chrome/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/best-browsers-ubuntu-linux/
|
||||
[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2022/01/chrome-brave-ui.png?resize=800%2C435&ssl=1
|
||||
[3]: https://www.google.com/chrome/index.html
|
||||
[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2022/01/google-chrome-ui.png?resize=800%2C479&ssl=1
|
||||
[5]: https://brave.com
|
||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-browser-ui.png?resize=800%2C479&ssl=1
|
||||
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-appearance-options.png?resize=800%2C563&ssl=1
|
||||
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/open-source-proprietary.png?resize=800%2C450&ssl=1
|
||||
[9]: https://itsfoss.com/open-source-browsers-linux/
|
||||
[10]: https://itsfoss.com/chrome-vs-chromium/
|
||||
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/google-chrome-sync.png?resize=800%2C555&ssl=1
|
||||
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/brave-sync.png?resize=800%2C383&ssl=1
|
||||
[13]: https://itsfoss.com/brave-vs-firefox/
|
||||
[14]: https://ipfs.io
|
||||
[15]: https://itsfoss.com/brave-search-features/
|
||||
[16]: https://itsfoss.com/privacy-search-engines/
|
||||
[17]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/chrome-brave-benchmarks.png?resize=800%2C450&ssl=1
|
||||
[18]: https://webkit.org/blog/8685/introducing-the-jetstream-2-benchmark-suite/
|
||||
[19]: https://webkit.org/blog/8063/speedometer-2-0-a-benchmark-for-modern-web-app-responsiveness/
|
||||
[20]: https://web.basemark.com
|
||||
[21]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/google-chrome-package.png?resize=800%2C561&ssl=1
|
||||
[22]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-install-linux.png?resize=800%2C325&ssl=1
|
||||
[23]: https://itsfoss.com/install-brave-browser-fedora/
|
||||
[24]: https://itsfoss.com/what-is-flatpak/
|
@ -3,35 +3,27 @@
|
||||
[#]: author: "Sumantro Mukherjee https://opensource.com/users/sumantro"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14200-1.html"
|
||||
|
||||
我在 2021 年学到的关于 Python 的 8 个令人惊讶的东西
|
||||
2021 总结:Python 的 8 个令人惊讶的东西
|
||||
======
|
||||
Opensource.com 的作者们揭示了使用这一流行的编程语言的新方法。
|
||||
![Hands on a keyboard with a Python book ][1]
|
||||
|
||||
长期以来,Python 一直是最受欢迎的编程语言之一,但这并不意味着没有什么新东西可学。Opensource.com 上关于 Python 的阅读量最大的文章列表是一个很好的开始。
|
||||
> 这些文章的作者们揭示了使用这一流行的编程语言的新方法。
|
||||
|
||||
* 机器学习的广泛采用已经到来,其应用仍在增长。看看使用 [Naïve Bayes][2] 分类器并通过 Python 实现的机器学习如何解决现实生活中的问题。
|
||||
![](https://img.linux.net.cn/data/attachment/album/202201/21/100110n5iuyvzvmhg2jwt7.jpg)
|
||||
|
||||
* 向 Python 3 的过渡已经完成,但增强功能不断涌现。Seth Kenlon 强调了[Python 3 中的五颗隐藏的宝石][3],它们在最近的改进中脱颖而出。
|
||||
|
||||
* Openshot 多年来一直是 Linux 视频编辑的最佳选择之一。这篇受欢迎的文章将告诉你,你也可以用这个 Python 应用[在 Linux 上编辑视频][4]。
|
||||
长期以来,Python 一直是最受欢迎的编程语言之一,但这并不意味着没有什么新东西可学。我们关于 Python 的阅读量最大的文章列表是一个很好的开始。
|
||||
|
||||
* 机器学习的广泛采用已经到来,其应用仍在增长。看看使用 [朴素贝叶斯][2] 分类器并通过 Python 实现的机器学习如何解决现实生活中的问题。
|
||||
* 向 Python 3 的过渡已经完成,但增强功能不断涌现。Seth Kenlon 强调了 [Python 3 中的五颗隐藏的宝石][3],它们在最近的改进中脱颖而出。
|
||||
* Openshot 多年来一直是 Linux 视频编辑的最佳选择之一。这篇受欢迎的文章将告诉你,你也可以用这个 Python 应用 [在 Linux 上编辑视频][4]。
|
||||
* Python 最好的部分是一个程序员可以实现的无限可能。[Cython][5] 是一个编译器,不仅可以帮助加快代码执行速度,还可以让用户为 Python 编写 C 语言扩展。
|
||||
|
||||
* Python可以使 API 单元测试更简单。Miguel Brito 向你展示了[用 Python 测试 API 的三种方法][6]。
|
||||
|
||||
* Python 可以使 API 单元测试更简单。Miguel Brito 向你展示了 [用 Python 测试 API 的三种方法][6]。
|
||||
* 随着计算能力的提高,越来越多的程序在并发运行。这可能会使调试、日志记录和剖析出错的地方成为挑战。[VizTracer][7] 正是为了解决这个问题而创建的。
|
||||
|
||||
* 用户的个人项目,无论大小,都很好地提醒我们开源编码可以有多大的乐趣。这里有一个鼓舞人心的项目:Opensource.com 的作者 Darin London 如何使用 CircuitPython [监控他的温室][8]。
|
||||
|
||||
* Linux 用户经常会遇到需要大量命令行参数的程序,这让人很不爽。这是一个[不错的配置解析技巧][9],可以让生活更轻松。
|
||||
|
||||
|
||||
|
||||
* 用户的个人项目,无论大小,都很好地提醒我们开源编码可以有无穷的乐趣。这里有一个鼓舞人心的项目:Darin London 如何使用 CircuitPython [监控他的温室][8]。
|
||||
* Linux 用户经常会遇到需要大量命令行参数的程序,这让人很不爽。这是一个 [不错的配置解析技巧][9],可以让生活更轻松。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -40,7 +32,7 @@ via: https://opensource.com/article/22/1/python-roundup
|
||||
作者:[Sumantro Mukherjee][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,112 @@
|
||||
[#]: subject: "How to build an open source metaverse"
|
||||
[#]: via: "https://opensource.com/article/22/1/open-source-metaverse"
|
||||
[#]: author: "Josip Almasi https://opensource.com/users/jalmasi"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14218-1.html"
|
||||
|
||||
如何建立一个开源的元宇宙
|
||||
======
|
||||
|
||||
> 开源世界是建立元宇宙的首选之地。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202201/27/123936o0fcmdfb0d88p0zy.jpg)
|
||||
|
||||
如果我告诉你,构建元宇宙所需要的所有内容和软件都已经有了,而且完全免费,你会去构建吗?
|
||||
|
||||
先别急,让我们退一步来解释一下元宇宙。
|
||||
|
||||
### 什么是元宇宙?
|
||||
|
||||
20 世纪的赛博朋克作家,如 Gibson 和 Stephenson,都曾想象过由虚拟现实支持的互联网,在 Stephenson 的小说《雪崩<rt>Snow Crash</rt></ruby>》中,他将其称之为<ruby>元宇宙<rt>Metaverse</rt></ruby>。随着<ruby>虚拟现实<rt>virtual reality</rt></ruby>(VR)设备和应用程序的日益普及,尤其是在马克•扎克伯格宣布将雇佣 1 万人来打造它,并将 Facebook 的公司名称改为 Meta 之后,元宇宙正在成为一个热门词汇。Matthew Ball 对该话题进行了 [认真分析][2],并以“共同构建”作为结论:“事实上,最有可能的是,元宇宙是来自不同的平台、机构和技术的网络中,它们协同配合(无论多么不情愿),并拥抱互操作性。”
|
||||
|
||||
互操作性,这个词本身含蓄而清楚地指出了开源和开放标准在其中的作用。
|
||||
|
||||
因此,简而言之,它就是支持 VR 的互联网。
|
||||
|
||||
### 如何建立一个开源的元宇宙?
|
||||
|
||||
就像互联网上的网络服务器一样,你需要 VR 服务器。不过不用担心,我写了一个,而且 [介绍它的文章][3] 大约一年前就发表在这里了。当然,你需要支持 VR 的网络浏览器,但网络浏览器已经支持视频/音频流(WebRTC)以及 VR 和 AR(WebXR)。此外,你还需要大量 3D 内容,最好是开源标准的 glTF 格式。幸运的是,[Sketchfab][4] 拥有 50 万个以上的免费 3D 模型,由大量的作者在<ruby>知识共享许可<rt>Creative Commons licenses</rt></ruby>下发布。Sketchfab 并不是唯一一家这样做的公司,但他们提供了 REST API 来搜索和下载这些模型。
|
||||
|
||||
### 别忘了键盘
|
||||
|
||||
在 VR 中已经待了一段时间了,我可以用亲身体验告诉你我最怀念的是什么:键盘!我在键盘上写代码,但当我戴上 VR 眼镜时,它就消失了。你可以想象,摘下和戴上 VR 设备是多么的混乱。不仅如此,我还需要在 VR 中看到我的代码。那么为什么要止步于此呢?为什么我在 VR 中看不到每一个应用程序呢?许多人都在使用两个或更多的显示器。在 VR 中,你可以随处布置窗口。这比多少个屏幕都要好。而一旦到了这一步,你就可以真正地谈论元宇宙了。
|
||||
|
||||
说实话,VR 设备仍处于起步阶段,它无疑还缺少许多功能。但是,VR 设备将得到改善,并最终包括键盘、更好的摄像头以及在现实中叠加虚拟的能力。在此期间,我们将继续戴上和摘下护目镜,以其他方式处理其他障碍。
|
||||
|
||||
### 那么我还等什么呢?
|
||||
|
||||
你不需要等待。无论是爱好者还是公司,都正在努力。而且你现在就可以开始在网络上建立你的虚拟世界。下面的视频解释了如何使用现有的免费模型来制作虚拟世界。
|
||||
|
||||
![VIDEO](https://youtu.be/d0v8IPCt4Mc)
|
||||
|
||||
在底层,VRSpace 网络客户端使用一个开源的 JavaScript WebGL 库 Babylon.js 来加载 glTF 内容并使用 WebGL 渲染。它调用 Sketchfab REST API 的搜索功能(服务器所有者必须在那里有一个账户)。点击了一个模型,它就会让 VRSpace 服务器获取它。服务器下载它(仅当它之前没有下载的情况下),并将其交付给客户端。空间中发生的一切都会被广播(实际上是通过 WebSockets 进行多播)给所有连接的用户,所以他们都会看到同样的移动和物体大小的调整。当然,他们可以通过文本信息或语音进行聊天。通过点击右下角的 VR 眼镜按钮,用户可以立即进入 VR。用户还可以共享屏幕,尽管不在此空间中。
|
||||
|
||||
![](https://youtu.be/xB6XTnEMQzo)
|
||||
|
||||
而这一切都只使用现有的标准网络技术和免费的软件和内容。它不仅适用于 PC 和 VR 设备,也适用于移动设备。然而,移动版 Chrome 浏览器并没有启用 VR 功能。它在第一次尝试进入 VR 时会提示下载谷歌 VR。
|
||||
|
||||
由于它是开放的,这在目前来说是可互操作的。但对于元宇宙(支持 VR 的互联网)所需的大规模来说,它的互操作性还远远不够。以头像为例。我在 LinkedIn、Facebook 以及 Opensource.com 上使用相同的图片作为我的头像。我怎么能把我的 3D 头像上传到 VRSpace 或其他地方呢?
|
||||
|
||||
好吧,我不能。上传本身并不是一个问题。当然,文件格式(glTF)也不是问题。问题出现在头像结构上,因为它没有标准化。所以,比如说,不同的人物有不同的骨头数量。然后,本应是微不足道的必备功能,如用虚拟手拿东西,却变得极其复杂。我已经分析了 100 多个免费的角色,并将我的发现作为研究论文发表:《[迈向人形 3D 角色的自动骨架识别][5]》,希望它能帮助其他作者实现互操作性。
|
||||
|
||||
而这只是一个开始,是我们进入一个共享的虚拟世界需要做的第一件事。
|
||||
|
||||
![VRSpace 的免费头像][6]
|
||||
|
||||
### 知识产权
|
||||
|
||||
知识产权呢?你可能会说,这都是开源的!嗯,确实如此。作者们是如此善良,让别人使用他们的创作。用户至少可以做的是给他们点赞。知识共享许可的实际条款要求用户明确归功于作者。为此,我特别注意在搜索结果中显示作者的名字,而且作者信息被嵌入每个 glTF 文件的元数据部分。但是,即使是需要额外的工作的免费东西,我无法想象它变成专有内容会多么可怕。
|
||||
|
||||
### NFT和区块链
|
||||
|
||||
转念一想,我可以想象到。它需要 NFT、区块链,以及其他什么东西。快速搜索“元宇宙 区块链”为我提供了 _极好的购买机会_,并建议了 _最好的购买方案_。好吧,我不买。记住我的话。试图出售加密货币的人是不会建立元宇宙的。
|
||||
|
||||
这并不是说区块链在这里没有用,因为即使是免费的内容,你也必须对作者进行追踪。面对成千上万的免费模型,这必须以某种方式自动化,而分布式账本可能正是正确的解决方案。
|
||||
|
||||
话说回来,像 Sketchfab 这样的数字内容提供商并不只提供免费模型,他们还出售内容。毕竟,这就是他们谋生的方式。从技术上讲,在你的虚拟世界中使用这些专有内容,你需要做的就是把代码中的一个 `true` 改为 `false`,字面上的。但是,一旦你下载了它,没有人可以阻止你分享它。然而,在法律上,许可证禁止你这样做。NFT 可以证明所有权,可以购买,可以出售,但不能执行版权。内容提供商最终会明白这一点,但我担心的不是他们。这对普通用户有实际影响,与我反复被问到的一个具体问题有关。我可以自己制作或购买我自己的头像,而且只能是我的,不能被其他人使用吗?但技术不能阻止任何人复制它。就像我可以从 LinkedIn 复制你的头像图片,并将其作为我在 Facebook 上的图片。但你想想,为什么会有人想这么做?
|
||||
|
||||
有趣的是,我已经有一个 VRSpace 的商业实现。一个由自由软件驱动的 3D 多用户视频和音频流媒体网站,提供专有内容。在上锁的门后,付费进入 —— 就这么简单。而且它不妨碍建立元宇宙。然而,每个人都有自己独特的头像,永远不能被其他人使用。视频头像:
|
||||
|
||||
![作者在 VRSpace 的视频头像][8]
|
||||
|
||||
你想成为你自己,而不是其他人。只要点击视频按钮,就这么简单。当然,浏览器会提示你是否允许流式传输你的视频和音频。这个功能在日常生活中被广泛使用,以至于我们并没有把它和元宇宙联系起来,赛博朋克的作者们也没有设想到这一点。随着时间的推移,这种 _我就是我_ 的方法将发展为运动跟踪和视频流映射到我们的 3D 头像上,但它仍将在昂贵的电影和视频游戏领域停留一段时间。
|
||||
|
||||
现在,你已经瞥见了 VRSpace 服务器的所有功能,除了 Oauth2 认证。反正你知道它是如何工作的。一个网站将你重定向到你选择的另一个网站,你在那里登录,然后被认证回来。这就是上述所有的简化图。
|
||||
|
||||
![VR 组件图][9]
|
||||
|
||||
### 现场演示
|
||||
|
||||
在 [VRSpace.org][10] 上有一个现场演示,一直在运行最新的代码,欢迎你在任何时候尝试。它是完全匿名访问的,没有任何形式的广告和跟踪器。试着在 VRCraft 世界中建立你的世界,但要知道,一旦你断开连接,你所做的一切都会消失 —— 这是运行一个向公众开放的匿名服务的代价。主页提供了所有的相关信息,只要访问该链接即可,或者在 [GitHub][11]、[YouTube][12] 或[Facebook][13] 上加入该项目。
|
||||
|
||||
非常感谢早期采用者的帮助,使项目达到这个阶段 —— 所有作者的免费模型、Sketchfab 提供的访问,以及 Babylon.js 社区,使这一切都能跨平台运作。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/1/open-source-metaverse
|
||||
|
||||
作者:[Josip Almasi][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/jalmasi
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/innovation_virtual_gadgets_device_drone.png?itok=JTAgRb-1 (new techie gadgets representing innovation)
|
||||
[2]: https://www.matthewball.vc/all/themetaverse
|
||||
[3]: https://opensource.com/article/20/12/virtual-reality-server
|
||||
[4]: https://sketchfab.com/
|
||||
[5]: https://www.researchgate.net/publication/356987355_TOWARDS_AUTOMATIC_SKELETON_RECOGNITION_OF_HUMANOID_3D_CHARACTER
|
||||
[6]: https://opensource.com/sites/default/files/uploads/free-avatars-at-vrspace.png (Free avatars at VRSpace)
|
||||
[7]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[8]: https://opensource.com/sites/default/files/uploads/author-in-vrspace.png (Author's video avatar in VRSpace)
|
||||
[9]: https://opensource.com/sites/default/files/uploads/vr-components-diagram.png (VR components diagram)
|
||||
[10]: https://www.vrspace.org/
|
||||
[11]: https://github.com/jalmasi/vrspace
|
||||
[12]: https://www.youtube.com/channel/UCLdSg22i9MZ3u7ityj_PBxw
|
||||
[13]: https://www.facebook.com/vrspace.org
|
@ -3,38 +3,40 @@
|
||||
[#]: author: "Don Watkins https://opensource.com/users/don-watkins"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14210-1.html"
|
||||
|
||||
是什么让 Linux 成为可持续的操作系统
|
||||
======
|
||||
Linux 有助于缩小数字鸿沟,延长硬件的使用寿命。使得它成为操作系统的一个环保选择。
|
||||
![5 pengiuns floating on iceburg][1]
|
||||
|
||||
与大流行病作斗争,造成了生产新电脑所需的微芯片的短缺。此外,一些较新的专有操作系统对这些系统有更高的最低标准。这个难题为我们这些在日常生活中使用 Linux 的人创造了一个机会。
|
||||
> Linux 有助于弥合数字鸿沟,延长硬件的使用寿命,使得它成为操作系统的一个环保选择。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202201/24/112042k6sonl2qqvnp6nqb.jpg)
|
||||
|
||||
与大流行病作斗争,造成了生产新电脑所需的微芯片的短缺。此外,一些较新的专有操作系统提高了它们的硬件标准(LCTT 译注:Windows 11,别扭头看别人)。这个难题为我们这些在日常生活中使用 Linux 的人创造了一个机会。
|
||||
|
||||
### 延长硬件的生命周期
|
||||
|
||||
长期以来,Linux 一直以增加老化硬件的寿命而闻名。这种能力对那些每天使用电脑的人来说是个福音。
|
||||
长期以来,Linux 一直以延长老旧硬件的寿命而闻名。这种能力对那些每天使用电脑的人来说是个福音。
|
||||
|
||||
在过去的一年里,我已经帮助许多人使用 Linux 翻新和[改装旧电脑][2]。基于 Linux 的电脑耗电更少,启动速度更快。[Gnome][3] 桌面很好,但许多旧电脑更适合 [LXDE][4] 或 [XFCE][5] 环境,它们需要较少的资源来运行。
|
||||
在过去的一年里,我已经帮助许多人使用 Linux 翻新和 [改装旧电脑][2]。基于 Linux 的电脑耗电更少,启动速度更快。[Gnome][3] 桌面很好,但许多旧电脑更适合 [LXDE][4] 或 [XFCE][5] 环境,它们运行需要较少的资源。
|
||||
|
||||
像 [FreeGeek][6] 和 [Kramden Institute][7] 这样的组织已经把缩小数字鸿沟作为他们的核心任务,并且,在这样做的时候。这些团体对旧电脑进行了再利用,使它们不被填埋,并把它们送到需要它们的用户手中。没有 Linux,这些项目就不会发生。
|
||||
像 [FreeGeek][6] 和 [Kramden Institute][7] 这样的组织已经把弥合数字鸿沟作为他们的核心使命,并以此为目标。这些团体对旧电脑进行了再利用,使它们不被当成垃圾填埋,而是把它们送到需要它们的用户手中。没有 Linux,就没有这些项目。
|
||||
|
||||
[DD-Wrt][8]、[OpenWrt][9] 和 [Tomato][10] 都是 Linux 解决方案,使旧的网络硬件不被填埋,同时为用户的路由器提供更多的安全、隐私和性能。
|
||||
[DD-Wrt][8]、[OpenWrt][9] 和 [Tomato][10] 都是 Linux 解决方案,使旧的网络硬件不被当成垃圾丢弃,并同时为用户的路由器提供更多的安全、隐私和性能。
|
||||
|
||||
有了 [GalliumOS][11] 和 [Mrchromebox.tech][12],即使是 Chromebooks 在谷歌停止支持后也能获得新的生命。
|
||||
借助 [GalliumOS][11] 和 [Mrchromebox.tech][12],即使是 Chromebooks 在谷歌停止支持后也能获得新的生命。
|
||||
|
||||
### 新的机会
|
||||
|
||||
Linux 创造了一些本来不存在的机会。学生和业余爱好者都在没有投资的情况下开始了计算机科学的成功事业,这要归功于在旧电脑上学到的经验。这些系统运行企业级软件,如 [LAMP][13]栈,它促进了向 “Web 2.0” 的过渡。它是最早的网络开源软件栈之一。今天,它为 WordPress、Drupal 和 Joomla 的安装提供动力。事实上,Linux 为超过 96% 的世界顶级 100 万台网络服务器提供动力。Linux 还管理着[嵌入式系统][14]、电子阅读器、智能电视、智能手表[等等][15]。Linux 是世界上远[超过 70%][16] 的智能手机的操作系统。甚至美国国家航空航天局(NASA)今年在火星上创造历史的[毅力号][17],也是由 Linux 驱动的。
|
||||
Linux 创造了一些本来不存在的机会。学生和业余爱好者都在没有投资的情况下开始了计算机科学的成功事业,这要归功于他们在旧电脑上学到的经验。这些系统运行企业级软件,如 [LAMP][13] 栈,它促进了向 “Web 2.0” 的过渡。它是最早的 Web 开源软件栈之一。今天,它为 WordPress、Drupal 和 Joomla 系统提供了动力。事实上,Linux 为超过 96% 的世界前 100 万台 Web 服务器提供动力。Linux 还管理着 [嵌入式系统][14]、电子阅读器、智能电视、智能手表 [等等][15]。Linux 是世界上远远 [超过 70%][16] 的智能手机的操作系统。甚至美国国家航空航天局(NASA)今年在火星上创造历史的 [毅力号][17],也是由 Linux 驱动的。
|
||||
|
||||
为当今大多数应用提供动力的云计算,没有 Linux 就不可能存在。今天的大多数网络和智能手机应用都在基于 Linux 的[容器][18]中运行。即使在微芯片短缺和专有系统成本高的情况下,进入云服务行业的人也有机会在开放源码的操作系统和软件上学习。
|
||||
为当今大多数应用提供动力的云计算,没有 Linux 就不可能存在。今天的大多数 Web 和智能手机应用都在基于 Linux 的 [容器][18] 中运行。即使在微芯片短缺和专有系统成本高昂的情况下,进入云服务行业的人也有机会学习开源的操作系统和软件。
|
||||
|
||||
### 未来
|
||||
|
||||
但最恰当的是,Linux 和开源为[联合国可持续发展目标][19]提供了动力。随着大流行的继续,Linux 仍然是一个重要的资源。
|
||||
但最恰当的是,Linux 和开源为 [联合国可持续发展目标][19] 提供了动力。随着大流行的继续,Linux 仍然是一个重要的资源。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -43,7 +45,7 @@ via: https://opensource.com/article/22/1/linux-sustainable-os
|
||||
作者:[Don Watkins][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,130 @@
|
||||
[#]: subject: "Record your terminal session with Asciinema"
|
||||
[#]: via: "https://opensource.com/article/22/1/record-terminal-session-asciinema"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14216-1.html"
|
||||
|
||||
用 Asciinema 记录你的终端会话
|
||||
======
|
||||
|
||||
> 用这个开源的终端会话记录器 Asciinema 来展示终端会话。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202201/26/192641raoczh9h2w5xd2cq.jpg)
|
||||
|
||||
支持电话是很重要的,而且最后往往是令人满意的,但明确的沟通行为对每个参与的人来说都是艰巨的。如果你曾经参加过支持电话,你可能会花好几分钟拼出了最短的命令,并详细解释了空格和回车的位置。虽然直接拿过来用户电脑的控制权往往更容易,但这并不是真正的教育的最佳方式。你可以尝试向用户发送一个屏幕记录,而他们可以复制命令并粘贴到自己的终端。
|
||||
|
||||
Asciinema 是一个开源的终端会话记录器。与 `script` 和 `scriptreplay` 命令类似,Asciinema 准确记录了你的终端显示。它将你的“电影”记录保存到一个文本文件中,然后根据需要进行回放。你可以把你的电影上传到 Asciinema.org,就像你在互联网上分享任何其他视频一样,你甚至可以把你的电影嵌入到网页中。
|
||||
|
||||
### 安装 Asciinema
|
||||
|
||||
在 Linux 上,你可以使用你的包管理器安装 Asciinema。
|
||||
|
||||
在 Fedora、CentOS、Mageia 或类似系统上:
|
||||
|
||||
```
|
||||
$ sudo dnf install asciinema
|
||||
```
|
||||
|
||||
在 Debian、Linux Mint 或类似系统上:
|
||||
|
||||
```
|
||||
$ sudo apt install asciinema
|
||||
```
|
||||
|
||||
在 macOS 上,你可以用 Homebrew 安装:
|
||||
|
||||
```
|
||||
$ sudo brew install asciinema
|
||||
```
|
||||
|
||||
在 BSD 和任何其它平台上使用 [Pkgsrc][2]:
|
||||
|
||||
```
|
||||
$ cd /usr/pkgsrc/misc/py-asciinema
|
||||
$ sudo bmake install clean
|
||||
```
|
||||
|
||||
### 从文本中制作电影
|
||||
|
||||
要用 Asciinema 开始录制,你可以使用 `rec` 子命令:
|
||||
|
||||
```
|
||||
$ asciinema rec mymovie.cast
|
||||
asciinema: recording asciicast to mymovie.cast
|
||||
asciinema: press <ctrl-d> or type "exit" when you're done
|
||||
```
|
||||
|
||||
一些友好的输出信息提醒你,你正在录制,并告诉你如何停止:按 `Ctrl+D` 或直接输入 `exit`。
|
||||
|
||||
当 Asciinema 处于活动状态时,你在终端所做的一切都会被记录下来。这包括输入、输出、错误、尴尬的停顿、错误或成功。如果在录制时,在你的终端中查看它,它就会被剪断。
|
||||
|
||||
当你演示完终端如何工作时,按 `Ctrl+D` 或输入 `exit` 来停止记录。
|
||||
|
||||
在这个例子中,产生的文件 `mymovie.cast` 是一个时间戳和动作的集合,它用作回放所使用的脚本(像电影脚本一样)。
|
||||
|
||||
```
|
||||
{"version": 2, "width": 139, "height": 36, "timestamp": 1641457358, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}}
|
||||
[0.05351, "o", "\u001b]0;seth:~\u0007"]
|
||||
[0.05393, "o", "\u001b[1;31m$ \u001b[00m"]
|
||||
[1.380059, "o", "e"]
|
||||
[1.443823, "o", "c"]
|
||||
[1.514674, "o", "h"]
|
||||
[1.595238, "o", "o"]
|
||||
[1.789562, "o", " "]
|
||||
[2.09658, "o", "\""]
|
||||
[2.19683, "o", "h"]
|
||||
[2.403994, "o", "e"]
|
||||
[2.466784, "o", "l"]
|
||||
[2.711183, "o", "lo"]
|
||||
[3.120852, "o", "\""]
|
||||
[3.427886, "o", "\r\nhello\r\n"]
|
||||
[...]
|
||||
```
|
||||
|
||||
如果你犯了一个错误,你可以通过删除重现错误的行来去除这个错误。如果你发现自己在录制过程中做了很多命令行修改或冗长的停顿,你可以安装并使用 [asciinema-edit][3] 工具,它可以通过你定义的时间戳或消除空闲时间来剪掉这些“镜头”片段。
|
||||
|
||||
### 播放 Asciinema 电影
|
||||
|
||||
你可以使用 `play` 子命令回放你的 Asciinema:
|
||||
|
||||
```
|
||||
$ asciinema play mymovie.cast
|
||||
```
|
||||
|
||||
这会接管你的终端会话,并使其成为最接近银幕的形式(除了那次你通过 `telnet` 观看 ASCII 格式的星球大战)。这个基于文本的电影播放,向你的用户展示了一个复杂的任务是如何完成的。当然,播放的 _实际_ 命令并不真正执行。这不是一个正在运行的 shell 脚本,所以即使你在电影中创建了一个 `hello.txt` 文件,在播放后也不会有一个新的 `hello.txt`。这只是为了展示。
|
||||
|
||||
然而,它又不仅仅是一个展示。你可以暂停 Asciinema 电影,选择你在屏幕上看到的文本,并将其粘贴到一个活动终端以运行该命令。Asciinema 是有用的文档。它向用户展示了如何完成一项任务,并允许他们进行复制和粘贴以确保准确性。
|
||||
|
||||
### 上传你的 Asciinema 电影
|
||||
|
||||
目前还没有像大片一样的 Asciinema 电影,但你可以把你的电影上传到 Asciinema.org,与全世界分享:
|
||||
|
||||
```
|
||||
$ asciinema upload mymovie.cast
|
||||
```
|
||||
|
||||
如果你习惯了 YouTube 上传所花费的时间,你会对 Asciinema 电影的传输速度感到惊喜。一个 `.cast` 文件通常只有几千字节,最多几兆字节,所以上传几乎是瞬间完成的。你不需要注册账户来分享你的电影,但所有无人认领的电影将在七天后会被删除。为了保存你的杰作,你可以在 Asciinema 上开设一个账户,然后坐等电影学院的电话。
|
||||
|
||||
### Asciinema 作为文档
|
||||
|
||||
Asciinema 是演示最基本概念的好方法。因为它保留了从录制中复制和粘贴代码的能力,提供了按需暂停和播放的能力,并且完全准确地描绘了它的内容,它不仅仅是屏幕录像,它要好得多。无论你是用它来向你的朋友炫耀你的终端技能,还是用它来教育同事和学生,Asciinema 都是一个无价的、社交的、便于访问的工具。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/1/record-terminal-session-asciinema
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [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/freedos.png?itok=aOBLy7Ky (4 different color terminal windows with code)
|
||||
[2]: https://opensource.com/article/19/11/pkgsrc-netbsd-linux
|
||||
[3]: https://github.com/cirocosta/asciinema-edit
|
@ -0,0 +1,106 @@
|
||||
[#]: subject: "OpenBoard: An Open Source Interactive Whiteboard for Educators"
|
||||
[#]: via: "https://itsfoss.com/openboard/"
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14212-1.html"
|
||||
|
||||
OpenBoard:面向教育工作者的开源交互式白板
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202201/25/134634wzn22l0x3zycy9et.jpg)
|
||||
|
||||
> OpenBoard 是为中小学和大学定制的交互式开源白板。让我们来看看它提供了什么。
|
||||
|
||||
有几个可用于教育的开源工具,但是,并非所有这些面向中小学和大学的软件都能达到商业软件级的良好维护。
|
||||
|
||||
OpenBoard 就是这样一个不同凡响的自由开源工具,它可以不打折扣地为教育服务。它是一个交互式白板程序,具有所有基本功能,并支持各种硬件。
|
||||
|
||||
### OpenBoard:自由及开源的交互式白板
|
||||
|
||||
![][1]
|
||||
|
||||
作为一个自由开源的程序,OpenBoard 看起来是一个令人印象深刻的选择。
|
||||
|
||||
瑞士日内瓦州的教育部门(DIP)与 GitHub 上的社区一起维护该工具。
|
||||
|
||||
通过交互式白板促进简单的数字教学不应该花费很多,这就是 OpenBoard 的优势所在。
|
||||
|
||||
它提供的一系列功能对大多数中小学和大学来说应该是足够的。
|
||||
|
||||
虽然我无法在中小学/大学环境中测试它,但我会重点介绍它提供的主要功能。
|
||||
|
||||
### OpenBoard 的特点
|
||||
|
||||
![][2]
|
||||
|
||||
交互式白板没有众多花哨的功能,但足以使教师能够尽可能轻松地表达自己。
|
||||
|
||||
我注意到的一些特点包括:
|
||||
|
||||
* 跨平台支持
|
||||
* 能够自由地写写画画
|
||||
* 能够添加注释
|
||||
* 能够删除注释
|
||||
* 可以使用荧光笔高亮显示你的白板的部分区域
|
||||
* 单独互动和移动创建/绘制的项目
|
||||
* 按顺序添加多个页面,可以继续教学而不需要擦除
|
||||
* 能够在页面间滚动浏览
|
||||
* 绘制线条(从三种不同线宽中选择)
|
||||
* 切换手写笔模式(如果你使用的是手写板或类似的东西)
|
||||
* 轻松擦除在白板上创建的项目
|
||||
* 可以从一组不同的背景中选择,包括把它变成黑板或带网格线的背景
|
||||
* 各种必要的应用,包括计算器、地图、尺子等,都可以通过拖放使用
|
||||
* 提供的一些形状,可以使绘图更容易
|
||||
* 能够向你的白板添加音频/视频,并无缝播放,以获得更好的体验
|
||||
* 虚拟激光笔
|
||||
* 可放大和缩小
|
||||
* 书写文字,调整大小,并克隆它
|
||||
* 从白板中对屏幕进行截图
|
||||
* 需要时可使用虚拟键盘
|
||||
|
||||
在我简短的测试中,用户界面和可用的选项工作得非常好,没有任何故障。
|
||||
|
||||
![][3]
|
||||
|
||||
当然,你的体验将取决于设备的类型和你的设置。你可以用 Wacom 平板、双显示器设置,或者通过支持触摸的笔记本电脑使用投影仪来尝试。
|
||||
|
||||
### 在 Linux 中安装 OpenBoard
|
||||
|
||||
更好的是,它可以在多个平台上使用,包括 Windows、macOS 和 Linux。
|
||||
|
||||
如果你使用的是 Ubuntu,你可以到官方网站下载 DEB 文件。另外对于其他 Linux 发行版,你可以选择通过 [Flathub][5] [安装 Flatpak 软件包][4]。
|
||||
|
||||
- [OpenBoard][6]
|
||||
|
||||
### 结语
|
||||
|
||||
总的来说,我发现它在使用和导航方面毫不费力。你可以在多个页面之间快速切换,无缝擦除/添加项目,同时还可以在白板上添加丰富的元素。
|
||||
|
||||
通过虚拟激光笔以及一些应用,使得它适合在各种中小学和大学中使用而没有任何障碍。
|
||||
|
||||
我不知道它是否可以被称为谷歌课堂或 Miro 白板功能的替代品,但对于更简单的使用,OpenBoard 可以胜任。
|
||||
|
||||
如果你还没有试过,我建议你试一试。你知道有什么比这更好的东西吗?请在下面的评论中告诉我。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/openboard/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/openboard-screenshot.png?resize=800%2C435&ssl=1
|
||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/openboard-screenshot-1.png?resize=800%2C462&ssl=1
|
||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/openboard-dock.png?resize=800%2C344&ssl=1
|
||||
[4]: https://itsfoss.com/flatpak-guide/
|
||||
[5]: https://flathub.org/apps/details/ch.openboard.OpenBoard
|
||||
[6]: https://www.openboard.ch/index.en.html
|
@ -0,0 +1,246 @@
|
||||
[#]: subject: "Protect your PHP website from bots with this open source tool"
|
||||
[#]: via: "https://opensource.com/article/22/1/php-website-bouncer-crowdsec"
|
||||
[#]: author: "Philippe Humeau https://opensource.com/users/philippe-humeau"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14209-1.html"
|
||||
|
||||
用 CrowdSec 保护你的 PHP 网站不受机器人攻击
|
||||
======
|
||||
|
||||
> CrowdSec 门卫被设计成可以包含在任何 PHP 应用程序中,以帮助阻止攻击者。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202201/24/094243dtt2fkjjwtn5i2kz.jpg)
|
||||
|
||||
PHP 是 Web 上广泛使用的一种编程语言,据估计有近 80% 的网站使用它。我在 [CrowdSec][2] 的团队决定,我们需要为服务器管理员提供一个 PHP 门卫,以帮助抵御那些可能试图与 PHP 文件互动的机器人和不良分子。
|
||||
|
||||
CrowdSec 门卫可以在应用栈的各个层面上进行设置:[Web 服务器、防火墙、CDN][3] 等等。本文关注的是另外一个层次:直接在应用层面设置补救措施。
|
||||
|
||||
由于各种原因,直接在应用程序中进行补救是有帮助的:
|
||||
|
||||
* 它为潜在的安全威胁提供了业务逻辑上的答案。
|
||||
* 它提供了关于如何应对安全问题的自由。
|
||||
|
||||
虽然 CrowdSec 已经发布了一个 WordPress 门卫,但这个 PHP 库被设计成可以包含在任何 PHP 应用中(例如 Drupal)。该门卫有助于阻止攻击者,用验证码挑战他们,让人类通过,同时阻止机器人。
|
||||
|
||||
### 先决条件
|
||||
|
||||
本教程假定你在 Linux 服务器上运行 Drupal,并使用 [Apache 作为 Web 服务器][4]。
|
||||
|
||||
第一步是在你的服务器上 [安装 CrowdSec][5]。你可以用 [官方安装脚本][6] 来完成。如果你使用的是 Fedora、CentOS 或类似系统,请下载 RPM 版本:
|
||||
|
||||
```
|
||||
$ curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh
|
||||
```
|
||||
|
||||
在 Debian 和基于 Debian 的系统上,下载 DEB 版本:
|
||||
|
||||
```
|
||||
$ curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh
|
||||
```
|
||||
|
||||
这些脚本很简单,所以仔细阅读你下载的脚本,以验证它是否导入了 GPG 密钥并配置了一个新的存储库。当你清楚了它的作用后,就执行它,然后安装。
|
||||
|
||||
```
|
||||
$ sudo dnf install crowdsec || sudo apt install crowdsec
|
||||
```
|
||||
|
||||
CrowdSec 会自己检测到所有现有的服务,所以不需要进一步的配置就可以立即得到一个能发挥功能的设置。
|
||||
|
||||
### 测试初始设置
|
||||
|
||||
现在你已经安装了 CrowdSec,启动一个 Web 应用漏洞扫描器,比如 [Nikto][7],看看它的表现如何:
|
||||
|
||||
```
|
||||
$ ./nikto.pl -h http://<ip_or_domain>
|
||||
```
|
||||
|
||||
![nikto scan][8]
|
||||
|
||||
该 IP 地址已被检测到触发了各种场景,最后一个是 `crowdsecurity/http-crawl-non_statics`:
|
||||
|
||||
![detected scan][9]
|
||||
|
||||
然而,CrowdSec 只检测问题,需要一个门卫来应用补救措施。这就是 PHP 门卫发挥作用的地方。
|
||||
|
||||
### 用 PHP 门卫进行补救
|
||||
|
||||
现在你可以检测到恶意行为了,你需要在网站层面上阻止 IP。在这个时候,没有用于 Drupal 的门卫可用。然而,你可以直接使用 PHP 门卫。
|
||||
|
||||
它是如何工作的?PHP 门卫(和其他门卫一样)对 CrowdSec 的 API 进行调用,并检查是否应该禁止进入的 IP,向他们发送验证码,或者允许他们通过。
|
||||
|
||||
Web 服务器是 Apache,所以你可以使用 [Apache 的安装脚本][10]:
|
||||
|
||||
```
|
||||
$ git clone https://github.com/crowdsecurity/cs-php-bouncer.git
|
||||
$ cd cs-php-bouncer/
|
||||
$ ./install.sh --apache
|
||||
```
|
||||
|
||||
![apache install script][11]
|
||||
|
||||
门卫的配置是用来保护整个网站。可以通过调整 Apache 的配置保护网站的一个特定部分。
|
||||
|
||||
### 尝试访问网站
|
||||
|
||||
PHP 门卫已经安装并配置好。由于之前的网络漏洞扫描行动,你被禁止了,你可以尝试访问该网站看看:
|
||||
|
||||
![site access attempt][12]
|
||||
|
||||
门卫成功阻止了你的流量。如果你在以前的 Web 漏洞扫描后没有被禁止,你可以用增加一个手动决策:
|
||||
|
||||
```
|
||||
$ cscli decisions add -i <your_ip>
|
||||
```
|
||||
|
||||
对于其余的测试,删除当前的决策:
|
||||
|
||||
```
|
||||
$ cscli decisions delete -i <your_ip>
|
||||
```
|
||||
|
||||
### 更进一步
|
||||
|
||||
我封锁了试图破坏 PHP 网站的 IP。这很好,但那些试图扫描、爬取或 DDoS 的 IP 怎么办?这些类型的检测可能会导致误报,那么为什么不返回一个验证码挑战来检查它是否是一个真正的用户(而不是一个机器人),而不是封锁 IP?
|
||||
|
||||
#### 检测爬虫和扫描器
|
||||
|
||||
我不喜欢爬虫和坏的用户代理,在 [Hub][13] 上有各种方案可以用来发现它们。
|
||||
|
||||
确保用 `cscli’ 下载了 Hub 上的 `base-http-scenarios` 集合:
|
||||
|
||||
```
|
||||
$ cscli collections list | grep base-http-scenarios
|
||||
crowdsecurity/base-http-scenarios ✔️ enabled /etc/crowdsec/collections/base-http-scenarios.yaml
|
||||
```
|
||||
|
||||
如果没有找到,请安装它,并重新加载 CrowdSec:
|
||||
|
||||
```
|
||||
$ sudo cscli collections install crowdsecurity/base-http-scenarios
|
||||
$ sudo systemctl reload crowdsec
|
||||
```
|
||||
|
||||
#### 用验证码补救
|
||||
|
||||
由于检测 DDoS、爬虫或恶意的用户代理可能会导致误报,我更倾向于对任何触发这些情况的 IP 地址返回一个验证码,以避免阻止真正的用户。
|
||||
|
||||
为了实现这一点,请修改 `profiles.yaml` 文件。
|
||||
|
||||
在 `/etc/crowdsec/profiles.yaml` 中的配置文件的开头添加这个 YAML 块:
|
||||
|
||||
```
|
||||
---
|
||||
# /etc/crowdsec/profiles.yaml
|
||||
name: crawler_captcha_remediation
|
||||
filter: Alert.Remediation == true && Alert.GetScenario() in ["crowdsecurity/http-crawl-non_statics", "crowdsecurity/http-bad-user-agent"]
|
||||
|
||||
decisions:
|
||||
- type: captcha
|
||||
duration: 4h
|
||||
on_success: break
|
||||
```
|
||||
|
||||
有了这个配置文件,任何触发 `crowdsecurity/http-crawl-non_statics` 或 `crowdsecurity/http-bad-user-agent` 场景的 IP 地址都会被强制执行一个验证码(持续 4 小时)。
|
||||
|
||||
接下来,重新加载 CrowdSec:
|
||||
|
||||
```
|
||||
$ sudo systemctl reload crowdsec
|
||||
```
|
||||
|
||||
#### 尝试自定义的补救措施
|
||||
|
||||
重新启动 Web 漏洞扫描器会触发很多场景,所以你最终会再次被禁止。相反,你可以直接制作一个触发 `bad-user-agent` 场景的攻击(已知的坏用户代理列表在 [这里][14])。请注意,你必须激活该规则两次才能被禁止。
|
||||
|
||||
```
|
||||
$ curl --silent -I -H "User-Agent: Cocolyzebot" http://example.com > /dev/null
|
||||
$ curl -I -H "User-Agent: Cocolyzebot" http://example.com
|
||||
HTTP/1.1 200 OK
|
||||
Date: Tue, 05 Oct 2021 09:35:43 GMT
|
||||
Server: Apache/2.4.41 (Ubuntu)
|
||||
Expires: Sun, 19 Nov 1978 05:00:00 GMT
|
||||
Cache-Control: no-cache, must-revalidate
|
||||
X-Content-Type-options: nosniff
|
||||
Content-Language: en
|
||||
X-Frame-Options: SAMEORIGIN
|
||||
X-Generator: Drupal 7 (http://drupal.org)
|
||||
Content-Type: text/html; charset=utf-8
|
||||
```
|
||||
|
||||
当然,你可以看到,你的行为会被抓住。
|
||||
|
||||
```
|
||||
$ sudo cscli decisions list
|
||||
```
|
||||
|
||||
![detected scan][15]
|
||||
|
||||
如果你试图访问该网站,不会被简单地被阻止,而是会收到一个验证码:
|
||||
|
||||
![CAPTCHA prompt][16]
|
||||
|
||||
一旦你解决了这个验证码,你就可以重新访问网站了。
|
||||
|
||||
接下来,再次解禁自己:
|
||||
|
||||
```
|
||||
$ cscli decisions delete -i <your_ip>
|
||||
```
|
||||
|
||||
启动漏洞扫描器:
|
||||
|
||||
```
|
||||
$ ./nikto.pl -h http://example.com
|
||||
```
|
||||
|
||||
与上次不同的是,你现在可以看到,你已经触发了几个决策:
|
||||
|
||||
![scan detected][17]
|
||||
|
||||
当试图访问网站时,禁止决策具有优先权:
|
||||
|
||||
![site access attempt][18]
|
||||
|
||||
### 总结
|
||||
|
||||
这是一个帮助阻止攻击者进入 PHP 网站和应用程序的快速方法。本文只包含一个例子。补救措施可以很容易地扩展,以适应额外的需求。要了解更多关于安装和使用 CrowdSec 代理的信息,[查看这个方法指南][19] 来开始。
|
||||
|
||||
要下载 PHP 门卫,请到 [CrowdSec Hub][20] 或 [GitHub][21]。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/1/php-website-bouncer-crowdsec
|
||||
|
||||
作者:[Philippe Humeau][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/philippe-humeau
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/security_password_chaos_engineer_monster.png?itok=J31aRccu (Security monster)
|
||||
[2]: https://opensource.com/article/20/10/crowdsec
|
||||
[3]: https://hub.crowdsec.net/browse/#bouncers
|
||||
[4]: https://opensource.com/article/18/2/how-configure-apache-web-server
|
||||
[5]: https://doc.crowdsec.net/docs/getting_started/install_crowdsec
|
||||
[6]: https://packagecloud.io/crowdsec/crowdsec/install
|
||||
[7]: https://github.com/sullo/nikto
|
||||
[8]: https://opensource.com/sites/default/files/1nikto_0.png (nikto scan)
|
||||
[9]: https://opensource.com/sites/default/files/2decisions.png (detected scan)
|
||||
[10]: https://github.com/crowdsecurity/cs-php-bouncer/blob/main/install.sh
|
||||
[11]: https://opensource.com/sites/default/files/3bouncer.png (apache install script)
|
||||
[12]: https://opensource.com/sites/default/files/4blocked.png (site access attempt)
|
||||
[13]: https://hub.crowdsec.net/
|
||||
[14]: https://raw.githubusercontent.com/crowdsecurity/sec-lists/master/web/bad_user_agents.txt
|
||||
[15]: https://opensource.com/sites/default/files/7decisions-again.png (detected scan)
|
||||
[16]: https://opensource.com/sites/default/files/8sitedeny.png (CAPTCHA prompt)
|
||||
[17]: https://opensource.com/sites/default/files/10decisionsagain.png (scan detected)
|
||||
[18]: https://opensource.com/sites/default/files/11sitedeny.png (site access attempt)
|
||||
[19]: https://crowdsec.net/tutorial-crowdsec-v1-1/
|
||||
[20]: https://hub.crowdsec.net/author/crowdsecurity/bouncers/cs-php-bouncer
|
||||
[21]: https://github.com/crowdsecurity/cs-php-bouncer
|
@ -0,0 +1,97 @@
|
||||
[#]: subject: "What is POSIX? Why Does it Matter to Linux/UNIX Users?"
|
||||
[#]: via: "https://itsfoss.com/posix/"
|
||||
[#]: author: "Bill Dyer https://itsfoss.com/author/bill/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14201-1.html"
|
||||
|
||||
Linux 黑话解释:什么是 POSIX?
|
||||
======
|
||||
|
||||
POSIX,你肯定在各种在线论坛和文章中,听到过这个缩写,或读到过关于它的信息。程序员和系统开发人员似乎最关心这个问题。它听起来很神秘,虽然有很多关于这个主题的好资料,但一些讨论区(简洁是它们的特点)并没有详细说明它是什么,这可能会让人困扰。那么,POSIX 到底是什么?
|
||||
|
||||
![][1]
|
||||
|
||||
### POSIX 简介
|
||||
|
||||
与其说 POSIX 是一个东西,不如说是一个标签。想象一下,有一个盒子,上面贴着标签:POSIX,而盒子里是一个标准。该标准由 POSIX 所关注的规则和指令集组成。**POSIX** 是<ruby>可移植操作系统接口<rt>Portable Operating System Interface</rt></ruby> 的缩写。它是一个 IEEE 1003.1 标准,其定义了应用程序(以及命令行 Shell 和实用程序接口)和 UNIX 操作系统之间的语言接口。
|
||||
|
||||
当 UNIX 程序从一个 UNIX 平台移植到另一个平台时,遵守该标准可以确保其兼容性。POSIX 主要关注的是 AT&T 的 System V UNIX 和 BSD UNIX 的特性。
|
||||
|
||||
该标准必须阐明并遵循如何实现操作系统之间互操作性的目标的规则。POSIX 涵盖了以下内容:系统接口、命令和实用程序、网络文件访问,这里仅举几例(POSIX 的内容远不止这些)。
|
||||
|
||||
### 为什么有 POSIX?
|
||||
|
||||
一句话:可移植性。
|
||||
|
||||
60 多年前,如果程序员想让他们的软件在一个以上的系统上运行,就必须完全重写代码。由于所涉及的费用,这种情况并不经常发生,但在 1960 年代中期,可移植性成为一种特性 —— 不是通过 POSIX,而是在大型机领域。
|
||||
|
||||
IBM 推出了 System/360 系列的大型计算机。不同的型号有其独特的规范,但硬件使得它们可以使用同一个操作系统:OS/360。
|
||||
|
||||
不仅操作系统可以在不同的型号上运行,应用程序也可以在它们上面运行。这不仅降低了成本,而且创造了“计算机系统”:可以跨产品线协同工作的系统。今天,这一切都很常见,比如网络和系统,但在当时,这是一个巨大的进步!
|
||||
|
||||
![IBM System 360 | 图片来源:IBM][2]
|
||||
|
||||
大约在同一时间,当 UNIX 出现的时候,它也做出了承诺,它可以在不同制造商的机器上运行。然而,当 UNIX 开始衍生出不同的流派时,在这些 UNIX 变体之间移植代码变得很困难。UNIX 可移植性的承诺正在失去基础。
|
||||
|
||||
为了解决这个可移植性问题,在 20 世纪 80 年代形成了 POSIX 标准。这个标准是在 AT&T 的 System V UNIX 和 BSD UNIX 的基础上定义的,这是当时最大的两个 UNIX 变体。值得注意的是,POSIX 的形成并不是为了控制操作系统的构建方式,任何公司都可以自由地以他们喜欢的方式设计他们的 UNIX 变体。POSIX 只关心应用程序与操作系统的接口是怎样的。用程序员的话来说,接口是一个程序的代码与另一个程序的通信方法。接口期望程序 A 向程序 B 提供特定类型的信息。同样地,程序 A 期望程序 B 用特定类型的数据来回答。
|
||||
|
||||
例如,如果我想用 `cat` 命令读取一个文件,我会在命令行上输入类似这样的内容:
|
||||
|
||||
```
|
||||
cat myfile.txt
|
||||
```
|
||||
|
||||
我不想说很多程序员的术语,简单的来说,`cat` 命令调用操作系统来获取文件,以便 `cat` 能够读取它。`cat` 读取它,然后在屏幕上显示文件的内容。在应用程序(`cat`)和操作系统之间有很多的相互作用。这种相互作用如何工作是 POSIX 所关心的。如果这种相互作用在不同的 UNIX 变体中是相同的,那么可移植性,无论操作系统、制造商和硬件如何,就可以重新获得了。
|
||||
|
||||
关于如何实现这一切的具体细节,在该标准中作了规定。
|
||||
|
||||
### 合规是自愿的
|
||||
|
||||
我们所有人都至少见过这样的信息:“如需帮助,请输入:XXXX -help”。这在 Linux 中很常见,但是这不符合 POSIX 标准。POSIX 从来没有要求双破折号,他们希望用一个破折号。双破折号来自 GNU,然而,它并没有损害 Linux,而且还为其增加了一点特性。同时,Linux 大部分都是兼容 POSIX 的,特别是在涉及到系统调用接口时。这就是为什么我们能够在 Linux、Sys V UNIX 和 BSD UNIX 上运行 X、GNOME 和 KDE 应用程序。各种命令,如 `ls`、`cat`、`grep`、`find`、`awk` 等,在不同的变体中操作相同。
|
||||
|
||||
作为一项规则,合规是一个自愿的步骤。当代码符合要求时,移到另一个系统上就比较容易,很少有必要或根本不需要重写代码。当代码可以在不同的系统上工作时,它的使用范围就会扩大。使用其他系统的人可以从使用该程序中受益。对于初出茅庐的程序员来说,学习如何编写符合 POSIX 标准的程序,就能对他们的职业生涯有所帮助。对于那些对 Linux 领域的合规性感兴趣的读者,可以在以下网站找到很多好的信息: [Linux 基本标准(LSB)][3]。
|
||||
|
||||
### 但我不是程序员或系统设计师...
|
||||
|
||||
许多从事计算机工作的人并不是程序员或操作系统设计师。他们是医院的文员,是写信件、任务清单、听写备忘录的秘书,等等。其他人则是将数字制成表格,收集和整理数据,经营网上商店,写书和文章(我们中的一些人还会阅读这些文章)。几乎在每一个工作中,附近都可能有一台计算机。
|
||||
|
||||
POSIX 也影响着这些用户,不管他们是否知道。用户不一定要遵守这个标准,但他们确实希望他们的计算机能够工作。当操作系统和程序符合 POSIX 标准时,他们就获得了互操作性的好处。他们将能够从一个系统转移到另一个系统,并合理地期望这些机器能够像另一个系统那样工作。他们的数据仍然可以访问,他们仍然能够对其进行修改。
|
||||
|
||||
POSIX,以及其他标准,都在不断发展。随着技术的发展,标准也在发展。标准实际上是人们、制造商、组织等用来以有效的方式执行任务的商定系统。一个制造商的设备能够与另一个制造商的设备一起工作。想一想吧。你的蓝牙耳机可以在苹果手机上使用,也可以在安卓手机上使用。我们的电视可以连接到不同网络的视频和节目,如 Amazon Prime、BritBox、Hulu —— 仅举几例。现在,我们甚至可以用我们的手机监测心率。所有这些在很大程度上都是通过遵守标准而实现的。
|
||||
|
||||
好处多多。我喜欢这样。
|
||||
|
||||
### 那么 “X” 是什么?
|
||||
|
||||
我承认,我还没说过 POSIX 中的 “X” 是什么意思。[在一篇很好的文章中][4],Richard Stallman 解释了 POSIX 中的 “X” 是什么意思。用他的话来说就是这样:
|
||||
|
||||
> IEEE 已经完成了规范的制定,但没有简洁的名称。标题是 “可移植的操作系统接口”,虽然我不记得确切的字眼了。委员会把 “IEEEIX” 作为简写。我不认为这是个好的选择。它的发音很难听 —— 听起来就像恐怖的尖叫声,“Ayeee!” —— 所以我预计人们会把这个规范叫为 “Unix”。
|
||||
>
|
||||
> 由于 GNU 不是 Unix,而它的目的是取代 Unix,我不希望人们把 GNU 称为 “Unix 系统”。因此,我提出了一个人们可能真正使用的简洁的名字。在没有特别灵感的情况下,我用了一种很笨的方式取了一个名字。我取了 “可移植操作系统” 的首字母并加上 “ix”。IEEE 马上就采用了这个名字。
|
||||
|
||||
### 结论
|
||||
|
||||
POSIX 标准允许开发者使用大部分相同的代码在许多操作系统上创建应用程序、工具和平台。不管怎么说,按照标准写代码并不是一个要求,但当你想把你的代码移植到其他系统时,它确实有很大的帮助。
|
||||
|
||||
基本上,POSIX 是面向操作系统设计者和软件开发者的,但作为系统的使用者,无论我们是否意识到,我们都受到 POSIX 的影响。正是因为有了这个标准,我们才能够在一个 UNIX 或 Linux 系统上工作,并把工作带到另一个系统上,而且工作起来毫无障碍。作为用户,我们在可用性和跨系统的数据重复使用方面获得了许多好处。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/posix/
|
||||
|
||||
作者:[Bill Dyer][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/bill/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/What-is-POSIX.png?resize=800%2C450&ssl=1
|
||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/IBM-system-360-vintage-picture.jpg?resize=800%2C593&ssl=1
|
||||
[3]: https://refspecs.linuxfoundation.org/lsb.shtml
|
||||
[4]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains
|
94
published/202201/20220121 Make a video game with Bitsy.md
Normal file
94
published/202201/20220121 Make a video game with Bitsy.md
Normal file
@ -0,0 +1,94 @@
|
||||
[#]: subject: "Make a video game with Bitsy"
|
||||
[#]: via: "https://opensource.com/article/22/1/bitsy-game-design"
|
||||
[#]: author: "Peter Cheer https://opensource.com/users/petercheer"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14224-1.html"
|
||||
|
||||
用 Bitsy 制作电子游戏
|
||||
======
|
||||
|
||||
> Bitsy 是一个开源电子游戏设计软件。 其简约的功能使任何人都可以探索他们的创造力。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202201/29/180248kkvmou3klq9qkyky.jpg)
|
||||
|
||||
有许多游戏设计程序和各种游戏设计方法,但对我来说,最突出的是 Bitsy。Bitsy 由 Adam Le Doux 在 2017 年创建,在 MIT 许可下发布,用其创造者的话说,Bitsy 是:“一个用于小游戏或世界的编辑器。其目标是使制作游戏变得容易,在那里你可以四处走动,与人交谈,并到某个地方。”
|
||||
|
||||
### 安装 Bitsy
|
||||
|
||||
Bitsy 是用 JavaScript 编写的,可以制作 HTML5 游戏。你可以从 [GitHub][2] 或 [它的创造者的网站][3] 下载它。它很小,很容易学习,有独特的位图艺术风格,有意在功能上有所欠缺,而且能做的事情有限。
|
||||
|
||||
尽管(也许是因为)这些限制,Bitsy 自发布以来吸引了一个充满活力的用户社区。用户对 Bitsy 采取的两个主要方法是:接受限制和寻求突破限制,看看你能走多远。
|
||||
|
||||
### 创意的界限
|
||||
|
||||
Bitsy 的局限性意味着接受这些局限性仍能制作出令人满意的游戏,这就成为一个需要创造性和创造力的挑战。你可以在 [Itch.io 网站][4] 上看到和玩一些用 Bitsy 制作的令人印象深刻的游戏。同时,人们也想出了一些黑科技、调整和扩展。这些都在不牺牲 Bitsy 的本质的前提下突破了一些限制。
|
||||
|
||||
Bitsy 的基本元素是一个代表玩家的头像、发生游戏动作的房间、精灵(可以与之互动的非玩家角色)和物品。有一个用于创建这些元素的位图编辑器,它也支持简单的两帧动画。
|
||||
|
||||
![Bitsy bitmap editor][5]
|
||||
|
||||
在 Bitsy 中工作依赖于条件变量,而不是成熟的脚本,这使得没有编码背景的人容易学习,但有时会让那些期待更多灵活性的人感到沮丧。
|
||||
|
||||
如果你想了解 Bitsy 的基本情况,你可以在创作者的网站上了解,或者下载并在本地运行。
|
||||
|
||||
![Bitsy room editor][7]
|
||||
|
||||
### 文档
|
||||
|
||||
关于 Bitsy 的文档并不是只有一个地方可以去看。如果你想看 Bitsy 的操作,可以在 YouTube 上找到各种短视频。我更喜欢基于文本的教程,我发现最有用的三个资源是:
|
||||
|
||||
* [Itch.io 网站上提供的官方 Bitsy 教程][8],作者是 Claire Morwood
|
||||
* [Bitsy workshop PDF][9], 由用户 haraiva 提供
|
||||
* [Bitsy 变量][10], 教程由用户 ayolland 编写
|
||||
|
||||
阅读这些教程,尝试一些 Bitsy 游戏,并开始创造你自己的东西。开始时要保持简单。当你熟悉了 Bitsy,你可能想研究一下人们为它创造的一些 [工具、黑科技和扩展][11]。
|
||||
|
||||
它也是教育工作者的完美工具,甚至还有教育工作者 Hal Meeks 的 [Bitsy 课程][12] 可供在线学习。
|
||||
|
||||
你还可以在 [Itch.io 网站][13] 上找到人们为 Bitsy 制作的大量游戏资源。
|
||||
|
||||
### Twine 整合
|
||||
|
||||
你可能已经尝试过流行的基于浏览器的游戏开发工具 [Twine][14]。你可以将 Bitsy 与 Twine 不同程度地整合。整合的范围可以从简单地将 Bitsy 游戏放在一个 iframe 中显示在你的 Twine 游戏中,到在两个引擎之间共享变量和对话命令,让你在 Bitsy 游戏中执行基本的 Twine 命令!如果你对这些感兴趣,那么请看:
|
||||
|
||||
* [结合 Bitsy 和 Twine 的教程][15]
|
||||
* [Bitsy 黑科技][16]
|
||||
* [Freya 的 Twisty 模板][17]
|
||||
|
||||
### 给初学者的 Bitsy
|
||||
|
||||
初学者很容易入门 Bitsy,无论你是编程新手还是仅仅是游戏设计的新手。有了它,你可以探索它在激发创造力、想象力和创造性方面的所有可能性。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/1/bitsy-game-design
|
||||
|
||||
作者:[Peter Cheer][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/petercheer
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open_gaming_games_roundup_news.png?itok=KM0ViL0f (Gaming artifacts with joystick, GameBoy, paddle)
|
||||
[2]: https://github.com/le-doux/bitsy
|
||||
[3]: https://ledoux.itch.io/bitsy
|
||||
[4]: https://itch.io/games/tag-bitsy
|
||||
[5]: https://opensource.com/sites/default/files/uploads/bitsy-editor-sprite.jpg (Bitsy bitmap editor)
|
||||
[6]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[7]: https://opensource.com/sites/default/files/uploads/bitsy-editor-room.jpg (Bitsy room editor)
|
||||
[8]: https://www.shimmerwitch.space/bitsyTutorial.html
|
||||
[9]: https://static1.squarespace.com/static/58930a6c893fc0a33ae624db/t/5bacd94ac83025ead3937071/1538054510407/BITSY-WORKSHOP.pdf
|
||||
[10]: https://ayolland.itch.io/trevor/devlog/29520/bitsy-variables-a-tutorial
|
||||
[11]: https://itch.io/tools/tag-bitsy
|
||||
[12]: https://halmeeks.net/bitsyclass/
|
||||
[13]: https://itch.io/game-assets/tag-bitsy
|
||||
[14]: https://opensource.com/article/18/2/twine-gaming
|
||||
[15]: https://spdrcstl.com/blog/bitsy-twine-tutorial.html
|
||||
[16]: https://github.com/seleb/bitsy-hacks/blob/main/dist/twine-bitsy-comms.js
|
||||
[17]: https://communistsister.itch.io/twitsy-template-1
|
@ -0,0 +1,136 @@
|
||||
[#]: subject: "System76’s COSMIC Desktop Panel Looks Refreshing!"
|
||||
[#]: via: "https://news.itsfoss.com/system76-cosmic-panel/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14203-1.html"
|
||||
|
||||
System76 的 COSMIC 桌面面板看起来很清爽!
|
||||
======
|
||||
|
||||
> System76 分享了其即将推出的使用 Rust 开发的 COSMIC 桌面的顶部面板草图。看起来令人惊叹!
|
||||
|
||||
![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-top-panel-ft.png?w=1200&ssl=1)
|
||||
|
||||
System76 令人兴奋的用 Rust 开发的 COSMIC 桌面的开发工作现在正在进行中。
|
||||
|
||||
虽然我们已经用早期的代码 [试过了][1],但我们现在可以看到更多的东西。从其 [GitHub 仓库][2] 和 [Figma 文档][3] 的一些原型中,我们可以看到它的更多信息。
|
||||
|
||||
值得注意的是,我们可以看到顶部面板和系统托盘,正如你在 COSMIC 桌面上所期望的那样。
|
||||
|
||||
这仍是一项正在进行的工作,可能会有变化。
|
||||
|
||||
### COSMIC 桌面的顶部面板
|
||||
|
||||
Pop!_OS 依赖于 GNOME 扩展来通过顶部面板或系统托盘图标提供更多的功能。
|
||||
|
||||
随着即将推出的使用 Rust 开发的 COSMIC 桌面,看起来他们正在创建新的小程序,与当前的外观相融合,并提供更多的功能。
|
||||
|
||||
开发者 Eduardo Flores [分解研究][4] 了它,发现了关键的区别以及 System76 的目标是如何使其发挥作用。
|
||||
|
||||
而且,这也是它更有趣的地方:
|
||||
|
||||
> 看起来 System76 正在摆脱传统的“扩展”,计划为第三方小程序设计一个 API,这与 KDE、XFce 和其他公司的做法类似。
|
||||
>
|
||||
> 这是一个令人兴奋的消息,将使 COSMIC 成为一个更强大的桌面环境,使其可以扩展和定制。
|
||||
|
||||
另外,似乎这些小程序也可以和顶部面板一起放在坞站里。我们会在其未来的某个测试版中看到更多的实际情况。
|
||||
|
||||
在这里,让我重点介绍一下从现有的草图中观察到的基本变化:
|
||||
|
||||
#### 1、声音小程序
|
||||
|
||||
![用 Rust 开发的 COSMIC 桌面(声音小程序)][5]
|
||||
|
||||
与我们现在所拥有的相比,COSMIC 的目标是增加细化的控制,如选择输入/输出设备、在顶部面板上切换媒体控制的选项、控制媒体播放,以及访问声音设置。
|
||||
|
||||
虽然草图没有显示专辑封面,但在发布前会包括它。
|
||||
|
||||
作为参考,以下是 Pop!_OS 顶部面板选项现在的样子。
|
||||
|
||||
![Pop!_OS 21.10(COSMIC,基于 GNOME)][6]
|
||||
|
||||
#### 2、电源小程序
|
||||
|
||||
![][7]
|
||||
|
||||
很高兴看到有一个专门的电源按钮来快速访问系统设置、锁屏和注销。
|
||||
|
||||
另外,暂停、重启和关机的按钮应该可以提高可用性,关闭计算机不用额外的点击。
|
||||
|
||||
#### 3、网络小程序
|
||||
|
||||
虽然你可以很容易地打开或关闭有线、无线网络,但会弹出一个占据了整个屏幕的单独窗口来选择 Wi-Fi 网络并输入密码。
|
||||
|
||||
![][8]
|
||||
|
||||
但是,看起来我们终于可以在这里输入密码,连接到可用的无线网络,并重试失败的连接,而不必从活动窗口分心。所有这些都发生在系统托盘上的网络小程序上,如上面的截图所示。
|
||||
|
||||
同样,你可以看到关于你的有线连接的更多信息,包括 IP 地址和速度。
|
||||
|
||||
#### 4、日期、时间和日历小程序
|
||||
|
||||
![][9]
|
||||
|
||||
最重要的日历小程序看起来更加实用,信息量更大。通知区不再驻留在这里(它现在有一个单独的小程序),使它的体验更干净,可以把注意力放在你关注的东西上。
|
||||
|
||||
一些细微的视觉改进,比如用重点颜色来突出日历中的某一行,应该会使它更容易理解。
|
||||
|
||||
#### 5、通知中心
|
||||
|
||||
![][10]
|
||||
|
||||
正如我前面提到的,通知现在有一个独立的空间。通知小程序会将所有的通知堆积起来,并允许你在需要时展开它们,或者将它们全部清除。
|
||||
|
||||
我们仍然有“请勿打扰”开关,并可以快速访问通知设置。
|
||||
|
||||
#### 6、图形模式小程序
|
||||
|
||||
![][11]
|
||||
|
||||
这对笔记本电脑用户来说应该是非常有用的,可以在图形模式之间无缝切换,并可以看到当前使用的哪种模式。
|
||||
|
||||
除了所有这些,还有一个蓝牙小程序、一个电池电源模式小程序,以及一些其他的东西,比如改变输入语言或输入源的能力。
|
||||
|
||||
![][12]
|
||||
|
||||
![][13]
|
||||
|
||||
鉴于这是初次看到使用 Rust 开发 COSMIC 桌面顶部面板的外观,看来我们有很多东西要去看了。
|
||||
|
||||
### 总结
|
||||
|
||||
总的来说,System76 正准备为我们提供一个高度可定制但又简化的 COSMIC 桌面版本。
|
||||
|
||||
而所有这些都应该有助于形成一种独特的桌面体验。当然,明年你就得在 Pop!_OS 中和 GNOME 说再见了。
|
||||
|
||||
你怎么看?请在下面的评论中告诉我你的想法!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/system76-cosmic-panel/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [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-rust-cosmic-desktop/
|
||||
[2]: https://github.com/pop-os/cosmic-panel/issues
|
||||
[3]: https://www.figma.com/proto/ZeGTqzAM7dVZgjEW3uhxcd/Top-panel?node-id=559%3A11100&scaling=scale-down&page-id=559%3A11099&starting-point-node-id=559%3A11100&show-proto-sidebar=1
|
||||
[4]: https://blog.edfloreshz.dev/articles/linux/system76/cosmic-panel/
|
||||
[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pop-os-cosmic-sound-applet-early.png?w=820&ssl=1
|
||||
[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pop-os-current-top-panel.png?resize=1568%2C1037&ssl=1
|
||||
[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-new-power-applet.png?w=598&ssl=1
|
||||
[8]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-new-network-applet.png?w=768&ssl=1
|
||||
[9]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-new-date-panel.png?w=1188&ssl=1
|
||||
[10]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-new-notifications.png?w=1132&ssl=1
|
||||
[11]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-new-graphics-applet.png?w=822&ssl=1
|
||||
[12]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-new-battery.png?w=598&ssl=1
|
||||
[13]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-new-bluetooth.png?w=678&ssl=1
|
@ -0,0 +1,134 @@
|
||||
[#]: subject: "Our favorite Linux commands to use just for fun"
|
||||
[#]: via: "https://opensource.com/article/22/1/fun-linux-commands"
|
||||
[#]: author: "Opensource.com https://opensource.com/users/admin"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14226-1.html"
|
||||
|
||||
我们最喜欢的好玩的 Linux 命令
|
||||
======
|
||||
|
||||
> Linux 命令行以生产力强而闻名。它也是一个可以获得一些乐趣的地方!
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202201/30/104636dwqkzr9wqq4k6w0r.jpg)
|
||||
|
||||
去年 11 月,我们分享了一篇文章《[7 个好玩的 Linux 命令][2]》,并请读者们告诉我们推荐的“好玩”的 Linux 命令是什么,以及为什么?
|
||||
|
||||
一些读者在下面分享了他们的最爱:
|
||||
|
||||
---
|
||||
|
||||
这是我的最爱:
|
||||
|
||||
* 当然得有 `cowsay`!
|
||||
* `fortune`,我最喜欢的 “黑科技” 是让用户连接时的 `motd` 成为一个幽默的格言。
|
||||
* `sl`,在你的终端上的蒸汽机车。
|
||||
* `xsnow`,另一个 XWindow 黑科技,这个命令可以在你的工作区降雪,并堆积在打开的窗口上。
|
||||
* GNOME 复活节彩蛋,在 GNOME 2 中,按下 `Alt+F2`(打开运行对话框)并输入 `free the fish`,就可以在你的根窗口中释放 “Wanda the Fish”。如果你点击 Wanda,它就会四处游荡,窜来窜去(一段时间)。
|
||||
|
||||
~[Dave Neary][3]
|
||||
|
||||
---
|
||||
|
||||
我的一天从这些开始:
|
||||
|
||||
`fortune`、`cowsay`、`lolcat`
|
||||
|
||||
![Don't take life too seriously][4]
|
||||
|
||||
紧接着是 `curl` [wttr.in][6]。
|
||||
|
||||
![Weather][7]
|
||||
|
||||
现在我们可以喝咖啡了 ;-)
|
||||
|
||||
~[Tomasz Waraksa][8]
|
||||
|
||||
---
|
||||
|
||||
`cmatrix` ,因为每当这个时候,你就会觉得自己被插入了机器。
|
||||
|
||||
|
||||
~[Gary Smith][9]
|
||||
|
||||
---
|
||||
|
||||
```
|
||||
telnet towel.blinkenlights.nl
|
||||
```
|
||||
|
||||
这并不完全是 Linux 特有的,但它还挺棒的。
|
||||
|
||||
~[John 'Warthog9' Hawley][10]
|
||||
|
||||
---
|
||||
|
||||
Xroach 是 20 世纪 90 年代你的窗口管理器的一个很酷的附加功能。当时它与 Tab Window Manager (TWM)和 F Virtual Window Manager (FVWM)一起使用时非常有趣,但我已经多年没有使用它了。当你运行 Xroach 时,它添加了小蟑螂并“住”在你的窗口下。当你移动一个窗口或关闭它时,蟑螂就会窜到另一个窗口下躲起来或跑出屏幕。这只是其中一种使桌面更有趣的小方法。
|
||||
|
||||
看起来有一个 [Xroach 的现代移植][11],我得找个时间试试。
|
||||
|
||||
~[Jim Hall][12]
|
||||
|
||||
---
|
||||
|
||||
我在 90 年代末担任过计算机科学的助教,我们的计算机实验室里有 Sun Sparc 工作站。有时学生会在实验室时间里走开而不锁屏。每隔一段时间,我就会在他们不注意的时候在终端上执行 `xroach &; clear`。
|
||||
|
||||
XRoach 是个好东西。蟑螂躲在窗口下,在屏幕上窜来窜去,当你移动一个窗口时,又躲在另一个窗口下。
|
||||
|
||||
~[Ann Marie Fred][13]
|
||||
|
||||
---
|
||||
|
||||
我最喜欢的一个是 `hollywood`,在 [这里][14] 了解下。
|
||||
|
||||
只需运行它并开始随意按键,你就会让星巴克的每个人都相信你正在摧毁美国。
|
||||
|
||||
~[Clint Byrum][15]
|
||||
|
||||
[Jim Hall][12] 对此回应道:
|
||||
|
||||
这真是太棒了! 这让我想起了 [Hacker Typer][16]。它是一个网站而不是一个终端程序。只要调出网站,然后敲击键盘。不管你输入什么,Hacker Typer 的输出都似乎是真正的工作。:-)
|
||||
|
||||
为了回应 Clint Byrum(和 Jim Hall 的回应)带来的乐趣:
|
||||
|
||||
这两个我都喜欢! 请欣赏这篇关于 Hollywood 黑科技的 [博文][17]。我最爱之一。
|
||||
|
||||
~[Greg Scott][18]
|
||||
|
||||
---
|
||||
|
||||
你最喜欢的“有趣的” Linux 命令是什么?请在下面的评论中分享你的。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/1/fun-linux-commands
|
||||
|
||||
作者:[Opensource.com][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/admin
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop)
|
||||
[2]: https://opensource.com/article/21/11/fun-linux-commands
|
||||
[3]: https://opensource.com/users/dneary
|
||||
[4]: https://opensource.com/sites/default/files/uploads/too-seriously.png (Don't take life too seriously)
|
||||
[5]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[6]: http://wttr.in/
|
||||
[7]: https://opensource.com/sites/default/files/uploads/wttr.png (Weather)
|
||||
[8]: https://opensource.com/user_articles/380541
|
||||
[9]: https://opensource.com/users/greptile
|
||||
[10]: https://opensource.com/users/warthog9
|
||||
[11]: https://github.com/interkosmos/xroach
|
||||
[12]: https://opensource.com/users/jim-hall
|
||||
[13]: https://opensource.com/users/annmarie99
|
||||
[14]: https://snapcraft.io/install/hollywood/ubuntu
|
||||
[15]: https://opensource.com/users/spamaps
|
||||
[16]: https://hackertyper.net/
|
||||
[17]: https://www.dgregscott.com/hollywood-hacker/
|
||||
[18]: https://opensource.com/users/greg-scott
|
@ -0,0 +1,192 @@
|
||||
[#]: subject: "9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience"
|
||||
[#]: via: "https://itsfoss.com/best-firefox-add-ons/"
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14223-1.html"
|
||||
|
||||
9 个可以改善你的 Firefox 体验的插件
|
||||
======
|
||||
|
||||
Firefox 显然是 Linux 用户中最受欢迎的开源网络浏览器之一。
|
||||
|
||||
事实上,它是 [可用于 Linux 的最佳网络浏览器][1] 之一。但是,它的附加组件(或扩展组件)如何呢?
|
||||
|
||||
考虑到你更喜欢开源的解决方案,你是否在使用开源服务的附加组件?有哪些你可以安装的最好的开源 Mozilla Firefox 附加组件?
|
||||
|
||||
### 你应该尝试的开源 Firefox 扩展程序
|
||||
|
||||
![][2]
|
||||
|
||||
需要注意的是,在 Firefox 中并不是每个附加组件都是开源的。
|
||||
|
||||
此外,有几个开源项目的 Firefox 附加组件采用了不同的许可证。
|
||||
|
||||
#### 1、Dark Reader
|
||||
|
||||
![][3]
|
||||
|
||||
[Dark Reader][5] 是一个流行的浏览器扩展,让你打开网站的深色模式。该扩展只是简单地改变背景和文本颜色,以融合深色模式主题。
|
||||
|
||||
在默认情况下,它与几乎所有网站都能很好地配合。然而,如果你认为深色模式无法阅读(或不好看),你也可以自定义颜色、对比度、亮度和灰度。
|
||||
|
||||
你也可以选择在特定的网站上启用它,而在其他网站上禁用它。在这两种情况下,你都可以创建一个网站白名单/黑名单的列表。
|
||||
|
||||
它是一个尊重用户隐私的开源项目。你可以在它的 [GitHub 页面][4] 中了解更多关于它的信息,或者安装该附加组件来尝试它。
|
||||
|
||||
#### 2、Bitwarden
|
||||
|
||||
![][6]
|
||||
|
||||
毋庸置疑,这是现有的 [最佳密码管理器][7] 之一。
|
||||
|
||||
[Bitwarden][10] 是一个开源的密码管理器,提供各种功能。它专注于提供有竞争力的开源解决方案。
|
||||
|
||||
这个用于 Mozilla Firefox 的密码管理器插件并不亚于任何其他类似产品。你可以通过该扩展获得所有的基本功能,包括生成密码、管理你的保险库以及一些高级选项。
|
||||
|
||||
在我的使用场景中,我没有发现这个扩展有任何不足之处。如果你还没有试过,你应该尝试一下这个插件。你可以看看它的 [GitHub页面][9] 来了解更多信息。
|
||||
|
||||
#### 3、Vimium-FF
|
||||
|
||||
![][11]
|
||||
|
||||
这是一个受 [Vim 键盘快捷键][12] 启发的开源工具,最初出现在 Chrome 浏览器上,后被移植到 Firefox。
|
||||
|
||||
Mozilla Firefox 上的 [Vimium][14] 附加组件还在开发中,最近没有新版本。然而,作为一个实验性的附加组件,它仍然拥有优秀的用户评价。
|
||||
|
||||
这个附加组件可以让你使用键盘快捷方式来改善你的浏览体验。例如,你可以设置快捷键来滚动、查看源代码、启用插入模式、浏览历史记录、检查下载等。
|
||||
|
||||
如果你对键盘快捷键很熟悉,这个附加组件应该是你的菜,尝试一下吧。
|
||||
|
||||
你可以找到它的 [GitHub 页面][13],也可以试试它的几个定制版本(复刻)。
|
||||
|
||||
#### 4、uBlock Origin
|
||||
|
||||
![][15]
|
||||
|
||||
如果你想摆脱网站中的那些动来动去的元素,以改善浏览体验,[uBlock Origin][17] 是一个出色的内容拦截器。
|
||||
|
||||
首先,它能阻止各种广告、跟踪器、弹出式窗口,以使网页的加载速度更快。如果一些网页在你的浏览器中加载时出现卡顿,它应该会派上用场。
|
||||
|
||||
如果一个网站不能正常运行,你也可以选择选择性地阻止或允许 JavaScript。它还具有过滤列表的功能,帮助你积极地阻断或尽量减少阻断,以平衡网络浏览体验而不破坏网站。
|
||||
|
||||
诸如阻止恶意域名、阻止大于特定尺寸的媒体等高级功能,能帮助你保持安全并节省网络带宽。查看其 [GitHub页面][16] 以了解更多技术细节。
|
||||
|
||||
#### 5、LanguageTool
|
||||
|
||||
![][18]
|
||||
|
||||
**注意:** 在这个列表中,我们尽量推荐完全开源的 Firefox 附加组件。但是,这是一个例外,作为一个非 FOSS 附加组件,其服务最初是开源的,但该扩展不是。
|
||||
|
||||
[LanguageTool][21] 是一个开源的语法和拼写检查器,它尊重你的隐私,使它成为与 Grammarly 和其他同类产品相当的替代品。它可以免费使用,但可以选择升级为高级更正功能。
|
||||
|
||||
对于基本的拼写检查和常见的语法错误,它应该是足够好的。在我写这篇文章的时候,我的 [LanguageTool][19] 扩展已经激活。这不仅仅是一个注重隐私的开源替代品,它的工作速度超快,不会影响你的写作体验。
|
||||
|
||||
服务器端是开源的,但不幸的是,该附加组件不是开源的。他们澄清了原因,因为他们不希望竞争对手使用该插件而没有任何回报(更多内容见他们的 [论坛帖子][20])。
|
||||
|
||||
然而,Mozilla 在它每次发布时都能审查源代码,这使得它成为一个值得推荐的附加组件。你可以在其 [官方网站][21] 或其 [GitHub 页面][22] 上探索关于该工具的更多信息。
|
||||
|
||||
#### 6、Tabby
|
||||
|
||||
![][24]
|
||||
|
||||
如果你想方便地管理具有不同活动窗口的多个标签,[Tabby][26] 应该会派上用场。
|
||||
|
||||
它简化了管理一个浏览器的多个标签和窗口的方法,还可以让你保存标签/窗口以便以后使用。说到标签管理,Firefox 并不是最棒的,所以你可能想试试这个。
|
||||
|
||||
你可以查看它的 [GitHub 页面][25] 或者安装这个附加组件来了解更多。
|
||||
|
||||
#### 7、Emoji
|
||||
|
||||
![][27]
|
||||
|
||||
在计算机上挑选或使用表情符并不容易。有了这个开源的 [扩展][29],你就只需点击一下就可以轻松地将几个表情符复制到剪贴板。
|
||||
|
||||
该插件是完全开源的,并且还使用一些开源字体。
|
||||
|
||||
你可以在其 [GitHub 页面][28] 上找到更多关于它的信息。
|
||||
|
||||
#### 8、DownThemAll
|
||||
|
||||
![][30]
|
||||
|
||||
[DownThemAll][33] 是一个强大的插件,可以轻松地从一个网页上下载多个文件/媒体。你可以选择一键下载所有文件,或者自定义你想要的文件。
|
||||
|
||||
还有一些额外的选项可以自定义文件名、基于队列的下载和高级选择。
|
||||
|
||||
你可以在其 [官方网站][31] 或 [GitHub 页面][32] 上了解它的更多信息。
|
||||
|
||||
|
||||
#### 9、Tomato Clock
|
||||
|
||||
![][34]
|
||||
|
||||
如果你想在你的网络浏览器中实现 Pomodoro 功能(就像 Vivaldi 开箱即用提供的功能),[Tomato Clock][36] 是你需要的插件。
|
||||
|
||||
换句话说,它可以让你设置定时器,帮助你把工作分成若干个时间段,中间有短暂的休息。这应该有助于你保持生产力,而不会被工作压垮。
|
||||
|
||||
它使用起来很简单,还能显示一些使用统计,以了解你对它的利用情况。
|
||||
|
||||
你可以探索它的 [GitHub 页面][35] 了解技术信息,或者获取该扩展来开始。
|
||||
|
||||
### 总结
|
||||
|
||||
如果你是一个狂热的 Firefox 用户,我建议你看看这个 [Firefox 键盘快捷键的有用清单][37]。我们也有一个 [Firefox 罕为人知的功能][38] 列表。你也可以去看看。
|
||||
|
||||
虽然还有其他几个有用的 Firefox 附加组件,但我把这个列表限制在我自己使用的最好的那些。
|
||||
|
||||
你最喜欢的开源 Firefox 附加组件有哪些?请在下面的评论中告诉我。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/best-firefox-add-ons/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/best-browsers-ubuntu-linux/
|
||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/firefox-extensions.png?resize=800%2C450&ssl=1
|
||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/firefox-dark-reader.png?resize=708%2C608&ssl=1
|
||||
[4]: https://github.com/darkreader/darkreader
|
||||
[5]: https://addons.mozilla.org/en-US/firefox/addon/darkreader/
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/bitwarden-firefox-extension.png?resize=800%2C500&ssl=1
|
||||
[7]: https://itsfoss.com/password-managers-linux/
|
||||
[8]: https://itsfoss.com/bitwarden/
|
||||
[9]: https://github.com/bitwarden/browser
|
||||
[10]: https://addons.mozilla.org/en-US/firefox/addon/bitwarden-password-manager/
|
||||
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/vimium-firefox.png?resize=800%2C553&ssl=1
|
||||
[12]: https://itsfoss.com/pro-vim-tips/
|
||||
[13]: https://github.com/philc/vimium
|
||||
[14]: https://addons.mozilla.org/en-US/firefox/addon/vimium-ff/
|
||||
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/ublockorigin-firefox.png?resize=647%2C491&ssl=1
|
||||
[16]: https://github.com/gorhill/uBlock#ublock-origin
|
||||
[17]: https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/
|
||||
[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/languagetool-firefox.png?resize=710%2C601&ssl=1
|
||||
[19]: https://itsfoss.com/languagetool-review/
|
||||
[20]: https://forum.languagetool.org/t/about-the-browser-addon-privacy-and-open-source/7505
|
||||
[21]: https://languagetool.org
|
||||
[22]: https://github.com/languagetool-org/languagetool
|
||||
[23]: https://addons.mozilla.org/firefox/addon/languagetool/
|
||||
[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/tabby-firefox.png?resize=800%2C548&ssl=1
|
||||
[25]: https://github.com/Bill13579/tabby
|
||||
[26]: https://addons.mozilla.org/en-US/firefox/addon/tabby-window-tab-manager/
|
||||
[27]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/emoji-firefox.png?resize=685%2C508&ssl=1
|
||||
[28]: https://github.com/Sav22999/emoji
|
||||
[29]: https://addons.mozilla.org/en-US/firefox/addon/emoji-sav/
|
||||
[30]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/downthemall-firefox.png?resize=643%2C408&ssl=1
|
||||
[31]: https://www.downthemall.org
|
||||
[32]: https://github.com/downthemall/downthemall
|
||||
[33]: https://addons.mozilla.org/en-US/firefox/addon/downthemall/
|
||||
[34]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/tomato-firefox.png?resize=524%2C428&ssl=1
|
||||
[35]: https://github.com/samueljun/tomato-clock
|
||||
[36]: https://addons.mozilla.org/en-US/firefox/addon/tomato-clock/
|
||||
[37]: https://itsfoss.com/firefox-keyboard-shortcuts/
|
||||
[38]: https://itsfoss.com/firefox-useful-features/
|
@ -0,0 +1,100 @@
|
||||
[#]: subject: "Linux Jargon Buster: What are Upstream and Downstream?"
|
||||
[#]: via: "https://itsfoss.com/upstream-and-downstream-linux/"
|
||||
[#]: author: "Bill Dyer https://itsfoss.com/author/bill/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14215-1.html"
|
||||
|
||||
Linux 黑话解释:什么是上游和下游?
|
||||
======
|
||||
|
||||
“<ruby>上游<rt>upstream</rt></ruby>” 和 “<ruby>下游<rt>downstream</rt></ruby>”这两个术语是相当模糊的,我认为一般人并不会真正使用它们。如果你只是一个 Linux 用户,并且不编写或维护软件,那么很有可能这些术语对你来说毫无意义,但它们对 Linux 世界中各个社区之间的交流方式有益的。
|
||||
|
||||
这些术语被用于网络、编程、内核,甚至在非计算机领域,如供应链。当我们谈论上游和下游的时候,讨论背景是很重要的。
|
||||
|
||||
在其最简单的形式中,上游和下游是信息流动的方向。
|
||||
|
||||
由于我们都是在连接到互联网的情况下阅读这篇文章的,让我们看看适用于互联网服务提供商(ISP)的上游/下游例子。这里,ISP 关注的是流量。上游流量是指数据是从不同的 ISP 的用户处传来的。例如,如果你有一个提供订阅通讯的网站,我发送的订阅信息就是上游数据。
|
||||
|
||||
下游流量是指从一个用户发送到不同 ISP 的另一个用户的数据,它被认为是下游流量。使用同样的订阅例子,假设我的订阅请求被批准,我在一封邮件中收到“欢迎”说明,在又一封邮件中收到最新的新闻简报。在这种情况下,数据是顺流而下的,因为它是由你(好吧,可能是作为代表你进行操作的自动化软件)发送给我,一个来自另外 ISP 的用户。
|
||||
|
||||
总结:我需要或想要的东西(你的通讯)是上游的。你提供给我的东西(欢迎词和实际的通讯)是下游的。
|
||||
|
||||
数据是在上游还是在下游,对我们用户来说可能并不重要,但对监控带宽使用的服务器管理员,以及<ruby>发行商<rt>distributor</rt></ruby>(发行版的制作者)和程序员来说却很重要。
|
||||
|
||||
在 Linux 世界里,上游和下游有两个主要背景。一个是关于内核的,另一个是关于应用程序的。还有其他的,但我希望我可以通过这两个来表达我的想法。
|
||||
|
||||
### Linux 内核背景下的上游和下游
|
||||
|
||||
![][1]
|
||||
|
||||
Linux _就是_ 内核。在创建发行版时,Linux 发行版首先使用未经修改的内核源代码。然后添加必要的补丁,对内核进行配置。内核的配置是基于发行版想要提供的功能和选项。一旦决定了,就相应地创建了内核。
|
||||
|
||||
原始内核来自发行版的上游。当发行版得到源代码时,它就流向下游。一旦发行版得到了内核代码,它就会留在发行商那里,同时对它进行改造。它仍然是我们用户的上游,直到它准备好被发布。
|
||||
|
||||
发行版创建的内核版本将添加补丁和启用某些功能和选项。这种配置是由发行商决定的。这就是为什么有几种 Linux 流派的原因,例如,[Debian][2] 与 [Red Hat][3]。发行商会决定向他们的用户群提供哪些选项,并相应地编译内核。
|
||||
|
||||
一旦这项工作完成,它就会放在一个仓库中准备发布,我们就可以获得一份副本。这个副本向下游流向我们。
|
||||
|
||||
同样地,如果发行商发现了内核中的一个错误,修复了它,然后将补丁发送给内核开发者,这样他们就可以为下游的每个人修补内核。这被称为对上游的贡献,因为这里的流量是向上流向原始来源的。
|
||||
|
||||
### 在应用程序背景下的上游和下游
|
||||
|
||||
同样,从技术上讲,Linux 是内核,其他都是附加软件。发行商也会在他们的项目中加入额外的软件。在这种情况下,有几个上游。一个发行版可以包含任何数量的应用程序,如 X、KDE、Gnome 等等。
|
||||
|
||||
让我们想象一下,你在使用 [nano][4] 编辑器时发现它不能正常工作,于是你向发行版提交了一份错误报告。发行商的程序员会查看它,如果发现他们在 nano 中插入了一个错误,他们将修复它并在其仓库中发布一个新版本。如果他们发现不是他们制造了这个错误,发行商将向上游的 nano 程序员提交一份错误报告。
|
||||
|
||||
当涉及到像错误报告、功能请求等事情时,最好是将它们发送到上游的发行商那里,因为他们维护着你所使用的发行版的内核和附加应用程序。例如,我在几台机器上使用一个叫做 [Q4OS][5] 的发行版。如果我发现一个程序中的错误,我会把它报告给 Q4OS 的人。如果你碰巧使用的是 [Mint][6],你会把它报告给 Mint 项目。
|
||||
|
||||
比如说,如果你在一个普通的 Linux 论坛上发布一个问题,而你提到你在使用 Mint,你肯定会得到这样的回复。“这个问题最好在 Mint 论坛上处理”。用之前的 nano 错误的例子,有可能是 Mint 的程序员对 nano 进行了修改,使其在他们的发行版中运行得更好。如果他们确实犯了一个错误,他们会想知道这个错误,而且在犯了这个错误之后,他们会是修复它的人。
|
||||
|
||||
一旦修复,更新的程序就会被放入你可以使用的仓库。当你得到更新时,它就会顺流而下到你那里,像这样:
|
||||
|
||||
* 如果发行商进行了修复,新版本就会在发行仓库中提供。
|
||||
* 如果该应用程序的程序员进行了修复,它将被发送到测试新代码的发行商那里。一旦发现它工作正常,它就会被放在仓库中,向下游流去。
|
||||
|
||||
### 自动流向下游
|
||||
|
||||
曾经有一段时间,用户得自己获取更新。用户会得到更新的源代码并编译一个新的可执行文件。随着时间的推移,像 `apt` 这样的工具被创造出来,允许用户从软件库中提取更新的二进制文件(可执行文件)。`apt` 程序是 Debian 的,但其他发行版也有他们自己的用于此用途的类似程序。
|
||||
|
||||
像 `apt` 这样的程序负责处理上游/下游的工作。如果你用升级选项运行 `apt`,像这样:
|
||||
|
||||
```
|
||||
sudo apt upgrade
|
||||
```
|
||||
|
||||
它将查看(上游)发行仓库,找到任何需要的更新包,并将它们拉到你的机器上(下游)并安装它们。
|
||||
|
||||
有些发行版会更进一步。发行版的程序员和维护者总是在检查他们的产品。很多时候,应用程序的程序员会对他们的程序进行改进。系统库会经常更新,安全漏洞也会被堵上,等等。这些更新会提供给发行商,然后由发行商在发行仓库中提供新的版本。
|
||||
|
||||
与其让你每天运行 `apt`,一些发行版会提醒你有可用的更新并询问你是否需要它们。如果你想要,只要接受,更新就会被发送到你的机器上并安装。
|
||||
|
||||
### 总结
|
||||
|
||||
上游和下游实际上只是数据流的方向。这个数据在上游或下游流动的方式取决于最终需要谁来处理它。基本上,程序员是上游,用户是下游。
|
||||
|
||||
同样,作为用户,我们真的不需要关心这些术语,但这些概念确实有助于软件的开发和维护。通过将工作引向适当的小组,避免了重复工作。这也确保了标准的维护。例如,Chrome 浏览器可能需要做一些细微的改变,以便在某个发行版上运行,但它的核心是 Chrome 浏览器,它的外观和行为都不会有大的变化。
|
||||
|
||||
如果你发现你的发行版中的任何程序有错误,只需向发行版的维护者报告,这通常是通过他们的网站进行的。你将会把它发送到上游,但你是否记得你在向上游发送报告并不重要。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/upstream-and-downstream-linux/
|
||||
|
||||
作者:[Bill Dyer][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/bill/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/upstream-downstream.png?resize=800%2C450&ssl=1
|
||||
[2]: https://www.debian.org/
|
||||
[3]: https://www.redhat.com/
|
||||
[4]: https://www.nano-editor.org/
|
||||
[5]: https://q4os.org/
|
||||
[6]: https://linuxmint.com/
|
@ -0,0 +1,115 @@
|
||||
[#]: subject: "Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes"
|
||||
[#]: via: "https://itsfoss.com/obsidian-markdown-editor/"
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14230-1.html"
|
||||
|
||||
黑曜石:Markdown 硬核用户创建知识图谱的 Notion 替代品
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202201/31/092728iergl6eayrrrwzuz.jpg)
|
||||
|
||||
我喜欢用 Markdown 来写文章和做笔记。我不确定我是否符合 “Markdown 硬核用户”的标准,但我觉得它对我的写作工作很方便。
|
||||
|
||||
我在 Linux 上试过几个 Markdown 编辑器。我最喜欢的是 [Joplin][1],它可以用来做笔记和组织笔记,并在 Nextcloud 上保留备份。还有 [Zettlr][2],它适合于研究人员。
|
||||
|
||||
最近,我遇到了另一个 Markdown 编辑器,它在文档整理方面意外的不错。你可以用它将你的文件相互连接起来,并以类似思维导图的图形方式显示出来。
|
||||
|
||||
![黑曜石 Markdown 编辑器][3]
|
||||
|
||||
这就是 <ruby>[黑曜石][4]<rt>Obsidian</rt></ruby> 的主要吸引力,你可以用图形的方式查看你的 Markdown 笔记,特别是当这些笔记需要相互连接的时候。当然,它也有其他的功能。
|
||||
|
||||
> 非 FOSS 警报!
|
||||
>
|
||||
> 最初,我以为黑曜石是一个开源软件。当我寻找他们的源代码库时(在我写完这篇文章后),我才意识到它是 [免费使用的应用程序][5],但不是 FOSS(自由及开源软件)。这让我觉得惭愧,因为它实在是一个好应用,好到让我继续在这里介绍它。
|
||||
|
||||
### 黑曜石 Markdown 编辑器的功能
|
||||
|
||||
在黑曜石里,你会发现你期望从一个标准的 Markdown 编辑器得到的所有功能。它有一个侧边栏来显示文件夹结构,还有一个主窗格来显示你的文档。你可以选择在“编辑”和“阅读”视图之间切换。
|
||||
|
||||
![黑曜石 Markdown 编辑器的界面][6]
|
||||
|
||||
默认情况下,它只显示一个窗格,但你可以根据自己的喜好添加更多的窗格。例如,我添加了一个新的窗格来同时显示编辑和查看模式,这样就可以在同一时间编辑和预览文档。
|
||||
|
||||
![你可以垂直或水平地分割编辑器,以增加更多的窗格来并排查看][7]
|
||||
|
||||
你可以通过按 `[[` 键来创建现有笔记的内部链接。它可以打开一个文件搜索器,让你从同一项目(这里称为 “<ruby>金库<rt>vault</rt></ruby>”)中的现有笔记中选择。
|
||||
|
||||
![在黑曜石创建内部链接][8]
|
||||
|
||||
你可以切换到“图表视图”来显示同一个“金库”(项目)中的笔记之间的联系。我快速做了几个内部链接来进行测试,你可以看到它显示了文件之间的相互联系。
|
||||
|
||||
![黑曜石图表视图][9]
|
||||
|
||||
你可以图形化地进行搜索和替换。对笔记进行备注、合并文件、在笔记之间移动标题等等。
|
||||
|
||||
它还有一个命令模式(位于编辑器的左侧侧边栏),允许你控制编辑器的各个方面。其中一些“动作”也可以用键盘快捷键来完成。
|
||||
|
||||
![黑曜石命令调色板][10]
|
||||
|
||||
这还不是全部。黑曜石还有一个 [社区市场][11],在那里你可以找到并安装插件来扩展其功能。例如,你可以下载看板插件,用黑曜石来管理项目和任务。
|
||||
|
||||
![黑曜石也有第三方的社区插件][12]
|
||||
|
||||
这里还有很多功能,我不可能把它们全部列出。即使是项目网站也没有一次性列出所有的功能,这是很无奈的。
|
||||
|
||||
### 安装黑曜石
|
||||
|
||||
黑曜石是一个跨平台的应用程序,它可用于 Linux、macOS、Windows、Android 和 iOS。
|
||||
|
||||
对于 Linux,你可以选择使用 AppImage、Snap 或 Flatpak。我使用 AppImage 版本进行测试。你可以在其下载页面找到相关信息和文件。
|
||||
|
||||
- [下载黑曜石][13]
|
||||
|
||||
### 它值得使用吗?
|
||||
|
||||
黑曜石有一个学习曲线。你当然需要了解 [Markdown 的基础知识][14],但是除了编辑和显示 Markdown 文本之外的任何功能,你都需要在这里学习。
|
||||
|
||||
几乎任何应用程序都需要一些学习,但要想充分使用黑曜石,你需要付出比平常更多的努力。
|
||||
|
||||
但如果你是一个痴迷于 Markdown 的用户,并且有成吨的文档,这完全是值得的。这里的好处是它有 [丰富的文档][15] 来帮助你的学习过程。当你点击帮助按钮(显示为问号)时,这些文档也可以从应用界面中获得。
|
||||
|
||||
![访问黑曜石的文档][16]
|
||||
|
||||
黑曜石的界面让我觉得我在使用 VS Code,这并不是一件坏事。
|
||||
|
||||
如果你以 Markdown 为生,并且对正确管理你的文档很着迷,你应该考虑尝试一下黑曜石。
|
||||
|
||||
如果你足够喜欢它并开始定期使用它,也许你可以 [考虑捐赠][17] 或使用他们的高级产品以支持这个项目的发展。高级产品包括选择将你的笔记同步到他们的云端,或者将你的笔记发布到网站上。
|
||||
|
||||
黑曜石已经做得很专业和漂亮了。它就像 VS Code 的 Markdown 版,它有可能成为 [Notion][18] 等的真正替代品。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/obsidian-markdown-editor/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/joplin/
|
||||
[2]: https://itsfoss.com/zettlr-markdown-editor/
|
||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/obsidian.jpg?resize=800%2C424&ssl=1
|
||||
[4]: https://obsidian.md/
|
||||
[5]: https://obsidian.md/eula
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Markdown-Editor-800x462.png?resize=800%2C462&ssl=1
|
||||
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-multiple-pane.png?resize=800%2C462&ssl=1
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Internal-Linking.webp?resize=800%2C450&ssl=1
|
||||
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Graph-View.png?resize=800%2C474&ssl=1
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Command-Palette.png?resize=800%2C474&ssl=1
|
||||
[11]: https://obsidian.md/plugins
|
||||
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Plugins.webp?resize=800%2C364&ssl=1
|
||||
[13]: https://obsidian.md/download
|
||||
[14]: https://itsfoss.com/markdown-guide/
|
||||
[15]: https://help.obsidian.md/Obsidian/Index
|
||||
[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Markdown-Editor-Help.png?resize=800%2C439&ssl=1
|
||||
[17]: https://obsidian.md/pricing
|
||||
[18]: https://www.notion.so/
|
@ -0,0 +1,108 @@
|
||||
[#]: subject: "Jrnl: Your Digital Diary in the Linux Terminal"
|
||||
[#]: via: "https://itsfoss.com/jrnl/"
|
||||
[#]: author: "Marco Carmona https://itsfoss.com/author/marco/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14229-1.html"
|
||||
|
||||
Jrnl:你的 Linux 终端数字日记
|
||||
======
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202201/30/234157xxoo76bdxb7xxbgl.jpg)
|
||||
|
||||
想象一下:有人伤了你的心,而你想要的是心无旁骛地在日记中写下你的感受。你明白这种感受吗?没有吗?我也不知道。我没有心碎过(或者也许我心碎了,但我不想告诉你)。
|
||||
|
||||
但我还是想向你展示一个奇妙的极简的开源的记事应用来保存日记。
|
||||
|
||||
这个方便的小程序是 [Jrnl][1],它可以让你在终端中直接创建、搜索和查看日记条目。
|
||||
|
||||
用 Jrnl 创建新的笔记就像下面一样简单:
|
||||
|
||||
```
|
||||
jrnl yesterday: I read an amazing article on It’s FOSS. I learn about a minimalist app called Jrnl, I should try it.
|
||||
```
|
||||
|
||||
看起来很简单,不是吗?关键字 “yesterday” 在这里是一个触发器,它把你的笔记保存到昨天的日期。记住,它被称为 Jrnl(日记)是有原因的。它的主要目的是保存日记。
|
||||
|
||||
如果你喜欢把你的想法写成日记,或者只是想尝试一下,让我分享一下安装和使用的一些细节。
|
||||
|
||||
### 在你的 Linux 系统上安装和使用 Jnrl
|
||||
|
||||
Jrnl 可以用 pipx 或 Homebrew 包管理器安装。
|
||||
|
||||
我在测试中使用了 Homebrew,所以我将列出这些步骤。首先获取 Homebrew:
|
||||
|
||||
```
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
```
|
||||
|
||||
![Installing Homebrew on your system][2]
|
||||
|
||||
这就好了!如果你需要更多的信息,我们有一个关于 [在 Linux 上安装 Homebrew][3] 的详细教程。
|
||||
|
||||
当你安装了 Homebrew 包管理器后,用它来安装 Jrnl:
|
||||
|
||||
```
|
||||
brew install jrnl
|
||||
```
|
||||
|
||||
![Installing Jrnl with Homebrew][4]
|
||||
|
||||
安装后,只要初始化 jrnl 并开始写你的随机想法。
|
||||
|
||||
你还记得本文开头的第一个例子吗?让我们再来看看它吧!
|
||||
|
||||
```
|
||||
jrnl yesterday: I read an amazing article in It’s FOSS. I learn about a minimalist app called Jrnl, I should try it.
|
||||
```
|
||||
|
||||
![Writing an entry][5]
|
||||
|
||||
在这一行中,我用命令 `jrnl` 在一个时间戳旁启动程序,在这个例子中是 `yesterday`。我写了一个冒号 `:`,表示我将开始写一些东西,在第一个句子标记 `.?!:`(在这里是句号 `.`)之前包含的所有内容将是标题。最后,这个句号旁边的所有内容将被视为文件的主体。
|
||||
|
||||
目前,Jnrl 有两种模式:撰写和查看;前面的步骤用于撰写条目,但如果你想查看,例如,之前写过的条目,语法也很简单,你只需输入下一行。
|
||||
|
||||
```
|
||||
jrnl -on yesterday
|
||||
```
|
||||
|
||||
![Viewing an entry][6]
|
||||
|
||||
认为有人可能会阅读你的日记和想法?你也可以对你的条目进行加密。
|
||||
|
||||
这就好了! 当然,Jrnl 还有很多功能,你可以通过下面这行轻松找到:
|
||||
|
||||
```
|
||||
jrnl --help
|
||||
```
|
||||
|
||||
你也可以参考 [其官方网站][7] 上的文档。记住,在这样的一个开源项目中,文档是你最好的朋友。享受它吧!
|
||||
|
||||
### 总结
|
||||
|
||||
当然,Jrnl 并不适合所有人。大多数命令行工具都不适合。但如果你在终端中生活和呼吸,并喜欢记录你的想法,它就适合你。
|
||||
|
||||
请不要忘记在评论中与我们分享你的个人经验,或者更好的是,如果你想让更多的人了解这个项目,你可以在各个社区和论坛上分享这个帖子。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/jrnl/
|
||||
|
||||
作者:[Marco Carmona][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/marco/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://jrnl.sh/en/stable/
|
||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing_brew.png?resize=800%2C131&ssl=1
|
||||
[3]: https://itsfoss.com/homebrew-linux/
|
||||
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/installing_jrnl.png?resize=800%2C490&ssl=1
|
||||
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Writing_an_entry.png?resize=800%2C211&ssl=1
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Viewing_an_entry.png?resize=800%2C159&ssl=1
|
||||
[7]: https://jrnl.sh/en/stable/overview/
|
@ -0,0 +1,125 @@
|
||||
[#]: subject: "Use Mozilla DeepSpeech to enable speech to text in your application"
|
||||
[#]: via: "https://opensource.com/article/22/1/voice-text-mozilla-deepspeech"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-14233-1.html"
|
||||
|
||||
使用 DeepSpeech 在你的应用中实现语音转文字
|
||||
======
|
||||
|
||||
> 应用中的语音识别不仅仅是一个有趣的技巧,而且是一个重要的无障碍功能。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202202/01/102117mvnx1o9zxxikz91z.jpg)
|
||||
|
||||
计算机的主要功能之一是解析数据。有些数据比其他数据更容易解析,而语音输入仍然是一项进展中的工作。不过,近年来该领域已经有了许多改进,其中之一就是 DeepSpeech,这是 Mozilla 的一个项目,Mozilla 是维护 Firefox 浏览器的基金会。DeepSpeech 是一个语音到文本的命令和库,使其对需要将语音输入转化为文本的用户和希望为其应用提供语音输入的开发者都很有用。
|
||||
|
||||
### 安装 DeepSpeech
|
||||
|
||||
DeepSpeech 是开源的,使用 Mozilla 公共许可证(MPL)发布。你可以从其 [GitHub][2] 页面下载源码。
|
||||
|
||||
要安装,首先为 Python 创建一个虚拟环境:
|
||||
|
||||
```
|
||||
$ python3 -m pip install deepspeech --user
|
||||
```
|
||||
|
||||
DeepSpeech 依靠的是机器学习。你可以自己训练它,但最简单的是在刚开始时下载预训练的模型文件。
|
||||
|
||||
```
|
||||
$ mkdir DeepSpeech
|
||||
$ cd Deepspeech
|
||||
$ curl -LO \
|
||||
https://github.com/mozilla/DeepSpeech/releases/download/vX.Y.Z/deepspeech-X.Y.Z-models.pbmm
|
||||
$ curl -LO \
|
||||
https://github.com/mozilla/DeepSpeech/releases/download/vX.Y.Z/deepspeech-X.Y.Z-models.scorer
|
||||
```
|
||||
|
||||
### 用户应用
|
||||
|
||||
通过 DeepSpeech,你可以将语音的录音转录成书面文字。你可以从在最佳条件下干净录制的语音中得到最好的结果。然而,在紧要关头,你可以尝试任何录音,你可能会得到一些你需要手动转录的东西。
|
||||
|
||||
为了测试,你可以录制一个包含简单短语的音频文件:“This is a test. Hello world, this is a test”。将音频保存为一个 `.wav` 文件,名为 `hello-test.wav`。
|
||||
|
||||
在你的 DeepSpeech 文件夹中,通过提供模型文件、评分器文件和你的音频启动一个转录:
|
||||
|
||||
```
|
||||
$ deepspeech --model deepspeech*pbmm \
|
||||
--scorer deepspeech*scorer \
|
||||
--audio hello-test.wav
|
||||
```
|
||||
|
||||
输出到标准输出(你的终端):
|
||||
|
||||
```
|
||||
this is a test hello world this is a test
|
||||
```
|
||||
|
||||
你可以通过使用 `--json` 选项获得 JSON 格式的输出:
|
||||
|
||||
```
|
||||
$ deepspeech --model deepspeech*pbmm \
|
||||
-- json
|
||||
--scorer deepspeech*scorer \
|
||||
--audio hello-test.wav
|
||||
```
|
||||
|
||||
这就把每个词和时间戳一起渲染出来:
|
||||
|
||||
```
|
||||
{
|
||||
"transcripts": [
|
||||
{
|
||||
"confidence": -42.7990608215332,
|
||||
"words": [
|
||||
{
|
||||
"word": "this",
|
||||
"start_time": 2.54,
|
||||
"duration": 0.12
|
||||
},
|
||||
{
|
||||
"word": "is",
|
||||
"start_time": 2.74,
|
||||
"duration": 0.1
|
||||
},
|
||||
{
|
||||
"word": "a",
|
||||
"start_time": 2.94,
|
||||
"duration": 0.04
|
||||
},
|
||||
{
|
||||
"word": "test",
|
||||
"start_time": 3.06,
|
||||
"duration": 0.74
|
||||
},
|
||||
[...]
|
||||
```
|
||||
|
||||
### 开发者
|
||||
|
||||
DeepSpeech 不仅仅是一个转录预先录制的音频的命令。你也可以用它来实时处理音频流。GitHub 仓库 [DeepSpeech-examples][3] 中有 JavaScript、Python、C# 和用于 Android 的 Java 等各种代码。
|
||||
|
||||
大部分困难的工作已经完成,所以集成 DeepSpeech 通常只是引用 DeepSpeech 库,并知道如何从主机设备上获得音频(你通常通过 Linux 上的 `/dev` 文件系统或 Android 和其他平台上的 SDK 来完成。)
|
||||
|
||||
### 语音识别
|
||||
|
||||
作为一个开发者,为你的应用启用语音识别不只是一个有趣的技巧,而是一个重要的无障碍功能,它使你的应用更容易被有行动问题的人、低视力的人和长期多任务处理的人使用。作为用户,DeepSpeech 是一个有用的转录工具,可以将音频文件转换为文本。无论你的使用情况如何,请尝试 DeepSpeech,看看它能为你做什么。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/1/voice-text-mozilla-deepspeech
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [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/colorful_sound_wave.png?itok=jlUJG0bM (Colorful sound wave graph)
|
||||
[2]: https://github.com/mozilla/DeepSpeech
|
||||
[3]: https://github.com/mozilla/DeepSpeech-examples
|
@ -0,0 +1,72 @@
|
||||
[#]: subject: "ProtonMail Now Protects You From Email Tracking"
|
||||
[#]: via: "https://news.itsfoss.com/protonmail-tracking-protection/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
ProtonMail Now Protects You From Email Tracking
|
||||
======
|
||||
|
||||
[ProtonMail][1] is an open-source email service that offers best-in-class privacy and security features. All of its client applications are open-source as well. You can use it for free and opt for premium upgrades if needed. Whether using it for free or with a subscription, ProtonMail has been an impressive option for privacy and open-source enthusiasts.
|
||||
|
||||
In fact, we use it for our team. And, it has been a good service so far!
|
||||
|
||||
Now, to make things better, ProtonMail [announced][2] a new feature that blocks hidden pixels in emails that often track your activity.
|
||||
|
||||
While they claim that it should make your email experience safer, what is it? And, what should you expect from it?
|
||||
|
||||
### Blocking Tracking Pixels in Emails
|
||||
|
||||
As of now, the email tracking happens without the receiver’s consent. Some of the newsletters that you receive, marketing/promotion emails, or just about anything might already contain a hidden tracking pixel that monitors your email activity.
|
||||
|
||||
Fret not; the email tracking methods do not compromise the data or your email address. However, these trackers monitor when you open the email, how many times you access it, and the IP address/location associated with it.
|
||||
|
||||
So, with this data, the sender can analyze a wide range of things.
|
||||
|
||||
While this can be useful for digital marketers, it can give attackers more opportunities to lure you into a scam effectively.
|
||||
|
||||
Unfortunately, there’s no way to regulate or ask consent for it. The tracking pixels in emails are all over the place. And, several trustworthy services make use of them as well.
|
||||
|
||||
![][3]
|
||||
|
||||
ProtonMail comes to the rescue by blocking these tracking pixels and hiding your IP address or location from third parties in your email.
|
||||
|
||||
As you can notice from the screenshot above, the email I received included one tracker.
|
||||
|
||||
This feature is enabled by default for every free and premium ProtonMail user.
|
||||
|
||||
When you click on the tracking protection icon on the web, here’s what you would see:
|
||||
|
||||
![][4]
|
||||
|
||||
And, there can be a variety of trackers that cannot be identified easily and would appear as “Uncategorized Tracker”.
|
||||
|
||||
The presence of this feature makes ProtonMail an attractive, privacy-focused email offering. Not to forget, you may not need to opt for expensive solutions like [HEY][5] from Basecamp to get rid of email tracking.
|
||||
|
||||
[ProtonMail][1]
|
||||
|
||||
_What do you think about ProtonMail’s new enhanced tracking protection feature? Let me know your thoughts in the comments down below._
|
||||
|
||||
**Disclaimer:** It’s FOSS is an affiliate partner of ProtonMail. While this does not affect our news reporting stance, we get a small commission if you get a ProtonMail subscription from our link.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/protonmail-tracking-protection/
|
||||
|
||||
作者:[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/recommends/protonmail/
|
||||
[2]: https://protonmail.com/blog/enhanced-tracking-protection/
|
||||
[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ1MyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMzMyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[5]: https://www.hey.com/
|
@ -0,0 +1,108 @@
|
||||
[#]: subject: "Here’s Why Ksnip is My New Favorite Linux Screenshot Tool in 2022"
|
||||
[#]: via: "https://news.itsfoss.com/ksnip-experience/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Here’s Why Ksnip is My New Favorite Linux Screenshot Tool in 2022
|
||||
======
|
||||
|
||||
So, I recently upgraded to a dual-monitor setup (1080p + 1440p).
|
||||
|
||||
While I was excited about the productivity boost by getting things done faster without the need to manage/minimize active windows constantly, there were a few nuances that I came across.
|
||||
|
||||
To my surprise, Flameshot refused to work. And, for the tutorials or articles I write, a screenshot tool that offers minor editing or annotation capabilities comes in handy.
|
||||
|
||||
If you have a similar requirement and are confused, the [GNOME Screenshot tool][1] is an option that works with multiple screens flawlessly.
|
||||
|
||||
However, it does not offer annotations. So, I will have to separately open the image using another image editor or Ksnip to make things work.
|
||||
|
||||
Instead, I decided to use Ksnip for screenshots + annotations? Convenient, right? Yes!
|
||||
|
||||
Let me share my brief experience with Ksnip, and why I think you should try it as well!
|
||||
|
||||
### Using Ksnip for Screenshots on Linux
|
||||
|
||||
I installed Ksnip using the [Flatpak package][2] from [Flathub][3]. But, you can also find its Snap package on Snapcraft.
|
||||
|
||||
Packages including DEB/RPM and the AppImage file can be found in its [GitHub releases section][4].
|
||||
|
||||
You should not have any issues installing it on any Linux distribution. I am currently using it on Pop!_OS 21.10.
|
||||
|
||||
![][5]
|
||||
|
||||
Ksnip supports system tray integration out-of-the-box. So, you should get quick access to the tool and its options, as shown in the screenshot above.
|
||||
|
||||
It lets you take an entire screenshot of two monitors combined using the Full-Screen option. In my case, the result is not pretty (considering I have two monitors with different resolutions) and the file takes up more than 9 MB in size.
|
||||
|
||||
In any case, I do not have a use-case of such an option. So, I stick to the ability to take screenshots of a rectangular area.
|
||||
|
||||
I created a custom shortcut to take a screenshot of an area (or rectangular region) to make it more convenient. Accurately, I mapped it with the middle-click button on my mouse. You can set your preferred shortcut if you want.
|
||||
|
||||
![][6]
|
||||
|
||||
Unfortunately, it does not feature a “delay” option in the system tray to initiate a screenshot after a time gap. But, you can add a delay by accessing the Ksnip editor and initiating a screenshot from within.
|
||||
|
||||
![][7]
|
||||
|
||||
Moving forward, it lets me accurately select a rectangular area across both the monitors, which I want.
|
||||
|
||||
![][8]
|
||||
|
||||
Now, these options alone let me take all kinds of screenshots.
|
||||
|
||||
Once the screenshot has been taken, Ksnip directly opens the editor to let you add annotations, save the photo, or discard it.
|
||||
|
||||
When compared to Flameshot, if I miss adding annotations while taking the screenshot, there’s no built-in image editor to help me with that. And, with Ksnip, I do not have to worry about adding annotations immediately; I can think it over and add annotations if necessary.
|
||||
|
||||
![][9]
|
||||
|
||||
It also allows me to modify the annotations, even after I saved the image to storage. What a nifty feature!
|
||||
|
||||
In addition to all these, you also get some key features like:
|
||||
|
||||
* The ability to pin the editor and use it as a widget across the screen to quickly access the Knsip editor.
|
||||
* Ability to add watermarks.
|
||||
* Undo/Redo
|
||||
* Modify Canvas
|
||||
* Scale/Crop image
|
||||
* Add numbers/stickers along with other annotations
|
||||
* Adjust transparency of sniping area
|
||||
* Imgur/Script uploader
|
||||
* Hotkey support
|
||||
|
||||
|
||||
|
||||
For my workflow, Ksnip is probably the [best screenshot tool for Linux][10] and I will be sticking to it for the near future!
|
||||
|
||||
[Ksnip (GitHub)][11]
|
||||
|
||||
_What do you think about my experience with Knsip? Have you tried it as well? What do you think about it? Let me know your thoughts in the comments!_
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/ksnip-experience/
|
||||
|
||||
作者:[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/using-gnome-screenshot-tool/
|
||||
[2]: https://itsfoss.com/flatpak-guide/
|
||||
[3]: https://flathub.org/apps/details/org.ksnip.ksnip
|
||||
[4]: https://github.com/ksnip/ksnip/releases/tag/v1.9.2
|
||||
[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjYzMSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMxNSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjIzMiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ0MCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM2MSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[10]: https://itsfoss.com/take-screenshot-linux/
|
||||
[11]: https://github.com/ksnip/ksnip
|
@ -0,0 +1,201 @@
|
||||
[#]: subject: "I Used Linux-Based PinePhone Daily For A Year. Here’s What I Learned!"
|
||||
[#]: via: "https://news.itsfoss.com/pinephone-review/"
|
||||
[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
I Used Linux-Based PinePhone Daily For A Year. Here’s What I Learned!
|
||||
======
|
||||
|
||||
When Pine64 announced the PinePhone in 2019, no one could have foreseen the tremendous impact it would have on mobile Linux, desktop Linux, and privacy as a whole.
|
||||
|
||||
As one of the [few phones designed specifically to run desktop Linux][1], it had all the features of a low-end Android phone, combined with the versatility of a laptop. Unfortunately, desktop Linux is just that; it is made for _desktops_, not phones.
|
||||
|
||||
Fortunately, thanks to the incredible power of the GNOME, KDE, Pine64, and general Linux communities, whole new desktop environments, applications, and distributions were born. Some of the more recognizable of these include Plasma Mobile, [Phosh][2], Megapixels, and Mobian.
|
||||
|
||||
With all the key pieces in place, all Pine64 needed to was to sell PinePhones, and sell PinePhones they did. Every community edition (each preloaded with a different distro) pre-ordering round received thousands of orders, one of which was mine.
|
||||
|
||||
Since I received my unit in December 2020, the PinePhone has been a key part in my daily life, with me using it as my daily driver for the whole of 2021. Here are my experiences with it.
|
||||
|
||||
### It’s Performance Is Like Molasses
|
||||
|
||||
![Opening Firefox on the PinePhone][3]
|
||||
|
||||
Sporting an Allwinner a64 SoC, the PinePhone has just enough power to do the most basic phone tasks. Even simple things, like opening Firefox, can take almost 20 seconds, no doubt thanks to its measly 4 cores. This is in stark comparison to modern mid-range and high-end Android phones, all of which have 8 core processors running at least at 2 GHz.
|
||||
|
||||
Fortunately, the community has again stepped in, implementing thousands of small software optimizations. While still not as performant as it’s Android competitors, this does mean the PinePhone is pretty usable for most phone tasks, and even some desktop-oriented apps when using an external monitor through the included dock.
|
||||
|
||||
Despite all of this, the PinePhone is capable enough for most situations, even if it might stutter a bit here and there. But what about the battery? Can it really last all day?
|
||||
|
||||
### The Battery Is… Okay
|
||||
|
||||
![][4]
|
||||
|
||||
While I would love to be able to say that thanks to the PinePhone’s low-power components, the battery life is incredible. Unfortunately, this is not the case, even after all the battery saving improvements that have been implemented.
|
||||
|
||||
After charging it overnight, I usually read the news in the morning, followed by some more at lunchtime. Even though this amounts to less than an hour of screen-on time, the battery still drops about 35% pretty consistently, leaving me with just 65% for the afternoon. Fortunately, this is not a major issue, especially as the modem’s deep sleep function works perfectly.
|
||||
|
||||
For those of you that don’t know, almost all mobile phones put their modem into a deep sleep mode, which basically powers off everything except for what is required to receive calls and texts. Then, when you receive a call, the modem wakes up itself and the SoC, which then starts ringing.
|
||||
|
||||
From my experience, the implementation of deep sleep on the PinePhone has been absolutely incredible, with not a single call being missed. As a result of this, the PinePhones screen-off battery life has been pretty impressive considering its terrible screen-on time. I’ve consistently managed more than 60 hours of battery life with minimal usage, something I can’t say about my Galaxy S20 FE.
|
||||
|
||||
### Don’t Expect Fancy Photos
|
||||
|
||||
Left: iPhone 4S, Right: PinePhone
|
||||
|
||||
With a measly 5 MP rear shooter and an even smaller 2 MP front camera, don’t expect to be taking professional-grade photos. Even many USB webcams offer better image quality, as well as more general features. Heck, the PinePhone’s camera isn’t even capable of taking videos!
|
||||
|
||||
The small amount of post-processing done does help clean up the photos a bit, although not enough to make them social media-ready. For comparison, here is the same photo taken on an iPhone 4S (from 2011) and the PinePhone (from 2019).
|
||||
|
||||
Between the ancient SoC, average battery life, and lackluster cameras, it is clear the PinePhone’s hardware is definitely not it’s forte. But can the software save it?
|
||||
|
||||
### Desktop Environment Or Mobile Environment?
|
||||
|
||||
Within the world of mobile Linux, there are three major players in the desktop environment space. These are:
|
||||
|
||||
* Plasma Mobile
|
||||
* Phosh
|
||||
* [Lomiri][5]
|
||||
|
||||
|
||||
|
||||
Over the course of my time daily driving the PinePhone, I spent roughly 4 months with each environment. During this time, I found a number of different features, problems, and levels of matureness between them, which I will be discussing here.
|
||||
|
||||
#### Plasma Mobile
|
||||
|
||||
![Image Credit: KDE Plasma Mobile][6]
|
||||
|
||||
Released back in 2015 just after Plasma 5, Plasma Mobile has been silently being developed in the background for almost 7 years. Between the time of its initial release and the release of the PinePhone, the team behind Plasma Mobile managed to create a fairly usable mobile desktop environment.
|
||||
|
||||
However, with the release of the PinePhone, this has all changed. Many of the numerous bugs that plagued Plasma Mobile have been ironed out, and immense work was put into improving the UI.
|
||||
|
||||
As a KDE project, Plasma Mobile makes extensive use of Kirigami, which results in an extremely consistent and mobile-friendly app ecosystem. Additionally, many of the pre-existing KDE apps also scale perfectly to it.
|
||||
|
||||
This app ecosystem is extended even further thanks to the Maui project, which just released their Maui Shell (more on that soon). Thanks to their powerful suite of utility apps, Plasma Mobile is a true Android replacement.
|
||||
|
||||
However, that’s not to say that Plasma Mobile is perfect. Even in 2022, there are still a number of remaining bugs and issues. However, this is offset by its mature app ecosystem, extensive use of gestures, and purely mobile focus.
|
||||
|
||||
#### Phosh
|
||||
|
||||
![Screenshots of Phosh on the PinePhone][7]
|
||||
|
||||
Phosh, developed primarily by Purism, is the GTK equivalent of Plasma Mobile. Originally built for the Librem 5, it has been in the works since 2018. At just 4 years old, you may be led to believe that Phosh is immature, but that couldn’t be further from the truth.
|
||||
|
||||
In fact, I never encountered a single crash with Phosh for more than 3 months, compared to days between crashes in Plasma Mobile. Of course, being built on GTK and other Gnome technologies, Phosh has a number of apps available. Some popular apps that work perfectly include:
|
||||
|
||||
* Firefox
|
||||
* Geary
|
||||
* Headlines (Reddit app)
|
||||
* Megapixels (Camera app)
|
||||
* Gnome Maps
|
||||
|
||||
|
||||
|
||||
Additionally, many apps designed for Plasma Mobile also work perfectly, even though they use Kirigami. Unfortunately, while many GTK apps are available, they don’t scale anywhere near as well as Kirigami apps do, so developers have to specifically make their apps compatible with Phosh and the PinePhone.
|
||||
|
||||
Additionally, GTK is a primarily desktop-oriented UI toolkit, meaning features such as gestures, and even apps being able to fit on the screen are patchy at best, and non-existent at worst.
|
||||
|
||||
Fortunately, though, Purism has put a lot of work into the default Gnome apps, which are all perfectly usable and fast.
|
||||
|
||||
Overall, Phosh is extremely solid, especially for users of Gnome on desktop and laptop computers. However, it is also held back by its lack of core mobile features, and optimized apps.
|
||||
|
||||
#### Lomiri
|
||||
|
||||
![Lomiri on the PinePhone][8]
|
||||
|
||||
I doubt you will have heard of this, as it only recently had its name changed. Formerly known as Unity 8, it is the default desktop environment of the Ubuntu Touch operating system. It is also available on Manjaro ARM.
|
||||
|
||||
Built using Qt Quick, it is probably the most mature desktop environment for the PinePhone. It makes great use of gestures for core system functions, and has a huge range of apps made specifically for it.
|
||||
|
||||
However, it also suffers from being only usable on Ubuntu Touch, as none of the apps have been ported to Manjaro. As a result, users of it are subject to Ubuntu Touch’s “locked-down” style, similar to Android and iOS.
|
||||
|
||||
While this might be a good thing for typical users, PinePhone owners are generally tinkerers who like control over their device, which is made much harder with Ubuntu Touch.
|
||||
|
||||
### Operating Systems
|
||||
|
||||
As with any Linux-focused device, there are a huge number of distros and operating systems available. At the time of writing, the Pine64 wiki lists 21 individual operating systems, all in various levels of completeness.
|
||||
|
||||
However, amongst these various operating systems, there are 4 that I have had a great experience with on the PinePhone:
|
||||
|
||||
* Manjaro ARM
|
||||
* Mobian
|
||||
* SailfishOS
|
||||
* Ubuntu Touch
|
||||
|
||||
|
||||
|
||||
While I’m not going to go into detail about each of them, they’re all great choices and perfectly functional for most tasks. With the exception of SailfishOS, they are all also open-source, while SailfishOS is mostly open-source.
|
||||
|
||||
### A Note On Android Apps
|
||||
|
||||
As you may have guessed by now, app support can be a bit of a problem. Even looking at the almost 400 confirmed working apps on the PinePhone, this pales in comparison to the millions available for Android and iOS.
|
||||
|
||||
Fortunately, there are ways around this, the easiest being to emulate Android apps using a compatibility layer. For this, Anbox has been the go-to for a few years now.
|
||||
|
||||
#### Anbox
|
||||
|
||||
If WINE is a compatibility layer for Windows, then Anbox is the same for Android. After installing it, or opening it as it comes preinstalled with many distributions, it is as simple as running a single command to install an APK file.
|
||||
|
||||
From here, the app behave just as any Linux app, albeit with a significant hit to performance.
|
||||
|
||||
Recently, a group of people decided they were going to address this, creating a new project called Waydroid.
|
||||
|
||||
#### Waydroid
|
||||
|
||||
Waydroid is the latest attempt at an Android emulator for the PinePhone, and even at this early stage it looks extremely promising. It manages pretty incredible performance, especially compared to Anbox, thanks to the android apps running directly on the hardware.
|
||||
|
||||
As a result, many extremely popular apps work perfectly, such as F-Droid and the Aurora Store.
|
||||
|
||||
Additionally, apps installed through Waydroid are integrated really well into Linux, with them being able to be opened and closed just like any other app.
|
||||
|
||||
### My Concluding Thoughts On The PinePhone
|
||||
|
||||
Over the course of my time with it, I spent time with almost all the different operating systems available for it, as well as every desktop environment. As I said before, its performance was generally quite poor, although Lomiri and Plasma Mobile were smooth enough.
|
||||
|
||||
I don’t take photos that often, so the camera got very little use. However, when I did take photos, they were generally good enough, even if they weren’t particularly high quality.
|
||||
|
||||
In general, I think the biggest weakness of the PinePhone was actually it’s battery life. This is because even just turning it on to check the time wakes up the modem, causing the battery to drain quickly unless I made an effort not to turn it on.
|
||||
|
||||
Fortunately, I always made sure to carry a spare battery with me that I could pop in by removing the back cover. Here, I could also insert an SD card to be used as additional storage or to test a new OS.
|
||||
|
||||
As to be expected, the PinePhone is not waterproof, but I did find that using it in the rain appeared to do no damage, although your mileage may vary. When I was inside, I often found myself using it with an external monitor using it’s included dock.
|
||||
|
||||
With this setup, I was surprised at how capable the PinePhone was as a laptop. I often found myself editing documents in LibreOffice, and at one point even managed to edit a video using Kdenlive!
|
||||
|
||||
Overall, even with its quirks, my year with the PinePhone went quite well, and I never really found my self longing for my Android.
|
||||
|
||||
### Getting A PinePhone
|
||||
|
||||
If you want to get a PinePhone for yourself, there is a button below that will take you to Pine64’s website. At the time of writing, there are two models available, one with 16 GB of storage and 2 GB of RAM. The other model has 32 GB of storage and 3 GB of RAM.
|
||||
|
||||
The model used in this review was the 3 GB version, which costs $199 USD. The 2 GB model costs $149 USD.
|
||||
|
||||
[Get A PinePhone][9]
|
||||
|
||||
Let’s just hope that the upcoming PinePhone Pro can keep this positive trend up with its more powerful hardware!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/pinephone-review/
|
||||
|
||||
作者:[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://itsfoss.com/linux-phones/
|
||||
[2]: https://github.com/agx/phosh
|
||||
[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjU0MCIgd2lkdGg9Ijk2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[5]: https://lomiri.com/
|
||||
[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMwMCIgd2lkdGg9IjQ0MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI5NSIgd2lkdGg9IjQ0OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM2MiIgd2lkdGg9IjIwNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[9]: https://pine64.com/product-category/pinephone/
|
@ -0,0 +1,86 @@
|
||||
[#]: subject: "Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience"
|
||||
[#]: via: "https://news.itsfoss.com/nitrux-2-0-release/"
|
||||
[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience
|
||||
======
|
||||
|
||||
Nitrux Linux is easily one of the [most beautiful Linux distributions][1] out there.
|
||||
|
||||
Last month, we also looked at [Maui Shell][2], by the same team behind Nitrux Linux. And, now, Nitrux 2.0.0 has been released with some exciting changes.
|
||||
|
||||
Let me highlight the fundamental changes here.
|
||||
|
||||
### Nitrux 2.0.0: What’s New?
|
||||
|
||||
The upgrade includes a new Linux Kernel, updated applications, desktop environment, firmware improvements, and ISO size reduction.
|
||||
|
||||
You will also notice several subtle visual changes to the layouts and the top panel.
|
||||
|
||||
### XanMod Kernel 5.16.3
|
||||
|
||||
![][3]
|
||||
|
||||
XanMod Kernel is tailored for new-gen hardware to get the best possible desktop experience.
|
||||
|
||||
Compared to the stock Linux Kernel found in many other Linux distributions, you will find some custom settings and new features enabled to enhance your experience with it.
|
||||
|
||||
With Nitrux 2.0.0, XanMod Kernel 5.16.3 has been made the default choice. You still get to select the latest mainline LTS or non-LTS (5.15.17, 5.16.3) Linux Kernel as well.
|
||||
|
||||
Not to forget, you also get the ability to install Liquorix and Libre kernels if you need those.
|
||||
|
||||
### Updated Layouts and Changes to Panels
|
||||
|
||||
The top panel now shows window controls, title, global menu and houses the system tray.
|
||||
|
||||
The layout remains similar to previous iterations, but there are a few position adjustments, like adding the application menu to the dock, the application menu being the Launchpad Plasma (thanks to [adhe][4]).
|
||||
|
||||
![][3]
|
||||
|
||||
Moreover, you should find improvements in the window decorations, considering everything is borderless by default. You do get the choice to disable the borderless windows mode from the Window Decorations option under the appearance settings.
|
||||
|
||||
The optional Latte layouts have also received updates to include the window controls, title bar, and the global menu.
|
||||
|
||||
### Updated Packages and Drivers
|
||||
|
||||
For obvious reasons, this upgrade includes KDE Plasma version updates, KDE Frameworks, KDE Gear, among other essential applications like Firefox and LibreOffice.
|
||||
|
||||
Additional firmware has been added for AMD GPUs not available in the kernel packages. They have also added i915, Nouveau, and AMDGPU drivers in the ISO available to download.
|
||||
|
||||
MESA 21.3.5 stable is available by default, but you can install the latest MESA 22.0 if you need it.
|
||||
|
||||
### Other Improvements
|
||||
|
||||
Along with all the changes to Nitrux Linux, there are also some additional technical improvements like:
|
||||
|
||||
* Reduced ISO file size for both the standard and minimal edition.
|
||||
* Xbox One controller works without conflicts with joysticks.
|
||||
* i3 window manager has been replaced by JWM in the minimal ISO.
|
||||
|
||||
|
||||
|
||||
For more details, you can refer to the [official announcement post][5].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/nitrux-2-0-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://itsfoss.com/beautiful-linux-distributions/
|
||||
[2]: https://news.itsfoss.com/maui-shell-unveiled/
|
||||
[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[4]: https://www.pling.com/u/adhe/
|
||||
[5]: https://nxos.org/changelog/release-announcement-nitrux-2-0-0/#download
|
@ -1,84 +0,0 @@
|
||||
[#]: subject: "10 reasons to love Linux in 2021"
|
||||
[#]: via: "https://opensource.com/article/21/12/reasons-love-linux"
|
||||
[#]: author: "Joshua Allen Holm https://opensource.com/users/holmja"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
10 reasons to love Linux in 2021
|
||||
======
|
||||
Opensource.com authors wrote about the many facets of the Linux
|
||||
ecosystem. Here are 10 of the most popular Linux articles.
|
||||
![Penguin driving a car with a yellow background][1]
|
||||
|
||||
Opensource.com published well over [150 articles about Linux in 2021][2]. From articles about small utilities for desktop Linux users to tutorials about working with Linux as a server operating system and everything in between, these articles have covered many facets of the Linux ecosystem. It is well worth your time to check out all of them, but here are ten great articles published this year to get you started.
|
||||
|
||||
### 3 open source tools that make Linux the ideal workstation
|
||||
|
||||
In this article, Seth Kenlon writes about LibreOffice, AbiWord, Gnumeric, and Pandoc covering [tools that make Linux the ideal workstation][3]. He explains how these applications can make you productive when using Linux as a desktop operating system. The article explores advanced features, like LibreOffice's headless mode, and provides tips about getting the most out of each application.
|
||||
|
||||
### Why I use exa instead of ls on Linux
|
||||
|
||||
The `ls` command is one of the most frequently used terminal commands in Linux, but did you know there is a modern alternative with many quality of life improvements? [Why I use exa instead of ls on Linux][4] by Sudeshna Sur describes the `exa` command and the advantages it has over `ls`. The article discusses how `exa` can track new files added to a Git repository, display a directory and file tree, and more.
|
||||
|
||||
### 5 reasons why I love coding on Linux
|
||||
|
||||
Like many people, Seth Kenlon loves coding on Linux. In this article, he shares [five reasons why][5]. He likes coding on Linux because it is built on a foundation of logic, makes you appreciate code connections, provides source code, and provides direct access to peripherals and abstractions layers that make writing code easier.
|
||||
|
||||
### Use this bootable USB drive on Linux to rescue Windows users
|
||||
|
||||
Even if you prefer Linux, there might be times where you need to fix a Windows computer or install Windows for someone. Creating a bootable USB flash drive from a Windows ISO on Linux is not as straightforward as making a bootable flash drive for a Linux distribution. In this tutorial, Don Watkins demonstrates [how to use WoeUSB][6], a utility that handles all the tricky parts of the process for the user.
|
||||
|
||||
### 4 open source tools for running a Linux server
|
||||
|
||||
When using Linux as a server operating system, Seth Kenlon recommends these [four open source tools][7]. The four tools are Samba, Snapdrop, VLC, and PulseAudio. As Seth notes in his article, these four tools make file sharing and streaming with Linux easy.
|
||||
|
||||
### 3 Linux terminals you need to try
|
||||
|
||||
There are many different terminal emulators for Linux. This article by Seth Kenlon recommends [three Linux terminals][8] that are worth trying out. Seth's recommendations are Xfce terminal, rxvt-unicode, and Konsole. He provides a brief overview of each and highlights each terminal emulator's strengths.
|
||||
|
||||
### 5 more reasons to run Kubernetes in your Linux homelab
|
||||
|
||||
In the sequel to his 2020 article [five reasons to run Kubernetes on your Raspberry Pi homelab][9], Seth Kenlon provides [five more reasons to run Kubernetes in your Linux homelab][10]. The five more reasons are that Kubernetes is built on the foundation of Linux, it is flexible, learning it can provide you with personal development, it makes containers make sense, and it facilitates cloud-native development. He also provides a bonus reason: Because it is fun.
|
||||
|
||||
### 6 open source tools and tips to securing a Linux server for beginners
|
||||
|
||||
Sahana Sreeram provides [six excellent tips for securing a Linux server][11]. This tutorial looks at updating software, enabling a firewall, strengthening password protection, disabling nonessential services, checking for listening ports, and scanning for malware. The tips provided by Sahana will help any Linux beginner learn the basics of keeping their Linux servers secure.
|
||||
|
||||
### How Linux made a school pandemic-ready
|
||||
|
||||
Don Watkins interviews Robert Maynord, a teacher at [Immaculate Heart of Mary School][12] in Monona, Wisconsin, about the school [switching their computers to Linux][13]. Maynord shares anecdotes about how he became interested in Linux, the first steps he took to change the school's computers to Linux, how Linux benefits the school, and much more. Don asks many great questions in this interview, and Maynord provides a lot of useful information for schools interested in adopting Linux.
|
||||
|
||||
### Run your favorite Windows applications on Linux
|
||||
|
||||
Sometimes, after switching to Linux, you still need that one particular Windows-only application or really want to play that Windows-only game. In this article, Seth Kenlon provides a tutorial about how to [run your favorite Windows applications on Linux][14]. The tool for doing this is WINE. Seth explains what WINE is, how it works, and how to get it installed on your Linux computer so you can run your favorite Windows applications.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/12/reasons-love-linux
|
||||
|
||||
作者:[Joshua Allen Holm][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/holmja
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/car-penguin-drive-linux-yellow.png?itok=twWGlYAc (Penguin driving a car with a yellow background)
|
||||
[2]: https://opensource.com/tags/linux
|
||||
[3]: https://opensource.com/article/21/2/linux-workday
|
||||
[4]: https://opensource.com/article/21/3/replace-ls-exa
|
||||
[5]: https://opensource.com/article/21/2/linux-programming
|
||||
[6]: https://opensource.com/article/21/2/linux-woeusb
|
||||
[7]: https://opensource.com/article/21/3/linux-server
|
||||
[8]: https://opensource.com/article/21/2/linux-terminals
|
||||
[9]: https://opensource.com/article/20/8/kubernetes-raspberry-pi
|
||||
[10]: https://opensource.com/article/21/6/kubernetes-linux-homelab
|
||||
[11]: https://opensource.com/article/21/4/securing-linux-servers
|
||||
[12]: https://www.ihmcatholicschool.org/
|
||||
[13]: https://opensource.com/article/21/5/linux-school-servers
|
||||
[14]: https://opensource.com/article/21/2/linux-wine
|
@ -1,105 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (5 ops hacks for sysadmins)
|
||||
[#]: via: (https://opensource.com/article/20/1/ops-hacks-sysadmins)
|
||||
[#]: author: (Stephen Bancroft https://opensource.com/users/stevereaver)
|
||||
|
||||
5 ops hacks for sysadmins
|
||||
======
|
||||
Five tools to help you find the source of your users' IT problems when
|
||||
you don't know where to start.
|
||||
![Wratchet set tools][1]
|
||||
|
||||
As a sysadmin, every day I am faced with problems I need to solve quickly because there are users and managers who expect things to run smoothly. In a large environment like the one I manage, it's nearly impossible to know all of the systems and products from end to end, so I have to use creative techniques to find the source of the problems and (hopefully) come up with solutions.
|
||||
|
||||
This has been my daily experience for well over 20 years, and I love it! Coming to work each day, I never quite know what will happen. So, I have a few quick and dirty tricks that I default to when a problem lands on my lap, but I don't know where to start.
|
||||
|
||||
_BUT WAIT!_ Before you jump straight onto the command line, spend some time talking to your users. Yes, it can be tedious, but they will have some good information for you. Keep in mind that users probably don't have as much experience as you have, and you will need to do some interpreting of whatever they say. Try to get a clear picture of what _is_ happening and what _should be_ happening, then describe the fault to yourself in technical language. Be aware that most users don't read what is on the screen in front of them; it's sad but true. Make sure you and the user are reading all of the text to gather as much information as possible. Once you have that together, jump onto the command line with these five tools.
|
||||
|
||||
### Telnet
|
||||
|
||||
I am starting with a classic. [Telnet][2] was the predecessor to SSH, and, in the olden days, it was used on Unix systems to connect to a remote terminal just like SSH does, but it was not encrypted. Telnet has a very neat and invaluable trick for diagnosing network connectivity issues: you can Telnet into TCP ports that are not reserved for it. To do so, use Telnet like you normally would, but add the TCP port onto the end (**telnet localhost 80,** for instance) to connect to a web server. This enables you to check a server to see if a service is running or if a firewall is blocking it. So, without having the application client or even a login for the application, you can check if the TCP port is responding. If you know how, sometimes you can elicit a response from the server by manually typing into the Telnet prompt and checking the response. Web servers and mail servers are two examples where you can do this.
|
||||
|
||||
![Getting a response from a webserver with Telnet][3]
|
||||
|
||||
### Tcpdump
|
||||
|
||||
The [tcpdump][4] tool lets you inspect what data is being transmitted on the network. Most network protocols are fairly simple and, if you combine tcpdump with a tool like [Wireshark][5], you will have a nice, easy way to browse the traffic that you have captured. In the example below, I am inspecting packets in the bottom window and connecting to TCP port 3260 in the top.
|
||||
|
||||
![Inspecting packets in real time with tcpdump][6]
|
||||
|
||||
This screenshot shows a real-world use of Wireshark to look at the iSCSI protocol; in this case, I was able to identify that there was a problem with the way our QNAP network-attached storage was configured.
|
||||
|
||||
![Using Wireshark to inspect a TCP session][7]
|
||||
|
||||
### find
|
||||
|
||||
The [find][8] command is simply the best tool if you don't know where to start. In its most simple form, you can use it to "find" files. For example, if I wanted to do a recursive search through all directories and get a list of the conf files, I could enter:
|
||||
|
||||
|
||||
```
|
||||
`find . -name '*.conf'.`
|
||||
```
|
||||
|
||||
![find command output][9]
|
||||
|
||||
But one of find's hidden gems is that you can use it to execute a command against each item it finds. For example, if I wanted to get a long list of each file, I could enter:
|
||||
|
||||
|
||||
```
|
||||
`find . -name '*.conf' -exec ls -las {} \;`
|
||||
```
|
||||
|
||||
![find command output][10]
|
||||
|
||||
Once you know this technique, you can use it in all sorts of creative ways to find, search, and execute programs in specific ways.
|
||||
|
||||
### strace
|
||||
|
||||
I was introduced to the concept of [strace][11] on Solaris, where it is called truss. It is still as useful today as it was all those years ago. strace allows you to inspect what a process is doing as it runs in real time. Using it is simple; just use the command **ps -ef** and find the process ID that you are interested in. Start strace with **strace -p <pid>**; this will start printing out a whole lot of stuff, which at first looks like junk. But if you look closer, you will see text that you recognize, such as words like **OPEN** and **CLOSE** and filenames. This can lead you in the right direction if you are trying to figure out why a program is not working.
|
||||
|
||||
### grep
|
||||
|
||||
Leaving the best for last: [grep][12]. This tool is so useful and powerful that I have trouble coming up with a succinct way to describe it. Put simply, it's a search tool, but the way it searches is what makes it so powerful. In problem analysis, I typically grep over a bunch of logs to search for something. A companion command called zgrep does the same thing with zipped files. In the following example, I used **zgrep /var/log/* bancroft** to grep across all the log files to see what I have been up to on the system. I used zgrep because there are zipped files in the directory.
|
||||
|
||||
![grep command output][13]
|
||||
|
||||
Another great way to use grep is for piping the output of other tools into it; this way, it can be used as a filter of sorts. In the following example, I listed the auth file and grepped for my login to see what I have been doing by using **cat auth.log |grep bancroft**. This can also be written as **grep bancroft auth.log**, but I used the pipe (**|**) to demonstrate the point.
|
||||
|
||||
![grep command output][14]
|
||||
|
||||
### Other tools to consider
|
||||
|
||||
You can do a lot more with these tools, but I hope this brief introduction gives you a window into how to use them to solve the nasty problems that come your way. Another tool worth your attention is [Nmap][15], which I did not include because it is so comprehensive that it needs an entire article (or more) to explain it. Finally, I recommend learning some white hat and hacking techniques; they can be very beneficial when trying to get to the bottom of a problem because they can help you collect information that can be crucial in decision making.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/1/ops-hacks-sysadmins
|
||||
|
||||
作者:[Stephen Bancroft][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/stevereaver
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_osyearbook2016_sysadmin_cc.png?itok=Y1AHCKI4 (Wratchet set tools)
|
||||
[2]: https://en.wikipedia.org/wiki/Telnet
|
||||
[3]: https://opensource.com/sites/default/files/uploads/telnet_1.png (Getting a response from a webserver with Telnet)
|
||||
[4]: https://www.tcpdump.org/
|
||||
[5]: https://www.wireshark.org/
|
||||
[6]: https://opensource.com/sites/default/files/uploads/tcpdump_1.png (Inspecting packets in real time with tcpdump)
|
||||
[7]: https://opensource.com/sites/default/files/uploads/tcpdump_2.png (Using Wireshark to inspect a TCP session)
|
||||
[8]: https://en.wikipedia.org/wiki/Find_%28Unix%29
|
||||
[9]: https://opensource.com/sites/default/files/uploads/find_1_0.png (find command output)
|
||||
[10]: https://opensource.com/sites/default/files/uploads/find_2.png (find command output)
|
||||
[11]: https://strace.io/
|
||||
[12]: https://en.wikipedia.org/wiki/Grep
|
||||
[13]: https://opensource.com/sites/default/files/uploads/grep_1.png (grep command output)
|
||||
[14]: https://opensource.com/sites/default/files/uploads/grep_2.png (grep command output)
|
||||
[15]: https://nmap.org/
|
@ -1,136 +0,0 @@
|
||||
[#]: subject: "Revolt: An Open-Source Alternative to Discord"
|
||||
[#]: via: "https://itsfoss.com/revolt/"
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Revolt: An Open-Source Alternative to Discord
|
||||
======
|
||||
|
||||
_**Brief**: Revolt is a promising free and open-source choice to replace Discord. Here, we take a look at what it offers along with its initial impressions._
|
||||
|
||||
Discord is a feature-rich collaboration platform primarily tailored for gamers. Even though you can use Discord on Linux with no issues, it is still a proprietary solution.
|
||||
|
||||
You can choose to use [Element][1] as an open-source solution collaboration platform, but it is not a replacement.
|
||||
|
||||
But, Revolt is an impressive Discord alternative that is open-source.
|
||||
|
||||
Note
|
||||
|
||||
Revolt is in the public beta testing phase and does not offer any mobile applications. It may lack some essential features that you find on Discord.
|
||||
|
||||
Let me highlight what you can expect with Revolt and if it can be a replacement for Discord on Linux.
|
||||
|
||||
### An Open Source Discord Alternative That You Can Self-Host
|
||||
|
||||
![][2]
|
||||
|
||||
Revolt is not just a simple open-source replacement, but you also get the ability to self-host.
|
||||
|
||||
It does lack a variety of features that Discord offers, but you get a lot of basic functionalities to get a head start to start experimenting.
|
||||
|
||||
Even without some features, you could mention it as a feature-rich open-source client. Let us look at the features available right now.
|
||||
|
||||
### Features of Revolt
|
||||
|
||||
![][3]
|
||||
|
||||
While it looks and feels a lot like Discord already, here are some of the key highlights:
|
||||
|
||||
* Ability to create your own server
|
||||
* Create text channels and voice channels
|
||||
* Assign user roles in a server
|
||||
* Tweak the theme (dark/light)
|
||||
* Change the accent color
|
||||
* Manage the font and emoji packs from available options
|
||||
* Custom CSS support
|
||||
* Ability to add bots
|
||||
* Easy to manage permissions for text/voice channels
|
||||
* Send friend requests to other users
|
||||
* Saved notes section
|
||||
* Ability to control notifications
|
||||
* Hardware acceleration support
|
||||
* Dedicated desktop settings
|
||||
* Self-hosting using Docker
|
||||
* User status and custom status support
|
||||
|
||||
|
||||
|
||||
So, as something in the public beta testing phase, it sounds excellent for starters. You already get most of the core functionalities, but you may want to wait to see it as a full-fledged Discord replacement.
|
||||
|
||||
### Initial Impressions of Using Revolt
|
||||
|
||||
![][4]
|
||||
|
||||
If you have used Discord, the user experience will feel familiar. And that is a good thing here.
|
||||
|
||||
For this quick app highlight, I did not compare the resource usage of Discord and Revolt because it is still in beta and won’t be an apples-to-apples comparison.
|
||||
|
||||
However, in my brief testing, it felt snappy, except the case when you load up a text channel for the first time. When publishing this, it did not have the Two-Factor Authentication (2FA) feature but was supposed to be added in their first milestone (Version 1) release.
|
||||
|
||||
![][5]
|
||||
|
||||
Some features like user status, permission management, and appearance tweaks looked useful. But, when it comes to the voice channels, it is not the same way as Discord works, at least for now.
|
||||
|
||||
I have no idea if they plan to do it the same way, but Discord’s voice channel feature is intuitive, fast, and with better controls.
|
||||
|
||||
Not to forget, Discord also offers “Discord Stage,” which is a Clubhouse-like audio room feature.
|
||||
|
||||
Some other features that I couldn’t find included:
|
||||
|
||||
* Ability to react to messages
|
||||
* Noise suppression feature
|
||||
* Change server
|
||||
* Server logs
|
||||
* Variety of useful bots
|
||||
|
||||
|
||||
|
||||
Of course, it will take a significant amount of time to catch up with the features offered by Discord, but at least we now have an open-source solution to Discord.
|
||||
|
||||
You can explore their [project roadmap/release tracker][6] to see what you can expect in its final/future releases.
|
||||
|
||||
### Install Revolt in Linux
|
||||
|
||||
Revolt is available for Linux and Windows. You can choose to use it on your web browser without needing a separate application.
|
||||
|
||||
But, if you need to have it on your desktop, they offer an AppImage file and a deb package that you can grab from its [GitHub releases section][7].
|
||||
|
||||
If you’re new to Linux, refer to our resources on [using an AppImage file][8] and [installing deb packages][9] to get started.
|
||||
|
||||
Feel free to head to its [Feedback section][10] if you want to help them improve with your bug reports and suggestions. Also, you can explore their [GitHub page][11] for more information.
|
||||
|
||||
[Revolt][12]
|
||||
|
||||
What do you think about Revolt? Do you believe that it has the potential to become a good open-source replacement to Discord on Linux?
|
||||
|
||||
Let me know your thoughts in the comments down below!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/revolt/
|
||||
|
||||
作者:[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://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/element/
|
||||
[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/revolt-screenshot.png?resize=800%2C506&ssl=1
|
||||
[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/revolt-desktop-settings.png?resize=800%2C501&ssl=1
|
||||
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/revolt-screenshot1.png?resize=800%2C509&ssl=1
|
||||
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/revolt-appearance-setting.png?resize=800%2C524&ssl=1
|
||||
[6]: https://github.com/orgs/revoltchat/projects/2
|
||||
[7]: https://github.com/revoltchat/desktop/releases/tag/v1.0.2
|
||||
[8]: https://itsfoss.com/use-appimage-linux/
|
||||
[9]: https://itsfoss.com/install-deb-files-ubuntu/
|
||||
[10]: https://app.revolt.chat/settings/feedback
|
||||
[11]: https://github.com/revoltchat
|
||||
[12]: https://revolt.chat
|
@ -1,191 +0,0 @@
|
||||
[#]: subject: "10 holiday gift ideas for open source enthusiasts"
|
||||
[#]: via: "https://opensource.com/article/21/11/open-source-holiday-gifts"
|
||||
[#]: author: "Joshua Allen Holm https://opensource.com/users/holmja"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
10 holiday gift ideas for open source enthusiasts
|
||||
======
|
||||
From DIY projects to computers to books, this list provides gift
|
||||
suggestions that foster creativity, learning, and exploring.
|
||||
![Gift box opens with colors coming out][1]
|
||||
|
||||
Are you looking for cool gifts for people on your holiday shopping list or ideas for your own wishlist? If so, consider one of the ten suggestions below. Each of these gift suggestions connects in some way to the open source ethos. From DIY projects to computers to books, this list provides gift suggestions that foster creativity, learning, and exploring.
|
||||
|
||||
### System76 computer
|
||||
|
||||
![System76 Thelio][2]
|
||||
|
||||
(Source: [System76][3])
|
||||
|
||||
Does someone in your life need a new desktop, laptop, or server? [System76][4] should be one of the first places you should look. Looking for something light and mobile? The lightweight 14-inch [Lemur Pro][5] laptop is an excellent choice. Need a desktop with _a lot_ of processing power, RAM, and storage? One of the various [Thelio][3] desktops is what you are looking for. And there are plenty of other options in-between. Their computers come with either Ubuntu or Pop!_OS, which is the company's own Ubuntu-based Linux distribution, and have lifetime support. System76 is also in favor of [right-to-repair legislation][6]. While not the only vendor out there that sells Linux-powered computers, they are certainly one of the most popular.
|
||||
|
||||
**Prices Vary**
|
||||
|
||||
### Raspberry Pi 400 Personal Computer Kit
|
||||
|
||||
![Raspberry Pi 400 Kit][7]
|
||||
|
||||
(Source: [Raspberry Pi][8])
|
||||
|
||||
At this point, the Raspberry Pi brand needs little introduction. Since the first Raspberry Pi model took the world by storm in 2012, the Raspberry Pi has remained one of the most popular single-board computers for use in education and by hobbyists and tinkerers. The [Raspberry Pi 400 Personal Computer Kit][8] continues this trend. This kit contains everything someone needs to get started, except a monitor. For US$ 100.00, you get the Raspberry Pi 400 (a variant of the Raspberry Pi 4 series built into a keyboard casing), a mouse, power supply, micro HDMI-to-HDMI cable, an SD card preloaded with Raspberry Pi OS, and a copy of the Raspberry Pi Beginner's Guide. While not the most powerful computer in the world, the Raspberry Pi 400 is more than capable of functioning as a decent starting computer for the children on your shopping list.
|
||||
|
||||
**Price: US$ 100.00**
|
||||
|
||||
### Raspberry Pi Build HAT
|
||||
|
||||
![Raspberry Pi Build HAT][9]
|
||||
|
||||
(Source: [Raspberry Pi][10])
|
||||
|
||||
One of the many benefits of the Raspberry Pi is its ability to be expanded with various add-on boards. A recently introduced add-on board, the [Raspberry Pi Build HAT][10], makes it possible to use the Raspberry Pi to control up to four LEGO Technic motors or sensors from the [LEGO Education SPIKE][11] product line. The Build HAT works with any Raspberry Pi with a 40-pin GPIO header. You code projects using a specially developed Python library. The Build HAT can power itself, the Raspberry Pi board, and the LEGO motors and sensors using an external 8V DC power source (like the [official Built HAT power supply][12]) or a 7.5V battery pack.
|
||||
|
||||
**Price: US$ 25.00 (plus the cost of the parts and accessories needed for a project)**
|
||||
|
||||
### CrowPi2
|
||||
|
||||
![CrowPi][13]
|
||||
|
||||
(Source: [CrowPi][14])
|
||||
|
||||
The [CrowPi2][14] is a collection of STEM learning projects built into a laptop-style case powered by a Raspberry Pi. The CrowPi2 kit comes in three sizes: Basic, Advanced, and Deluxe. The Basic kit comes with a few accessories but does not come with a Raspberry Pi. The Advanced kit comes with a Raspberry Pi 4B with 4GB of RAM and a larger selection of accessories than the Basic kit. The Deluxe Kit comes with the largest selection of accessories and a Raspberry Pi 4B with 8GB of RAM. All three kits are available in Space Gray or Silver. An optional power bank can provide the CrowPi2 with power when not plugged into an electrical outlet. If you want to learn more about the CrowPi2, you can read [Opensource.com's review of the CrowPi2][15] by Seth Kenlon.
|
||||
|
||||
**Basic Kit: US$ 339.99**
|
||||
**Advanced Kit: US$ 469.99 **
|
||||
**Deluxe Kit: US$ 529.99**
|
||||
**Optional Power Bank: US$ 19.00**
|
||||
|
||||
### Keebio Quefrency keyboard
|
||||
|
||||
Recommendation by John Hall
|
||||
|
||||
![Keebio Quefrency Keyboard][16]
|
||||
|
||||
(Source: [Keeb.io][17])
|
||||
|
||||
The [Keebio Quefrency keyboard][17] would make a great holiday gift for anyone who wants to build their own keyboard! It is a 65% keyboard, which is probably the smallest most people would be willing to go since it has Home, PgUp, PgDn, and arrow keys. It is a split ergonomic keyboard, but you can put the halves back together if you have difficulty adjusting to the split. Best of all, the latest revision of the Quefrency has hot-swap sockets, so you can build it without needing to solder anything.
|
||||
|
||||
Here is an inexpensive Quefrency keyboard build:
|
||||
|
||||
* [Quefrency rev4 PCBs][18] with hot-swap sockets, plus FR4 Plates (left with no macros, right 65%)
|
||||
* $80 + $28 US
|
||||
* [2u stabilizers (5)][19]
|
||||
* $10 US
|
||||
* [Key switches (70)][20]
|
||||
* $16 US
|
||||
* [Keycaps][21]
|
||||
* $ 45 US
|
||||
* [2.25u G20 left spacebar][22] and [2.75u G20 right spacebar][23]
|
||||
* $8 + $8 US
|
||||
* [USB C to USB C keyboard connector][24]
|
||||
* $4 US
|
||||
* **Total US$ 199** (not including shipping)
|
||||
|
||||
|
||||
|
||||
As noted in the parts list, the Keebio Quefrency rev4 needs five stabilizers:
|
||||
|
||||
1. Left Shift
|
||||
2. Left Space
|
||||
3. Right Space
|
||||
4. Enter
|
||||
5. Backspace
|
||||
|
||||
|
||||
|
||||
The Keebio Quefrency rev4 is intended to be built as a 65% keyboard, which has a shortened right shift key that does not need a stabilizer. Many keycap sets, even relatively inexpensive sets like Artifact Bloom and Glorious GPBT, include a shortened right shift key that fits most keyboards like this one. The hard part is finding matching split spacebar keycaps. But you can buy spacebar keycaps from places like Pimp My Keyboard, which work great. Unfortunately, it is nearly impossible to get matching colors from different manufacturers. Even if you pick white keycaps and white spacebars, one of them is likely to be grayer than the other. Why not celebrate the difference instead? Try pairing white and gray keycaps with red or blue spacebars.
|
||||
|
||||
### Petoi Nybble Open Source Robotic Cat
|
||||
|
||||
![Petoi Nybble][25]
|
||||
|
||||
(Source: [Petoi][26])
|
||||
|
||||
The [Petoi Nybble Open Source Robotic Cat][26] is a kit for building a robotic pet cat. The kit comes with everything needed to build the project, but batteries are not included. The Nybble requires two 14500 lithium ion rechargeable 3.7V batteries, which provide about 45 minutes of playtime. Once assembled, the cat can be programmed/controlled using the Arduino IDE, a Python API, or an Android/iOS app. Check out the [Nybble User Manual][27] for more details.
|
||||
|
||||
**Price: US$ 249.00 USD**
|
||||
|
||||
### The Expanse Novel Series
|
||||
|
||||
![The Expanse books][28]
|
||||
|
||||
(Source: [The Expanse Books][29])
|
||||
|
||||
The final novel in [The Expanse][29] series by James S.A. Corey comes out just in time for the holiday gift-giving season. Set to release on November 30, [Leviathan Falls][30] will conclude the main narrative of this epic nine-book science fiction series that explorers humanity's future in space. In order, the nine books in the series are Leviathan Wakes, Caliban's War, Abaddon's Gate, Cibola Burn, Nemesis Games, Babylon's Ashes, Persepolis Rising, Tiamat's Wrath, and Leviathan Falls. There will also be a collection of short stories and novellas published next year. Most of these stories and novellas are already available in eBook format, but the collection will be the first time they are available in print. Buy the science fiction reader in your life the first book of the series to get them started, or buy them the entire series.
|
||||
|
||||
**Books 1 through 6: US$ 17.99 (Trade Paperback)**
|
||||
**Books 7 and 8: US$ 18.99 (Trade Paperback)**
|
||||
**Book 9: US$ 30.00 (Hardcover)**
|
||||
|
||||
### Books
|
||||
|
||||
If you are looking for book recommendations and the recommendation for The Expanse does not meet your needs, consider the books from [Opensource.com's 2021 Summer Reading List][31]. This list contains eight book recommendations for a variety of reading tastes. From a modern translation of Beowulf to non-fiction books about technology, there should be something there for the reader in your life. If the 2021 Summer Reading List does not have what you are looking for, the article also contains links to all of Opensource.com's previous summer reading lists, which provides ten more lists of suggestions.
|
||||
|
||||
**Prices Vary**
|
||||
|
||||
### Stickers
|
||||
|
||||
![Ultimate sticker pack][32]
|
||||
|
||||
(Source: [Sticker Mule][33])
|
||||
|
||||
One of the drawbacks of virtual conferences during the pandemic is that you cannot walk away from the conference with a collection of stickers from various vendor booths. For those who love decorating their laptops with stickers, this could mean that their latest laptop is currently unadorned with the usual decorations. If this sounds like someone in your life, consider buying them a [Unixstickers pack][33] from Sticker Mule. The packs come in three different sizes: Pro, which contains ten stickers; Elite, which contains all the stickers from the Pro pack plus ten more stickers; and Ultimate, which contains everything in the Elite pack plus an additional ten stickers. The stickers cover many open source projects making these bundles the next best thing to visiting vendor booths and the sticker swap table at an in-person conference.
|
||||
|
||||
**Pro pack: US$ 1.00**
|
||||
**Elite pack: US$ 19.00**
|
||||
**Ultimate pack: US$ 24.00**
|
||||
|
||||
### Charitable donation to an open source organization
|
||||
|
||||
If the person on your shopping list already has everything (or does not want any tangible gifts), consider making a charitable donation to an open source project in their name. Opensource.com's list of [open source organizations][34] has plenty of organizations you can select from. You, the person whose name the donation was made in, and the organization that received your donation can all be content in knowing that your gift has helped make open source better.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/11/open-source-holiday-gifts
|
||||
|
||||
作者:[Joshua Allen Holm][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/holmja
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_gift_giveaway_box_520x292.png?itok=w1YQhNH1 (Gift box opens with colors coming out)
|
||||
[2]: https://opensource.com/sites/default/files/styles/medium/public/uploads/system76_thelio.png?itok=E6HBZoMA (System76 Thelio)
|
||||
[3]: https://system76.com/desktops/
|
||||
[4]: https://system76.com
|
||||
[5]: https://system76.com/laptops/lemur
|
||||
[6]: https://blog.system76.com/post/646726872371200000/carl-testimony-hb21-1199mp3
|
||||
[7]: https://opensource.com/sites/default/files/styles/medium/public/uploads/raspberry_pi_400_kit.jpg?itok=AnVA_OP9 (Raspberry Pi 400 Kit)
|
||||
[8]: https://www.raspberrypi.com/products/raspberry-pi-400/
|
||||
[9]: https://opensource.com/sites/default/files/styles/medium/public/uploads/raspberry_pi_build_hat.png?itok=8YVyNM-c (Raspberry Pi Build HAT)
|
||||
[10]: https://www.raspberrypi.com/products/build-hat/
|
||||
[11]: https://education.lego.com/
|
||||
[12]: https://www.raspberrypi.com/products/build-hat-power-supply/
|
||||
[13]: https://opensource.com/sites/default/files/styles/medium/public/uploads/crowpi2.png?itok=hJDaPaaz (CrowPi)
|
||||
[14]: https://www.crowpi.cc/
|
||||
[15]: https://opensource.com/article/21/9/raspberry-pi-crowpi2
|
||||
[16]: https://opensource.com/sites/default/files/styles/medium/public/uploads/keebio_quefrency_keyboard_pcb.png?itok=M0JVlcRK (Keebio Quefrency Keyboard)
|
||||
[17]: https://keeb.io/collections/quefrency-split-staggered-65-keyboard
|
||||
[18]: https://keeb.io/collections/quefrency-split-staggered-65-keyboard/products/quefrency-rev-4-65-split-staggered-keyboard
|
||||
[19]: https://keeb.io/collections/diy-parts/products/cherry-mx-stabilizer?variant=43449871046
|
||||
[20]: https://divinikey.com/collections/linear-switches/products/gateron-milky-yellow-linear-switches?variant=32193385201729
|
||||
[21]: https://drop.com/buy/artifact-bloom-series-keycap-set-vintage
|
||||
[22]: https://pimpmykeyboard.com/g20-2-25-space-pack-of-4/
|
||||
[23]: https://pimpmykeyboard.com/g20-2-75-space-pack-of-4/
|
||||
[24]: https://keeb.io/products/usb-c-to-usb-c-cable?variant=32313985728606
|
||||
[25]: https://opensource.com/sites/default/files/styles/medium/public/uploads/petoi_nybble_open_source_robotic_cat.png?itok=zhvvBReE (Petoi Nybble)
|
||||
[26]: https://www.petoi.com/pages/petoi-nybble-overview
|
||||
[27]: https://nybble.petoi.com/
|
||||
[28]: https://opensource.com/sites/default/files/styles/medium/public/uploads/the_expanse_books.jpg?itok=FkuizWic (The Expanse books)
|
||||
[29]: https://www.jamessacorey.com/writing-type/books/
|
||||
[30]: https://www.jamessacorey.com/books/leviathan-falls/
|
||||
[31]: https://opensource.com/article/21/6/2021-opensourcecom-summer-reading-list
|
||||
[32]: https://opensource.com/sites/default/files/uploads/ultimate_sticker_pack.png (Ultimate sticker pack)
|
||||
[33]: https://www.stickermule.com/unixstickers
|
||||
[34]: https://opensource.com/resources/organizations
|
@ -1,175 +0,0 @@
|
||||
[#]: subject: "Brave vs. Google Chrome: Which is the better browser for you?"
|
||||
[#]: via: "https://itsfoss.com/brave-vs-chrome/"
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Brave vs. Google Chrome: Which is the better browser for you?
|
||||
======
|
||||
|
||||
Google Chrome is undoubtedly one of the [best web browsers available for Linux][1]. It offers a good blend of user experience and feature set for many, regardless of what platform you use it on.
|
||||
|
||||
On the other hand, Brave is popular as a privacy-focused open-source option available cross-platform.
|
||||
|
||||
So, what should you pick as your primary web browser? Is Chrome for you? Who should use Brave?
|
||||
|
||||
Here, we compare all the important aspects (including benchmarks) on both browsers to help you decide.
|
||||
|
||||
### User Interface
|
||||
|
||||
![][2]
|
||||
|
||||
[Google Chrome][3] provides a clean user interface without unnecessary distractions out of the box.
|
||||
|
||||
By default, it blends in with the system theme on Linux (GTK), as per my experience. So, it might look a bit different as per your customizations.
|
||||
|
||||
![][4]
|
||||
|
||||
If you are not using it on Linux, everything else should look similar except the color scheme.
|
||||
|
||||
When it comes to [Brave][5], it does not adapt to your system color scheme out of the box. But, you can head to the Appearance settings and enable the GTK theme if you prefer.
|
||||
|
||||
Brave gets close to the Chrome user interface, with some unique tweaks/options to access.
|
||||
|
||||
![][6]
|
||||
|
||||
You can’t go wrong with either, considering the user interface. They’re both easy to navigate.
|
||||
|
||||
However, Brave provides a few extra options to customize the appearance, like removing the tab search button (left to the minimize button), showing the full URL, etc.
|
||||
|
||||
![][7]
|
||||
|
||||
If you find this helpful, Brave is your friend. With Google Chrome, you do not get a lot of control in terms of UI customization.
|
||||
|
||||
### Open Source vs. Proprietary
|
||||
|
||||
![][8]
|
||||
|
||||
Brave is an open-source web browser based on Chromium. We also have a list of [open-source browsers not based on Chromium][9], if you are curious.
|
||||
|
||||
Google Chrome is also based on Chromium, but it adds several proprietary elements, making it a closed source offering.
|
||||
|
||||
While you can expect the benefits of open-source software and transparency with Brave, Google can be quite fast when patching issues considering they have a dedicated security team.
|
||||
|
||||
None of these should be noticeable for an average user. But, if you prefer open-source and software that believes in transparency, Brave should be the pick. In either case, if you have no issues with proprietary code and trust Google with their products, Google Chrome can be a choice.
|
||||
|
||||
If you want an open-source browser with a similar UI to Chrome, you may want to check our comparison between [Chrome vs Chromium][10] to pick one.
|
||||
|
||||
### Feature Differences
|
||||
|
||||
You should find all the essential functionalities on both the browsers, with similar behavior.
|
||||
|
||||
However, there are some notable differences between the two.
|
||||
|
||||
As mentioned above, you will notice differences in the ability to customize the look and feel.
|
||||
|
||||
There is also a big difference in the ability to sync browser data between multiple devices.
|
||||
|
||||
![][11]
|
||||
|
||||
With Google Chrome, you can quickly sign in to your Google account and sync everything to your phone and other devices.
|
||||
|
||||
Brave also lets you sync, but it could be inconvenient for some. You will need access to one of your devices, where you use Brave to sync successfully.
|
||||
|
||||
Your sync data is not stored in the cloud. So, you will have to authorize using a QR code or a secret phrase to transfer/sync browsing data to another device.
|
||||
|
||||
![][12]
|
||||
|
||||
Hence, you must export the bookmarks and other associated data for external backup.
|
||||
|
||||
Thankfully, there’s an alternative if you want the convenience of sync and an open-source browser. Head to our [Firefox vs Brave comparison][13] article to know why that can be a good pick for you.
|
||||
|
||||
In addition to these differences, Brave offers support [IPFS protocol][14], which is a peer-to-peer secure protocol aimed to fight against censorship.
|
||||
|
||||
Not to forget, Brave comes with [Brave Search][15] as its search engine by default. So, if you prefer it over Google as a [private search engine][16], that’s a good thing as well.
|
||||
|
||||
Brave Rewards is also an interesting addition, where you earn rewards for enabling Brave’s privacy-friendly ads and can contribute them back to websites you frequently visit.
|
||||
|
||||
You can share resources using it directly to the recipient if cloud storage services or any online platform normally blocks it.
|
||||
|
||||
Overall, Brave offers numerous interesting things. But, Google Chrome is a simpler alternative that can be a convenient option for many.
|
||||
|
||||
### The Privacy Angle
|
||||
|
||||
The presence of tracking protection on Brave should be good for privacy enthusiasts. You can block ads and trackers using the Shield feature. In addition to that, you also get several filters available to toggle if you want aggressive blocking (which might result in broken websites).
|
||||
|
||||
Google Chrome does not offer this feature. But, you can always use some privacy-focused chrome extensions, and Google’s Safe Browsing feature should keep you safe from malicious websites.
|
||||
|
||||
Generally speaking, if you do not visit shady websites, you should be OK with Google Chrome. And, if you are a privacy enthusiast, Brave can be a better choice.
|
||||
|
||||
### Performance
|
||||
|
||||
While Brave is usually considered the fastest, it didn’t seem to be the case in my benchmark tests. That’s a surprise!
|
||||
|
||||
However, the real-world difference should not be noticeable for most.
|
||||
|
||||
![][17]
|
||||
|
||||
I used the popular benchmark tests: [JetStream 2][18], [Speedometer 2.0][19], and [Basemark Web 3.0][20].
|
||||
|
||||
Note that the Linux distribution used is **Pop!_OS 21.10**, and the browser versions tested were **Chrome 97.0.4692.71** and **Brave 97.0.4692.71**.
|
||||
|
||||
To give you an idea, I had nothing running in the background, except the browser on my PC powered by **Intel i5-11600k @4.7 GHz, 32 GB 3200 MHz RAM, and 1050ti Nvidia Graphics**.
|
||||
|
||||
### Installation
|
||||
|
||||
![][21]
|
||||
|
||||
Google Chrome provides DEB/RPM packages to download and install on Ubuntu, Debian, Fedora, or openSUSE.
|
||||
|
||||
Brave also supports the same Linux distributions, but you will have to use the terminal and follow the commands mentioned in their download page to get it installed.
|
||||
|
||||
![][22]
|
||||
|
||||
You can follow our installation guide to [install Brave in Fedora][23].
|
||||
|
||||
None of them are available in the software center. Also, you do not get any [Flatpak package][24] or snaps.
|
||||
|
||||
If you want something directly from the software center, a flatpak package, or a snap, Firefox is your friend.
|
||||
|
||||
### What Should You Pick?
|
||||
|
||||
If you want more customizations and advanced features, Brave should be an impressive choice. But, if you do not have a problem using a proprietary browser on your Linux distro and want slightly better performance, Google Chrome is a viable choice.
|
||||
|
||||
For privacy-focused users, the answer is obvious. But, you do have to think about the convenience of sync. So, if you are confused about your priorities, I encourage you to evaluate your requirements and decide what you want.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/brave-vs-chrome/
|
||||
|
||||
作者:[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://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/best-browsers-ubuntu-linux/
|
||||
[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2022/01/chrome-brave-ui.png?resize=800%2C435&ssl=1
|
||||
[3]: https://www.google.com/chrome/index.html
|
||||
[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2022/01/google-chrome-ui.png?resize=800%2C479&ssl=1
|
||||
[5]: https://brave.com
|
||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-browser-ui.png?resize=800%2C479&ssl=1
|
||||
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-appearance-options.png?resize=800%2C563&ssl=1
|
||||
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/open-source-proprietary.png?resize=800%2C450&ssl=1
|
||||
[9]: https://itsfoss.com/open-source-browsers-linux/
|
||||
[10]: https://itsfoss.com/chrome-vs-chromium/
|
||||
[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/google-chrome-sync.png?resize=800%2C555&ssl=1
|
||||
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/brave-sync.png?resize=800%2C383&ssl=1
|
||||
[13]: https://itsfoss.com/brave-vs-firefox/
|
||||
[14]: https://ipfs.io
|
||||
[15]: https://itsfoss.com/brave-search-features/
|
||||
[16]: https://itsfoss.com/privacy-search-engines/
|
||||
[17]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/chrome-brave-benchmarks.png?resize=800%2C450&ssl=1
|
||||
[18]: https://webkit.org/blog/8685/introducing-the-jetstream-2-benchmark-suite/
|
||||
[19]: https://webkit.org/blog/8063/speedometer-2-0-a-benchmark-for-modern-web-app-responsiveness/
|
||||
[20]: https://web.basemark.com
|
||||
[21]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/google-chrome-package.png?resize=800%2C561&ssl=1
|
||||
[22]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-install-linux.png?resize=800%2C325&ssl=1
|
||||
[23]: https://itsfoss.com/install-brave-browser-fedora/
|
||||
[24]: https://itsfoss.com/what-is-flatpak/
|
@ -1,112 +0,0 @@
|
||||
[#]: subject: "How to build an open source metaverse"
|
||||
[#]: via: "https://opensource.com/article/22/1/open-source-metaverse"
|
||||
[#]: author: "Josip Almasi https://opensource.com/users/jalmasi"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to build an open source metaverse
|
||||
======
|
||||
The world of open source is a prime place to build a metaverse.
|
||||
![new techie gadgets representing innovation][1]
|
||||
|
||||
If I told you that all content and software you need to build the metaverse is already available and completely free, would you do it?
|
||||
|
||||
Hold that thought, and let's take a step back and explain the metaverse.
|
||||
|
||||
### What is the metaverse anyway?
|
||||
|
||||
Cyberpunk authors of the 20th century like Gibson and Stephenson imagined virtual reality-enabled internet, and in his novel _Snow Crash_, Stephenson called it Metaverse. With the growing availability of virtual reality (VR) devices and apps, Metaverse became a buzzword, especially since Mark Zuckerberg announced employing 10,000 workers to build it and changed the Facebook company name to Meta. Matthew Ball wrote a [serious analysis][2] of the topic that ends with the conclusion—Building together: "And in truth, it's most likely the Metaverse emerges from a network of different platforms, bodies, and technologies working together (however reluctantly) and embracing interoperability."
|
||||
|
||||
Interoperability. The word itself implicitly but clearly, points out how open source and open standards fit in the picture.
|
||||
|
||||
So, in short, it's about VR-enabled internet.
|
||||
|
||||
### How can an open source metaverse be built?
|
||||
|
||||
Like web servers on the internet, you need VR servers. But worry not, I wrote one, and [an article about it][3] was published right here about a year ago. Then, of course, you need VR-enabled web browsers, but web browsers already do support video/audio streaming (WebRTC) and VR and AR both (WebXR). Furthermore, you need a bunch of 3D content, preferably in open source standard glTF format. And luckily, [Sketchfab][4] hosts 500,000+ free 3D models, published under Creative Commons licenses by a huge number of authors. Sketchfab isn't the only company doing that, but they provide REST API to search and download any of these models.
|
||||
|
||||
### Don't forget the keyboard
|
||||
|
||||
Being in VR for quite a while now, I can tell you first hand what I miss the most: The keyboard! I write code on the keyboard, but it disappears when I put on my VR goggles. You can imagine how disruptive taking VR gear off and on is. And not just that, I need to see my code in VR. And then why stop there? Why wouldn't I see every application in VR? Many people are using two or more displays. In VR, arrange windows wherever you look. That's better than any number of screens. And once that happens, you'll be able to talk metaverse for real.
|
||||
|
||||
Truth be told, VR devices are still in their infancy, and there are undoubtedly many more functions missing. But VR devices will improve and eventually include keyboards, better cameras, and the ability to overlay virtual over real. In the meantime, we'll keep taking our goggles on and off and deal with other obstacles in other ways.
|
||||
|
||||
### So what am I waiting for?
|
||||
|
||||
You don't need to wait. People are working on it, enthusiasts and companies alike. And you can start building your virtual worlds on the web right now. The video below explains how to make virtual worlds using available free models.
|
||||
|
||||
Under the hood, the VRSpace web client uses Babylon.js, an open source JavaScript WebGL library to load glTF content and render with WebGL. It calls the search function of the Sketchfab REST API (server owner must have an account there). Once you click on a model, it asks the VRSpace server to fetch it. The server downloads it (only if it didn't do so earlier) and delivers it to the client. Everything that happens in the space is broadcast (multi-casted over WebSockets, actually) to all connected users, so they all see the same movement and resizing of objects. And sure, they can chat, either with text messages or voice. And by clicking on the VR goggles button in the bottom-right corner, the user instantly enters VR. Users can also share screens, though not in this space.
|
||||
|
||||
And this is all done using only existing standard web technologies and free software and content. It's not only available on PC and VR devices, but also on mobile devices. However, mobile Chrome doesn't come with VR functions enabled. It prompts for download of Google VR on the first attempt to enter VR.
|
||||
|
||||
As it's all open, this is as interoperable as it gets for the time being. But it's not nearly interoperable enough for the massive scale required for metaverse—the VR-enabled internet. Take avatars, for example. I use the same image for my avatar on LinkedIn, Facebook, as well as on Opensource.com. How can I upload my 3D avatar to VRSpace or elsewhere?
|
||||
|
||||
Well, I can't. Upload itself is not a problem. Of course, neither is the file format (glTF). Issues arise from the avatar structure, as it's not standardized. So, for example, different characters have a different number of bones. Then, must-have features that are supposed to be trivial, like holding something in your virtual hand, become extremely complicated. I have analyzed 100+ free characters and published my findings as a research paper: [Towards Automatic Skeleton Recognition of Humanoid 3D Character][5]—hopefully, it can help other authors with interoperability.
|
||||
|
||||
And that's just the beginning, the very first thing we need to do to enter a shared virtual world.
|
||||
|
||||
![Free avatars at VRSpace][6]
|
||||
|
||||
(Josip Almasi, [CC BY-SA 4.0][7])
|
||||
|
||||
### Intellectual property
|
||||
|
||||
What about intellectual property? What about it, you might say, it's all open source! Well, it is. Authors are so kind to let others use their creations. The least users can do is to give them credits. The actual terms of the Creative Commons licenses require users to credit authors explicitly. To that end, I've taken special care to display the author's name in the search results, and the author information is embedded in the metadata section of each glTF file. But even with free stuff that requires additional work, I can't imagine what nightmare it turns into with proprietary content.
|
||||
|
||||
### Non-Fungible Tokens and Blockchain Ledgers
|
||||
|
||||
On second thought, I can imagine that. It requires Non-Fungible Tokens, Blockchain Ledgers, and whatnot. Quick googling _Metaverse Blockchain_ offers me _excellent buy opportunities_ and advises the _best buy options_. Well, I'm not buying. Mark my words: Folks trying to sell cryptos aren't going to build the metaverse.
|
||||
|
||||
That's not to say that blockchain can't be helpful here, as even with free content, you have to keep track of authors. With hundreds of thousands of free models, this has to be automated somehow, and distributed ledger may be just the right solution.
|
||||
|
||||
Then again, digital content providers like Sketchfab do not provide only free models, they sell content. That's how they make a living, after all. Technically speaking, all you need to do to use this proprietary content in your virtual worlds is change one _true_ to _false_ in the code—literally. But once you download it, nobody can prevent you from sharing it. Yet, legally, the license forbids you to do so. Non-Fungible Tokens can prove ownership, be bought, sold, but can't enforce copyright. Content providers will figure it out eventually, but it's not them I'm worried about. This has practical implications for ordinary users, related to one specific question I have been asked repeatedly: Can I make/buy my own avatar that will be only mine and can't get used by anybody else? Well, you can, but technology can't prevent anybody from copying it. Just like I can copy your avatar picture from, say, LinkedIn, and use it as my picture on, say, Facebook. But think of it this way: Why would anyone want to do that?
|
||||
|
||||
Funny though, I've had one commercial implementation of VRSpace: A 3D multi-user video and audio streaming website powered by free software, serving proprietary content. Behind the locked door, pay to enter—as simple as that. And it doesn't get in the way of building the metaverse. Yet everyone has their own unique avatars that can't be used by anybody else ever: Video avatars.
|
||||
|
||||
![Author's video avatar in VRSpace][8]
|
||||
|
||||
(Josip Almasi, [CC BY-SA 4.0][7])
|
||||
|
||||
You want to be you and nobody else. Just click on the video button, as simple as that. Of course, the browser will prompt for your permission to stream your video and audio. This feature is so widely used in daily life that we don't really associate it with metaverse, and the cyberpunk authors did not envision it. In time, this _me being me_ approach will evolve into motion tracking and video stream mapping onto our 3D avatars, but it will remain in the domain of expensive movies and video games for a while.
|
||||
|
||||
By now, you have glanced at all the features of the VRSpace server, except Oauth2 authentication. You know how it works anyway. A website redirects you to another one of your choosing, where you log in and then get back authenticated. This is all of the above in a simplified diagram:
|
||||
|
||||
![VR components diagram][9]
|
||||
|
||||
(Josip Almasi, [CC BY-SA 4.0][7])
|
||||
|
||||
### Live demo
|
||||
|
||||
A live demo is available at [VRSpace][10][.org][10] at all times, running the latest code, and you are welcome to try it any time. It's completely anonymous, without ads and trackers of any kind. Try building your world in VRCraft world, but know that everything you do will disappear once you disconnect—the price of running an anonymous service open to the public. The home page provides all the relevant information, just follow the links, or join the project on [GitHub][11], [YouTube][12], or [Facebook][13].
|
||||
|
||||
Big thanks to early adopters for their help in bringing the project to this stage—all the authors for their free models, Sketchfab for providing access, and the Babylon.js community that makes it all just work across platforms.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/1/open-source-metaverse
|
||||
|
||||
作者:[Josip Almasi][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/jalmasi
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/innovation_virtual_gadgets_device_drone.png?itok=JTAgRb-1 (new techie gadgets representing innovation)
|
||||
[2]: https://www.matthewball.vc/all/themetaverse
|
||||
[3]: https://opensource.com/article/20/12/virtual-reality-server
|
||||
[4]: https://sketchfab.com/
|
||||
[5]: https://www.researchgate.net/publication/356987355_TOWARDS_AUTOMATIC_SKELETON_RECOGNITION_OF_HUMANOID_3D_CHARACTER
|
||||
[6]: https://opensource.com/sites/default/files/uploads/free-avatars-at-vrspace.png (Free avatars at VRSpace)
|
||||
[7]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[8]: https://opensource.com/sites/default/files/uploads/author-in-vrspace.png (Author's video avatar in VRSpace)
|
||||
[9]: https://opensource.com/sites/default/files/uploads/vr-components-diagram.png (VR components diagram)
|
||||
[10]: https://www.vrspace.org/
|
||||
[11]: https://github.com/jalmasi/vrspace
|
||||
[12]: https://www.youtube.com/channel/UCLdSg22i9MZ3u7ityj_PBxw
|
||||
[13]: https://www.facebook.com/vrspace.org
|
@ -2,7 +2,7 @@
|
||||
[#]: via: "https://opensource.com/article/22/1/word-game-linux-command-line"
|
||||
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
@ -1,164 +0,0 @@
|
||||
[#]: subject: "Record your terminal session with Asciinema"
|
||||
[#]: via: "https://opensource.com/article/22/1/record-terminal-session-asciinema"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Record your terminal session with Asciinema
|
||||
======
|
||||
Show don't tell with Asciinema, an open source terminal session
|
||||
recorder.
|
||||
![4 different color terminal windows with code][1]
|
||||
|
||||
Support calls are important and often satisfying in the end, but the act of clear communication can be arduous for everyone involved. If you've ever been on a support call, you've probably spent several minutes spelling out even the shortest commands and explaining in detail where the spaces and returns fall. While it's often easier to just seize control of a user's computer, that's not really the best way to educate. What you might try instead is sending a user a screen recording, but one that they can copy commands from and paste into their own terminal.
|
||||
|
||||
Asciinema is an open source terminal session recorder. Similar to the `script` and `scriptreplay` commands, Asciinema records exactly what your terminal displays. It saves your "movie" recording to a text file and then replays it on demand. You can upload your movie to Asciinema.org and share them just as you would any other video on the internet, and you can even embed your movie into a webpage.
|
||||
|
||||
### Install Asciinema
|
||||
|
||||
On Linux, you can install Asciinema using your package manager.
|
||||
|
||||
On Fedora, CentOS, Mageia, or similar:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo dnf install asciinema`
|
||||
```
|
||||
|
||||
On Debian, Linux Mint, or similar:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo apt install asciinema`
|
||||
```
|
||||
|
||||
On macOS, you can install using Homebrew:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo brew install asciinema`
|
||||
```
|
||||
|
||||
On BSD and any other platform using [Pkgsrc][2]:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
$ cd /usr/pkgsrc/misc/py-asciinema
|
||||
|
||||
$ sudo bmake install clean
|
||||
|
||||
```
|
||||
|
||||
### Making movies out of text
|
||||
|
||||
To start recording with Asciinema, you use the `rec` subcommand:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
$ asciinema rec mymovie.cast
|
||||
|
||||
asciinema: recording asciicast to mymovie.cast
|
||||
|
||||
asciinema: press <ctrl-d> or type "exit" when you're done
|
||||
|
||||
```
|
||||
|
||||
Some friendly output alerts you that you're recording, and it tells you how to stop: Press **Ctrl+D** or just type `exit`.
|
||||
|
||||
Everything you do in your terminal while Asciinema is active gets recorded. This includes input, output, errors, awkward pauses, mistakes, or successes. If you see it in your terminal during recording, it makes the cut.
|
||||
|
||||
When you're finished demonstrating how the terminal works, press **Ctrl+D** or type `exit` to stop the recording.
|
||||
|
||||
In this example, the resulting file, `mymovie.cast` is a collection of timestamps and actions that serve as a script (in the sense of a movie script) for the playback mechanism.
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
{"version": 2, "width": 139, "height": 36, "timestamp": 1641457358, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}}
|
||||
|
||||
[0.05351, "o", "\u001b]0;seth:~\u0007"]
|
||||
|
||||
[0.05393, "o", "\u001b[1;31m$ \u001b[00m"]
|
||||
|
||||
[1.380059, "o", "e"]
|
||||
|
||||
[1.443823, "o", "c"]
|
||||
|
||||
[1.514674, "o", "h"]
|
||||
|
||||
[1.595238, "o", "o"]
|
||||
|
||||
[1.789562, "o", " "]
|
||||
|
||||
[2.09658, "o", "\""]
|
||||
|
||||
[2.19683, "o", "h"]
|
||||
|
||||
[2.403994, "o", "e"]
|
||||
|
||||
[2.466784, "o", "l"]
|
||||
|
||||
[2.711183, "o", "lo"]
|
||||
|
||||
[3.120852, "o", "\""]
|
||||
|
||||
[3.427886, "o", "\r\nhello\r\n"]
|
||||
|
||||
[...]
|
||||
|
||||
```
|
||||
|
||||
If you've made a mistake, you can cut the mistake by removing the lines recreating the error. Should you find yourself making lots of edits or belaboring long pauses during the recording, you can install and use the [asciinema-edit][3] utility, which can trim out blocks of "footage" by timestamps of your definition, or by eliminating idle time.
|
||||
|
||||
### Playing an Asciinema movie
|
||||
|
||||
You can playback your Asciinema using the `play` subcommand:
|
||||
|
||||
|
||||
```
|
||||
`$ asciinema play mymovie.cast`
|
||||
```
|
||||
|
||||
This takes over your terminal session and makes it into the nearest equivalent of the Silver Screen as it's likely ever to be (aside from that time you watched Star Wars in ASCII over `telnet`). Your text-based movie plays—demonstrating for your users exactly how a complex task gets done. Of course, the _actual_ commands getting played don't actually execute. This isn't a shell script in action, so even though you may have created a file `hello.txt` in your movie, there won't be a new `hello.txt` after playback. This is just for show.
|
||||
|
||||
And yet it's more than just a show. You can pause Asciinema movies, select the text you see on the screen and paste it into an active terminal to run the command. Asciinema is useful documentation. It shows users how to do a task, and it allows them to copy and paste to ensure accuracy.
|
||||
|
||||
### Upload your Asciinema movie
|
||||
|
||||
No Asciinema movie has yet reached a blockbuster status, but you can upload yours to Asciinema.org and share it with the world nevertheless.
|
||||
|
||||
|
||||
```
|
||||
`$ asciinema upload mymovie.cast`
|
||||
```
|
||||
|
||||
If you're used to YouTube upload times, you'll be pleasantly surprised by how quickly Asciinema movies transfer. A `.cast` file is usually only a few kilobytes, or at the most a few megabytes, so the upload is nearly instantaneous. You don't need an account to share your movie, but all unclaimed movies get deleted after seven days. To preserve your masterpiece, you can open an account on Asciinema and then sit back and wait for the Academy to call.
|
||||
|
||||
### Asciinema as documentation
|
||||
|
||||
Asciinema is a great way to demonstrate even the most basic of concepts. Because it retains the ability to copy and paste code from the recording, provides the ability to pause and play on-demand, and is completely accurate in what it portrays, it's not just as good as a screen recording. It's much, much better. Whether you use it to show off your terminal skills to your friends or whether you use it to educate colleagues and students, Asciinema is an invaluable, social, and accessible tool.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/1/record-terminal-session-asciinema
|
||||
|
||||
作者:[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/freedos.png?itok=aOBLy7Ky (4 different color terminal windows with code)
|
||||
[2]: https://opensource.com/article/19/11/pkgsrc-netbsd-linux
|
||||
[3]: https://github.com/cirocosta/asciinema-edit
|
@ -1,106 +0,0 @@
|
||||
[#]: subject: "OpenBoard: An Open Source Interactive Whiteboard for Educators"
|
||||
[#]: via: "https://itsfoss.com/openboard/"
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
OpenBoard: An Open Source Interactive Whiteboard for Educators
|
||||
======
|
||||
|
||||
**Brief:** _OpenBoard is an interactive open-source whiteboard tailored for schools and universities. Let’s take a look at what it offers!_
|
||||
|
||||
There are several open-source tools available for education. But, not all of them are impressively well-maintained at the level of commercial software put forward for schools and universities.
|
||||
|
||||
OpenBoard is one such exceptional free and open-source tool that enables education without any compromises. It is an interactive whiteboard program that features all the essential functionalities along with support for a variety of hardware.
|
||||
|
||||
### OpenBoard: Free and Open Source Interactive Whiteboard
|
||||
|
||||
![][1]
|
||||
|
||||
As a free and open-source program, OpenBoard seems to be an impressive option.
|
||||
|
||||
The Education Department (DIP) of the canton of Geneva, in Switzerland, maintains the tool along with the community on GitHub.
|
||||
|
||||
It shouldn’t cost a fortune just to facilitate easy digital teaching through interactive whiteboards. And, this is where OpenBoard comes in.
|
||||
|
||||
It offers a range of features that should be enough for most schools and universities.
|
||||
|
||||
While I can’t test it out in a school/university setting, I shall highlight the key features that it offers.
|
||||
|
||||
### Features of OpenBoard
|
||||
|
||||
![][2]
|
||||
|
||||
An interactive whiteboard does not need numerous fancy features, but enough to make the experience easy for teachers to be able to express themselves as easily as possible.
|
||||
|
||||
Some of the features that I noticed include:
|
||||
|
||||
* Cross-platform support
|
||||
* Ability to draw/write freely.
|
||||
* The ability to add annotation.
|
||||
* You get to remove annotation.
|
||||
* Get the ability to highlight part of your whiteboard using highlighter.
|
||||
* Individually interact and move the items created/drawn.
|
||||
* Add multiple pages in an order to continue teaching without needing to erase.
|
||||
* Ability to scroll through the pages.
|
||||
* Draw a line (choosing from three different weights of lines)
|
||||
* Toggle Stylus mode (if you are using a pen tablet or similar)
|
||||
* Easy to erase the items created in the whiteboard
|
||||
* Choose from a set of different backgrounds, including ones that turn it into a blackboard or with grid lines.
|
||||
* A variety of essential applications including calculator, maps, ruler, and more is available to use through drag and drop.
|
||||
* Limited shapes available to make drawing easier.
|
||||
* Ability to add audio/video to your whiteboard and play it seamlessly for better experience.
|
||||
* Virtual laser pointer.
|
||||
* Option to zoom in and zoom out.
|
||||
* Write text, resize it, and clone it.
|
||||
* Take a screenshot of the screen from within the whiteboard.
|
||||
* Virtual keyboard available when required.
|
||||
|
||||
|
||||
|
||||
In my brief testing, the user interface and the options available worked incredibly well, without any fail.
|
||||
|
||||
![][3]
|
||||
|
||||
Of course, your experience will depend on the type of device and your setup. You can try it with a Wacom tablet, a dual-monitor setup, or using a projector through a touch-enabled laptop.
|
||||
|
||||
### Install OpenBoard in Linux
|
||||
|
||||
Fortunately, it is available across multiple platforms that include Windows, macOS, and Linux.
|
||||
|
||||
If you are using Ubuntu, you can head to its official website and download the DEB file. In either case, you can choose to [install the Flatpak package][4] from [Flathub][5] for any other Linux distribution.
|
||||
|
||||
[OpenBoard][6]
|
||||
|
||||
### Closing Thoughts
|
||||
|
||||
Overall, I found it effortless to use and navigate. You can quickly switch between multiple pages, erase/add items seamlessly while having the ability to add rich elements to the whiteboard as well.
|
||||
|
||||
The presence of a virtual laser pointer, and several applications, make it suitable for use in various schools and universities without any hiccups.
|
||||
|
||||
I don’t know if it can be called an alternative to Google Classroom or Miro’s Whiteboard feature but for simpler usage, OpenBoard does the job.
|
||||
|
||||
If you haven’t tried this out, I recommend giving it a spin. Is there something better than this that you know of? Let me know in the comments down below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/openboard/
|
||||
|
||||
作者:[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://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/openboard-screenshot.png?resize=800%2C435&ssl=1
|
||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/openboard-screenshot-1.png?resize=800%2C462&ssl=1
|
||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/openboard-dock.png?resize=800%2C344&ssl=1
|
||||
[4]: https://itsfoss.com/flatpak-guide/
|
||||
[5]: https://flathub.org/apps/details/ch.openboard.OpenBoard
|
||||
[6]: https://www.openboard.ch/index.en.html
|
@ -1,293 +0,0 @@
|
||||
[#]: subject: "Protect your PHP website from bots with this open source tool"
|
||||
[#]: via: "https://opensource.com/article/22/1/php-website-bouncer-crowdsec"
|
||||
[#]: author: "Philippe Humeau https://opensource.com/users/philippe-humeau"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Protect your PHP website from bots with this open source tool
|
||||
======
|
||||
The CrowdSec bouncer is designed to be included in any PHP application
|
||||
to help block attackers.
|
||||
![Security monster][1]
|
||||
|
||||
PHP is a widely-used programming language on the web, and it's estimated that nearly 80% of all websites use it. My team at [CrowdSec][2] decided that we needed to provide server admins with a PHP bouncer to help ward away bots and bad actors who may attempt to interact with PHP files.
|
||||
|
||||
CrowdSec bouncers can be set up at various levels of an applicative stack: [web server, firewall, CDN][3], and so on. This article looks at one more layer: setting up remediation directly at the application level.
|
||||
|
||||
Remediation directly in the application can be helpful for various reasons:
|
||||
|
||||
* It provides a business-logic answer to potential security threats.
|
||||
* It gives freedom about how to respond to security issues.
|
||||
|
||||
|
||||
|
||||
While CrowdSec already publishes a WordPress bouncer, this PHP library is designed to be included in _any_ PHP application (Drupal, for example). The bouncer helps block attackers, challenging them with CAPTCHA to let humans through while blocking bots.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
This tutorial assumes that you are running Drupal on a Linux server with [Apache as a web server.][4]
|
||||
|
||||
The first step is to [install CrowdSec][5] on your server. You can do this with an [official install script][6]. If you're on Fedora, CentOS, or similar, download the RPM version:
|
||||
|
||||
|
||||
```
|
||||
`$ curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh`
|
||||
```
|
||||
|
||||
On Debian and Debian-based systems, download the DEB version:
|
||||
|
||||
|
||||
```
|
||||
`$ curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh`
|
||||
```
|
||||
|
||||
These scripts are simple, so read through the one you download to verify that it imports a GPG key and configures a new repository. Once you're comfortable with what it does, execute it and then install.
|
||||
|
||||
|
||||
```
|
||||
`$ sudo dnf install crowdsec || sudo apt install crowdsec`
|
||||
```
|
||||
|
||||
CrowdSec detects all the existing services on its own, so there should be no further configuration to get an immediately functional setup.
|
||||
|
||||
### Test the initial setup
|
||||
|
||||
Now that you have CrowdSec installed, launch a web application vulnerability scanner, such as [Nikto][7], and see how it behaves:
|
||||
|
||||
|
||||
```
|
||||
`$ ./nikto.pl -h http://<ip_or_domain>`
|
||||
```
|
||||
|
||||
![nikto scan][8]
|
||||
|
||||
(Philippe Humeau, CC BY-SA 4.0)
|
||||
|
||||
The IP address has been detected and triggers various scenarios, the last one being **crowdsecurity/http-crawl-non_statics**.
|
||||
|
||||
![detected scan][9]
|
||||
|
||||
(Philippe Humeau, CC BY-SA 4.0)
|
||||
|
||||
However, CrowdSec only detects issues, and a bouncer is needed to apply remediation. Here comes the PHP bouncer.
|
||||
|
||||
### Remediate with the PHP bouncer
|
||||
|
||||
Now that you can detect malicious behaviors, you need to block the IP at the website level. At this time, there is no Drupal bouncer available. However, you can use the PHP bouncer directly.
|
||||
|
||||
How does it work? The PHP bouncer (like any other bouncer) makes an API call to the CrowdSec API and checks whether it should ban incoming IPs, send them a CAPTCHA, or allow them to pass.
|
||||
|
||||
The web server is Apache, so you can use the [install script for Apache][10].
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
$ git clone <https://github.com/crowdsecurity/cs-php-bouncer.git>
|
||||
$ cd cs-php-bouncer/
|
||||
$ ./install.sh --apache
|
||||
|
||||
```
|
||||
|
||||
![apache install script][11]
|
||||
|
||||
(Philippe Humeau, CC BY-SA 4.0)
|
||||
|
||||
The bouncer is configured to protect the whole website. Secure a specific part of the site by adapting the Apache configuration.
|
||||
|
||||
### Try to access the website
|
||||
|
||||
The PHP bouncer is installed and configured. You're banned due to the previous web vulnerability scan actions, but you can try to access the website:
|
||||
|
||||
![site access attempt][12]
|
||||
|
||||
(Philippe Humeau, CC BY-SA 4.0)
|
||||
|
||||
The bouncer successfully blocked your traffic. If you were not banned following a previous web vulnerability scan, you could add a manual decision with:
|
||||
|
||||
|
||||
```
|
||||
`$ cscli decisions add -i <your_ip>`
|
||||
```
|
||||
|
||||
For the remaining tests, remove the current decisions:
|
||||
|
||||
|
||||
```
|
||||
`$ cscli decisions delete -i <your_ip>`
|
||||
```
|
||||
|
||||
### Going further
|
||||
|
||||
I blocked the IP trying to mess with the PHP website. It’s nice, but what about IPs trying to scan, crawl, or DDoS it? Those kinds of detections can lead to false positives, so why not return a CAPTCHA challenge to check whether it is an actual user (rather than a bot) instead of blocking the IP?
|
||||
|
||||
#### Detect crawlers and scanners
|
||||
|
||||
I dislike crawlers and bad user agents and there are various scenarios available on the [Hub][13] to spot them.
|
||||
|
||||
Ensure the `base-http-scenarios` collections from the Hub are downloaded with `cscli`:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
$ cscli collections list | grep base-http-scenarios
|
||||
crowdsecurity/base-http-scenarios ✔️ enabled /etc/crowdsec/collections/base-http-scenarios.yaml
|
||||
|
||||
```
|
||||
|
||||
If it is not the case, install it, and reload CrowdSec:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
$ sudo cscli collections install crowdsecurity/base-http-scenarios
|
||||
$ sudo systemctl reload crowdsec
|
||||
|
||||
```
|
||||
|
||||
#### Remedy with a CAPTCHA
|
||||
|
||||
Since detecting DDoS, crawlers, or malevolent user agents can lead to false positives, I prefer to return a CAPTCHA for any IP address triggering those scenarios to avoid blocking real users.
|
||||
|
||||
To achieve this, modify the `profiles.yaml` file.
|
||||
|
||||
Add this YAML block at the beginning of your profile in `/etc/crowdsec/profiles.yaml`:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
\---
|
||||
# /etc/crowdsec/profiles.yaml
|
||||
name: crawler_captcha_remediation
|
||||
filter: Alert.Remediation == true && Alert.GetScenario() in ["crowdsecurity/http-crawl-non_statics", "crowdsecurity/http-bad-user-agent"]
|
||||
|
||||
decisions:
|
||||
- type: captcha
|
||||
duration: 4h
|
||||
on_success: break
|
||||
|
||||
```
|
||||
|
||||
With this profile, a CAPTCHA is enforced (for four hours) on any IP address that triggers the scenarios `crowdsecurity/http-crawl-non_statics` or `crowdsecurity/http-bad-user-agent`.
|
||||
|
||||
Next, reload CrowdSec:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo systemctl reload crowdsec`
|
||||
```
|
||||
|
||||
#### Try the custom remediations
|
||||
|
||||
Relaunching a web vulnerability scanner would trigger many scenarios, so you would ultimately be banned again. Instead, you can just craft an attack that triggers the `bad-user-agent` scenario (the list of known bad user-agents is [here][14]). Please note that you must activate the rule twice to get banned.
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
$ curl --silent -I -H "User-Agent: Cocolyzebot" <http://example.com> > /dev/null
|
||||
$ curl -I -H "User-Agent: Cocolyzebot" <http://example.com>
|
||||
HTTP/1.1 200 OK
|
||||
Date: Tue, 05 Oct 2021 09:35:43 GMT
|
||||
Server: Apache/2.4.41 (Ubuntu)
|
||||
Expires: Sun, 19 Nov 1978 05:00:00 GMT
|
||||
Cache-Control: no-cache, must-revalidate
|
||||
X-Content-Type-options: nosniff
|
||||
Content-Language: en
|
||||
X-Frame-Options: SAMEORIGIN
|
||||
X-Generator: Drupal 7 (<http://drupal.org>)
|
||||
Content-Type: text/html; charset=utf-8
|
||||
|
||||
```
|
||||
|
||||
You can, of course, see that you get caught for your actions.
|
||||
|
||||
|
||||
```
|
||||
`$ sudo cscli decisions list`
|
||||
```
|
||||
|
||||
![detected scan][15]
|
||||
|
||||
(Philippe Humeau, CC BY-SA 4.0)
|
||||
|
||||
If you try to access the website, instead of being simply blocked, you receive a CAPTCHA:
|
||||
|
||||
![CAPTCHA prompt][16]
|
||||
|
||||
(Philippe Humeau, CC BY-SA 4.0)
|
||||
|
||||
Once you solve it, you can reaccess the website.
|
||||
|
||||
Next, unban myself again:
|
||||
|
||||
|
||||
```
|
||||
`$ cscli decisions delete -i <your_ip>`
|
||||
```
|
||||
|
||||
Launch the vulnerability scanner:
|
||||
|
||||
|
||||
```
|
||||
`$ ./nikto.pl -h http://example.com`
|
||||
```
|
||||
|
||||
Unlike the last time, you can now see that you've triggered several decisions:
|
||||
|
||||
![scan detected][17]
|
||||
|
||||
(Philippe Humeau, CC BY-SA 4.0)
|
||||
|
||||
When trying to access the website, the ban decision has the priority:
|
||||
|
||||
![site access attempt][18]
|
||||
|
||||
(Philippe Humeau, CC BY-SA 4.0)
|
||||
|
||||
### Wrap up
|
||||
|
||||
This is a quick way to help block attackers from PHP websites and applications. This article contains only one example. Remediations can be easily extended to fit additional needs. To find out more about installing and using the CrowdSec agent, [check this how-to guide][19] to get started.
|
||||
|
||||
To download the PHP bouncer, go to [the CrowdSec Hub][20] or [GitHub][21].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/1/php-website-bouncer-crowdsec
|
||||
|
||||
作者:[Philippe Humeau][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/philippe-humeau
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/security_password_chaos_engineer_monster.png?itok=J31aRccu (Security monster)
|
||||
[2]: https://opensource.com/article/20/10/crowdsec
|
||||
[3]: https://hub.crowdsec.net/browse/#bouncers
|
||||
[4]: https://opensource.com/article/18/2/how-configure-apache-web-server
|
||||
[5]: https://doc.crowdsec.net/docs/getting_started/install_crowdsec
|
||||
[6]: https://packagecloud.io/crowdsec/crowdsec/install
|
||||
[7]: https://github.com/sullo/nikto
|
||||
[8]: https://opensource.com/sites/default/files/1nikto_0.png (nikto scan)
|
||||
[9]: https://opensource.com/sites/default/files/2decisions.png (detected scan)
|
||||
[10]: https://github.com/crowdsecurity/cs-php-bouncer/blob/main/install.sh
|
||||
[11]: https://opensource.com/sites/default/files/3bouncer.png (apache install script)
|
||||
[12]: https://opensource.com/sites/default/files/4blocked.png (site access attempt)
|
||||
[13]: https://hub.crowdsec.net/
|
||||
[14]: https://raw.githubusercontent.com/crowdsecurity/sec-lists/master/web/bad_user_agents.txt
|
||||
[15]: https://opensource.com/sites/default/files/7decisions-again.png (detected scan)
|
||||
[16]: https://opensource.com/sites/default/files/8sitedeny.png (CAPTCHA prompt)
|
||||
[17]: https://opensource.com/sites/default/files/10decisionsagain.png (scan detected)
|
||||
[18]: https://opensource.com/sites/default/files/11sitedeny.png (site access attempt)
|
||||
[19]: https://crowdsec.net/tutorial-crowdsec-v1-1/
|
||||
[20]: https://hub.crowdsec.net/author/crowdsecurity/bouncers/cs-php-bouncer
|
||||
[21]: https://github.com/crowdsecurity/cs-php-bouncer
|
@ -1,95 +0,0 @@
|
||||
[#]: subject: "What is POSIX? Why Does it Matter to Linux/UNIX Users?"
|
||||
[#]: via: "https://itsfoss.com/posix/"
|
||||
[#]: author: "Bill Dyer https://itsfoss.com/author/bill/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
What is POSIX? Why Does it Matter to Linux/UNIX Users?
|
||||
======
|
||||
|
||||
You’ll hear the acronym, or read about it: POSIX, on different online boards and articles. Programmers and system developers seem to worry about it the most. It can sound mysterious and, while there are many good sources on the subject, some discussion boards (brevity is part of their nature), don’t go into detail as to what it is and this can lead to confusion. What, then, is POSIX, really?
|
||||
|
||||
![][1]
|
||||
|
||||
### What is POSIX?
|
||||
|
||||
POSIX isn’t actually a thing. It describes a thing – much like a label. Imagine a box labeled: _POSIX_, and inside the box is a standard. A standard consists of sets of rules and instructions that POSIX is concerned with. **POSIX** is shorthand for _Portable Operating System Interface_. It is an IEEE 1003.1 standard that defines the language interface between application programs (along with command line shells and utility interfaces) and the UNIX operating system.
|
||||
|
||||
Compliance to the standard ensures compatibility when UNIX programs are moved from one UNIX platform to another. POSIX’s focus is primarily on features from AT&T’s System V UNIX and BSD UNIX.
|
||||
|
||||
A standard must be spelled out and followed by rules on how to achieve the goal of interoperability between operating systems. POSIX covers such things as: System Interfaces, and Commands and Utilities, Network File Access, just to name a few – there is much more to POSIX than this.
|
||||
|
||||
### Why POSIX?
|
||||
|
||||
In a word: portability.
|
||||
|
||||
Over 60 years ago, programmers had to rewrite code completely if they wanted their software to run on more than one system. This didn’t happen all that often due to the expense involved, but portability became a feature in the mid-1960s – not through POSIX – but in the mainframe arena.
|
||||
|
||||
IBM introduced the System/360 family of mainframe computers. Different models had their unique specializations, but the hardware was such that they could use the same operating system: OS/360.
|
||||
|
||||
Not only could the operating system run on different models, applications could run on them as well. Not only did this keep costs low, but it created _computer systems_ – systems across a product line that could work together. It’s all common today – networks and systems, but back then, this was a huge deal!
|
||||
|
||||
![IBM System 360 | Image Credit: IBM][2]
|
||||
|
||||
When UNIX came about, around the same time, it also showed promise in that it could operate on machines from different manufacturers. However, when UNIX started to fork into different flavors, porting code across these UNIX variants became difficult. The promise of UNIX portability was losing ground.
|
||||
|
||||
To solve this portability issue POSIX was formed in the 1980s. The standard was defined based on AT&T’s System V UNIX and BSD UNIX, the two biggest variants at the time. It’s important to note that POSIX wasn’t formed to control how the operating systems were built – any company was free to design their UNIX variant any way they pleased. POSIX was only concerned with how an application interfaces with the operating system. In programmer-speak, an interface is the method one program’s code can communicate with another program. The interface expects Program A to provide a specific type of information to Program B. Likewise, Program A expects Program B to answer back with a specific type of data.
|
||||
|
||||
For example, if I want to read a file using the cat command, I would type something like this on the command line:
|
||||
|
||||
`cat myfile.txt`
|
||||
|
||||
Without going into a lot of programmer-speak, I’ll just say that the cat command makes a call to the operating system to fetch the file so cat can read it. cat reads it and then displays the file’s contents on the screen. There is a lot of interplay between the application (`cat`) and the operating system. How this interplay works is what POSIX was interested in. If the interplay could be the same across the different UNIX variants, portability – regardless of operating system, manufacturer, and hardware – is regained.
|
||||
|
||||
The specifics as to how all of this is accomplished is defined in the standard.
|
||||
|
||||
### Compliance is Voluntary
|
||||
|
||||
All of us have at least seen a message like, “for help, type: xxxxx –help.” This is common in Linux and is not POSIX compliant. POSIX never required the double-dash, they expect one dash. The double-dash comes from GNU, yet, it doesn’t harm Linux and adds a little to its character. At the same time, Linux is mostly compliant, especially when it comes to system call interfaces. This is why we are able to run X, GNOME, and KDE applications on Linux, Sys V UNIX, and BSD UNIX. Various commands, such as ls, cat, grep, find, awk, and many more operate the same across the different variants.
|
||||
|
||||
As a rule, compliance is a willing step. When code is compliant, it’s easier to move to another system; very little code rewrite, if any, would be necessary. When code can work on different systems, the use of it expands. People using other systems can benefit from the use of the program. For the budding programmer, learning how to write programs that are POSIX compliant can only help their career. For those readers who are interested in the Linux sphere of compliance, much good information can be found at: [Linux Standard Base][3].
|
||||
|
||||
### But I’m Not a Programmer or System Designer…
|
||||
|
||||
Many people who work on computers aren’t programmers or operating system designers. They’re the medical transcription clerks, secretaries who write out letters, task lists, dictated memos, and so on. Others tabulate numbers, gather and massage data, run online stores, write books and articles (and some of us read them). In almost every job, there’s probably a computer close by.
|
||||
|
||||
POSIX affects these users too, whether they know it or not. Users don’t have to comply with the standard, but they do expect their computers to work. When operating systems and programs conform to the POSIX standard, the gain the benefit of interoperability. They will be able to move from on system to another with the reasonable expectation that the machines will work much like another one does. Their data will still be accessible and they will still be able to make changes to it.
|
||||
|
||||
POSIX, as well as other standards, are continually evolving. As technology grows, so does the standard. Standards are actually an agreed-upon system used by people, manufacturers, organizations, etc. to perform tasks in an efficient manner. Devices from one manufacturer is able to work with another manufacturer’s device. Think about it: Your Bluetooth earpiece can be used on an Apple iPhone just as well as it can on an Android phone. Our TV can hook up to, and stream, videos and shows from different networks, such as Amazon Prime, BritBox, Hulu – just to name a few. Now, we can even monitor out heart rate with our phones. All of this is made possible, largely in part, from compliance to standards.
|
||||
|
||||
Benefits galore. I like that.
|
||||
|
||||
### So what about the X?
|
||||
|
||||
I admit it, I never said what the “X” was for in POSIX. [Opensource.com has an excellent article][4] where Richard Stallman explains what the “X” in POSIX means. Here it is, in his words:
|
||||
|
||||
> The IEEE had finished developing the spec but had no concise name for it. The title said something like “portable operating system interface,” though I don’t remember the exact words. The committee put on “IEEEIX” as the concise name. I did not think that was a good choice. It is ugly to pronounce—it would sound like a scream of terror, “Ayeee!”—so I expected people would instead call the spec “Unix.”
|
||||
>
|
||||
> Since GNU’s Not Unix, and it was intended to replace Unix, I did not want people to call GNU a “Unix system.” I, therefore, proposed a concise name that people might actually use. Having no particular inspiration, I generated a name the unclever way: I took the initials of “portable operating system” and added “ix.” The IEEE adopted this eagerly.
|
||||
|
||||
### Conclusion
|
||||
|
||||
The POSIX standard allows developers to create applications, tools, and platforms on many operating systems using much of the same code. It isn’t a requirement, by any means, to write code according to the standard, but it does help, in a big way, when you want to port your code to other systems.
|
||||
|
||||
Basically, POSIX is geared toward operating system designers and software developers, but as users of a system, we are affected by POSIX whether we may realize it or not. It is because of the standard that we are able to work on one UNIX or Linux system and bring that work over to another system and work on it with no hiccups. As users, we gain numerous benefits in usability and data re-use across systems.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/posix/
|
||||
|
||||
作者:[Bill Dyer][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/bill/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/What-is-POSIX.png?resize=800%2C450&ssl=1
|
||||
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/IBM-system-360-vintage-picture.jpg?resize=800%2C593&ssl=1
|
||||
[3]: https://refspecs.linuxfoundation.org/lsb.shtml
|
||||
[4]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains
|
@ -0,0 +1,97 @@
|
||||
[#]: subject: "How to back your open source project's stack"
|
||||
[#]: via: "https://opensource.com/article/22/1/back-your-stack"
|
||||
[#]: author: "Ruth Cheesley https://opensource.com/users/rcheesley"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to back your open source project's stack
|
||||
======
|
||||
Identify your open source project's dependencies through the Back Your
|
||||
Stack initiative and consider one of the many creative ways to show
|
||||
support.
|
||||
![Two diverse hands holding a globe][1]
|
||||
|
||||
On [GivingTuesday][2], the Mautic project—an open source marketing automation platform—shared its intention to allocate part of its budget each year to [financially support the other open source projects on which it depends][3], as part of the _Back Your Stack_ initiative.
|
||||
|
||||
### What is Back Your Stack?
|
||||
|
||||
What is Back Your Stack, and why should open source projects follow Mautic's lead?
|
||||
|
||||
Sustainability is a huge challenge in open source.
|
||||
|
||||
We've seen several cases in recent years where critical tools which are literally keeping the internet and the world of technology running are being maintained by a very small number of people, at times as a hobby rather than their full-time occupation. Sometimes this only comes to light when those people decide that enough is enough and either stop maintaining it or sell/transfer it to another organization to support.
|
||||
|
||||
[Tidelift][4] recently reported that [46% of open source maintainers are not paid][5]. Only 26% earn more than $1,000 from their maintenance work. The same survey also reported that around half felt demotivated, stressed, and undervalued because there was no recognition for the "thankless work" involved in maintaining these projects.
|
||||
|
||||
While some projects and maintainers may genuinely not want to receive any funds for their work, the vast majority have various channels through which they can be compensated, whether it be the cost of a coffee or a more substantial donation, once or on a regular basis.
|
||||
|
||||
The finger is often pointed at the end-users of software and there is pressure on them to fund open source projects directly. However, once an open source project has any significant budget, I believe it is the project's responsibility to support those on whom it relies—its dependencies.
|
||||
|
||||
Without dependencies, open source projects would not be able to do all the awesome things that they do. Even if every open source project with an annual budget of over $50,000 per year decided to support their top ten dependencies at a relatively low amount of $200, I am sure that the maintainers would find a massive benefit in the support, if only in terms of a morale boost for being appreciated!
|
||||
|
||||
### Identify dependencies with open source tools
|
||||
|
||||
There are some great tools out there to help you identify the projects on which you depend.
|
||||
|
||||
First, if you're a composer-based project, you can use the command below to get a list of all the dependencies actively seeking funding (this uses the [funding markup][6] in the composer.json, so if you're a project seeking funding, make sure you add it!).
|
||||
|
||||
|
||||
```
|
||||
`$ composer fund`
|
||||
```
|
||||
|
||||
You can also use [backyourstack.com][7] to identify dependencies through your GitHub organization or upload a dependency file—they support package.json, composer.json, *.csproj, packages.config, Gopkg.lock, Gemfile.lock, and requirements.txt files.
|
||||
|
||||
This gives you a list of projects on Open Collective and a useful list of all your dependencies that you can then use to research funding opportunities.
|
||||
|
||||
### How much should I contribute?
|
||||
|
||||
How much you contribute depends on your budget and how much money you have available outside of your "must cover" expenses.
|
||||
|
||||
Personally, I would like Mautic to be at 10% so that we could support all of our dependencies at a basic level, but we haven't got the financial stability just yet to reach that. For now, we're allocating 4% of our budget to support the top 10 projects as prioritized by our community—it's not much, but it's a starting point.
|
||||
|
||||
### But I don't have the money!
|
||||
|
||||
I hear you. It's tough to get to a point where you have enough funds available to support your dependencies, so what about getting creative about how you support them?
|
||||
|
||||
* Organize a documentation swarm, where you bring some of your contributors to improve the documentation for one of your dependencies in a _giving back_ initiative.
|
||||
* Give a project feedback, and help them improve the contributor experience by sharing what's worked well for your project or where you find things difficult with their project.
|
||||
* Allow a developer on your team to work on a dependency project for some portion of each week.
|
||||
* Find a project on [github.com/opensourcedesign][8] and assign a designer on your team to help out.
|
||||
|
||||
|
||||
|
||||
In the survey from Tidelift, 90% of maintainers suggested that the primary non-financial ways they are looking for help are improving documentation and improving the experience for new users and contributors.
|
||||
|
||||
What about donating a percentage of the ticket sales from your next conference or event towards supporting your dependencies, or adding it as a power-up for your community members to pay more in order to support your dependencies?
|
||||
|
||||
There are many creative ways to collectively help open source projects become more sustainable, through which we all grow stronger.
|
||||
|
||||
Are you backing your stack currently? What ideas do you have for backing your stack? If you're a maintainer, what are your thoughts on the most helpful way for people to support your projects if they depend on you for their own products or services?
|
||||
|
||||
Feel free to share in a comment below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/1/back-your-stack
|
||||
|
||||
作者:[Ruth Cheesley][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/rcheesley
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/world_hands_diversity.png?itok=zm4EDxgE (Two diverse hands holding a globe)
|
||||
[2]: https://en.wikipedia.org/wiki/GivingTuesday
|
||||
[3]: https://www.mautic.org/blog/community/giving-tuesday-mautic-backs-their-stack-support-open-source-projects-they-depend
|
||||
[4]: https://opensource.com/article/21/3/open-source-maintainer-survey
|
||||
[5]: https://tidelift.com/about/press-releases/survey-finds-many-open-source-maintainers-are-stressed-out-and-underpaid-but-persist-so-they-can-make-a-positive-impact
|
||||
[6]: https://getcomposer.org/doc/04-schema.md#funding
|
||||
[7]: https://backyourstack.com/
|
||||
[8]: https://github.com/opensourcedesign/jobs/tree/master/jobs
|
403
sources/tech/20220120 Solve network fragmentation with MTU.md
Normal file
403
sources/tech/20220120 Solve network fragmentation with MTU.md
Normal file
@ -0,0 +1,403 @@
|
||||
[#]: subject: "Solve network fragmentation with MTU"
|
||||
[#]: via: "https://opensource.com/article/22/1/solve-network-fragmentation-mtu"
|
||||
[#]: author: "Jair Patete https://opensource.com/users/jpatete"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Solve network fragmentation with MTU
|
||||
======
|
||||
This tutorial provides a workaround to help network administrators
|
||||
address MTU issues without needing a stack update to move MTUs back and
|
||||
forth.
|
||||
![Coding on a computer][1]
|
||||
|
||||
During the implementation of OpenStack workloads, a common issue is fragmentation throughout the network, causing unforeseen performance issues. Fragmentation is normally difficult to address because networks can get complex, so the path of packets can be hard to trace or predict.
|
||||
|
||||
OpenStack initiates the network interface card (NIC) configuration during the initial setup of the cluster or when new nodes are added. The Message Transfer Unit (MTU) configuration is also generated at this stage. Changing the configuration after the cluster is deployed is not recommended. Normally, the System Integrator expects that the end-to-end path is properly configured before deploying and configuring the network for the stack to avoid constant MTU changes just for testing.
|
||||
|
||||
Neutron networks are created after OSP is deployed. This allows administrators to create 1500 MTU networks for the instances. However, the compute node itself is still set to the MTU, so fragmentation may still occur. In telco workloads, for example, the most common MTU value for all instances is 9000, so it's easy to inadvertently cause fragmentation after networks and instances have been created.
|
||||
|
||||
### Jumbo frames
|
||||
|
||||
Here's an example of an instance (deployed in OSP 16.1.5) configured with jumbo frames (8996), but you can see that the network path does not also have jumbo frames configured. This causes fragmentation because system packets use 8996 as the MTU.
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
$ ping 10.169.252.1 -M do -s 8968
|
||||
PING 10.169.252.1 (10.169.252.1) 8968(8996) bytes of data.
|
||||
|
||||
\--- 10.169.252.1 ping statistics ---
|
||||
7 packets transmitted, 0 received, 100% packet loss, time 5999ms
|
||||
|
||||
```
|
||||
|
||||
This shows 100% packet loss when no fragmentation is allowed. The output effectively identifies the issue and reveals a problem with the MTU in the network path. If you allow fragmentation, you can see there is a successful ping.
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
$ ping 10.169.252.1 -M dont -s 8968
|
||||
PING 10.169.252.1 (10.169.252.1) 8968(8996) bytes of data.
|
||||
8976 bytes from 10.169.252.1: icmp_seq=1 ttl=255 time=3.66 ms
|
||||
8976 bytes from 10.169.252.1: icmp_seq=2 ttl=255 time=2.94 ms
|
||||
8976 bytes from 10.169.252.1: icmp_seq=3 ttl=255 time=2.88 ms
|
||||
8976 bytes from 10.169.252.1: icmp_seq=4 ttl=255 time=2.56 ms
|
||||
8976 bytes from 10.169.252.1: icmp_seq=5 ttl=255 time=2.91 ms
|
||||
|
||||
\--- 10.169.252.1 ping statistics ---
|
||||
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
|
||||
rtt min/avg/max/mdev = 2.561/2.992/3.663/0.368 m
|
||||
|
||||
```
|
||||
|
||||
Having confirmed the issue, you might have to wait until the network team resolves the problem. In the meantime, fragmentation exists and impacts your system. You shouldn't update the stack to check whether the issue has been fixed, so in this article, I share one safe way to lower the end-to-end MTU inside the compute node.
|
||||
|
||||
### Adjusting the MTU
|
||||
|
||||
#### Step 1: Identify the hypervisor your instance is running on
|
||||
|
||||
First, you must obtain information about your instance. Do this from the Overcloud using the `openstack` command:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
(overcloud)[director]$ openstack server \
|
||||
show 2795221e-f0f7-4518-a5c5-85977357eeec \
|
||||
-f json
|
||||
{
|
||||
"OS-DCF:diskConfig": "MANUAL",
|
||||
"OS-EXT-AZ:availability_zone": "srvrhpb510-compute-2",
|
||||
"OS-EXT-SRV-ATTR:host": "srvrhpb510-compute-2.localdomain",
|
||||
"OS-EXT-SRV-ATTR:hostname": "server-2",
|
||||
"OS-EXT-SRV-ATTR:hypervisor_hostname": "srvrhpb510-compute-2.localdomain",
|
||||
"OS-EXT-SRV-ATTR:instance_name": "instance-00000248",
|
||||
"OS-EXT-SRV-ATTR:kernel_id": "",
|
||||
"OS-EXT-SRV-ATTR:launch_index": 0,
|
||||
"OS-EXT-SRV-ATTR:ramdisk_id": "",
|
||||
"OS-EXT-SRV-ATTR:reservation_id": "r-ms2ep00g",
|
||||
"OS-EXT-SRV-ATTR:root_device_name": "/dev/vda",
|
||||
"OS-EXT-SRV-ATTR:user_data": null,
|
||||
"OS-EXT-STS:power_state": "Running",
|
||||
"OS-EXT-STS:task_state": null,
|
||||
"OS-EXT-STS:vm_state": "active",
|
||||
"OS-SRV-USG:launched_at": "2021-12-16T18:57:24.000000",
|
||||
<...>
|
||||
"volumes_attached": ""
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
#### Step 2: Connect to the hypervisor and dump the XML of the instance
|
||||
|
||||
Next, you need a dump of the XML (using the `virsh dumpxml` command) that defines your instance. So you can filter it in the next step, redirect the output into a file:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
[compute2]$ sudo podman \
|
||||
exec -it nova_libvirt bash
|
||||
|
||||
(pod)[compute2]# virsh \
|
||||
list --all
|
||||
Id Name State
|
||||
\-----------------------------------
|
||||
6 instance-00000245 running
|
||||
7 instance-00000248 running
|
||||
|
||||
(pod)[compute2]# virsh dumpxml instance-00000245 | tee inst245.xml
|
||||
<domain type='kvm' id='6'>
|
||||
<name>instance-00000245</name>
|
||||
<uuid>1718c7d4-520a-4366-973d-d421555295b0</uuid>
|
||||
<metadata>
|
||||
<nova:instance xmlns:nova="[http://openstack.org/xmlns/libvirt/nova/1.0"\>][2]
|
||||
<nova:package version="20.4.1-1.20201114041747.el8ost"/>
|
||||
<nova:name>server-1</nova:name>
|
||||
<nova:creationTime>2021-12-16 18:57:03</nova:creationTime>
|
||||
[...]
|
||||
</domain>
|
||||
|
||||
```
|
||||
|
||||
#### Step 3: Examine the XML output
|
||||
|
||||
After you have the XML output, use your favourite pager or text editor to get the network interface information for the instance.
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
<interface type='bridge'>
|
||||
<mac address='fa:16:3e:f7:15:db'/>
|
||||
<source bridge='br-int'/>
|
||||
<virtualport type='openvswitch'>
|
||||
<parameters interfaceid='da128923-84c7-435e-9ec1-5a000ecdc163'/>
|
||||
</virtualport>
|
||||
<target dev='tap123'/>
|
||||
<model type='virtio'/>
|
||||
<driver name='vhost' rx_queue_size='1024'/>
|
||||
<mtu size='8996'/>
|
||||
<alias name='net0'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||
</interface>
|
||||
|
||||
```
|
||||
|
||||
From this output, filter the source bridge (on the compute node) and the target device (the physical interface in the compute node).
|
||||
|
||||
This output can change depending on the firewall type you are using, or if you are using security groups where the flow is a bit different, but all the host interfaces are displayed, and the next steps apply to all of them.
|
||||
|
||||
#### Step 4: Look at the target device
|
||||
|
||||
In this case, `tap123` on the compute node is the target device, so examine it with the [ip command][3]:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
[compute2]$ ip addr show tap123
|
||||
|
||||
tap123: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 8996
|
||||
inet6 fe80::fc16:3eff:fef7:15db prefixlen 64 scopeid 0x20<link>
|
||||
ether fe:16:3e:f7:15:db txqueuelen 10000 (Ethernet)
|
||||
[...]
|
||||
|
||||
```
|
||||
|
||||
You can see that the MTU is 8996, as expected. You can also find the MAC address (fe:16:3e:f7:15:db), so you can optionally confirm the port using the OpenStack port commands.
|
||||
|
||||
You can also check this interface is in the br-int bridge:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
Bridge br-int
|
||||
[...]
|
||||
Port tap123
|
||||
tag: 1
|
||||
Interface tap123
|
||||
|
||||
```
|
||||
|
||||
That's also as expected because this allows South and North traffic for this instance using the external network.
|
||||
|
||||
#### Step 5: Change the MTU
|
||||
|
||||
Apply a common MTU change on the host specifically for your target interface (`tap123` in this example).
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
[compute2]$ sudo ifconfig tap123 mtu 1500
|
||||
[compute2]$ ip addr show tap123 | grep mtu
|
||||
tap123: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
|
||||
|
||||
```
|
||||
|
||||
#### Step 6: Repeat
|
||||
|
||||
Now repeat the procedure inside the instance to move the mtu from 8996 to 1500. This covers the hypervisor part, as neutron is still configured with jumbo frames.
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
[localhost]$ sudo ip link set dev eth0 mtu 1500
|
||||
[localhost]$ ip addr show eth0
|
||||
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
|
||||
inet 10.169.252.186 netmask 255.255.255.255 broadcast 0.0.0.0
|
||||
inet6 fe80::f816:3eff:fef7:15db prefixlen 64 scopeid 0x20<link>
|
||||
ether fa:16:3e:f7:15:db txqueuelen 1000 (Ethernet)
|
||||
RX packets 1226 bytes 242462 (236.7 KiB)
|
||||
RX errors 0 dropped 0 overruns 0 frame 0
|
||||
TX packets 401 bytes 292332 (285.4 KiB)
|
||||
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|
||||
|
||||
```
|
||||
|
||||
### Validation
|
||||
|
||||
Now the path inside the local network has an MTU of 1500. If you try to send a packet bigger than this, an error should be displayed:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
[localhost]$ ping 10.169.252.1 -M do -s 1500
|
||||
PING 10.169.252.1 (10.169.252.1) 1500(1528) bytes of data.
|
||||
ping: local error: Message too long, mtu=1500
|
||||
ping: local error: Message too long, mtu=1500
|
||||
ping: local error: Message too long, mtu=1500
|
||||
ping: local error: Message too long, mtu=1500
|
||||
|
||||
\--- 10.169.252.1 ping statistics ---
|
||||
4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 3000ms
|
||||
|
||||
```
|
||||
|
||||
This ping adds 28 bytes to the header, attempting to send a payload of 1500 bytes + 28 bytes. The system cannot send it because it exceeds the MTU. Once you decrease the payload to 1472, you can successfully send the ping in a single frame.
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
[localhost]$ ping 10.169.252.1 -M do -s 1472
|
||||
PING 10.169.252.1 (10.169.252.1) 1472(1500) bytes of data.
|
||||
1480 bytes from 10.169.252.1: icmp_seq=1 ttl=255 time=1.37 ms
|
||||
1480 bytes from 10.169.252.1: icmp_seq=2 ttl=255 time=1.11 ms
|
||||
1480 bytes from 10.169.252.1: icmp_seq=3 ttl=255 time=1.02 ms
|
||||
1480 bytes from 10.169.252.1: icmp_seq=4 ttl=255 time=1.12 ms
|
||||
|
||||
\--- 10.169.252.1 ping statistics ---
|
||||
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
|
||||
rtt min/avg/max/mdev = 1.024/1.160/1.378/0.131 ms
|
||||
|
||||
```
|
||||
|
||||
This is how to end fragmentation problems when the platform sends 9000-byte packets to the network, but fragmentation still occurs in some network components. You have now solved retransmission issues, packet loss, jitter, latency, and other related problems.
|
||||
|
||||
When the network team resolves the network issues, you can revert the MTU commands back to the previous value. This is how you fix network issues without needing to redeploy the stack.
|
||||
|
||||
### End-to-end simulation
|
||||
|
||||
Here's how to simulate the issue in an end-to-end scenario to see how it works. Instead of pinging the gateway, you can ping a second instance. You should observe how an MTU mismatch causes issues, specifically when an application is marking packets as Not-Fragment.
|
||||
|
||||
Assume your servers have the following specifications:
|
||||
|
||||
**Server 1:**
|
||||
Hostname: server1
|
||||
IP: 10.169.252.186/24
|
||||
MTU: 1500
|
||||
|
||||
**Server 2:**
|
||||
Hostname: server2
|
||||
IP: 10.169.252.184/24
|
||||
MTU: 8996
|
||||
|
||||
Connect to **server1** and ping to **server2**:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
[server1]$ ping 10.169.252.184
|
||||
PING 10.169.252.184 (10.169.252.184) 56(84) bytes of data.
|
||||
64 bytes from 10.169.252.184: icmp_seq=1 ttl=64 time=0.503 ms
|
||||
64 bytes from 10.169.252.184: icmp_seq=2 ttl=64 time=0.193 ms
|
||||
64 bytes from 10.169.252.184: icmp_seq=3 ttl=64 time=0.213 ms
|
||||
|
||||
\--- 10.169.252.184 ping statistics ---
|
||||
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
|
||||
rtt min/avg/max/mdev = 0.193/0.303/0.503/0.141 ms
|
||||
|
||||
```
|
||||
|
||||
Connect to **server1** and ping to **server2** without fragmentation with an MTU of 1500:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
[server1]$ ping 10.169.252.184 -M do -s 1472
|
||||
PING 10.169.252.184 (10.169.252.184) 1472(1500) bytes of data.
|
||||
1480 bytes from 10.169.252.184: icmp_seq=1 ttl=64 time=0.512 ms
|
||||
1480 bytes from 10.169.252.184: icmp_seq=2 ttl=64 time=0.293 ms
|
||||
1480 bytes from 10.169.252.184: icmp_seq=3 ttl=64 time=0.230 ms
|
||||
1480 bytes from 10.169.252.184: icmp_seq=4 ttl=64 time=0.268 ms
|
||||
1480 bytes from 10.169.252.184: icmp_seq=5 ttl=64 time=0.230 ms
|
||||
1480 bytes from 10.169.252.184: icmp_seq=6 ttl=64 time=0.208 ms
|
||||
1480 bytes from 10.169.252.184: icmp_seq=7 ttl=64 time=0.219 ms
|
||||
1480 bytes from 10.169.252.184: icmp_seq=8 ttl=64 time=0.229 ms
|
||||
1480 bytes from 10.169.252.184: icmp_seq=9 ttl=64 time=0.228 ms
|
||||
|
||||
\--- 10.169.252.184 ping statistics ---
|
||||
9 packets transmitted, 9 received, 0% packet loss, time 8010ms
|
||||
rtt min/avg/max/mdev = 0.208/0.268/0.512/0.091 ms
|
||||
|
||||
```
|
||||
|
||||
The MTU of **server1** is 1500, and **server2** has an MTU size larger than that, so an application running on **server1** sending packets to **server2** has no fragmentation issues. What happens if **server2**'s application is also set to Not-Fragment, but uses an MTU of 9000?
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
[localhost]$ ping 10.169.252.186 -M do -s 8968
|
||||
PING 10.169.252.186 (10.169.252.186) 8968(8996) bytes of data.
|
||||
|
||||
\--- 10.169.252.186 ping statistics ---
|
||||
10 packets transmitted, 0 received, 100% packet loss, time 8999ms
|
||||
|
||||
```
|
||||
|
||||
Fragmentation occurs, and the packets sent were lost.
|
||||
|
||||
To correct this, repeat the MTU fix so that both servers have the same MTU. As a test, revert **server1**:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
[compute2]$ sudo ip link set dev tap123 mtu 8996
|
||||
[compute2]$ ip addr show tap123 | grep mtu
|
||||
tap123: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 8996
|
||||
|
||||
[server1]$ sudo ip link set dev eth0 mtu 8996
|
||||
[server1]$ ip addr show eth0 | grep mtu
|
||||
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 8996
|
||||
[...]
|
||||
|
||||
```
|
||||
|
||||
Now repeat the 9000 byte payload ping without fragmentation allowed:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
[server2]$ ping 10.169.252.186 -M do -s 8968
|
||||
PING 10.169.252.186 (10.169.252.186) 8968(8996) bytes of data.
|
||||
8976 bytes from 10.169.252.186: icmp_seq=1 ttl=64 time=1.60 ms
|
||||
8976 bytes from 10.169.252.186: icmp_seq=2 ttl=64 time=0.260 ms
|
||||
8976 bytes from 10.169.252.186: icmp_seq=3 ttl=64 time=0.257 ms
|
||||
8976 bytes from 10.169.252.186: icmp_seq=4 ttl=64 time=0.210 ms
|
||||
8976 bytes from 10.169.252.186: icmp_seq=5 ttl=64 time=0.249 ms
|
||||
8976 bytes from 10.169.252.186: icmp_seq=6 ttl=64 time=0.250 ms
|
||||
|
||||
\--- 10.169.252.186 ping statistics ---
|
||||
6 packets transmitted, 6 received, 0% packet loss, time 5001ms
|
||||
rtt min/avg/max/mdev = 0.210/0.472/1.607/0.507 ms
|
||||
|
||||
```
|
||||
|
||||
### Troubleshooting MTU
|
||||
|
||||
This is an easy workaround to help network administrators address MTU issues without needing a stack update to move MTUs back and forth. All these MTU configurations are also temporary. An instance or system reboot causes all interfaces to revert to the original (and configured value).
|
||||
|
||||
It also takes only a few minutes to perform, so I hope you find this useful.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/1/solve-network-fragmentation-mtu
|
||||
|
||||
作者:[Jair Patete][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/jpatete
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_laptop_hack_work.png?itok=aSpcWkcl (Coding on a computer)
|
||||
[2]: http://openstack.org/xmlns/libvirt/nova/1.0"\>
|
||||
[3]: https://opensource.com/article/18/5/useful-things-you-can-do-with-ip-tool-linux
|
@ -0,0 +1,163 @@
|
||||
[#]: subject: "What you need to know about fuzz testing and Go"
|
||||
[#]: via: "https://opensource.com/article/22/1/native-go-fuzz-testing"
|
||||
[#]: author: "Gaurav Kamathe https://opensource.com/users/gkamathe"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
What you need to know about fuzz testing and Go
|
||||
======
|
||||
The Go team has accepted a proposal to add fuzz testing support to the
|
||||
language.
|
||||
![Person using a laptop][1]
|
||||
|
||||
The usage of [Go][2] is growing rapidly. It is now the preferred language for writing cloud-native software, container software, command-line tools, databases, and more. Go has had built-in [support for testing][3] for quite some time now. It makes writing tests and running them using the Go tool relatively easy.
|
||||
|
||||
### What is fuzz testing?
|
||||
|
||||
Fuzzing, sometimes also called fuzz testing, is the practice of giving unexpected input to your software. Ideally, this test causes your application to crash, or behave in unexpected ways. Regardless of what happens, you can learn a lot from how your code reacts to data it wasn't programmed to accept, and you can add appropriate error handling.
|
||||
|
||||
Any given software program consists of instructions that accept input or data from various sources, then it processes this data and generates appropriate output. As software gets developed, a team of test engineers tests this software to find bugs in the software that can then be reported and fixed. Often, the intent is to see if the software behaves as expected. Testing can further get divided into multiple areas, such as functional testing, integration testing, performance testing, and more. Each focuses on a specific aspect of the software functionality to find bugs or improve reliability or performance.
|
||||
|
||||
Fuzzing takes this testing process a step further and tries to provide "invalid" or "random" data to the software program. This is intentional, and the expectation is that the program should crash or behave unexpectedly to uncover bugs in the program so the developers can fix them. Like testing, doing this manually doesn't scale, so many fuzzing tools have been written to automate this process.
|
||||
|
||||
### Software testing in Go
|
||||
|
||||
As an example to test `Add()` function within `add.go`, you could write tests within `add_test.go` by importing the "testing" package and adding the test functionality within a function starting with `TestXXX()`.
|
||||
|
||||
Given this code:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
func Add(num1, num2 int) int {
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
In a file called `add_test.go`, you might have this code for testing:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestAdd(t *testing.T) {
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Run the test:
|
||||
|
||||
|
||||
```
|
||||
`$ go test`
|
||||
```
|
||||
|
||||
### Addition of fuzz testing support
|
||||
|
||||
The Go team has accepted a [proposal to add fuzz testing support][4] to the language to further this effort. This involves adding a new `testing.F` type, the addition of `FuzzXXX()` functions within the `_test.go` files, and to run these tests with the `-fuzz` option is being added to the Go tool.
|
||||
|
||||
In a file called `add_test.go`:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
func FuzzAdd(f *testing.F) {
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Run the code:
|
||||
|
||||
|
||||
```
|
||||
`$ go test -fuzz`
|
||||
```
|
||||
|
||||
This [feature is experimental][5] at the time of writing, but it should be included in the 1.18 release. Also, many features like `-keepfuzzing` and `-race` are not supported at the moment. The Go team has recently published [a tutorial on fuzzing][6], which is well worth a read.
|
||||
|
||||
### Get the latest features with gotip installation
|
||||
|
||||
If you are enthusiastic and wish to try out the feature before the official release, you can utilize `gotip`, which allows you to test upcoming Go features and provide feedback. To install `gotip`, you can use the commands below. After installation, you can use the `gotip` utility to compile and run the program instead of the usual `go` utility.
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
$ go install golang.org/dl/gotip@latest
|
||||
$ gotip download
|
||||
|
||||
$ gotip version
|
||||
go version devel go1.18-f009910 Thu Jan 6 16:22:21 2022 +0000 linux/amd64
|
||||
$
|
||||
|
||||
```
|
||||
|
||||
### Fuzzing opinions in the community
|
||||
|
||||
Fuzzing is often a point of discussion among the software community, and we find people on both ends of the spectrum. Some consider it a useful technique to find bugs, especially on the security front. Whereas given the required resources (CPU/memory) for fuzzing, some consider it a waste or prefer other techniques over it. This is even evident in the Go team as well. We can see Go co-founder Rob Pike being slightly skeptical about the uses of fuzzing and its implementation in Go.
|
||||
|
||||
> _... Although fuzzing is good at finding certain classes of bugs, it is very expensive in CPU and storage, and cost/benefit ratio remains unclear. I worry about wasting energy and filling up git repos with testdata noise..._
|
||||
>
|
||||
> _~_[Rob Pike][7]
|
||||
|
||||
However, another member of the Go security team, Filo Sottile, seems quite optimistic about the addition of fuzz support to Go, also backing it up with some examples and wants it to be a part of the development process.
|
||||
|
||||
> *I like to say that fuzzing finds bugs at the margin. It's why we are interested in it as the security team: bugs caught at the margin are ones that don't make it into production to become vulnerabilities. *
|
||||
>
|
||||
> _We want fuzzing to be part of the development—not build or security—process: make a change to the relevant code…_
|
||||
>
|
||||
> _~_[Filo Sottile][8]
|
||||
|
||||
### Real-world fuzzing
|
||||
|
||||
To me, fuzzing seems quite effective at findings bugs and making systems more secure and resilient. To give an example, even the Linux kernel is fuzz tested using a tool called [syzkaller][9], and it has uncovered a [variety of bugs][10].
|
||||
|
||||
[AFL][11]** **is another popular fuzzer, used to fuzz programs written in C/C++.
|
||||
|
||||
There were options available for fuzzing Go programs as well in the past, one of them being [go-fuzz][12] which Filo mentions in his GitHub comments
|
||||
|
||||
> _The track record of go-fuzz provides pretty amazing evidence that fuzzing is good at finding bugs that humans had not found. In my experience, just a few CPU minutes of fuzzing can be extremely effective at the margin_
|
||||
|
||||
### Why add native fuzzing support in Go
|
||||
|
||||
If the requirement is to fuzz Go programs and existing tools like `go-fuzz` could do it, why add native fuzzing support to the language? The [Go fuzzing design draft][13] provides some rationale for doing so. The idea was to bring simplicity to the process as using the above tools adds more work for the developer and has many missing features. If you are new to fuzzing, I recommend reading the design draft document.
|
||||
|
||||
> Developers could use tools like go-fuzz or fzgo (built on top of go-fuzz) to solve some of their needs. However, each existing solution involves more work than typical Go testing and is missing crucial features. Fuzz testing shouldn't be any more complicated or less feature-complete than other types of Go testing (like benchmarking or unit testing). Existing solutions add extra overhead, such as custom command-line tools,
|
||||
|
||||
### Fuzz tooling
|
||||
|
||||
Fuzzing is a welcome addition to the Go language's long list of desired features. Although experimental for now, it's expected to become robust in upcoming releases. This gives sufficient time to try it out and explore its use cases. Rather than seeing it as an overhead, it should be seen as an effective testing tool to uncover hidden bugs if used correctly. Teams using Go should encourage its use, starting with developers writing small fuzz tests and testing teams extending it further to utilize its potential fully.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/1/native-go-fuzz-testing
|
||||
|
||||
作者:[Gaurav Kamathe][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/gkamathe
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop)
|
||||
[2]: https://go.dev/
|
||||
[3]: https://pkg.go.dev/testing
|
||||
[4]: https://github.com/golang/go/issues/44551
|
||||
[5]: https://go.dev/blog/fuzz-beta
|
||||
[6]: https://go.dev/doc/tutorial/fuzz
|
||||
[7]: https://github.com/golang/go/issues/44551#issuecomment-784584785
|
||||
[8]: https://github.com/golang/go/issues/44551#issuecomment-784655571
|
||||
[9]: https://github.com/google/syzkaller
|
||||
[10]: https://github.com/google/syzkaller/blob/master/docs/linux/found_bugs.md
|
||||
[11]: https://github.com/google/AFL
|
||||
[12]: https://github.com/dvyukov/go-fuzz
|
||||
[13]: https://go.googlesource.com/proposal/+/master/design/draft-fuzzing.md
|
236
sources/tech/20220124 Hosting my static sites with nginx.md
Normal file
236
sources/tech/20220124 Hosting my static sites with nginx.md
Normal file
@ -0,0 +1,236 @@
|
||||
[#]: subject: "Hosting my static sites with nginx"
|
||||
[#]: via: "https://jvns.ca/blog/2022/01/24/hosting-my-static-sites-with-nginx/"
|
||||
[#]: author: "Julia Evans https://jvns.ca/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Hosting my static sites with nginx
|
||||
======
|
||||
|
||||
Hello! Recently I’ve been thinking about putting my static sites on servers that I run myself instead of using managed services like Netlify or GitHub Pages.
|
||||
|
||||
Originally I thought that running my own servers would require a lot of maintenance and be a huge pain, but I was chatting with Wesley about what kind of maintainance [their servers][1] require, and they convinced me that it might not be that bad.
|
||||
|
||||
So I decided to try out moving all my static sites to a $5/month server to see what it was like.
|
||||
|
||||
Everything in here is pretty standard but I wanted to write down what I did anyway because there are a surprising number of decisions and I like to see what choices other people make.
|
||||
|
||||
### the constraint: only static sites
|
||||
|
||||
To keep things simple, I decided that this server would only run `nginx` and only serve static sites. I have about 10 static sites right now, mostly projects for [wizard zines][2].
|
||||
|
||||
I decided to use a $5/month DigitalOcean droplet, which should very easily be able to handle my existing traffic (about 3 requests per second and 100GB of bandwidth per month). Right now it’s using about 1% of its CPU. I picked DigitalOcean because it was what I’ve used before.
|
||||
|
||||
Also all the sites were already behind a CDN so they’re still behind the same CDN.
|
||||
|
||||
### problem 1: getting a clean Git repo for each build
|
||||
|
||||
This was the most interesting problem so let’s talk about it first!
|
||||
|
||||
Building the static sites might seem pretty easy – each one of them already has a working build script.
|
||||
|
||||
But I have pretty bad hygiene around files on my laptop – often I have a bunch of uncommitted files that I don’t want to go onto the live site. So I wanted to start every build with a clean Git repo. I also wanted this to be _fast_ – I’m impatient so I wanted to be able to build and deploy most of my sites in less than 10 seconds.
|
||||
|
||||
I handled this by hacking together a tiny build system called [tinybuild][3]. It’s basically a 4-line bash script, but with extra some command line arguments and error checking. Here are the 4 lines of bash:
|
||||
|
||||
```
|
||||
|
||||
docker build - -t tinybuild < Dockerfile
|
||||
CONTAINER_ID=$(docker run -v "$PWD":/src -v "./deploy:/artifact" -d -t tinybuild /bin/bash)
|
||||
docker exec $CONTAINER_ID bash -c "git clone /src /build && cd /build && bash /src/scripts/build.sh"
|
||||
docker exec $CONTAINER_ID bash -c "mv /build/public/* /artifact"
|
||||
|
||||
```
|
||||
|
||||
These 4 lines:
|
||||
|
||||
1. Build a Dockerfile with all the dependencies for that build
|
||||
2. Clone my repo into `/build` in the container, so that I always start with a clean Git repo
|
||||
3. Run the build script (`/src/scripts/build.sh`)
|
||||
4. Copy the build artifacts into `./deploy` in the local directory
|
||||
|
||||
|
||||
|
||||
Then once I have `./deploy`, I can rsync the result onto the server
|
||||
|
||||
It’s fast because:
|
||||
|
||||
* the `docker build -` means I don’t send any state from the repository to the Docker daemon. This matters because one of my repos is 1GB (it has a lot of PDFs in it) and sending all that to the Docker daemon takes forever
|
||||
* the `git clone` is from the local filesystem and I have a SSD so it’s fast even for a 1GB repo
|
||||
* most of the build scripts just run `hugo` or `cat` so they’re fast. The `npm` build scripts take maybe 30 seconds.
|
||||
|
||||
|
||||
|
||||
### apparently local git clones make hard links
|
||||
|
||||
A tiny interesting fact: I tried to do `git clone --depth 1` to speed up my git clone, but git gave me this warning:
|
||||
|
||||
```
|
||||
|
||||
warning: --depth is ignored in local clones; use file:// instead.
|
||||
|
||||
```
|
||||
|
||||
I think what’s going on here is that git makes hard links of all the objects to make a local clone (which is a lot faster than copying). So I guess with the hard links approach `--depth 1` doesn’t make sense for some reason? And `file://` forces git to copy all objects instead, which is actually slower.
|
||||
|
||||
### bonus: now my builds are faster than they used to be!
|
||||
|
||||
One nice thing about this is that my build/deploy time is less than it was on Netlify. For `jvns.ca` it’s about 7 seconds to build and deploy the site instead of about a minute previously.
|
||||
|
||||
### running the builds on my laptop seems nice
|
||||
|
||||
I’m the only person who develops all of my sites, so doing all the builds in a Docker container on my computer seems to make sense. My computer is pretty fast and all the files are already right there! No giant downloads! And doing it in a Docker container keeps the build isolated.
|
||||
|
||||
### example build scripts
|
||||
|
||||
Here are the build scripts for this blog (`jvns.ca`).
|
||||
|
||||
**Dockerfile**
|
||||
|
||||
```
|
||||
|
||||
FROM ubuntu:20.04
|
||||
|
||||
RUN apt-get update && apt-get install -y git
|
||||
RUN apt-get install -y wget python2
|
||||
RUN wget https://github.com/gohugoio/hugo/releases/download/v0.40.1/hugo_0.40.1_Linux-64bit.tar.gz
|
||||
RUN wget https://github.com/sass/dart-sass/releases/download/1.49.0/dart-sass-1.49.0-linux-x64.tar.gz
|
||||
RUN tar -xf dart-sass-1.49.0-linux-x64.tar.gz
|
||||
RUN tar -xf hugo_0.40.1_Linux-64bit.tar.gz
|
||||
RUN mv hugo /usr/bin/hugo
|
||||
RUN mv dart-sass/sass /usr/bin/sass
|
||||
|
||||
```
|
||||
|
||||
**build-docker.sh**:
|
||||
|
||||
```
|
||||
|
||||
set -eu
|
||||
scripts/parse_titles.py
|
||||
sass sass/:static/stylesheets/
|
||||
hugo
|
||||
|
||||
```
|
||||
|
||||
**deploy.sh**:
|
||||
|
||||
```
|
||||
|
||||
set -eu
|
||||
tinybuild -s scripts/build-docker.sh \
|
||||
-l "$PWD/deploy" \
|
||||
-c /build/public
|
||||
|
||||
rsync-showdiff ./deploy/ [email protected]:/var/www/jvns.ca
|
||||
rm -rf ./deploy
|
||||
|
||||
```
|
||||
|
||||
### problem 2: getting rsync to just show me which files it updated
|
||||
|
||||
When I started using rsync to sync the files, it would list every single file instead of just files that had changed. I think this was because I was generating new files for every build, so the timestamps were always newer than the files on the server.
|
||||
|
||||
I did a bunch of Googling and figured out this incantation to get rsync to just show me files that were updated;
|
||||
|
||||
```
|
||||
|
||||
rsync -avc --out-format='%n' "[email protected]" | grep --line-buffered -v '/$'
|
||||
|
||||
```
|
||||
|
||||
I put that in a script called `rsync-showdiff` so I could reuse it. There might be a better way, but this seems to work.
|
||||
|
||||
### problem 3: configuration management
|
||||
|
||||
All I needed to do to set up the server was:
|
||||
|
||||
* install nginx
|
||||
* create directories in /var/www for each site, like `/var/www/jvns.ca`
|
||||
* create an nginx configuration for each site, like `/etc/nginx/sites-enabled/jvns.ca.conf`
|
||||
* deploy the files (with my deploy script above)
|
||||
|
||||
|
||||
|
||||
I wanted to use some kind of configuration management to do this because that’s how I’m used to managing servers. I’ve used Puppet a lot in the past at work, but I don’t really _like_ using Puppet. So I decided to use Ansible even though I’d never used it before because it seemed simpler than using Puppet. Here’s [my current Ansible configuration][4], minus some of the templates it depends on.
|
||||
|
||||
I didn’t use any Ansible plugins because I wanted to maximize the probability that I would actually be able to run this thing in 3 years.
|
||||
|
||||
The most complicated thing in there is probably the `reload nginx` handler, which makes sure that the configuration is still valid after I make an nginx configuration update.
|
||||
|
||||
### problem 4: replacing a lambda function
|
||||
|
||||
I was using one Netlify lambda function to calculate purchasing power parity (“PPP”) for countries that have a weaker currency relative to the US on <https://wizardzines.com>. Basically it gets your country using IP geolocation and then returns a discount code if you’re in a country that has a discount code. (like 70% off for India, for example). So I needed to replace it.
|
||||
|
||||
I handled this by rewriting the (very small) program in Go, copying the static binary to the server, and adding a `proxy_pass` for that site.
|
||||
|
||||
The program just looks up the country code from the [geolocation HTTP header][5] in a hashmap, so it doesn’t seem like it should cause maintenance problems.
|
||||
|
||||
### a very simple nginx config
|
||||
|
||||
I used the same nginx config file for templates for almost all my sites:
|
||||
|
||||
```
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
root /var/www/{{item.dir}};
|
||||
index index.html index.htm;
|
||||
server_name {{item.server}};
|
||||
|
||||
location / {
|
||||
# First attempt to serve request as file, then
|
||||
# as directory, then fall back to displaying a 404.
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
The `{{item.dir}}` is an Ansible thing.
|
||||
|
||||
I also added support for custom 404 pages (`error_page /404.html`) in the main `nginx.conf`.
|
||||
|
||||
I’ll probably add TLS support with certbot later. My CDN handles TLS to the client, I just need to make the connection between the CDN and the origin server use TLS
|
||||
|
||||
Also I don’t know if there are problems with using such a simple nginx config. Maybe I’ll learn about them!
|
||||
|
||||
### bonus: I can find 404s more easily
|
||||
|
||||
Another nice bonus of this setup is that it’s easier to see what’s happening with my site – I can just look at the nginx logs!
|
||||
|
||||
I ran `grep 404 /var/log/nginx/access.log` to figure out if I’d broken anything during the migration, and I actually ended up finding a lot of links that had been broken for many years, but that I’d just never noticed.
|
||||
|
||||
Netlify’s analytics has a “Top resources not found” that shows you the most common 404s, but I don’t think there’s any way to see _all_ 404s.
|
||||
|
||||
### a small factor: costs
|
||||
|
||||
Part of my motivation for this switch was – I was getting close to the Netlify free tier’s bandwidth limit (100GB/month), and Netlify charges $20/100GB for additional bandwidth. Digital Ocean charges $1/100GB for additional bandwidth (20x less), and my droplet comes with 1TB of bandwidth. So the bandwidth pricing feels a lot more reasonable to me.
|
||||
|
||||
### we’ll see how it goes!
|
||||
|
||||
All my static sites are running on my own server now. I don’t really know what this will be like to maintain, we’ll see how it goes – maybe I’ll like it! maybe I’ll hate it! I definitely like the faster build times and that I can easily look at my nginx logs.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://jvns.ca/blog/2022/01/24/hosting-my-static-sites-with-nginx/
|
||||
|
||||
作者:[Julia Evans][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://jvns.ca/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://blog.wesleyac.com/posts/how-i-run-my-servers
|
||||
[2]: https://wizardzines.com
|
||||
[3]: https://github.com/jvns/tinybuild/
|
||||
[4]: https://gist.github.com/jvns/06754e9e65b49dd461fefa071dd4aace
|
||||
[5]: https://support.cloudflare.com/hc/en-us/articles/200168236-Configuring-Cloudflare-IP-Geolocation
|
@ -0,0 +1,130 @@
|
||||
[#]: subject: "Why choose Rocket.Chat for your open source chat tool"
|
||||
[#]: via: "https://opensource.com/article/22/1/rocketchat-data-privacy"
|
||||
[#]: author: "Manuela Massochin https://opensource.com/users/manuela-massochin"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Why choose Rocket.Chat for your open source chat tool
|
||||
======
|
||||
Rocket.Chat is an open source communications platform for organizations
|
||||
that put data privacy first.
|
||||
![Chat via email][1]
|
||||
|
||||
Created in 2015, [Rocket.Chat][2] is a fully open source and customizable communications platform designed for communities and organizations with high standards for data protection. Rocket.Chat enables communication through federation, and over 12 million people are using it for team chat, customer service, secure file sharing, and much more. Rocket.Chat is in many ways the world's most comprehensive open source communications platform.
|
||||
|
||||
### Install Rocket.Chat
|
||||
|
||||
Rocket.Chat is open source, so you can install and host it yourself if you want. You can deploy it using all industry-standard deployment methods, including Podman, Docker, or Kubernetes, all of which are supported officially by Rocket.Chat. It's also available as a one-click app on many server and cloud providers.
|
||||
|
||||
To run Rocket.Chat using Docker, downloading the `docker-compose.yml` file:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
$ wget -O docker-compose.yml \
|
||||
<https://raw.githubusercontent.com/RocketChat/Rocket.Chat/develop/docker-compose.yml>
|
||||
|
||||
```
|
||||
|
||||
Now deploy Rocket.Chat:
|
||||
|
||||
|
||||
```
|
||||
`$ docker-compose up -d`
|
||||
```
|
||||
|
||||
[Firewall configuration][3] may be necessary, depending on your setup.
|
||||
|
||||
Once you have the server running, you can download the Rocket.Chat client app on your desktop and mobile device.
|
||||
|
||||
Alternatively, you can purchase a hosting from Rocket.Chat itself. There's a free trial, so you can evaluate it before committing, but Rocket.Chat is used in over 130 countries, and is the go-to messaging app for organizations including The World Bank, the US Navy, and [Audi][4].
|
||||
|
||||
### Rocket.Chat's main features
|
||||
|
||||
Due to its scalability and adaptability, organizations can leverage Rocket.Chat in multiple ways, from internal communication to virtual events. Rocket.Chat's openness even allows companies to create new products on top of its code.
|
||||
|
||||
![Rocket.Chat UI][5]
|
||||
|
||||
Manuela Massochin (CC BY-SA 4.0)
|
||||
|
||||
#### Talk to people outside of Rocket.Chat
|
||||
|
||||
Communicating with other teams shouldn't be a hassle just because they use different communication platforms. Using federation, Rocket.Chat allows you to chat with partners, vendors, or any external organization, regardless of which collaboration platform they use. You can talk to people across Slack, MS Teams, Skype for Business, and other communications platforms.
|
||||
|
||||
### 5 reasons organizations choose Rocket.Chat
|
||||
|
||||
Your data is important, whether it's personal or work-related. It's a common misunderstanding that no criminal is interested enough in what you do online to bother stealing it, but ransomware is a largely automated process that doesn't require anyone to care about you. All it needs is data that's important to you to be exposed, stolen, and then ransomed back to you. To combat this, you need sufficient privacy in your online communication.
|
||||
|
||||
That's one reason to choose Rocket.Chat, but not the only one. Here are five good reasons to choose Rocket.Chat over a non-open application:
|
||||
|
||||
#### Open source
|
||||
|
||||
First things first: Rocket.Chat has been open source since day one. With over 1000 contributors worldwide, it has standards for security, data privacy, and transparency that only open source software can offer.
|
||||
|
||||
Rocket.Chat is full of out-of-the-box features and you can make it even more useful, efficient, and fun with integrations and add-on apps. This is just one of the [advantages of being open source.][6] Based on webhooks, its integrations connect the tools you already use with your workspace, providing a simplified workflow and increased productivity.
|
||||
|
||||
In Rocket.Chat's [Marketplace][7] you'll find apps to integrate with other services, such as WhatsApp, Twitter, Jira, Dialogflow, Facebook Messenger, and many more. They're just one click away from being added to your workplace.
|
||||
|
||||
#### Streamlined communication for teams and customers
|
||||
|
||||
You don't have to take a scientific survey to know that employees want communication to be streamlined through a single application. Rocket.Chat accommodates all sorts of workplace communication and allows you to divide conversations into channels, threads, and discussions to work with your remote colleagues.
|
||||
|
||||
It also has a comprehensive set of team collaboration features that ensure productivity, such as unlimited access to chat history, broadcast channels, and integrations.
|
||||
|
||||
Not only does Rocket.Chat allow you to chat with colleagues, but it also lets you get in touch with customers and centralize your messages in a single inbox. Due to its comprehensive set of integrations, you can provide customer support entirely from Rocket.Chat, regardless of the channel your customers reach out to you from.
|
||||
|
||||
Rocket.Chat integrates with common social media channels (including Facebook Messenger, email, WhatsApp, Telegram, and SMS) and also provides integrations with CRMs, chatbots, and machine learning apps.
|
||||
|
||||
#### SaaS or self-managed hosting
|
||||
|
||||
Rocket.Chat can be deployed in multiple ways, depending on business needs. You can choose between deploying it on Rocket.Chat's cloud (built on Docker and Kubernetes), cloud servers under your control, or your own premises.
|
||||
|
||||
Rocket.Chat offers one-click deployments for more than thirty deployment methods across many on-premise and cloud solutions. For companies worried about data security, its on-premise hosting option puts you in complete control of your data, meaning nothing leaves your infrastructure. It can be hosted entirely behind your firewall or even on an air-gapped network.
|
||||
|
||||
#### Complete data privacy, security, and ownership
|
||||
|
||||
Rocket.Chat is ISO27001-certified and supports compliance with GDPR, HIPAA, FINRA, FedRAMP, and more.
|
||||
|
||||
Its SaaS version is hosted in secure and audited data centers, ensuring the best performance and meeting strict data localization requirements. For the on-premise version, you'll be able to leverage the self-managed installation in your data center with layered security options (e.g., SSL, VPN, and DMZ).
|
||||
|
||||
The self-managed option is a common choice for many companies with high standards for data security, like the American cybersecurity firm [OnShore][8] and the [Government of British Columbia][9].
|
||||
|
||||
#### High availability infrastructure and microservices architecture
|
||||
|
||||
A common pain point for fast-growing companies and startups is finding software solutions that grow with them. Rocket.Chat's microservices architecture allows companies to scale easily and save on infrastructure costs.
|
||||
|
||||
A microservices architecture means that the application is developed as a suite of small services. When it needs to be scaled, only parts of the system will need to be adjusted instead of the whole system—saving companies time and money.
|
||||
|
||||
If you're pitching Rocket.Chat to your boss, it's significant that you can start using Rocket.Chat for free, or opt for one of its paid SaaS and self-hosted plans starting at $2 USD/user month. Paid plans offer a high availability infrastructure, microservices, administrative features (including LDAP and Active Directory, social media log in, an Atlassian bundle, and more), and unlimited push notifications.
|
||||
|
||||
### Try Rocket.Chat
|
||||
|
||||
Whether you host your own Rocket.Chat server or you opt for managed hosting, it's easy to [get started][10] with this great chat tool. Consolidate your communication into one open source application, increase online privacy, and support open source.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/1/rocketchat-data-privacy
|
||||
|
||||
作者:[Manuela Massochin][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/manuela-massochin
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/email_chat_communication_message.png?itok=LKjiLnQu (Chat via email)
|
||||
[2]: http://rocket.chat/
|
||||
[3]: https://www.redhat.com/sysadmin/secure-linux-network-firewall-cmd
|
||||
[4]: https://rocket.chat/customer-stories/audi
|
||||
[5]: https://opensource.com/sites/default/files/rocket-chat-ui.png (Rocket.Chat UI)
|
||||
[6]: https://rocket.chat/blog/open-source-software-advantages
|
||||
[7]: https://rocket.chat/marketplace
|
||||
[8]: https://pt-br.rocket.chat/customer-stories/onshore
|
||||
[9]: https://pt-br.rocket.chat/customer-stories/government-of-british-columbia
|
||||
[10]: https://rocket.chat/install
|
@ -0,0 +1,189 @@
|
||||
[#]: subject: "Creating and initializing lists in Java and Groovy"
|
||||
[#]: via: "https://opensource.com/article/22/1/creating-lists-groovy-java"
|
||||
[#]: author: "Chris Hermansen https://opensource.com/users/clhermansen"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Creating and initializing lists in Java and Groovy
|
||||
======
|
||||
Create and initialize a list of integers, first in Java and then in
|
||||
Groovy.
|
||||
![Developing code.][1]
|
||||
|
||||
I like the [Groovy programming language][2] a lot. I like it because, in the end, I like Java, even though Java sometimes feels clumsy. And because I like Java so much, I don't find many other JVM languages especially attractive. Kotlin, Scala, and Clojure, for example, don't feel much like Java, pursuing their own perspectives on what makes a good programming language. Groovy is different; in my view, Groovy is the perfect antidote to those situations when a programmer who likes Java just needs something a bit more flexible, compact, and sometimes even straightforward.
|
||||
|
||||
A good example is the List data structure, which is used to hold an ordered list of numbers, strings, or objects, and allows the programmer to iterate through those items in an efficient fashion. Especially for people writing and maintaining scripts, "efficiency" is mostly about clear and brief expressions that don't require a bunch of ceremony that obscures the intent of the code.
|
||||
|
||||
### Install Java and Groovy
|
||||
|
||||
Groovy is based on Java and requires a Java installation as well. Both a recent and decent version of Java and Groovy might be in your Linux distribution's repositories. Otherwise, you can install Groovy by following [these instructions][3]. A nice alternative for Linux users is SDKMan, which can be used to get multiple versions of Java, Groovy, and many other related tools. For this article, I use SDK's releases of:
|
||||
|
||||
* Java: version 11.0.12-open of OpenJDK 11
|
||||
* Groovy: version 3.0.8
|
||||
|
||||
|
||||
|
||||
### Back to the problem
|
||||
|
||||
There have been various ways of instantiating and initializing lists in Java since they were first introduced (I think that was Java 1.5, but please don't quote me). Two current interesting ways involve two different libraries: **java.util.Arrays** and **java.util.List**.
|
||||
|
||||
#### Use java.util.Arrays
|
||||
|
||||
**java.util.Arrays** defines the static method **asList()**, which can be used to create a list that is backed by an array and is therefore also immutable, though its elements are mutable. Here it is in action:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
var a1 = [Arrays][4].asList(1,2,3,4,5,6,7,8,9,10); // immutable list of mutable elements
|
||||
|
||||
[System][5].out.println("a1 = " + a1);
|
||||
[System][5].out.println("a1 is an instance of " + a1.getClass());
|
||||
|
||||
// output is
|
||||
// a1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
// a1 is an instance of class java.util.Arrays$ArrayList
|
||||
|
||||
a1.set(0,0); // succeeds
|
||||
[System][5].out.println("a1 = " + a1); // output is
|
||||
// a1 = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
|
||||
a1.add(11); // fails producing
|
||||
// Exception in thread "main" java.lang.UnsupportedOperationException
|
||||
[System][5].out.println("a1 = " + a1); // not reached
|
||||
|
||||
```
|
||||
|
||||
#### Use java.util.List
|
||||
|
||||
**java.util.List** defines the static method **of().** This can be used to create an immutable list with elements that may or may not be immutable, depending on whether the items in the list of elements are immutable. Here is this version in action:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
var a2 = [List][6].of(1,2,3,4,5,6,7,8,9,10);
|
||||
|
||||
[System][5].out.println("a2 = " + a2);
|
||||
[System][5].out.println("a2 is an instance of " + a2.getClass());
|
||||
|
||||
// output is
|
||||
// a2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
// a2 is an instance of class java.util.ImmutableCollections$ListN
|
||||
|
||||
a2.set(0,0); // fails producing
|
||||
// Exception in thread "main" java.lang.UnsupportedOperationException
|
||||
[System][5].out.println("a2 = " + a2); // not reached
|
||||
|
||||
a2.add(11); // also fails for same reason if above two lines commented out
|
||||
[System][5].out.println("a2 = " + a2); // not reached
|
||||
|
||||
```
|
||||
|
||||
So, I can use either **Arrays.asList()** or **List.of()** if I want a list that can't be grown (or shrunk) and may or may not have alterable elements.
|
||||
|
||||
If I want an initialized mutable list I would probably resort to using those immutable-ish lists as arguments to a list constructor, for example:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
var a1 = new ArrayList<Integer>([Arrays][4].asList(1,2,3,4,5,6,7,8,9,10));
|
||||
|
||||
[System][5].out.println("a1 = " + a1);
|
||||
[System][5].out.println("a1 is an instance of " + a1.getClass());
|
||||
|
||||
// output is
|
||||
// a1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
// a1 is an instance of class java.util.ArrayList
|
||||
|
||||
a1.set(0,0);
|
||||
[System][5].out.println("a1 = " + a1);
|
||||
|
||||
//output is
|
||||
// a1 = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
|
||||
a1.add(11);
|
||||
[System][5].out.println("a1 = " + a1);
|
||||
|
||||
// output is
|
||||
// a1 = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
|
||||
|
||||
```
|
||||
|
||||
Note that the **Arrays.AsList()** was used to initialize the new **ArrayList<Integer>()**, which created a mutable copy of the argument.
|
||||
|
||||
Now maybe it's just me, but this seems like an awful lot of theory—needing to be situationally aware of the details of **java.util.Arrays** or **java.util.List**—just to create and initialize a mutable list of integers, though the actual statement used is not overly "ceremonial." Here it is again, just for reference:
|
||||
|
||||
|
||||
```
|
||||
`var a1 = new ArrayList<Integer>(Arrays.asList(1,2,3,4,5,6,7,8,9,10));`
|
||||
```
|
||||
|
||||
### The Groovy approach
|
||||
|
||||
Here is the Groovy version of the above:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
def a1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
|
||||
println "a1 = $a1"
|
||||
println "a1 is an instance of ${a1.getClass()}"
|
||||
|
||||
// output is
|
||||
// a1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
// a1 is an instance of class java.util.ArrayList
|
||||
|
||||
a1[0] = 0
|
||||
println "a1 = $a1"
|
||||
|
||||
// output is
|
||||
// a1 = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
|
||||
a1 << 11
|
||||
println "a1 = $a1"
|
||||
|
||||
// output is
|
||||
// a1 = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
|
||||
|
||||
```
|
||||
|
||||
At a glance, Groovy uses the **def** keyword rather than **var**. I also know that I can create a list representation by putting a list of things—in this case, integers—between brackets. Moreover, the list instance so created is precisely what I want: a mutable instance of **ArrayList**.
|
||||
|
||||
Now maybe it's just me, again, but the above seems to be a whole lot simpler—no remembering the semi-immutable results returned by **.of()** or **.asList()** and compensating for them. It's also nice that I can refer to a specific element of the list using the brackets with an index value between them, rather than the method call **set()**, and that the `<<` operator appends to the end of a list so that I don't have to use the method call **add()**. Also, did you notice the lack of semi-colons? Yep, in Groovy, they're optional. And finally, observe the use of string interpolation, with the **$variable** or **${expression}** inside a double-quoted string providing that capability.
|
||||
|
||||
There’s more going on "under the covers" in the Groovy world. That definition is an example of dynamic typing (the default in Groovy) versus the static typing of Java. In the Groovy definition line, the type of **a1** is inferred at runtime from the type of the expression evaluated on the right-hand side. Now we all know that dynamic programming languages give us great power and that with great power comes many good opportunities to mess up. But for programmers who don't like dynamic typing, Groovy offers the option of static typing.
|
||||
|
||||
### Groovy resources
|
||||
|
||||
The Apache Groovy site I mentioned at the beginning has a lot of great documentation. Another excellent Groovy resource is [Mr. Haki][7]. And a really good reason to learn Groovy is to go on and learn [Grails][8], which is a wonderfully productive full-stack web framework built on top of excellent components like Hibernate, Spring Boot, and Micronaut.
|
||||
|
||||
This article is dedicated to my very dear friend Anil Mukhi, who passed away on 3 January 2022. Thank you, Anil, for giving me the opportunity to learn so much about Groovy, Grails, and horse racing data.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/1/creating-lists-groovy-java
|
||||
|
||||
作者:[Chris Hermansen][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/clhermansen
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_development_programming.png?itok=M_QDcgz5 (Developing code.)
|
||||
[2]: http://www.groovy-lang.org/
|
||||
[3]: http://www.groovy-lang.org/install.html
|
||||
[4]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+arrays
|
||||
[5]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system
|
||||
[6]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+list
|
||||
[7]: https://www.mrhaki.com/
|
||||
[8]: https://grails.org/
|
461
sources/tech/20220126 Quarkus and Mutiny.md
Normal file
461
sources/tech/20220126 Quarkus and Mutiny.md
Normal file
@ -0,0 +1,461 @@
|
||||
[#]: subject: "Quarkus and Mutiny"
|
||||
[#]: via: "https://fedoramagazine.org/quarkus-and-mutiny/"
|
||||
[#]: author: "Dave O'Meara https://fedoramagazine.org/author/daveome/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Quarkus and Mutiny
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
Background image by [Eugene Golovesov][2] on [Unsplash][3] (cropped)
|
||||
|
||||
Quarkus is a foundation for building Java based applications; whether for the desktop, server or cloud. An excellent write up on usage can be found at <https://fedoramagazine.org/using-the-quarkus-framework-on-fedora-silverblue-just-a-quick-look/>. This article is primer for coding asynchronous processes using Quarkus and Mutiny.
|
||||
|
||||
So what is Mutiny? Mutiny allows streaming of objects in an event driven flow. The stream might originate from a local process or something remote like a database. Mutiny streaming is accomplished by either a _Uni_ or a _Multi_ object. We are using the Uni to stream one object — a _List_ containing many integers. A subscribe pattern initiates the stream.
|
||||
|
||||
A traditional program is executed and results are returned before continuing. Mutiny can easily support non-blocking code to run processes concurrently. RxJava, ReactiveX and even native Java are alternatives. Mutiny is easy to use (the exposed API is minimal) and it is the default in many of the Quarkus extensions. The two extensions used are _quarkus-mutiny_ and _quarkus-vertx_. Vert.x is the underlying framework wrapped by Quarkus. The Promise classes are supplied by quarkus-vertx. A _promise_ returns a Uni stream when the process is complete. To get started, install a Java JDK and Maven.
|
||||
|
||||
### Bootstrap
|
||||
|
||||
The minimum requirement is either Java-11 _or_ Java-17 with Maven.
|
||||
|
||||
**With Java-11**:
|
||||
|
||||
```
|
||||
|
||||
$ sudo dnf install -y java-11-openjdk-devel maven
|
||||
|
||||
```
|
||||
|
||||
**With Java-17**:
|
||||
|
||||
```
|
||||
|
||||
$ sudo dnf install -y java-17-openjdk-devel maven
|
||||
|
||||
```
|
||||
|
||||
Bootstrap **Quarkus **and Mutiny with the Maven call below. The extension _quarkus-vertx_ is not included to demonstrate how to add additional extensions. Locate an appropriate directory before executing. The directory _mutiny-demo_ will be created with the initial application.
|
||||
|
||||
```
|
||||
|
||||
$ mvn io.quarkus.platform:quarkus-maven-plugin:2.6.2.Final:create \
|
||||
-DprojectGroupId=fedoramag \
|
||||
-DprojectArtifactId=mutiny-demo \
|
||||
-DprojectVersion=1.0.0 \
|
||||
-DclassName="org.demo.mag.Startup" \
|
||||
-Dextensions="mutiny" \
|
||||
-DbuildTool=gradle
|
||||
|
||||
```
|
||||
|
||||
Now that Gradle is bootstrapped, other extensions can be added. In the _mutiny-demo_ directory execute:
|
||||
|
||||
```
|
||||
|
||||
$ ./gradlew addExtension --extensions='quarkus-vertx'
|
||||
|
||||
```
|
||||
|
||||
To view all available extensions execute:
|
||||
|
||||
```
|
||||
|
||||
$ ./gradlew listExtensions
|
||||
|
||||
```
|
||||
|
||||
To get all of the defined Gradle tasks execute:
|
||||
|
||||
```
|
||||
|
||||
$ ./gradlew tasks
|
||||
|
||||
```
|
||||
|
||||
### Mutiny Code
|
||||
|
||||
The ****_className_ entry on the Quarkus bootstrap is _org.demo.mag.Startup_ which creates the file _src/main/java/org/demo/map/Startup.java_. Replace the contents with the following code:
|
||||
|
||||
```
|
||||
|
||||
package org.demo.mag;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.function.IntSupplier;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import io.quarkus.runtime.Quarkus;
|
||||
import io.quarkus.runtime.QuarkusApplication;
|
||||
import io.quarkus.runtime.annotations.QuarkusMain;
|
||||
import io.smallrye.mutiny.Uni;
|
||||
import io.smallrye.mutiny.tuples.Tuple2;
|
||||
import io.vertx.mutiny.core.Promise;
|
||||
|
||||
@QuarkusMain
|
||||
public class Startup implements QuarkusApplication {
|
||||
public static void main(String... args) {
|
||||
Quarkus.run(Startup.class, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int run(String... args) throws InterruptedException, ExecutionException {
|
||||
final Promise<String> finalMessage = Promise.promise();
|
||||
final String elapsedTime = "Elapsed time for asynchronous method: %d milliseconds";
|
||||
final int[] syncResults = {0};
|
||||
|
||||
Application.runTraditionalMethod();
|
||||
|
||||
final Long millis = System.currentTimeMillis();
|
||||
Promise<List<Integer>> promiseRange = Application.getRange(115000);
|
||||
Promise<Tuple2<Promise<List<Integer>>, Promise<List<Integer>>>> promiseCombined = Application.getCombined(10000, 15000);
|
||||
Promise<List<Integer>> promiseReverse = Application.getReverse(24000);
|
||||
/*
|
||||
* Retrieve the Uni stream and on the complete event obtain the List<Integer>
|
||||
*/
|
||||
promiseRange.future().onItem().invoke(list -> {
|
||||
System.out.println("Primes Range: " + list.size());
|
||||
if(syncResults[0] == 1) {
|
||||
finalMessage.complete(String.format(elapsedTime, System.currentTimeMillis() - millis));
|
||||
} {
|
||||
syncResults[0] = 2;
|
||||
}
|
||||
return;
|
||||
}).subscribeAsCompletionStage();
|
||||
|
||||
promiseReverse.future().onItem().invoke(list -> {
|
||||
System.out.println("Primes Reverse: " + list.size());
|
||||
return;
|
||||
}).subscribeAsCompletionStage();
|
||||
/*
|
||||
* Notice that this finishes before the other two prime generators(smaller lists).
|
||||
*/
|
||||
promiseCombined.future().onItem().invoke(p -> {
|
||||
/*
|
||||
* Notice that "Combined Range" displays first
|
||||
*/
|
||||
p.getItem2().future().invoke(reverse -> {
|
||||
System.out.println("Combined Reverse: " + reverse.size());
|
||||
return;
|
||||
}).subscribeAsCompletionStage();
|
||||
|
||||
p.getItem1().future().invoke(range -> {
|
||||
System.out.println("Combined Range: " + range.size());
|
||||
/*
|
||||
* Nesting promises to get multple results together
|
||||
*/
|
||||
p.getItem2().future().invoke(reverse -> {
|
||||
System.out.println(String.format("Asserting that expected primes are equal: %d -- %d", range.get(0), reverse.get(reverse.size() - 1)));
|
||||
assert range.get(0) == reverse.get(reverse.size() - 1)
|
||||
: "Generated primes incorrect";
|
||||
if(syncResults[0] == 2) {
|
||||
finalMessage.complete(String.format(elapsedTime, System.currentTimeMillis() - millis));
|
||||
} else {
|
||||
syncResults[0] = 1;
|
||||
}
|
||||
return;
|
||||
}).subscribeAsCompletionStage();
|
||||
return;
|
||||
}).subscribeAsCompletionStage();
|
||||
return;
|
||||
}).subscribeAsCompletionStage();
|
||||
// Note: on very fast machines this may not display first.
|
||||
System.out.println("This should display first - indicating asynchronous code.");
|
||||
// blocking for final message
|
||||
String elapsedMessage = finalMessage.futureAndAwait();
|
||||
System.out.println(elapsedMessage);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static class Application {
|
||||
|
||||
public static Promise<List<Integer>> getRange(int n) {
|
||||
final Promise<List<Integer>> promise = Promise.promise();
|
||||
// non-blocking - this is only for demonstration(emulating some remote call)
|
||||
new Thread(() -> {
|
||||
try {
|
||||
/*
|
||||
* RangeGeneratedPrimes.primes is blocking, only returns when done
|
||||
*/
|
||||
promise.complete(RangeGeneratedPrimes.primes(n));
|
||||
} catch (Exception exception) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}).start();
|
||||
|
||||
return promise;
|
||||
}
|
||||
|
||||
public static Promise<List<Integer>> getReverse(int n) {
|
||||
final Promise<List<Integer>> promise = Promise.promise();
|
||||
|
||||
new Thread(() -> {
|
||||
try {
|
||||
// Generating a new object stream
|
||||
promise.complete(ReverseGeneratedPrimes.primes(n));
|
||||
} catch (Exception exception) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}).start();
|
||||
|
||||
return promise;
|
||||
}
|
||||
|
||||
public static Promise<Tuple2<Promise<List<Integer>>, Promise<List<Integer>>>> getCombined(int ran, int rev) {
|
||||
final Promise<Tuple2<Promise<List<Integer>>, Promise<List<Integer>>>> promise = Promise.promise();
|
||||
|
||||
new Thread(() -> {
|
||||
try {
|
||||
Uni.combine().all()
|
||||
/*
|
||||
* Notice that these are running concurrently
|
||||
*/
|
||||
.unis(Uni.createFrom().item(Application.getRange(ran)),
|
||||
Uni.createFrom().item(Application.getReverse(rev)))
|
||||
.asTuple().onItem().call(tuple -> {
|
||||
promise.complete(tuple);
|
||||
return Uni.createFrom().nullItem();
|
||||
})
|
||||
.onFailure().invoke(Throwable::printStackTrace)
|
||||
.subscribeAsCompletionStage();
|
||||
} catch (Exception exception) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}).start();
|
||||
|
||||
return promise;
|
||||
}
|
||||
|
||||
public static void runTraditionalMethod() {
|
||||
Long millis = System.currentTimeMillis();
|
||||
System.out.println("Traditiona1-1: " + RangeGeneratedPrimes.primes(115000).size());
|
||||
System.out.println("Traditiona1-2: " + RangeGeneratedPrimes.primes(10000).size());
|
||||
System.out.println("Traditiona1-3: " + ReverseGeneratedPrimes.primes(15000).size());
|
||||
System.out.println("Traditiona1-4: " + ReverseGeneratedPrimes.primes(24000).size());
|
||||
System.out.println(String.format("Elapsed time for traditional method: %d milliseconds\n", System.currentTimeMillis() - millis));
|
||||
}
|
||||
}
|
||||
|
||||
public interface Primes {
|
||||
static List<Integer> primes(int n) {
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
public abstract static class PrimeBase {
|
||||
static boolean isPrime(int number) {
|
||||
return IntStream.rangeClosed(2, (int) (Math.sqrt(number)))
|
||||
.allMatch(n -> number % n != 0);
|
||||
}
|
||||
}
|
||||
|
||||
public static class RangeGeneratedPrimes extends PrimeBase implements Primes {
|
||||
public static List<Integer> primes(int n) {
|
||||
return IntStream.rangeClosed(2, n)
|
||||
.filter(x -> isPrime(x)).boxed()
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
public static class ReverseGeneratedPrimes extends PrimeBase implements Primes {
|
||||
public static List<Integer> primes(int n) {
|
||||
List<Integer> list = IntStream.generate(getReverseList(n)).limit(n - 1)
|
||||
.filter(x -> isPrime(x)).boxed()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
private static IntSupplier getReverseList(int startValue) {
|
||||
IntSupplier reverse = new IntSupplier() {
|
||||
private int start = startValue;
|
||||
|
||||
public int getAsInt() {
|
||||
return this.start--;
|
||||
}
|
||||
};
|
||||
|
||||
return reverse;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### Testing
|
||||
|
||||
The Quarkus install showcases the _quarkus-resteasy_ extension by default. We are not using it, replace the contents of _src/test/java/org/demo/mag/StartupTest.java_ with:
|
||||
|
||||
```
|
||||
|
||||
package org.demo.mag;
|
||||
|
||||
import io.quarkus.test.junit.QuarkusTest;
|
||||
import io.vertx.mutiny.core.Promise;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.demo.mag.Startup;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@QuarkusTest
|
||||
public class StartupTest {
|
||||
Promise<List<Integer>> promise = Promise.promise();
|
||||
Promise<Void> promiseAndAwait = Promise.promise();
|
||||
List<Integer> testValue;
|
||||
|
||||
@Tag("DEV")
|
||||
@Test
|
||||
public void testVerifyAsync() {
|
||||
Assertions.assertEquals( null , testValue);
|
||||
promise.future().onItem().invoke(list -> {
|
||||
testValue = list;
|
||||
promiseAndAwait.complete();
|
||||
}).subscribeAsCompletionStage();
|
||||
Assertions.assertEquals(null, testValue);
|
||||
promise.complete(Startup.ReverseGeneratedPrimes.primes(100));
|
||||
promiseAndAwait.futureAndAwait();
|
||||
Assertions.assertNotNull(testValue);
|
||||
Assertions.assertEquals(2, testValue.get(testValue.size()-1));
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### Optional
|
||||
|
||||
To reduce download volume, remove the following entries from ****the _build.gradle_ file.
|
||||
|
||||
```
|
||||
|
||||
implementation 'io.quarkus:quarkus-resteasy'
|
||||
testImplementation 'io.rest-assured:rest-assured'
|
||||
|
||||
```
|
||||
|
||||
### Installation and Execution
|
||||
|
||||
The next step is to build the project. This includes downloading all dependencies as well as compiling and executing the Startup.java program. Everything is included in one file for brevity.
|
||||
|
||||
```
|
||||
|
||||
$ ./gradlew quarkusDev
|
||||
|
||||
```
|
||||
|
||||
The above command produces a banner and console output from Quarkus and the program.
|
||||
|
||||
This is development mode. Notice the prompt: “Press [space] to restart”. To review edits hit the space-bar and enter-key to re-compile and execute. Enter **q** to quit.
|
||||
|
||||
To build an Uber jar (all dependencies included) execute:
|
||||
|
||||
```
|
||||
|
||||
$ ./gradlew quarkusBuild -Dquarkus.package.type=uber-jar
|
||||
|
||||
```
|
||||
|
||||
This creates a jar in the _build_ directory named mutiny-_demo-1.0.0-runner.jar_. To run the jar file, enter the following command.
|
||||
|
||||
```
|
||||
|
||||
$ java -jar ./build/mutiny-demo-1.0.0-runner.jar
|
||||
|
||||
```
|
||||
|
||||
To remove the banner and console logs, add the following lines to the _src/main/resources/application.properties_ file.
|
||||
|
||||
```
|
||||
|
||||
%prod.quarkus.log.console.enable=false
|
||||
%prod.quarkus.banner.enabled=false
|
||||
|
||||
```
|
||||
|
||||
The output might look similar to the following.
|
||||
|
||||
```
|
||||
|
||||
Traditional-1: 9592
|
||||
Traditional-2: 1229
|
||||
Traditional-3: 2262
|
||||
Traditional-4: 2762
|
||||
Elapsed time for traditional method: 67 milliseconds
|
||||
|
||||
Combined Range: 1229
|
||||
This should display first - indicating asynchronous code.
|
||||
Combined Reverse: 2262
|
||||
Primes Reverse: 2762
|
||||
Asserting that expected primes are equal: 2 -- 2
|
||||
Primes Range: 9592
|
||||
Elapsed time for asynchronous method: 52 milliseconds
|
||||
|
||||
```
|
||||
|
||||
You will still get the banner and logs in development mode.
|
||||
|
||||
To go one step further, Quarkus can generate an executable out of the box using GraalVM.
|
||||
|
||||
```
|
||||
|
||||
$ ./gradlew build -Dquarkus.package.type=native
|
||||
|
||||
```
|
||||
|
||||
The executable generated by the above command will be _./build/mutiny-demo-1.0.0-runner_.
|
||||
|
||||
The default GraalVM is a downloaded container. To override this, set the environment variable _GRAALVM_HOME_ to your local install. Don’t forget to install the _native-image_ with the following command.
|
||||
|
||||
```
|
||||
|
||||
$ ${GRAALVM_HOME}/bin/gu install native-image
|
||||
|
||||
```
|
||||
|
||||
### The Code
|
||||
|
||||
The code, generates prime numbers for a range, reversed on a limit and a combination of the two. For example, consider the range: “Promise<List<Integer>> promiseRange = Application.getRange(115000);”.
|
||||
|
||||
This generates all primes between 1 and 115000 and displays the number of primes in the range. It is executed first but displays its results last. The code near the end of the main method — System.out.println (“This should display first – indicating asynchronous code.”); ****— displays first. This is an example of asynchronous code. We can run multiple processes concurrently. However, the order of completion is unpredictable. The traditional calls are orderly and the results can be collected when completed.
|
||||
|
||||
Execution can be blocked until a result is returned. The code does exactly that to display the asynchronous elapsed time message. At the end of the main method we have: “String elapsedMessage = finalMessage.futureAndAwait();”. The message arrives from either _promiseRange_ or _promiseCombined_ — the two longest running processes. But even this is not guaranteed. The state of the underling OS is unknown. One of the other processes might finish last. Normally, asynchronous calls are nested to co-ordinate results. This is demonstrated in the _promiseCombined_ promise to evaluate the results of range and reversed primes.
|
||||
|
||||
### Conclusion
|
||||
|
||||
The comparison between the traditional method and asynchronous method suggests that the asynchronous method can be up to 25% faster on a modern computer. An older CPU that does not have the resources and computing power produces results faster with the traditional method. If a computer has many cores, why not use them‽
|
||||
|
||||
More documentation can be found on the following web sites.
|
||||
|
||||
* [https://][4][quarkus.io][4]
|
||||
* <https://smallrye.io>
|
||||
* <https://vertx.io>
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/quarkus-and-mutiny/
|
||||
|
||||
作者:[Dave O'Meara][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://fedoramagazine.org/author/daveome/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2022/01/quarkus-and-mutiny-816x345.jpg
|
||||
[2]: https://unsplash.com/@eugene_golovesov?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
||||
[3]: https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText
|
||||
[4]: https://quarkus.io
|
@ -0,0 +1,166 @@
|
||||
[#]: subject: "Open Source Video Converters for Linux [GUI and CLI]"
|
||||
[#]: via: "https://itsfoss.com/open-source-video-converters/"
|
||||
[#]: author: "Community https://itsfoss.com/author/itsfoss/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Open Source Video Converters for Linux [GUI and CLI]
|
||||
======
|
||||
|
||||
Video downloads are fun until they become unplayable. So, here’s the list of top open-source video converters to help your downloads stay relevant everywhere.
|
||||
|
||||
Video conversion is not the best thing you want to do with a video, but it becomes unavoidable sometimes.
|
||||
|
||||
For instance, you can only upload videos in selected formats on YouTube, Facebook, etc. Similarly, media players don’t play every other format in which you download or create videos.
|
||||
|
||||
And finally, video converters are a must for efficient video editing to suit specific applications.
|
||||
|
||||
General features to look for in any video converter:
|
||||
|
||||
* Supports several formats
|
||||
* Capable of scaling and changing resolutions
|
||||
* Allow adding audio tracks
|
||||
* Permit changing frame rates
|
||||
|
||||
|
||||
|
||||
So, here’s our round-up of the best open-source video converters.
|
||||
|
||||
Please note this is not a ranking list.
|
||||
|
||||
### 1\. HandBrake
|
||||
|
||||
![][1]
|
||||
|
||||
[HandBrake][2] is a free open-source video transcoder. It’s very powerful with only a little learning curve.
|
||||
|
||||
It supports a wide range of video formats. Handbrake also has numerous presets to fast-forward the conversion for beginners. But this also has tons of tweaks for advanced users.
|
||||
|
||||
In addition, you can convert a large number of files with batch conversion. It has everything but an appealing user interface.
|
||||
|
||||
That being said, it’s free, and there is no reason one shouldn’t try this.
|
||||
|
||||
HandBrake is available for Linux, Windows, and Mac.
|
||||
|
||||
### 2\. FFmpeg (and it’s GUI frontends)
|
||||
|
||||
[FFmpeg][3] is a free, open-source project able to handle everything multimedia created by humans or machines, as mentioned on their website.
|
||||
|
||||
You can [use FFMPEG][4] to record, play, and convert audio and video. But for most people, it’s just a foundation to build upon.
|
||||
|
||||
There are various Graphical user interfaces (GUI) that leverage the power of this multimedia framework. You may have guessed it, yes, it’s a command-line utility.
|
||||
|
||||
So, we’ll discuss two GUIs for you to use FFmpeg with ease.
|
||||
|
||||
#### 2.1 Mystiq
|
||||
|
||||
![][5]
|
||||
|
||||
[Mystiq][6] simplifies FFmpeg. This open-source, free GUI is clean and very intuitive to install and begin with.
|
||||
|
||||
There are plenty of presets for no-hassle conversion. In addition, expert users can benefit from FFmpeg capabilities by navigating to **Edit**>**Set** **Parameters**>**Advanced**.
|
||||
|
||||
You can also go through our own [coverage on Mystiq][7]. It can be downloaded for Windows and Linux.
|
||||
|
||||
#### 2.2 FFqueue
|
||||
|
||||
![][8]
|
||||
|
||||
[FFqueue][9] is an advanced GUI for FFmpeg. It uses the native graphical settings of the operating system.
|
||||
|
||||
Straightaway, the installation is not a cakewalk and is **not recommended for beginners**. But if you got through the tricky installation, then it presents you with a very functional GUI.
|
||||
|
||||
Notably, this doesn’t come with any default presets. Instead, you can make your own. FFqueue is available for Linux and Windows.
|
||||
|
||||
### 3\. Ciano
|
||||
|
||||
![][10]
|
||||
|
||||
[Ciano][11] is yet another GUI that is based on FFmpeg (for audio and video) and ImageMagick (for images).
|
||||
|
||||
It has an oversimplified user interface for beginners. Your experience with Ciano is limited to selecting the format from the sidebar, exporting the file, and finally, checking the output folder for conversion.
|
||||
|
||||
Just remember to install FFmpeg and Imagemagick before you start with Ciano. Finally, this simplistic video converter is only for Debian and its derivatives.
|
||||
|
||||
### 4\. Shutter Encoder
|
||||
|
||||
![][12]
|
||||
|
||||
[Shutter encoder][13] is free and extremely easy to install. It’s not just for videos, as it can process audio and images as well. The one major downside is that it has a dated UI that feels like you went ten years back in time.
|
||||
|
||||
It’s a really robust encoder but only in the hands of an advanced user. It has tons of features, but without a preview, an average user is left to try each hoping for a decent output.
|
||||
|
||||
Right away, the user interface is not the most intuitive, and most of the time it feels like finding a needle in a haystack. This is strictly recommended for expert users.
|
||||
|
||||
Shutter encoder is can be used on Linux and Windows.
|
||||
|
||||
### 5\. MEncoder with Mplayer
|
||||
|
||||
[Mplayer][14] is again an advanced option that doesn’t come with a GUI. You will have it upon yourself to find and download from the available [unofficial MEncoder frontends][15].
|
||||
|
||||
The functionality depends upon the GUI you use. Most of them are outdated and not in current development.
|
||||
|
||||
One such GUI is [GMEncoder][16]. MEncoder is available for Linux, Windows, and macOS X.
|
||||
|
||||
### 6\. Avidemux
|
||||
|
||||
![][17]
|
||||
|
||||
[Avidemux][18] is by far one of the easiest to use. It also comes as an AppImage, so just download the file, make it executable, and you’re good.
|
||||
|
||||
It’s free and open-source. Avidemux is specially designed for beginners. It’s a video editor and encoder bundled in one, though you can play with other multimedia formats as well.
|
||||
|
||||
Avidemux comes with a preview option. It really helps you as a newbie or medium user to check out the result before going for a full-blown conversion.
|
||||
|
||||
Conclusively, Avidemux is a nifty video encoder available for Linux, Windows, Mac, PC-BSD.
|
||||
|
||||
### **Conclusion**
|
||||
|
||||
For an average Linux user like me, the most powerful option is Handbrake, followed by Avidemux. Both offer easy installation and excellent features.
|
||||
|
||||
But medium to expert users should try FFmpeg with any suitable GUI.
|
||||
|
||||
And go with Shutter Encoder if you’re brave enough to wander in the wild.
|
||||
|
||||
![][19]
|
||||
|
||||
### Hitesh Sant
|
||||
|
||||
Hitesh is a technology writer. He also has a flavor for acoustic guitar. And academically, he’s a postgraduate in Transportation Engineering & Management. You can check his complete work at [hiteshsant.com/][20].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/open-source-video-converters/
|
||||
|
||||
作者:[Community][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/itsfoss/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/11/handbrake.png?resize=800%2C537&ssl=1
|
||||
[2]: https://handbrake.fr/
|
||||
[3]: https://www.ffmpeg.org/about.html
|
||||
[4]: https://itsfoss.com/ffmpeg/
|
||||
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/mystiq-video-converter.jpg?resize=800%2C450&ssl=1
|
||||
[6]: https://mystiqapp.com/
|
||||
[7]: https://itsfoss.com/mystiq/
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/ffqueue.png?resize=800%2C541&ssl=1
|
||||
[9]: http://ffqueue.bruchhaus.dk/Default.aspx
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Ciano.png?resize=700%2C424&ssl=1
|
||||
[11]: https://robertsanseries.github.io/ciano/index.html
|
||||
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/shutter-encoder-800x486.jpg?resize=800%2C486&ssl=1
|
||||
[13]: https://www.shutterencoder.com/en/
|
||||
[14]: http://www.mplayerhq.hu/design7/news.html
|
||||
[15]: http://www.mplayerhq.hu/design7/projects.html#unofficial_packages
|
||||
[16]: http://gmencoder.sourceforge.net/
|
||||
[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/06/avidemux.jpg?resize=800%2C697&ssl=1
|
||||
[18]: http://avidemux.sourceforge.net/download.html
|
||||
[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/hitesh.webp?resize=400%2C400&ssl=1
|
||||
[20]: http://hiteshsant.com/
|
236
sources/tech/20220128 Sharing the computer screen in Gnome.md
Normal file
236
sources/tech/20220128 Sharing the computer screen in Gnome.md
Normal file
@ -0,0 +1,236 @@
|
||||
[#]: subject: "Sharing the computer screen in Gnome"
|
||||
[#]: via: "https://fedoramagazine.org/sharing-the-computer-screen-in-gnome/"
|
||||
[#]: author: "Lukáš Růžička https://fedoramagazine.org/author/lruzicka/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Sharing the computer screen in Gnome
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
You do not want someone else to be able to monitor or even control your computer and you usually work hard to cut off any such attempts using various security mechanisms. However, sometimes a situation occurs when you desperately need a friend, or an expert, to help you with a computer problem, but they are not at the same location at the same time. How do you show them? Should you take your mobile phone, take pictures of your screen, and send it to them? Should you record a video? Certainly not. You can share your screen with them and possibly let them control your computer remotely for a while. In this article, I will describe how to allow sharing the computer screen in Gnome.
|
||||
|
||||
### Setting up the server to share its screen
|
||||
|
||||
A **server** is a computer that provides (serves) some content that other computers (clients) will consume. In this article the server runs **Fedora Workstation** with the standard **Gnome desktop**.
|
||||
|
||||
#### Switching on Gnome Screen Sharing
|
||||
|
||||
By default, the ability to share the computer screen in Gnome is **off**. In order to use it, you need to switch it on:
|
||||
|
||||
1. Start **Gnome Control Center**.
|
||||
|
||||
2. Click on the **Sharing** tab.
|
||||
|
||||
![Sharing switched off][2]
|
||||
|
||||
3. Switch on sharing with the slider in the upper right corner.
|
||||
|
||||
4. Click on **Screen sharing**.
|
||||
|
||||
![Sharing switched on][3]
|
||||
|
||||
5. Switch on screen sharing using the slider in the upper left corner of the window.
|
||||
|
||||
6. Check the _Allow connections to control the screen_ if you want to be able to control the screen from the client. Leaving this button unchecked will only allow _view-only_ access to the shared screen.
|
||||
|
||||
7. If you want to manually confirm all incoming connections, select _New connections must ask for access._
|
||||
|
||||
8. If you want to allow connections to people who know a password (you will not be notified), select _Require a password_ and fill in the password. The password can only be 8 characters long.
|
||||
|
||||
9. Check _Show password_ to see what the current password is. For a little more protection, do not use your login password here, but choose a different one.
|
||||
|
||||
10. If you have more networks available, you can choose on which one the screen will be accessible.
|
||||
|
||||
|
||||
|
||||
|
||||
### Setting up the client to display a remote screen
|
||||
|
||||
A **client** is a computer that connects to a service (or content) provided by a server. This demo will also run **Fedora Workstation** on the client, but the operating system actually should not matter too much, if it runs a decent VNC client.
|
||||
|
||||
#### Check for visibility
|
||||
|
||||
Sharing the computer screen in Gnome between the server and the client requires a working network connection and a visible “route” between them. If you cannot make such a connection, you will not be able to view or control the shared screen of the server anyway and the whole process described here will not work.
|
||||
|
||||
To make sure a connection exists
|
||||
|
||||
Find out the IP address of the server.
|
||||
|
||||
Start **Gnome Control Center**, a.k.a **Settings**. Use the **Menu** in the upper right corner, or the **Activities** mode. When in **Activities**, type
|
||||
|
||||
settings
|
||||
|
||||
and click on the corresponding icon.
|
||||
|
||||
Select the **Network** tab.
|
||||
|
||||
Click on the **Settings button** (cogwheel) to display your network profile’s parameters.
|
||||
|
||||
Open the **Details** tab to see the IP address of your computer.
|
||||
|
||||
Go to **your client’s** terminal (the computer from which you want to connect) and find out if there is a connection between the client and the server using the **ping** command.
|
||||
|
||||
```
|
||||
|
||||
$ ping -c 5 192.168.122.225
|
||||
|
||||
```
|
||||
|
||||
Examine the command’s output. If it is similar to the example below, the connection between the computers exists.
|
||||
|
||||
```
|
||||
|
||||
PING 192.168.122.225 (192.168.122.225) 56(84) bytes of data.
|
||||
64 bytes from 192.168.122.225: icmp_seq=1 ttl=64 time=0.383 ms
|
||||
64 bytes from 192.168.122.225: icmp_seq=2 ttl=64 time=0.357 ms
|
||||
64 bytes from 192.168.122.225: icmp_seq=3 ttl=64 time=0.322 ms
|
||||
64 bytes from 192.168.122.225: icmp_seq=4 ttl=64 time=0.371 ms
|
||||
64 bytes from 192.168.122.225: icmp_seq=5 ttl=64 time=0.319 ms
|
||||
--- 192.168.122.225 ping statistics ---
|
||||
5 packets transmitted, 5 received, 0% packet loss, time 4083ms
|
||||
rtt min/avg/max/mdev = 0.319/0.350/0.383/0.025 ms
|
||||
|
||||
```
|
||||
|
||||
You will probably experience no problems if both computers live on the same subnet, such as in your home or at the office, but problems might occur, when your server does not have a **public IP address** and cannot be seen from the external Internet. Unless you are the only administrator of your Internet access point, you will probably need to consult about your situation with your administrator or with your ISP. Note, that exposing your computer to the external Internet is always a risky strategy and you **must pay enough attention** to protecting your computer from unwanted access.
|
||||
|
||||
#### Install the VNC client (Remmina)
|
||||
|
||||
**Remmina** is a graphical remote desktop client that can you can use to connect to a remote server using several protocols, such as VNC, Spice, or RDP. **Remmina** is available from the Fedora repositories, so you can installed it with both the **dnf** command or the **Software**, whichever you prefer. With dnf, the following command will install the package and several dependencies.
|
||||
|
||||
```
|
||||
|
||||
$ sudo dnf install remmina
|
||||
|
||||
```
|
||||
|
||||
#### Connect to the server
|
||||
|
||||
If there is a connection between the server and the client, make sure the following is true:
|
||||
|
||||
1. The computer is running.
|
||||
2. The Gnome session is running.
|
||||
3. The user with screen sharing enabled is logged in.
|
||||
4. The session is **not locked**, i.e. the user can work with the session.
|
||||
|
||||
|
||||
|
||||
Then you can attempt to connect to the session from the client:
|
||||
|
||||
1. Start **Remmina**.
|
||||
|
||||
2. Select the **VNC** protocol in the dropdown menu on the left side of the address bar.
|
||||
|
||||
3. Type the IP address of the server into the address bar and hit **Enter**.
|
||||
|
||||
![Remmina Window][4]
|
||||
|
||||
4. When the connection starts, another connection window opens. Depending on the server settings, you may need to wait until the server user allows the connection, or you may have to provide the password.
|
||||
|
||||
5. Type in the password and press **OK**.
|
||||
|
||||
![Remmina Connected to Server][5]
|
||||
|
||||
6. Press ![Align with resolution button][6] ![][7] to resize the connection window to match the server resolution, or press ![Full Screen Button][8] ![][7] to resize the connection window over your entire desktop. When in fullscreen mode, notice the narrow white bar at the upper edge of the screen. That is the Remmina menu and you can access it by moving the mouse to it when you need to leave the fullscreen mode or change some of the settings.
|
||||
|
||||
|
||||
|
||||
|
||||
When you return back to the server, you will notice that there is now a yellow icon in the upper bar which indicates that you are sharing the computer screen in Gnome. If you no longer wish to share the screen, you can enter the menu and click on **Screen is being shared** and then on select **Turn off** to stop sharing the screen immediately.
|
||||
|
||||
![Turn off menu item][9]
|
||||
|
||||
#### Terminating the screen sharing when session locks.
|
||||
|
||||
By default, the connection **will always terminate** when the session locks. A new connection cannot be established until the session is unlocked.
|
||||
|
||||
On one hand, this sounds logical. If you want to share your screen with someone, you might not want them to use your computer when you are not around. On the other hand, the same approach is not very useful, if you want to control your own computer from a remote location, be it your bed in another room or your mother-in-law’s place. There are two options available to deal with this problem. You can either disable locking the screen entirely or you can use a Gnome extension that supports unlocking the session via the VNC connection.
|
||||
|
||||
##### Disable screen lock
|
||||
|
||||
In order to disable the screen lock:
|
||||
|
||||
1. Open the **Gnome Control Center**.
|
||||
2. Click on the **Privacy** tab.
|
||||
3. Select the **Screen Lock** settings.
|
||||
4. Switch off **Automatic Screen Lock**.
|
||||
|
||||
|
||||
|
||||
Now, the session will never lock (unless you lock it manually), so it will be possible to start a VNC connection to it.
|
||||
|
||||
##### Use a Gnome extension to allow unlocking the session remotely.
|
||||
|
||||
If you do not want to switch off locking the screen or you want to have an option to unlock the session remotely even when it is locked, you will need to install an extension that provides this functionality as such behavior is not allowed by default.
|
||||
|
||||
To install the extension:
|
||||
|
||||
1. Open the **Firefox** browser and point it to [the Gnome extension page][10].
|
||||
|
||||
![][7]![Gnome Extensions Page][11]
|
||||
|
||||
2. In the upper part of the page, find an info block that tells you to install _GNOME Shell integration_ for Firefox.
|
||||
|
||||
3. Install the Firefox extension by clicking on _Click here to install browser extension_.
|
||||
|
||||
4. After the installation, notice the Gnome logo in the menu part of Firefox.
|
||||
|
||||
5. Click on the Gnome logo to navigate back to the extension page.
|
||||
|
||||
6. Search for _allow locked remote desktop_.
|
||||
|
||||
7. Click on the displayed item to go to the extension’s page.
|
||||
|
||||
8. Switch the extension **ON** by using the **on/off** button on the right.
|
||||
|
||||
![Extension selected][12]
|
||||
|
||||
|
||||
|
||||
|
||||
Now, it will be possible to start a VNC connection any time. Note, that you will need to know the session password to unlock the session. If your VNC password differs from the session password, your session is still protected _a little_.
|
||||
|
||||
### Conclusion
|
||||
|
||||
This article, described the way to enable sharing the computer screen in Gnome. It mentioned the difference between the limited (_view-only)_ access or not limited (_full)_ access. This solution, however, should in no case be considered a _correct approach_ to enable a remote access for serious tasks, such as administering a production server. Why?
|
||||
|
||||
1. The server will always keep its **control mode**. Anyone working with the server session will be able to control the mouse and keyboard.
|
||||
2. If the session is locked, unlocking it from the client will also unlock it on the server. It will also wake up the display from the stand-by mode. Anybody who can see your server screen will be able to watch what you are doing at the moment.
|
||||
3. The VNC protocol _per se_ is not encrypted or protected so anything you send over this can be compromised.
|
||||
|
||||
|
||||
|
||||
There are several ways, you can set up a protected VNC connection. You could tunnel it via the SSH protocol for better security, for example. However, these are beyond the scope of this article.
|
||||
|
||||
**Disclaimer**: The above workflow worked without problems on Fedora 35 using several virtual machines. If it does not work for you, then you might have hit a bug. Please, report it.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/sharing-the-computer-screen-in-gnome/
|
||||
|
||||
作者:[Lukáš Růžička][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://fedoramagazine.org/author/lruzicka/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2022/01/sharing_screen-816x345.jpg
|
||||
[2]: https://fedoramagazine.org/wp-content/uploads/2022/01/settings_sharing_off.png
|
||||
[3]: https://fedoramagazine.org/wp-content/uploads/2022/01/settings_sharing_on.png
|
||||
[4]: https://fedoramagazine.org/wp-content/uploads/2022/01/remmina.png
|
||||
[5]: https://fedoramagazine.org/wp-content/uploads/2022/01/remmina_connected_client.png
|
||||
[6]: https://fedoramagazine.org/wp-content/uploads/2022/01/resolution.png
|
||||
[7]: tmp.kscCxzbpG9
|
||||
[8]: https://fedoramagazine.org/wp-content/uploads/2022/01/full_screen.png
|
||||
[9]: https://fedoramagazine.org/wp-content/uploads/2022/01/turn_off_connection.png
|
||||
[10]: https://extensions.gnome.org
|
||||
[11]: https://fedoramagazine.org/wp-content/uploads/2022/01/extensions.png
|
||||
[12]: https://fedoramagazine.org/wp-content/uploads/2022/01/switch_on_extension.png
|
@ -0,0 +1,97 @@
|
||||
[#]: subject: "Software Privacy Day: Use Delta Chat, an open source chat tool"
|
||||
[#]: via: "https://opensource.com/article/22/1/delta-chat-software-privacy-day"
|
||||
[#]: author: "Alan Smithee https://opensource.com/users/alansmithee"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Software Privacy Day: Use Delta Chat, an open source chat tool
|
||||
======
|
||||
The best chat application is the one that isn't a chat application.
|
||||
![Chat via email][1]
|
||||
|
||||
It's Software Privacy Day again, the day meant to encourage users everywhere to spare a thought about where their data actually goes when it's posted on, over, or through the Internet. One of the cottage industries around Internet communication that seems to ebb and flow in popularity is the venerable chat application. People use chat applications for all manner of conversations, and most people don't think about what bots are recording and monitoring what's being said, whether it's to effectively target ads or just to build a profile for future use. This makes chat applications particularly vulnerable to poor privacy practices, but luckily there are several open source, privacy-focused apps out there, including [Signal][2], [Rocket.Chat][3], and [Mattermost][4]. I've run Mattermost and Rocket.Chat, and I use Signal, but the application I'm most excited about is Delta Chat, the chat service that's so hands-off it doesn’t even use chat servers. Instead, Delta Chat uses the most massive and diverse open messaging system you already use yourself. It uses email to send and receive messages through a chat application, and it features end-to-end encryption with [Autocrypt][5].
|
||||
|
||||
### Install Delta Chat
|
||||
|
||||
Delta Chat uses standard email protocol as its back end, but to you and me as mere users, it appears and acts exactly like a chat application. That means you need to install the open source Delta Chat app.
|
||||
|
||||
On Linux, you can install Delta Chat as a [Flatpak][6] or from your software repository.
|
||||
|
||||
On macOS and Windows, download an installer from [delta.chat/downloads][7].
|
||||
|
||||
On Android, you can install Delta Chat from the Play Store or the open source [F-droid repository][8].
|
||||
|
||||
On iOS, install Delta Chat from the App Store.
|
||||
|
||||
Because Delta Chat uses email for message delivery, you can also receive messages to your inbox if you're away from your chat app. Yes, you can use Delta Chat even without having Delta Chat installed!
|
||||
|
||||
### Configure Delta Chat
|
||||
|
||||
When you first launch Delta Chat, you must log in to your email account. This tends to be the hardest part about Delta Chat because it requires you to either know details about your email server or else to create an "app password" in your email provider's security settings.
|
||||
|
||||
If you're running your own server and you have everything configured as the usual defaults (port 993 for incoming IMAP, port 465 for outgoing SMTP, SSL/TLS enabled), then you can probably just type in your email address and your password and continue.
|
||||
|
||||
![Delta Chat login][9]
|
||||
|
||||
(Opensource.com [CC BY-SA 4.0][10])
|
||||
|
||||
If you're running your own server but you have custom settings, then click the **Advanced** button and enter your settings. You may need to do this if you're using an unusual subdomain to denote your mail server, or a custom port, or a complex login and password configuration.
|
||||
|
||||
If you're using an email provider like Gmail, Fastmail, Yahoo, or similar, then you must create an app password so you can login to your account through Delta Chat instead of a web browser. Many email providers restrict login in order to avoid endless bots and scripts making attempts to brute force their ways into people's accounts, so to your provider, Delta Chat looks a lot like a bot. When you grant Delta Chat special permissions, you're alerting your email provider that lots of short messages from a remote app is expected behavior.
|
||||
|
||||
Each email provider has a different way of providing app passwords, but Fastmail (in my opinion) makes it the easiest:
|
||||
|
||||
1. Navigate to **Settings**
|
||||
2. Click **Passwords & Security**
|
||||
3. Next to **Third-party apps**, click the **Add** button
|
||||
|
||||
|
||||
|
||||
Verify your password, and create a new app password. Use the password you create to login to Delta Chat.
|
||||
|
||||
![Fastmail app password][11]
|
||||
|
||||
(Opensource.com [CC BY-SA 4.0][10])
|
||||
|
||||
### Chatting with Delta Chat
|
||||
|
||||
Once you've gotten past the hurdle of logging in, the rest is easy. Because Delta Chat just uses email, you can add friends by email address rather than by a chat application username or phone number. You can technically add any email address to Delta Chat. It is, after all, just an email app with a very specific use case. It's polite to tell your friend about Delta Chat, though, rather than expect them to carry out a casual chat with you through their email client.
|
||||
|
||||
The application, whether you're running it on your phone or your computer, looks exactly like you'd expect a chat application to look. You can initiate chats, send messages, and hang out with friends over encrypted text.
|
||||
|
||||
![Delta Chat chat list][12]
|
||||
|
||||
(Image courtesy Delta Chat)
|
||||
|
||||
### Get chatting
|
||||
|
||||
Delta Chat is decentralized, fully encrypted, and relies on a proven infrastructure. Thanks to Delta Chat, you get to choose what servers sit between you and your contacts, and you can communicate in private. There's no complex server to install, no hardware to maintain. It's a simple solution to what seems like a complex problem, and it's open source. There's every reason to try it, especially on Software Privacy Day.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/1/delta-chat-software-privacy-day
|
||||
|
||||
作者:[Alan Smithee][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/alansmithee
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/email_chat_communication_message.png?itok=LKjiLnQu (Chat via email)
|
||||
[2]: https://opensource.com/article/21/9/alternatives-zoom#signal
|
||||
[3]: https://opensource.com/article/22/1/rocketchat-open-source-communications-platform-puts-data-privacy-first
|
||||
[4]: https://opensource.com/education/16/3/mattermost-open-source-chat
|
||||
[5]: https://autocrypt.org/
|
||||
[6]: https://opensource.com/article/21/11/install-flatpak-linux
|
||||
[7]: https://delta.chat/en/download
|
||||
[8]: https://f-droid.org/app/com.b44t.messenger
|
||||
[9]: https://opensource.com/sites/default/files/delta-chat-log-in_0.jpg (Delta Chat login)
|
||||
[10]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[11]: https://opensource.com/sites/default/files/fastmail-app-password.jpg (Fastmail app password)
|
||||
[12]: https://opensource.com/sites/default/files/delta-chat-google-play-release-chat-list-light.png (Delta Chat chat list)
|
192
sources/tech/20220129 Reasons for servers to support IPv6.md
Normal file
192
sources/tech/20220129 Reasons for servers to support IPv6.md
Normal file
@ -0,0 +1,192 @@
|
||||
[#]: subject: "Reasons for servers to support IPv6"
|
||||
[#]: via: "https://jvns.ca/blog/2022/01/29/reasons-for-servers-to-support-ipv6/"
|
||||
[#]: author: "Julia Evans https://jvns.ca/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Reasons for servers to support IPv6
|
||||
======
|
||||
|
||||
I’ve been having a hard time understanding IPv6. On one hand, the basics initially seem pretty straightforward (there aren’t enough IPv4 addresses for all the devices on the internet, so people invented IPv6! There are enough IPv6 addresses for everyone!)
|
||||
|
||||
But when I try to actually understand it, I run into a lot of questions. One question is: `twitter.com` does not support IPv6. Presumably it can’t be causing them THAT many issues to not support it. So why _do_ websites support IPv6?
|
||||
|
||||
I asked people on Twitter [why their servers support IPv6][1] and I got a lot of great answers, which I’ll summarize here. These all come with the disclaimer that I have basically 0 experience with IPv6 so I can’t evaluate these reasons very well.
|
||||
|
||||
First though, I want to explain why it’s possible for `twitter.com` to not support IPv6 because I didn’t understand that initially.
|
||||
|
||||
### how can you tell `twitter.com` doesn’t support IPv6?
|
||||
|
||||
You can tell they don’t support IPv6 is because if you look up their AAAA record (which contains their IPv6 address), there isn’t one. Some other big sites like `github.com` and `stripe.com` also don’t support IPv6.
|
||||
|
||||
```
|
||||
|
||||
$ dig AAAA twitter.com
|
||||
(empty response)
|
||||
$ dig AAAA github.com
|
||||
(empty response)
|
||||
$ dig AAAA stripe.com
|
||||
(empty response)
|
||||
|
||||
```
|
||||
|
||||
### why does `twitter.com` still work for IPv6 users?
|
||||
|
||||
I found this really confusing, because I’ve always heard that lots of internet users are forced to use IPv6 because we’ve run out of IPv4 addresses. But if that’s true, how could twitter.com continue to work for those people without IPv6 support? Here’s what I learned from the Twitter thread yesterday.
|
||||
|
||||
There are two kinds of internet service providers (ISPs):
|
||||
|
||||
1. ISPs who own enough IPv4 address for all of their customers
|
||||
2. ISPs who don’t
|
||||
|
||||
|
||||
|
||||
My ISP is in category 1 – my computer gets its own IPv4 address, and actually my ISP doesn’t even support IPv6 at all.
|
||||
|
||||
But lots of ISPs (especially outside of North America) are in category 2: they don’t have enough IPv4 addresses for all their customers. Those ISPs handle the problem by:
|
||||
|
||||
* giving all of their customers a unique IPv6 address, so they can access IPv6 sites directly
|
||||
* making large groups of their customers _share_ IPv4 addresses. This can either be with CGNAT (”[carrier-grade NAT][2]”) or “464XLAT” or maybe something else.
|
||||
|
||||
|
||||
|
||||
All ISPs need _some_ IPv4 addresses, otherwise it would be impossible for their customers to access IPv4-only sites like twitter.com.
|
||||
|
||||
### what are the reasons to support IPv6?
|
||||
|
||||
Now we’ve explained why it’s possible to _not_ support IPv6. So why support it? There were a lot of reasons.
|
||||
|
||||
### reason: CGNAT is a bottleneck
|
||||
|
||||
The argument that was most compelling to me was: CGNAT (carrier-grade NAT) is a bottleneck and it causes performance issues, and it’s going to continue to get worse over time as access to IPv4 addresses becomes more and more restricted.
|
||||
|
||||
Someone also mentioned that because CGNAT is a bottleneck, it’s an attractive DDoS target because you can ruin lots of people’s internet experience just by attacking 1 server.
|
||||
|
||||
Servers supporting IPv6 reduces the need for CGNAT (IPv6 users can just connect directly!) which makes the internet work better for everyone.
|
||||
|
||||
I thought this argument was interesting because it’s a “public commons” / community argument – it’s less that supporting IPv6 will make your site specifically work better, and more that if _almost everyone_ supports IPv6 then it’ll make the experience of the internet better for everyone, especially in countries where people don’t have easy access to IPv4 addresses.
|
||||
|
||||
I don’t actually know how much of an issue this is in practice.
|
||||
|
||||
There were lots of more selfish arguments to use IPv6 too though, so let’s get into those.
|
||||
|
||||
### reason: so IPv6-only servers can access your site
|
||||
|
||||
I said before that most IPv6 users still have access to IPv4 though some kind of NAT. But apparently that’s not true for everyone – some people mentioned that they run some servers which only have IPv6 addresses and which aren’t behind any kind of NAT. So those servers are actually totally unable to access IPv4-only sites.
|
||||
|
||||
I imagine that those servers aren’t connecting to arbitrary machines that much – maybe they only need to connect to a few hosts with IPv6 support.
|
||||
|
||||
But it makes sense to me that a machine should be able to access my site even if it doesn’t have an IPv4 address.
|
||||
|
||||
### reason: better performance
|
||||
|
||||
For users who are using both IPv4 and IPv6 (with a dedicated IPv6 address and a shared IPv4 address), apparently IPv6 is often faster because it doesn’t need to go through an extra translation layer.
|
||||
|
||||
So supporting IPv6 can make the site faster for users sometimes.
|
||||
|
||||
In practice clients use an algorithm called “Happy Eyeballs” which tries to figure out whether IPv4 or IPv6 will be faster and then uses whichever seems faster.
|
||||
|
||||
Some other performance benefits people mentioned:
|
||||
|
||||
* maybe sometimes using IPv6 can get you a SEO boost because of the better performance.
|
||||
* maybe using IPv6 causes you to go through better (faster) network hardware because it’s a newer protocol
|
||||
|
||||
|
||||
|
||||
### reason: resilience against IPv4 internet outages
|
||||
|
||||
One person said that they’ve run into issues where there was an internet outage that only affected IPv4 traffic, because of accidental BGP poisoining.
|
||||
|
||||
So supporting IPv6 means that their site can still stay partially online during those outages.
|
||||
|
||||
### reason: to avoid NAT issues with home servers
|
||||
|
||||
A few people mentioned that it’s much easier to use IPv6 with home servers – instead of having to do port forwarding through your router, you can just give every server a unique IPv6 address and then access it directly.
|
||||
|
||||
Of course, for this to work the client needs to have IPv6 support, but more and more clients these days have IPv6 support too.
|
||||
|
||||
### reason: to own your IP addresses
|
||||
|
||||
Apparently you can buy IPv6 addresses, use them for the servers on your home network, and then if you change your ISP, continue to use the same IP addresses?
|
||||
|
||||
I’m still not totally sure how this works (I don’t know how you would convince computers on the internet to actually route those IPs to you? I guess you need to run your own AS or something?).
|
||||
|
||||
### reason: to learn about IPv6
|
||||
|
||||
One person said they work in security and in security it’s very important to understand how internet protocols work (attackers are using internet protocols!). So running an IPv6 server helps them learn how it works.
|
||||
|
||||
### reason: to push IPv6 forward / IPv4 is “legacy”
|
||||
|
||||
A couple of people said that they support IPv6 because it’s the current standard, and so they want to contribute to the success of IPv6 by supporting it.
|
||||
|
||||
A lot of people also said that they support IPv6 because they think sites that only support IPv4 are “behind” or “legacy”.
|
||||
|
||||
### reason: it’s easy
|
||||
|
||||
I got a bunch of answers along the lines of “it’s easy, why not”. Obviously adding IPv6 support is not easy in all situations, but a couple of reasons it might be easy in some cases:
|
||||
|
||||
* you automatically got an IPv6 address from your hosting company, so all you need to do is add an `AAAA` record pointing to that address
|
||||
* your site is behind a CDN that supports IPv6, so you don’t need to do anything extra
|
||||
|
||||
|
||||
|
||||
### reason: safer networking experimentation
|
||||
|
||||
Because the address space is so big, if you want to try something out you can just grab an IPv6 subnet, try out some things in it, and then literally never use that subnet again.
|
||||
|
||||
### reason: to run your own autonomous system (AS)
|
||||
|
||||
A few people said they were running their own autonomous system (I talked about what an AS is a bit in this [BGP post][3]). IPv4 addresses are too expensive so they bought IPv6 addresses for their AS instead.
|
||||
|
||||
### reason: security by obscurity
|
||||
|
||||
If your server _only_ has a public IPv6 address, attackers can’t easily find it by scanning the whole internet. The IPv6 address space is too big to scan!
|
||||
|
||||
Obviously this shouldn’t be your only security measure, but it seems like a nice bonus – any time I run an IPv4 public server I’m always a tiny bit surprised by how it’s constantly being scanned for vulnerabilities (like old versions of WordPress, etc).
|
||||
|
||||
### very silly reason: you can put easter eggs in your IPv6 address
|
||||
|
||||
IPv6 addresses have a lot of extra bits in them that you can do frivolous things with. For example one of Facebook’s IPv6 addresses is “2a03:2880:f10e:83:face:b00c:0:25de” (it has `face:b00c` in it).
|
||||
|
||||
### there are more reasons than I thought
|
||||
|
||||
That’s all I’ve learned about the “why support IPv6?” question so far.
|
||||
|
||||
I came away from this conversation more motivated to support IPv6 on my (very small) servers than I had been before. But that’s because I think supporting IPv6 will require very little effort for me. (right now I’m using a CDN that supports IPv6 so it comes basically for free)
|
||||
|
||||
I know very little about IPv6 still but my impression is that IPv6 support often isn’t zero-effort and actually can be a lot of work. For example, I have no idea how much work it would actually be for Twitter to add IPv6 support on their edge servers.
|
||||
|
||||
### some more IPv6 questions
|
||||
|
||||
Here are some more IPv6 questions I have that maybe I’ll explore later:
|
||||
|
||||
* what are the _disadvantages_ to supporting IPv6? what goes wrong?
|
||||
* what are the incentives for ISPs that own enough IPv4 addresses for their customers to support IPv6? (another way of asking: is it likely that my ISP will move to supporting IPv6 in the next few years? or are they just not incentivized to do it so it’s unlikely?)
|
||||
* [digital ocean][4] seems to only support IPv4 floating IPs, not IPv6 floating IPs. Why not? Shouldn’t it be _easier_ to give out IPv6 floating IPs since there are more of them?
|
||||
* when I try to ping an IPv6 address (like example.com’s IP `2606:2800:220:1:248:1893:25c8:1946` for example) I get the error `ping: connect: Network is unreachable`. Why? (answer: it’s because my ISP doesn’t support IPv6 so my computer doesn’t have a public IPv6 address)
|
||||
|
||||
|
||||
|
||||
This [IPv4 vs IPv6 article from Tailscale][5] looks interesting and answers some of these questions.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://jvns.ca/blog/2022/01/29/reasons-for-servers-to-support-ipv6/
|
||||
|
||||
作者:[Julia Evans][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://jvns.ca/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://twitter.com/b0rk/status/1487156306884636672
|
||||
[2]: https://en.wikipedia.org/wiki/Carrier-grade_NAT
|
||||
[3]: https://jvns.ca/blog/2021/10/05/tools-to-look-at-bgp-routes/
|
||||
[4]: https://docs.digitalocean.com/products/networking/floating-ips/
|
||||
[5]: https://tailscale.com/kb/1134/ipv6-faq/
|
@ -0,0 +1,99 @@
|
||||
[#]: subject: "Open source tools to make your Wordle results accessible"
|
||||
[#]: via: "https://opensource.com/article/22/1/open-source-accessibility-wordle"
|
||||
[#]: author: "AmyJune Hineline https://opensource.com/users/amyjune"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Open source tools to make your Wordle results accessible
|
||||
======
|
||||
Sharing your Wordle results is fun. Make sure they are accessible by
|
||||
trying these open source tips.
|
||||
![Women in computing and open source v5][1]
|
||||
|
||||
Wordle seems to be popping up everywhere across social media feeds. Wordle is a quick word game that you can play once daily, and you can easily share results with friends over social media.
|
||||
|
||||
The aim of Wordle is to guess a secret word. To make a guess, enter a word, and Wordle displays the results of your guess in a grid of color-coded emoticons. Green indicates that a letter is in the correct location. Yellow indicates that the secret word contains the letter, but it is in the wrong location. And grey means that the letter isn't in the word at all.
|
||||
|
||||
![Sample of wordle results displaying colors for letter position][2]
|
||||
|
||||
AmyJune Hineline (CC BY-SA 4.0)
|
||||
|
||||
It's become common for people to share their progress in the game by pasting the resulting letter grid into social media, which is easy to do because the grid is just a [set of emoji][3]. However, emoticons and emoji have accessibility issues. While they're easy to copy and paste, the shared results can be hard to access for individuals who live with low vision or color blindness. The colors grey, yellow, green can be difficult for some to differentiate.
|
||||
|
||||
![Wordle results statistics][4]
|
||||
|
||||
AmyJune Hineline (CC BY-SA 4.0)
|
||||
|
||||
Inspired by a conversation I had with Mike Lim, I did some poking on the internet and discovered a couple of tips, including an open source project that helps improve the accessibility of shared game results.
|
||||
|
||||
### Use an open source accessibility app
|
||||
|
||||
The [wa11y app][5] is straightforward to use. You can find the wa11y GitHub project [here][6]. Copy your Wordle results and paste them into the app, and it converts your results into words.
|
||||
|
||||
![Emoji converted to words][7]
|
||||
|
||||
AmyJune Hineline (CC BY-SA 4.0)
|
||||
|
||||
You can include emoticons with a simple checkbox to indicate a successful guess, but maintainers warn against this. Assistive technology loves emoticons so much that it reads each and every emoticon. Inline. All of them. Although the technology loves to read them, folks who utilize assistive technology may find it cumbersome and often abandon a message with more than a few emoji.
|
||||
|
||||
![Words and emoji included in the output][8]
|
||||
|
||||
AmyJune Hineline (CC BY-SA 4.0)
|
||||
|
||||
![Emojis are beautiful, but can be frustrating for folks who use screen readers and other accessibility tools. Please consider your audience on social media.][9]
|
||||
|
||||
AmyJune Hineline (CC BY-SA 4.0)
|
||||
|
||||
### Provide accessible images
|
||||
|
||||
Perhaps you don't have access to the wal11y app and still want to ensure your results are accessible. You can take a screenshot, upload the image, and add alt text. There are a few ways you can do this:
|
||||
|
||||
* Attach the image and write the alt text in the message field.
|
||||
* Attach the image and dive into the accessibility options for your specific social media app and enable alt text and add from there. The open source social network [Mastodon][10] enables actual alt text by default.
|
||||
* [@AltTxtReminde][11]r is an account you can follow that reminds you to add alt text to images when you forget.
|
||||
|
||||
|
||||
|
||||
If you do share the default results, there is always the option to add alt text before the emoticons. That way, your audience has access to the text information but can abort the rest of the message before repeating emoji becomes cumbersome.
|
||||
|
||||
![Twitter wordle results without text][12]
|
||||
|
||||
AmyJune Hineline (CC BY-SA 4.0)
|
||||
|
||||
![Twitter results with descriptive explanation of results][13]
|
||||
|
||||
AmyJune Hineline (CC BY-SA 4.0)
|
||||
|
||||
### Wrap up
|
||||
|
||||
Wordle is a hot game on the internet these days, so when sharing your results be sure to keep accessibility in mind. There are a few simple approaches using open source technology to make your results easier to share with everyone.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/1/open-source-accessibility-wordle
|
||||
|
||||
作者:[AmyJune Hineline][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/amyjune
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_5.png?itok=YHpNs_ss (Women in computing and open source v5)
|
||||
[2]: https://opensource.com/sites/default/files/apple.png
|
||||
[3]: https://opensource.com/article/19/10/how-type-emoji-linux
|
||||
[4]: https://opensource.com/sites/default/files/statistics.png
|
||||
[5]: http://wa11y.co/
|
||||
[6]: https://github.com/cariad/wa11y.co
|
||||
[7]: https://opensource.com/sites/default/files/do-not-include-emoji.png
|
||||
[8]: https://opensource.com/sites/default/files/include-emoji.png
|
||||
[9]: https://opensource.com/sites/default/files/wa11y_0.png
|
||||
[10]: https://opensource.com/article/17/4/guide-to-mastodon
|
||||
[11]: https://twitter.com/alttxtreminder
|
||||
[12]: https://opensource.com/sites/default/files/twitter.png
|
||||
[13]: https://opensource.com/sites/default/files/twitter-with-ords.png
|
212
sources/tech/20220131 How to set up a CI pipeline on GitLab.md
Normal file
212
sources/tech/20220131 How to set up a CI pipeline on GitLab.md
Normal file
@ -0,0 +1,212 @@
|
||||
[#]: subject: "How to set up a CI pipeline on GitLab"
|
||||
[#]: via: "https://opensource.com/article/22/2/setup-ci-pipeline-gitlab"
|
||||
[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to set up a CI pipeline on GitLab
|
||||
======
|
||||
Continuous integration (CI) means that code changes are built and tested
|
||||
automatically. Here's how I set up a CI pipeline for my C++ project.
|
||||
![Plumbing tubes in many directions][1]
|
||||
|
||||
This article covers the configuration of a CI pipeline for a C++ project on [GitLab][2]. My previous articles covered how to set up a build system based on [CMake and VSCodium][3] and how to integrate unit tests based on [GoogleTest and CTest][4]. This article is a follow-up on extending the configuration by using a CI pipeline. First, I demonstrate the pipeline setup and then its execution. Next comes the CI configuration itself.
|
||||
|
||||
Continuous integration (CI) simply means that code changes, which get committed to a central repository, are built and tested automatically. A popular platform in the open source area for setting up CI pipelines is GitLab. In addition to a central Git repository, GitLab also offers the configuration of CI/CD pipelines, issue tracking, and a container registry.
|
||||
|
||||
### Terms to know
|
||||
|
||||
Before I dive deeper into this area of the DevOps philosophy, I'll establish some common terms encountered in this article and the [GitLab documentation][5]:
|
||||
|
||||
* Continuous delivery (CD): Automatic provisioning of applications with the aim of deploying them.
|
||||
* Continuous deployment (CD): Automatic publishing of software
|
||||
* Pipelines: The top-level component for CI/CD, defines stages and jobs
|
||||
* Stages: A collection of jobs that must execute successfully
|
||||
* Jobs: Definition of tasks (e.g., compile, performing unit test)
|
||||
* Runners: Services that are actually executing the Jobs
|
||||
|
||||
|
||||
|
||||
### Set up a CI pipeline
|
||||
|
||||
I will reuse the example projects from previous articles, which are available on GitLab. To follow the steps described in the coming chapters, fork the [example project][6] by clicking on the _Fork_ button, which is found on the top right:
|
||||
|
||||
![Fork the project][7]
|
||||
|
||||
Stephan Avenwedde (CC BY-SA 4.0)
|
||||
|
||||
#### Set up a runner
|
||||
|
||||
To get a feeling for how everything works together, start at the bottom by installing a runner on your local system.
|
||||
|
||||
Follow the [installation instructions][8] for the GitLab runner service for your system. Once installed, you have to register a runner.
|
||||
|
||||
1\. On the GitLab page, select the project and in the left pane, navigate to **Settings** and select **CI/CD**.
|
||||
|
||||
![Select CI/CD in Settings][9]
|
||||
|
||||
Stephan Avenwedde (CC BY-SA 4.0)
|
||||
|
||||
2\. Expand the Runners section and switch **Shared runners** to off (yellow marker). Note the token and URL (green marker); we need them in the next step.
|
||||
|
||||
![Configure runner][10]
|
||||
|
||||
Stephan Avenwedde (CC BY-SA 4.0)
|
||||
|
||||
3\. Now open a terminal and enter `gitlab-runner register`. The command invokes a script that asks for some input. Here are the answers:
|
||||
|
||||
* GitLab instance: <https://gitlab.com/> (screenshot above)
|
||||
* Registration token: Pick it from the **Runners** section (screenshot above)
|
||||
* Description: Free selectable
|
||||
* Tags: This is optional. You don't need to provide tags
|
||||
* Executor: Choose **Shell** here
|
||||
|
||||
|
||||
|
||||
If you want to modify the configuration later, you can find it under `~/.gitlab-runner/config.toml`.
|
||||
|
||||
4\. Now, start the runner with the command `gitlab-runner run`. The runner is now waiting for jobs. Your runner is now available in the **Runners** section of the project settings on GitLab:
|
||||
|
||||
![Available specific runners][11]
|
||||
|
||||
Stephan Avenwedde (CC BY-SA 4.0)
|
||||
|
||||
### Execute a pipeline
|
||||
|
||||
As previously mentioned, a pipeline is a collection of jobs executed by the runner. Every commit pushed to GitLab generates a pipeline attached to that commit. If multiple commits are pushed together, a pipeline is created for the last commit only. To start a pipeline for demonstration purposes, commit and push a change directly over GitLab's web editor.
|
||||
|
||||
For the first test, open the `README.md` and add a additional line:
|
||||
|
||||
![Web editor][12]
|
||||
|
||||
Stephan Avenwedde (CC BY-SA 4.0)
|
||||
|
||||
Now commit your changes.
|
||||
|
||||
Note that the default is **Create a new branch**. To keep it simple, choose **Commit to main branch**.
|
||||
|
||||
![Commit changes][13]
|
||||
|
||||
Stephan Avenwedde (CC BY-SA 4.0)
|
||||
|
||||
A few seconds after the commit, you should notice some output in the console window where the GitLab runner executes:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
Checking for jobs... received job=1975932998 repo_url=<https://gitlab.com/hANSIc99/cpp\_testing\_sample.git> runner=Z7MyQsA6
|
||||
|
||||
Job succeeded duration_s=3.866619798 job=1975932998 project=32818130 runner=Z7MyQsA6
|
||||
|
||||
```
|
||||
|
||||
In the project overview in GitLab, select on the right pane **CI/CD --> Pipelines**. Here you can find a list of recently executed pipelines.
|
||||
|
||||
![Pipeline overview][14]
|
||||
|
||||
Stephan Avenwedde (CC BY-SA 4.0)
|
||||
|
||||
If you select a pipeline, you get a detailed overview where you can check which job failed (in case the pipeline failed) and see the output of individual jobs.
|
||||
|
||||
**A job is considered to have failed if a non-zero value was returned**. In the following case, I just invoked the bash command `exit 1` (line 26) to let the job fail:
|
||||
|
||||
![Job overview][15]
|
||||
|
||||
Stephan Avenwedde (CC BY-SA 4.0)
|
||||
|
||||
### CI configuration
|
||||
|
||||
The stages, pipelines, and jobs configurations are made in the file [.gitlab-ci.yml][16] in the root of the repository. I recommend editing the configuration with GitLab's build-in Pipeline editor as it automatically checks for accuracy during editing.
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
stages:
|
||||
\- build
|
||||
\- test
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- cmake -B build -S .
|
||||
- cmake --build build --target Producer
|
||||
artifacts:
|
||||
paths:
|
||||
- build/Producer
|
||||
|
||||
RunGTest:
|
||||
stage: test
|
||||
script:
|
||||
- cmake -B build -S .
|
||||
- cmake --build build --target GeneratorTest
|
||||
- build/Generator/GeneratorTest
|
||||
|
||||
RunCTest:
|
||||
stage: test
|
||||
script:
|
||||
- cmake -B build -S .
|
||||
- cd build
|
||||
- ctest --output-on-failure -j6
|
||||
|
||||
```
|
||||
|
||||
The file defines the stages **build** and **test**. Next, it defines three jobs: **build**, **RunGTest** and **RunCTest**. The **build** job is assigned to the eponymous stage, and the other jobs are assigned to the _test_ stage.
|
||||
|
||||
The commands under the **script** section are ordinary shell commands. You can read them as if you were typing them line by line in the shell.
|
||||
|
||||
I want to point out one special feature: **artifacts**. In this case, I define the _Producer_ binary as an artifact of the **build** job. Artifacts are uploaded to the GitLab server and can be downloaded from there:
|
||||
|
||||
![Pipeline artifacts][17]
|
||||
|
||||
Stephan Avenwedde (CC BY-SA 4.0)
|
||||
|
||||
By default, jobs in later stages automatically download all the artifacts created by jobs in earlier stages.
|
||||
|
||||
A `gitlab-ci.yml` reference is available on [docs.gitlab.com][18].
|
||||
|
||||
### Wrap up
|
||||
|
||||
The above example is an elementary one, but it shows the general principle of continuous integration. In the above section about setting up a runner I deactivated shared runners, although this is the actual strength of GitLab. You can build, test, and deploy your application in clean, containerized environments. In addition to the freely available runners for which GitLab provides a free monthly contingent, you can also provide your own container-based, self-hosted runners. Of course, there is also a more advanced way: You can orchestrate container-based runners using Kubernetes, which allows you to scale the processing of pipelines freely. You can read more about it on [about.gitlab.com][19].
|
||||
|
||||
As I'm running Fedora, I have to mention that Podman is not yet supported as a container engine for GitLab runners. According to gitlab-runner issue [#27119][20], Podman support is already on the list.
|
||||
|
||||
Describing the recurring steps as jobs and combining them in pipelines and stages enables you to keep track of their quality without causing additional work. Especially in large community projects where you have to decide whether merge requests get accepted or declined, a properly configured CI approach can tell you if the submitted code will improve or worsen the project.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/2/setup-ci-pipeline-gitlab
|
||||
|
||||
作者:[Stephan Avenwedde][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/hansic99
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/plumbing_pipes_tutorial_how_behind_scenes.png?itok=F2Z8OJV1 (Plumbing tubes in many directions)
|
||||
[2]: https://gitlab.com/
|
||||
[3]: https://opensource.com/article/22/1/devops-cmake
|
||||
[4]: https://opensource.com/article/22/1/unit-testing-googletest-ctest
|
||||
[5]: https://docs.gitlab.com/
|
||||
[6]: https://gitlab.com/hANSIc99/cpp_testing_sample
|
||||
[7]: https://opensource.com/sites/default/files/cpp_ci_cd_gitlab_fork.png (Fork the project)
|
||||
[8]: https://docs.gitlab.com/runner/install/
|
||||
[9]: https://opensource.com/sites/default/files/cpp_ci_cd_gitlab_project_settings.png (Select CI/CD in Settings)
|
||||
[10]: https://opensource.com/sites/default/files/cpp_ci_cd_gitlab_settings_runners2.png (Configure runner)
|
||||
[11]: https://opensource.com/sites/default/files/cpp_ci_cd_gitlab_settings_active_runner.png (Available specific runners)
|
||||
[12]: https://opensource.com/sites/default/files/cpp_ci_cd_gitlab_web_editor.png (Web editor)
|
||||
[13]: https://opensource.com/sites/default/files/cpp_ci_cd_gitlab_commit_changes2.png (Commit changes)
|
||||
[14]: https://opensource.com/sites/default/files/cpp_ci_cd_gitlab_pipeline_overview2.png (Pipeline overview)
|
||||
[15]: https://opensource.com/sites/default/files/cpp_ci_cd_gitlab_job_overview.png (Job overview)
|
||||
[16]: https://gitlab.com/hANSIc99/cpp_testing_sample/-/blob/main/.gitlab-ci.yml
|
||||
[17]: https://opensource.com/sites/default/files/cpp_ci_cd_gitlab_pipeline_artifacts.png (Pipeline artifacts)
|
||||
[18]: https://docs.gitlab.com/ee/ci/yaml/
|
||||
[19]: https://about.gitlab.com/solutions/kubernetes/
|
||||
[20]: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/27119
|
@ -0,0 +1,106 @@
|
||||
[#]: subject: "Try Turris Omnia, the open source router"
|
||||
[#]: via: "https://opensource.com/article/22/1/turris-omnia-open-source-router"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Try Turris Omnia, the open source router
|
||||
======
|
||||
Whether you're a network engineer or a curious hobbyist, you ought to
|
||||
take a look at the open source Turris Omnia router the next time you're
|
||||
in the market for network gear.
|
||||
![Mesh networking connected dots][1]
|
||||
|
||||
In the early 2000s, I was fascinated by OpenWrt and wanted nothing more than to run it on a router of my own. Unfortunately, I didn't have a router capable of running custom firmware, and so I spent weekends going to garage sales hoping in vain to stumble upon a "Slug" (the slang term hackers were using for the NSLU2 router). Recently, I got hold of the Turris Omnia, which, aside from having a much cooler name, is a router from the Czech Republic using open source firmware built on top of OpenWrt. It has everything you'd expect from hardware running open source, and quite a lot more, including installable packages so you can add exactly what your home or business network needs the most while ignoring the parts you won't use. If you've viewed routers as simple appliances with no room for customization or even utility beyond DNS and DHCP, then you need to look at the Turris Omnia. It'll change your perception of what a router is, what a router can do for your network, and even how you interact with your entire network.
|
||||
|
||||
![The Turris Omnia on my desk][2]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][3])
|
||||
|
||||
### Getting started with Turris Omnia
|
||||
|
||||
For all its power, the Turris Omnia feels comfortingly familiar. The steps to get started are essentially the same as with any other router:
|
||||
|
||||
1. Power it on
|
||||
2. Join the network it provides
|
||||
3. Navigate to 192.168.1.1 in a web browser to configure
|
||||
|
||||
|
||||
|
||||
If you've bought a router in the past, you'll have performed those same steps before. If you're new to this process, know that it's no more complicated than any other router, and ample documentation comes in the box.
|
||||
|
||||
![Configuration][4]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][3])
|
||||
|
||||
### Simple and advanced configuration
|
||||
|
||||
After initial setup, when you navigate to the Turris Omnia router, you have a choice between a simple configuration environment or advanced. You have to begin with the simple configuration. In the **Password** panel, you can set a password for the advanced interface, which also grants you SSH access to the router.
|
||||
|
||||
The simple interface lets you configure how you connect to the wide-area network (WAN) and set parameters for your local-area network (LAN). It also allows you to set up a personal WiFi access point, a guest network, and install and interact with plugins.
|
||||
|
||||
The advanced interface, called LuCI, is exactly what it claims. It's for the network engineer who's familiar with network topography and design, and it's essentially a collection of key and value pairs that you can edit through a simple web interface. If you prefer to edit values directly, you can instead SSH into the router:
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
$ ssh root@192.168.1.1
|
||||
root@192.168.1.1's password:
|
||||
|
||||
BusyBox v1.28.4 () built-in shell (ash)
|
||||
|
||||
______ _ ____ _____
|
||||
/_ __/_ ____________(_)____ / __ \/ ___/
|
||||
/ / / / / / ___/ ___/ / ___/ / / / /\\__
|
||||
/ / / /_/ / / / / / (__ ) / /_/ /___/ /
|
||||
/_/ \\__,_/_/ /_/ /_/____/ \\____//____/
|
||||
|
||||
-----------------------------------------------------
|
||||
TurrisOS 4.0.1, Turris Omnia
|
||||
-----------------------------------------------------
|
||||
root@turris:~#
|
||||
|
||||
```
|
||||
|
||||
### Plugins
|
||||
|
||||
In addition to the flexibility of its interface, the Turris Omnia also features a package manager. You can install plugins, including Network Attached Storage (NAS) configuration, a Nextcloud server, an SSH honeypot, speed test, OpenVPN, print server, a Tor node, LXC for running containers, and much more.
|
||||
|
||||
![Package management for your router][5]
|
||||
|
||||
(Seth Kenlon, [CC BY-SA 4.0][3])
|
||||
|
||||
With just a few clicks, you can install your own [Nextcloud][6] server so you can run your own cloud services or OpenVPN so you can safely access your network when you're away from home.
|
||||
|
||||
### Open source router
|
||||
|
||||
The best part about this router is that it's open source and supports open source. You can download Turris OS and many related open source tools from their [gitlab.nic.cz][7]. You don't have to settle for the firmware that ships on the device, either. With 2 GB of RAM and miniPCIe slots, you can run Debian on it. Even the LEDs in the front panel are programmable. This is a hacker's router, and whether you're a network engineer or a curious hobbyist, you ought to take a look at it the next time you're in the market for network gear.
|
||||
|
||||
You can get the Turris Omnia and several other router models from the [turris.com][8] website, and then join the community at [forum.turris.cz][9]. They're a friendly bunch of enthusiasts, eager to share knowledge, tips, and cool hacks to further what you can do with your open source router.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/1/turris-omnia-open-source-router
|
||||
|
||||
作者:[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/mesh_networking_dots_connected.png?itok=ovINTRR3 (Mesh networking connected dots)
|
||||
[2]: https://opensource.com/sites/default/files/uploads/turris-omnia.jpg (The Turris Omnia on my desk)
|
||||
[3]: https://creativecommons.org/licenses/by-sa/4.0/
|
||||
[4]: https://opensource.com/sites/default/files/uploads/turris-omnia-wifi.jpg (Configuration)
|
||||
[5]: https://opensource.com/sites/default/files/uploads/turris-omnia-packages.jpg (Package management for your router)
|
||||
[6]: https://opensource.com/tags/nextcloud
|
||||
[7]: https://gitlab.nic.cz/turris
|
||||
[8]: https://www.turris.com/en/
|
||||
[9]: http://forum.turris.cz
|
@ -0,0 +1,115 @@
|
||||
[#]: subject: "Logseq: A Free & Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More"
|
||||
[#]: via: "https://itsfoss.com/logseq/"
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Logseq: A Free & Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More
|
||||
======
|
||||
|
||||
_**Brief:** Logseq is a versatile knowledge platform with the support for Markdown and Org-mode. You can create tasks, manage notes, and do a lot more things with them._
|
||||
|
||||
In the age of information, it is crucial to properly organize your thoughts, task list, and any other note related to your work/personal life.
|
||||
|
||||
While some of us choose to use separate applications and services, how about using an all-in-one open-source, privacy-friendly app to do it all?
|
||||
|
||||
That’s where Logseq comes in.
|
||||
|
||||
![][1]
|
||||
|
||||
### Logseq: Privacy-Friendly Knowledge Platform with Markdown & Org-mode Support
|
||||
|
||||
Logseq aims to help you organize, create to-do lists, and build a knowledge graph.
|
||||
|
||||
You can use existing Markdown or org-mode files to simply edit, write, and save any new notes.
|
||||
|
||||
Officially, Logseq is still in the beta testing phase, but it has been getting recommendations since being in the alpha stages.
|
||||
|
||||
Not to forget, it can be a nice open-source alternative to [Obsidian][2] as well. By default, it relies on your local directory, but you can choose any cloud directory to sync via your file system. So, you get to control your data.
|
||||
|
||||
If you haven’t set up any cloud storage, you can try using [Rclone][3], [Insync][4], or [rsync commands][5].
|
||||
|
||||
![][6]
|
||||
|
||||
Logseq gives powerful abilities and also supports plugins to expand the functionalities further. Let me highlight some of the key features to help you decide.
|
||||
|
||||
### Features of Logseq
|
||||
|
||||
![][7]
|
||||
|
||||
Logseq offers all the essentials for a knowledge app platform. Here’s what you can expect from it:
|
||||
|
||||
* Markdown Editor
|
||||
* Org-mode File Support
|
||||
* Backlink
|
||||
* Page and block references (link between them)
|
||||
* Page and block embed to add quotes/references
|
||||
* Support for adding tasks and to-do lists
|
||||
* Ability to add tasks as per priority or by order A, B, C..
|
||||
* Publish pages and access it using localhost or GitHub pages
|
||||
* Advance commands support
|
||||
* Ability to create a template from your existing resource to re-use it
|
||||
* Page alias
|
||||
* PDF highlights
|
||||
* Create cards and quickly review them to memorize things
|
||||
* Excalidraw integration
|
||||
* Zotero integration
|
||||
* Add a custom theme by simply creating a custom.css file. There are available community-made files for quick use as well.
|
||||
* Custom keyboard shortcuts
|
||||
* Ability to self-host Logseq
|
||||
* Cross-platform support
|
||||
|
||||
|
||||
|
||||
Even though it’s beta software, it worked as expected in my brief testing. I’m not an advanced user checking the impressive knowledge graph, but if you have numerous Markdown notes, you can add them, link them, and check the generated graph yourself.
|
||||
|
||||
I was able to add tasks, link pages, add references, embed pages, check the knowledge graph for my existing data.
|
||||
|
||||
You can always change the theme from the marketplace and add functionalities using plugins, and this should help you personalize the experience for your workflow.
|
||||
|
||||
![][8]
|
||||
|
||||
I found it incredibly easy to use, and the [documentation][9] explains everything nicely if you get stuck somewhere.
|
||||
|
||||
### Install Logseq in Linux
|
||||
|
||||
You can find the AppImage file in its [GitHub releases section][10] for pre-releases and beta versions. Additionally, you should also find it listed on [Flathub][11]. So, you can install it on any Linux distribution of your choice.
|
||||
|
||||
If you need help, you might want to refer to our [AppImage][12] and [Flatpak guides][13] to get started.
|
||||
|
||||
In either case, you can head to its [official webpage][14] to know more about it.
|
||||
|
||||
[Logseq][14]
|
||||
|
||||
Have you tried Logseq yet? Let me know your thoughts in the comments down below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/logseq/
|
||||
|
||||
作者:[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://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/logseq.png?resize=800%2C450&ssl=1
|
||||
[2]: https://itsfoss.com/obsidian-markdown-editor/
|
||||
[3]: https://itsfoss.com/use-onedrive-linux-rclone/
|
||||
[4]: https://itsfoss.com/insync-linux-review/
|
||||
[5]: https://linuxhandbook.com/rsync-command-examples/
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/logseq-screenshot.jpg?resize=800%2C602&ssl=1
|
||||
[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/logseq-themes.jpg?resize=800%2C479&ssl=1
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/logseq-screenshot-1.jpg?resize=800%2C603&ssl=1
|
||||
[9]: https://logseq.github.io/#/page/Contents
|
||||
[10]: https://github.com/logseq/logseq/releases
|
||||
[11]: https://flathub.org/apps/details/com.logseq.Logseq
|
||||
[12]: https://itsfoss.com/use-appimage-linux/
|
||||
[13]: https://itsfoss.com/flatpak-guide/
|
||||
[14]: https://logseq.com/
|
@ -1,74 +0,0 @@
|
||||
[#]: subject: "Why now is a great time to consider a career in open source hardware"
|
||||
[#]: via: "https://opensource.com/article/21/11/open-source-hardware-careers"
|
||||
[#]: author: "Joshua Pearce https://opensource.com/users/jmpearce"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "zengyi1001"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Why now is a great time to consider a career in open source hardware
|
||||
为什么说现在是考虑从事开源硬件职业的好时机
|
||||
======
|
||||
|
||||
开源硬件现在有了自己的专属领域并且正在快速的成长中。
|
||||
![open source hardware shaking hands][1]
|
||||
|
||||
在软件行业中,各种风格的程序员通过编写代码并且使用开源许可发布到公共场所来构建自己的职业生涯,已经变得司空见惯。产业界的猎头们通常要求访问他们未来员工候选人的代码。哪些将自己职业生涯专注在开源项目开发的人得到了回报。从 payscale.com 网站得知,Linux 系统管理员的收入比他们的 Windows 管理员同行要高,说明从事开源软件领域可以获得更高的报酬和更稳定的工作机会。分享你的工作会让你感觉非常好(这甚至可能是一种因果报应),你知道自己正在为整个世界创造价值。历史上,这样的机会可从来没有为我们这些工作在开源硬件领域的人存在过。
|
||||
|
||||
大约20年前,没有人知道开源硬件是什么,更别说围绕它规划自己的职业生涯了。举例而言,在2000年全世界发表了超过200万篇学术论文,却只有7篇文章提到过“开源硬件”。在我第一次写 [_Open-Source Lab_][2]的时候,我收集了每一个案例(其实也就几十个)并且可以轻松的跟上和阅读每一篇发布的关于开源硬件的文章,还把它们发布到一个维基上。我很高兴的报告大家这种情况现在已经在物理上成为了不可能。今年已经有超过1500篇文章在讨论“开源硬件”,而且我相信年底的时候还会有更多的文章发表出来。开源硬件现在已经发展出来了自己的领域,有一些专门报导它的杂志(比如说 [_HardwareX_][3] 和 [_Journal of Open Hardware_][4])。在广泛的领域,数十种传统杂志现在也会定期报道最新的开源硬件的发展。
|
||||
![Smart open source 3-D printing][5]
|
||||
|
||||
开发智能开源硬件 3-D 打印 (Joshua Pearce, [GNU-FDL][6])
|
||||
|
||||
即使是在十年前,从职业生涯的角度看,着重于开源硬件开发在某种程度上也是一种冒险。我记得在我上一份工作的简历中,我淡化了和它相关的内容,更多的强调了我的传统工作。工业界和学术界的管理人员难以明白如果这些设计被赠与出去并在其他地方生产制造,你又怎样获得收益。这一切都在改变。和自由与开源的软件一样开源硬件开发要更快,而且我敢说,会优于私有开发模式。
|
||||
|
||||
![Open source recycle bot][7]
|
||||
|
||||
(Joshua Pearce, [GNU-FDL][6])
|
||||
|
||||
|
||||
对于每一种企业,都有大量成功的[开放硬件商业模式][8]。随着数字制造的兴起(主要是由于开源开发),开源软件和开源硬件之间的界限变得模糊。像 [FreeCAD][9] 这样的开源软件可以制作开放式设计,然后在内置 CAM 中使用,以便在开源激光切割机、CNC 铣床或 3D 打印机上进行制造。 [OpenSCAD][10] 是一个基于开源脚本的 CAD 包,尤其是它确实模糊了软件和硬件之间的界限,以至于代码和物理设计成为同义词。我们中的许多人开始公开谈论开放硬件。我把它作为我研究计划的核心推动力,首先让我自己的设备开源,然后为其他人开发开放硬件。我并不孤单。作为一个社区,我们已经获得了足够的临界质量,以至于 [开源硬件协会][11] (OSHWA) 于 2012 年成立。如今,差不多十年后,开源硬件的职业前景完全不同:数百个开源硬件硬件公司存在,互联网上涌现出数百万(数百万!)个开源设计,学术文献中对开源硬件的兴趣呈指数级增长。
|
||||
|
||||
![Open source production for solar photovoltaics][12]
|
||||
太阳能光伏产业的开源生产
|
||||
|
||||
为太阳能光伏开发开源产品。(Joshua Pearce, [GNU-FDL][6])
|
||||
|
||||
甚至有些工作的目标就是促进更快过渡到无处不在的开源硬件。例如,开发开放数据标准和发展这些标准的用户社区的互联网产业 (IoP) 联盟现在已经为运营通信员、数据标准社区支持经理和 DevOps 工程师提供了[职位][13]。正是由于**我在开源硬件上方面的工作**,我刚被聘为[加拿大西部大学][14],这所世界排名前 1% 的大学的终身讲席主席。该职位与加拿大排名第一的商学院 [Ivey Business School,][15] 相交叉。我的工作是帮助大学快速发展,抓住开源技术发展机会。说到做到,我现在正[招聘][16]硕士和博士水平的毕业生,包含全额奖学金和生活津贴。这些[免费适用的可持续性技术 (FAST) 实验室][17] 的研究生工程职位专门用于开发开源硬件,用于太阳能光伏系统、分布式回收和紧急食品生产等一系列应用。这种工作得到了那些想要最大化[他们的研究投资回报][18]的资助者的更频繁的资助。整个国家都在朝着这个方向前进。最近的好例子是法国,它刚刚发布了[第二个开放科学计划][19]。我注意到 [GrantForward][20] 上列出的,用于美国开源资金的“开源”关键字资助的数量显着增加。许多基金会已经大声而清晰地收到了开源备忘录——因此开源研发的机会越来越多。
|
||||
|
||||
因此,如果你还没开始的话,也许是时候考虑将开源作为一种职业,即使您是一名喜欢开发硬件的工程师。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/11/open-source-hardware-careers
|
||||
|
||||
作者:[Joshua Pearce][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/zengyi1001)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/jmpearce
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open-source-hardware.png?itok=vS4MBRSh (shaking hands open source hardware)
|
||||
[2]: https://www.appropedia.org/Open-source_Lab
|
||||
[3]: https://www.hardware-x.com/
|
||||
[4]: https://openhardware.metajnl.com/
|
||||
[5]: https://opensource.com/sites/default/files/uploads/smart-open-source-3d-printing.png (Smart open source 3-D printing)
|
||||
[6]: https://www.gnu.org/licenses/fdl-1.3.en.html
|
||||
[7]: https://opensource.com/sites/default/files/pictures/open-source-recyclebot_0.jpg (Open source recycle bot)
|
||||
[8]: https://doi.org/10.5334/joh.4
|
||||
[9]: https://www.freecadweb.org/
|
||||
[10]: https://openscad.org/
|
||||
[11]: https://www.oshwa.org/
|
||||
[12]: https://opensource.com/sites/default/files/uploads/open-source-solar-photovoltaics.png (Open source production for solar photovoltaics)
|
||||
[13]: https://www.internetofproduction.org/hiring
|
||||
[14]: https://www.uwo.ca/
|
||||
[15]: https://www.ivey.uwo.ca/
|
||||
[16]: https://www.appropedia.org/FAST_application_process
|
||||
[17]: https://www.appropedia.org/Category:FAST
|
||||
[18]: https://www.academia.edu/13799962/Return_on_Investment_for_Open_Source_Hardware_Development
|
||||
[19]: https://www.ouvrirlascience.fr/wp-content/uploads/2021/10/Second_French_Plan-for-Open-Science_web.pdf
|
||||
[20]: https://www.grantforward.com/index
|
@ -0,0 +1,99 @@
|
||||
[#]: subject: "How I use Linux accessibility settings"
|
||||
[#]: via: "https://opensource.com/article/22/1/linux-accessibility-settings"
|
||||
[#]: author: "Don Watkins https://opensource.com/users/don-watkins"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
我如何使用 Linux 的辅助功能设置
|
||||
======
|
||||
不同的 Linux 系统以不同的方式处理辅助技术。 这里是一些对视觉、听觉、打字等有用的设置。
|
||||
![Person using a laptop][1]
|
||||
|
||||
当我在20世纪90年代开始使用Linux时,我已经 40 多岁了,无障碍性不是我考虑的问题。然而现在,当我快到 70 岁时,我的需求已经改变了。几年前,我从 System76 购买了一个全新的 Darter Pro,它的默认分辨率是 1920x1080,而且也是高 DPI。系统附带了 Pop_OS!,我发现我必须修改它才能看到显示屏上的图标和文字。谢天谢地,桌面上的 Linux 已经变得比 90 年代更容易使用了。
|
||||
|
||||
我需要辅助技术,特别是在视觉和听觉方面。还有一些我不使用的领域,但对需要帮助打字、指点、点击和手势的人来说是有用的。
|
||||
|
||||
不同的系统,如 Gnome、KDE、LXDE、XFCE 和其他系统,对这些辅助技术的处理方式不同。这些辅助性的调整大多可以通过**设置**对话框或键盘快捷键来实现。
|
||||
|
||||
### 文字显示
|
||||
|
||||
我需要帮助来显示较大的文字,在我的 Linux Mint Cinnamon 桌面上,我使用这些设置:
|
||||
|
||||
![accessibility options - visual][2]
|
||||
|
||||
Don Watkins (CC BY-SA 4.0)
|
||||
|
||||
I have also found **Gnome Tweaks** allows me to fine-tune text display sizes for my desktop experience. I adjusted the resolution of my display from its default of 1920x1080 to a more comfortable 1600x900. Here are my Layout settings:
|
||||
我还发现 **Gnome Tweaks** 可以让我对桌面体验的文字显示大小进行微调。我把我的显示器的分辨率从默认的 1920x1080 调整到更舒适的 1600x900。以下是我的布局设置:
|
||||
|
||||
![accessibility options - display][3]
|
||||
|
||||
Don Watkins (CC BY-SA 4.0)
|
||||
|
||||
### 键盘支持
|
||||
|
||||
我不需要键盘支持,但它们是现成的,如下图所示:
|
||||
|
||||
![accessibility options - keyboard][4]
|
||||
|
||||
Don Watkins (CC BY-SA 4.0)
|
||||
|
||||
### 更多无障碍选项
|
||||
|
||||
在 Fedora 35 上,无障碍访问也是熟悉的。打开**设置**菜单,选择让**总是显示无障碍菜单**图标在桌面上可见。我通常会切换**大字体**,除非我在一个大显示器上。还有许多其他选项,包括**缩放**、**屏幕阅读器**和**声音键**。这里有一些:
|
||||
|
||||
![accessibility options - settings][5]
|
||||
|
||||
Don Watkins (CC BY-SA 4.0)
|
||||
|
||||
当在 Fedora 的**设置** 菜单中启用了**无障碍菜单**,就很容易从右上角的图标中切换其他功能:
|
||||
|
||||
![accessibility options - desktop][6]
|
||||
|
||||
Don Watkins (CC BY-SA 4.0)
|
||||
|
||||
有一些 Linux 发行版是专门为需要支持的人设计的。[Accessible Coconut][7] 就是这样一个发行版。Coconut 基于 Ubuntu Mate 20.04,并默认启用了屏幕阅读器。它装载了 Ubuntu Mate 的默认应用。Accessible Coconut 是 [Zendalona][8] 的作品,该公司专门开发免费和开源的无障碍应用。他们所有的应用都是以 GPL 2.0 许可证发布的,包括 [iBus-Braille][9]。该发行版包括屏幕阅读器、各种语言的打印阅读、六键输入、打字辅导、放大器、电子书扬声器等等。
|
||||
|
||||
![accessibility options - desktop][10]
|
||||
|
||||
Don Watkins (CC BY-SA 4.0)
|
||||
|
||||
[Gnome Accessibility Toolkit][11] 是一个开源软件库,是 Gnome 项目的一部分,为实现无障碍功能提供 API。你可以通过访问他们的 wiki 来参与 [Gnome 无障碍团队][12]。KDE 也有一个[无障碍项目][13]和一个支持该项目的[应用][14]列表。你可以通过访问他们的 [wiki][15] 来参与 KDE 无障碍项目。[XFCE][16] 也为用户提供了资源。[Fedora Project Wiki][17] 也有一个可以安装在操作系统上的无障碍应用的列表。
|
||||
|
||||
### Linux 适合所有人
|
||||
|
||||
自 20 世纪 90 年代以来,Linux 已经有了长足的进步,其中一个很大的进步就是对无障碍的支持。很高兴知道随着 Linux 用户的不断变化,操作系统也可以和我们一起变化,并做出许多不同的支持选项。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/22/1/linux-accessibility-settings
|
||||
|
||||
作者:[Don Watkins][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/don-watkins
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop)
|
||||
[2]: https://opensource.com/sites/default/files/accessibility-visualpng.png (accessibility options - visual)
|
||||
[3]: https://opensource.com/sites/default/files/display.png (accessibility options - display)
|
||||
[4]: https://opensource.com/sites/default/files/keyboard_0.png (accessibility options - keyboard)
|
||||
[5]: https://opensource.com/sites/default/files/settings.png (accessibility options - settings)
|
||||
[6]: https://opensource.com/sites/default/files/desktop.png (accessibility options - desktop)
|
||||
[7]: https://zendalona.com/accessible-coconut/
|
||||
[8]: https://zendalona.com/
|
||||
[9]: https://github.com/zendalona/ibus-braille
|
||||
[10]: https://opensource.com/sites/default/files/desktop2.png (accessibility options - desktop)
|
||||
[11]: https://en.wikipedia.org/wiki/Accessibility_Toolkit
|
||||
[12]: https://wiki.gnome.org/Accessibility
|
||||
[13]: https://community.kde.org/Accessibility#KDE_Accessibility_Project
|
||||
[14]: https://userbase.kde.org/Applications/Accessibility
|
||||
[15]: https://community.kde.org/Get_Involved/accessibility
|
||||
[16]: https://docs.xfce.org/xfce/xfce4-settings/accessibility
|
||||
[17]: https://fedoraproject.org/wiki/Docs/Beats/Accessibility#Using_Fedora.27s_Accessibility_Tools
|
Loading…
Reference in New Issue
Block a user