From 71e07e9382f3ea0b24e3e34c87eb22a91bb230c1 Mon Sep 17 00:00:00 2001 From: XYenChi <466530436@qq.com> Date: Mon, 18 Jan 2021 23:11:36 +0800 Subject: [PATCH 001/818] Update 20190312 When the web grew up- A browser story.md --- sources/talk/20190312 When the web grew up- A browser story.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20190312 When the web grew up- A browser story.md b/sources/talk/20190312 When the web grew up- A browser story.md index 9f47402ac1..d9bdf87f52 100644 --- a/sources/talk/20190312 When the web grew up- A browser story.md +++ b/sources/talk/20190312 When the web grew up- A browser story.md @@ -15,7 +15,7 @@ web 的诞生:浏览器的故事grew up: A browser story 最近,我Recently, I [分享了shared how][1] 获得英文文学和神学学位离开大学,在一个大家都还不知道 web 服务器是什么的地方,设法找到一份运行 web 服务器的工作。upon leaving university in 1994 with a degree in English literature and theology, I somehow managed to land a job running a web server in a world where people didn't really know what a web server was yet. 那“地方”,我不仅仅指的是我工作的组织,而是泛指所有地方。And by "in a world," I don't just mean within the organisation in which I worked, but the world in general. Web 那时当真是全新的——人们还正尝试理出头绪。The web was new—really new—and people were still trying to get their heads around it. -That's not to suggest that the place where I was working—an academic publisher—particularly "got it" either. This was a world in which a large percentage of the people visiting their website were still running 28k8 modems. I remember my excitement in getting a 33k6 modem. At least we were past the days of asymmetric upload/download speeds,1 where 1200/300 seemed like an eminently sensible bandwidth description. This meant that the high-design, high-colour, high-resolution documents created by the print people (with whom I shared a floor) were completely impossible on the web. I wouldn't allow anything bigger than a 40k GIF on the front page of the website, and that was pushing it for many of our visitors. Anything larger than 60k or so would be explicitly linked as a standalone image from a thumbnail on the referring page. +That's not to suggest that the place where I was working—an academic publisher—particularly "got it" either. 这是个大部分人还在用 28k8 猫访问网页的地方。我记得我拿到 33k6 猫时有多激动。This was a world in which a large percentage of the people visiting their website were still running 28k8 modems. I remember my excitement in getting a 33k6 modem. 至少上下行速率不对称的日子过去了,以前带宽显示 1200/300 特别常见。t least we were past the days of asymmetric upload/download speeds,1 where 1200/300 seemed like an eminently sensible bandwidth description. 这意味着This meant that the high-design设计复杂, high-colour色彩缤纷, high-resolution纤毫毕现 documents created by the print people (端同一家饭碗) were completely impossible on the web. 我不可能让大于 40k 的GIF 出现在网站的首页推送给访问的人。I wouldn't allow anything bigger than a 40k GIF on the front page of the website, and that was pushing it for many of our visitors. 大于大约 60k 的会作为独立的图片,缩略图链接到参照页。Anything larger than 60k or so would be explicitly linked as a standalone image from a thumbnail on the referring page. To say that the marketing department didn't like this was an understatement. Even worse was the question of layout. "Browsers decide how to lay out documents," I explained, time after time, "you can use headers or paragraphs, but how documents appear on the page isn't defined by the document, but by the renderer!" They wanted control. They wanted different coloured backgrounds. After a while, they got that. I went to what I believe was the first W3C meeting at which the idea of Cascading Style Sheets (CSS) was discussed. And argued vehemently against them. The suggestion that document writers should control layout was anathema.2 It took some while for CSS to be adopted, and in the meantime, those who cared about such issues adopted the security trainwreck that was Portable Document Format (PDF). From 2eee2b034079ede66dc761b14aa606ab79524052 Mon Sep 17 00:00:00 2001 From: XYenChi <466530436@qq.com> Date: Tue, 19 Jan 2021 23:24:01 +0800 Subject: [PATCH 002/818] Update 20190312 When the web grew up- A browser story.md --- .../talk/20190312 When the web grew up- A browser story.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/talk/20190312 When the web grew up- A browser story.md b/sources/talk/20190312 When the web grew up- A browser story.md index d9bdf87f52..602ffff4e1 100644 --- a/sources/talk/20190312 When the web grew up- A browser story.md +++ b/sources/talk/20190312 When the web grew up- A browser story.md @@ -17,13 +17,13 @@ web 的诞生:浏览器的故事grew up: A browser story That's not to suggest that the place where I was working—an academic publisher—particularly "got it" either. 这是个大部分人还在用 28k8 猫访问网页的地方。我记得我拿到 33k6 猫时有多激动。This was a world in which a large percentage of the people visiting their website were still running 28k8 modems. I remember my excitement in getting a 33k6 modem. 至少上下行速率不对称的日子过去了,以前带宽显示 1200/300 特别常见。t least we were past the days of asymmetric upload/download speeds,1 where 1200/300 seemed like an eminently sensible bandwidth description. 这意味着This meant that the high-design设计复杂, high-colour色彩缤纷, high-resolution纤毫毕现 documents created by the print people (端同一家饭碗) were completely impossible on the web. 我不可能让大于 40k 的GIF 出现在网站的首页推送给访问的人。I wouldn't allow anything bigger than a 40k GIF on the front page of the website, and that was pushing it for many of our visitors. 大于大约 60k 的会作为独立的图片,缩略图链接到参照页。Anything larger than 60k or so would be explicitly linked as a standalone image from a thumbnail on the referring page. -To say that the marketing department didn't like this was an understatement. Even worse was the question of layout. "Browsers decide how to lay out documents," I explained, time after time, "you can use headers or paragraphs, but how documents appear on the page isn't defined by the document, but by the renderer!" They wanted control. They wanted different coloured backgrounds. After a while, they got that. I went to what I believe was the first W3C meeting at which the idea of Cascading Style Sheets (CSS) was discussed. And argued vehemently against them. The suggestion that document writers should control layout was anathema.2 It took some while for CSS to be adopted, and in the meantime, those who cared about such issues adopted the security trainwreck that was Portable Document Format (PDF). +To say that the marketing department didn't like this was an understatement. 更糟的是布局问题。Even worse was the question of layout. "Browsers decide how to lay out documents," I explained, time after time, "你可以使用眉头词或者段落,但是文档在页面上如何显示并不取决于文档,而是you can use headers or paragraphs, but how documents appear on the page isn't defined by the document, but by the renderer!" They wanted control. They wanted different coloured backgrounds. After a while, they got that. I went to what I believe was the first W3C meeting at which the idea of Cascading Style Sheets 层叠样式表(CSS) was discussed. And argued vehemently against them. The suggestion that document writers should control layout was anathema.2 It took some while for CSS to be adopted, and in the meantime, those who cared about such issues adopted the security trainwreck that was Portable Document Format (PDF). How documents were rendered wasn't the only issue. Being a publisher of actual physical books, the whole point of having a web presence, as far as the marketing department was concerned, was to allow customers—or potential customers—to know not only what a book was about, but also how much it was going to cost them to buy. This, however, presented a problem. You see, the internet—in which I include the rapidly growing World Wide Web—was an open, free-for-all libertarian sort of place where nobody was interested in money; in fact, where talk of money was to be shunned and avoided. -I took the mainstream "Netizen" view that there was no place for pricing information online. My boss—and, indeed, pretty much everybody else in the organisation—took a contrary view. They felt that customers should be able to see how much books would cost them. They also felt that my bank manager would like to see how much money was coming into my bank account on a monthly basis, which might be significantly reduced if I didn't come round to their view. +I took the mainstream "Netizen网民" view that there was no place for pricing information online. 我老板,加上组织里相当多的人都持有相反的看法My boss—and, indeed, pretty much everybody else in the organisation—took a contrary view. They felt that customers should be able to see how much books would cost them. They also felt that my bank manager would like to see how much money was coming into my bank account on a monthly basis, which might be significantly reduced if I didn't come round to their view. -Luckily, by the time I'd climbed down from my high horse and got over myself a bit—probably only a few weeks after I'd started digging my heels in—the web had changed, and there were other people putting pricing information up about their products. These newcomers were generally looked down upon by the old schoolers who'd been running web servers since the early days,3 but it was clear which way the wind was blowing. This didn't mean that the battle was won for our website, however. As an academic publisher, we shared an academic IP name ("ac.uk") with the University. The University was less than convinced that publishing pricing information was appropriate until some senior folks at the publisher pointed out that Princeton University Press was doing it, and wouldn't we look a bit silly if…? +Luckily, by the time I'd climbed down from my high horse and got over myself a bit—probably only a few weeks after I'd started digging my heels in—the web had changed, and there were other people putting pricing information up about their products. 新来的人渐渐瞧不起先前运行 web 服务器的老学究们,但风向很清晰。These newcomers were generally looked down upon by the old schoolers who'd been running web servers since the early days,3 but it was clear which way the wind was blowing. This didn't mean that the battle was won for our website, however. As an academic publisher, we shared an academic IP name ("ac.uk") with the University. The University was less than convinced that publishing pricing information was appropriate until some senior folks at the publisher pointed out that Princeton University Press was doing it, and wouldn't we look a bit silly if…? The fun didn't stop there, either. A few months into my tenure as webmaster ("webmaster@…"), we started to see a worrying trend, as did lots of other websites. Certain visitors were single-handedly bringing our webserver to its knees. These visitors were running a new web browser: Netscape. Netscape was badly behaved. Netscape was multi-threaded. From 31c6abe9ecdca3a3a9084311d2d5fdce8bde4e42 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 14 Feb 2021 11:55:55 +0800 Subject: [PATCH 003/818] PRF PART 1 --- ...21 lawyer The MIT License, Line by Line.md | 45 ++++++++++--------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/translated/talk/20160921 lawyer The MIT License, Line by Line.md b/translated/talk/20160921 lawyer The MIT License, Line by Line.md index eb050aad1b..0a811d4a37 100644 --- a/translated/talk/20160921 lawyer The MIT License, Line by Line.md +++ b/translated/talk/20160921 lawyer The MIT License, Line by Line.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (bestony) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (lawyer The MIT License, Line by Line) @@ -10,50 +10,51 @@ 逐行解读 MIT 许可证 ====== +> 每个程序员都应该明白的 171 个字。 + [MIT 许可证][1] 是世界上最流行的开源软件许可证。以下是它的逐行解读。 -#### 阅读协议 +### 阅读许可证 -如果你涉及到开源软件,并且没有花时间从头到尾的阅读整个许可证(它只有 171 个单词),你现在就需要这样去做。尤其是当许可证不是你日常的工作内容时。把任何看起来不对劲或不清楚的地方记下来,然后继续阅读。我会把每一个单词再重复一遍,并按顺序分块,加入上下文和注释。但最重要的还是要牢记整体。 +如果你参与了开源软件,但还没有花时间从头到尾的阅读过这个许可证(它只有 171 个单词),你需要现在就去读一下。尤其如果许可证不是你日常每天都会接触的,把任何看起来不对劲或不清楚的地方记下来,然后继续阅读。我会分段、按顺序、加入上下文和注释,把每一个词再重复一遍。但最重要的还是要有个整体概念。 > The MIT License (MIT) > -> Copyright (c) +> Copyright (c) \ \ > > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. > -> The Software is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the Software. +> *The Software is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the Software.* -许可证可以分为五段,按照逻辑划分如下: +该许可证分为五段,按照逻辑划分如下: * **头部** - * **许可证标题** : “MIT 许可证” - * **版权说明** : “Copyright (c) …” - * **许可证授权** : “特此批准 …” - * **授权范围** : “… 处理软件 …” - * **条件** : “… 服从了 …” - * **归属和通知** : “上述 … 应当被包含在内 …” - * **免责声明** : “软件按照“原状”提供 …” - * **责任限制** : “在任何情况下 …” + * **许可证名称**:“MIT 许可证” + * **版权说明**:“Copyright (c) …” + * **许可证授予**:“特此批准 …” + * **授予范围**:“… 处理软件 …” + * **条件**:“… 但需符合 …” + * **归属和通知**:“上述 … 应当被包含在内 …” + * **免责声明**:“软件按照‘原状’提供 …” + * **责任限制**:“在任何情况下 …” +接下来详细看看。 -接下来详细看看 +### 头部 -#### 头部 - -##### 许可证头部 +#### 许可证名称 > The MIT License (MIT) -“MIT 许可证“不是单一的许可证,而是一系列从麻省理工学院为将要发布的语言准备的许可证衍生的许可证。多年来,无论是对于使用它的原始项目,还是作为其他项目的模型,他都经历了许多变化。Fedora 项目维护了一个纯文本的[麻省理工学院许可证其他版本]的页面,如同泡在甲醛中的解剖标本一般,平淡的追溯了无序的演变。 +“MIT 许可证”不是一个单一的许可证,而是根据麻省理工学院Massachusetts Institute of Technology(MIT)为发行版本准备的语言衍生出来一系列许可证形式。多年来,无论是对于使用它的原始项目,还是作为其他项目的范本,它经历了许多变化。Fedora 项目一直保持着 [收藏 MIT 许可证的好奇心][2],以纯文本的方式记录了那些平淡的变化,如同泡在甲醛中的解剖标本一般,追溯了它的各种演变。 -幸运的是,[OSI(开放源码倡议)][3] 和 [Software Package Data eXchange(软件数据包交换)]团体已经将一种通用的 MIT 式的许可证形式标准化为”MIT 许可证“。而 OSI 则采用了 SPDX 标准化的[字符串标志符][5],并将其中的 ”MIT“ 明确的指向标准化形式的”MIT 许可证“ +幸运的是,[开放源码倡议组织][3]Open Source Initiative(OSI) 和 [软件数据包交换][4]Software Package Data eXchange组织(SPDX)已经将一种通用的 MIT 式的许可证形式标准化为“MIT 许可证The MIT License”。OSI 则采用了 SPDX 标准化的[字符串标志符][5],并将其中的 “MIT” 明确的指向标准化形式的“MIT 许可证”。如果你想为一个新项目使用 MIT 式的条款,请使用[标准化的形式][1]。 -即使你在 “LICENSE” 文件中包含 “MIT 许可证”或 “SPDX:MIT“ ,任何负责的审查员仍会将文本与标准格式进行比较,以确保安全。尽管自称为“MIT 许可证”的各种许可证形式只在细微的细节上有所不同,但“MIT 许可证”的松散性吸引了一些作者加入麻烦的“定制”。典型的糟糕、不好的例子是[JSON 许可证][6],一个 MIT 家族的许可证被加上了“这个软件应该被应用于好的,而不是恶的”。这件事情可能是“非常克罗克福特”的(译者注,JSON 格式和 JSON.org 的作者)。这绝对是一件麻烦事,也许这个笑话应该只是在律师身上,但它一直延伸到银行业。 +即使你在 `LICENSE` 文件中包含 The MIT License” 或 “SPDX:MIT”,任何负责的审查者仍会将文本与标准格式进行比较,以确保安全。尽管自称为“MIT 许可证”的各种许可证形式只在细微的细节上有所不同,但什么视作“MIT 许可证”的松散性已经诱使了一些作者加入麻烦的“自定义”。典型的糟糕、不好的、非常坏的例子是 [JSON 许可证][6],一个 MIT 家族的许可证被加上了“本软件应用于善,而非恶”。这件事情可能是“非常克罗克福特”的(LCTT 译者注,JSON 格式和 JSON.org 的作者)。这绝对是一件麻烦事,也许这个玩笑本来是开在律师身上的。但他们却笑得前仰后合。 -这个故事的寓意是:“MIT 许可证”本身就是模棱两可的。大家可能很清楚你的意思,但你只需要把标准的 MIT 许可证文本复制到你的项目中,就可以节省每个人的时间。如果使用元数据(如包管理器中的元数据文件)来制定 “MIT 许可证”,请确保 “LICENSE” 文件和任何头部的注释都适用标准的许可证文本。所有的这些都可以[自动化完成][7]。 +这个故事的寓意是:“MIT 许可证”本身就是模棱两可的。大家可能很清楚你的意思,但你只需要把标准的 MIT 许可证文本复制到你的项目中,就可以节省每个人的时间。如果使用元数据(如包管理器中的元数据文件)来指定 “MIT 许可证”,请确保 `LICENSE` 文件和任何头部的注释都使用标准的许可证文本。所有的这些都可以 [自动化完成][7]。 ##### 版权说明 From e30f6c0d6684a645584e9c510d66f81ad6bb5b6c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 15 Feb 2021 05:03:57 +0800 Subject: [PATCH 004/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210214=20?= =?UTF-8?q?Give=20something=20from=20the=20heart=20to=20the=20public=20dom?= =?UTF-8?q?ain?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210214 Give something from the heart to the public domain.md --- ...ing from the heart to the public domain.md | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 sources/tech/20210214 Give something from the heart to the public domain.md diff --git a/sources/tech/20210214 Give something from the heart to the public domain.md b/sources/tech/20210214 Give something from the heart to the public domain.md new file mode 100644 index 0000000000..07ea72f223 --- /dev/null +++ b/sources/tech/20210214 Give something from the heart to the public domain.md @@ -0,0 +1,70 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Give something from the heart to the public domain) +[#]: via: (https://opensource.com/article/21/2/public-domain) +[#]: author: (Jen Wike Huger https://opensource.com/users/jen-wike) + +Give something from the heart to the public domain +====== +The team at Creative Commons wants you to share a creation to the Public +Domain as a show of support for openly sharing content. +![Red Lego Heart][1] + +Did you know that most of the articles published on Opensource.com are licensed under Creative Commons [BY-SA 4.0][2]? + +One of the biggest reasons our editorial team decided on this license over 10 years ago is because we support the idea that the best content is _shared_ content. As we strive to be open, our goal is for any many people as possible to have access to the information we're putting out there to support our mission to help others learn and grow and to explore new open source worlds. + +So, what does this have to do with Valentine's Day (or Friend's Day in Finland)? + +The team at Creative Commons wants you to [share a creation][3] to the [Public Domain][4] as a show of support for openly sharing content. It could be an image, song, artwork, poem, GIF, research paper... the list goes on! But "why?" I hear you asking. What's so special about the Public Domain? Well, did you hear about Nathan Evans's rendition of the sea shanty song "The Wellerman" that went viral? Here's what Creative Commons CEO Catherine Stihler [had to say about it][5]: + +"It is important to note that this flourishing creative scene is only possible because sea shanties are in the public domain—not under restrictive copyright rules. Therefore, they can be played, reused, dueted, remixed, and transformed. This, combined with the internet, means a postal worker in Airdrie can reach a global audience within seconds. Thanks to emerging technologies and social platforms, the public domain can both enable creativity and benefit from it with the invention of new works that are also free of copyright restrictions. (The hope is that these new works are put back into the public domain!) This expressiveness in new works and collaborations is bringing joy and uplifting our spirits as we continue to face daunting challenges." + +So, I'll add a twist on their Valentine's Day challenge: If you want to share something you've created but aren't sure about going totally Public Domain, check out the other [options for licensing][6] from CC BY to CC0. And to lower the bar even more to entice you to join in: You don't have to create something new, right now. Search through your archives for something you created last year or five years ago, and give it new life today with a new license. + + 1. Find the thing you want to share + 2. If it's not already, prepare it in digital format + 3. [Select the place][6] you want to share it to, like the Internet Archive, Flickr, etc. + 4. Upload and append attribution including "Public Domain" or [other Creative Commons open license][7] + + + +I'm a plant person, so [here's mine][8]! + +![Neon-colored herbal bundles][9] + +“[Neon-colored herbal bundles][8]” by Jen Wike Huger is licensed under Public Domain. + +If you aren't in the creating mood but want to find some great CC-licensed content, use the [search.creativecommons.org][10] tool. Then, take a peek at the best way to [give credit back][11] when you use what you find. + +Virtual high-fives and sweet treats from our team to you and yours! + +You don't need to be a master coder to contribute to open source. Jade Wang shares 8 ways you can... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/public-domain + +作者:[Jen Wike Huger][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/jen-wike +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/heart_lego_ccby20.jpg?itok=VRpHf4iU (Red Lego Heart) +[2]: https://creativecommons.org/licenses/by-sa/4.0/ +[3]: https://creativecommons.org/2021/02/10/open-sharing-is-caring/ +[4]: https://creativecommons.org/share-your-work/public-domain/ +[5]: https://creativecommons.org/2021/02/03/the-postal-worker-a-sea-shanty-and-the-public-domain/ +[6]: https://creativecommons.org/share-your-work/ +[7]: https://creativecommons.org/choose/ +[8]: https://archive.org/details/neon_inverted_herbal_bundle +[9]: https://opensource.com/sites/default/files/uploads/neon_inverted_herbal_bundle.jpg (Neon-colored herbal bundles) +[10]: https://search.creativecommons.org/ +[11]: https://creativecommons.org/use-remix/attribution/ From 0897f200ad42e0ba1b9ad539bb9bd7ed507da62a Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Mon, 15 Feb 2021 09:47:45 +0800 Subject: [PATCH 005/818] Rename sources/tech/20210214 Give something from the heart to the public domain.md to sources/talk/20210214 Give something from the heart to the public domain.md --- ...20210214 Give something from the heart to the public domain.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20210214 Give something from the heart to the public domain.md (100%) diff --git a/sources/tech/20210214 Give something from the heart to the public domain.md b/sources/talk/20210214 Give something from the heart to the public domain.md similarity index 100% rename from sources/tech/20210214 Give something from the heart to the public domain.md rename to sources/talk/20210214 Give something from the heart to the public domain.md From 233ca4a10d2ce998012132372ad37b166eb7ee14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=8C=E6=96=B0=E9=98=BF=E5=B2=A9?= <31788564+mengxinayan@users.noreply.github.com> Date: Mon, 15 Feb 2021 10:04:24 +0800 Subject: [PATCH 006/818] Apply for translation(mengxinayan) --- ... A guide to understanding Linux software libraries in C.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20210204 A guide to understanding Linux software libraries in C.md b/sources/tech/20210204 A guide to understanding Linux software libraries in C.md index 68e8c4a4d3..fe977cd22f 100644 --- a/sources/tech/20210204 A guide to understanding Linux software libraries in C.md +++ b/sources/tech/20210204 A guide to understanding Linux software libraries in C.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (mengxinayan) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -492,7 +492,7 @@ via: https://opensource.com/article/21/2/linux-software-libraries 作者:[Marty Kalin][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[萌新阿岩](https://github.com/mengxinayan) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From b66944abcc00be1ea8f8ea753f165d39be9836b7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 15 Feb 2021 10:06:53 +0800 Subject: [PATCH 007/818] PRF @geekpi --- ...rce, Raw Image Editor for Linux Desktop.md | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/translated/tech/20210202 Filmulator is a Simple, Open Source, Raw Image Editor for Linux Desktop.md b/translated/tech/20210202 Filmulator is a Simple, Open Source, Raw Image Editor for Linux Desktop.md index 6eb5f0f6e4..8313606f91 100644 --- a/translated/tech/20210202 Filmulator is a Simple, Open Source, Raw Image Editor for Linux Desktop.md +++ b/translated/tech/20210202 Filmulator is a Simple, Open Source, Raw Image Editor for Linux Desktop.md @@ -1,22 +1,24 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Filmulator is a Simple, Open Source, Raw Image Editor for Linux Desktop) [#]: via: (https://itsfoss.com/filmulator/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) -Filmulator 是一个简单的、开源的用于 Linux 桌面的 Raw 图像编辑器 +Filmulator:一个简单的、开源的 Raw 图像编辑器 ====== -_**简介:Filmulator 是一个开源的具有库管理功能的 Raw 照片编辑应用,侧重于简单、易用和简化的工作流程。**_ +![](https://img.linux.net.cn/data/attachment/album/202102/15/100616o54wb5h4aqgmq4qe.jpg) -### Filmulator:适用于 Linux(和 Windows)的 Raw 图像编辑器 +> Filmulator 是一个开源的具有库管理功能的 raw 照片编辑应用,侧重于简单、易用和简化的工作流程。 -[Linux 中有一堆 raw 照片编辑器][1]。[Filmulator][2] 就是其中之一。Filmulator 的目标是仅提供基本要素,从而使原始图像编辑变得简单。它还增加了库处理的功能,如果你正在为你的相机图像寻找一个不错的应用,这是一个加分项。 +### Filmulator:适用于 Linux(和 Windows)的 raw 图像编辑器 -对于那些不知道 raw 的人来说,[raw 图像文件][3]是一个最小化处理,未压缩的文件。换句话说,它是未经压缩的数字文件,且有最小化的处理。专业摄影师更喜欢用 raw 文件拍摄照片,并自行处理。普通人从智能手机拍摄照片,它通常被压缩为 JPEG 格式或被过滤。 +[Linux 中有一堆 raw 照片编辑器][1],[Filmulator][2] 就是其中之一。Filmulator 的目标是仅提供基本要素,从而使 raw 图像编辑变得简单。它还增加了库处理的功能,如果你正在为你的相机图像寻找一个不错的应用,这是一个加分项。 + +对于那些不知道 raw 的人来说,[raw 图像文件][3]是一个最低限度处理、未压缩的文件。换句话说,它是未经压缩的数字文件,并且只经过了最低限度的处理。专业摄影师更喜欢用 raw 文件拍摄照片,并自行处理。普通人从智能手机拍摄照片,它通常被压缩为 JPEG 格式或被过滤。 让我们来看看在 Filmulator 编辑器中会有什么功能。 @@ -24,7 +26,7 @@ _**简介:Filmulator 是一个开源的具有库管理功能的 Raw 照片编 ![Filmulator interface][4] -Filmulator 宣称,它不是典型的“胶片效果滤镜”,这只是复制了胶片的外在特征。相反,Filmulator 从根本上解决了胶片的魅力所在:显影过程。 +Filmulator 宣称,它不是典型的“胶片效果滤镜” —— 这只是复制了胶片的外在特征。相反,Filmulator 从根本上解决了胶片的魅力所在:显影过程。 它模拟了胶片的显影过程:从胶片的“曝光”,到每个像素内“银晶”的生长,再到“显影剂”在相邻像素之间与储槽中大量显影剂的扩散。 @@ -35,17 +37,17 @@ Fimulator 开发者表示,这种模拟带来了以下好处: * 在明亮区域,饱和度得到增强,有助于保留蓝天、明亮肤色和日落的色彩。 * 在极度饱和的区域,亮度会被减弱,有助于保留细节,例如花朵。 - - 以下是经 Filmulator 处理后的 raw 图像的对比,以自然的方式增强色彩,而不会引起色彩剪切。 -![][5] +![原图][5] + +![处理后][10] ### 在 Ubuntu/Linux 上安装 Filmulator Filmulator 有一个 AppImage 可用,这样你就可以在 Linux 上轻松使用它。使用 [AppImage 文件][6]真的很简单。下载后,使它可执行,然后双击运行。 -[Download Filmulator for Linux][7] +- [下载 Filmulator for Linux][7] 对 Windows 用户也有一个 Windows 版本。除此之外,你还可以随时前往[它的 GitHub 仓库][8]查看它的源代码。 @@ -55,7 +57,7 @@ Filmulator 有一个 AppImage 可用,这样你就可以在 Linux 上轻松使 Fimulator 的设计理念是为任何工作提供最好的工具,而且只有这一个工具。这意味着牺牲了灵活性,但获得了一个大大简化和精简的用户界面。 -我甚至不是一个业余的摄影师,更别说是一个专业的摄影师了。我没有单反或其他高端摄影设备。因此,我无法测试和分享我对 Filmulator 的实用性的经验。 +我连业余摄影师都不是,更别说是专业摄影师了。我没有单反或其他高端摄影设备。因此,我无法测试和分享我对 Filmulator 的实用性的经验。 如果你有更多处理 raw 图像的经验,请尝试下 Filmulator,并分享你的意见。有一个 AppImage 可以让你快速测试它,看看它是否适合你的需求。 @@ -66,7 +68,7 @@ via: https://itsfoss.com/filmulator/ 作者:[Abhishek Prakash][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/) 荣誉推出 @@ -80,4 +82,5 @@ via: https://itsfoss.com/filmulator/ [6]: https://itsfoss.com/use-appimage-linux/ [7]: https://filmulator.org/download/ [8]: https://github.com/CarVac/filmulator-gui -[9]: https://github.com/CarVac/filmulator-gui/wiki \ No newline at end of file +[9]: https://github.com/CarVac/filmulator-gui/wiki +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/image-with-filmulator.jpeg?ssl=1 \ No newline at end of file From 45d4ae96099686add99a967f0982183aa4a958b1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 15 Feb 2021 10:07:32 +0800 Subject: [PATCH 008/818] PUB @geekpi https://linux.cn/article-13119-1.html --- ...Simple, Open Source, Raw Image Editor for Linux Desktop.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210202 Filmulator is a Simple, Open Source, Raw Image Editor for Linux Desktop.md (98%) diff --git a/translated/tech/20210202 Filmulator is a Simple, Open Source, Raw Image Editor for Linux Desktop.md b/published/20210202 Filmulator is a Simple, Open Source, Raw Image Editor for Linux Desktop.md similarity index 98% rename from translated/tech/20210202 Filmulator is a Simple, Open Source, Raw Image Editor for Linux Desktop.md rename to published/20210202 Filmulator is a Simple, Open Source, Raw Image Editor for Linux Desktop.md index 8313606f91..12f6aa8801 100644 --- a/translated/tech/20210202 Filmulator is a Simple, Open Source, Raw Image Editor for Linux Desktop.md +++ b/published/20210202 Filmulator is a Simple, Open Source, Raw Image Editor for Linux Desktop.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13119-1.html) [#]: subject: (Filmulator is a Simple, Open Source, Raw Image Editor for Linux Desktop) [#]: via: (https://itsfoss.com/filmulator/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) From b9a9f8efafa2091d2205a25bb74c3c14c68ad253 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 15 Feb 2021 11:06:56 +0800 Subject: [PATCH 009/818] PRF @scvoet --- ...ccess of open source depends on empathy.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/translated/talk/20210207 Why the success of open source depends on empathy.md b/translated/talk/20210207 Why the success of open source depends on empathy.md index db24502474..21576bde27 100644 --- a/translated/talk/20210207 Why the success of open source depends on empathy.md +++ b/translated/talk/20210207 Why the success of open source depends on empathy.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (scvoet) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Why the success of open source depends on empathy) @@ -9,34 +9,34 @@ 为何开源的成功取决于同理心? ====== -随着人们对同理心认识的提高和传播的启发。 -它——开源的生产力会增长,合作者们会靠拢。 -而且,可以充分利用开源软件开发的力量。 -![践行共情][1] -开源开发的协调创新精神和社区精神改变了世界。吉姆·怀特赫斯特(Jim Whitehurst)在[《开放式组织》][2]中解释说,开源的成功源于“将人们视为社区的一份子,从交易思维转变为基于承诺基础的思维方式”。 但是,开源开发模型的核心仍然存在障碍:它经常性地缺乏人们的同理心。 +> 随着对同理心认识的提高和传播同理心的激励,开源生产力将得到提升,协作者将会聚拢,可以充分激发开源软件开发的活力。 -同理心是理解或感受他人感受的能力。在开源社区中,面对面的人际互动和协作是否罕见。任何在 GitHub 提交过请求 (Pull request) 或问题 (Issues) 的开发者都曾收到过可能来自他们可能从未见过的人的评论,这些人往往身处地球的另一端,而他们的交流也可能同样遥远。现代开源开发就是建立在这种异步、事务性的沟通基础之上。因此,人们在社交媒体平台上所经历的同类型的网络欺凌和其他虐待行为在开源社区中也不足为奇。 +![](https://img.linux.net.cn/data/attachment/album/202102/15/110606rc48qf05904m9n7p.jpg) -当然,并非所有开源交流都会事与愿违。许多人在工作中发展出了尊重并秉持着良好的行为标准。但是很多时候,人们的沟通也常常缺失了常识性的礼节,他们将人们像机器而非人类一般对待。这种行为是激发开源创新模型全部潜力的障碍,因为它让许多潜在的贡献者望而却步,并扼杀了灵感。 +开源开发的协调创新精神和社区精神改变了世界。Jim Whitehurst 在[《开放式组织》][2]中解释说,开源的成功源于“将人们视为社区的一份子,从交易思维转变为基于承诺基础的思维方式”。 但是,开源开发模型的核心仍然存在障碍:它经常性地缺乏人类的同理心empathy。 + +同理心是理解或感受他人感受的能力。在开源社区中,面对面的人际互动和协作是很少的。任何经历过 GitHub 拉取请求Pull request议题Issue的开发者都曾收到过来自他们可能从未见过的人的评论,这些人往往身处地球的另一端,而他们的交流也可能同样遥远。现代开源开发就是建立在这种异步、事务性的沟通基础之上。因此,人们在社交媒体平台上所经历的同类型的网络欺凌和其他虐待行为,在开源社区中也不足为奇。 + +当然,并非所有开源交流都会事与愿违。许多人在工作中发展出了尊重并秉持着良好的行为标准。但是很多时候,人们的沟通也常常缺乏常识性的礼仪,他们将人们像机器而非人类一般对待。这种行为是激发开源创新模型全部潜力的障碍,因为它让许多潜在的贡献者望而却步,并扼杀了灵感。 ### 恶意交流的历史 -代码审查中存在的敌意言论对开源社区来说并不新鲜,它多年来一直被社区所容忍。开源教父莱纳斯·托瓦尔兹 (Linus Torvalds) 经常在代码不符合他的标准时[抨击][3] Linux 社区,并将贡献者赶走。埃隆大学计算机科学教授梅根·斯奎尔(Megan Squire)借助[机器学习][4]分析了托瓦尔兹的侮辱行为,发现它们在四年内的数量高达数千次。2018 年,莱纳斯因自己的不良行为而将自己搁置,责成自己学习同理心,道歉并为 Linux 社区制定了行为准则。 +代码审查中存在的敌意言论对开源社区来说并不新鲜,它多年来一直被社区所容忍。开源教父莱纳斯·托瓦尔兹Linus Torvalds经常在代码不符合他的标准时[抨击][3] Linux 社区,并将贡献者赶走。埃隆大学计算机科学教授 Megan Squire 借助[机器学习][4]分析了托瓦尔兹的侮辱行为,发现它们在四年内的数量高达数千次。2018 年,莱纳斯因自己的不良行为而自我放逐,责成自己学习同理心,道歉并为 Linux 社区制定了行为准则。 -2015 年,[赛格·夏普][5]虽然在技术上受人尊重,但因其缺乏对个人的尊重,被辞去了 FOSS 女性外展计划中的 Linux 内核协调员一职。 +2015 年,[Sage Sharp][5] 虽然在技术上受人尊重,但因其缺乏对个人的尊重,被辞去了 FOSS 女性外展计划中的 Linux 内核协调员一职。 PR 审核中存在的贬低性评论对开发者会造成深远的影响。它导致开发者在提交 PR 时产生畏惧感,让他们对预期中的反馈感到恐惧。这吞噬了开发者对自己能力的信心。它逼迫工程师每次都只能追求完美,从而减缓了开发速度,这与许多社区采用的敏捷方法论背道而驰。 -### 如何拉近开源中的共情缺口? +### 如何缩小开源中的同理心差距? -通常情况下,冒犯的评论常是无意间的,而通过一些指导,作者则可以学会如何在不带负面情绪的情况下表达意见。GitHub 不会监控问题和 PR 的评论是否有滥用内容,相反,它提供了一些工具,使得社区能够对其内容进行审查。所有者可以删除评论和锁定对话,所有贡献者可以报告滥用和阻止用户。 +通常情况下,冒犯的评论常是无意间的,而通过一些指导,作者则可以学会如何在不带负面情绪的情况下表达意见。GitHub 不会监控议题和 PR 的评论是否有滥用内容,相反,它提供了一些工具,使得社区能够对其内容进行审查。仓库的所有者可以删除评论和锁定对话,所有贡献者可以报告滥用和阻止用户。 制定社区行为准则可为所有级别的贡献者提供一个安全且包容的环境,并且能让所有级别的贡献者参与并定义降低协作者之间冲突的过程。 -我们能够克服开源中存在的共情问题。面对面的辩论比文字更有利于产生共鸣,所以尽可能选择视频通话。通过共情分享反馈来树立榜样。如果你目睹了一个尖锐的评论,请做一个指导员而非旁观者。如果你是受害者,请大声说出来。在面试候选人时,评估共情能力,并将共情能力与绩效评估和奖励挂钩。界定并执行社区行为准则,并管理好你的社区。 +我们能够克服开源中存在的同理心问题。面对面的辩论比文字更有利于产生共鸣,所以尽可能选择视频通话。以同理心的方式分享反馈,树立榜样。如果你目睹了一个尖锐的评论,请做一个指导者而非旁观者。如果你是受害者,请大声说出来。在面试候选人时,评估同理心能力,并将同理心能力与绩效评估和奖励挂钩。界定并执行社区行为准则,并管理好你的社区。 -随着人们对移情意识的了解的加深和灵感的传播,开源生产力将得到提升,协作者将有所作为,并且可以充分激发开源软件开发的活力。 +随着对同理心认识的提高和传播同理心的激励,开源生产力将得到提升,协作者将会聚拢,可以充分激发开源软件开发的活力。 -------------------------------------------------------------------------------- @@ -44,8 +44,8 @@ via: https://opensource.com/article/21/2/open-source-empathy 作者:[Bronagh Sorota][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[scvoet](https://github.com/scvoet) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From a3fea96c71a61d74bd1daac30b6a19dce3c49e6d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 15 Feb 2021 11:07:32 +0800 Subject: [PATCH 010/818] PUB @scvoet https://linux.cn/article-13120-1.html --- ...10207 Why the success of open source depends on empathy.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/talk => published}/20210207 Why the success of open source depends on empathy.md (98%) diff --git a/translated/talk/20210207 Why the success of open source depends on empathy.md b/published/20210207 Why the success of open source depends on empathy.md similarity index 98% rename from translated/talk/20210207 Why the success of open source depends on empathy.md rename to published/20210207 Why the success of open source depends on empathy.md index 21576bde27..6905d890a1 100644 --- a/translated/talk/20210207 Why the success of open source depends on empathy.md +++ b/published/20210207 Why the success of open source depends on empathy.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (scvoet) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13120-1.html) [#]: subject: (Why the success of open source depends on empathy) [#]: via: (https://opensource.com/article/21/2/open-source-empathy) [#]: author: (Bronagh Sorota https://opensource.com/users/bsorota) From 82f68233e83f3be422a9a72d4f35c7b1c6809395 Mon Sep 17 00:00:00 2001 From: XYenChi <466530436@qq.com> Date: Mon, 15 Feb 2021 17:36:48 +0800 Subject: [PATCH 011/818] Update 20190312 When the web grew up- A browser story.md --- ...2 When the web grew up- A browser story.md | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/sources/talk/20190312 When the web grew up- A browser story.md b/sources/talk/20190312 When the web grew up- A browser story.md index 602ffff4e1..002e14c692 100644 --- a/sources/talk/20190312 When the web grew up- A browser story.md +++ b/sources/talk/20190312 When the web grew up- A browser story.md @@ -7,47 +7,47 @@ [#]: via: (https://opensource.com/article/19/3/when-web-grew) [#]: author: (Mike Bursell https://opensource.com/users/mikecamel) -web 的诞生:浏览器的故事grew up: A browser story +web 的诞生:浏览器的故事 ====== -互联网诞生之处的个人故事。A personal story of when the internet came of age. +互联网诞生之处的个人故事。 ![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_Internet_Sign.png?itok=5MFGKs14) -最近,我Recently, I [分享了shared how][1] 获得英文文学和神学学位离开大学,在一个大家都还不知道 web 服务器是什么的地方,设法找到一份运行 web 服务器的工作。upon leaving university in 1994 with a degree in English literature and theology, I somehow managed to land a job running a web server in a world where people didn't really know what a web server was yet. 那“地方”,我不仅仅指的是我工作的组织,而是泛指所有地方。And by "in a world," I don't just mean within the organisation in which I worked, but the world in general. Web 那时当真是全新的——人们还正尝试理出头绪。The web was new—really new—and people were still trying to get their heads around it. +最近,我[分享了][1] 1994年获得英文文学和神学学位离开大学,在一个人们还不知道 web 服务器是什么的地方,成功找到一份运维 web 服务器的工作。但那“地方”,并不仅仅指的是我工作的组织,而是泛指所有地方。Web 那时当真是全新的——人们还正尝试理出头绪。 -That's not to suggest that the place where I was working—an academic publisher—particularly "got it" either. 这是个大部分人还在用 28k8 猫访问网页的地方。我记得我拿到 33k6 猫时有多激动。This was a world in which a large percentage of the people visiting their website were still running 28k8 modems. I remember my excitement in getting a 33k6 modem. 至少上下行速率不对称的日子过去了,以前带宽显示 1200/300 特别常见。t least we were past the days of asymmetric upload/download speeds,1 where 1200/300 seemed like an eminently sensible bandwidth description. 这意味着This meant that the high-design设计复杂, high-colour色彩缤纷, high-resolution纤毫毕现 documents created by the print people (端同一家饭碗) were completely impossible on the web. 我不可能让大于 40k 的GIF 出现在网站的首页推送给访问的人。I wouldn't allow anything bigger than a 40k GIF on the front page of the website, and that was pushing it for many of our visitors. 大于大约 60k 的会作为独立的图片,缩略图链接到参照页。Anything larger than 60k or so would be explicitly linked as a standalone image from a thumbnail on the referring page. +那并不是在暗示我在什么地方工作——学术出版社,也不是强调得到工作。这是个大部分人还在用 28k8 猫访问网页的世界。我记得我拿到 33k6 猫时有多激动。至少上下行速率不对称的日子过去了,以前带宽显示 1200/300 特别常见。这意味着(端同一家饭碗的)列印人员创作的设计复杂,色彩缤纷,纤毫毕现的档是完全不可能出现在 Web 上的。我不可能让大于 40k 的GIF 出现在网站的首页推送给访问的人。大于大约 60k 的会作为独立的图片,缩略图链接到参照页。 -To say that the marketing department didn't like this was an understatement. 更糟的是布局问题。Even worse was the question of layout. "Browsers decide how to lay out documents," I explained, time after time, "你可以使用眉头词或者段落,但是文档在页面上如何显示并不取决于文档,而是you can use headers or paragraphs, but how documents appear on the page isn't defined by the document, but by the renderer!" They wanted control. They wanted different coloured backgrounds. After a while, they got that. I went to what I believe was the first W3C meeting at which the idea of Cascading Style Sheets 层叠样式表(CSS) was discussed. And argued vehemently against them. The suggestion that document writers should control layout was anathema.2 It took some while for CSS to be adopted, and in the meantime, those who cared about such issues adopted the security trainwreck that was Portable Document Format (PDF). +且不说商城部分不像现在这样。更糟的是布局问题。“如何布局文档取决于浏览器,”我一遍又一遍地解释,“你可以使用眉头词或者段落,但是文档在页面上如何显示并不取决于文档,而是取决于渲染器!”他们想控制,想要不同颜色的背景。后来明白了那些不能实现。我参与了我觉得层叠样式表(CSS)的想法第一次被讨论的 W3C 会议,并进行了激烈地争论。写文档的人控制布局的建议令人讨厌。后来 CSS 被采用了,与此同时,在意安全问题的人采用了可移植文件格式(PDF)。 -How documents were rendered wasn't the only issue. Being a publisher of actual physical books, the whole point of having a web presence, as far as the marketing department was concerned, was to allow customers—or potential customers—to know not only what a book was about, but also how much it was going to cost them to buy. This, however, presented a problem. You see, the internet—in which I include the rapidly growing World Wide Web—was an open, free-for-all libertarian sort of place where nobody was interested in money; in fact, where talk of money was to be shunned and avoided. +如何渲染文档不是唯一的问题。作为一个实体书出版社,网页展示和商城部分的所有点都要关注,让消费者,或者潜在消费者知道一本书是关于什么的和预计需要花费多少钱。但这有一个问题,你看,互联网——包括快速发展的万维网——是开放的,所有都免费的自由之地没有人会在意钱;事实上,谈钱曾是被禁止的。 -I took the mainstream "Netizen网民" view that there was no place for pricing information online. 我老板,加上组织里相当多的人都持有相反的看法My boss—and, indeed, pretty much everybody else in the organisation—took a contrary view. They felt that customers should be able to see how much books would cost them. They also felt that my bank manager would like to see how much money was coming into my bank account on a monthly basis, which might be significantly reduced if I didn't come round to their view. +我和主流“网民”的看法一致,认为没必要放价格信息在线上。我老板,加上组织里相当多的人都持有相反的看法。他们觉得消费者应该能够看到书要花多少钱。他们也觉得我管理银行资产会想看账户里每个月进了多少钱,如果我不认同他们的观点的话,资金可能会急剧减少的账户。 -Luckily, by the time I'd climbed down from my high horse and got over myself a bit—probably only a few weeks after I'd started digging my heels in—the web had changed, and there were other people putting pricing information up about their products. 新来的人渐渐瞧不起先前运行 web 服务器的老学究们,但风向很清晰。These newcomers were generally looked down upon by the old schoolers who'd been running web servers since the early days,3 but it was clear which way the wind was blowing. This didn't mean that the battle was won for our website, however. As an academic publisher, we shared an academic IP name ("ac.uk") with the University. The University was less than convinced that publishing pricing information was appropriate until some senior folks at the publisher pointed out that Princeton University Press was doing it, and wouldn't we look a bit silly if…? +幸运的是,在我从高高的马儿身上摔下来之前,我已经自己认清了一些——可能是我开始迈入的几星期之后——Web 早已变了,有其他人公布他们产品的价格信息。新来的人渐渐瞧不起先前运行 web 服务器的老学究们,但风向很清晰。但是这并不意味着网站的战争结束了。作为一个学术出版社,我们和大学共享一个域名(“ac.uk“)。大学不确信公布价格信息合不合适直到普林斯顿大学出版社做了,我们会不会看起来有点傻如果······? -The fun didn't stop there, either. A few months into my tenure as webmaster ("webmaster@…"), we started to see a worrying trend, as did lots of other websites. Certain visitors were single-handedly bringing our webserver to its knees. These visitors were running a new web browser: Netscape. Netscape was badly behaved. Netscape was multi-threaded. +有趣的事情也没有停。站点管理员(“webmaster@…”)任职的短短几个月内,我们和其他很多网站一样开始看到了一种焦虑的趋势。某些访问者可以轻而易举地访问我们的网站服务器。这些访问者使用新的网页浏览器:网景。网景干坏事,它是多线程的。 -Why was this an issue? Well, before Netscape, all web browsers had been single-threaded. They would open one connection at a time, so even if you had, say five GIFs on a page,4 they would request the HTML base file, parse that, then download the first GIF, complete that, then the second, complete that, and so on. In fact, they often did the GIFs in the wrong order, which made for very odd page loading, but still, that was the general idea. The rude people at Netscape decided that they could open multiple connections to the webserver at a time to request all the GIFs at the same time, for example! And why was this a problem? Well, the problem was that most webservers were single-threaded. They weren't designed to have multiple connections open at any one time. Certainly, the HTTP server that we ran (MacHTTP) was single-threaded. Even though we had paid for it (it was originally shareware), the version we had couldn't cope with multiple requests at a time. +这为什么是个问题呢?在网景之前,所有的浏览器都是单线程。他们一次只进行一个连接,所以即使一个页面有五张动图,也会先请求 HTML 基本文件进行解析,然后下载第一张动图,完成,接着第二张,完成,如此类推。事实上,动图顺序经常出错,使得页面加载得非常奇怪,但这也是常规思路。粗暴的网景人决定他们与网站服务器一次性进行多个连接来请求所有的动图,举个例子!为什么这是个问题呢?好吧,问题就是大多数网站服务器都是单线程的。他们不是设计来一次性进行多个连接的。确实,我们运行的 HTTP 服务的软件(MacHTTP)是单线程的。即使我们已经买了(原本是共享软件),我们用的这版一次不能处理多个请求。 -The debate raged across the internet. Who did these Netscape people think they were, changing how the world worked? How it was supposed to work? The world settled into different camps, and as with all technical arguments, heated words were exchanged on both sides. The problem was that not only was Netscape multi-threaded, it was also just better than the alternatives. Lots of web server code maintainers, MacHTTP author Chuck Shotton among them, sat down and did some serious coding to produce multi-threaded beta versions of their existing code. Everyone moved almost immediately to the beta versions, they got stable, and in the end, single-threaded browsers either adapted and became multi-threaded themselves, or just went the way of all outmoded products and died a quiet death.6 +互联网上爆发了大量讨论。做网景的人觉得他们正在改变世界的工作方式?它如何支持工作?大家分成了不同阵营,双方不断交流着技术层面的热词。问题是网景不仅多线程,而且优于其他。非常多 web 服务器代码维护者,包括 MacHTTP 作者查克·肖顿在内,坐下来认真在原有代码基础上更新多线程测试版。所有人几乎立马转向测试版,他们变得稳定,最终浏览器也舍弃了单线程,变成多线程,或者只是像所有过时产品一样销声匿迹。 -This, for me, is when the web really grew up. It wasn't prices on webpages nor designers being able to define what you'd see on a page,8 but rather when browsers became easier to use and when the network effect of thousands of viewers moving to many millions tipped the balance in favour of the consumer, not the producer. There were more steps in my journey—which I'll save for another time—but from around this point, my employers started looking at our monthly, then weekly, then daily logs, and realising that this was actually going to be something big and that they'd better start paying some real attention. +对我来说,这就是 web 真正成长。那既不是网页展示的价格也不是设计者能有定义你能在网页上看到什么,而是浏览器变得更易用,几千浏览者变成几百万并且用户喜好而不是制作者变得更为重要。我的路还很长——有机会再谈——有关这点,我老板开始开始查看我们的每月,然后每周,然后每天的日志,并意识到这确实变成了大事而且真的需要我们关注。 -1\. How did they come back, again? +1\. 他们如何再次回来? -2\. It may not surprise you to discover that I'm still happiest at the command line. +2\. 毫不意外我还是使用命令行里最开心的人。 -3\. About six months before. +3\. 大约六个月前。 -4\. Reckless, true, but it was beginning to happen.5 +4\. 不计后果,真的,发生了 -5\. Oh, and no—it was GIFs or BMP. JPEG was still a bright idea that hadn't yet taken off. +5\. 噢,不——GIF,BMP或者JPEG还是好主意没被取缔。 -6\. It's never actually quiet: there are always a few diehard enthusiasts who insist that their preferred solution is technically superior and bemoan the fact that the rest of the internet has gone to the devil.7 +6\. 从未沉寂:永远都会有少数坚信他们更偏爱的解决方案更优越并哀叹互联网的其他人已经变成了恶魔的难以退却的狂热者。 -7\. I'm not one to talk: I still use Lynx from time to time. +7\. 我不是唯一一个说:我还在用 Lynx。 -8\. Creating major and ongoing problems for those with different accessibility needs, I would point out. +8\. 我指出,不同访问需求的人创造主要和正在发生的问题。 -------------------------------------------------------------------------------- @@ -55,7 +55,7 @@ via: https://opensource.com/article/19/3/when-web-grew 作者:[Mike Bursell][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[XYenChi](https://github.com/XYenChi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 031ffe8bac91bd6ba59838d2f5d70e044dc8acbd Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 16 Feb 2021 05:03:40 +0800 Subject: [PATCH 012/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210215=20?= =?UTF-8?q?Installing=20Nextcloud=2020=20on=20Fedora=20Linux=20with=20Podm?= =?UTF-8?q?an?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210215 Installing Nextcloud 20 on Fedora Linux with Podman.md --- ...extcloud 20 on Fedora Linux with Podman.md | 222 ++++++++++++++++++ 1 file changed, 222 insertions(+) create mode 100644 sources/tech/20210215 Installing Nextcloud 20 on Fedora Linux with Podman.md diff --git a/sources/tech/20210215 Installing Nextcloud 20 on Fedora Linux with Podman.md b/sources/tech/20210215 Installing Nextcloud 20 on Fedora Linux with Podman.md new file mode 100644 index 0000000000..ae9edc77ea --- /dev/null +++ b/sources/tech/20210215 Installing Nextcloud 20 on Fedora Linux with Podman.md @@ -0,0 +1,222 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Installing Nextcloud 20 on Fedora Linux with Podman) +[#]: via: (https://fedoramagazine.org/nextcloud-20-on-fedora-linux-with-podman/) +[#]: author: (dschier https://fedoramagazine.org/author/danielwtd/) + +Installing Nextcloud 20 on Fedora Linux with Podman +====== + +![][1] + +Nowadays, many open source projects offer container images for easy deployment. This is very handy when running a home server or lab environment. A previous Fedora Magazine article covered [installing Nextcloud from the source package][2]. This article explains how you can run Nextcloud on Fedora 33 as a container deployment with Podman. + +### What is Nextcloud? + +[Nextcloud][3] started in 2016 as a fork of Owncloud. Since then, it evolved into a full-fledged collaboration software offering file-, calendar-, and contact-syncing, plus much more. You can run a simple Kanban Board in it or write documents collaboratively. Nextcloud is fully open source under the AGPLv3 License and can be used for private or commercial use alike. + +### What is Podman? + +Podman is a container engine for developing, managing, and running OCI Containers on your Linux System. It offers a wide variety of features like rootless mode, cgroupv2 support, pod management, and it can run daemonless. Furthermore, you are getting a Docker compatible API for further development. It is available by default on Fedora Workstation and ready to be used. + +In case you need to install podman, run: + +``` +sudo dnf install podman +``` + +### Designing the Deployment + +Every deployment needs a bit of preparation. Sure, you can simply start a container and start using it, but that wouldn’t be so much fun. A well-thought and designed deployment should be easy to understand and offer some kind of flexibility. + +#### Container / Images + +First, you need to choose the proper container images for the deployment. This is quite easy for Nextcloud, since it offers already a pretty good documentation for container deployments. Nextcloud supports two variations: Nextcloud Apache httpd (which is fully self-contained) and Nextcloud php-fpm (which needs an additional nginx container). + +In both cases, you also need to provide a database, which can be MariaDB (recommended) or PostgreSQL (also supported). This article uses the Apache httpd + MariaDB installation. + +#### Volumes + +Running a container does not persist data you create during the runtime. You perform updates by recreating the container. Therefore, you will need some volumes for the database and the Nextcloud files. Nextcloud also recommends you put the “data” folder in a separate volume. So you will end up with three volumes: + + * nextcloud-app + * nextcloud-data + * nextcloud-db + + + +#### Network + +Lastly, you need to consider networking. One of the benefits of containers is that you can re-create your deployment as it may look like in production. [Network segmentation][4] is a very common practice and should be considered for a container deployment, too. This tutorial will not add advanced features like network load balancing or security segmentation. You will need only one network which you will use to publish the ports for Nextcloud. Creating a network also provides the dnsname plugin, which will allow container communication based on container names. + +#### The picture + +Now that every single element is prepared, you can put these together and get a really nice understanding of how the development will look. + +![][5] + +### Run, Nextcloud, Run + +Now you have prepared all of the ingredients and you can start running the commands to deploy Nextcloud. All commands can be used for root-privileged or rootless deployments. This article will stick to rootless deployments. + +Sart with the network: + +``` +# Creating a new network +$ podman network create nextcloud-net + +# Listing all networks +$ podman network ls + +# Inspecting a network +$ podman network inspect nextcloud-net +``` + +As you can see in the last command, you created a DNS zone with the name “dns.podman”. All containers created in this network are reachable via “CONTAINER_NAME.dns.podman”. + +Next, optionally prepare your volumes. This step can be skipped, since Podman will create named volumes on demand, if they do not exist. Podman supports named volumes, which it creates in special locations, so you don’t need to take care of SELinux or alike. + +``` +# Creating the volumes +$ podman volume create nextcloud-app +$ podman volume create nextcloud-data +$ podman volume create nextcloud-db + +# Listing volumes +$ podman volume ls + +# Inspecting volumes (this also provides the full path) +$ podman volume inspect nextcloud-app +``` + +Network and volumes are done. Now provide the containers. + +First, you need the database. According to the MariaDB image documentation, you need to provide some additional environment variables,. Additionally, you need to attach the created volume, connect the network, and provide a name for the container. Most of the values will be needed in the next commands again. (Note that you should replace DB_USER_PASSWORD and DB_ROOT_PASSWORD with unique passwords.) + +``` +# Deploy Mariadb +$ podman run --detach + --env MYSQL_DATABASE=nextcloud + --env MYSQL_USER=nextcloud + --env MYSQL_PASSWORD=DB_USER_PASSWORD + --env MYSQL_ROOT_PASSWORD=DB_ROOT_PASSWORD + --volume nextcloud-db:/var/lib/mysql + --network nextcloud-net + --restart on-failure + --name nextcloud-db + docker.io/library/mariadb:10 + +# Check running containers +$ podman container ls +``` + +After the successful start of your new MariaDB container, you can deploy Nextcloud itself. (Note that you should replace DB_USER_PASSWORD with the password you used in the previous step. Replace NC_ADMIN and NC_PASSWORD with the username and password you want to use for the Nextcloud administrator account.) + +``` +# Deploy Nextcloud +$ podman run --detach + --env MYSQL_HOST=nextcloud-db.dns.podman + --env MYSQL_DATABASE=nextcloud + --env MYSQL_USER=nextcloud + --env MYSQL_PASSWORD=DB_USER_PASSWORD + --env NEXTCLOUD_ADMIN_USER=NC_ADMIN + --env NEXTCLOUD_ADMIN_PASSWORD=NC_PASSWORD + --volume nextcloud-app:/var/www/html + --volume nextcloud-data:/var/www/html/data + --network nextcloud-net + --restart on-failure + --name nextcloud + --publish 8080:80 + docker.io/library/nextcloud:20 + +# Check running containers +$ podman container ls +``` + +Now that the two containers are running, you can configure your containers. Open your browser and point to “localhost:8080” (or another host name or IP address if it is running on a different server). + +The first load may take some time (30 seconds) or even report “unable to load”. This is coming from Nextcloud, which is preparing the first run. In that case, wait a minute or two. Nextcloud will prompt for a username and password. + +![][6] + +Enter the user name and password you used previously. + +![][7] + +Now you are ready to go and experience Nextcloud for testing, development ,or your home server. + +### Update + +If you want to update one of the containers, you need to pull the new image and re-create the containers. + +``` +# Update mariadb +$ podman pull mariadb:10 +$ podman stop nextcloud-db +$ podman rm nextcloud-db +$ podman run --detach + --env MYSQL_DATABASE=nextcloud + --env MYSQL_USER=nextcloud + --env MYSQL_PASSWORD=DB_USER_PASSWORD + --env MYSQL_ROOT_PASSWORD=DB_ROOT_PASSWORD + --volume nextcloud-db:/var/lib/mysql + --network nextcloud-net + --restart on-failure + --name nextcloud-db + docker.io/library/mariadb:10 +``` + +Updating the Nextcloud container works exactly the same. + +``` +# Update Nextcloud + +$ podman pull nextcloud:20 +$ podman stop nextcloud +$ podman rm nextcloud +$ podman run --detach + --env MYSQL_HOST=nextcloud-db.dns.podman + --env MYSQL_DATABASE=nextcloud + --env MYSQL_USER=nextcloud + --env MYSQL_PASSWORD=DB_USER_PASSWORD + --env NEXTCLOUD_ADMIN_USER=NC_ADMIN + --env NEXTCLOUD_ADMIN_PASSWORD=NC_PASSWORD + --volume nextcloud-app:/var/www/html + --volume nextcloud-data:/var/www/html/data + --network nextcloud-net + --restart on-failure + --name nextcloud + --publish 8080:80 + docker.io/library/nextcloud:20 +``` + +That’s it; your Nextcloud installation is up-to-date again. + +### Conclusion + +Deploying Nextcloud with Podman is quite easy. After just a couple of minutes, you will have a very handy collaboration software, offering filesync, calendar, contacts, and much more. Check out [apps.nextcloud.com][8], which will extend the features even further. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/nextcloud-20-on-fedora-linux-with-podman/ + +作者:[dschier][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/danielwtd/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2021/02/nextcloud-podman-816x345.jpg +[2]: https://fedoramagazine.org/build-your-own-cloud-with-fedora-31-and-nextcloud-server/ +[3]: https://nextcloud.com/ +[4]: https://en.wikipedia.org/wiki/Network_segmentation +[5]: https://fedoramagazine.org/wp-content/uploads/2021/01/nextcloud-podman-arch.png +[6]: https://fedoramagazine.org/wp-content/uploads/2021/02/Screenshot-from-2021-02-12-08-38-37-1024x211.png +[7]: https://fedoramagazine.org/wp-content/uploads/2021/02/Screenshot-from-2021-02-12-08-38-28-1024x377.png +[8]: https://apps.nextcloud.com From 4b4113089c4254281cf934c56263a109d44a672c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 16 Feb 2021 05:04:11 +0800 Subject: [PATCH 013/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210216=20?= =?UTF-8?q?Meet=20Plots:=20A=20Mathematical=20Graph=20Plotting=20App=20for?= =?UTF-8?q?=20Linux=20Desktop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210216 Meet Plots- A Mathematical Graph Plotting App for Linux Desktop.md --- ...al Graph Plotting App for Linux Desktop.md | 103 ++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 sources/tech/20210216 Meet Plots- A Mathematical Graph Plotting App for Linux Desktop.md diff --git a/sources/tech/20210216 Meet Plots- A Mathematical Graph Plotting App for Linux Desktop.md b/sources/tech/20210216 Meet Plots- A Mathematical Graph Plotting App for Linux Desktop.md new file mode 100644 index 0000000000..b48cbde1e6 --- /dev/null +++ b/sources/tech/20210216 Meet Plots- A Mathematical Graph Plotting App for Linux Desktop.md @@ -0,0 +1,103 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Meet Plots: A Mathematical Graph Plotting App for Linux Desktop) +[#]: via: (https://itsfoss.com/plots-graph-app/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +Meet Plots: A Mathematical Graph Plotting App for Linux Desktop +====== + +Plots is a graph plotting application that makes it easy to visualize mathematical formulae. You can use it for trigonometric, hyperbolic, exponential and logarithmic functions along with arbitrary sums and products. + +### Plot mathematical graphs with Plots on Linux + +[Plots][1] is a simple application inspired by graph plotting web apps like [Desmos][2]. It allows you to plot graphs of different math functions, which you can enter interactively, as well as customizing the color of your plots. + +Written in Python, Plots takes advantage of modern hardware using [OpenGL][3]. It uses GTK 3 and thus integrates well with the GNOME desktop. + +![][4] + +Using plots is straightforward. To add a new equation, click the plus sign. Clicking the trash icon deletes the equation. There is also the option to undo and redo. You can also zoom in and zoom out. + +![][5] + +The text box where you type is equation friendly. The hamburger menu has a ‘help’ option to access the documentation. You’ll find useful tips on how to write various mathematical notations here. You can also copy-paste the equations. + +![][6] + +In dark mode, the sidebar equation area turns dark but the main plotting area remains white. I believe that’s by design perhaps. + +You can use multiple functions and plot them all in one graph: + +![][7] + +I found it crashing while trying to paste some equations it could not understand. If you write something that it cannot understand or conflicts with existing equations, all plots disappear, Removing the incorrect equation brings back the plot. + +No option to export the plots or copy them to clipboard unfortunately. You can always [take screenshots in Linux][8] and use the image in your document where you have to add the graphs. + +**Recommended Read:** + +![][9] + +#### [KeenWrite: An Open Source Text Editor for Data Scientists and Mathematicians][10] + +### Installing Plots on Linux + +Plots has different installation options available for various kinds of distributions. + +Ubuntu 20.04 and 20.10 users can [take advantage of the PPA][11]: + +``` +sudo add-apt-repository ppa:apandada1/plots +sudo apt update +sudo apt install plots +``` + +For other Debian based distributions, you can [install it from the deb file][12] available [here][13]. + +I didn’t find it in AUR package list but as an Arch Linux user, you can either use the Flatpak package or install it using Python. + +[Plots Flatpak Package][14] + +If interested, you may check out the source code on its GitHub repository. If you like the application, please consider giving it a star on GitHub. + +[Plots Source Code on GitHub][1] + +**Conclusion** + +The primary use case for Plots is for students learning math or related subjects, but it can be useful in many other scenarios. I know not everyone would need that but surely helpful for the people in the academics and schools. + +I would have liked the option to export the images though. Perhaps the developers can add this feature in the future releases. + +Do you know any similar applications for plotting graphs? How does Plots stack up against them? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/plots-graph-app/ + +作者:[Abhishek Prakash][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/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://github.com/alexhuntley/Plots/ +[2]: https://www.desmos.com/ +[3]: https://www.opengl.org/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/fourier-graph-plots.png?resize=800%2C492&ssl=1 +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/plots-app-linux-1.png?resize=800%2C518&ssl=1 +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/plots-app-linux.png?resize=800%2C527&ssl=1 +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/multiple-equations-plots.png?resize=800%2C492&ssl=1 +[8]: https://itsfoss.com/take-screenshot-linux/ +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/keenwrite.png?fit=800%2C450&ssl=1 +[10]: https://itsfoss.com/keenwrite/ +[11]: https://itsfoss.com/ppa-guide/ +[12]: https://itsfoss.com/install-deb-files-ubuntu/ +[13]: https://launchpad.net/~apandada1/+archive/ubuntu/plots/+packages +[14]: https://flathub.org/apps/details/com.github.alexhuntley.Plots From e5f48e87d3678450c8ebc26b566e1533a55be5dc Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 16 Feb 2021 05:04:32 +0800 Subject: [PATCH 014/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210215=20?= =?UTF-8?q?Why=20everyone=20should=20try=20using=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210215 Why everyone should try using Linux.md --- ...215 Why everyone should try using Linux.md | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 sources/tech/20210215 Why everyone should try using Linux.md diff --git a/sources/tech/20210215 Why everyone should try using Linux.md b/sources/tech/20210215 Why everyone should try using Linux.md new file mode 100644 index 0000000000..d32154a80b --- /dev/null +++ b/sources/tech/20210215 Why everyone should try using Linux.md @@ -0,0 +1,107 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Why everyone should try using Linux) +[#]: via: (https://opensource.com/article/21/2/try-linux) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +Why everyone should try using Linux +====== +If you're curious about Linux, the open source community makes sure it's +easy to try. +![Woman sitting in front of her computer][1] + +In 2021, there are more reasons why people love Linux than ever before. In this series, I'll share 21 different reasons to use Linux. Let's explore why anyone can try Linux. + +Linux can seem mysterious to the uninitiated. People talk about Linux like it's something only meant for computer programmers or sysadmins, yet people also talk about running Linux on laptops or mobile devices. Tech sites list the [top 10 Linux commands][2] you [need to know][3], and yet there's just as much talk about [how exciting the Linux desktops (plural!) are][4]. + +So what's Linux all about, really? + +Well, one of the many important things about Linux is its dedication to availability. If you're curious about Linux, the open source community makes sure it's easy to try. + +### Try Linux without trying Linux + +It doesn't matter whether you're switching from Windows to Linux, Windows to Mac (or Mac to Windows), or from Mac to Linux: Changing your computing style is hard. It's not often discussed, but modern computing is a strangely personal thing. Everyone gets comfortable with their own computer, and they tend to dislike big changes. Just shifting back and forth between my work computer and my personal computer (both of which run the same OS) requires mental and muscle adjustment for me, simply because the two are "optimized" for different kinds of activities. Even though I inevitably end up being referred to just as "the guy who knows computers" in my local communities (and I do like to think that I do), were I forced to change the OS I use, my sense of productivity and enjoyment would plummet for a week or two. The thing is, it's mostly superficial. I know how to use other operating systems, but I'd need time to establish new instincts and habits. I'd need a chance to remember where some of the small configuration options are located in a new OS, and I'd have to discover new features to capitalize upon. + +For this reason, I often tell people who are curious about Linux that the first step is to use Linux _applications_. There aren't actually that many applications exclusive to Linux, largely because most apps on Linux are open source and are therefore eagerly ported between all platforms. But there are lots of applications commonly found on Linux that you can also try on your current non-Linux platform. Make it a goal to replace the applications you default to, either by force of habit or convenience, with open source equivalents. + +### Replacing apps + +The end goal of this exercise is to make a soft transition to Linux by way of the applications you'll eventually be running. Once you're used to a new set of applications, there's not much left to get used to on Linux, aside from system settings and file management. + +If you're not sure what applications you use the most, just take a look at your **Recent Applications** menu (if your OS doesn't have a Recent Applications menu, then it might be time to switch to Linux). Once you've identified your must-have applications, take a look at our [Application Alternatives][5] page to learn about many of the common open source apps considered equivalents to popular proprietary ones. + +### Getting Linux + +Not all open source applications get ported to all platforms, and many ultimately benefit from running on Linux. Eventually, if you're keen to switch to Linux, it pays to complete the transition. Luckily, getting Linux is as easy as downloading it, almost as if it were just another open source app. + +Usually, a Linux installation image features a Live mode and an Installation mode. That means you can boot from a Linux drive and use it in Live mode without actually installing it to your computer. This is a great way to get a hint of what the OS is like, but it's only a temporary experience because data isn't retained between boots. However, there are distributions, like [Porteus Linux][6], specially designed for running exclusively off of a USB thumb drive so that your personal data is retained. I keep a Porteus drive on my keychain, so no matter where I am, I have a bootable Linux image with me. + +![Porteus Live Linux distribution][7] + +The Porteus Live Linux distribution desktop. + +### The best Linux + +Once you've decided to install Linux, you'll find plenty of distributions available for the low cost of $0. If you're used to having only one or two choices in an operating system (for instance, a Home Edition and a Business Edition), then you probably find the idea of several different _distributions_ of Linux confusing. It seems more complicated than it actually is, though. Linux is Linux, and it rarely makes much of a difference whose "flavor" you download and install. The big names, like [Fedora][8], [Debian][9], [Linux Mint][10], and [Elementary][11], all deliver the same experience with a slightly unique emphasis. + + * Fedora is famous for being first to update its software + * Linux Mint provides easy options to install missing drivers + * Debian is well known for its long-term support, so updates are slow, but reliability is high + * Elementary provides a beautiful desktop experience and several special, custom-built applications + + + +Ultimately, the "best" Linux is the Linux that works best for you. I mean that literally: The best Linux for you is the Linux you try and find that all your computer features still work as expected. + +### Getting drivers + +Most drivers are already bundled in the Linux kernel (or as a kernel module). This is especially true when you're dealing with parts and peripherals a year or two old. With equipment that's been on the market for a while, Linux programmers have had the chance to develop drivers or integrate drivers from companies into the system. I've surprised more than just a few people by just attaching a Wacom graphics tablet, or a game controller, or a printer or scanner, to my Linux computer and immediately start using it, with no driver download, no installation, and little to no configuration. + +Proprietary operating systems have two strategies for dealing with device drivers. They either restrict what devices you're supposed to use with the OS, or they pay companies to write and ship drivers along with the devices. The first method is uncomfortably restrictive, but most people are (sadly) acclimated to the idea that some devices only work on some platforms. The latter method is considered a luxury, but in practice, it also has the disadvantage of being dependent upon the driver programmer. There are plenty of computer peripherals in thrift stores in perfect condition but essentially dead because the manufacturer no longer maintains the drivers the devices require to function with modern systems. + +For Linux, drivers are developed either by the manufacturer or by Linux programmers. This can cause some driver integration to be delayed (for instance, a new device might not work on Linux until six months after release), but it has the distinct advantage of long-term support. + +Should you find that there's a driver that hasn't made its way into a distribution yet. You can wait a few months and try again in hopes that a driver has been integrated into the installer image, or you can just try a different distribution to see whether the driver is there. + +### Paying for Linux + +You can avoid all the choices and any concern about compatibility by buying a PC already loaded with Linux or a PC certified for Linux. Several vendors are offering Linux pre-installed, including all [System76][12] computers, and select [Lenovo][13] models. Additionally, all Lenovo models are [Certified for Linux][14] compatibility. + +This is by far the easiest way to try Linux. + +### Working toward Linux + +Here's a challenge for you. Go through each application you have installed, and find a potential open source replacement. Select an application you use frequently, but not daily, and the next time you're about to use it, launch the open source one instead. Take the time you need to learn the new application until you're either able to adopt it as your new default or until you determine that you need to try a different option. + +The more open source products you use, the more you'll be ready to launch into the exciting world of Linux. And eventually, you'll be running the Linux desktop, along with your favorite open source apps. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/try-linux + +作者:[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/OSDC_women_computing_3.png?itok=qw2A18BM (Woman sitting in front of her computer) +[2]: https://opensource.com/article/19/12/linux-commands +[3]: https://opensource.com/article/18/4/10-commands-new-linux-users +[4]: https://opensource.com/article/20/5/linux-desktops +[5]: https://opensource.com/alternatives +[6]: http://porteus.org +[7]: https://opensource.com/sites/default/files/porteus5.png +[8]: http://getfedora.org +[9]: http://debian.org +[10]: http://linuxmint.com +[11]: http://elementary.io +[12]: http://system76.com +[13]: http://lenovo.com +[14]: https://forums.lenovo.com/t5/Linux-Operating-Systems/ct-p/lx_en From 578437a55277fe1ec3579112f40fa0dba581037d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 16 Feb 2021 05:04:45 +0800 Subject: [PATCH 015/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210215=20?= =?UTF-8?q?Protect=20your=20Home=20Assistant=20with=20these=20backups?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210215 Protect your Home Assistant with these backups.md --- ... your Home Assistant with these backups.md | 160 ++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 sources/tech/20210215 Protect your Home Assistant with these backups.md diff --git a/sources/tech/20210215 Protect your Home Assistant with these backups.md b/sources/tech/20210215 Protect your Home Assistant with these backups.md new file mode 100644 index 0000000000..5761273b64 --- /dev/null +++ b/sources/tech/20210215 Protect your Home Assistant with these backups.md @@ -0,0 +1,160 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Protect your Home Assistant with these backups) +[#]: via: (https://opensource.com/article/21/2/home-assistant-backups) +[#]: author: (Steve Ovens https://opensource.com/users/stratusss) + +Protect your Home Assistant with these backups +====== +Make sure you can recover quickly from a home automation failure with a +solid backup and hardware plan in the seventh article in this series. +![A rack of servers, blue background][1] + +In the last two articles in this series on home automation with Home Assistant (HA), I walked through setting up a few [integrations][2] with a Zigbee Bridge and some [custom ESP8266][3] devices that I use for automation. The first four articles in the series discussed [what Home Assistant is][4], why you may want [local control][5], some of the [communication protocols][6] for smart home components, and how to [install Home Assistant][7] in a virtual machine (VM) using libvirt. + +Now that you have a basic home automation setup, it is a good time to take a baseline of your system. In this seventh article, I will talk about snapshots, backups, and backup strategies. Let's get right into it. + +### Backups vs. copies + +I'll start by clearing up some ambiguity: A copy of something is not the same as a backup. Here is a brief overview of the difference between a copy and a backup. Bear in mind that this comes from the lens of an IT professional. I work with client data day in and day out. I have seen many ways that backups can go sideways, so the following descriptions may be overkill for home use. You'll have to decide just how important your Home Assistant data really is. + + * **Copies:** A copy is just what it sounds. It is when you highlight something on your computer and hit **Ctrl**+**C** and paste it somewhere else with **Ctrl**+**V**. Many people may view this as backing up the source, and to some extent, that is true. However, a copy is merely a representation of a point in time. If it's taken incorrectly, the newly created file can be corrupt, leading to a false sense of security. In addition, the source may have a problem—meaning the copy will also have a problem. If you have just a single copy of a file, it's often the same as having nothing at all. When it comes to backup, the saying "one is none" is absolutely true. If you do not have files going back over time, you won't have a good idea of whether the system creating the backups has a problem. + * **Backups and snapshots:** In Home Assistant, it is a bit tricky to differentiate between a copy and a backup. First, Home Assistant uses the term "snapshot" to refer to what we traditionally think of backups. In this context, a backup is very similar to a copy because you don't use any type of backup software, at least not in the traditional sense. Normally, backup software is designed specifically to get all the files that are hidden or otherwise protected. For example, backup software for a computer (such as CloneZilla) makes an exact replica (in some cases) of the hard drive to ensure no files are missed. Home Assistant knows how to create snapshots and does it for you. You just need to worry about storing the files somewhere. + + + +### Set a good backup strategy + +Before I get into how to deal with snapshots in Home Assistant, I want to share a brief story from a recent client. Remember when I mentioned that simply having a single copy of your files doesn't give you any indication that a problem has occurred? My client was doing all of the right things when it came to backups. The team was using the proper methodology for backups, kept multiple files going back a certain period of time, ensured there were more than two copies of each backup, and was especially careful that backups were not being stored locally on the machine being backed up. Sounds great, doesn't it? They were doing everything right. Well, almost. The one thing they neglected was testing the backups. Most people put this off or disregard it entirely. I admit I am guilty of not testing my backups frequently. I do it when I remember, which is usually once every few months or so. + +In my client's case, a software upgrade created a new requirement from the backup program. This was missed. The backups continued to hum along, and the automated checks passed. There were files after every backup run, they were larger than a certain amount, and the [magic file checks][8] reported the correct file type. The problem was that the file sizes shrunk significantly due to the software change. This meant the client was not backing up the data it thought. + +This story has a happy ending, which brings me to my point: Because the client was doing everything else right, we could go through the backups and identify the precise moment when something changed. From this, we linked this to the date of an upgrade some weeks back. Fortunately, there was no emergency that precipitated the investigation. I happened to be doing a standard audit when I discovered the discrepancy. + +The moral of the story? Without proper backup strategies, we would have had a much harder time tracking down this problem. Also, in the event of a failure, we would have had no recovery point. + +A good backup strategy usually entails daily, weekly, and monthly backups. For example, you may decide to keep all your daily backups for two weeks, four weekly backups, and perhaps four monthly backups. This, in my opinion, is overkill for Home Assistant after you have a stable setup. You'll have to choose the level of precision you need. I take a backup before I make any change to the system. This gives me a known-good situation to revert to. + +### Create snapshots + +Great, so how do you create a snapshot in Home Assistant? The **Snapshots** menu resides inside the **Supervisor** tab on the left-size panel. + +![Home Assistant snapshots][9] + +(Steve Ovens, [CC BY-SA 4.0][10]) + +You have two options for creating a snapshot: _Full snapshot_ or _Partial snapshot_. A Full snapshot is self-explanatory. You have some options with a Partial snapshot. + +![Home Assistant partial snapshots][11] + +(Steve Ovens, [CC BY-SA 4.0][10]) + +Any component you install in Home Assistant will populate in this menu. Choose a name for your backup and click **Create**. This will take some time, depending on the speed of the disk and the size of the backup. I recommend keeping at least four backups on your machine if you can afford the space. + +![Home Assistant snapshots][12] + +(Steve Ovens, [CC BY-SA 4.0][10]) + +You can retrieve these files from Home Assistant with File Browser if you set up the **Samba share** extension. + +![Samba share][13] + +(Steve Ovens, [CC BY-SA 4.0][10]) + +Save these files somewhere safe. The name you give the backup is contained in the metadata inside Home Assistant, and the file names are randomly generated. After I copy them to a different location, I usually rename them because when I test the restoration process on a different machine, the new file name does not matter. + +### My homelab strategy + +I run my Home Assistant instance on top of KVM on a Linux host. I have had a few requests to go into a little more detail on this, so feel free to skip past this section as it's not directly related to HA. + +Due to the nature of my job, I have a fairly large variety of hardware, which I use for a [homelab][14]. Sometimes this is because physical hosts are easier to work with than VMs for certain clustering software. Other times, this is because I keep workloads isolated to specific hardware. Either way, this means I already have a certain amount of knowledge built up around managing and dealing with KVM. Not to mention the fact that I run _almost exclusively_ open source software (with a few exceptions). Here is a basic layout of my homelab: + +![KVM homelab architecture][15] + +(Steve Ovens, [CC BY-SA 4.0][10]) + +The network-attached storage (NAS) has dual 10GB network cards that feed into uplink ports. Two of the KVM hosts have 10GB network interface cards (NICs), while the hosts on the right have regular 1GB network cards. + +For Home Assistant, this is well into overkill territory. However, this infrastructure was not designed for HA. HA runs just fine on a Raspberry Pi 4 (4GB version) at my parents' house. + +The VM that hosts Home Assistant has three vCPU cores of a Broadwell Core I5 CPU (circa 2015) with 8GB of RAM. The CPU tends to remain around 25% usage, and I rarely use more than 2.2GB of RAM. This is with 11 add-ons, including InfluxDB and Grafana, which are heavier applications. + +While I do have shared storage, I do not use it for live migration or anything similar. Instead, I use this for backend storage for specific mount points in a VM. For example, I store the `data` directory from Nextcloud on the NAS, divorcing the data from the service. + +At any rate, I have a few approaches to backups with this setup. Naturally, I use the Home Assistant snapshotting function to provide the first layer of protection. I tend to store only four weeks' worth of data on the VM. What do I do with the files themselves? Here is a diagram of how I try to keep my backups safe: + +![Home Assistant backup architecture][16] + +(Steve Ovens, [CC BY-SA 4.0][10]) + +Using the Samba add-on, I pull a copy of the snapshot onto my GNOME desktop. I configure Nextcloud using GNOME's **Online Accounts** settings. + +![GNOME Online Accounts settings][17] + +(Steve Ovens, [CC BY-SA 4.0][10]) + +Nextcloud takes a copy and puts it on my NAS. Both my desktop and the NAS use [SpiderOak One Backup][18] clients to ensure the backups are linked to more than one host. In the unlikely event that I delete a device from my SpiderOak account, the file is still linked to another device. I chose SpiderOak because it supports a Linux client, and it is privacy-focused and has no insight into what files it stores. The files are encrypted before being uploaded, and only the owner has the ability to decrypt them. The downside is that if you lose or forget your password, you lose your backups. + +Finally, I keep a cold copy on an external hard drive. I have a 14TB external drive that remains off and disconnected from the NAS except when backups are running. It's not on the diagram, but I also occasionally replicate to a computer at my in-laws' house. + +I can also take snapshots of the VM during critical operations (such as Home Assistant's recent upgrade from using a numbered point release to a month-based numbering system). + +I use a similar pipeline for most things that I back up, although I recognize it is a bit overkill. Also, this whole process has the flaw that it relies on me. Aside from SpiderOak and Nextcloud, I have not automated this process. I have scripts that I run, but I do not run them in a cron or anything like that. In hindsight, perhaps I should work on that. + +This setup may be considered extreme, but the built-in versioning in Nextcloud and SpiderOak, along with making copies in multiple locations, means that I am unlikely to suffer a failure that I can't recover from. At the very least, I should be able to dig up a close reference. + +As a final precaution, I make sure to keep the important information about _how_ I set things up on my private wiki on [Wiki.js][19]. I keep a section just for home automation. + +![Home automation overview][20] + +(Steve Ovens, [CC BY-SA 4.0][10]) + +When you get into creating Node-RED automations (in the next article), I suggest you keep your own notes. I take a screenshot of the flow, write a brief description, so I know what I was attempting to achieve, and dump the flow to JSON (for brevity, I omitted the JSON from this screenshot): + +![Node-RED routine][21] + +(Steve Ovens, [CC BY-SA 4.0][10]) + +### Wrapping up + +Backups are essential when you're using Home Assistant, as it is a critical component of your infrastructure that always needs to be functioning. Small downtime is acceptable, but the ability to recover from a failure quickly is crucial. Granted, I have found Home Assistant to be rock solid. It has never failed on its own; any problems I have had were external to HA. Still, if you are going to make HA a central part of your house, I strongly recommend putting a good backup strategy in place. + +In the next article, I'll take a look at setting up some simple automations with Node-RED. As always, leave a comment below if you have questions, ideas, or suggestions for topics you'd like to see covered. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/home-assistant-backups + +作者:[Steve Ovens][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/stratusss +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rack_server_sysadmin_cloud_520.png?itok=fGmwhf8I (A rack of servers, blue background) +[2]: https://opensource.com/article/21/1/home-automation-5-homeassistant-addons +[3]: https://opensource.com/article/21/1/home-assistant-6-custom-sensors +[4]: https://opensource.com/article/20/11/home-assistant +[5]: https://opensource.com/article/20/11/cloud-vs-local-home-automation +[6]: https://opensource.com/article/20/11/home-automation-part-3 +[7]: https://opensource.com/article/20/12/home-assistant +[8]: https://linux.die.net/man/5/magic +[9]: https://opensource.com/sites/default/files/uploads/ha-setup33-snapshot1_0.png (Home Assistant snapshots) +[10]: https://creativecommons.org/licenses/by-sa/4.0/ +[11]: https://opensource.com/sites/default/files/uploads/ha-setup34-snapshot2.png (Home Assistant partial snapshots) +[12]: https://opensource.com/sites/default/files/uploads/ha-setup35-snapshot3.png (Home Assistant snapshots) +[13]: https://opensource.com/sites/default/files/uploads/ha-setup36-backup-samba.png (Samba share) +[14]: https://opensource.com/article/19/3/home-lab +[15]: https://opensource.com/sites/default/files/uploads/kvm_lab.png (KVM homelab architecture) +[16]: https://opensource.com/sites/default/files/uploads/home_assistant_backups.png (Home Assistant backup architecture) +[17]: https://opensource.com/sites/default/files/uploads/gnome-online-account.png (GNOME Online Accounts settings) +[18]: https://spideroak.com/ +[19]: https://wiki.js.org/ +[20]: https://opensource.com/sites/default/files/uploads/confluence_home_automation_overview.png (Home automation overview) +[21]: https://opensource.com/sites/default/files/uploads/node_red_bedtime.png (Node-RED routine) From a52bf3a3ed120d6217bc571b1b4f4531bd31a15c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 16 Feb 2021 05:04:59 +0800 Subject: [PATCH 016/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210215=20?= =?UTF-8?q?A=20practical=20guide=20to=20JavaScript=20closures?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210215 A practical guide to JavaScript closures.md --- ... practical guide to JavaScript closures.md | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 sources/tech/20210215 A practical guide to JavaScript closures.md diff --git a/sources/tech/20210215 A practical guide to JavaScript closures.md b/sources/tech/20210215 A practical guide to JavaScript closures.md new file mode 100644 index 0000000000..46f5d19c0f --- /dev/null +++ b/sources/tech/20210215 A practical guide to JavaScript closures.md @@ -0,0 +1,144 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (A practical guide to JavaScript closures) +[#]: via: (https://opensource.com/article/21/2/javascript-closures) +[#]: author: (Nimisha Mukherjee https://opensource.com/users/nimisha) + +A practical guide to JavaScript closures +====== +Get a better understanding of how JavaScript code works and executes by +diving into one of the advanced concept: closures. +![Woman programming][1] + +In [_4 reasons why JavaScript is so popular_][2], I touched on a few advanced JavaScript concepts. In this article, I will dive into one of them: closures. + +According to [Mozilla Developer Network][3] (MDN), "A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment)." Simplified, this means that a function inside another function can access the variables from the outer (parent) function. + +To better understand closures, take a look at scopes and their execution context. + +Here is a simple code snippet: + + +``` +var hello = "Hello"; + +function sayHelloWorld() { +var world = "World"; +        function wish() { +                var year = "2021"; +                console.log(hello + " " + world + " "+ year); +} +wish(); +} +sayHelloWorld(); +``` + +Here's the execution context for this code:  + +![Execution context for JS code][4] + +(Nimisha Mukherjee, [CC BY-SA 4.0][5]) + +Closures are created every time a function is created (at function-creation time). Every closure has three scopes: + + * Local scope (own scope) + * Outer functions scope + * Global scope + + + +I'll modify the above code slightly to demonstrate closure: + + +``` +var hello = "Hello"; + +var sayHelloWorld = function() { +var world = "World"; +        function wish() { +                var year = "2021"; +                console.log(hello + " " + world + " "+ year); +} +return wish; +} +var callFunc = sayHelloWorld(); +callFunc(); +``` + +The inner function `wish()` is returned from the outer function before it's executed. This happens because functions in JavaScript form **closures**. + + * `callFunc` holds a reference to the function `wish` when `sayHelloWorld` runs + * `wish` maintains a reference to its surrounding (lexical) environment where the variable `world` exists. + + + +### Private variables and methods + +Natively, JavaScript does not support the creation of private variables and methods. A common and practical use of closure is to emulate private variables and methods and allow data privacy. Methods defined within the closure scope are privileged. + +This code snippet captures how closures are commonly written and used in JavaScript: + + +``` +var resourceRecord = function(myName, myAddress) { + var resourceName = myName; + var resourceAddress = myAddress; + var accessRight = "HR"; + return { +   changeName: function(updateName, privilege) { +     //only HR can change the name +     if(privilege === accessRight ) { +       resourceName = updateName; +       return true; +     } else { +       return false; +     } +   },   +   changeAddress: function(newAddress) { +     //any associate can change the address +     resourceAddress = newAddress;           +   },   +   showResourceDetail: function() { +     console.log ("Name:" + resourceName + " ; Address:" + resourceAddress); +   } + } +} +//Create first record +var resourceRecord1 = resourceRecord("Perry","Office"); +//Create second record +var resourceRecord2 = resourceRecord("Emma","Office"); +//Change the address on the first record +resourceRecord1.changeAddress("Home"); +resourceRecord1.changeName("Perry Berry", "Associate"); //Output is false as only an HR can change the name +resourceRecord2.changeName("Emma Freeman", "HR"); //Output is true as HR changes the name +resourceRecord1.showResourceDetail(); //Output - Name:Perry ; Address:Home +resourceRecord2.showResourceDetail(); //Output - Name:Emma Freeman ; Address:Office +``` + +The resource records (`resourceRecord1` and `resourceRecord2`) are independent of one another. Each closure references a different version of the `resourceName` and `resourceAddress` variable through its own closure. You can also apply specific rules to how private variables need to be handled—I added a check on who can modify `resourceName`. + +### Use closures + +Understanding closure is important, as it enables deeper knowledge of how variables and functions relate to one another and how JavaScript code works and executes. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/javascript-closures + +作者:[Nimisha Mukherjee][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/nimisha +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/programming-code-keyboard-laptop-music-headphones.png?itok=EQZ2WKzy (Woman programming) +[2]: https://opensource.com/article/20/11/javascript-popular +[3]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures +[4]: https://opensource.com/sites/default/files/uploads/execution-context.png (Execution context for JS code) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ From 87ae8e6374cc4500798b9c7ff1aded68dfe88ccb Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 16 Feb 2021 09:36:51 +0800 Subject: [PATCH 017/818] Rename sources/tech/20210215 Why everyone should try using Linux.md to sources/talk/20210215 Why everyone should try using Linux.md --- .../20210215 Why everyone should try using Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20210215 Why everyone should try using Linux.md (100%) diff --git a/sources/tech/20210215 Why everyone should try using Linux.md b/sources/talk/20210215 Why everyone should try using Linux.md similarity index 100% rename from sources/tech/20210215 Why everyone should try using Linux.md rename to sources/talk/20210215 Why everyone should try using Linux.md From cc401b8934982a77bb43b5a24c44052e41ae9ff1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 16 Feb 2021 10:14:05 +0800 Subject: [PATCH 018/818] PRF @geekpi --- ... Helper and Pacman Wrapper Based on Yay.md | 52 +++++++++---------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/translated/tech/20210203 Paru - A New AUR Helper and Pacman Wrapper Based on Yay.md b/translated/tech/20210203 Paru - A New AUR Helper and Pacman Wrapper Based on Yay.md index 5ad643b667..216ef1fd0b 100644 --- a/translated/tech/20210203 Paru - A New AUR Helper and Pacman Wrapper Based on Yay.md +++ b/translated/tech/20210203 Paru - A New AUR Helper and Pacman Wrapper Based on Yay.md @@ -1,28 +1,30 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Paru – A New AUR Helper and Pacman Wrapper Based on Yay) [#]: via: (https://itsfoss.com/paru-aur-helper/) [#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) -Paru – 基于 Yay 的新 AUR 助手及 Pacman 包装器 +Paru:基于 Yay 的新 AUR 助手 ====== +![](https://img.linux.net.cn/data/attachment/album/202102/16/101301ldekk9kkpqlplke6.jpg) + [用户选择 Arch Linux][1] 或 [基于 Arch 的 Linux 发行版][2]的主要原因之一就是 [Arch 用户仓库(AUR)][3]。 遗憾的是,[pacman][4],也就是 Arch 的包管理器,不能以类似官方仓库的方式访问 AUR。AUR 中的包是以 [PKGBUILD][5] 的形式存在的,需要手动过程来构建。 AUR 助手可以自动完成这个过程。毫无疑问,[yay][6] 是最受欢迎和备受青睐的 AUR 助手之一。 -最近,yay 的两位开发者之一的 [Morganamilo][7] [宣布][8]将退出 yay 的维护工作,以开始自己的 AUR 助手 [paru][9]。Paru 是用 [Rust][10] 编写的,而 yay 是用 [Go][11] 编写的,它的设计是基于 yay 的。 +最近,`yay` 的两位开发者之一的 [Morganamilo][7][宣布][8]将退出 `yay` 的维护工作,以开始自己的 AUR 助手 [paru][9]。`paru` 是用 [Rust][10] 编写的,而 `yay` 是用 [Go][11] 编写的,它的设计是基于 yay 的。 -请注意,yay 还没有结束支持,它仍然由 [Jguer][12] 积极维护。他还[评论][13]说,paru 可能适合那些寻找丰富功能的 AUR 助手的用户。因此我推荐大家尝试一下。 +请注意,`yay` 还没有结束支持,它仍然由 [Jguer][12] 积极维护。他还[评论][13]说,`paru` 可能适合那些寻找丰富功能的 AUR 助手的用户。因此我推荐大家尝试一下。 ### 安装 Paru AUR 助手 -要安装 paru,打开你的终端,逐一输入以下命令。 +要安装 `paru`,打开你的终端,逐一输入以下命令: ``` sudo pacman -S --needed base-devel @@ -35,43 +37,41 @@ makepkg -si ### 使用 Paru AUR 助手的基本命令 -在我看来,这些都是 paru 最基本的命令。你可以在 [GitHub][9] 的官方仓库中探索更多。 - - * **paru <用户输入>**:搜索并安装<用户输入> - * **paru -**:paru -Syu 的别名 - * **paru -Sua** :仅升级 AUR 包。 - * **paru -Qua**:打印可用的 AUR 更新 - * **paru -Gc <用户输入>**:打印<用户输入>的 AUR 评论 - +在我看来,这些都是 `paru` 最基本的命令。你可以在 [GitHub][9] 的官方仓库中探索更多。 + * `paru <用户输入>`:搜索并安装“用户输入” + * `paru -`:`paru -Syu` 的别名 + * `paru -Sua`:仅升级 AUR 包。 + * `paru -Qua`:打印可用的 AUR 更新 + * `paru -Gc <用户输入>`:显示“用户输入”的 AUR 评论 ### 充分使用 Paru AUR 助手 -你可以在 GitHub 上访问 paru 的[更新日志][14]来查看完整的变更日志历史,或者你可以在[首次发布][15]中查看来自 yay 的更改。 +你可以在 GitHub 上访问 `paru` 的[更新日志][14]来查看完整的变更日志历史,或者你可以在[首次发布][15]中查看对 `yay` 的变化。 #### 在 Paru 中启用颜色 -要在 paru 中启用颜色,你必须先在 pacman 中启用它。所有的[配置文件][16]都在 /etc 目录下。在此例中,我[使用 Nano 文本编辑器][17],但是,你可以选择使用任何[基于终端的文本编辑器][18]。 +要在 `paru` 中启用颜色,你必须先在 `pacman` 中启用它。所有的[配置文件][16]都在 `/etc` 目录下。在此例中,我[使用 Nano 文本编辑器][17],但是,你可以选择使用任何[基于终端的文本编辑器][18]。 ``` sudo nano /etc/pacman.conf ``` -打开 pacman 配置文件后,取消 “Color” 的注释,即可启用此功能。 +打开 `pacman` 配置文件后,取消 `Color` 的注释,即可启用此功能。 ![][19] -#### **反转搜索顺序** +#### 反转搜索顺序 -根据你的搜索条件,最相关的包通常会显示在搜索结果的顶部。在 paru 中,你可以反转搜索顺序,使你的搜索更容易。 +根据你的搜索条件,最相关的包通常会显示在搜索结果的顶部。在 `paru` 中,你可以反转搜索顺序,使你的搜索更容易。 -与前面的例子类似,打开 paru 配置文件: +与前面的例子类似,打开 `paru` 配置文件: ``` sudo nano /etc/paru.conf ``` -取消注释 “BottomUp” 项,然后保存文件。 +取消注释 `BottomUp` 项,然后保存文件。 ![][20] @@ -79,9 +79,9 @@ sudo nano /etc/paru.conf ![][21] -#### **编辑 PKGBUILD** (对于高级用户) +#### 编辑 PKGBUILD (对于高级用户) -如果你是一个有经验的 Linux 用户,你可以通过 paru 编辑 AUR 包。要做到这一点,你需要在 paru 配置文件中启用该功能,并设置你所选择的文件管理器。 +如果你是一个有经验的 Linux 用户,你可以通过 `paru` 编辑 AUR 包。要做到这一点,你需要在 `paru` 配置文件中启用该功能,并设置你所选择的文件管理器。 在此例中,我将使用配置文件中的默认值,即 vifm 文件管理器。如果你还没有使用过它,你可能需要安装它。 @@ -94,7 +94,7 @@ sudo nano /etc/paru.conf ![][22] -让我们回到 [Google Calendar][23] 的 AUR 包,并尝试安装它。系统会提示你审查该软件包。输入 Y 并按下回车。 +让我们回到 [Google Calendar][23] 的 AUR 包,并尝试安装它。系统会提示你审查该软件包。输入 `Y` 并按下回车。 ![][24] @@ -108,9 +108,7 @@ sudo nano /etc/paru.conf ### 总结 -Paru 是 [AUR 助手家族][27]的又一个有趣的新成员,前途光明。此时,我不建议更换 yay,因为它还在维护,但一定要试试 paru。你可以把它们两个都安装到你的系统中,然后得出自己的结论。 - -要获得最新的 [Linux 新闻][28],请订阅我们的社交媒体,以便在第一时间获取新闻! +`paru` 是 [AUR 助手家族][27]的又一个有趣的新成员,前途光明。此时,我不建议更换 `yay`,因为它还在维护,但一定要试试 `paru`。你可以把它们两个都安装到你的系统中,然后得出自己的结论。 -------------------------------------------------------------------------------- @@ -119,7 +117,7 @@ via: https://itsfoss.com/paru-aur-helper/ 作者:[Dimitrios Savvopoulos][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/) 荣誉推出 From 980a67cd79f8f8704bda2fd8c1d1c208ccf14224 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 16 Feb 2021 10:14:34 +0800 Subject: [PATCH 019/818] PUB @geekpi https://linux.cn/article-13122-1.html --- ...Paru - A New AUR Helper and Pacman Wrapper Based on Yay.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210203 Paru - A New AUR Helper and Pacman Wrapper Based on Yay.md (98%) diff --git a/translated/tech/20210203 Paru - A New AUR Helper and Pacman Wrapper Based on Yay.md b/published/20210203 Paru - A New AUR Helper and Pacman Wrapper Based on Yay.md similarity index 98% rename from translated/tech/20210203 Paru - A New AUR Helper and Pacman Wrapper Based on Yay.md rename to published/20210203 Paru - A New AUR Helper and Pacman Wrapper Based on Yay.md index 216ef1fd0b..c30c45aaab 100644 --- a/translated/tech/20210203 Paru - A New AUR Helper and Pacman Wrapper Based on Yay.md +++ b/published/20210203 Paru - A New AUR Helper and Pacman Wrapper Based on Yay.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13122-1.html) [#]: subject: (Paru – A New AUR Helper and Pacman Wrapper Based on Yay) [#]: via: (https://itsfoss.com/paru-aur-helper/) [#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) From 4764b42293c68e64c4a99c057ac7529077c5d538 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 16 Feb 2021 11:00:34 +0800 Subject: [PATCH 020/818] PUB @geekpi https://linux.cn/article-13123-1.html --- ...aces are the shamash candle of the Zen of Python.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/tech => published}/20191230 Namespaces are the shamash candle of the Zen of Python.md (84%) diff --git a/translated/tech/20191230 Namespaces are the shamash candle of the Zen of Python.md b/published/20191230 Namespaces are the shamash candle of the Zen of Python.md similarity index 84% rename from translated/tech/20191230 Namespaces are the shamash candle of the Zen of Python.md rename to published/20191230 Namespaces are the shamash candle of the Zen of Python.md index 6aa0d3ee85..dc98e7afc0 100644 --- a/translated/tech/20191230 Namespaces are the shamash candle of the Zen of Python.md +++ b/published/20191230 Namespaces are the shamash candle of the Zen of Python.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13123-1.html) [#]: subject: (Namespaces are the shamash candle of the Zen of Python) [#]: via: (https://opensource.com/article/19/12/zen-python-namespaces) [#]: author: (Moshe Zadka https://opensource.com/users/moshez) @@ -12,11 +12,11 @@ > 这是 Python 之禅特别系列的一部分,重点是一个额外的原则:命名空间。 -![在建筑物上的笔记本电脑上编程的人][1] +![](https://img.linux.net.cn/data/attachment/album/202102/16/105800d64ceaeertt4u4ee.jpg) -著名的光明节Hanukkah有八个晚上的庆祝活动。然而,光明节的灯台有九根蜡烛:八根普通蜡烛和总是偏移的第九根蜡烛。它被称为 “shamash” 或 “shamos”,大致可以翻译为“仆人”或“看门人”的意思。 +著名的光明节Hanukkah有八个晚上的庆祝活动。然而,光明节的灯台有九根蜡烛:八根普通的蜡烛和总是偏移的第九根蜡烛。它被称为 “shamash” 或 “shamos”,大致可以翻译为“仆人”或“看门人”的意思。 -shamos 是点燃所有其它蜡烛的蜡烛:它是唯一一支可以用火的蜡烛,而不仅仅是观看。当我们结束关于 Python 之禅系列时,我看到命名空间提供了类似的作用。 +shamos 是点燃所有其它蜡烛的蜡烛:它是唯一一支可以用火的蜡烛,而不仅仅是观看。当我们结束 Python 之禅系列时,我看到命名空间提供了类似的作用。 ### Python 中的命名空间 From bb89e0c62a0a7c8fa0486ca471ff4d6781f0a1c2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 16 Feb 2021 11:02:49 +0800 Subject: [PATCH 021/818] Revert "PUB" This reverts commit 4764b42293c68e64c4a99c057ac7529077c5d538. --- ...aces are the shamash candle of the Zen of Python.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {published => translated/tech}/20191230 Namespaces are the shamash candle of the Zen of Python.md (84%) diff --git a/published/20191230 Namespaces are the shamash candle of the Zen of Python.md b/translated/tech/20191230 Namespaces are the shamash candle of the Zen of Python.md similarity index 84% rename from published/20191230 Namespaces are the shamash candle of the Zen of Python.md rename to translated/tech/20191230 Namespaces are the shamash candle of the Zen of Python.md index dc98e7afc0..6aa0d3ee85 100644 --- a/published/20191230 Namespaces are the shamash candle of the Zen of Python.md +++ b/translated/tech/20191230 Namespaces are the shamash candle of the Zen of Python.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: (wxy) -[#]: url: (https://linux.cn/article-13123-1.html) +[#]: publisher: ( ) +[#]: url: ( ) [#]: subject: (Namespaces are the shamash candle of the Zen of Python) [#]: via: (https://opensource.com/article/19/12/zen-python-namespaces) [#]: author: (Moshe Zadka https://opensource.com/users/moshez) @@ -12,11 +12,11 @@ > 这是 Python 之禅特别系列的一部分,重点是一个额外的原则:命名空间。 -![](https://img.linux.net.cn/data/attachment/album/202102/16/105800d64ceaeertt4u4ee.jpg) +![在建筑物上的笔记本电脑上编程的人][1] -著名的光明节Hanukkah有八个晚上的庆祝活动。然而,光明节的灯台有九根蜡烛:八根普通的蜡烛和总是偏移的第九根蜡烛。它被称为 “shamash” 或 “shamos”,大致可以翻译为“仆人”或“看门人”的意思。 +著名的光明节Hanukkah有八个晚上的庆祝活动。然而,光明节的灯台有九根蜡烛:八根普通蜡烛和总是偏移的第九根蜡烛。它被称为 “shamash” 或 “shamos”,大致可以翻译为“仆人”或“看门人”的意思。 -shamos 是点燃所有其它蜡烛的蜡烛:它是唯一一支可以用火的蜡烛,而不仅仅是观看。当我们结束 Python 之禅系列时,我看到命名空间提供了类似的作用。 +shamos 是点燃所有其它蜡烛的蜡烛:它是唯一一支可以用火的蜡烛,而不仅仅是观看。当我们结束关于 Python 之禅系列时,我看到命名空间提供了类似的作用。 ### Python 中的命名空间 From 1a127512ff0c1fc32aa135358902243c6e146f0e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 16 Feb 2021 11:04:54 +0800 Subject: [PATCH 022/818] PUB @wxy https://linux.cn/article-13123-1.html --- ...aces are the shamash candle of the Zen of Python.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/tech => published}/20191230 Namespaces are the shamash candle of the Zen of Python.md (84%) diff --git a/translated/tech/20191230 Namespaces are the shamash candle of the Zen of Python.md b/published/20191230 Namespaces are the shamash candle of the Zen of Python.md similarity index 84% rename from translated/tech/20191230 Namespaces are the shamash candle of the Zen of Python.md rename to published/20191230 Namespaces are the shamash candle of the Zen of Python.md index 6aa0d3ee85..dc98e7afc0 100644 --- a/translated/tech/20191230 Namespaces are the shamash candle of the Zen of Python.md +++ b/published/20191230 Namespaces are the shamash candle of the Zen of Python.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13123-1.html) [#]: subject: (Namespaces are the shamash candle of the Zen of Python) [#]: via: (https://opensource.com/article/19/12/zen-python-namespaces) [#]: author: (Moshe Zadka https://opensource.com/users/moshez) @@ -12,11 +12,11 @@ > 这是 Python 之禅特别系列的一部分,重点是一个额外的原则:命名空间。 -![在建筑物上的笔记本电脑上编程的人][1] +![](https://img.linux.net.cn/data/attachment/album/202102/16/105800d64ceaeertt4u4ee.jpg) -著名的光明节Hanukkah有八个晚上的庆祝活动。然而,光明节的灯台有九根蜡烛:八根普通蜡烛和总是偏移的第九根蜡烛。它被称为 “shamash” 或 “shamos”,大致可以翻译为“仆人”或“看门人”的意思。 +著名的光明节Hanukkah有八个晚上的庆祝活动。然而,光明节的灯台有九根蜡烛:八根普通的蜡烛和总是偏移的第九根蜡烛。它被称为 “shamash” 或 “shamos”,大致可以翻译为“仆人”或“看门人”的意思。 -shamos 是点燃所有其它蜡烛的蜡烛:它是唯一一支可以用火的蜡烛,而不仅仅是观看。当我们结束关于 Python 之禅系列时,我看到命名空间提供了类似的作用。 +shamos 是点燃所有其它蜡烛的蜡烛:它是唯一一支可以用火的蜡烛,而不仅仅是观看。当我们结束 Python 之禅系列时,我看到命名空间提供了类似的作用。 ### Python 中的命名空间 From 64d00748e7bc2720b7eab2388825722b9bb2e1e2 Mon Sep 17 00:00:00 2001 From: XYenChi <466530436@qq.com> Date: Tue, 16 Feb 2021 18:07:57 +0800 Subject: [PATCH 023/818] Rename sources/talk/20190312 When the web grew up- A browser story.md to translated/talk/20190312 When the web grew up- A browser story.md --- .../talk/20190312 When the web grew up- A browser story.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/talk/20190312 When the web grew up- A browser story.md (100%) diff --git a/sources/talk/20190312 When the web grew up- A browser story.md b/translated/talk/20190312 When the web grew up- A browser story.md similarity index 100% rename from sources/talk/20190312 When the web grew up- A browser story.md rename to translated/talk/20190312 When the web grew up- A browser story.md From baa21b2ca8cbcae297e8d4235e92c117b215bea3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 16 Feb 2021 22:21:44 +0800 Subject: [PATCH 024/818] PRF @geekpi --- ...9 Manage containers with Podman Compose.md | 50 ++++++++----------- 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/translated/tech/20210129 Manage containers with Podman Compose.md b/translated/tech/20210129 Manage containers with Podman Compose.md index f020ea1a23..86884809f8 100644 --- a/translated/tech/20210129 Manage containers with Podman Compose.md +++ b/translated/tech/20210129 Manage containers with Podman Compose.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Manage containers with Podman Compose) @@ -16,26 +16,25 @@ Docker 的一个缺点是它有一个中央守护进程,它以 root 用户的身份运行,这对安全有影响。但这正是 Podman 的用武之地。Podman 是一个 [无守护进程容器引擎][2],用于开发、管理和在你的 Linux 系统上以 root 或无 root 模式运行 OCI 容器。 -在 Fedora Magazine 上还有其他文章,你可以用来了解更多关于 Podman 的信息。下面有两个例子: +下面这些文章可以用来了解更多关于 Podman 的信息: + * [使用 Podman 以非 root 用户身份运行 Linux 容器][11] * [在 Fedora 上使用 Podman 的 Pod][3] - * [在 Fedora 上具有 Capabilities 的Podman][4] - - + * [在 Fedora 中结合权能使用 Podman][4] 如果你使用过 Docker,你很可能也知道 Docker Compose,它是一个用于编排多个可能相互依赖的容器的工具。要了解更多关于 Docker Compose 的信息,请看它的[文档][5]。 ### 什么是 Podman Compose? -[Podman Compose][6]是一个目标作为 Docker Compose 的替代品,不需要对 docker-compose.yaml 文件进行任何修改的项目。由于 Podman Compose 使用 pod 工作,所以最好看下 pod 的最新定义。 +[Podman Compose][6] 项目的目标是作为 Docker Compose 的替代品,而不需要对 docker-compose.yaml 文件进行任何修改。由于 Podman Compose 使用吊舱pod 工作,所以最好看下“吊舱”的最新定义。 - -> 一个_Pod_(如一群鲸鱼或豌豆荚)是由一个或多个[容器][7]组成的组,具有共享的存储/网络资源,以及如何运行容器的规范。 +> 一个“吊舱pod ”(如一群鲸鱼或豌豆荚)是由一个或多个[容器][7]组成的组,具有共享的存储/网络资源,以及如何运行容器的规范。 > > [Pods - Kubernetes 文档][8] -Podman Compose 的基本思想是,它选中 _docker-compose.yaml_ 文件里面定义的服务,为每个服务创建一个容器。Docker Compose 和 Podman Compose 的一个主要区别是,Podman Compose 将整个项目的容器添加到一个单一的 pod 中,而且所有的容器共享同一个网络。它甚至用和 Docker Compose 一样的方式命名容器,在创建容器时使用 _--add-host_ 标志,你会在例子中看到。 +(LCTT 译注:容器技术领域大量使用了航海比喻,pod 一词,意为“豆荚”,在航海领域指“吊舱” —— 均指盛装多个物品的容器。常不翻译,考虑前后文,可译做“吊舱”。) +Podman Compose 的基本思想是,它选中 `docker-compose.yaml` 文件里面定义的服务,为每个服务创建一个容器。Docker Compose 和 Podman Compose 的一个主要区别是,Podman Compose 将整个项目的容器添加到一个单一的吊舱中,而且所有的容器共享同一个网络。如你在例子中看到的,在创建容器时使用 `--add-host` 标志,它甚至用和 Docker Compose 一样的方式命名容器。 ### 安装 @@ -53,7 +52,7 @@ sudo dnf install podman ### 例子:用 Podman Compose 启动一个 WordPress 网站 -想象一下,你的 _docker-compose.yaml_ 文件在一个叫 _wpsite_ 的文件夹里。一个典型的 WordPress 网站的 _docker-compose.yaml_ (或 _docker-compose.yml_) 文件是这样的: +想象一下,你的 `docker-compose.yaml` 文件在一个叫 `wpsite` 的文件夹里。一个典型的 WordPress 网站的 `docker-compose.yaml` (或 `docker-compose.yml`) 文件是这样的: ``` version: "3.8" @@ -100,58 +99,48 @@ networks: wpnet: {} ``` -如果你用过 Docker,你就会知道你可运行 _docker-compose up_ 来启动这些服务。Docker Compose 会创建两个名为 _wpsite_web_1_ 和 _wpsite_db_1_ 的容器,并将它们连接到一个名为 _wpsite_wpnet_ 的网络。 +如果你用过 Docker,你就会知道你可运行 `docker-compose up` 来启动这些服务。Docker Compose 会创建两个名为 `wpsite_web_1` 和 `wpsite_db_1` 的容器,并将它们连接到一个名为 `wpsite_wpnet` 的网络。 +现在,看看当你在项目目录下运行 `podman-compose up` 时会发生什么。首先,一个以执行命令的目录命名的吊舱被创建。接下来,它寻找 YAML 文件中定义的任何名称的卷,如果它们不存在,就创建卷。然后,在 YAML 文件的 `services` 部分列出的每个服务都会创建一个容器,并添加到吊舱中。 -现在,看看当你在项目目录下运行 _podman-compose up_ 时会发生什么。首先,一个以执行命令的目录命名的 pod 被创建。接下来,它寻找 YAML 文件中定义的任何名称的卷,如果它们不存在,就创建卷。然后,在 YAML 文件的 _services_ 部分列出的每个服务都会创建一个容器,并添加到 pod 中。 - -容器的命名与 Docker Compose 类似。例如,为你的 web 服务创建一个名为 _wpsite_web_1_ 的容器。Podman Compose 还为每个命名的容器添加了 localhost 别名。之后,容器仍然可以通过名字互相解析,尽管它们并不像 Docker 那样在一个桥接网络上。要做到这一点,使用选项 _-add-host_。例如,_-add-host web:localhost_。 - -请注意,_docker-compose.yaml_ 包含了一个从主机 8080 端口到容器 80 端口的 Web 服务的端口转发。现在你应该可以通过浏览器访问新 WordPress 实例,地址为 __。 +容器的命名与 Docker Compose 类似。例如,为你的 web 服务创建一个名为 `wpsite_web_1` 的容器。Podman Compose 还为每个命名的容器添加了 `localhost` 别名。之后,容器仍然可以通过名字互相解析,尽管它们并不像 Docker 那样在一个桥接网络上。要做到这一点,使用选项 `-add-host`。例如,`-add-host web:localhost`。 +请注意,`docker-compose.yaml` 包含了一个从主机 8080 端口到容器 80 端口的 Web 服务的端口转发。现在你应该可以通过浏览器访问新 WordPress 实例,地址为 `http://localhost:8080`。 ![WordPress Dashboard][10] ### 控制 pod 和容器 -要查看正在运行的容器,使用 _podman ps_,它可以显示 web 和数据库容器以及 pod 中的 infra 容器。 -``` +要查看正在运行的容器,使用 `podman ps`,它可以显示 web 和数据库容器以及吊舱中的基础设施容器。 ``` - CONTAINER ID  IMAGE                               COMMAND               CREATED      STATUS          PORTS                                         NAMES a364a8d7cec7  docker.io/library/wordpress:latest  apache2-foregroun...  2 hours ago  Up 2 hours ago  0.0.0.0:8080-&gt;80/tcp, 0.0.0.0:6603-&gt;3306/tcp  wpsite_web_1 c447024aa104  docker.io/library/mariadb:10.5      mysqld                2 hours ago  Up 2 hours ago  0.0.0.0:8080-&gt;80/tcp, 0.0.0.0:6603-&gt;3306/tcp  wpsite_db_1 12b1e3418e3e  k8s.gcr.io/pause:3.2 ``` -``` - -你也可以验证 Podman 已经为这个项目创建了一个 pod,以你执行命令的文件夹命名。 -``` +你也可以验证 Podman 已经为这个项目创建了一个吊舱,以你执行命令的文件夹命名。 ``` - POD ID        NAME             STATUS    CREATED      INFRA ID      # OF CONTAINERS 8a08a3a7773e  wpsite           Degraded  2 hours ago  12b1e3418e3e  3 ``` -``` - 要停止容器,在另一个命令窗口中输入以下命令: ``` podman-compose down ``` -你也可以通过停止和删除 pod 来实现。这实质上是停止并移除所有的容器,然后再删除包含的 pod。所以,同样的事情也可以通过这些命令来实现: +你也可以通过停止和删除吊舱来实现。这实质上是停止并移除所有的容器,然后再删除包含的吊舱。所以,同样的事情也可以通过这些命令来实现: ``` podman pod stop podname podman pod rm podname ``` -请注意,这不会删除你在 _docker-compose.yaml_ 中定义的卷。所以,你的 WordPress 网站的状态被保存下来了,你可以通过运行这个命令来恢复它。 +请注意,这不会删除你在 `docker-compose.yaml` 中定义的卷。所以,你的 WordPress 网站的状态被保存下来了,你可以通过运行这个命令来恢复它。 ``` podman-compose up @@ -166,7 +155,7 @@ via: https://fedoramagazine.org/manage-containers-with-podman-compose/ 作者:[Mehdi Haghgoo][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/) 荣誉推出 @@ -175,10 +164,11 @@ via: https://fedoramagazine.org/manage-containers-with-podman-compose/ [1]: https://fedoramagazine.org/wp-content/uploads/2021/01/podman-compose-1-816x345.jpg [2]: https://podman.io [3]: https://fedoramagazine.org/podman-pods-fedora-containers/ -[4]: https://fedoramagazine.org/podman-with-capabilities-on-fedora/ +[4]: https://linux.cn/article-12859-1.html [5]: https://docs.docker.com/compose/ [6]: https://github.com/containers/podman-compose [7]: https://kubernetes.io/docs/concepts/containers/ [8]: https://kubernetes.io/docs/concepts/workloads/pods/ [9]: https://podman.io/getting-started/installation [10]: https://fedoramagazine.org/wp-content/uploads/2021/01/Screenshot-from-2021-01-08-06-27-29-1024x767.png +[11]: https://linux.cn/article-10156-1.html \ No newline at end of file From 24b9bd808a3c111a10d68dbc170c564155197312 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 16 Feb 2021 22:22:41 +0800 Subject: [PATCH 025/818] PUB @geekpi https://linux.cn/article-13125-1.html --- .../20210129 Manage containers with Podman Compose.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210129 Manage containers with Podman Compose.md (99%) diff --git a/translated/tech/20210129 Manage containers with Podman Compose.md b/published/20210129 Manage containers with Podman Compose.md similarity index 99% rename from translated/tech/20210129 Manage containers with Podman Compose.md rename to published/20210129 Manage containers with Podman Compose.md index 86884809f8..d1d3ce6286 100644 --- a/translated/tech/20210129 Manage containers with Podman Compose.md +++ b/published/20210129 Manage containers with Podman Compose.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13125-1.html) [#]: subject: (Manage containers with Podman Compose) [#]: via: (https://fedoramagazine.org/manage-containers-with-podman-compose/) [#]: author: (Mehdi Haghgoo https://fedoramagazine.org/author/powergame/) From 7789511a76561696938f3fcacaf79a15fff7018d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 16 Feb 2021 22:35:51 +0800 Subject: [PATCH 026/818] APL --- ...3 open source tools that make Linux the ideal workstation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210208 3 open source tools that make Linux the ideal workstation.md b/sources/tech/20210208 3 open source tools that make Linux the ideal workstation.md index 2fb770fa83..e30c8e0465 100644 --- a/sources/tech/20210208 3 open source tools that make Linux the ideal workstation.md +++ b/sources/tech/20210208 3 open source tools that make Linux the ideal workstation.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From c43259ec71f4a8f7a40c0dcbeec82f6f66bcdf2c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 16 Feb 2021 23:39:01 +0800 Subject: [PATCH 027/818] TSL --- ...s that make Linux the ideal workstation.md | 76 ------------------ ...s that make Linux the ideal workstation.md | 77 +++++++++++++++++++ 2 files changed, 77 insertions(+), 76 deletions(-) delete mode 100644 sources/tech/20210208 3 open source tools that make Linux the ideal workstation.md create mode 100644 translated/tech/20210208 3 open source tools that make Linux the ideal workstation.md diff --git a/sources/tech/20210208 3 open source tools that make Linux the ideal workstation.md b/sources/tech/20210208 3 open source tools that make Linux the ideal workstation.md deleted file mode 100644 index e30c8e0465..0000000000 --- a/sources/tech/20210208 3 open source tools that make Linux the ideal workstation.md +++ /dev/null @@ -1,76 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (3 open source tools that make Linux the ideal workstation) -[#]: via: (https://opensource.com/article/21/2/linux-workday) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -3 open source tools that make Linux the ideal workstation -====== -Linux has everything you think you need and more for you to have a -productive workday. -![Person using a laptop][1] - -In 2021, there are more reasons why people love Linux than ever before. In this series, I'll share 21 different reasons to use Linux. Today, I'll share with you why Linux is a great choice for your workday. - -Everyone wants to be productive during the workday. If your workday generally involves working on documents, presentations, and spreadsheets, then you might be accustomed to a specific routine. The problem is that _usual routine_ is usually dictated by one or two specific applications, whether it's a certain office suite or a desktop OS. Of course, just because something's a habit doesn't mean it's ideal, and yet it tends to persist unquestioned, even to the point of influencing the very structure of how a business is run. - -### Working smarter - -Many office applications these days run in the cloud, so you can work with the same constraints on Linux if you really want to. However, because many of the typical big-name office applications aren't cultural expectations on Linux, you might find yourself inspired to explore other options. As anyone eager to get out of their "comfort zone" knows, this kind of subtle disruption can be surprisingly useful. All too often, you don't know what you're doing inefficiently because you haven't actually tried doing things differently. Force yourself to explore other options, and you never know what you'll find. You don't even have to know exactly what you're looking for. - -### LibreOffice - -One of the most obvious open source office stalwarts on Linux (or any other platform) is [LibreOffice][2]. It features several components, including a word processor, presentation software, a spreadsheet, relational database interface, vector drawing, and more. It can import many document formats from other popular office applications, so transitioning to LibreOffice from another tool is usually easy. - -There's more to LibreOffice than just being a great office suite, however. LibreOffice has macro support, so resourceful users can automate repetitive tasks. It also features terminal commands so you can perform many tasks without ever launching the LibreOffice interface. - -Imagine, for instance, opening 21 documents, navigating to the **File** menu, to the **Export** or **Print** menu item, and exporting the file to PDF or EPUB. That's over 84 clicks, at the very least, and probably an hour of work. Compare that to opening a folder of documents and converting all of them to PDF or EPUB with just one swift command or menu action. The conversion would run in the background while you work on other things. You'd be finished in a quarter of the time, possibly less. - - -``` -`$ libreoffice --headless --convert-to epub *.docx` -``` - -It's the little improvements that Linux encourages, not explicitly but implicitly, through its toolset and the ease with which you can customize your environment and workflow. - -### Abiword and Gnumeric - -Sometimes, a big office suite is exactly what you _don't_ need. If you prefer to keep your office work simple, you might do better with a lightweight and task-specific application. For instance, I mostly write articles in a text editor because I know all styles are discarded during conversion to HTML. But there are times when a word processor is useful, either to open a document someone has sent to me or because I want a quick and easy way to generate some nicely styled text. - -[Abiword][3] is a simple word processor with basic support for popular document formats and all the essential features you'd expect from a word processor. It isn't meant as a full office suite, and that's its best feature. While there's no such a thing as too many options, there definitely is such a thing as information overload, and that's exactly what a full office suite or word processor is sometimes guilty of. If you're looking to avoid that, then use something simple instead. - -Similarly, the [Gnumeric][4] project provides a simple spreadsheet application. Gnumeric avoids any features that aren't strictly necessary for a spreadsheet, so you still get a robust formula syntax, plenty of functions, and all the options you need for styling and manipulating cells. I don't do much with spreadsheets, so I find myself quite happy with Gnumeric on the rare occasions I need to review or process data in a ledger. - -### Pandoc - -It's possible to get even more minimal with specialized commands and document processors. The `pandoc` command specializes in document conversion. It's like the `libreoffice --headless` command, except with ten times the number of document formats to work with. You can even generate presentations with it! If part of your work is taking source text from one document and formatting it for several modes of delivery, then Pandoc is a necessity, and so you should [download our cheat sheet][5]. - -Broadly, Pandoc is representative of a completely different way of working. It gets you away from the confines of office applications. It separates you from trying to get your thoughts down into typed words and deciding what font those words ought to use, all at the same time. Working in plain text and then converting to all of your delivery targets afterward lets you work with any application you want, whether it's a notepad on your mobile device, a simple text editor on whatever computer you happen to be sitting in front of, or a text editor in the cloud. - -### Look for the alternatives - -There are lots of unexpected alternatives available for Linux. You can find them by taking a step back from what you're doing, analyzing your work process, assessing your required results, and investigating new applications that claim to do just the things you rely upon. - -Changing the tools you use, your workflow, and your daily routine can be disorienting, especially when you don't know exactly where it is you're looking to go. But the advantage to Linux is that you're afforded the opportunity to re-evaluate the assumptions you've subconsciously developed over years of computer usage. If you look hard enough for an answer, you'll eventually realize what the question was in the first place. And oftentimes, you'll end up appreciating what you learn. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/linux-workday - -作者:[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/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) -[2]: http://libreoffice.org -[3]: https://www.abisource.com -[4]: http://www.gnumeric.org -[5]: https://opensource.com/article/20/5/pandoc-cheat-sheet diff --git a/translated/tech/20210208 3 open source tools that make Linux the ideal workstation.md b/translated/tech/20210208 3 open source tools that make Linux the ideal workstation.md new file mode 100644 index 0000000000..0669873c8b --- /dev/null +++ b/translated/tech/20210208 3 open source tools that make Linux the ideal workstation.md @@ -0,0 +1,77 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (3 open source tools that make Linux the ideal workstation) +[#]: via: (https://opensource.com/article/21/2/linux-workday) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +让 Linux 成为理想的工作站的 3 个开源工具 +====== + +> Linux 不但拥有你认为所需的一切,还有可以让你高效工作的更多工具。 + +![使用笔记本电脑的人][1] + +在 2021 年,人们喜欢 Linux 的理由比以往任何时候都多。在这个系列中,我将分享 21 个使用 Linux 的不同理由。今天,我将与你分享为什么 Linux 是你工作的最佳选择。 + +每个人都希望在工作期间提高工作效率。如果你的工作通常涉及到文档、演示文稿和电子表格的工作,那么你可能已经习惯了一种特定的例行工作。问题是,这个*惯常的例行工作*通常是由一两个特定的应用程序决定的,无论是某个办公套件还是桌面操作系统。当然,一种习惯并不意味着它是理想的,然而它往往会毫无疑义地坚持下去,甚至影响到企业的运行结构。 + +### 更聪明地工作 + +如今,许多办公应用程序都在云端运行,因此如果你确实愿意,你可以在 Linux 上使用相同的方式。然而,由于许多典型的大名鼎鼎的办公应用程序并不符合 Linux 上的文化预期,因此你可能会发现自己受到启发,想去探索其他的选择。正如任何渴望走出“舒适区”的人所知道的那样,这种微妙的打破可能会出奇的有用。很多时候,你不知道自己效率低下,因为你实际上并没有尝试过以不同的方式做事。强迫自己去探索其他方式,而你永远不知道会发现什么。你甚至不必完全知道要寻找的内容。 + +### LibreOffice + +Linux(或任何其他平台)上最明显的开源办公主力之一是 [LibreOffice][2]。它具有多个组件,包括文字处理器、演示软件、电子表格、关系型数据库接口、矢量绘图等。它可以从其他流行的办公应用程序中导入许多文档格式,因此从其他工具过渡到 LibreOffice 通常很容易。 + +然而,LibreOffice 不仅仅是一个伟大的办公套件。LibreOffice 支持宏,所以机智的用户可以自动完成重复性任务。它还具有终端命令的功能,因此你可以在不启动 LibreOffice 界面的情况下执行许多任务。 + +想象一下,例如,打开 21 个文档,导航到**文件**菜单,到**导出**或**打印**菜单项,并将文件导出为 PDF 或 EPUB。这至少需要 84 次以上的点击,可能要花费一个小时的时间。比较一下,打开一个文档文件夹,并转换所有文件为 PDF 或 EPUB,只需要执行一个迅速的命令或菜单操作。转换将在后台运行,而你可以处理其他事情。只需要四分之一的时间,可能更少。 + +``` +$ libreoffice --headless --convert-to epub *.docx +``` + +这是一个小改进,是由 Linux 工具集和你可以自定义环境和工作流程的便利性所潜在带来的鼓励。 + +### Abiword 和 Gnumeric + +有时,你并不需要一个大而全的办公套件。如果你喜欢让办公室工作保持简单,你可能会更好地使用一个轻量级和针对特定任务的应用程序。例如,我大部分时间都是用文本编辑器写文章,因为我知道在转换为 HTML 的过程中,所有的样式都会被丢弃。但有些时候,文字处理器是很有用的,无论是打开别人发给我的文档,还是因为我想用一种快速简单的方法来生成一些样式漂亮的文本。 + +[Abiword][3] 是一款简单的文字处理器,它基本支持流行的文档格式,并具备你所期望的文字处理器的所有基本功能。它并不意味着是一个完整的办公套件,这是它最大的特点。虽然没有太多的选择,但绝对有信息过载这样的事情,而这正是一个完整的办公套件或文字处理器有时会犯的错误。如果你想避免这种情况,那就用一些简单的东西来代替。 + +同样,[Gnumeric][4] 项目提供了一个简单的电子表格应用程序。Gnumeric 避免了任何严格意义上的电子表格所不需要的功能,所以你仍然可以得到一个强大的公式语法、大量的函数,以及所有你需要的样式和操作单元格的选项。我不怎么使用电子表格,所以我发现自己在极少数需要查看或处理分类账中的数据时,对 Gnumeric 相当满意。 + +### Pandoc + +通过专门的命令和文件处理程序,可以得到更多的最小化。`pandoc` 命令专门用于文件转换。它就像 `libreoffice --headless` 命令一样,只是要处理的文档格式数量是它的十倍。你甚至可以用它来生成演示文稿! 如果你的部分工作是从一个文档中提取源文本,并将其格式化以用于多种传输模式,那么 Pandoc 是必要的,所以你应该[下载我们的攻略][5]看看。 + +广义上讲,Pandoc 代表的是一种完全不同的工作方式。它让你脱离了办公应用的束缚。它将你从试图将你的想法写成文字,并决定这些文字应该使用什么字体的工作中分离出来,同时。在纯文本中工作,然后转换为所有的交付目标,让你可以使用任何你想要的应用程序,无论是移动设备上的记事本,还是你碰巧坐在电脑前的简单文本编辑器,或者是云端的文本编辑器。 + +### 寻找替代品 + +Linux 有很多意想不到的替代品。你可以通过从你正在做的事情中退后一步,分析你的工作流程,评估你所需的结果,并调查那些声称可以做你所依赖的事情的新应用程序来找到它们。 + +改变你所使用的工具、你的工作流程和你的日常工作可能会让你迷失方向,特别是当你不知道你要找的到底是什么的时候。但 Linux 的优势在于,你有机会重新评估你在多年的计算机使用过程中潜意识里形成的假设。如果你足够努力地寻找答案,你最终会意识到问题的初衷是什么。而且很多时候,你最终会欣赏你学到的东西。 + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/linux-workday + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者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/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) +[2]: http://libreoffice.org +[3]: https://www.abisource.com +[4]: http://www.gnumeric.org +[5]: https://opensource.com/article/20/5/pandoc-cheat-sheet From 327f5f9bd5bd04f66cb30d42280e3a33d86c8126 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 17 Feb 2021 05:03:45 +0800 Subject: [PATCH 028/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210215=20?= =?UTF-8?q?Review=20of=20Five=20popular=20Hyperledger=20DLTs-=20Fabric,=20?= =?UTF-8?q?Besu,=20Sawtooth,=20Iroha=20and=20Indy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210215 Review of Five popular Hyperledger DLTs- Fabric, Besu, Sawtooth, Iroha and Indy.md --- ... Fabric, Besu, Sawtooth, Iroha and Indy.md | 224 ++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100644 sources/tech/20210215 Review of Five popular Hyperledger DLTs- Fabric, Besu, Sawtooth, Iroha and Indy.md diff --git a/sources/tech/20210215 Review of Five popular Hyperledger DLTs- Fabric, Besu, Sawtooth, Iroha and Indy.md b/sources/tech/20210215 Review of Five popular Hyperledger DLTs- Fabric, Besu, Sawtooth, Iroha and Indy.md new file mode 100644 index 0000000000..88c4fc7c51 --- /dev/null +++ b/sources/tech/20210215 Review of Five popular Hyperledger DLTs- Fabric, Besu, Sawtooth, Iroha and Indy.md @@ -0,0 +1,224 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Review of Five popular Hyperledger DLTs- Fabric, Besu, Sawtooth, Iroha and Indy) +[#]: via: (https://www.linux.com/news/review-of-five-popular-hyperledger-dlts-fabric-besu-sawtooth-iroha-and-indy/) +[#]: author: (Dan Brown https://training.linuxfoundation.org/announcements/review-of-five-popular-hyperledger-dlts-fabric-besu-sawtooth-iroha-and-indy/) + +Review of Five popular Hyperledger DLTs- Fabric, Besu, Sawtooth, Iroha and Indy +====== + +_by Matt Zand_ + +As companies are catching up in adopting blockchain technology, the choice of a private blockchain platform becomes very vital. Hyperledger, whose open source projects support/power more [enterprise blockchain use cases][1] than others, is currently leading the race of private Distributed Ledger Technology (DLT) implementation. Working from the assumption that you know how blockchain works and what is the design philosophy behind [Hyperledger’s ecosystem][2], in this article we will briefly review five active Hyperledger DLTs. In addition to DLTs discussed in this article, Hyperledger ecosystem has more supporting tools and libraries that I will cover in more detail in my future articles. + +This article mainly targets those who are relatively new to Hyperledger. This article would be a great resource for those interested in providing blockchain solution architect services and doing blockchain enterprise consulting and development. The materials included in this article will help you understand Hyperledger DLTs as a whole and use its high-level overview as a guideline for making the best of each Hyperledger project. + +Since Hyperledger is supported by a robust open source community, new projects are being added to the Hyperledger ecosystem regularly. At the time of this writing, Feb 2021, it consists of six active projects and 10 others which are at the incubation stage. Each project has unique features and advantages. + +**1- Hyperledger Fabric** + +[Hyperledger Fabric][3] is the most popular Hyperledger framework. Smart contracts (also known as **chaincode**) are written in [Golang][4] or JavaScript, and run in Docker containers. Fabric is known for its extensibility and allows enterprises to build distributed ledger networks on top of an established and successful architecture. A permissioned blockchain, initially contributed by IBM and Digital Asset,  Fabric is designed to be a foundation for developing applications or solutions with a modular architecture. It takes plugin components for providing functionalities such as consensus and membership services. Like Ethereum, Hyperledger Fabric can host and execute smart contracts, which are named chaincode. A Fabric network consists of peer nodes, which execute smart contracts (chaincode), query ledger data, validate transactions, and interact with applications. User-entered transactions are channeled to an ordering service component, which initially serves to be a consensus mechanism for Hyperledger Fabric. Special nodes called Orderer nodes validate the transactions, ensure the consistency of the blockchain, and send the validated transactions to the peers of the network as well as to membership service provider (MSP) services. + +Two major highlights of Hyperledger Fabric versus Ethereum are: + + * **Multi-ledger**: Each node on Ethereum has a replica of a single ledger in the network. However, Fabric nodes can carry multiple ledgers on each node, which is a great feature for enterprise applications. + * **Private Data**: In addition to a private channel feature, unlike with Ethereum, Fabric members within a consortium can exchange private data among themselves without disseminating them through Fabric channel, which is very useful for enterprise applications. + + + +[Here][5] is a good article for reviewing all Hyperledger Fabric components like peer, channel and, chaincode that are essential for building blockchain applications. In short, thorough understanding of all Hyperledger Fabric components is highly recommended for building, deploying and managing enterprise-level Hyperledger Fabric applications. + +**2- Hyperledger Besu** + +Hyperledger Besu is an open source Ethereum client developed under the Apache 2.0 license and written in Java. It can be run on the Ethereum public network or on private permissioned networks, as well as test networks such as Rinkeby, Ropsten, and Gorli. Hyperledger Besu supports several consensus algorithms including PoW, PoA, and IBFT, and has comprehensive permissioning schemes designed specifically for uses in a consortium environment. + +Hyperledger Besu implements the Enterprise Ethereum Alliance (EEA) specification. The EEA specification was established to create common interfaces amongst the various open and closed source projects within Ethereum, to ensure users do not have vendor lock-in, and to create standard interfaces for teams building applications. Besu implements enterprise features in alignment with the EEA client specification. + +As a basic Ethereum Client, Besu has the following features: + + * It connects to the blockchain network to synchronize blockchain transaction data or emit events to the network. + * It processes transactions through smart contracts in an Ethereum Virtual Machine (EVM) environment. + * It uses a data storage of networks (blocks). + * It publishes client API interfaces for developers to interact with the blockchain network. + + + +Besu implements [Proof of Work][6] and [Proof of Authority][7] (PoA) consensus mechanisms. Further, Hyperledger Besu implements several PoA protocols, including Clique and IBFT 2.0. + +Clique is a proof-of-authority blockchain consensus protocol. The blockchain runs Clique protocol maintaining the list of authorized signers. These approved signers directly mine and seal all blocks without mining. Therefore, the transaction task is computationally light. When creating a block, a miner collects and executes transactions, updates the network state with the calculated hash of the block and signs the block using his private key. By using a defined period of time to create a block, Clique can limit the number of processed transactions. + +IBFT 2.0 (Istanbul BFT 2.0) is a PoA **Byzantine-Fault-Tolerant** (**BFT**) blockchain consensus protocol. Transactions and blocks in the network are validated by authorized accounts, known as validators. Validators collect, validate and execute transactions and create the next block. Existing validators can propose and vote to add or remove validators and maintain a dynamic validator set. The consensus can ensure immediate finality. As the name suggests, IBFT 2.0 builds upon the IBFT blockchain consensus protocol with improved safety and liveness. In IBFT 2.0 blockchain, all valid blocks are directly added in the main chain and there are no forks. + +**3- Hyperledger Sawtooth** + +Sawtooth is the second Hyperledger project to reach 1.0 release maturity. Sawtooth-core is written in Python, while Sawtooth Raft and Sawtooth Sabre are written in Rust. It also has JavaScript and Golang components. Sawtooth supports both permissioned and permissionless deployments. It supports the EVM through a collaboration with the Hyperledger Burrow. By design, Hyperledger Sawtooth is created to address issues of performance. As such, one of its distinct features compared to other Hyperledger DLTs is that each node in Sawtooth can act as an orderer by validating and approving a transaction. Other notable features are: + + * **Parallel Transaction Execution**: While many blockchains use serial transaction execution to ensure consistent ordering at every node on the network, Sawtooth follows an advanced parallel scheduler that classifies transactions into parallel flows that eventually leads to the boost in transaction processing performance. + * **Separation of Application from Core**: Sawtooth simplifies the development and deployment of an application by separating the application level from the core system level. It offers smart contract abstraction to allow developers to create contract logic in the programming language of their choice. + * **Custom Transaction Processors**: In Sawtooth, each application can define the custom transaction processors to meet its unique requirements. It provides transaction families to serve as an approach for low-level functions, like storing on-chain permissions, managing chain-wide settings and for particular applications such as saving block information and performance analysis. + + + +**4- Hyperledger Iroha** + +Hyperledger Iroha is designed to target the creation and management of complex digital assets and identities. It is written in C++ and is user friendly. Iroha has a powerful role-based model for access control and supports complex analytics. While using Iroha for identity management, querying and performing commands are only limited to the participants who have access to the Iroha network. A robust permissions system ensures that all transactions are secure and controlled. Some of its highlights are: + + * **Ease of use:** You can easily create and manage simple, as well as complex, digital assets (e.g., cryptocurrency or personal medical data). + * **Built-in Smart Contracts:** You can easily integrate blockchain into a business process using built-in smart-contracts called “commands.” As such, developers need not to write complicated smart-contracts because they are available in the form of commands. + * **BFT:** Iroha uses BFT consensus algorithm which makes it suitable for businesses that require verifiable data consistency at a low cost. + + + +**5- Hyperledger Indy** + +As a self-sovereign identity management platform, Hyperledger Indy is built explicitly for decentralized identity management. The server portion, Indy node, is built in Python, while the Indy SDK is written in Rust. It offers tools and reusable components to manage digital identities on blockchains or other distributed ledgers. Hyperledger Indy architecture is well-suited for every application that requires heavy work on identity management since Indy is easily interpretable across multiple domains, organization silos and applications. As such, identities are securely stored and shared with all parties involved. Some notable highlights of Hyperledger Indy are: + +●        Identity Correlation-resistant: According to the Hyperledger Indy documentation, Indy is completely identity correlation-resistant. So, you do not need to worry about connecting or mixing one Id with another. That means, you can not connect two Ids or find two similar Ids in the ledger. + +●        Decentralized Identifiers (DIDs): According to the Hyperledger Indy documentation, all the decentralized identifiers are globally resolvable and unique without needing any central party in the mix. That means, every decentralized identity on the Indy platform will have a unique identifier that will solely belong to you. As a result, no one can claim or even use your identity on your behalf. So, it would eliminate the chances of identity theft. + +●        Zero-Knowledge Proofs: With help from Zero-Knowledge Proof, you can disclose only the information necessary without anything else. So, when you have to prove your credentials, you can only choose to release the information that you need depending on the party that is requesting it. For instance, you may choose to share your data of birth only with one party whereas to release your driver license and financial docs to another. In short, Indy gives users great flexibility in sharing their private data whenever and wherever needed. + +**Summary** + +In this article, we briefly reviewed five popular Hyperledger DLTs. We started off by going over Hyperledger Fabric and its main components and some of its highlights compared to public blockchain platforms like Ethereum. Even though Fabric is currently used heavily for supply chain management, if you are doing lots of specific works in supply chain domain, you should explore Hyperledger Grid too. Then, we moved on to learning how to use Hyperledger Besu for building public consortium blockchain applications that support multiple consensus algorithms and how to manage Besu from EVM. Next, we covered some highlights of Hyperledger Sawtooth such as how it is designed for high performance. For instance, we learned how a single node in Sawtooth can act as an orderer by approving and validating transactions in the network. The last two DLTs (Hyperledger Iroha and Indy) are specifically geared toward digital asset management and identity . So if you are working on a project that heavily uses identity management, you should explore and use either Iroha or Indy instead of Fabric. + +I have included reference and resource links for those interested in exploring topics discussed in this article in depth. + +For more references on all Hyperledger projects, libraries and tools, visit the below documentation links: + + 1. [Hyperledger Indy Project][8] + 2. [Hyperledger Fabric Project][9] + 3. [Hyperledger Aries Library][10] + 4. [Hyperledger Iroha Project][11] + 5. [Hyperledger Sawtooth Project][12] + 6. [Hyperledger Besu Project][13] + 7. [Hyperledger Quilt Library][14] + 8. [Hyperledger Ursa Library][15] + 9. [Hyperledger Transact Library][16] + 10. [Hyperledger Cactus Project][17] + 11. [Hyperledger Caliper Tool][18] + 12. [Hyperledger Cello Tool][19] + 13. [Hyperledger Explorer Tool][20] + 14. [Hyperledger Grid (Domain Specific)][21] + 15. [Hyperledger Burrow Project][22] + 16. [Hyperledger Avalon Tool][23] + + + +**Resources** + + * Free Training Courses from The Linux Foundation & Hyperledger + * [Blockchain: Understanding Its Uses and Implications (LFS170)][24] + * [Introduction to Hyperledger Blockchain Technologies (LFS171)][25] + * [Introduction to Hyperledger Sovereign Identity Blockchain Solutions: Indy, Aries & Ursa (LFS172)][26] + * [Becoming a Hyperledger Aries Developer (LFS173)][27] + * [Hyperledger Sawtooth for Application Developers (LFS174)][28] + * eLearning Courses from The Linux Foundation & Hyperledger + * [Hyperledger Fabric Administration (LFS272)][29] + * [Hyperledger Fabric for Developers (LFD272)][30] + * Certification Exams from The Linux Foundation & Hyperledger + * [Certified Hyperledger Fabric Administrator (CHFA)][31] + * [Certified Hyperledger Fabric Developer (CHFD)][32] + * [Hands-On Smart Contract Development with Hyperledger Fabric V2][33] Book by Matt Zand and others. + * [Essential Hyperledger Sawtooth Features for Enterprise Blockchain Developers][34] + * [Blockchain Developer Guide- How to Install Hyperledger Fabric on AWS][35] + * [Blockchain Developer Guide- How to Install and work with Hyperledger Sawtooth][36] + * [Intro to Blockchain Cybersecurity (Coding Bootcamps)][37] + * [Intro to Hyperledger Sawtooth for System Admins (Coding Bootcamps)][38] + * [Blockchain Developer Guide- How to Install Hyperledger Iroha on AWS][39] + * [Blockchain Developer Guide- How to Install Hyperledger Indy and Indy CLI on AWS][40] + * [Blockchain Developer Guide- How to Configure Hyperledger Sawtooth Validator and REST API on AWS][41] + * [Intro blockchain development with Hyperledger Fabric (Coding Bootcamps)][42] + * [How to build DApps with Hyperledger Fabric][43] + * [Blockchain Developer Guide- How to Build Transaction Processor as a Service and Python Egg for Hyperledger Sawtooth][44] + * [Blockchain Developer Guide- How to Create Cryptocurrency Using Hyperledger Iroha CLI][45] + * [Blockchain Developer Guide- How to Explore Hyperledger Indy Command Line Interface][46] + * [Blockchain Developer Guide- Comprehensive Blockchain Hyperledger Developer Guide from Beginner to Advance Level][47] + * [Blockchain Management in Hyperledger for System Admins][48] + * [Hyperledger Fabric for Developers (Coding Bootcamps)][49] + * [Free White Papers from Hyperledger][50] + * [Free Webinars from Hyperledger][51] + * [Hyperledger Wiki][52] + + + +**About the Author** + +**Matt Zand** is a serial entrepreneur and the founder of 3 tech startups: [DC Web Makers][53], [Coding Bootcamps][54] and [High School Technology Services][55]. He is a leading author of [Hands-on Smart Contract Development with Hyperledger Fabric][33] book by O’Reilly Media. He has written more than 100 technical articles and tutorials on blockchain development for Hyperledger, Ethereum and Corda R3 platforms. At DC Web Makers, he leads a team of blockchain experts for consulting and deploying enterprise decentralized applications. As chief architect, he has designed and developed blockchain courses and training programs for Coding Bootcamps. He has a master’s degree in business management from the University of Maryland. Prior to blockchain development and consulting, he worked as senior web and mobile App developer and consultant, angel investor, business advisor for a few startup companies. You can connect with him on LI: + +The post [Review of Five popular Hyperledger DLTs- Fabric, Besu, Sawtooth, Iroha and Indy][56] appeared first on [Linux Foundation – Training][57]. + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/review-of-five-popular-hyperledger-dlts-fabric-besu-sawtooth-iroha-and-indy/ + +作者:[Dan Brown][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://training.linuxfoundation.org/announcements/review-of-five-popular-hyperledger-dlts-fabric-besu-sawtooth-iroha-and-indy/ +[b]: https://github.com/lujun9972 +[1]: https://blockchain.dcwebmakers.com/blog/comprehensive-overview-and-analysis-of-blockchain-use-cases-in-many-industries.html +[2]: https://weg2g.com/application/touchstonewords/article-intro-to-hyperledger-family-and-hyperledger-blockchain-ecosystem.php +[3]: https://learn.coding-bootcamps.com/blog/202224/why-build-blockchain-applications-with-hyperledger-fabric +[4]: https://learn.coding-bootcamps.com/p/learn-go-programming-language-by-examples +[5]: https://coding-bootcamps.com/blog/review-of-hyperledger-fabric-architecture-and-components.html +[6]: https://coding-bootcamps.com/blog/how-proof-of-work-consensus-works-in-blockchain.html +[7]: https://coding-bootcamps.com/blog/how-proof-of-stake-consensus-works-in-blockchain.html +[8]: https://www.hyperledger.org/use/hyperledger-indy +[9]: https://www.hyperledger.org/use/fabric +[10]: https://www.hyperledger.org/projects/aries +[11]: https://www.hyperledger.org/projects/iroha +[12]: https://www.hyperledger.org/projects/sawtooth +[13]: https://www.hyperledger.org/projects/besu +[14]: https://www.hyperledger.org/projects/quilt +[15]: https://www.hyperledger.org/projects/ursa +[16]: https://www.hyperledger.org/projects/transact +[17]: https://www.hyperledger.org/projects/cactus +[18]: https://www.hyperledger.org/projects/caliper +[19]: https://www.hyperledger.org/projects/cello +[20]: https://www.hyperledger.org/projects/explorer +[21]: https://www.hyperledger.org/projects/grid +[22]: https://www.hyperledger.org/projects/hyperledger-burrow +[23]: https://www.hyperledger.org/projects/avalon +[24]: https://training.linuxfoundation.org/training/blockchain-understanding-its-uses-and-implications/ +[25]: https://training.linuxfoundation.org/training/blockchain-for-business-an-introduction-to-hyperledger-technologies/ +[26]: https://training.linuxfoundation.org/training/introduction-to-hyperledger-sovereign-identity-blockchain-solutions-indy-aries-and-ursa/ +[27]: https://training.linuxfoundation.org/training/becoming-a-hyperledger-aries-developer-lfs173/ +[28]: https://training.linuxfoundation.org/training/hyperledger-sawtooth-application-developers-lfs174/ +[29]: https://training.linuxfoundation.org/training/hyperledger-fabric-administration-lfs272/ +[30]: https://training.linuxfoundation.org/training/hyperledger-fabric-for-developers-lfd272/ +[31]: https://training.linuxfoundation.org/certification/certified-hyperledger-fabric-administrator-chfa/ +[32]: https://training.linuxfoundation.org/certification/certified-hyperledger-fabric-developer/ +[33]: https://www.oreilly.com/library/view/hands-on-smart-contract/9781492086116/ +[34]: https://weg2g.com/application/touchstonewords/article-essential-hyperledger-sawtooth-features-for-enterprise-blockchain-developers.php +[35]: https://myhsts.org/tutorial-learn-how-to-install-blockchain-hyperledger-fabric-on-amazon-web-services.php +[36]: https://myhsts.org/tutorial-learn-how-to-install-and-work-with-blockchain-hyperledger-sawtooth.php +[37]: https://learn.coding-bootcamps.com/p/learn-how-to-secure-blockchain-applications-by-examples +[38]: https://learn.coding-bootcamps.com/p/introduction-to-hyperledger-sawtooth-for-system-admins +[39]: https://myhsts.org/tutorial-learn-how-to-install-blockchain-hyperledger-iroha-on-amazon-web-services.php +[40]: https://myhsts.org/tutorial-learn-how-to-install-blockchain-hyperledger-indy-on-amazon-web-services.php +[41]: https://myhsts.org/tutorial-learn-how-to-configure-hyperledger-sawtooth-validator-and-rest-api-on-aws.php +[42]: https://learn.coding-bootcamps.com/p/live-and-self-paced-blockchain-development-with-hyperledger-fabric +[43]: https://learn.coding-bootcamps.com/p/live-crash-course-for-building-dapps-with-hyperledger-fabric +[44]: https://myhsts.org/tutorial-learn-how-to-build-transaction-processor-as-a-service-and-python-egg-for-hyperledger-sawtooth.php +[45]: https://myhsts.org/tutorial-learn-how-to-work-with-hyperledger-iroha-cli-to-create-cryptocurrency.php +[46]: https://myhsts.org/tutorial-learn-how-to-work-with-hyperledger-indy-command-line-interface.php +[47]: https://myhsts.org/tutorial-comprehensive-blockchain-hyperledger-developer-guide-for-all-professional-programmers.php +[48]: https://learn.coding-bootcamps.com/p/learn-blockchain-development-with-hyperledger-by-examples +[49]: https://learn.coding-bootcamps.com/p/hyperledger-blockchain-development-for-developers +[50]: https://www.hyperledger.org/learn/white-papers +[51]: https://www.hyperledger.org/learn/webinars +[52]: https://wiki.hyperledger.org/ +[53]: https://blockchain.dcwebmakers.com/ +[54]: http://coding-bootcamps.com/ +[55]: https://myhsts.org/ +[56]: https://training.linuxfoundation.org/announcements/review-of-five-popular-hyperledger-dlts-fabric-besu-sawtooth-iroha-and-indy/ +[57]: https://training.linuxfoundation.org/ From 34f1cba8596b52874d0d8a583572cac400b34488 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 17 Feb 2021 09:13:30 +0800 Subject: [PATCH 029/818] APL --- .../tech/20210215 A practical guide to JavaScript closures.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210215 A practical guide to JavaScript closures.md b/sources/tech/20210215 A practical guide to JavaScript closures.md index 46f5d19c0f..58e2ff2e3c 100644 --- a/sources/tech/20210215 A practical guide to JavaScript closures.md +++ b/sources/tech/20210215 A practical guide to JavaScript closures.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 92da32c65840f2f51c816281a811e7f8e0e9c2a2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 17 Feb 2021 10:23:15 +0800 Subject: [PATCH 030/818] TSL --- ... practical guide to JavaScript closures.md | 144 ------------------ ... practical guide to JavaScript closures.md | 136 +++++++++++++++++ 2 files changed, 136 insertions(+), 144 deletions(-) delete mode 100644 sources/tech/20210215 A practical guide to JavaScript closures.md create mode 100644 translated/tech/20210215 A practical guide to JavaScript closures.md diff --git a/sources/tech/20210215 A practical guide to JavaScript closures.md b/sources/tech/20210215 A practical guide to JavaScript closures.md deleted file mode 100644 index 58e2ff2e3c..0000000000 --- a/sources/tech/20210215 A practical guide to JavaScript closures.md +++ /dev/null @@ -1,144 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (A practical guide to JavaScript closures) -[#]: via: (https://opensource.com/article/21/2/javascript-closures) -[#]: author: (Nimisha Mukherjee https://opensource.com/users/nimisha) - -A practical guide to JavaScript closures -====== -Get a better understanding of how JavaScript code works and executes by -diving into one of the advanced concept: closures. -![Woman programming][1] - -In [_4 reasons why JavaScript is so popular_][2], I touched on a few advanced JavaScript concepts. In this article, I will dive into one of them: closures. - -According to [Mozilla Developer Network][3] (MDN), "A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment)." Simplified, this means that a function inside another function can access the variables from the outer (parent) function. - -To better understand closures, take a look at scopes and their execution context. - -Here is a simple code snippet: - - -``` -var hello = "Hello"; - -function sayHelloWorld() { -var world = "World"; -        function wish() { -                var year = "2021"; -                console.log(hello + " " + world + " "+ year); -} -wish(); -} -sayHelloWorld(); -``` - -Here's the execution context for this code:  - -![Execution context for JS code][4] - -(Nimisha Mukherjee, [CC BY-SA 4.0][5]) - -Closures are created every time a function is created (at function-creation time). Every closure has three scopes: - - * Local scope (own scope) - * Outer functions scope - * Global scope - - - -I'll modify the above code slightly to demonstrate closure: - - -``` -var hello = "Hello"; - -var sayHelloWorld = function() { -var world = "World"; -        function wish() { -                var year = "2021"; -                console.log(hello + " " + world + " "+ year); -} -return wish; -} -var callFunc = sayHelloWorld(); -callFunc(); -``` - -The inner function `wish()` is returned from the outer function before it's executed. This happens because functions in JavaScript form **closures**. - - * `callFunc` holds a reference to the function `wish` when `sayHelloWorld` runs - * `wish` maintains a reference to its surrounding (lexical) environment where the variable `world` exists. - - - -### Private variables and methods - -Natively, JavaScript does not support the creation of private variables and methods. A common and practical use of closure is to emulate private variables and methods and allow data privacy. Methods defined within the closure scope are privileged. - -This code snippet captures how closures are commonly written and used in JavaScript: - - -``` -var resourceRecord = function(myName, myAddress) { - var resourceName = myName; - var resourceAddress = myAddress; - var accessRight = "HR"; - return { -   changeName: function(updateName, privilege) { -     //only HR can change the name -     if(privilege === accessRight ) { -       resourceName = updateName; -       return true; -     } else { -       return false; -     } -   },   -   changeAddress: function(newAddress) { -     //any associate can change the address -     resourceAddress = newAddress;           -   },   -   showResourceDetail: function() { -     console.log ("Name:" + resourceName + " ; Address:" + resourceAddress); -   } - } -} -//Create first record -var resourceRecord1 = resourceRecord("Perry","Office"); -//Create second record -var resourceRecord2 = resourceRecord("Emma","Office"); -//Change the address on the first record -resourceRecord1.changeAddress("Home"); -resourceRecord1.changeName("Perry Berry", "Associate"); //Output is false as only an HR can change the name -resourceRecord2.changeName("Emma Freeman", "HR"); //Output is true as HR changes the name -resourceRecord1.showResourceDetail(); //Output - Name:Perry ; Address:Home -resourceRecord2.showResourceDetail(); //Output - Name:Emma Freeman ; Address:Office -``` - -The resource records (`resourceRecord1` and `resourceRecord2`) are independent of one another. Each closure references a different version of the `resourceName` and `resourceAddress` variable through its own closure. You can also apply specific rules to how private variables need to be handled—I added a check on who can modify `resourceName`. - -### Use closures - -Understanding closure is important, as it enables deeper knowledge of how variables and functions relate to one another and how JavaScript code works and executes. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/javascript-closures - -作者:[Nimisha Mukherjee][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/nimisha -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/programming-code-keyboard-laptop-music-headphones.png?itok=EQZ2WKzy (Woman programming) -[2]: https://opensource.com/article/20/11/javascript-popular -[3]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures -[4]: https://opensource.com/sites/default/files/uploads/execution-context.png (Execution context for JS code) -[5]: https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/translated/tech/20210215 A practical guide to JavaScript closures.md b/translated/tech/20210215 A practical guide to JavaScript closures.md new file mode 100644 index 0000000000..094da3e089 --- /dev/null +++ b/translated/tech/20210215 A practical guide to JavaScript closures.md @@ -0,0 +1,136 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (A practical guide to JavaScript closures) +[#]: via: (https://opensource.com/article/21/2/javascript-closures) +[#]: author: (Nimisha Mukherjee https://opensource.com/users/nimisha) + +JavaScript 闭包实践 +====== + +> 通过深入了解 JavaScript 的高级概念之一:闭包,更好地理解 JavaScript 代码的工作和执行方式。 + +![女性编程][1] + +在《[JavaScript 如此受欢迎的 4 个原因][2]》中,我提到了一些高级 JavaScript 概念。在本文中,我将深入探讨其中的一个概念:闭包closure。 + +根据 [Mozilla 开发者网络][3](MDN),“闭包是将一个函数和对其周围的状态(词法环境)的引用捆绑在一起(封闭)的组合。”简而言之,这意味着在一个函数内部的函数可以访问其外部(父)函数的变量。 + +为了更好地理解闭包,可以看看作用域及其执行上下文。 + +下面是一个简单的代码片段: + +``` +var hello = "Hello"; + +function sayHelloWorld() { + var world = "World"; +    function wish() { +        var year = "2021"; +        console.log(hello + " " + world + " "+ year); + } + wish(); +} +sayHelloWorld(); +``` + +下面是这段代码的执行上下文: + +![JS 代码的执行上下文][4] + +每次创建函数时(在函数创建阶段)都会创建闭包。每个闭包有三个作用域。 + + * 本地作用域(自己的作用域) + * 外部函数范围 + * 全局范围 + +我稍微修改一下上面的代码来演示一下闭包: + +``` +var hello = "Hello"; + +var sayHelloWorld = function() { + var world = "World"; +    function wish() { +        var year = "2021"; +        console.log(hello + " " + world + " "+ year); + } + return wish; +} +var callFunc = sayHelloWorld(); +callFunc(); +``` + +内部函数 `wish()` 在执行之前就从外部函数返回。这是因为 JavaScript 中的函数形成了**闭包**。 + + * 当 `sayHelloWorld` 运行时,`callFunc` 持有对函数 `wish` 的引用。 + * `wish` 保持对其周围(词法)环境的引用,其中存在变量 `world`。 + +### 私有变量和方法 + +本身,JavaScript 不支持创建私有变量和方法。闭包的一个常见和实用的用途是模拟私有变量和方法,并允许数据隐私。在闭包范围内定义的方法是有特权的。 + +这个代码片段捕捉了 JavaScript 中闭包的常用编写和使用方式: + +``` +var resourceRecord = function(myName, myAddress) { +  var resourceName = myName; +  var resourceAddress = myAddress; +  var accessRight = "HR"; +  return { +    changeName: function(updateName, privilege) { +      // only HR can change the name +      if (privilege === accessRight ) { +        resourceName = updateName; +        return true; +      } else { +        return false; +      } +    },   +    changeAddress: function(newAddress) { +      // any associate can change the address +      resourceAddress = newAddress;           +    },   +    showResourceDetail: function() { +      console.log ("Name:" + resourceName + " ; Address:" + resourceAddress); +    } +  } +} +// Create first record +var resourceRecord1 = resourceRecord("Perry","Office"); +// Create second record +var resourceRecord2 = resourceRecord("Emma","Office"); +// Change the address on the first record +resourceRecord1.changeAddress("Home"); +resourceRecord1.changeName("Perry Berry", "Associate"); // Output is false as only an HR can change the name +resourceRecord2.changeName("Emma Freeman", "HR"); // Output is true as HR changes the name +resourceRecord1.showResourceDetail(); // Output - Name:Perry ; Address:Home +resourceRecord2.showResourceDetail(); // Output - Name:Emma Freeman ; Address:Office +``` + +资源记录(`resourceRecord1` 和 `resourceRecord2`)相互独立。每个闭包通过自己的闭包引用不同版本的 `resourceName` 和 `resourceAddress` 变量。你也可以应用特定的规则来处理私有变量,我添加了一个谁可以修改 `resourceName` 的检查。 + +### 使用闭包 + +理解闭包是很重要的,因为它可以更深入地了解变量和函数之间的关系,以及 JavaScript 代码如何工作和执行。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/javascript-closures + +作者:[Nimisha Mukherjee][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/nimisha +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/programming-code-keyboard-laptop-music-headphones.png?itok=EQZ2WKzy (Woman programming) +[2]: https://linux.cn/article-12830-1.html +[3]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures +[4]: https://opensource.com/sites/default/files/uploads/execution-context.png (Execution context for JS code) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ From 0d3ab2cd0de7a84111b8f2099dc0c2e5e26250f4 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 17 Feb 2021 12:22:13 +0800 Subject: [PATCH 031/818] PRF @MjSeven --- ...reate and Manage Archive Files in Linux.md | 159 ++++++++++-------- 1 file changed, 93 insertions(+), 66 deletions(-) diff --git a/translated/tech/20210115 How to Create and Manage Archive Files in Linux.md b/translated/tech/20210115 How to Create and Manage Archive Files in Linux.md index 56f30af5a1..5f1f1e72a0 100644 --- a/translated/tech/20210115 How to Create and Manage Archive Files in Linux.md +++ b/translated/tech/20210115 How to Create and Manage Archive Files in Linux.md @@ -1,148 +1,179 @@ [#]: collector: "lujun9972" [#]: translator: "MjSeven" -[#]: reviewer: " " +[#]: reviewer: "wxy" [#]: publisher: " " [#]: url: " " [#]: subject: "How to Create and Manage Archive Files in Linux" -[#]: via: "https://www.linux.com/news/how-to-create-and-manage-archive-files-in-linux-2/" -[#]: author: "LF Training https://training.linuxfoundation.org/announcements/how-to-create-and-manage-archive-files-in-linux/" +[#]: via: "https://training.linuxfoundation.org/announcements/how-to-create-and-manage-archive-files-in-linux/" +[#]: author: "Matt Zand,Kevin Downs https://training.linuxfoundation.org/announcements/how-to-create-and-manage-archive-files-in-linux/" 如何在 Linux 中创建和管理归档文件 ====== -_由 Matt Zand 和 Kevin Downs 联合写作_ +![](https://img.linux.net.cn/data/attachment/album/202102/17/121000c7282pf7mv2sc78m.jpg) -简而言之,归档是一个包含一系列文件和(或)目录的单一文件。归档文件通常用于在本地或互联网上传输,或成为一个一系列文件和目录的备份副本,从而允许你使用一个文件来工作(如果压缩,则其大小会小于所有文件的总和)。同样的,归档也用于软件应用程序打包。为了方便传输,可以很容易地压缩这个单一文件,而存档中的文件会保留原始结构和权限。 +简而言之,归档是一个包含一系列文件和(或)目录的单一文件。归档文件通常用于在本地或互联网上传输,或作为一个一系列文件和目录的备份副本,从而允许你使用一个文件来工作(如果压缩,则其大小会小于所有文件的总和)。同样的,归档也用于软件应用程序打包。为了方便传输,可以很容易地压缩这个单一文件,而存档中的文件会保留原始结构和权限。 -我们可以使用 tar 工具来创建、列出和提取归档中的文件。用 tar 生成的归档通常称为“tar 文件”、“tar 归档”或者“压缩包”(因为所有已归档的文件被合成了一个文件)。 +我们可以使用 `tar` 工具来创建、列出和提取归档中的文件。用 `tar` 生成的归档通常称为“tar 文件”、“tar 归档”或者“压缩包”(因为所有已归档的文件被合成了一个文件)。 -本教程会展示如何使用 tar 创建、列出和提取归档中的内容。这三个操作都会使用两个公共选项 "-f" 和 "-v":使用 "-f" 指定归档文件的名称,使用 "-v"("verbose") 选项使 tar 在处理文件时输出文件名。虽然 "-v" 选项不是必需的,但是它可以让你观察 tar 操作的过程。 +本教程会展示如何使用 `tar` 创建、列出和提取归档中的内容。这三个操作都会使用两个公共选项 `-f` 和 `-v`:使用 `-f` 指定归档文件的名称,使用 `-v`(“冗余”)选项使 `tar` 在处理文件时输出文件名。虽然 `-v` 选项不是必需的,但是它可以让你观察 `tar` 操作的过程。 -在本教程的剩余部分中,会涵盖 3 个主题:1、创建一个归档文件;2、列出归档文件内容;3、提取归档文件内容。另外我们会回答通过调查与归档文件管理的 6 个实际问题来结束本教程。你从本教程学到的内容对于执行与[网络安全][1]和[云技术][2]相关的任务至关重要。 +在本教程的下面部分中,会涵盖 3 个主题:1、创建一个归档文件;2、列出归档文件内容;3、提取归档文件内容。另外我们会回答归档文件管理的 6 个实际问题来结束本教程。你从本教程学到的内容对于执行与[网络安全][1]和[云技术][2]相关的任务至关重要。 -### 1- 创建一个归档文件 +### 1、创建一个归档文件 -要使用 tar 创建一个归档文件,使用 "-c"("create") 选项,然后用 "-f" 选项指定要创建的归档文件名。通常的做法是使用带有 ".tar" 扩展名的名称,例如 "my-backup.tar"。注意,除非另有特别说明,否则本文其余部分中使用的所有命令和参数都以小写形式使用。记住,在你的终端上输入本文的命令时,无需输入每个命令行开头的 $ 提示符。 +要使用 `tar` 创建一个归档文件,使用 `-c`(“创建”)选项,然后用 `-f` 选项指定要创建的归档文件名。通常的做法是使用带有 `.tar` 扩展名的名称,例如 `my-backup.tar`。注意,除非另有特别说明,否则本文其余部分中使用的所有命令和参数都以小写形式使用。记住,在你的终端上输入本文的命令时,无需输入每个命令行开头的 `$` 提示符。 输入要归档的文件名作为参数;如果要创建一个包含所有文件及其子目录的归档文件,提供目录名称作为参数。 -要归档 "project" 目录内容,输入 +要归档 `project` 目录内容,输入: -$ _tar -cvf project.tar project_ +``` +$ tar -cvf project.tar project +``` -这个命令将创建一个名为 "project.tar" 的归档文件,包含 "project" 目录的所有内容,而原目录 "project" 将保持不变。 +这个命令将创建一个名为 `project.tar` 的归档文件,包含 `project` 目录的所有内容,而原目录 `project` 将保持不变。 -使用 "-z" 选项可以对归档文件进行压缩,这样产生的输出与创建未压缩的存档然后用 gzip 压缩是一样的,但它省去了额外的步骤。 +使用 `-z` 选项可以对归档文件进行压缩,这样产生的输出与创建未压缩的存档然后用 `gzip` 压缩是一样的,但它省去了额外的步骤。 -要从 "project" 目录创建一个 "project.tar.gz" 的压缩包,输入: +要从 `project` 目录创建一个 `project.tar.gz` 的压缩包,输入: -$ _tar -zcvf project.tar.gz project_ +``` +$ tar -zcvf project.tar.gz project +``` -这个命令将创建一个 "project.tar.gz" 的压缩包,包含 "project" 目录的所有内容,而原目录 "project" 将保持不变。 +这个命令将创建一个 `project.tar.gz` 的压缩包,包含 `project` 目录的所有内容,而原目录 `project` 将保持不变。 -**注意:**在使用 "-z" 选项时,你应该使用 ".tar.gz" 扩展名而不是 ".tar" 扩展名,这样表示已压缩。虽然不是必须的,但这是一个很好的实践。 +**注意:** 在使用 `-z` 选项时,你应该使用 `.tar.gz` 扩展名而不是 `.tar` 扩展名,这样表示已压缩。虽然不是必须的,但这是一个很好的实践。 -Gzip 不是唯一的压缩形式,还有 bzip2 和 xz。当我们看到扩展名为 xz 的文件时,我们知道该文件是使用 xz 压缩的,扩展名为 .bz2 的文件是用 bzip2 压缩的。随着 bzip2 不再维护,我们将远离它而关注 xz。使用 xz 压缩时,需要花费更长的时间。然而,等待通常是值得的,因为压缩效果要好的多,这意味着压缩包通常比使用其它压缩形式要小。更好的是,不同压缩形式之间的解压缩或提取文件并没有太大区别。下面我们将看到一个使用 tar 压缩文件时如何使用 xz 的示例: +gzip 不是唯一的压缩形式,还有 bzip2 和 xz。当我们看到扩展名为 `.xz` 的文件时,我们知道该文件是使用 `xz` 压缩的,扩展名为 `.bz2` 的文件是用 `bzip2` 压缩的。随着 bzip2 不再维护,我们将远离它而关注 xz。使用 `xz` 压缩时,需要花费更长的时间。然而,等待通常是值得的,因为压缩效果要好的多,这意味着压缩包通常比使用其它压缩形式要小。更好的是,不同压缩形式之间的解压缩或提取文件并没有太大区别。下面我们将看到一个使用 `tar` 压缩文件时如何使用 xz 的示例: -  $ _tar -Jcvf project.tar.xz project_ +``` +$ tar -Jcvf project.tar.xz project +``` -我们只需将 gzip 的 -z 选项转换为 xz 的大写 -J 即可。以下是一些输出,显示压缩形式之间的差异: +我们只需将 `gzip` 的 `-z` 选项转换为 `xz` 的大写 `-J` 即可。以下是一些输出,显示压缩形式之间的差异: ![][3] ![][4] -如你所见,zx 的压缩时间最长。但是,它在减小文件大小方面做的最好,所以值得等待。文件越大,压缩效果也越好。 +如你所见,`xz` 的压缩时间最长。但是,它在减小文件大小方面做的最好,所以值得等待。文件越大,压缩效果也越好。 -### 2- 列出归档文件的内容 +### 2、列出归档文件的内容 -要列出 tar 归档文件的内容但不提取,使用 "-t" 选项。 +要列出 tar 归档文件的内容但不提取,使用 `-t` 选项。 -要列出 "project.tar" 的内容,输入: +要列出 `project.tar` 的内容,输入: -$ _tar -tvf project.tar_ * * +``` +$ tar -tvf project.tar +``` -这个命令列出了 "project.tar" 归档的内容。"-v" 和 "-t" 选项一起使用会输出每个文件的权限和修改时间,以及文件名。这与 ls 命令使用 "-l" 选项时使用的格式相同。 +这个命令列出了 `project.tar` 归档的内容。`-v` 和 `-t` 选项一起使用会输出每个文件的权限和修改时间,以及文件名。这与 `ls` 命令使用 `-l` 选项时使用的格式相同。 -要列出 "project.tar.gz" 压缩包的内容,输入: +要列出 `project.tar.gz` 压缩包的内容,输入: -$ _tar -tvf project.tar_ +``` +$ tar -tzvf project.tar.gz +``` -### 3- 从归档中提取内容 +### 3、从归档中提取内容 -要提取(解压)tar 归档文件中的内容,使用 "-x"("extract") 选项。 +要提取(解压)tar 归档文件中的内容,使用 `-x`(“提取”)选项。 -要提取 "project.tar" 归档的内容,输入: +要提取 `project.tar` 归档的内容,输入: -$ _tar -xvf project.tar_ +``` +$ tar -xvf project.tar +``` -这个命令会将 "project.tar" 归档的内容提取到当前目录。 +这个命令会将 `project.tar` 归档的内容提取到当前目录。 -如果一个归档文件被压缩,通常来说它的扩展名为 ".tar.gz" 或 ".tgz",包括 "-z" 选项。 +如果一个归档文件被压缩,通常来说它的扩展名为 `.tar.gz` 或 `.tgz`,请包括 "-z" 选项。 -要提取 "project.tar.gz" 压缩包的内容,输入: +要提取 `project.tar.gz` 压缩包的内容,输入: -$ _tar -zxvf project.tar.gz_ +``` +$ tar -zxvf project.tar.gz +``` -**注意**:如果当前目录中有文件或子目录与归档文件中的内容同名,那么在提取归档文件时,这些文件或子目录将被覆盖。如果你不知道归档中包含哪些文件,请考虑先查看归档文件的内容。 +**注意**: 如果当前目录中有文件或子目录与归档文件中的内容同名,那么在提取归档文件时,这些文件或子目录将被覆盖。如果你不知道归档中包含哪些文件,请考虑先查看归档文件的内容。 在提取归档内容之前列出其内容的另一个原因是,确定归档中的内容是否包含在目录中。如果没有,而当前目录中包含许多不相关的文件,那么你可能将它们与归档中提取的文件混淆。 要将文件提取到它们自己的目录中,新建一个目录,将归档文件移到该目录,然后你就可以在新目录中提取文件。 +### FAQ + 现在我们已经学习了如何创建归档文件并列出和提取其内容,接下来我们可以继续讨论 Linux 专业人员经常被问到的 9 个实用问题。 - * 可以在不解压缩的情况下添加内容到压缩包中吗? +#### 可以在不解压缩的情况下添加内容到压缩包中吗? 很不幸,一旦文件将被压缩,就无法向其添加内容。你需要解压缩或提取其内容,然后编辑或添加内容,最后再次压缩文件。如果文件很小,这个过程不会花费很长时间,否则请等待一会。 - * 可以在不解压缩的情况下删除归档文件中的内容吗? +#### 可以在不解压缩的情况下删除归档文件中的内容吗? -这取决压缩时使用的 tar 版本。较新版本的 tar 支持 -delete 选项。 +这取决压缩时使用的 tar 版本。较新版本的 `tar` 支持 `-delete` 选项。 -例如,假设归档文件中有 file1 和 file2,可以使用以下命令将它们从 file.tar 中删除: +例如,假设归档文件中有 `file1` 和 `file2`,可以使用以下命令将它们从 `file.tar` 中删除: -_$ tar -vf file.tar –delete file1 file2_ -删除目录 dir1: +``` +$ tar -vf file.tar –delete file1 file2 +``` -_$ tar -f file.tar –delete dir1/*_ +删除目录 `dir1`: - * 压缩和归档之间有什么区别? +``` +$ tar -f file.tar –delete dir1/* +``` + +#### 压缩和归档之间有什么区别? 查看归档和压缩之间差异最简单的方法是查看其解压大小。归档文件时,会将多个文件合并为一个。所以,如果我们归档 10 个 100kb 文件,则最终会得到一个 100kb 大小的文件。而如果压缩这些文件,则最终可能得到一个只有几 kb 或接近 100kb 的文件。 - * 如何压缩归档文件? +#### 如何压缩归档文件? -如上所说,你可以使用带有 cvf 选项的 tar 目录来创建和归档文件。要压缩归档文件,有两个选择:通过压缩程序(例如 gzip)运行归档文件,或在使用 tar 命令时使用压缩选项。最常见的压缩标志 -z 表示 gzip,-j 表示 bzip,-J 表示 xz。例如: +如上所说,你可以使用带有 `cvf` 选项的 `tar` 命令来创建和归档文件。要压缩归档文件,有两个选择:通过压缩程序(例如 `gzip`)运行归档文件,或在使用 `tar` 命令时使用压缩选项。最常见的压缩标志 `-z` 表示 `gzip`,`-j` 表示 `bzip`,`-J` 表示 `xz`。例如: -_$ gzip file.tar_ +``` +$ gzip file.tar +``` -或者,我们可以在使用 tar 命令时使用压缩标志,以下命令使用 gzip 标志 "z": +或者,我们可以在使用 `tar` 命令时使用压缩标志,以下命令使用 `gzip` 标志 `z`: -_$ tar -cvzf file.tar /some/directory_ +``` +$ tar -cvzf file.tar /some/directory +``` - * 如何一次创建多个目录和/或文件的归档? +#### 如何一次创建多个目录和/或文件的归档? 一次要归档多个文件,这种情况并不少见。一次归档多个文件和目录并不像你想的那么难,你只需要提供多个文件或目录作为 tar 的参数即可: -_$ tar -cvzf file.tar file1 file2 file3_ +``` +$ tar -cvzf file.tar file1 file2 file3 +``` 或者 -_$ tar -cvzf file.tar /some/directory1 /some/directory2_ +``` +$ tar -cvzf file.tar /some/directory1 /some/directory2 +``` - * 创建归档时如何跳过目录和/或文件? +#### 创建归档时如何跳过目录和/或文件? -你可能会遇到这样的情况:要归档一个目录或文件,但不是所有文件,这种情况下可以使用 --exclude 选项: +你可能会遇到这样的情况:要归档一个目录或文件,但不是所有文件,这种情况下可以使用 `--exclude` 选项: -_$ tar –exclude ‘/some/directory’ -cvf file.tar /home/user_ +``` +$ tar –exclude ‘/some/directory’ -cvf file.tar /home/user +``` -在示例中,/home/user 目录中除了 /some/directory 之外都将被归档。将 -exclude 选项放在源和目标之前,并用单引号将要排除的文件或目录引起来,这一点很重要。 +在示例中,`/home/user` 目录中除了 `/some/directory` 之外都将被归档。将 `--exclude` 选项放在源和目标之前,并用单引号将要排除的文件或目录引起来,这一点很重要。 ### 总结 -tar 命令对展示不需要的文件创建备份或压缩文件很有用。在更改文件之前备份它们是一个很好的做法。如果某些东西在更改后没有按预期正常工作,你始终可以还原到旧文件。压缩不再使用的文件有助于保持系统干净,并降低磁盘空间使用率。还有其它实用程序可以归档或压缩,但是 tar 因其多功能、易用性和受欢迎程度而独占鳌头。 +`tar` 命令对展示不需要的文件创建备份或压缩文件很有用。在更改文件之前备份它们是一个很好的做法。如果某些东西在更改后没有按预期正常工作,你始终可以还原到旧文件。压缩不再使用的文件有助于保持系统干净,并降低磁盘空间使用率。还有其它实用程序可以归档或压缩,但是 `tar` 因其多功能、易用性和受欢迎程度而独占鳌头。 ### 资源 @@ -157,15 +188,11 @@ tar 命令对展示不需要的文件创建备份或压缩文件很有用。在 * [Linux 系统管理指南 - 监控 Linux 的最佳实践][11] * [Linux 系统管理指南 - Linux 启动和关闭的最佳实践][12] - - ### 关于作者 -**Matt Zand** 是一位创业者,也是 3 家科技创业公司的创始人: [DC Web Makers][13]、[Coding Bootcamps][14] 和 [High School Technology Services][15]。他也是 [使用 Hyperledger Fabric 进行智能合约开发][16] 一书的主要作者。他为 Hyperledger、以太坊和 Corda R3 平台编写了 100 多篇关于区块链开发的技术文章和教程。在 DC Web Makers,他领导了一个区块链专家团队,负责咨询和部署企业去中心化应用程序。作为首席架构师,他为编码训练营设计和开发了区块链课程和培训项目。他拥有马里兰大学(University of Maryland)工商管理硕士学位。在区块链开发和咨询之前,他曾担任一些初创公司的高级网页和移动应用程序开发和顾问、天使投资人和业务顾问。你可以通过以下这个网址和他取得联系: 。 +**Matt Zand** 是一位创业者,也是 3 家科技创业公司的创始人: [DC Web Makers][13]、[Coding Bootcamps][14] 和 [High School Technology Services][15]。他也是 [使用 Hyperledger Fabric 进行智能合约开发][16] 一书的主要作者。他为 Hyperledger、以太坊和 Corda R3 平台编写了 100 多篇关于区块链开发的技术文章和教程。在 DC Web Makers,他领导了一个区块链专家团队,负责咨询和部署企业去中心化应用程序。作为首席架构师,他为编码训练营设计和开发了区块链课程和培训项目。他拥有马里兰大学工商管理硕士学位。在区块链开发和咨询之前,他曾担任一些初创公司的高级网页和移动应用程序开发和顾问、天使投资人和业务顾问。你可以通过以下这个网址和他取得联系: 。 -**Kevin Downs** 是 Red Hat 认证的系统管理员和 RHCSA。他目前在 IBM 担任系统管理员,负责管理数百台运行在不同 Linux 发行版上的服务器。他是[编码训练营][17]的首席 Linux 讲师,并且他会讲授 [5 个自己的课程][18]. - -本文首发在 [Linux 基础培训][20]上。 +**Kevin Downs** 是 Red Hat 认证的系统管理员和 RHCSA。他目前在 IBM 担任系统管理员,负责管理数百台运行在不同 Linux 发行版上的服务器。他是[编码训练营][17]的首席 Linux 讲师,并且他会讲授 [5 个自己的课程][18]。 -------------------------------------------------------------------------------- @@ -174,7 +201,7 @@ via: https://www.linux.com/news/how-to-create-and-manage-archive-files-in-linux- 作者:[LF Training][a] 选题:[lujun9972][b] 译者:[MjSeven](https://github.com/MjSeven) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 65f8a86a45e4058c42a50fc89a16d6c0ec8c39d0 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 17 Feb 2021 12:22:46 +0800 Subject: [PATCH 032/818] PUB @MjSeven https://linux.cn/article-13126-1.html --- ...0210115 How to Create and Manage Archive Files in Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210115 How to Create and Manage Archive Files in Linux.md (97%) diff --git a/translated/tech/20210115 How to Create and Manage Archive Files in Linux.md b/published/20210115 How to Create and Manage Archive Files in Linux.md similarity index 97% rename from translated/tech/20210115 How to Create and Manage Archive Files in Linux.md rename to published/20210115 How to Create and Manage Archive Files in Linux.md index 5f1f1e72a0..71118c25da 100644 --- a/translated/tech/20210115 How to Create and Manage Archive Files in Linux.md +++ b/published/20210115 How to Create and Manage Archive Files in Linux.md @@ -1,8 +1,8 @@ [#]: collector: "lujun9972" [#]: translator: "MjSeven" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-13126-1.html" [#]: subject: "How to Create and Manage Archive Files in Linux" [#]: via: "https://training.linuxfoundation.org/announcements/how-to-create-and-manage-archive-files-in-linux/" [#]: author: "Matt Zand,Kevin Downs https://training.linuxfoundation.org/announcements/how-to-create-and-manage-archive-files-in-linux/" From 1d73aada050649ea64a779a5df3c830774bf1fc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=B6=85=E6=99=BA?= Date: Wed, 17 Feb 2021 21:00:56 +0800 Subject: [PATCH 033/818] translating by Chao-zhi --- ...w way to build cross-platform UIs for Linux ARM devices.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20200529 A new way to build cross-platform UIs for Linux ARM devices.md b/sources/tech/20200529 A new way to build cross-platform UIs for Linux ARM devices.md index 248d3a4dbc..32934b5831 100644 --- a/sources/tech/20200529 A new way to build cross-platform UIs for Linux ARM devices.md +++ b/sources/tech/20200529 A new way to build cross-platform UIs for Linux ARM devices.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (Chao-zhi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -152,7 +152,7 @@ via: https://opensource.com/article/20/5/linux-arm-ui 作者:[Bruno Muniz][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[Chao-zhi](https://github.com/Chao-zhi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 9b6c06250d6c20d690f9f36a306fe90ca041f413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=B6=85=E6=99=BA?= Date: Wed, 17 Feb 2021 21:46:26 +0800 Subject: [PATCH 034/818] translate done: 20200529 A new way to build cross-platform UIs for Linux ARM devices.md --- ...ross-platform UIs for Linux ARM devices.md | 182 ------------------ ...ross-platform UIs for Linux ARM devices.md | 178 +++++++++++++++++ 2 files changed, 178 insertions(+), 182 deletions(-) delete mode 100644 sources/tech/20200529 A new way to build cross-platform UIs for Linux ARM devices.md create mode 100644 translated/tech/20200529 A new way to build cross-platform UIs for Linux ARM devices.md diff --git a/sources/tech/20200529 A new way to build cross-platform UIs for Linux ARM devices.md b/sources/tech/20200529 A new way to build cross-platform UIs for Linux ARM devices.md deleted file mode 100644 index 32934b5831..0000000000 --- a/sources/tech/20200529 A new way to build cross-platform UIs for Linux ARM devices.md +++ /dev/null @@ -1,182 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (Chao-zhi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (A new way to build cross-platform UIs for Linux ARM devices) -[#]: via: (https://opensource.com/article/20/5/linux-arm-ui) -[#]: author: (Bruno Muniz https://opensource.com/users/brunoamuniz) - -A new way to build cross-platform UIs for Linux ARM devices -====== -A proof of concept using AndroidXML and TotalCross provides an easier -way of creating UIs for Raspberry Pi and other devices. -![Digital images of a computer desktop][1] - -Creating a great user experience (UX) for your applications is a tough job, especially if you are developing embedded applications. Today, there are two types of graphical user interface (GUI) tools generally available for developing embedded software: either they involve complex technologies, or they are extremely expensive. - -However, we have created a proof of concept (PoC) for a new way to use existing, well-established tools to build user interfaces (UIs) for applications that run on desktop, mobile, embedded devices, and low-power Linux ARM devices. Our method uses Android Studio to draw the UI; [TotalCross][2] to render the Android XML on the device; a new [TotalCross API][3] called [KnowCode][4]; and a [Raspberry Pi 4][5] to execute the application. - -### Choosing Android Studio - -It's possible to build a responsive and beautiful UX for an application using the TotalCross API, but creating the UI in Android Studio shortens the time between prototyping and the real application. - -There are a lot of tools available to build UIs for applications, but [Android Studio][6] is the one developers worldwide use most often. In addition to its massive adoption, this tool is also super-intuitive to use, and it's really powerful for creating both simple and complex applications. The only drawback, in my opinion, is the computing power required to use the tool, which is way heavier than other integrated development environments (IDEs) like VSCode or its open source alternative, [VSCodium][7]. - -By thinking through these issues, we created a proof of concept using Android Studio to draw the UI and TotalCross to run the Android XML directly on the device. - -### Building the UI - -For our PoC, we wanted to create a home-appliance application to control temperature and other things and that would run on a Linux ARM device. - -![Home appliance application to control thermostat][8] - -(Bruno Muniz, [CC BY-SA 4.0][9]) - -We wanted to develop our application for a Raspberry Pi, so we used Android's [ConstraintLayout][10] to build a fixed-screen-size UI of 848x480 (the Raspberry Pi's resolution), but you can build responsive UIs with other layouts. - -Android XML adds a lot of flexibility for UI creation, making it easy to build rich user experiences for applications. In the XML below, we used two main components: [ImageView][11] and [TextView][12]. - - -``` -<ImageView -android:id="@+id/imageView6" -android:layout_width="273dp" -android:layout_height="291dp" -android:background="@drawable/Casa" -tools:layout_editor_absoluteX="109dp" -tools:layout_editor_absoluteY="95dp" /> -<TextView -android:id="@+id/insideTempEdit" -android:layout_width="94dp" -android:layout_height="92dp" -android:background="#F5F5F5" -android:text="20" -android:textAlignment="center" -android:gravity="center" -android:textColor="#000000" -android:textSize="67dp" -android:textStyle="bold" -tools:layout_editor_absoluteX="196dp" -tools:layout_editor_absoluteY="246dp" /> -``` - -The TextView elements are used to show some data to the user, like the temperature inside a building. Most ImageViews are used as buttons for user interaction with the UI, but they're also needed to implement the Events provided by the components on the screen. - -### Integrating with TotalCross - -The second technology in this PoC is TotalCross. We don't want to use anything from Android on the device because: - - 1. Our goal is to provide a great UI for Linux ARM. - 2. We want to achieve a low footprint on the device. - 3. We want the application to run on low-end hardware devices with low computing power (e.g., no GPU, low RAM, etc.). - - - -To begin, we created an empty TotalCross project using our [VSCode plugin][13]. Next, we saved a copy of the images inside the **drawable** folder and a copy of the Android XML file inside the **XML** folder—both are located inside the **Resources** folder: - -![Home Appliance file structure][14] - -(Bruno Muniz, [CC BY-SA 4.0][9]) - -To run the XML file using the TotalCross Simulator, we added a new TotalCross API called KnowCode and a MainWindow to load the XML. The code below uses the API to load and render the XML: - - -``` -public void initUI() { -    XmlScreenAbstractLayout xmlCont = XmlScreenFactory.create(“xml / homeApplianceXML.xml”); -    swap(xmlCont); -} -``` - -That's it! With only two commands, we can run an Android XML file using TotalCross. Here is how the XML performs on TotalCross' simulator: - -![TotalCross simulator running temperature application][15] - -(Bruno Muniz, [CC BY-SA 4.0][9]) - -There are two things remaining to finish this PoC: adding some events to provide user interaction and running it on a Raspberry Pi. - -### Adding events - -The KnowCode API provides a way to get an XML element by its ID (getControlByID) and change its behavior to do things like adding events, changing visibility, and more. - -For example, to enable users to change the temperature in their home or other building, we put plus and minus buttons on the bottom of the UI and a "click" event that increases or decreases the temperature one degree every time the buttons are clicked: - - -``` -[Button][16] plus = ([Button][16]) xmlCont.getControlByID("@+id/plus"); -[Label][17] insideTempLabel = ([Label][17]) xmlCont.getControlByID("@+id/insideTempLabel"); -plus.addPressListener(new PressListener() { -    @Override -    public void controlPressed(ControlEvent e) { -        try { -            [String][18] tempString = insideTempLabel.getText(); -            int temp; -            temp = Convert.toInt(tempString); -            insideTempLabel.setText(Convert.toString(++temp)); -        } catch (InvalidNumberException e1) { -            e1.printStackTrace(); -        } -    } -}); -``` - -### Testing on a Raspberry Pi 4 - -Finally, the last step! We ran the application on a device and checked the results. We just needed to package the application and deploy and run it on the target device. A [VNC][19] can also be used to check the application on the device. - -The entire application, including assets (images, etc.), Android XML, TotalCross, and the KnowCode API, is about 8MB on Linux ARM. - -Here's a demo of the application: - -![Application demo][20] - -(Bruno Muniz, [CC BY-SA 4.0][9]) - -In this example, the application was packaged only for Linux ARM, but the same app will run as a Linux desktop app, Android devices, Windows, Windows CE, and even iOS. - -All of the sample source code and the project are available in the [HomeApplianceXML GitHub][21] repository. - -### New possibilities with existing tools - -Creating GUIs for embedded applications doesn't need to be as hard as it is today. This proof of concept brings a new perspective on how to do this task easily—not only for embedded systems but for all major operating systems, all using the same code base. - -We are not aiming to create a new tool for designers or developers to build UI applications; our goal is to provide new possibilities for using the best tools that are already available. - -What's your opinion of this new way to build apps? Share your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/linux-arm-ui - -作者:[Bruno Muniz][a] -选题:[lujun9972][b] -译者:[Chao-zhi](https://github.com/Chao-zhi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/brunoamuniz -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_desk_home_laptop_browser.png?itok=Y3UVpY0l (Digital images of a computer desktop) -[2]: https://totalcross.com/ -[3]: https://yourapp.totalcross.com/knowcode-app -[4]: https://github.com/TotalCross/KnowCodeXML -[5]: https://www.raspberrypi.org/ -[6]: https://developer.android.com/studio -[7]: https://vscodium.com/ -[8]: https://opensource.com/sites/default/files/uploads/homeapplianceapp.png (Home appliance application to control thermostat) -[9]: https://creativecommons.org/licenses/by-sa/4.0/ -[10]: https://codelabs.developers.google.com/codelabs/constraint-layout/index.html#0 -[11]: https://developer.android.com/reference/android/widget/ImageView -[12]: https://developer.android.com/reference/android/widget/TextView -[13]: https://medium.com/totalcross-community/totalcross-plugin-for-vscode-4f45da146a0a -[14]: https://opensource.com/sites/default/files/uploads/homeappliancexml.png (Home Appliance file structure) -[15]: https://opensource.com/sites/default/files/uploads/totalcross-simulator_0.png (TotalCross simulator running temperature application) -[16]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+button -[17]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+label -[18]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string -[19]: https://tigervnc.org/ -[20]: https://opensource.com/sites/default/files/uploads/application.gif (Application demo) -[21]: https://github.com/TotalCross/HomeApplianceXML diff --git a/translated/tech/20200529 A new way to build cross-platform UIs for Linux ARM devices.md b/translated/tech/20200529 A new way to build cross-platform UIs for Linux ARM devices.md new file mode 100644 index 0000000000..c3ea802e4d --- /dev/null +++ b/translated/tech/20200529 A new way to build cross-platform UIs for Linux ARM devices.md @@ -0,0 +1,178 @@ +[#]: collector: (lujun9972) +[#]: translator: (Chao-zhi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (A new way to build cross-platform UIs for Linux ARM devices) +[#]: via: (https://opensource.com/article/20/5/linux-arm-ui) +[#]: author: (Bruno Muniz https://opensource.com/users/brunoamuniz) + +一种为 Linux ARM 设备构建跨平台 UI 的新方法 +====== +AndroidXML 和 TotalCross 的运用为 Raspberry Pi 和其他设备创建 UI 提供了更简单的方法。 +![Digital images of a computer desktop][1] + +为应用程序创建良好的用户体验 (user experience,UX) 是一项艰巨的任务,尤其是在开发嵌入式应用程序时。今天,有两种图形用户界面 (graphical user interface,GUI) 工具通常用于开发嵌入式软件:它们要么涉及复杂的技术,要么非常昂贵。 + +然而,我们已经创建了一个概念验证 (proof-of-concept,PoC),它提供了一种新的方法来使用现有的、成熟的工具为运行在桌面、移动、嵌入式设备和低功耗 ARM 设备上的应用程序构建用户界面 (UI)。我们的方法是使用 Android Studio 绘制 UI; 使用 [TotalCross][2] 在设备上呈现 Android XML; 采用被称为 [KnowCode][4] 的新 [TotalCross API][3]; 以及使用 [Raspberry Pi 4][5] 来执行应用程序。 + +### 选择 Android Studio + +可以使用 TotalCross API 为应用程序构建一个响应迅速且美观的用户体验,但是在 Android Studio 中创建 UI 缩短了原型制作和实际应用程序之间的时间。 + +有很多工具可以用来为应用程序构建 UI,但是 [Android Studio][6] 是全世界开发者最常使用的工具。除了它被大量采用以外,这个工具的使用也非常直观,而且它对于创建简单和复杂的应用程序都非常强大。在我看来,唯一的缺点是使用该工具所需的计算能力,它比其他集成开发环境 (IDE) 如 VSCode 或其开源替代方案 [VSCodium][7] 要庞大得多。 + +通过思考这些问题,我们创建了一个概念验证,使用 Android Studio 绘制 UI,并使用 TotalCross 直接在设备上运行 AndroidXML。 + +### 构建 UI + +对于我们的 PoC,我们想创建一个家用电器应用程序来控制温度和其他东西,并在 Linux ARM 设备上运行。 + +![Home appliance application to control thermostat][8] + +(Bruno Muniz,[CC BY-SA 4.0][9]) + +我们想为 Raspberry Pi 开发我们的应用程序,所以我们使用 Android 的 [ConstraintLayout][10] 来构建 848x480 (Raspberry Pi 的分辨率)的固定屏幕大小的 UI,不过您可以用其他布局构建响应性 UI。 + +Android XML 为 UI 创建增加了很多灵活性,使得为应用程序构建丰富的用户体验变得容易。在下面的 XML 中,我们使用了两个主要组件:[ImageView][11] 和 [TextView][12]。 + +``` +<ImageView +android:id="@+id/imageView6" +android:layout_width="273dp" +android:layout_height="291dp" +android:background="@drawable/Casa" +tools:layout_editor_absoluteX="109dp" +tools:layout_editor_absoluteY="95dp" /> +<TextView +android:id="@+id/insideTempEdit" +android:layout_width="94dp" +android:layout_height="92dp" +android:background="#F5F5F5" +android:text="20" +android:textAlignment="center" +android:gravity="center" +android:textColor="#000000" +android:textSize="67dp" +android:textStyle="bold" +tools:layout_editor_absoluteX="196dp" +tools:layout_editor_absoluteY="246dp" /> +``` + +TextView 元素用于向用户显示一些数据,比如建筑物内的温度。大多数 imageview 都用作用户与 UI 交互的按钮,但它们也需要实现屏幕上组件提供的事件。 + +### 用 TotalCross 整合 + +这个 PoC 中的第二项技术是 TotalCross。我们不想在设备上使用 Android 的任何东西,因为: + + 1。我们的目标是为 Linux ARM 提供一个出色的 UI。 + 2。我们希望在设备上实现低占地面积。 + 3。我们希望应用程序在低计算能力的低端硬件设备上运行(例如,没有 GPU、 低 RAM 等)。 + +首先,我们使用 [VSCode plugin][13] 创建了一个空的 TotalCross 项目。接下来,我们保存了 **drawable** 文件夹中的图像副本和 **XML** 文件夹中的 Android XML 文件副本,这两个文件夹都位于 **Resources** 文件夹中: + +![Home Appliance file structure][14] + +(Bruno Muniz,[CC BY-SA 4.0][9]) + +为了使用 TotalCross 模拟器运行 XML 文件,我们添加了一个名为 KnowCode 的新 TotalCross API 和一个主窗口来加载 XML。下面的代码使用 API 加载和呈现 XML: + + +``` +public void initUI() { +    XmlScreenAbstractLayout xmlCont = XmlScreenFactory.create(“xml / homeApplianceXML.xml”); +    swap(xmlCont); +} +``` + +就这样!只需两个命令,我们就可以使用 TotalCross 运行 Android XML 文件。以下是 XML 如何在 TotalCross 的模拟器上执行: + +![TotalCross simulator running temperature application][15] + +(Bruno Muniz,[CC BY-SA 4.0][9]) + +完成这个 PoC 还有两件事要做:添加一些事件来提供用户交互和在 Raspberry Pi 上运行它。 + +### 添加事件 + +KnowCode API 提供了一种通过 ID(getControlByID) 获取 XML 元素并更改其行为的方法,如添加事件、更改可见性等。 + +例如,为了使用户能够改变家中或其他建筑物的温度,我们在 UI 底部放置了加号和减号按钮,并在每次单击按钮时都会出现“单击”事件,使温度升高或降低一度: + + +``` +[Button][16] plus = ([Button][16]) xmlCont.getControlByID("@+id/plus"); +[Label][17] insideTempLabel = ([Label][17]) xmlCont.getControlByID("@+id/insideTempLabel"); +plus.addPressListener(new PressListener() { +    @Override +    public void controlPressed(ControlEvent e) { +        try { +            [String][18] tempString = insideTempLabel.getText(); +            int temp; +            temp = Convert.toInt(tempString); +            insideTempLabel.setText(Convert.toString(++temp)); +        } catch (InvalidNumberException e1) { +            e1.printStackTrace(); +        } +    } +}); +``` + +### 在树莓皮 4 上测试 + +最后一步!我们在一台设备上运行了应用程序并检查了结果。我们只需要打包应用程序并在目标设备上部署和运行它。[VNC][19] 也可用于检查设备上的应用程序。 + +整个应用程序,包括资源(图像等 )、AndroidXML、TotalCross 和 Knowcode API,在 Linux ARM 上大约是 8MB。 + +下面是应用程序的演示: + +![Application demo][20] + +(Bruno Muniz,[CC BY-SA 4.0][9]) + +在本例中,该应用程序仅为 Linux ARM 打包,但同一应用程序将作为 Linux 桌面应用程序 、Android 设备 、Windows、windows CE 甚至 IOS 运行。 + +所有示例源代码和项目都可以在 [HomeApplianceXML GitHub][21] 存储库中找到。 + +### 现有工具的新玩法 + +为嵌入式应用程序创建 GUI 并不需要像现在这样困难。这种概念证明为如何轻松地完成这项任务提供了新的视角,不仅适用于嵌入式系统,而且适用于所有主要的操作系统,所有这些系统都使用相同的代码库。 + +我们的目标不是为设计人员或开发人员创建一个新的工具来构建 UI 应用程序;我们的目标是为使用现有的最佳工具提供新的玩法。 + +你对这种新的应用程序开发方式有何看法?在下面的评论中分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/5/linux-arm-ui + +作者:[Bruno Muniz][a] +选题:[lujun9972][b] +译者:[Chao-zhi](https://github.com/Chao-zhi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/brunoamuniz +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_desk_home_laptop_browser.png?itok=Y3UVpY0l (Digital images of a computer desktop) +[2]: https://totalcross.com/ +[3]: https://yourapp.totalcross.com/knowcode-app +[4]: https://github.com/TotalCross/KnowCodeXML +[5]: https://www.raspberrypi.org/ +[6]: https://developer.android.com/studio +[7]: https://vscodium.com/ +[8]: https://opensource.com/sites/default/files/uploads/homeapplianceapp.png (Home appliance application to control thermostat) +[9]: https://creativecommons.org/licenses/by-sa/4.0/ +[10]: https://codelabs.developers.google.com/codelabs/constraint-layout/index.html#0 +[11]: https://developer.android.com/reference/android/widget/ImageView +[12]: https://developer.android.com/reference/android/widget/TextView +[13]: https://medium.com/totalcross-community/totalcross-plugin-for-vscode-4f45da146a0a +[14]: https://opensource.com/sites/default/files/uploads/homeappliancexml.png (Home Appliance file structure) +[15]: https://opensource.com/sites/default/files/uploads/totalcross-simulator_0.png (TotalCross simulator running temperature application) +[16]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+button +[17]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+label +[18]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string +[19]: https://tigervnc.org/ +[20]: https://opensource.com/sites/default/files/uploads/application.gif (Application demo) +[21]: https://github.com/TotalCross/HomeApplianceXML From 9c635cca0eda5f15e02e1b83409d91abbdd3a496 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 18 Feb 2021 05:04:24 +0800 Subject: [PATCH 035/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210218=20?= =?UTF-8?q?What=20is=20PPA=20Purge=3F=20How=20to=20Use=20it=20in=20Ubuntu?= =?UTF-8?q?=20and=20other=20Debian-based=20Distributions=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210218 What is PPA Purge- How to Use it in Ubuntu and other Debian-based Distributions.md --- ...tu and other Debian-based Distributions.md | 182 ++++++++++++++++++ 1 file changed, 182 insertions(+) create mode 100644 sources/tech/20210218 What is PPA Purge- How to Use it in Ubuntu and other Debian-based Distributions.md diff --git a/sources/tech/20210218 What is PPA Purge- How to Use it in Ubuntu and other Debian-based Distributions.md b/sources/tech/20210218 What is PPA Purge- How to Use it in Ubuntu and other Debian-based Distributions.md new file mode 100644 index 0000000000..2be48a8b15 --- /dev/null +++ b/sources/tech/20210218 What is PPA Purge- How to Use it in Ubuntu and other Debian-based Distributions.md @@ -0,0 +1,182 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What is PPA Purge? How to Use it in Ubuntu and other Debian-based Distributions?) +[#]: via: (https://itsfoss.com/ppa-purge/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +What is PPA Purge? How to Use it in Ubuntu and other Debian-based Distributions? +====== + +PPA is a popular method of installing additional applications or newer versions of a software in Ubuntu. + +I have written a [detailed guide on PPA][1] so I will just quickly recall it here. PPA is a mechanism developed by Ubuntu to enable developers to provide their own repositories. When you add a PPA, you add additional repository to your system and thus you can download applications from this additional repository. + +``` +sudo add-apt-repository ppa:ppa-address +sudo apt update +sudo apt install package_from_ppa +``` + +I have also written about [deleting PPAs from your system][2]. I briefly mentioned the PPA Purge tool in that article. In this tutorial, you’ll get more detailed information about this handy utility. + +### What is PPA Purge? + +PPA Purge is a command line tool that disables a PPA repository from your software sources list. Apart from that, it reverts the system back to official Ubuntu packages. This is a different behavior than simply deleting the PPA repository. + +Suppose application ABC has version x available from Ubuntu repositories. You add a PPA that provides a higher version y of the same application/package ABC. When your Linux system finds that the same package is available from multiple sources, it uses the source that provides a newer version. + +In this example, you’ll have version y of application ABC installed thanks to the PPA you added. + +Normally, you would remove the application and then remove the PPA from sources list. But if you use ppa-purge to disable the said PPA, your application ABC will automatically revert to the older version x provided by Ubuntu repositories. + +Do you see the difference? Probably not. Let me explain it to you with real examples. + +#### Reverting applications to the official version provided by Ubuntu + +I heard that the [upcoming VLC 4.0 version has major UI overhaul][3]. I wanted to try it before it is officially released and so I used the [daily build PPA of VLC][4] to get the under-development version 4. + +Take a look at the screenshot below. I have added the VLC PPA (videolan/master-daily) and this PPA provides VLC version 4.0 release candidate (RC) version. Ubuntu repositories provide VLC version 3.0.11. + +![][5] + +If I use the ppa-purge command with the VLC daily build PPA, it disables the PPA and reverts the installed VLC version to 3.0.11 which is available from Ubuntu’s universal repository. + +![][6] + +You can see that it informs you that some packages are going to be downgraded. + +![][7] + +When the daily build VLC PPA is purged, the installed version reverts to what Ubuntu provides from its official repositories. + +![][8] + +You might think that VLC was downgraded because it was upgraded from version 3.0.11 to VLC 4.0 with the PPA. But here is a funny thing. Even if I had used the PPA to install VLC 4.0 RC version afresh (instead of upgrading it), it would still be downgraded instead of being removed from the system. + +Does it mean ppa-purge command cannot remove applications along with disabling the PPA? Not quite so. Let me show another example. + +#### PPA Purge impact on application only available from a PPA + +I recently stumbled across Plots, a [nifty tool for plotting mathematical graphs][9]. Since it is a new application, it is not available in Ubuntu repositories yet. I used [its PPA][10] to install it. + +If I use ppa-purge command on this PPA, it disables the PPA first and then looks to revert it to the original version. But there is no ‘original version’ in Ubuntu’s repositories. So, it proceeds to [uninstall the application from Ubuntu][11]. + +The entire process is depicted in the single picture below. Pointer 1 is for adding PPA, pointer 2 is for installing the application named plots. I have discarded the input for these two commands with [redirection in Linux][12]. + +You can see that when PPA Purge is used (pointer 3), it disables the PPA (pointer 4) and then proceeds to inform that the application plots will be removed (pointer 5). + +![][13] + +#### Deleting a PPA vs disabling it + +I have repeatedly used the term ‘disabling PPA’ with PPA Purge. There is a difference between disabling PPA and deleting it. + +When you add a PPA, it adds a new file in the /etc/apt/sources.list.d directory. This file has the URL of the repository. + +Disabling the PPA keeps this file but it is commented out the repository in the PPA’s file. Now this repository is not considered while updating or installing software. + +![][14] + +You can see disabled PPA repository in Software & Updates tool: + +![][15] + +When you delete a PPA, it means deleting the PPA’s file from etc/apt/sources.list.d directory. You won’t see it anywhere on the system. + +![PPA deleted][16] + +Why disable a PPA instead of deleting it? Because it is easier to re-enable it. You can do just check the box in Software & Updates tool or edit the PPA file and remove the leading # to uncomment the repository. + +#### Recap of what PPA Purge does + +If it was too much information, let me summarize the main points of what the ppa-purge script/tool does: + + * PPA Purge disables a given PPA but doesn’t delete it. + * If there was a new application (which is not available from any sources other than only the PPA) installed with the given PPA, it is uninstalled. + * If the PPA upgraded an already installed application, that application will be reverted to the version provided by the official Ubuntu repositories. + * If you used the PPA to install (not upgrade) a newer version of an application (which is also available from the official Ubuntu repository), using PPA Purge will downgrade the application version to the one available from Ubuntu repositories. + + + +### Using PPA Purge + +Alright! Enough explanation. You might be wondering how to use PPA Purge. + +You need to install ppa-purge tool first. Ensure that you have [universe repository enabled][17] already. + +``` +sudo apt install ppa-purge +``` + +As far using PPA Purge, you should provide the PPA name in a format similar to what you use for adding it: + +``` +sudo ppa-purge ppa:ppa-name +``` + +Here’s a real example: + +![][18] + +If you are not sure of the PPA name, [use the apt show command][19] to display the source repository of the package in question. + +``` +apt show vlc +``` + +![Finding PPA source URL][20] + +For example, the source for VLC PPA shows groovy/main. Out of this the terms after ppa.launchpad.net and before Ubuntu are part of PPA name. So here, you get the PPA name as videolan/master-daily. + +If you have to use to purge the PPA ‘videolan/master-daily’, you use it like this by adding `ppa:` before PPA name: + +``` +sudo ppa-purge ppa:videolan/master-daily +``` + +### Do you purge your PPAs? + +I wanted to keep this article short and crisp but it seems I went in a little bit of more detail.As long as you learn something new, you won’t mind the additional details, will you? + +PPA Purge is a nifty utility that allows you to test newer or beta versions of applications and then easily revert to the original version provided by the distribution. If a PPA has more than one application, it works on all of them. + +Of course, you can do all these stuff manually which is to disable the PPA, remove the application and install it again to get the version provided by the distribution. PPA Purge makes the job easier. + +Do you use ppa-purge already or will you start using it from now onwards? Did I miss some crucial information or do you still have some doubts on this topic? Please feel free to use the comment sections. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/ppa-purge/ + +作者:[Abhishek Prakash][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/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/ppa-guide/ +[2]: https://itsfoss.com/how-to-remove-or-delete-ppas-quick-tip/ +[3]: https://news.itsfoss.com/vlc-4-features/ +[4]: https://launchpad.net/~videolan/+archive/ubuntu/master-daily +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/vlc-ppa.png?resize=800%2C400&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/using-ppap-purge.png?resize=800%2C506&ssl=1 +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/downgrade-packages-with-ppa-purge.png?resize=800%2C506&ssl=1 +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/package-reverted-ppa-purge.png?resize=800%2C405&ssl=1 +[9]: https://itsfoss.com/plots-graph-app/ +[10]: https://launchpad.net/~apandada1/+archive/ubuntu/plots/ +[11]: https://itsfoss.com/uninstall-programs-ubuntu/ +[12]: https://linuxhandbook.com/redirection-linux/ +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/ppa-purge-deleting-apps.png?resize=800%2C625&ssl=1 +[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/disabled-ppa.png?resize=800%2C295&ssl=1 +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/disabled-ppa-ubuntu.png?resize=800%2C398&ssl=1 +[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/ppa-deleted.png?resize=800%2C271&ssl=1 +[17]: https://itsfoss.com/ubuntu-repositories/ +[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/ppa-purge-example-800x379.png?resize=800%2C379&ssl=1 +[19]: https://itsfoss.com/apt-search-command/ +[20]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/apt-show-find-ppa-source.png?resize=800%2C341&ssl=1 From 460e96e4a37b13eeb58f8e452f5475d73a6a7c93 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 18 Feb 2021 05:04:42 +0800 Subject: [PATCH 036/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210217=20?= =?UTF-8?q?5=20reasons=20to=20use=20Linux=20package=20managers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210217 5 reasons to use Linux package managers.md --- ...5 reasons to use Linux package managers.md | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 sources/tech/20210217 5 reasons to use Linux package managers.md diff --git a/sources/tech/20210217 5 reasons to use Linux package managers.md b/sources/tech/20210217 5 reasons to use Linux package managers.md new file mode 100644 index 0000000000..8f5a65c511 --- /dev/null +++ b/sources/tech/20210217 5 reasons to use Linux package managers.md @@ -0,0 +1,74 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (5 reasons to use Linux package managers) +[#]: via: (https://opensource.com/article/21/2/linux-package-management) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +5 reasons to use Linux package managers +====== +Package managers track all components of the software you install, +making updates, reinstalls, and troubleshooting much easier. +![Gift box opens with colors coming out][1] + +In 2021, there are more reasons why people love Linux than ever before. In this series, I'll share 21 different reasons to use Linux. Today, I'll talk about software repositories + +Before I used Linux, I took the applications I had installed on my computer for granted. I would install applications as needed, and if I didn't end up using them, I'd forget about them, letting them languish as they took up space on my hard drive. Eventually, space on my drive would become scarce, and I'd end up frantically removing applications to make room for more important data. Inevitably, though, the applications would only free up so much space, and so I'd turn my attention to all of the other bits and pieces that got installed along with those apps, whether it was media assets or configuration files and documentation. It wasn't a great way to manage my computer. I knew that, but it didn't occur to me to imagine an alternative, because as they say, you don't know what you don't know. + +When I switched to Linux, I found that installing applications worked a little differently. On Linux, you were encouraged not to go out to websites for an application installer. Instead, you ran a command, and the application was installed on the system, with every individual file, library, configuration file, documentation, and asset recorded. + +### What is a software repository? + +The default method of installing applications on Linux is from a distribution software repository. That might sound like an app store, and that's because modern app stores have borrowed much from the concept of software repositories. [Linux has app stores, too][2], but software repositories are unique. You get an application from a software repository through a _package manager_, which enables your Linux system to record and track every component of what you've installed. + +Here are five reasons that knowing exactly what's on your system can be surprisingly useful. + +#### 1\. Removing old applications + +When your computer knows every file that was installed with any given application, it's really easy to uninstall files you no longer need. On Linux, there's no problem with installing [31 different text editors][3] only to later uninstall the 30 you don't love. When you uninstall on Linux, you really uninstall. + +#### 2\. Reinstall like you mean it + +Not only is an uninstall thorough, a _reinstall_ is meaningful. On many platforms, should something go wrong with an application, you're sometimes advised to reinstall it. Usually, nobody can say why you should reinstall an application. Still, there's often the vague suspicion that some file somewhere has become corrupt (in other words, data got written incorrectly), and so the hope is that a reinstall might overwrite the bad files and make things work again. It's not bad advice, but it's frustrating for any technician not to know what's gone wrong. Worse still, there's no guarantee, without careful tracking, that all files will be refreshed during a reinstall because there's often no way of knowing that all the files installed with an application were removed in the first place. With a package manager, you can force a complete removal of old files to ensure a fresh installation of new files. Just as significantly, you can account for every file and probably find out which one is causing problems, but that's a feature of open source and Linux rather than package management. + +#### 3\. Keep your applications updated + +Don't let anybody tell you that Linux is "more secure" than other operating systems. Computers are made of code, and we humans find ways to exploit that code in new and interesting ways every day. Because the vast majority of applications on Linux are open source, many exploits are filed publically as Common Vulnerability and Exposures (CVE). A flood of incoming security bug reports may seem like a bad thing, but this is definitely a case when _knowing_ is far better than _not knowing_. After all, just because nobody's told you that there's a problem doesn't mean that there's not a problem. Bug reports are good. They benefit everyone. And when developers fix security bugs, it's important for you to be able to get those fixes promptly, and preferably without having to remember to do it yourself. + +A package manager is designed to do exactly that. When applications receive updates, whether it's to patch a potential security problem or introduce an exciting new feature, your package manager application alerts you of the available update. + +#### 4\. Keep it light + +Say you have application A and application B, both of which require library C. On some operating systems, by getting A and B, you get two copies of C. That's obviously redundant, so imagine it happening several times per application. Redundant libraries add up quickly, and by having no single source of "truth" for a given library, it's nearly impossible to ensure you're using the most up-to-date or even just a consistent version of it. + +I admit I don't tend to sit around pondering software libraries all day, but I do remember the days when I did, even though I didn't know that's what was troubling me. Before I had switched to Linux, it wasn't uncommon for me to encounter errors when dealing with media files for work, or glitches when playing different video games, or quirks when reading a PDF, and so on. I spent a lot of time investigating these errors back then. I still remember learning that two major applications on my system each had bundled the same (but different) graphic backend technologies. The mismatch was causing errors when the output of one was imported into the other. It was meant to work, but because of a bug in an older version of the same collection of library files, a hotfix for one application didn't benefit the other. + +A package manager knows what backends (referred to as a _dependency_) are needed for each application and refrains from reinstalling software that's already on your system. + +#### 5\. Keep it simple + +As a Linux user, I appreciate a good package manager because it helps make my life simple. I don't have to think about the software I install, what I need to update, or whether something's really been uninstalled when I'm finished with it. I audition software without hesitation. And when I'm setting up a new computer, I run [a simple Ansible script][4] to automate the installation of the latest versions of all the software I rely upon. It's simple, smart, and uniquely liberating. + +### Better package management + +Linux takes a holistic view of applications and the operating system. After all, open source is built upon the work of other open source, so distribution maintainers understand the concept of a dependency _stack_. Package management on Linux has an awareness of your whole system, the libraries and support files on it, and the applications you install. These disparate parts work together to provide you with an efficient, optimized, and robust set of applications. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/linux-package-management + +作者:[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/OSDC_gift_giveaway_box_520x292.png?itok=w1YQhNH1 (Gift box opens with colors coming out) +[2]: http://flathub.org +[3]: https://opensource.com/article/21/1/text-editor-roundup +[4]: https://opensource.com/article/20/9/install-packages-ansible From 85aa092a5f6d6e3dd5f6b9c4a28b888d6de97579 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 18 Feb 2021 05:04:57 +0800 Subject: [PATCH 037/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210217=20?= =?UTF-8?q?Use=20this=20bootable=20USB=20drive=20on=20Linux=20to=20rescue?= =?UTF-8?q?=20Windows=20users?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210217 Use this bootable USB drive on Linux to rescue Windows users.md --- ... drive on Linux to rescue Windows users.md | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 sources/tech/20210217 Use this bootable USB drive on Linux to rescue Windows users.md diff --git a/sources/tech/20210217 Use this bootable USB drive on Linux to rescue Windows users.md b/sources/tech/20210217 Use this bootable USB drive on Linux to rescue Windows users.md new file mode 100644 index 0000000000..22ddf703d9 --- /dev/null +++ b/sources/tech/20210217 Use this bootable USB drive on Linux to rescue Windows users.md @@ -0,0 +1,85 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Use this bootable USB drive on Linux to rescue Windows users) +[#]: via: (https://opensource.com/article/21/2/linux-woeusb) +[#]: author: (Don Watkins https://opensource.com/users/don-watkins) + +Use this bootable USB drive on Linux to rescue Windows users +====== +WoeUSB makes Windows boot disks from Linux and help your friends unlock +their out-of-commission machines. +![Puzzle pieces coming together to form a computer screen][1] + +People regularly ask me to help them rescue Windows computers that have become locked or damaged. Sometimes, I can use a Linux USB boot drive to mount Windows partitions and then transfer and back up files from the damaged systems. + +Other times, clients lose their passwords or otherwise lock their login account credentials. One way to unlock an account is to create a Windows boot disk to repair the computer. Microsoft allows you to download copies of Windows from its website and offers tools to create a USB boot device. But to use them, you need a Windows computer, which means, as a Linux user, I need another way to create a boot DVD or USB drive. I have found it difficult to create Windows USBs on Linux. My reliable tools, like [Etcher.io][2], [Popsicle][3] (for Pop!_OS), and [UNetbootin][4], or using `dd` from the command line to create bootable media, have not been very successful. + +That is until I discovered [WoeUSB-ng][5], a [GPL 3.0][6] Linux tool that creates a bootable USB drive for Windows Vista, 7, 8, and 10. The open source software has two programs: a command-line utility and a graphical user interface (GUI) version. + +### Install WoeUSB-ng + +The GitHub repository contains instructions for [installing][7] WoeUSB-ng on Arch, Ubuntu, Fedora, or with pip3. + +If you're on a supported Linux operating system, you can install WoeUSB-ng using your package manager. Alternatively, you can use Python's package manager, [pip][8], to install the application. This is universal across any Linux distribution. There's no functional difference between these methods, so use whichever's familiar to you. + +I'm running Pop!_OS, which is an Ubuntu derivative, but being comfortable with Python, I chose the pip3 install: + + +``` +`$ sudo pip3 install WoeUSB-ng` +``` + +### Create a boot disk + +You can use WoeUSB-ng from the command line or the GUI version. + +To create a boot disk from the command line, the syntax requires the command, a path to your Windows ISO file (`/dev/sdX` in this example; use the `lsblk` command to determine your drive), and a device:  + + +``` +`$ sudo woeusb --device Windows.iso /dev/sdX` +``` + +You can also launch the program for an easy-to-use interface. In the WoeUSB-ng application window, find the Windows.iso file and select it. Choose your USB target device—the drive you want to make into a Windows boot drive. This will ERASE all information on this drive, so choose carefully—and then double-check (and triple-check) your choice! + +Once you're sure you have the right destination drive selected, click the **Install** button. + +![WoeUSB-ng UI][9] + +(Don Watkins, [CC BY-SA 4.0][10]) + +Creating media takes five to 10 minutes, depending on your Linux computer's processor, memory, USB port speed, etc. Be patient. + +Once the process is finished and verified, you have a functional Windows USB boot device to help someone repair their Windows computer. + +### Help others + +Open source is all about helping other people. Very often, you can help Windows users by using the Linux-based [System Rescue CD][11]. But sometimes, the only way to help is directly from Windows, and WoeUSB-ng is a great open source tool to make that possible. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/linux-woeusb + +作者:[Don Watkins][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/don-watkins +[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://etcher.io/ +[3]: https://github.com/pop-os/popsicle +[4]: https://github.com/unetbootin/unetbootin +[5]: https://github.com/WoeUSB/WoeUSB-ng +[6]: https://github.com/WoeUSB/WoeUSB-ng/blob/master/COPYING +[7]: https://github.com/WoeUSB/WoeUSB-ng#installation +[8]: https://opensource.com/downloads/pip-cheat-sheet +[9]: https://opensource.com/sites/default/files/uploads/woeusb-ng-gui.png (WoeUSB-ng UI) +[10]: https://creativecommons.org/licenses/by-sa/4.0/ +[11]: https://www.system-rescue.org/ From 12b894266a3bf11ca56318246060050cac75b9c4 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 18 Feb 2021 05:05:12 +0800 Subject: [PATCH 038/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210217=20?= =?UTF-8?q?4=20tech=20jobs=20for=20people=20who=20don't=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210217 4 tech jobs for people who don-t code.md --- ...7 4 tech jobs for people who don-t code.md | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 sources/tech/20210217 4 tech jobs for people who don-t code.md diff --git a/sources/tech/20210217 4 tech jobs for people who don-t code.md b/sources/tech/20210217 4 tech jobs for people who don-t code.md new file mode 100644 index 0000000000..63af4450e1 --- /dev/null +++ b/sources/tech/20210217 4 tech jobs for people who don-t code.md @@ -0,0 +1,144 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (4 tech jobs for people who don't code) +[#]: via: (https://opensource.com/article/21/2/non-engineering-jobs-tech) +[#]: author: (Dawn Parzych https://opensource.com/users/dawnparzych) + +4 tech jobs for people who don't code +====== +There are many roles in tech for people who aren't engineers. Explore +some of them in part 2 of this series. +![Looking at a map][1] + +In the [first article in this series][2], I explained how the tech industry divides people and roles into "technical" or "non-technical" categories and the problems associated with this. The tech industry makes it difficult for people interested in tech—but not coding—to figure out where they fit in and what they can do. + +If you're interested in technology or open source but aren't interested in coding, there are roles available for you. Any of these positions at a tech company likely require somebody who is tech-savvy but does not necessarily write code. You do, however, need to know the terminology and understand the product. + +I've recently noticed the addition of the word "technical" onto job titles such as technical account manager, technical product manager, technical community manager, etc. This mirrors the trend a few years ago where the word "engineer" was tacked onto titles to indicate the role's technical needs. After a while, everybody has the word "engineer" in their title, and the classification loses some of its allure. + +As I sat down to write these articles, this tweet from Tim Banks appeared in my timeline: + +> Women who've made career changes into tech, but aren't developers (think like infosec, data science/analysts, infra engineers, etc), what are some things you'd wished you'd known, resources that were valuable, or advice you'd have for someone looking to make a similar change? +> +> — Tim Banks is a buttery biscuit (@elchefe) [December 15, 2020][3] + +This follows the advice in my first article: Tim does not simply ask about "non-technical roles"; he provides more significant context. On a medium like Twitter, where every character counts, those extra characters make a difference. These are _technical_ roles. Calling them non-technical to save characters in a tweet would have changed the impact and meaning. + +Here's a sampling of non-engineering roles in tech that require technical knowledge. + +### Technical writer + +A [technical writer's job][4] is to transfer factual information between two or more parties. Traditionally, a technical writer provides instructions or documentation on how to use a technology product. Recently, I've seen the term "technical writer" refer to people who write other forms of content. Tech companies want a person to write blog posts for their developer audience, and this skill is different from copywriting or content marketing. + +**Technical skills required:** + + * Writing + * User knowledge or experience with a specific technology + * The ability to quickly come up to speed on a new product or feature + * Skill in various authoring environments + + + +**Good for people who:** + + * Can plainly provide step-by-step instructions + * Enjoy collaborating + * Have a passion for the active voice and Oxford comma + * Enjoy describing the what and how + + + +### Product manager + +A [product manager][5] is responsible for leading a product's strategy. Responsibilities may include gathering and prioritizing customers' requirements, writing business cases, and training the sales force. Product managers work cross-functionally to successfully launch a product using a combination of creative and technical skills. Product managers require deep product expertise. + +**Technical skills required:** + + * Hands-on product knowledge and the ability to configure or run a demo + * Knowledge of the technological ecosystem related to the product + * Analytical and research skills + + + +**Good for people who:** + + * Enjoy strategizing and planning what comes next + * Can see a common thread in different people's needs + * Can articulate the business needs and requirements + * Enjoy describing the why + + + +### Data analyst + +Data analysts are responsible for collecting and interpreting data to help drive business decisions such as whether to enter a new market, what customers to target, or where to invest. The role requires knowing how to use all of the potential data available to make decisions. We tend to oversimplify things, and data analysis is often over-simplified. Getting the right information isn't as simple as writing a query to "select all limit 10" to get the top 10 rows. You need to know what tables to join. You need to know how to sort. You need to know whether the data needs to be cleaned up in some way before or after running the query. + +**Technical skills required:** + + * Knowledge of SQL, Python, and R + * Ability to see and extract patterns in data + * Understanding how things function end to end + * Critical thinking + * Machine learning + + + +**Good for people who:** + + * Enjoy problem-solving + * Desire to learn and ask questions + + + +### Developer relations + +[Developer relations][6] is a relatively new discipline in technology. It encompasses the roles of [developer advocate][7], developer evangelist, and developer marketing, among others. These roles require you to communicate with developers, build relationships with them, and help them be more productive. You advocate for the developers' needs to the company and represent the company to the developer. Developer relations can include writing articles, creating tutorials, recording podcasts, speaking at conferences, and creating integrations and demos. Some say you need to have worked as a developer to move into developer relations. I did not take that path, and I know many others who haven't. + +**Technical skills required:** + +These will be highly dependent on the company and the role. You will need some (not all) depending on your focus. + + * Understanding technical concepts related to the product + * Writing + * Video and audio editing for tutorials and podcasts + * Speaking + + + +**Good for people who:** + + * Have empathy and want to teach and empower others + * Can advocate for others + * Are creative + + + +### Endless possibilities + +This is not a comprehensive list of all the non-engineering roles available in tech, but a sampling of some of the roles available for people who don't enjoy writing code daily. If you're interested in a tech career, look at your skills and what roles would be a good fit. The possibilities are endless. To help you in your journey, in the final article in this series, I'll share some advice from people who are in these roles. + +There are lots of non-code ways to contribute to open source: Here are three alternatives. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/non-engineering-jobs-tech + +作者:[Dawn Parzych][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/dawnparzych +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tips_map_guide_ebook_help_troubleshooting_lightbulb_520.png?itok=L0BQHgjr (Looking at a map) +[2]: https://opensource.com/article/21/2/what-does-it-mean-be-technical +[3]: https://twitter.com/elchefe/status/1338933320147750915?ref_src=twsrc%5Etfw +[4]: https://opensource.com/article/17/5/technical-writing-job-interview-tips +[5]: https://opensource.com/article/20/2/product-management-open-source-company +[6]: https://www.marythengvall.com/blog/2019/5/22/what-is-developer-relations-and-why-should-you-care +[7]: https://opensource.com/article/20/10/open-source-developer-advocates From 8f8ac66c6a6adf1adb86e6181c30dc82a76bf9ae Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 18 Feb 2021 05:05:26 +0800 Subject: [PATCH 039/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210216=20?= =?UTF-8?q?How=20to=20install=20Linux=20in=203=20steps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210216 How to install Linux in 3 steps.md --- ...0210216 How to install Linux in 3 steps.md | 146 ++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 sources/tech/20210216 How to install Linux in 3 steps.md diff --git a/sources/tech/20210216 How to install Linux in 3 steps.md b/sources/tech/20210216 How to install Linux in 3 steps.md new file mode 100644 index 0000000000..fd860505c8 --- /dev/null +++ b/sources/tech/20210216 How to install Linux in 3 steps.md @@ -0,0 +1,146 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to install Linux in 3 steps) +[#]: via: (https://opensource.com/article/21/2/linux-installation) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +How to install Linux in 3 steps +====== +Operating system installations may seem mysterious, but they are +actually pretty straight forward. Here are the steps for a successful +Linux installation. +![bash logo on green background][1] + +In 2021, there are more reasons why people love Linux than ever before. In this series, I'll share 21 different reasons to use Linux. Here's how to install Linux.  + +Installing an operating system (OS) is always daunting. It's something of a puzzle to most people: Installing an OS can't happen from inside the OS because it either hasn't been installed, or it's about to be replaced by a different one, so how does it happen? And worse yet, it usually involves confusing questions about hard drive formats, install destinations, time zones, user names, passwords, and a bunch of other stuff that you just don't normally think about. Linux distributions know this, and so they've worked diligently over the years to reduce the time you spend in the OS installer down to the absolute minimum. + +### What happens when you install + +Whether you're installing just an application or a whole operating system, the process of _installation_ is just a fancy way to copy files from one medium to another. Regardless of any user interface or animations used to disguise the procedure as something highly specialized, it all amounts to the same thing in the end: Files that were once stored on a disc or drive are copied to specific locations on your hard drive. + +When it's an application being installed, the valid locations for those files are highly restricted to your _file system_ or the part of your hard drive that your operating system knows it can use. This is significant because it's possible to partition a hard drive into separate spaces (Apple used this trick back in the early '00s for what they called "Bootcamp", allowing users to install both macOS and Windows onto a drive, but as separate entities). When you install an operating system, some special files are installed into places on your drive that are normally off-limits. More importantly, all existing data on your drive is, at least by default, erased to make room for the new system, so creating a backup is _essential_. + +### Installers + +Technically speaking, you don't actually _need_ an installer to install applications or even operating systems. Believe it or not, some people install Linux manually, by mounting a blank hard drive, compiling code, and copying files. This is accomplished with the help of a project called [Linux From Scratch (LFS)][2]. This project aims to help enthusiasts, students, and future OS designers to learn more about how computers work and what function each component performs. This isn't the recommended method of installing Linux, but you'll find that in open source, it's usually true that _if_ something can be done, then somebody's doing it. And it's a good thing, too, because these niche interests very often lead to surprisingly useful innovations. + +Assuming you're not trying to reverse engineer Linux, though, the normal way to install it is with an install disc or install image. + +### 3 easy steps to install Linux + +When you boot from a Linux install DVD or thumb drive, you're placed into a minimal operating environment designed to run one or more useful applications. The installer is the primary application, but because Linux is such a flexible system, you can usually also run standard desktop applications to get a feel for what the OS is like before you commit to installing it. + +Different Linux distributions have different installer interfaces. Here are two examples: + +Fedora Linux has a flexible installer (called **Anaconda**) capable of complex system configuration. + +![Anaconda installer screen on Fedora][3] + +The Anaconda installer on Fedora + +Elementary OS has a simple installer designed primarily for an install on a personal computer: + +![Elementary OS installer][4] + +Elementary OS installer + +#### 1\. Get an installer + +The first step toward installing Linux is to download an installer. You obtain a Linux install image from the distribution you've chosen to try. + + * [Fedora][5] is famous for being the first to update its software + * [Linux Mint][6] provides easy options to install missing drivers + * [Elementary][7] provides a beautiful desktop experience and several special, custom-built applications + + + +Linux installers are `.iso` files, which are "blueprints" for DVD media. You can burn the `.iso` file to a DVD-R if you still use optical media, or you can _flash_ it to a USB drive (make sure it's an empty USB drive, as all of its contents are erased when the image is flashed onto it). To flash an image to a USB drive, you can [use the open source Etcher application][8]. + +![Etcher used to flash a USB thumb drive][9] + +Etcher application can flash a USB thumb drive + +You're now ready to install Linux. + +#### 2\. Boot order + +To install an OS onto a computer, you must boot to the OS installer. This is not common behavior for a computer because it's so rarely done. In theory, you install an OS once, and then you update it. When you opt to install a different operating system onto a computer, you're interrupting that normal lifecycle. That's not a bad thing. It's your computer, so you have the authority to do re-image it. However, it's different from the default behavior of a computer, which is to boot to whatever operating system it finds on the hard drive immediately after being powered on. + +Before installing Linux, you must back up any data you have on your target computer because it will all be erased upon installation. + +Assuming you've saved your data to an external hard drive, which you've then secreted away to somewhere safe (and not attached to your computer), then you're ready to proceed. + +First, attach the USB drive containing your Linux installer to your computer. Power on the computer and watch the screen for some indication of how to interrupt its default boot sequence. This is usually a key like **F2**, **F8**, **Esc**, or even **Del**, but it varies depending on your motherboard manufacturer. If you miss your window of opportunity, just wait for the default OS to load, and then reboot and try again. + +When you interrupt the boot sequence, your computer prompts you for boot instructions. Specifically, the firmware embedded into the motherboard needs to know what drive to look to for an operating system it can load. In this case, you want the computer to boot from the USB drive containing the Linux image. How you're prompted for this information varies, depending on the motherboard manufacturer. Sometimes, it's a very direct question complete with a menu: + +![Boot device menu][10] + +The boot device selection menu + +Other times, you're taken into a rudimentary interface you can use to set the boot order. Computers are usually set by default to look to the internal hard drive first. Failing that, it moves on to a USB drive, a network drive, or an optical drive. You need to tell your computer to look for a USB drive _first_ so that it bypasses its own internal hard drive and instead boots the Linux image on your USB drive. + +![BIOS selection screen][11] + +BIOS selection screen + +This may seem daunting at first, but once you get familiar with the interface, it's a quick and easy task. You won't have to do this once Linux is installed because, after that, you'll want your computer to boot off the internal hard drive again. This is a great trick to get comfortable with, though, because it's the key to using Linux off of a thumb drive, testing a computer for Linux compatibility before installing, and general troubleshooting regardless of what OS is involved. + +Once you've selected your USB drive as the boot device, save your settings, let the computer reset, and boot to the Linux image. + +#### 3\. Install Linux + +Once you've booted into the Linux installer, it's just a matter of stepping through prompts. + +The Fedora installer, Anaconda, presents you a "menu" of all the things you can customize prior to installation. Most are set to sensible defaults and probably require no interaction from you, but others are marked with alert symbols to indicate that your configurations can't safely be guessed and so need to be set. These include the location of the hard drive you want the OS installed onto and the user name you want to use for your account. Until you resolve these issues, you can't proceed with the installation. + +For the hard drive location, you must know which drive you want to erase and re-image with your Linux distribution of choice. This might be an obvious choice on a laptop that has only one drive, to begin with: + +![Screen to select the installation drive][12] + +Select the drive to install the OS to (there's only one drive in this example) + +If you've got more than one drive in your computer, and you only want Linux on one of them, or else you want to treat both drives as one, then you must help the installer understand your goal. It's easiest to assign just one drive to Linux, letting the installer perform automatic partitioning and formatting, but there are plenty of other options for advanced users. + +Your computer must have at least one user, so create a user account for yourself. Once that's done, you can click the **Done** button at last and install Linux. + +![Anaconda options complete and ready for installation][13] + +Anaconda options are complete and you're ready to install + +Other installers can be even simpler, believe it or not, so your experience may differ from the images in this article. No matter what, the install process is one of the easiest operating system installations available outside of getting something pre-installed for you, so don't let the idea of installing an OS intimidate you. This is your computer. You can and should install an OS in which you have ownership. + +### Own your computer + +Ultimately, Linux is your OS. It's an operating system developed by people from all over the world, with one interest at heart: Create a computing culture of participation, mutual ownership, and co-operative stewardship. If you're interested in getting to know open source better, then take the step to know one of its shining examples and install Linux. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/linux-installation + +作者:[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/bash_command_line.png?itok=k4z94W2U (bash logo on green background) +[2]: http://www.linuxfromscratch.org +[3]: https://opensource.com/sites/default/files/anaconda-installer.png +[4]: https://opensource.com/sites/default/files/elementary-installer.png +[5]: http://getfedora.org +[6]: http://linuxmint.com +[7]: http://elementary.io +[8]: https://opensource.com/article/18/7/getting-started-etcherio +[9]: https://opensource.com/sites/default/files/etcher_0.png +[10]: https://opensource.com/sites/default/files/boot-menu.jpg +[11]: https://opensource.com/sites/default/files/bios_1.jpg +[12]: https://opensource.com/sites/default/files/install-harddrive-chooser.png +[13]: https://opensource.com/sites/default/files/anaconda-done.png From 48a86a51e7b0f7e6813c61b398c7a4af71961311 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 18 Feb 2021 05:05:40 +0800 Subject: [PATCH 040/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210216=20?= =?UTF-8?q?How=20Ansible=20got=20started=20and=20grew?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210216 How Ansible got started and grew.md --- ...210216 How Ansible got started and grew.md | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 sources/tech/20210216 How Ansible got started and grew.md diff --git a/sources/tech/20210216 How Ansible got started and grew.md b/sources/tech/20210216 How Ansible got started and grew.md new file mode 100644 index 0000000000..baa71d6ea1 --- /dev/null +++ b/sources/tech/20210216 How Ansible got started and grew.md @@ -0,0 +1,86 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How Ansible got started and grew) +[#]: via: (https://opensource.com/article/21/2/ansible-origin-story) +[#]: author: (Ben Rometsch https://opensource.com/users/flagsmith) + +How Ansible got started and grew +====== +Ansible's founder Michael DeHaan shares how his background led him to +develop the IT automation software. +![gears and lightbulb to represent innovation][1] + +Recently, Flagsmith founder Ben Rometsch [spoke to Michael DeHaan][2], founder of open source IT automation software Ansible (now part of IBM/Red Hat), on [The Craft of Open Source podcast][3] about how he developed Ansible and what he's been doing since. + +> "If people aren't successful trying (your app/tool) out in about 30 minutes, they're going to move on. You have to make somebody successful within their lunch hour. I spent a lot of time thinking about the documentation." +> —Michael DeHaan + +His remarks were fascinating and enlightening, especially for anyone interested in open source software as a developer, creator, or community member. Read on for a summary of the conversation. + +### How Michael started in open source + +When Michael joined Red Hat's emerging technologies team in 2005, it was the beginning of his journey with open source projects. The team gave him carte blanche to work on any projects he wanted, as long as they helped customers. + +At the time, Xen and KVM were becoming available, and the team wanted to create a good solution to automate a PXE bare-metal infrastructure. Michael created his first open source project, [Cobbler][4], to automate those installs, and it became fairly widely used. + +Func was Michael's next open source project. It came from filling in the gaps between software that enabled bare-metal provisioning and configuration management tools. Func became fairly well deployed, with Fedora using it in some of its infrastructure. Some of Func's concepts and ideas later influenced Ansible. + +### The birth of Ansible + +Ansible came after Michael spent a short spell working for Puppet. Afterward, he worked for another company that was trying to create an integration, but the job wasn't a good fit, and he wanted to return to working on a project in the open source community. + +Frustrated that it still took several days (or longer) to get a setup working due to [DNS][5] and [NTP][6] problems, Michael decided to create an open source solution to automate installations. The idea was to build something SSH- and push-based, without a load of management agents. + +[Ansible][7] was the result of this design goal. It provided an easy, quick solution, rather than spending hours or days using tools like Chef and Puppet. At the time, companies were employing full-time teams of people to manage cloud installations and configurations. Ansible provided a solution that one person could employ in less than one day. + +### Ansible: The right tool for the right time + +Part of Ansible's success was due to timing, Michael says. There was a demand for greater cloud integration and a quick, convenient way to upload content and install apps on cloud systems. + +It would be difficult for a full-time developer to have the time to create something like Ansible in today's world, as things are much more highly scheduled. He says people expect a complete product, not a work in progress with a supportive user community that has the time to experiment and play with a new coding language. Times have changed. + +Also, Ansible was released in 2012, when the demand for [automation was growing][8] more rapidly than now. While some companies have mastered the art of automation and are focusing more on Kubernetes and other things, others continue to discover it. Most companies do their own programming now, with teams of developers creating fully polished solutions. These days, people are using React and Kubernetes, which build on dependencies, rather than starting from scratch on an open source project. + +With Ansible, most of the open source work was in the libraries and the packaging. Michael remembers that they were learning as they went along, initially unsure of how to run a systems-management project in a way that gets lots of feedback from people and can evolve. Puppet and Chef provided a template for how to accomplish this, mostly through trial and error. Michael set up a large number of IRC channel conversations, which allowed direct communication with various use cases. + +Ansible's documentation was key for developers taking it to the next level. It was simple, to the point, used short and persuasive sentences, and included free trial offers. The documentation made it clear to users that Ansible could be run on their own infrastructure without security concerns. + +### Marketing and promotion + +The buzz around Ansible was generated mainly through blog posts, articles, tutorials, and opinions shared on social media. Occasionally, it would break through onto the pages of Hacker News, or a Reddit thread would become popular.  + +Michael focused on creating shareworthy content that people could link to. He also made sure that he read every comment and tweet to gain as much feedback as possible to take the project in the right direction. + +As momentum grew, Michael hired some employees to help him scale up, but he retained creative control and overall project management. When Michael left the Ansible team in 2015, there were around 400 modules, which made management pretty tricky. + +### Life after Ansible + +Michael now works mainly on Django and Python software development, with some apps and projects on the side, including the [WARP][9] music sequencer. + +To discover more about Ansible and Michael's views on today's open source landscape, burnout, GitHub, Google Reader, and much more, [check out the full podcast][2]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/ansible-origin-story + +作者:[Ben Rometsch][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/flagsmith +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/innovation_lightbulb_gears_devops_ansible.png?itok=TSbmp3_M (gears and lightbulb to represent innovation) +[2]: https://www.flagsmith.com/podcast/03-ansible +[3]: https://www.flagsmith.com/podcast +[4]: https://en.wikipedia.org/wiki/Cobbler_(software) +[5]: https://en.wikipedia.org/wiki/Domain_Name_System +[6]: https://en.wikipedia.org/wiki/Network_Time_Protocol +[7]: https://www.ansible.com/ +[8]: https://www.redhat.com/en/blog/new-report-finds-automation-paves-way-business-and-technical-benefits-alike +[9]: https://warpseq.com/ From 8f4fc16ed72cffdea6abc1264f954ca198f01bcb Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 18 Feb 2021 05:05:54 +0800 Subject: [PATCH 041/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210216=20?= =?UTF-8?q?What=20does=20being=20'technical'=20mean=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210216 What does being -technical- mean.md --- ...210216 What does being -technical- mean.md | 177 ++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 sources/tech/20210216 What does being -technical- mean.md diff --git a/sources/tech/20210216 What does being -technical- mean.md b/sources/tech/20210216 What does being -technical- mean.md new file mode 100644 index 0000000000..c6ef69f293 --- /dev/null +++ b/sources/tech/20210216 What does being -technical- mean.md @@ -0,0 +1,177 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What does being 'technical' mean?) +[#]: via: (https://opensource.com/article/21/2/what-technical) +[#]: author: (Dawn Parzych https://opensource.com/users/dawnparzych) + +What does being 'technical' mean? +====== +Dividing people into "technical" and "non-technical" labels harms people +and organizations. Learn why in part 1 of this series. +![question mark in chalk][1] + +The word "technical" describes many subjects and disciplines: _technical_ knock-out, _technical_ foul, _technical_ courses for rock-climbing competitions, and _technical_ scores for figure skating in sports. The popular cooking show _The Great British Bake-Off_ includes a _technical_ baking challenge. Anybody who has participated in the theatre may be familiar with _technical_ week, the week before the opening night of play or musical. + +As you can see, the word _technical_ does not apply strictly to software engineering and operations, so when we call a person or a role "technical," what do we mean, and why do we use the term? + +Over my 20-year career in tech, these questions have intrigued me, so I decided to explore this through a series of interviews. I am not an engineer, and I don't write code, yet this does not make me non-technical. But I'm regularly labeled such. I consider myself technical, and through this series, I hope you will come to understand why. + +I know I'm not alone in this. It is important to discuss because how a person or role is defined and viewed affects their confidence and ability to do their job well. If they feel crushed or disrespected, it will bring down their work quality and squash innovation and new ideas. It all trickles down, you see, so how can we improve this situation? + +I started by interviewing seven people across a variety of roles. + +In this series, I'll explore the meaning behind the word "technical," the technical continuum, the unintended side effects of categorizing people as technical or non-technical, and technical roles that are often considered non-technical. + +### Defining technical and non-technical + +To start, we need definitions. According to Dictionary.com, "technical" is an adjective with multiple meanings, including: + + * Belonging or pertaining to an art, science, or the like + * Skilled in or familiar in a practical way with a particular art or trade + * Technically demanding or difficult (typically used in sports or arts) + + + +The term "non-technical" is often used in tech companies to describe people in non-engineering roles. The definition of "non-technical" is "not relating to, characteristic of, or skilled in a particular field of activity and its terminology." + +As somebody who writes and speaks about technology, I consider myself technical. It is impossible to write or speak about a technical subject if you aren't familiar with the field and the terminology. With this understanding, everyone who works in tech is technical. + +### Why we assign labels + +So why does technical vs. non-technical matter in the technology field? What are we trying to achieve by assigning these labels? Is there a good reason, was there a good reason, and have we gotten away from those reasons and need to re-evaluate? Let's discuss. + +When I hear people talk about technical vs. non-technical people, I can't help but think of the Dr. Seuss story [_The Sneetches_][2]. Having a star (or not) was seen as something to aspire to. The Sneetches got into an infinite loop trying to achieve the right status. + +Labels can serve a purpose, but when they force a hierarchy of one group being viewed as better than another, they can become dangerous. Think about your organization or your department: Which group—sales, support, marketing, QA, engineering, etc.—is above or below another in importance? + +Even if it's not spoken directly or written somewhere, there is likely an understood hierarchy. These hierarchies often exist within disciplines, as well. Liz Harris, a technical content manager, says there are degrees of "technicalness" within the technical writing community. "Within technical writers, there's a hierarchy where the more technical you are, the more you get paid, and often the more you get listened to in the technical writing community." + +The term "technical" is often used to refer to the level of depth or expertise a person has on a subject. A salesperson may ask for a technical resource to help a customer. By working in tech, they are technical, but they need somebody with deeper expertise and knowledge about a subject than they have. So requesting a technical resource may be vague. Do you need a person with in-depth knowledge of the product? Do you need a person with knowledge of the infrastructure stack? Or somebody to write down steps on how to configure the API? + +Instead of viewing people as either technical or not, we need to start viewing technical ability as a continuum. What does this mean? Mary Thengvall, a director of developer relations, describes how she categorizes the varying depths of technical knowledge needed for a particular role. For instance, projects can require a developer, someone with a developer background, or someone tech-savvy. It's the people who fall into the tech-savvy category who often get labeled as non-technical. + +According to Mary, you're tech-savvy if "you can explain [a technical] topic, you know your way around the product, you know the basics of what to say and what not to say. You don't have to have a technical background, but you need to know the high-level technical information and then also who to point people to for more information." + +### The problem with labels + +When we're using labels to get specific about what we need to get a job done, they can be helpful, like "developer," "developer background," and "tech-savvy." But when we use labels too broadly, putting people into one of two groups can lead to a sense of "less than" and "better than." + +When a label becomes a reality, whether intended or not, we must look at ourselves and reassess our words, labels, and intentions. + +Senior product manager Leon Stigter offers his perspective: "As a collective industry, we are building more technology to make it easier for everyone to participate. If we say to everyone, 'you're not technical, or 'you are technical' and divide them into groups, people that are labeled as non-technical may never think, 'I can do this myself.' We actually need all those people to really think about where we are going as an industry, as a community, and I would almost say as human beings." + +#### Identity + +If we attach our identities to a label, what happens when we think that label no longer applies? When Adam Gordon Bell moved from being a developer to a manager, he struggled because he always identified as technical, and as a manager, those technical skills weren't being used. He felt he was no longer contributing value. Writing code does not provide more value than helping team members grow their careers or making sure a project is delivered on time. There is value in all roles because they are all needed to ensure the creation, execution, and delivery of goods and services. + +"I think that the reason I became a manager was that we had a very smart team and a lot of really skilled people on it, and we weren't always getting the most amazing work done. So the technical skills were not the limiting factor, right? And I think that often they're not," says Adam. + +Leon Stigter says that the ability to get people to work together and get amazing work done is a highly valued skill and should not be less valued than a technical role. + +#### Confidence + +[Impostor syndrome][3] is the inability to recognize your competence and knowledge, leading to reduced confidence and the ability to get your work done and done well. Impostor syndrome can kick in when you apply to speak at a conference, submit an article to a tech publication, or apply for a job. Impostor syndrome is the tiny voice that says: + + * "I'm not technical enough for this role." + * "I know more technical people that would do a better job delivering this talk." + * "I can't write for a technical publication like Opensource.com. I work in marketing." + + + +These voices can get louder the more often you label somebody or yourself as non-technical. This can easily result in not hearing new voices at conferences or losing talented people on your team. + +#### Stereotypes + +What image do you see when you think of somebody as technical? What are they wearing? What other characteristics do they have? Are they outgoing and talkative, or are they shy and quiet? + +Shailvi Wakhlu, a senior director of data, started her career as a software engineer and transitioned to data and analytics. "When I was working as a software engineer, a lot of people made assumptions about me not being very technical because I was very talkative, and apparently that automatically means you're not technical. They're like, 'Wait. You're not isolating in a corner. That means you're not technical,'" she reports. + +Our stereotypes of who is technical vs. non-technical can influence hiring decisions or whether our community is inclusive. You may also offend somebody—even a person you need help from. Years ago, I was working at the booth at a conference and asked somebody if I could help them. "I'm looking for the most technical person here," he responded. He then went off in search of an answer to his question. A few minutes later, the sales rep in the booth walked over to me with the gentleman and said, "Dawn, you're the best person to answer this man's question." + +#### Stigma + +Over time, we've inflated the importance of "technical" skills, which has led to the label "non-technical" being used in a derogatory way. As technology boomed, the value placed on people who code increased because that skill brought new products and ways of doing business to market and directly helped the bottom line. However, now we see people intentionally place technical roles above non-technical roles in ways that hinder their companies' growth and success. + +Interpersonal skills are often referred to as non-technical skills. Yet, there are highly technical aspects to them, like providing step-by-step instructions on how to complete a task or determining the most appropriate words to convey a message or a point. These skills also are often more important in determining your ability to be successful at work. + +**[Read next: [Goodbye soft skills, hello core skills: Why IT must rebrand this critical competency][4]]** + +Reading through articles and definitions on Urban Dictionary, it's no wonder people feel justified in their labeling and others develop impostor syndrome or feel like they've lost their identity. When performing a search online, Urban Dictionary definitions often appear in the top search results. The website started about 20 years ago as a crowdsourced dictionary defining slang, cultural expressions, and other terms, and it has turned into a site filled with hostile and negative definitions. + +Here are a few examples: Urban Dictionary defines a non-technical manager as "a person that does not know what the people they manage are meant to do." + +Articles that provide tips for how to talk to "non-technical" people include phrases like: + + * "If I struggled, how on earth did the non-technical people cope?" + * "Among today's career professionals, developers and engineers have some of the most impressive skill sets around, honed by years of tech training and real-world experience." + + + +These sentences imply that non-engineers are inferior, that their years of training and real-world experiences are somehow not as impressive. One person I spoke to for this project was Therese Eberhard. Her job is what many consider non-technical. She's a scenic painter. She paints props and scenery for film and theatre. Her job is to make sure props like Gandalf's cane appear lifelike rather than like a plastic toy. There's a lot of problem-solving and experimenting with chemical reactions required to be successful in this role. Therese honed these skills over years of real-world experience, and, to me, that's quite impressive. + +#### Gatekeeping + +Using labels erects barriers and can lead to gatekeeping to decide who can be let into our organization, our teams, our communities. + +According to Eddie Jaoude, an open source developer, "The titles 'technical,' 'developer,' or 'tester' create barriers or authority where it shouldn't be. And I've really come to the point of view where it's about adding value to the team or for the project—the title is irrelevant." + +If we view each person as a team member who should contribute value in one way or another, not on whether they write documentation or test cases or code, we will be placing importance based on what really matters and creating a team that gets amazing work done. If a test engineer wants to learn to write code or a coder wants to learn how to talk to people at events, why put up barriers to prevent that growth? Embrace team members' eagerness to learn and change and evolve in any direction that serves the team and the company's mission. + +If somebody is failing in a role, instead of writing them off as "not technical enough," examine what the problem really is. Did you need somebody skilled at JavaScript, and the person is an expert in a different programming language? It's not that they're not technical. There is a mismatch in skills and knowledge. You need the right people doing the right role. If you force somebody skilled at business analysis and writing acceptance criteria into a position where they have to write automated test cases, they'll fail. + +### How to retire the labels + +If you're ready to shift the way you think about the labels technical and non-technical, here are a few tips to get started. + +#### Find alternative words + +I asked everyone I interviewed what words we could use instead of technical and non-technical. No one had an answer! I think the challenge here is that we can't boil it down to a single word. To replace the terms, you need to use more words. As I wrote earlier, what we need to do is get more specific. + +How many times have you said or heard a phrase like: + + * "I'm looking for a technical resource for this project." + * "That candidate isn't technical enough." + * "Our software is designed for non-technical users." + + + +These uses of the words technical and non-technical are vague and don't convey their full meaning. A truer and more detailed look at what you need may result in: + + * "I'm looking for a person with in-depth knowledge of how to configure Kubernetes." + * "That candidate didn't have deep enough knowledge of Go." + * "Our software is designed for sales and marketing teams." + + + +#### Embrace a growth mindset + +Knowledge and skills are not innate. They are developed over hours or years of practice and experience. Thinking, "I'm just not technical enough" or "I can't learn how to do marketing" reflects a fixed mindset. You can learn technical abilities in any direction you want to grow. Make a list of your skills—ones you think of as technical and some as non-technical—but make them specific (like in the list above). + +#### Recognize everyone's contributions + +If you work in the tech industry, you're technical. Everyone has a part to play in a project's or company's success. Share the accolades with everyone who contributes, not only a select few. Recognize the product manager who suggested a new feature, not only the engineers who built it. Recognize the writer whose article went viral and generated new leads for your company. Recognize the data analyst who found new patterns in the data. + +### Next steps + +In the next article in this series, I'll explore non-engineering roles in tech that are often labeled "non-technical." + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/what-technical + +作者:[Dawn Parzych][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/dawnparzych +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/question-mark_chalkboard.jpg?itok=DaG4tje9 (question mark in chalk) +[2]: https://en.wikipedia.org/wiki/The_Sneetches_and_Other_Stories +[3]: https://opensource.com/business/15/9/tips-avoiding-impostor-syndrome +[4]: https://enterprisersproject.com/article/2019/8/why-soft-skills-core-to-IT From 572283f9013b86765da14a5ce44f548738db825e Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 18 Feb 2021 09:10:50 +0800 Subject: [PATCH 042/818] translated --- ... With A Focus on Privacy and Minimalism.md | 108 ------------------ ... With A Focus on Privacy and Minimalism.md | 108 ++++++++++++++++++ 2 files changed, 108 insertions(+), 108 deletions(-) delete mode 100644 sources/tech/20210209 Viper Browser- A Lightweight Qt5-based Web Browser With A Focus on Privacy and Minimalism.md create mode 100644 translated/tech/20210209 Viper Browser- A Lightweight Qt5-based Web Browser With A Focus on Privacy and Minimalism.md diff --git a/sources/tech/20210209 Viper Browser- A Lightweight Qt5-based Web Browser With A Focus on Privacy and Minimalism.md b/sources/tech/20210209 Viper Browser- A Lightweight Qt5-based Web Browser With A Focus on Privacy and Minimalism.md deleted file mode 100644 index 9fbc97ed85..0000000000 --- a/sources/tech/20210209 Viper Browser- A Lightweight Qt5-based Web Browser With A Focus on Privacy and Minimalism.md +++ /dev/null @@ -1,108 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Viper Browser: A Lightweight Qt5-based Web Browser With A Focus on Privacy and Minimalism) -[#]: via: (https://itsfoss.com/viper-browser/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Viper Browser: A Lightweight Qt5-based Web Browser With A Focus on Privacy and Minimalism -====== - -_**Brief: Viper Browser is a Qt-based browser that offers a simple user experience keeping privacy in mind.**_ - -While the majority of the popular browsers run on top of Chromium, unique alternatives like [Firefox][1], [Beaker Browser][2], and some other [chrome alternatives][3] should not cease to exist. - -Especially, considering Google’s recent potential thought of stripping [Google Chrome-specific features from Chromium][4] giving an excuse of abuse. - -In the look-out for more Chrome alternatives, I came across an interesting project “[Viper Browser][5]” as per our reader’s suggestion on [Mastodon][6]. - -### Viper Browser: An Open-Source Qt5-based Browser - -_**Note**: Viper Browser is fairly a new project with a couple of contributors. It lacks certain features which I’ll be mentioning as you read on._ - -![][7] - -Viper is an interesting web browser that focuses on being a powerful yet lightweight option while utilizing [QtWebEngine][8]. - -QtWebEngine borrows the code from Chromium but it does not include the binaries and services that connect to the Google platform. - -I spent some time using it and performing some daily browsing activities and I must say that I’m quite interested. Not just because it is something simple to use (how complicated a browser can be), but it also focuses on enhancing your privacy by giving you the option to add different Ad blocking options along with some useful options. - -![][9] - -Even though I think it is not meant for everyone, it is still worth taking a look. Let me highlight the features briefly before you can proceed trying it out. - -### Features of Viper Browser - -![][10] - -I’ll list some of the key features that you can find useful: - - * Ability to manage cookies - * Multiple preset options to choose different Adblocker networks - * Simple and easy to use - * Privacy-friendly default search engine – [Startpage][11] (you can change this) - * Ability to add user scripts - * Ability to add new user agents - * Option to disable JavaScript - * Ability to prevent images from loading up - - - -In addition to all these highlights, you can easily tweak the privacy settings to remove your history, clean cookies when existing, and some more options. - -![][12] - -### Installing Viper Browser on Linux - -It just offers an AppImage file on its [releases section][13] that you can utilize to test on any Linux distribution. - -In case you need help, you may refer to our guide on [using AppImage file on Linux][14] as well. If you’re curious, you can explore more about it on [GitHub][5]. - -[Viper Browser][5] - -### My Thoughts on Using Viper Browser - -I don’t think it is something that could replace your current browser immediately but if you are interested to test out new projects that are trying to offer Chrome alternatives, this is surely one of them. - -When I tried logging in my Google account, it prevented me by mentioning that it is potentially an insecure browser or unsupported browser. So, if you rely on your Google account, it is a disappointing news. - -However, other social media platforms work just fine along with YouTube (without signing in). Netflix is not something supported but overall the browsing experience is quite fast and usable. - -You can install user scripts, but Chrome extensions aren’t supported yet. Of course, it is either intentional or something to be looked after as the development progresses considering it as a privacy-friendly web browser. - -### Wrapping Up - -Considering that this is a less-known yet something interesting for some, do you have any suggestions for us to take a look at? An open-source project that deserves coverage? - -Let me know in the comments down below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/viper-browser/ - -作者:[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://www.mozilla.org/en-US/firefox/new/ -[2]: https://itsfoss.com/beaker-browser-1-release/ -[3]: https://itsfoss.com/open-source-browsers-linux/ -[4]: https://www.bleepingcomputer.com/news/google/google-to-kill-chrome-sync-feature-in-third-party-browsers/ -[5]: https://github.com/LeFroid/Viper-Browser -[6]: https://mastodon.social/web/accounts/199851 -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/viper-browser.png?resize=800%2C583&ssl=1 -[8]: https://wiki.qt.io/QtWebEngine -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/viper-browser-setup.jpg?resize=793%2C600&ssl=1 -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/viper-preferences.jpg?resize=800%2C660&ssl=1 -[11]: https://www.startpage.com -[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/viper-browser-tools.jpg?resize=800%2C262&ssl=1 -[13]: https://github.com/LeFroid/Viper-Browser/releases -[14]: https://itsfoss.com/use-appimage-linux/ diff --git a/translated/tech/20210209 Viper Browser- A Lightweight Qt5-based Web Browser With A Focus on Privacy and Minimalism.md b/translated/tech/20210209 Viper Browser- A Lightweight Qt5-based Web Browser With A Focus on Privacy and Minimalism.md new file mode 100644 index 0000000000..eda14eb676 --- /dev/null +++ b/translated/tech/20210209 Viper Browser- A Lightweight Qt5-based Web Browser With A Focus on Privacy and Minimalism.md @@ -0,0 +1,108 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Viper Browser: A Lightweight Qt5-based Web Browser With A Focus on Privacy and Minimalism) +[#]: via: (https://itsfoss.com/viper-browser/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +Viper 浏览器:一款基于 Qt5 的轻量级浏览器,注重隐私和简约 +====== + +**简介:Viper 浏览器是一个基于 Qt 的浏览器,它提供了简单的用户体验,同时考虑到隐私问题。**_ + +虽然大多数流行的浏览器都运行在 Chromium 之上,但像 [Firefox][1]、[Beaker 浏览器][2]以及其他一些 [chrome 替代品][3]这样独特的替代品不应该停止存在。 + +尤其是考虑到谷歌最近可能想到从 Chromium 中剥离[谷歌浏览器特有的功能][4],并给出了滥用的借口。 + +在寻找更多的 Chrome 替代品时,我在 [Mastodon][6] 上看到了一个有趣的项目 “[Viper 浏览器][5]”。 + +### Viper 浏览器:一个基于 Qt5 的开源浏览器 + +_**注意**:Viper 浏览器是一个只有几个贡献者的相当新的项目。它缺乏某些功能,我将在下文提及。_ + +![][7] + +Viper 是一款有趣的网络浏览器,在利用 [QtWebEngine][8] 的同时,它专注于成为一个强大而又轻巧的选择。 + +QtWebEngine 借用了 Chromium 的代码,但它不包括连接到 Google 平台的二进制文件和服务。 + +我花了一些时间使用它并进行一些日常浏览活动,我必须说,我对它相当感兴趣。不仅仅是因为它是一个简单易用的东西(浏览器可以那么复杂),而且它还专注于增强你的隐私,为你提供添加不同的广告阻止选项以及一些有用的选项。 + +![][9] + +虽然我认为它并不是为所有人准备的,但还是值得一看的。在你继续尝试之前,让我简单介绍一下它的功能。 + +### Viper 浏览器的功能 + +![][10] + +我将列出一些你会发现有用的关键功能: + +* 管理 cookies 的能力 +* 多个预设选项以选择不同的广告屏蔽器网络。 +* 简单且易于使用 +* 隐私友好的默认搜索引擎 - [Startpage][11] (你可以更改) +* 能够添加用户脚本 +* 能够添加新的 user-agent +* 禁用 JavaScript 的选项 +* 能够阻止图像加载 + + + +除了这些亮点之外,你还可以轻松地调整隐私设置,以删除你的历史记录、清理已有 cookies,以及一些更多的选项。 + +![][12] + +### 在 Linux 上安装 Viper 浏览器 + +它只是在[发布页][13]提供了一个 AppImage 文件,你可以利用它在任何 Linux 发行版上进行测试。 + +如果你需要帮助,你也可以参考我们的[在 Linux 上使用 AppImage 文件][14]指南。如果你好奇,你可以在 [GitHub][5] 上探索更多关于它的内容。 + +[Viper 浏览器][5] + +### 我对使用 Viper 浏览器的看法 + +我不认为这是一个可以立即取代你当前浏览器的东西,但如果你有兴趣测试尝试提供 Chrome 替代品的新项目,这肯定是其中之一。 + +当我试图登录我的谷歌账户时,它阻止了我,说它可能是一个不安全的浏览器或不支持的浏览器。因此,如果你依赖你的谷歌帐户,这是一个令人失望的消息。 + +但是,其他社交媒体平台也可以与 YouTube 一起正常运行(无需登录)。不支持 Netflix,但总体上浏览体验是相当快速和可用的。 + +你可以安装用户脚本,但 Chrome 扩展还不支持。当然,这要么是有意为之,要么是在开发过程中特别考虑到它是一款隐私友好型的网络浏览器。 + +### 总结 + +考虑到这是一个鲜为人知但对某些人来说很有趣的东西,你对我们有什么建议吗? 是一个值得关注的开源项目么? + +请在下面的评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/viper-browser/ + +作者:[Ankush Das][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://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://www.mozilla.org/en-US/firefox/new/ +[2]: https://itsfoss.com/beaker-browser-1-release/ +[3]: https://itsfoss.com/open-source-browsers-linux/ +[4]: https://www.bleepingcomputer.com/news/google/google-to-kill-chrome-sync-feature-in-third-party-browsers/ +[5]: https://github.com/LeFroid/Viper-Browser +[6]: https://mastodon.social/web/accounts/199851 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/viper-browser.png?resize=800%2C583&ssl=1 +[8]: https://wiki.qt.io/QtWebEngine +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/viper-browser-setup.jpg?resize=793%2C600&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/viper-preferences.jpg?resize=800%2C660&ssl=1 +[11]: https://www.startpage.com +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/viper-browser-tools.jpg?resize=800%2C262&ssl=1 +[13]: https://github.com/LeFroid/Viper-Browser/releases +[14]: https://itsfoss.com/use-appimage-linux/ From 7c38015bead9083f34f80d9e5ff0f2007bb2598e Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 18 Feb 2021 09:24:24 +0800 Subject: [PATCH 043/818] translating --- ...lots- A Mathematical Graph Plotting App for Linux Desktop.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210216 Meet Plots- A Mathematical Graph Plotting App for Linux Desktop.md b/sources/tech/20210216 Meet Plots- A Mathematical Graph Plotting App for Linux Desktop.md index b48cbde1e6..deb84d80ea 100644 --- a/sources/tech/20210216 Meet Plots- A Mathematical Graph Plotting App for Linux Desktop.md +++ b/sources/tech/20210216 Meet Plots- A Mathematical Graph Plotting App for Linux Desktop.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 47b9cc38dd5613520344ce16c92d2382f0607bec Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 18 Feb 2021 10:37:26 +0800 Subject: [PATCH 044/818] Rename sources/tech/20210216 What does being -technical- mean.md to sources/talk/20210216 What does being -technical- mean.md --- .../{tech => talk}/20210216 What does being -technical- mean.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20210216 What does being -technical- mean.md (100%) diff --git a/sources/tech/20210216 What does being -technical- mean.md b/sources/talk/20210216 What does being -technical- mean.md similarity index 100% rename from sources/tech/20210216 What does being -technical- mean.md rename to sources/talk/20210216 What does being -technical- mean.md From 7c5f7626b80ae74c4953aa840797de91977fdb3e Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 18 Feb 2021 10:42:20 +0800 Subject: [PATCH 045/818] Rename sources/tech/20210217 4 tech jobs for people who don-t code.md to sources/talk/20210217 4 tech jobs for people who don-t code.md --- .../20210217 4 tech jobs for people who don-t code.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20210217 4 tech jobs for people who don-t code.md (100%) diff --git a/sources/tech/20210217 4 tech jobs for people who don-t code.md b/sources/talk/20210217 4 tech jobs for people who don-t code.md similarity index 100% rename from sources/tech/20210217 4 tech jobs for people who don-t code.md rename to sources/talk/20210217 4 tech jobs for people who don-t code.md From 44953c67f5e9b906195083378f367a180d2392ff Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 18 Feb 2021 11:35:27 +0800 Subject: [PATCH 046/818] Rename sources/tech/20210216 How Ansible got started and grew.md to sources/talk/20210216 How Ansible got started and grew.md --- .../{tech => talk}/20210216 How Ansible got started and grew.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20210216 How Ansible got started and grew.md (100%) diff --git a/sources/tech/20210216 How Ansible got started and grew.md b/sources/talk/20210216 How Ansible got started and grew.md similarity index 100% rename from sources/tech/20210216 How Ansible got started and grew.md rename to sources/talk/20210216 How Ansible got started and grew.md From f43828596a30a890c3c1ca09e4814a418fe54812 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 18 Feb 2021 12:38:43 +0800 Subject: [PATCH 047/818] PRF @Chao-zhi --- ...ross-platform UIs for Linux ARM devices.md | 82 +++++++++---------- 1 file changed, 37 insertions(+), 45 deletions(-) diff --git a/translated/tech/20200529 A new way to build cross-platform UIs for Linux ARM devices.md b/translated/tech/20200529 A new way to build cross-platform UIs for Linux ARM devices.md index c3ea802e4d..6d6ad1db92 100644 --- a/translated/tech/20200529 A new way to build cross-platform UIs for Linux ARM devices.md +++ b/translated/tech/20200529 A new way to build cross-platform UIs for Linux ARM devices.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (Chao-zhi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (A new way to build cross-platform UIs for Linux ARM devices) @@ -9,18 +9,20 @@ 一种为 Linux ARM 设备构建跨平台 UI 的新方法 ====== -AndroidXML 和 TotalCross 的运用为 Raspberry Pi 和其他设备创建 UI 提供了更简单的方法。 -![Digital images of a computer desktop][1] -为应用程序创建良好的用户体验 (user experience,UX) 是一项艰巨的任务,尤其是在开发嵌入式应用程序时。今天,有两种图形用户界面 (graphical user interface,GUI) 工具通常用于开发嵌入式软件:它们要么涉及复杂的技术,要么非常昂贵。 +> AndroidXML 和 TotalCross 的运用为树莓派和其他设备创建 UI 提供了更简单的方法。 -然而,我们已经创建了一个概念验证 (proof-of-concept,PoC),它提供了一种新的方法来使用现有的、成熟的工具为运行在桌面、移动、嵌入式设备和低功耗 ARM 设备上的应用程序构建用户界面 (UI)。我们的方法是使用 Android Studio 绘制 UI; 使用 [TotalCross][2] 在设备上呈现 Android XML; 采用被称为 [KnowCode][4] 的新 [TotalCross API][3]; 以及使用 [Raspberry Pi 4][5] 来执行应用程序。 +![](https://img.linux.net.cn/data/attachment/album/202102/18/123715oomfuuz94ioi41ii.jpg) + +为应用程序创建良好的用户体验(UX)是一项艰巨的任务,尤其是在开发嵌入式应用程序时。今天,有两种图形用户界面(GUI)工具通常用于开发嵌入式软件:它们要么涉及复杂的技术,要么非常昂贵。 + +然而,我们已经创建了一个概念验证(PoC),它提供了一种新的方法来使用现有的、成熟的工具为运行在桌面、移动、嵌入式设备和低功耗 ARM 设备上的应用程序构建用户界面(UI)。我们的方法是使用 Android Studio 绘制 UI;使用 [TotalCross][2] 在设备上呈现 Android XML;采用被称为 [KnowCode][4] 的新 [TotalCross API][3];以及使用 [树莓派 4][5] 来执行应用程序。 ### 选择 Android Studio -可以使用 TotalCross API 为应用程序构建一个响应迅速且美观的用户体验,但是在 Android Studio 中创建 UI 缩短了原型制作和实际应用程序之间的时间。 +可以使用 TotalCross API 为应用程序构建一个美观的响应式用户体验,但是在 Android Studio 中创建 UI 缩短了制作原型和实际应用程序之间的时间。 -有很多工具可以用来为应用程序构建 UI,但是 [Android Studio][6] 是全世界开发者最常使用的工具。除了它被大量采用以外,这个工具的使用也非常直观,而且它对于创建简单和复杂的应用程序都非常强大。在我看来,唯一的缺点是使用该工具所需的计算能力,它比其他集成开发环境 (IDE) 如 VSCode 或其开源替代方案 [VSCodium][7] 要庞大得多。 +有很多工具可以用来为应用程序构建 UI,但是 [Android Studio][6] 是全世界开发者最常使用的工具。除了它被大量采用以外,这个工具的使用也非常直观,而且它对于创建简单和复杂的应用程序都非常强大。在我看来,唯一的缺点是使用该工具所需的计算机性能,它比其他集成开发环境 (IDE) 如 VSCode 或其开源替代方案 [VSCodium][7] 要庞大得多。 通过思考这些问题,我们创建了一个概念验证,使用 Android Studio 绘制 UI,并使用 TotalCross 直接在设备上运行 AndroidXML。 @@ -30,21 +32,19 @@ AndroidXML 和 TotalCross 的运用为 Raspberry Pi 和其他设备创建 UI 提 ![Home appliance application to control thermostat][8] -(Bruno Muniz,[CC BY-SA 4.0][9]) - -我们想为 Raspberry Pi 开发我们的应用程序,所以我们使用 Android 的 [ConstraintLayout][10] 来构建 848x480 (Raspberry Pi 的分辨率)的固定屏幕大小的 UI,不过您可以用其他布局构建响应性 UI。 +我们想为树莓派开发我们的应用程序,所以我们使用 Android 的 [ConstraintLayout][10] 来构建 848x480(树莓派的分辨率)的固定屏幕大小的 UI,不过你可以用其他布局构建响应性 UI。 Android XML 为 UI 创建增加了很多灵活性,使得为应用程序构建丰富的用户体验变得容易。在下面的 XML 中,我们使用了两个主要组件:[ImageView][11] 和 [TextView][12]。 ``` -<ImageView + + ``` -TextView 元素用于向用户显示一些数据,比如建筑物内的温度。大多数 imageview 都用作用户与 UI 交互的按钮,但它们也需要实现屏幕上组件提供的事件。 +TextView 元素用于向用户显示一些数据,比如建筑物内的温度。大多数 ImageView 都用作用户与 UI 交互的按钮,但它们也需要实现屏幕上组件提供的事件。 ### 用 TotalCross 整合 这个 PoC 中的第二项技术是 TotalCross。我们不想在设备上使用 Android 的任何东西,因为: 1。我们的目标是为 Linux ARM 提供一个出色的 UI。 - 2。我们希望在设备上实现低占地面积。 + 2。我们希望在设备上实现低占用。 3。我们希望应用程序在低计算能力的低端硬件设备上运行(例如,没有 GPU、 低 RAM 等)。 -首先,我们使用 [VSCode plugin][13] 创建了一个空的 TotalCross 项目。接下来,我们保存了 **drawable** 文件夹中的图像副本和 **XML** 文件夹中的 Android XML 文件副本,这两个文件夹都位于 **Resources** 文件夹中: +首先,我们使用 [VSCode 插件][13] 创建了一个空的 TotalCross 项目。接下来,我们保存了 `drawable` 文件夹中的图像副本和 `xml` 文件夹中的 Android XML 文件副本,这两个文件夹都位于 `resources` 文件夹中: ![Home Appliance file structure][14] -(Bruno Muniz,[CC BY-SA 4.0][9]) - 为了使用 TotalCross 模拟器运行 XML 文件,我们添加了一个名为 KnowCode 的新 TotalCross API 和一个主窗口来加载 XML。下面的代码使用 API 加载和呈现 XML: - ``` public void initUI() { -    XmlScreenAbstractLayout xmlCont = XmlScreenFactory.create(“xml / homeApplianceXML.xml”); +    XmlScreenAbstractLayout xmlCont = XmlScreenFactory.create("xml / homeApplianceXML.xml");     swap(xmlCont); } ``` @@ -89,48 +86,43 @@ public void initUI() { ![TotalCross simulator running temperature application][15] -(Bruno Muniz,[CC BY-SA 4.0][9]) - -完成这个 PoC 还有两件事要做:添加一些事件来提供用户交互和在 Raspberry Pi 上运行它。 +完成这个 PoC 还有两件事要做:添加一些事件来提供用户交互,并在树莓派上运行它。 ### 添加事件 -KnowCode API 提供了一种通过 ID(getControlByID) 获取 XML 元素并更改其行为的方法,如添加事件、更改可见性等。 +KnowCode API 提供了一种通过 ID(`getControlByID`) 获取 XML 元素并更改其行为的方法,如添加事件、更改可见性等。 例如,为了使用户能够改变家中或其他建筑物的温度,我们在 UI 底部放置了加号和减号按钮,并在每次单击按钮时都会出现“单击”事件,使温度升高或降低一度: - ``` -[Button][16] plus = ([Button][16]) xmlCont.getControlByID("@+id/plus"); -[Label][17] insideTempLabel = ([Label][17]) xmlCont.getControlByID("@+id/insideTempLabel"); +Button plus = (Button) xmlCont.getControlByID("@+id/plus"); +Label insideTempLabel = (Label) xmlCont.getControlByID("@+id/insideTempLabel"); plus.addPressListener(new PressListener() { -    @Override -    public void controlPressed(ControlEvent e) { -        try { -            [String][18] tempString = insideTempLabel.getText(); -            int temp; -            temp = Convert.toInt(tempString); -            insideTempLabel.setText(Convert.toString(++temp)); -        } catch (InvalidNumberException e1) { -            e1.printStackTrace(); -        } -    } + @Override + public void controlPressed(ControlEvent e) { + try { + String tempString = insideTempLabel.getText(); + int temp; + temp = Convert.toInt(tempString); + insideTempLabel.setText(Convert.toString(++temp)); + } catch (InvalidNumberException e1) { + e1.printStackTrace(); + } + } }); ``` -### 在树莓皮 4 上测试 +### 在树莓派 4 上测试 最后一步!我们在一台设备上运行了应用程序并检查了结果。我们只需要打包应用程序并在目标设备上部署和运行它。[VNC][19] 也可用于检查设备上的应用程序。 -整个应用程序,包括资源(图像等 )、AndroidXML、TotalCross 和 Knowcode API,在 Linux ARM 上大约是 8MB。 +整个应用程序,包括资源(图像等)、Android XML、TotalCross 和 Knowcode API,在 Linux ARM 上大约是 8MB。 下面是应用程序的演示: ![Application demo][20] -(Bruno Muniz,[CC BY-SA 4.0][9]) - -在本例中,该应用程序仅为 Linux ARM 打包,但同一应用程序将作为 Linux 桌面应用程序 、Android 设备 、Windows、windows CE 甚至 IOS 运行。 +在本例中,该应用程序仅为 Linux ARM 打包,但同一应用程序可以作为 Linux 桌面应用程序运行,在Android 设备 、Windows、windows CE 甚至 iOS 上运行。 所有示例源代码和项目都可以在 [HomeApplianceXML GitHub][21] 存储库中找到。 @@ -149,7 +141,7 @@ via: https://opensource.com/article/20/5/linux-arm-ui 作者:[Bruno Muniz][a] 选题:[lujun9972][b] 译者:[Chao-zhi](https://github.com/Chao-zhi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 76faa8eeb8d1c1b4e31e6b607cb0c8f4d6bccae4 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 18 Feb 2021 12:39:17 +0800 Subject: [PATCH 048/818] PUB @Chao-zhi https://linux.cn/article-13129-1.html --- ...w way to build cross-platform UIs for Linux ARM devices.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200529 A new way to build cross-platform UIs for Linux ARM devices.md (99%) diff --git a/translated/tech/20200529 A new way to build cross-platform UIs for Linux ARM devices.md b/published/20200529 A new way to build cross-platform UIs for Linux ARM devices.md similarity index 99% rename from translated/tech/20200529 A new way to build cross-platform UIs for Linux ARM devices.md rename to published/20200529 A new way to build cross-platform UIs for Linux ARM devices.md index 6d6ad1db92..9a742f2eb2 100644 --- a/translated/tech/20200529 A new way to build cross-platform UIs for Linux ARM devices.md +++ b/published/20200529 A new way to build cross-platform UIs for Linux ARM devices.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (Chao-zhi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13129-1.html) [#]: subject: (A new way to build cross-platform UIs for Linux ARM devices) [#]: via: (https://opensource.com/article/20/5/linux-arm-ui) [#]: author: (Bruno Muniz https://opensource.com/users/brunoamuniz) From acf01f6230a5b232d8bbd8175eb5ee5d6205d1b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=B6=85=E6=99=BA?= Date: Thu, 18 Feb 2021 15:38:35 +0800 Subject: [PATCH 049/818] translating by Chao-zhi --- sources/tech/20200629 LaTeX typesetting part 2 (tables).md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20200629 LaTeX typesetting part 2 (tables).md b/sources/tech/20200629 LaTeX typesetting part 2 (tables).md index 030f3be01a..e7e53604cb 100644 --- a/sources/tech/20200629 LaTeX typesetting part 2 (tables).md +++ b/sources/tech/20200629 LaTeX typesetting part 2 (tables).md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (Chao-zhi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -390,7 +390,7 @@ via: https://fedoramagazine.org/latex-typesetting-part-2-tables/ 作者:[Earl Ramirez][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[Chao-zhi](https://github.com/Chao-zhi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From cc70863a39f9661bb4baf0a20fc0a174e4d46aef Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 18 Feb 2021 16:18:27 +0800 Subject: [PATCH 050/818] PRF @XYenChi --- ...2 When the web grew up- A browser story.md | 54 +++++++++---------- 1 file changed, 24 insertions(+), 30 deletions(-) diff --git a/translated/talk/20190312 When the web grew up- A browser story.md b/translated/talk/20190312 When the web grew up- A browser story.md index 002e14c692..4d63bd68bb 100644 --- a/translated/talk/20190312 When the web grew up- A browser story.md +++ b/translated/talk/20190312 When the web grew up- A browser story.md @@ -1,53 +1,47 @@ [#]: collector: (lujun9972) -[#]: translator: (XYenChi ) -[#]: reviewer: ( ) +[#]: translator: (XYenChi) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (When the web grew up: A browser story) [#]: via: (https://opensource.com/article/19/3/when-web-grew) [#]: author: (Mike Bursell https://opensource.com/users/mikecamel) -web 的诞生:浏览器的故事 +Web 的成长,就是一篇浏览器的故事 ====== -互联网诞生之处的个人故事。 -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_Internet_Sign.png?itok=5MFGKs14) +> 互联网诞生之时我的个人故事。 -最近,我[分享了][1] 1994年获得英文文学和神学学位离开大学,在一个人们还不知道 web 服务器是什么的地方,成功找到一份运维 web 服务器的工作。但那“地方”,并不仅仅指的是我工作的组织,而是泛指所有地方。Web 那时当真是全新的——人们还正尝试理出头绪。 +![](https://img.linux.net.cn/data/attachment/album/202102/18/161753qb8tytkc6bnxbavn.jpg) -那并不是在暗示我在什么地方工作——学术出版社,也不是强调得到工作。这是个大部分人还在用 28k8 猫访问网页的世界。我记得我拿到 33k6 猫时有多激动。至少上下行速率不对称的日子过去了,以前带宽显示 1200/300 特别常见。这意味着(端同一家饭碗的)列印人员创作的设计复杂,色彩缤纷,纤毫毕现的档是完全不可能出现在 Web 上的。我不可能让大于 40k 的GIF 出现在网站的首页推送给访问的人。大于大约 60k 的会作为独立的图片,缩略图链接到参照页。 +最近,我和大家 [分享了][1] 我在 1994 年获得英国文学和神学学位离开大学后,如何在一个人们还不知道 Web 服务器是什么的世界里成功找到一份运维 Web 服务器的工作。我说的“世界”,并不仅仅指的是我工作的机构,而是泛指所有地方。Web 那时当真是全新的 —— 人们还正尝试理出头绪。 -且不说商城部分不像现在这样。更糟的是布局问题。“如何布局文档取决于浏览器,”我一遍又一遍地解释,“你可以使用眉头词或者段落,但是文档在页面上如何显示并不取决于文档,而是取决于渲染器!”他们想控制,想要不同颜色的背景。后来明白了那些不能实现。我参与了我觉得层叠样式表(CSS)的想法第一次被讨论的 W3C 会议,并进行了激烈地争论。写文档的人控制布局的建议令人讨厌。后来 CSS 被采用了,与此同时,在意安全问题的人采用了可移植文件格式(PDF)。 +那并不是说我工作的地方(一家学术出版社)特别“懂” Web。这是个大部分人还在用 28.8K 猫(调制解调器,俗称“猫”)访问网页的世界。我还记得我拿到 33.6K 猫时有多激动。至少上下行速率不对称的日子已经过去了,[^1] 以前 1200/300 的带宽描述特别常见。这意味着(在同一家机构的)印刷人员制作的设计复杂、色彩缤纷、纤毫毕现的文档是完全不可能放在 Web 上的。我不能允许在网站的首页出现大于 40k 的 GIF 图片,这对我们的许多访问者来说是很难接受的。大于大约 60k 图片的会作为独立的图片,以缩略图链接过去。 -如何渲染文档不是唯一的问题。作为一个实体书出版社,网页展示和商城部分的所有点都要关注,让消费者,或者潜在消费者知道一本书是关于什么的和预计需要花费多少钱。但这有一个问题,你看,互联网——包括快速发展的万维网——是开放的,所有都免费的自由之地没有人会在意钱;事实上,谈钱曾是被禁止的。 +如果说市场部只有这一点不喜欢,那是绝对是轻描淡写了。更糟的是布局问题。“浏览器决定如何布局文档,”我一遍又一遍地解释,“你可以使用标题或者段落,但是文档在页面上如何呈现并不取决于文档,而是取决于渲染器!”他们想控制这些,想要不同颜色的背景。后来明白了那些不能实现。我觉得我就像是参加了第一次讨论层叠样式表(CSS)的 W3C 会议,并进行了激烈地争论。关于文档编写者应控制布局的建议真令人厌恶。[^2] CSS 花了一些时间才被人们采用,与此同时,关心这些问题的人搭上了 PDF 这种到处都是安全问题的列车。 -我和主流“网民”的看法一致,认为没必要放价格信息在线上。我老板,加上组织里相当多的人都持有相反的看法。他们觉得消费者应该能够看到书要花多少钱。他们也觉得我管理银行资产会想看账户里每个月进了多少钱,如果我不认同他们的观点的话,资金可能会急剧减少的账户。 +如何呈现文档不是唯一的问题。作为一个实体书出版社,对于市场部来说,拥有一个网站的全部意义在于,让客户(或者说潜在的客户)不仅知道一本书的内容,而且知道买这本书需要花多少钱。但这有一个问题,你看,互联网,包括快速发展的万维网,是开放的,是所有都免费的自由之地,没有人会在意钱;事实上,在那里谈钱是要回避和避免的。 -幸运的是,在我从高高的马儿身上摔下来之前,我已经自己认清了一些——可能是我开始迈入的几星期之后——Web 早已变了,有其他人公布他们产品的价格信息。新来的人渐渐瞧不起先前运行 web 服务器的老学究们,但风向很清晰。但是这并不意味着网站的战争结束了。作为一个学术出版社,我们和大学共享一个域名(“ac.uk“)。大学不确信公布价格信息合不合适直到普林斯顿大学出版社做了,我们会不会看起来有点傻如果······? +我和主流“网民”的看法一致,认为没必要把价格信息放在线上。我老板,以及机构里相当多的人都持相反的意见。他们觉得消费者应该能够看到书要花多少钱。他们也觉得我的银行经理也会想看到我的账户里每个月进了多少钱,如果我不认同他们的观点的话,那我的收入就可能堪忧。 -有趣的事情也没有停。站点管理员(“webmaster@…”)任职的短短几个月内,我们和其他很多网站一样开始看到了一种焦虑的趋势。某些访问者可以轻而易举地访问我们的网站服务器。这些访问者使用新的网页浏览器:网景。网景干坏事,它是多线程的。 +幸运的是,在我被炒鱿鱼之前,我已经自己认清了一些 —— 可能是在我开始迈入 Web 的几星期之后,Web 已经发生变化,有其他人公布他们的产品价格信息。这些新来者通常被那些从早期就开始运行 Web 服务器的老派人士所看不起,[^3] 但很明显,风向是往那边吹的。然而,这并不意味着我们的网站就赢得了战争。作为一个学术出版社,我们和大学共享一个域名(在 “ac.uk” 下)。大学不太相信发布价格信息是合适的,直到出版社的一些资深人士指出,普林斯顿大学出版社正在这样做,如果我们不做……看起来是不是有点傻? -这为什么是个问题呢?在网景之前,所有的浏览器都是单线程。他们一次只进行一个连接,所以即使一个页面有五张动图,也会先请求 HTML 基本文件进行解析,然后下载第一张动图,完成,接着第二张,完成,如此类推。事实上,动图顺序经常出错,使得页面加载得非常奇怪,但这也是常规思路。粗暴的网景人决定他们与网站服务器一次性进行多个连接来请求所有的动图,举个例子!为什么这是个问题呢?好吧,问题就是大多数网站服务器都是单线程的。他们不是设计来一次性进行多个连接的。确实,我们运行的 HTTP 服务的软件(MacHTTP)是单线程的。即使我们已经买了(原本是共享软件),我们用的这版一次不能处理多个请求。 +有趣的事情还没完。在我担任站点管理员(“webmaster@…”)的短短几个月后,我们和其他很多网站一样开始看到了一种令人担忧的趋势。某些访问者可以轻而易举地让我们的 Web 服务器跪了。这些访问者使用了新的网页浏览器:网景浏览器(Netscape)。网景浏览器实在太恶劣了,它居然是多线程的。 -互联网上爆发了大量讨论。做网景的人觉得他们正在改变世界的工作方式?它如何支持工作?大家分成了不同阵营,双方不断交流着技术层面的热词。问题是网景不仅多线程,而且优于其他。非常多 web 服务器代码维护者,包括 MacHTTP 作者查克·肖顿在内,坐下来认真在原有代码基础上更新多线程测试版。所有人几乎立马转向测试版,他们变得稳定,最终浏览器也舍弃了单线程,变成多线程,或者只是像所有过时产品一样销声匿迹。 +这为什么是个问题呢?在网景浏览器之前,所有的浏览器都是单线程。它们一次只进行一个连接,所以即使一个页面有五张 GIF 图,[^4] 也会先请求 HTML 基本文件进行解析,然后下载第一张 GIF,完成,接着第二张,完成,如此类推。事实上,GIF 的顺序经常出错,使得页面加载得非常奇怪,但这也是常规思路。而粗暴的网景公司的人决定,它们可以同时打开多个连接到 Web 服务器,比如说,可以同时请求所有的 GIF!为什么这是个问题呢?好吧,问题就在于大多数 Web 服务器都是单线程的。它们不是设计来一次进行多个连接的。确实,我们运行的 HTTP 服务的软件(MacHTTP)是单线程的。尽管我们花钱购买了它(最初是共享软件),但我们用的这版无法同时处理多个请求。 -对我来说,这就是 web 真正成长。那既不是网页展示的价格也不是设计者能有定义你能在网页上看到什么,而是浏览器变得更易用,几千浏览者变成几百万并且用户喜好而不是制作者变得更为重要。我的路还很长——有机会再谈——有关这点,我老板开始开始查看我们的每月,然后每周,然后每天的日志,并意识到这确实变成了大事而且真的需要我们关注。 +互联网上爆发了大量讨论。这些网景公司的人以为他们是谁,能改变世界的运作方式?它应该如何工作?大家分成了不同阵营,就像所有的技术争论一样,双方都用各种技术热词互丢。问题是,网景浏览器不仅是多线程的,它也比其他的浏览器更好。非常多 Web 服务器代码维护者,包括 MacHTTP 作者 Chuck Shotton 在内,开始坐下来认真地在原有代码基础上更新了多线程测试版。几乎所有人立马转向测试版,它们变得稳定了,最终,浏览器要么采用了这种技术,变成多线程,要么就像所有过时产品一样销声匿迹了。[^6] -1\. 他们如何再次回来? +对我来说,这才是 Web 真正成长起来的时候。既不是网页展示的价格,也不是设计者能定义你能在网页上看到什么,[^8] 而是浏览器变得更易用,以及成千上万的浏览者向数百万浏览者转变的网络效应,使天平向消费者而不是生产者倾斜。在我的旅程中,还有更多故事,我将留待下次再谈。但从这时起,我的雇主开始看我们的月报,然后是周报、日报,并意识到这将是一件大事,真的需要关注。 -2\. 毫不意外我还是使用命令行里最开心的人。 - -3\. 大约六个月前。 - -4\. 不计后果,真的,发生了 - -5\. 噢,不——GIF,BMP或者JPEG还是好主意没被取缔。 - -6\. 从未沉寂:永远都会有少数坚信他们更偏爱的解决方案更优越并哀叹互联网的其他人已经变成了恶魔的难以退却的狂热者。 - -7\. 我不是唯一一个说:我还在用 Lynx。 - -8\. 我指出,不同访问需求的人创造主要和正在发生的问题。 +[^1]: 它们又是怎么回来的? +[^2]: 你可能不会惊讶,我还是在命令行里最开心。 +[^3]: 大约六个月前。 +[^4]: 莽撞,没错,但它确实发生了 [^5] +[^5]: 噢,不,是 GIF 或 BMP,JPEG 还是个好主意,但还没有用上。 +[^6]: 没有真正的沉寂:总有一些坚持他们的首选解决方案具有技术上的优势,并哀叹互联网的其他人都是邪恶的死硬爱好者。 [^7] +[^7]: 我不是唯一一个说“我还在用 Lynx”的人。 +[^8]: 我会指出,为那些有各种无障碍需求的人制造严重而持续的问题。 -------------------------------------------------------------------------------- @@ -56,7 +50,7 @@ via: https://opensource.com/article/19/3/when-web-grew 作者:[Mike Bursell][a] 选题:[lujun9972][b] 译者:[XYenChi](https://github.com/XYenChi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 611d183b9da6486b898896c1c72d75bd0f73f592 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 18 Feb 2021 16:19:07 +0800 Subject: [PATCH 051/818] PUB @XYenChi https://linux.cn/article-13130-1.html --- .../20190312 When the web grew up- A browser story.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/talk => published}/20190312 When the web grew up- A browser story.md (99%) diff --git a/translated/talk/20190312 When the web grew up- A browser story.md b/published/20190312 When the web grew up- A browser story.md similarity index 99% rename from translated/talk/20190312 When the web grew up- A browser story.md rename to published/20190312 When the web grew up- A browser story.md index 4d63bd68bb..a53a5babfb 100644 --- a/translated/talk/20190312 When the web grew up- A browser story.md +++ b/published/20190312 When the web grew up- A browser story.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (XYenChi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13130-1.html) [#]: subject: (When the web grew up: A browser story) [#]: via: (https://opensource.com/article/19/3/when-web-grew) [#]: author: (Mike Bursell https://opensource.com/users/mikecamel) From 4f42b0ae3f74d3f86fa50b20cf2b3d637225b7fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=B6=85=E6=99=BA?= Date: Thu, 18 Feb 2021 16:44:07 +0800 Subject: [PATCH 052/818] The translation completes a part --- ...00629 LaTeX typesetting part 2 (tables).md | 203 +++++++----------- 1 file changed, 82 insertions(+), 121 deletions(-) diff --git a/sources/tech/20200629 LaTeX typesetting part 2 (tables).md b/sources/tech/20200629 LaTeX typesetting part 2 (tables).md index e7e53604cb..266929ed4c 100644 --- a/sources/tech/20200629 LaTeX typesetting part 2 (tables).md +++ b/sources/tech/20200629 LaTeX typesetting part 2 (tables).md @@ -7,239 +7,200 @@ [#]: via: (https://fedoramagazine.org/latex-typesetting-part-2-tables/) [#]: author: (Earl Ramirez https://fedoramagazine.org/author/earlramirez/) -LaTeX typesetting part 2 (tables) +LaTex 排版(2):表格 ====== ![][1] -LaTeX offers a number of tools to create and customise tables, in this series we will be using the tabular and tabularx environment to create and customise tables. +LaTeX 提供了许多工具来创建和定制表格,在本系列中,我们将使用 tabular 和 tabularx 环境来创建和定制表。 -### Basic table +### 基础表格 -To create a table you simply specify the environment \begin{tabular}{columns} -``` +要创建表,只需指定环境 `\begin{tabular}{列选项}` ``` - \begin{tabular}{c|c} -    Release &amp;amp;Codename \\\ \hline -    Fedora  Core 1 &amp;amp;Yarrow \\\ -    Fedora Core 2 &amp;amp;Tettnang \\\ -    Fedora Core 3 &amp;amp;Heidelberg \\\ -    Fedora Core 4 &amp;amp;Stentz \\\ + Release &Codename \\ \hline + Fedora Core 1 &Yarrow \\ + Fedora Core 2 &Tettnang \\ + Fedora Core 3 &Heidelberg \\ + Fedora Core 4 &Stentz \\ \end{tabular} ``` -``` - ![Basic Table][2] -In the above example "{c|c}" in the curly bracket refers to the position of the text in the column. The below table summarises the positional argument together with the description. +在上面的示例中,花括号中的”{c|c}”表示文本在列中的位置。下表总结了位置参数及其说明。 -Position | Argument ----|--- -c | Position text in the centre -l | Position text left-justified -r | Position text right-justified -p{width} | Align the text at the top of the cell -m{width} | Align the text in the middle of the cell -b{width} | Align the text at the bottom of the cell +参数 | 位置 +|:---:|:--- +c | 将文本置于中间 +l | 将文本左对齐 +r | 将文本右对齐 +p{width} | 文本对齐单元格顶部 +m{width} | 文本对齐单元格中间 +b{width} | 文本对齐单元格底部 ->Both m{width} and b{width} requires the array package to be specified in the preamble. +> m{width} 和 b{width} 都要求在最前面指定数组包。 -Using the example above, let us breakdown the important points used and describe a few more options that you will see in this series +使用上面的例子,让我们来详细讲解使用的要点,并描述您将在本系列中看到的更多选项 -Option | Description ----|--- -& | Defines each cell, the ampersand is only used from the second column -\ | This terminates the row and start a new row -| -\hline | Specifies the horizontal line (optional) -*{num}{form} | This is handy when you have many columns and is an efficient way of limiting the repetition -| +选项 | 意义 +|:-:|:-| +& | 定义每个单元格,这个符号仅用于第二列 +\ | 这将终止该行并开始一个新行 +\| | 指定表格中的垂直线(可选) +\hline | 指定表格中水平线(可选) +*{num}{form} | 当您有许多列时,可以使用这个,并且是限制重复的有效方法 +\|\| | 指定表格中垂直双线 -### Customising our table +### 定制表格 -Now that some of the options available let create a table using the options described in the previous section. -``` +学会了这些选项,让我们使用这些选项创建一个表。 ``` - \begin{tabular}{*{3}{|l|}} \hline -    \textbf{Version} &amp;amp;\textbf{Code name} &amp;amp;\textbf{Year released} \\\ + \textbf{Version} &\textbf{Code name} &\textbf{Year released} \\ \hline -    Fedora 6 &amp;amp;Zod &amp;amp;2006 \\\ \hline -    Fedora 7 &amp;amp;Moonshine &amp;amp;2007 \\\ \hline -    Fedora 8 &amp;amp;Werewolf &amp;amp;2007 \\\ + Fedora 6 &Zod &2006 \\ \hline + Fedora 7 &Moonshine &2007 \\ \hline + Fedora 8 &Werewolf &2007 \\ \hline \end{tabular} ``` -``` - ![Customise Table][3] -### Managing long text +### 管理长文本 -With LaTeX if there are many texts in a column it will not be formatted well and does not look presentable. +如果列中有很多文本,那么它的格式就不好处理,看起来也不好看。 -The below example shows how long text is formatted, we will use "blindtext" in the preamble so that we can produce sample text. -``` +下面的示例显示了文本的格式长度,我们将在导言区中使用 “blindtext”,以便生成示例文本。 ``` - \begin{tabular}{|l|l|}\hline -    Summary &amp;amp;Description \\\ \hline -    Test &amp;amp;\blindtext \\\ + Summary &Description \\ \hline + Test &\blindtext \\ \end{tabular} ``` -``` - ![Default Formatting][4] -As you can see the text exceed the page width; however, there are a couple of options to overcome this challenge. +正如您所看到的,文本超出了页面宽度;但是,有几个选项可以克服这个问题。 - * Specify the column width, for example, m{5cm} - * Utilise the tabularx environment, this requires tabularx package in the preamble. + * 指定列宽,例如 m{5cm} + * 利用 TABLARX 环境,这需要在导言区中引用 TABLARX 宏包。 +#### 使用列宽管理长文本 -### Managing long text with column width - -By specifying the column width the text will be wrapped into the width as shown in the example below. -``` +通过指定列宽,文本将被包装为如下示例所示的宽度。 ``` - \begin{tabular}{|l|m{14cm}|} \hline -    Summary &amp;amp;Description \\\ \hline -    Test &amp;amp;\blindtext \\\ \hline + Summary &Description \\ \hline + Test &\blindtext \\ \hline \end{tabular}\vspace{3mm} ``` -``` - ![Column width][5] -### Managing long text with tabularx +#### 使用 tabularx 管理长文本 -Before we can leverage tabularx we need to add it in the preamble. Tabularx takes the following example +在我们利用表格之前,我们需要在导言区中加上它。TABLARX 方法见以下示例 + +`\begin{tabularx}{宽度}{列选项}` -**\begin{tabularx}{width}{columns}** -``` ``` - \begin{tabularx}{\textwidth}{|l|X|} \hline -Summary &amp;amp; Tabularx Description\\\ \hline -Text &amp;amp;\blindtext \\\ \hline +Summary & Tabularx Description\\ \hline +Text &\blindtext \\ \hline \end{tabularx} ``` -``` ![Tabularx][6] -Notice that the column that we want the long text to be wrapped has a capital "X" specified. +请注意,我们需要处理长文本的列在花括号中指定了大写“X”。 -### Multirow and multicolumn +### 合并行合并列 -There are times when you will need to merge rows and/or column. This section describes how it is accomplished. To use multirow and multicolumn add multirow to the preamble. +有时需要合并行或列。本节描述了如何完成。要使用 multirow 和 multicolumn,请将 multirow 添加到导言区。 -### Multirow +#### 合并行 -Multirow takes the following argument _\multirow{number_of_rows}{width}{text}_, let us look at the below example. -``` +Multirow 采用以下参数`\multirow{行的数量}{宽度}{文本}`,让我们看看下面的示例。 ``` - \begin{tabular}{|l|l|}\hline -    Release &amp;amp;Codename \\\ \hline -    Fedora Core 4 &amp;amp;Stentz \\\ \hline -    \multirow{2}{*}{MultiRow} &amp;amp;Fedora 8 \\\ -    &amp;amp;Werewolf \\\ \hline + Release &Codename \\ \hline + Fedora Core 4 &Stentz \\ \hline + \multirow{2}{*}{MultiRow} &Fedora 8 \\ + &Werewolf \\ \hline \end{tabular} ``` -``` - ![MultiRow][7] -In the above example, two rows were specified, the ‘*’ tells LaTeX to automatically manage the size of the cell. +在上面的示例中,指定了两行,'*'告诉LaTeX自动管理单元格的大小。 -### Multicolumn +#### 合并列 -Multicolumn argument is _\multicolumn{number_of_columns}{cell_position}{text}_, below example demonstrates multicolumn. -``` +Multicolumn 参数是 `{Multicolumn{列的数量}{单元格选项}{位置}{文本}`,下面的示例演示 Multicolumn。 ``` - \begin{tabular}{|l|l|l|}\hline -    Release &amp;amp;Codename &amp;amp;Date \\\ \hline -    Fedora Core 4 &amp;amp;Stentz &amp;amp;2005 \\\ \hline -    \multicolumn{3}{|c|}{Mulit-Column} \\\ \hline + Release &Codename &Date \\ \hline + Fedora Core 4 &Stentz &2005 \\ \hline + \multicolumn{3}{|c|}{Mulit-Column} \\ \hline \end{tabular} ``` -``` - ![Multi-Column][8] -### Working with colours +### 使用颜色 -Colours can be assigned to the text, an individual cell or the entire row. Additionally, we can configure alternating colours for each row. +可以为文本、单个单元格或整行指定颜色。此外,我们可以为每一行配置交替的颜色。 -Before we can add colour to our tables we need to include _\usepackage[table]{xcolor}_ into the preamble. We can also define colours using the following colour reference [LaTeX Colour][9] or by adding an exclamation after the colour prefixed by the shade from 0 to 100. For example, _gray!30_ -``` +在给表添加颜色之前,我们需要在导言区引用 `\usepackage[table]{xcolor}`。我们还可以使用以下颜色参考 [LaTeX Color][9] 或在颜色前缀后面添加感叹号(从0到100的阴影)来定义颜色。例如,`gray!30` ``` - \definecolor{darkblue}{rgb}{0.0, 0.0, 0.55} \definecolor{darkgray}{rgb}{0.66, 0.66, 0.66} ``` -``` - -Below example demonstrate this a table with alternate colours, \rowcolors take the following options _\rowcolors{row_start_colour}{even_row_colour}{odd_row_colour}_. -``` +下面的示例演示了一个具有各种颜色的表,`\rowcolors` 采用以下选项`\rowcolors{起始行颜色}{偶数行颜色}{奇数行颜色}`。 ``` - \rowcolors{2}{darkgray}{gray!20} \begin{tabular}{c|c} -    Release &amp;amp;Codename \\\ \hline -    Fedora  Core 1 &amp;amp;Yarrow \\\ -    Fedora Core 2 &amp;amp;Tettnang \\\ -    Fedora Core 3 &amp;amp;Heidelberg \\\ -    Fedora Core 4 &amp;amp;Stentz \\\ + Release &Codename \\ \hline + Fedora Core 1 &Yarrow \\ + Fedora Core 2 &Tettnang \\ + Fedora Core 3 &Heidelberg \\ + Fedora Core 4 &Stentz \\ \end{tabular} ``` -``` - ![Alt colour table][10] -In addition to the above example, \rowcolor can be used to specify the colour of each row, this method works best when there are multi-rows. The following examples show the impact of using the \rowcolours with multi-row and how to work around it. +除了上面的例子,`\rowcolor` 可以用来指定每一行的颜色,这个方法在有合并行时效果最好。以下示例显示将 `\rowColors` 与合并行一起使用的影响以及如何解决此问题。 ![Impact on multi-row][11] -As you can see the _multi-row_ is visible in the first row, to fix this we have to do the following. -``` +你可以看到,在合并行中,只有第一行能显示颜色。想要解决这个问题,需要这样做: ``` - \begin{tabular}{|l|l|}\hline -    \rowcolor{darkblue}\textsc{\color{white}Release}  &amp;amp;\textsc{\color{white}Codename} \\\ \hline -    \rowcolor{gray!10}Fedora Core 4 &amp;amp;Stentz \\\ \hline -    \rowcolor{gray!40}&amp;amp;Fedora 8 \\\ -    \rowcolor{gray!40}\multirow{-2}{*}{Multi-Row} &amp;amp;Werewolf \\\ \hline + \rowcolor{darkblue}\textsc{\color{white}Release} &\textsc{\color{white}Codename} \\ \hline + \rowcolor{gray!10}Fedora Core 4 &Stentz \\ \hline + \rowcolor{gray!40}&Fedora 8 \\ + \rowcolor{gray!40}\multirow{-2}{*}{Multi-Row} &Werewolf \\ \hline \end{tabular} ``` -``` - ![Multi-row][12] Let us discuss the changes that were implemented to resolve the multi-row with the alternate colour issue. From 894bd7ce8c3d658033f7760c1a2ecda8fc9953b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=B6=85=E6=99=BA?= Date: Thu, 18 Feb 2021 17:19:16 +0800 Subject: [PATCH 053/818] translate done: 20200629 LaTeX typesetting part 2 (tables).md --- ...00629 LaTeX typesetting part 2 (tables).md | 138 +++++++----------- 1 file changed, 55 insertions(+), 83 deletions(-) rename {sources => translated}/tech/20200629 LaTeX typesetting part 2 (tables).md (66%) diff --git a/sources/tech/20200629 LaTeX typesetting part 2 (tables).md b/translated/tech/20200629 LaTeX typesetting part 2 (tables).md similarity index 66% rename from sources/tech/20200629 LaTeX typesetting part 2 (tables).md rename to translated/tech/20200629 LaTeX typesetting part 2 (tables).md index 266929ed4c..4b91e8cc0d 100644 --- a/sources/tech/20200629 LaTeX typesetting part 2 (tables).md +++ b/translated/tech/20200629 LaTeX typesetting part 2 (tables).md @@ -7,7 +7,8 @@ [#]: via: (https://fedoramagazine.org/latex-typesetting-part-2-tables/) [#]: author: (Earl Ramirez https://fedoramagazine.org/author/earlramirez/) -LaTex 排版(2):表格 + +LaTex 排版 (2):表格 ====== ![][1] @@ -16,7 +17,7 @@ LaTeX 提供了许多工具来创建和定制表格,在本系列中,我们 ### 基础表格 -要创建表,只需指定环境 `\begin{tabular}{列选项}` +要创建表,只需指定环境 `\begin{tabular}{ 列选项}` ``` \begin{tabular}{c|c} @@ -30,7 +31,7 @@ LaTeX 提供了许多工具来创建和定制表格,在本系列中,我们 ![Basic Table][2] -在上面的示例中,花括号中的”{c|c}”表示文本在列中的位置。下表总结了位置参数及其说明。 +在上面的示例中,花括号中的 ”{c|c}” 表示文本在列中的位置。下表总结了位置参数及其说明。 参数 | 位置 |:---:|:--- @@ -90,7 +91,7 @@ b{width} | 文本对齐单元格底部 正如您所看到的,文本超出了页面宽度;但是,有几个选项可以克服这个问题。 * 指定列宽,例如 m{5cm} - * 利用 TABLARX 环境,这需要在导言区中引用 TABLARX 宏包。 + * 利用 tablarx 环境,这需要在导言区中引用 tablarx 宏包。 #### 使用列宽管理长文本 @@ -110,7 +111,7 @@ b{width} | 文本对齐单元格底部 在我们利用表格之前,我们需要在导言区中加上它。TABLARX 方法见以下示例 -`\begin{tabularx}{宽度}{列选项}` +`\begin{tabularx}{ 宽度}{列选项}` ``` @@ -123,7 +124,7 @@ Text &\blindtext \\ \hline ![Tabularx][6] -请注意,我们需要处理长文本的列在花括号中指定了大写“X”。 +请注意,我们需要处理长文本的列在花括号中指定了大写 “X”。 ### 合并行合并列 @@ -131,7 +132,7 @@ Text &\blindtext \\ \hline #### 合并行 -Multirow 采用以下参数`\multirow{行的数量}{宽度}{文本}`,让我们看看下面的示例。 +Multirow 采用以下参数 `\multirow{ 行的数量}{宽度}{文本}`,让我们看看下面的示例。 ``` \begin{tabular}{|l|l|}\hline @@ -144,11 +145,11 @@ Multirow 采用以下参数`\multirow{行的数量}{宽度}{文本}`,让我们 ![MultiRow][7] -在上面的示例中,指定了两行,'*'告诉LaTeX自动管理单元格的大小。 +在上面的示例中,指定了两行,'*'告诉 LaTeX 自动管理单元格的大小。 #### 合并列 -Multicolumn 参数是 `{Multicolumn{列的数量}{单元格选项}{位置}{文本}`,下面的示例演示 Multicolumn。 +Multicolumn 参数是 `{Multicolumn{ 列的数量}{单元格选项}{位置}{文本}`,下面的示例演示 Multicolumn。 ``` \begin{tabular}{|l|l|l|}\hline @@ -164,14 +165,14 @@ Multicolumn 参数是 `{Multicolumn{列的数量}{单元格选项}{位置}{文 可以为文本、单个单元格或整行指定颜色。此外,我们可以为每一行配置交替的颜色。 -在给表添加颜色之前,我们需要在导言区引用 `\usepackage[table]{xcolor}`。我们还可以使用以下颜色参考 [LaTeX Color][9] 或在颜色前缀后面添加感叹号(从0到100的阴影)来定义颜色。例如,`gray!30` +在给表添加颜色之前,我们需要在导言区引用 `\usepackage[table]{xcolor}`。我们还可以使用以下颜色参考 [LaTeX Color][9] 或在颜色前缀后面添加感叹号(从 0 到 100 的阴影)来定义颜色。例如,`gray!30` ``` \definecolor{darkblue}{rgb}{0.0, 0.0, 0.55} \definecolor{darkgray}{rgb}{0.66, 0.66, 0.66} ``` -下面的示例演示了一个具有各种颜色的表,`\rowcolors` 采用以下选项`\rowcolors{起始行颜色}{偶数行颜色}{奇数行颜色}`。 +下面的示例演示了一个具有各种颜色的表,`\rowcolors` 采用以下选项 `\rowcolors{ 起始行颜色}{偶数行颜色}{奇数行颜色}`。 ``` \rowcolors{2}{darkgray}{gray!20} @@ -203,106 +204,83 @@ Multicolumn 参数是 `{Multicolumn{列的数量}{单元格选项}{位置}{文 ![Multi-row][12] -Let us discuss the changes that were implemented to resolve the multi-row with the alternate colour issue. +让我们讲解一下为解决合并行替换颜色问题而实施的更改。 - * The first row started above the multi-row - * The number of rows was changed from 2 to -2, which means to read from the line above - * \rowcolor was specified for each row, more importantly, the multi-rows must have the same colour so that you can have the desired results. + * 第一行从合并行上方开始 + * 行数从 2 更改为 -2,这意味着从上面的行开始读取 + * `\rowcolor` 是为每一行指定的,更重要的是,多行必须具有相同的颜色,这样才能获得所需的结果。 - - -One last note on colour, to change the colour of a column you need to create a new column type and define the colour. The example below illustrates how to define the new column colour. -``` +关于颜色的最后一个注意事项是,要更改列的颜色,需要创建新的列类型并定义颜色。下面的示例说明了如何定义新的列颜色。 ``` - -\newcolumntype{g}{&amp;gt;{\columncolor{darkblue}}l} +\newcolumntype{g}{>{\columncolor{darkblue}}l} ``` -``` - -Let’s break it down - - * \newcolumntype{g}: defines the letter _g_ as the new column - * {>{\columncolor{darkblue}}l}: here we select our desired colour, and _l_ tells the column to be left-justified, this can be subsitued with _c_ or _r_ +我们把它分解一下 + * `\newcolumntype{g}`:将字母 _g_ 定义为新列 + * `{>{\columncolor{darkblue}}l}`:在这里我们选择我们想要的颜色,并且 `l` 告诉列左对齐,这可以用 `c` 或 `r` 代替 ``` - -``` - -\begin{tabular}{g|l} -    \textsc{Release}  &amp;amp;\textsc{Codename} \\\ \hline -    Fedora Core 4 &amp;amp;Stentz \\\ -    &amp;amp;Fedora 8 \\\ -    \multirow{-2}{*}{Multi-Row} &amp;amp;Werewolf \\\ +\begin{tabular}{g|l} + \textsc{Release} &\textsc{Codename} \\ \hline + Fedora Core 4 &Stentz \\ + &Fedora 8 \\ + \multirow{-2}{*}{Multi-Row} &Werewolf \\ \end{tabular}\ ``` -``` - ![Column Colour][13] -### Landscape table +### 横向表 -There may be times when your table has many columns and will not fit elegantly in portrait. With the _rotating_ package in preamble you will be able to create a sideways table. The below example demonstrates this. +有时,您的表可能有许多列,纵向排列会很不好看。在导言区加入 “rotating” 包,您将能够创建一个横向表。下面的例子说明了这一点。 -For the landscape table, we will use the _sidewaystable_ environment and add the tabular environment within it, we also specified additional options. - - * \centering to position the table in the centre of the page - * \caption{} to give our table a name - * \label{} this enables us to reference the table in our document +对于横向表,我们将使用 `sidewaystable` 环境并在其中添加表格环境,我们还指定了其他选项。 + * `\centering` 可以将表格放置在页面中心 + * `\caption{}` 为表命名 + * `\label{}` 这使我们能够引用文档中的表 ``` - -``` - \begin{sidewaystable} \centering \caption{Sideways Table} \label{sidetable} \begin{tabular}{ll} -    \rowcolor{darkblue}\textsc{\color{white}Release}  &amp;amp;\textsc{\color{white}Codename} \\\ -    \rowcolor{gray!10}Fedora Core 4 &amp;amp;Stentz \\\ -    \rowcolor{gray!40} &amp;amp;Fedora 8 \\\ -    \rowcolor{gray!40}\multirow{-2}{*}{Multi-Row} &amp;amp;Werewolf \\\ + \rowcolor{darkblue}\textsc{\color{white}Release} &\textsc{\color{white}Codename} \\ + \rowcolor{gray!10}Fedora Core 4 &Stentz \\ + \rowcolor{gray!40} &Fedora 8 \\ + \rowcolor{gray!40}\multirow{-2}{*}{Multi-Row} &Werewolf \\ \end{tabular}\vspace{3mm} \end{sidewaystable} ``` -``` - ![Sideways Table][14] -### List and tables +### 列表和表格 -To include a list into a table you can use tabularx and include the list in the column where the _X_ is specified. Another option will be to use tabular but you must specify the column width. +要将列表包含到表中,可以使用 tabularx,并将列表包含在指定的列中。另一个办法是使用表格格式,但必须指定列宽。 -### List in tabularx -``` +#### 用 tabularx 处理列表 ``` - \begin{tabularx}{\textwidth}{|l|X|} \hline -    Fedora Version &amp;amp;Editions \\\ \hline -    Fedora 32 &amp;amp;\begin{itemize}[noitemsep] -        \item CoreOS -        \item Silverblue -        \item IoT -    \end{itemize} \\\ \hline + Fedora Version &Editions \\ \hline + Fedora 32 &\begin{itemize}[noitemsep] + \item CoreOS + \item Silverblue + \item IoT + \end{itemize} \\ \hline \end{tabularx}\vspace{3mm} ``` -``` - ![List in tabularx][15] -### List in tabular -``` +#### 用 tabular 处理列表 + ``` - \begin{tabular}{|l|m{6cm}|}\hline         Fedora Version &amp;amp;Editions \\\ \hline     Fedora 32 &amp;amp;\begin{itemize}[noitemsep] @@ -313,35 +291,29 @@ To include a list into a table you can use tabularx and include the list in the \end{tabular} ``` -``` - ![List in tabular][16] -### Conclusion +### 结论 -LaTeX offers many ways to customise your table with tabular and tabularx, you can also add both tabular and tabularx within the table environment (\begin\table) to add the table name and to position the table. +LaTeX 提供了许多使用 tablar 和 tablarx 自定义表的方法,您还可以在表环境 (\begin\table) 中添加 tablar 和 tablarx 来添加表的名称和定位表。 -### LaTeX packages +### LaTeX 宏包 -The packages used in this series are. -``` +所需的宏包有如下这些: ``` - \usepackage{fullpage} -\usepackage{blindtext}  % add demo text +\usepackage{blindtext} % add demo text \usepackage{array} % used for column positions \usepackage{tabularx} % adds tabularx which is used for text wrapping \usepackage{multirow} % multi-row and multi-colour support -\usepackage[table]{xcolor} % add colour to the columns +\usepackage[table]{xcolor} % add colour to the columns \usepackage{rotating} % for landscape/sideways tables ``` -``` +### 额外的知识 -### Additional Reading - -This was an intermediate lesson on tables; for more advanced information about tables and LaTex in general, you can go to [LaTeX Wiki][17] +这是一堂关于表的小课,有关表和 LaTex 的更多高级信息,请访问 [LaTex Wiki][17] ![][13] From c5e93b9da6b3358582ed7ab8af2b9204b58b070c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 19 Feb 2021 03:50:44 +0800 Subject: [PATCH 054/818] =?UTF-8?q?Revert=20"=E7=94=B3=E8=AF=B7=E8=AF=91?= =?UTF-8?q?=E6=96=87"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 751d7cf942ecebe8f9625509ab9f0eed7e5fba0b. --- sources/talk/20190313 Why is no one signing their emails.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/talk/20190313 Why is no one signing their emails.md b/sources/talk/20190313 Why is no one signing their emails.md index 2df66cf18d..b2b862951a 100644 --- a/sources/talk/20190313 Why is no one signing their emails.md +++ b/sources/talk/20190313 Why is no one signing their emails.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (sthwhl) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -92,7 +92,7 @@ via: https://arp242.net/weblog/signing-emails.html 作者:[Martin Tournoij][a] 选题:[lujun9972][b] -译者:[sthwhl](https://github.com/sthwhl) +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 422e366003b5b7b9683fcd7bcfadca7a55dfd426 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 19 Feb 2021 05:05:36 +0800 Subject: [PATCH 055/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210219=20?= =?UTF-8?q?7=20Ways=20to=20Customize=20Cinnamon=20Desktop=20in=20Linux=20[?= =?UTF-8?q?Beginner=E2=80=99s=20Guide]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210219 7 Ways to Customize Cinnamon Desktop in Linux -Beginner-s Guide.md --- ...amon Desktop in Linux -Beginner-s Guide.md | 130 ++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 sources/tech/20210219 7 Ways to Customize Cinnamon Desktop in Linux -Beginner-s Guide.md diff --git a/sources/tech/20210219 7 Ways to Customize Cinnamon Desktop in Linux -Beginner-s Guide.md b/sources/tech/20210219 7 Ways to Customize Cinnamon Desktop in Linux -Beginner-s Guide.md new file mode 100644 index 0000000000..c6e7195bf8 --- /dev/null +++ b/sources/tech/20210219 7 Ways to Customize Cinnamon Desktop in Linux -Beginner-s Guide.md @@ -0,0 +1,130 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (7 Ways to Customize Cinnamon Desktop in Linux [Beginner’s Guide]) +[#]: via: (https://itsfoss.com/customize-cinnamon-desktop/) +[#]: author: (Dimitrios https://itsfoss.com/author/dimitrios/) + +7 Ways to Customize Cinnamon Desktop in Linux [Beginner’s Guide] +====== + +Linux Mint is one the best [Linux distributions for beginners][1]. Especially Windows users that want to [switch to Linux][2], will find its flagship Cinnamon desktop environment very familiar. + +Cinnamon gives a traditional desktop experience and many users like it as it is. It doesn’t mean you have to content with what it provides. Cinnamon provides several ways for customizing the desktop. + +Reading about [MATE][3] and [KDE customization][4] guides, many readers requested similar tutorial for Linux Mint Cinnamon as well. Hence, I created this basic guide on tweaking the looks and feel of Cinnamon desktop. + +### 7 Different Ways for Customizing Cinnamon Desktop + +For this tutorial, I’m using [Linux Mint Debian Edition][5] (LMDE 4). You can use this on any Linux distribution that is running Cinnamon. If you are unsure, here’s [how to check which desktop environment][6] you are using. + +When it comes to changing the cinnamon desktop appearance, I find it very easy to do so as it is just 2 clicks away. Click on the menu icon and then on settings as shown below. + +![][7] + +All the appearance settings are placed on the top of the window. Everything on “System Settings” window looks neat and tidy. + +![][8] + +#### 1\. Effects + +The effects options are simple, self-explanatory and straightforward. You can turn on and off the effects for different elements of the desktop or change the window transitioning by changing the effects style. If you want to change the speed of the effects, you can do it through the customise tab. + +![][9] + +#### 2\. Font Selection + +In this section, you can differentiate the fonts you use throughout the system in size and type, and through the font settings you can fine-tune the appearance. + +![][10] + +#### 3\. Themes and icons + +A reason that I used to be a Linux Mint user for a few years, is that you don’t need to go all over the place to change what you want. Window manager, icon and panel customization all in one place! + +You can change your panel to a dark or light colour and the window borders to suit your changes. The default Cinnamon appearance settings look the best in my eyes, and I even applied the exact same when I was testing the [Ubuntu Cinnamon Remix][11] but in orange colour. + +![][12] + +#### 4\. Cinnamon Applets + +Cinnamon applets are all the elements included at your bottom panel like the calendar or the keyboard layout switcher. At the manage tab, you can add/remove the already installed applets. + +You should definitely explore the applets you can download, the weather and [CPU temperature][13] Indicator applets were my choices from the extras. + +![][14] + +#### 5\. Cinnamon Desklets + +Cinnamon Desklets are applications that can be placed directly to your desktop. Like all the other customization option, Desklets can be accessed from the settings menu and the wide variety of choices can attract anyone’s interest. Google calendar is a handy app to keep track of your schedule directly on your desktop. + +![][15] + +#### 6\. Desktop wallpaper + +To change the desktop background on Cinnamon desktop, simply right click on the desktop and choose “Change Desktop Background. It will open an easy to use window, where on the left side the available background system folders are listed and on the ride pane there is a preview of the images within each folder. + +![][16] + +You can add your own folders by clicking the plus (+) symbol by navigating to its path. At the Settings tab you can choose if you background will be static or slideshow and how the background is being positioned on the screen. + +![][17] + +#### 7\. Customize what’s on your desktop screen + +The background is not the only desktop element that you can change. You can find more options if you right click on the desktop and click on “Customise”. + +![][18] + +You can change the icon size, change the placement from vertical to horizontal and the spacing among them on both axis. If you don’t like what you did, click in reset grid spacing to go back to the default. + +![][19] + +Additionally, if you click on “Desktop Settings”, more options will be revealed. You can disable the icons on the desktop, place them on the primary or secondary monitor, or even both. As you can see, you can select some of the icons to appear on your desktop. + +![][20] + +### Conclusion + +Cinnamon desktop is one of the best to choose, especially if you are [switching from windows to Linux][21], but also for someone who is looking to a simple yet elegant desktop. + +Cinnamon desktop is very stable and never crashed on my hands, and it is one of the main reasons why it served me for so long on a variety of Linux distributions. + +I didn’t go in much details but gave you enough pointers to explore the settings on your own. Your feed to improve Cinnamon cuztomization is welcome. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/customize-cinnamon-desktop/ + +作者:[Dimitrios][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/dimitrios/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-linux-beginners/ +[2]: https://itsfoss.com/reasons-switch-linux-windows-xp/ +[3]: https://itsfoss.com/ubuntu-mate-customization/ +[4]: https://itsfoss.com/kde-customization/ +[5]: https://itsfoss.com/lmde-4-release/ +[6]: https://itsfoss.com/find-desktop-environment/ +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/6-Cinnamon-settings.png?resize=800%2C680&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/7-Cinnamon-Settings.png?resize=800%2C630&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/8-cinnamon-effects.png?resize=800%2C630&ssl=1 +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/11-font-selection.png?resize=800%2C650&ssl=1 +[11]: https://itsfoss.com/ubuntu-cinnamon-remix-review/ +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/10-cinnamon-themes-and-icons.png?resize=800%2C630&ssl=1 +[13]: https://itsfoss.com/check-laptop-cpu-temperature-ubuntu/ +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/12-cinnamon-applets.png?resize=800%2C630&ssl=1 +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/13-cinnamon-desklets.png?resize=800%2C630&ssl=1 +[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/1.-Cinnamon-change-desktop-background.png?resize=800%2C400&ssl=1 +[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/2-Cinnamon-change-desktop-background.png?resize=800%2C630&ssl=1 +[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/1.-desktop-additional-customization.png?resize=800%2C400&ssl=1 +[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/4-desktop-additional-customization.png?resize=800%2C480&ssl=1 +[20]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/5-desktop-additional-customization.png?resize=800%2C630&ssl=1 +[21]: https://itsfoss.com/guide-install-linux-mint-16-dual-boot-windows/ From c7f9f8f31eabbad9d1cffabd3ed83afcaab63c69 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 19 Feb 2021 05:05:58 +0800 Subject: [PATCH 056/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210218=20?= =?UTF-8?q?5=20must-have=20Linux=20media=20players?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210218 5 must-have Linux media players.md --- ...0210218 5 must-have Linux media players.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 sources/tech/20210218 5 must-have Linux media players.md diff --git a/sources/tech/20210218 5 must-have Linux media players.md b/sources/tech/20210218 5 must-have Linux media players.md new file mode 100644 index 0000000000..50d962c292 --- /dev/null +++ b/sources/tech/20210218 5 must-have Linux media players.md @@ -0,0 +1,100 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (5 must-have Linux media players) +[#]: via: (https://opensource.com/article/21/2/linux-media-players) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +5 must-have Linux media players +====== +Whether its movies or music, Linux has you covered with some great media +players. +![An old-fashioned video camera][1] + +In 2021, there are more reasons why people love Linux than ever before. In this series, I'll share 21 different reasons to use Linux. Playing media is one of my favorite reasons to use Linux. + +You may prefer vinyl and cassette tapes or VHS and Laserdisc, but it's still most likely that you consume the majority of the media you enjoy on a digital device. There's a convenience to media on a computer that can't be matched, largely because most of us are near a computer for most of the day. Many modern computer users don't give much thought to what applications are available for listening to music and watching movies because most operating systems provide a media player by default or because they subscribe to a streaming service and don't keep media files around themselves. But if your tastes go beyond the usual hit list of popular music and shows, or if you work with media for fun or profit, then you have local files you want to play. You probably also have opinions about the available user interfaces. On Linux, _choice_ is a mandate, and so your options for media playback are endless. + +Here are five of my must-have media players on Linux. + +### 1\. mpv + +![mpv interface][2] + +The mpv interface License: Creative Commons Attribution-ShareAlike + +A modern, clean, and minimal media player. Thanks to its Mplayer, [ffmpeg][3], and `libmpv` backends, it can play any kind of media you're likely to throw at it. And I do mean "throw at it" because the quickest and easiest way to start a file playing is just to drag the file onto the mpv window. Should you drag more than one file, mpv creates a playlist for you. + +While it provides intuitive overlay controls when you mouse over it, the interface is best when operated through the keyboard. For instance, **Alt+1** causes your mpv window to become full-size, and **Alt+0** reduces it to half-size. You can use the **,** and **.** keys to step through the video frame by frame, the **[** and **]** keys to adjust playback speed, **/** and ***** to adjust volume, **m** to mute, and so on. These master controls make for quick adjustments, and once you learn them, you can adjust playback almost as quickly as the thought occurs to you to do so. For both work and entertainment, mpv is my top choice for media playback. + +### 2\. Kaffeine and Rhythmbox + +![Kaffeine interface][4] + +The Kaffeine interface License: Creative Commons Attribution-ShareAlike + +Both the KDE Plasma and GNOME desktops provide music applications that can act as frontends to your personal music library. They invite you to establish a standard location for your music files and then scan through your music collection so you can browse according to album, artist, and so on. Both are great for those times when you just can't quite decide what you want to listen to and want an easy way to rummage through what's available. + +[Kaffeine][5] is actually much more than just a music player. It can play video files, DVDs, CDs, and even digital TV (assuming you have an incoming signal). I've gone whole days without closing Kaffeine, because no matter whether I'm in the mood for music or movies, Kaffeine makes it easy to start something playing. + +### 3\. Audacious + +![Audacious interface][6] + +The Audacious interface License: Creative Commons Attribution-ShareAlike + +The [Audacious][7] media player is a lightweight application that can play your music files (even MIDI files) or stream music from the Internet. Its main appeal, for me, is its modular architecture, which encourages the development of plugins. These plugins enable playback of nearly every audio media format you can think of, adjust the sound with a graphic equalizer, apply effects, and even reskin the entire application to change its interface. + +It's hard to think of Audacious as just one application because it's so easy to make it into the application you want it to be. Whether you're a fan of XMMS on Linux, WinAmp on Windows, or any number of alternatives, you can probably approximate them with Audacious. Audacious also provides a terminal command, `audtool`, so you can control a running instance of Audacious from the command line, so it even approximates a terminal media player! + +### 4\. VLC + +![vlc interface][8] + +The VLC interface License: Creative Commons Attribution-ShareAlike + +The [VLC][9] player is probably at the top of the list of applications responsible for introducing users to open source. A tried and true player of all things multimedia, VLC can play music, video, optical discs. It can also stream and record from a webcam or microphone, making it an easy way to capture a quick video or voice message. Like mpv, it can be controlled mostly through single-letter keyboard presses, but it also has a helpful right-click menu. It can convert media from one format to another, create playlists, track your media library, and much more. VLC is the best of the best, and most players don't even attempt to match its capabilities. It's a must-have application no matter what platform you're on. + +### 5\. Music player daemon + +![mpd with the ncmpc interface][10] + +mpd and ncmpc License: Creative Commons Attribution-ShareAlike + +The [music player daemon (mpd)][11] is an especially useful player, because it runs on a server. That means you can fire it up on a [Raspberry Pi][12] and leave it idling so you can tap into it whenever you want to play a tune. There are many clients for mpd, but I use [ncmpc][13]. With ncmpc or a web client like [netjukebox][14], I can contact mpd from the local host or a remote machine, select an album, and play it from anywhere. + +### Media on Linux + +Playing media on Linux is easy, thanks to its excellent codec support and an amazing selection of players. I've only mentioned five of my favorites, but there are many, many more for you to explore. Try them all, find the best, and then sit back and relax. + +We see how four music players, VLC, QMMP, Clementine, Amarok, compare. The author also recommends... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/linux-media-players + +作者:[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/LIFE_film.png?itok=aElrLLrw (An old-fashioned video camera) +[2]: https://opensource.com/sites/default/files/mpv_0.png +[3]: https://opensource.com/article/17/6/ffmpeg-convert-media-file-formats +[4]: https://opensource.com/sites/default/files/kaffeine.png +[5]: https://apps.kde.org/en/kaffeine +[6]: https://opensource.com/sites/default/files/audacious.png +[7]: https://audacious-media-player.org/ +[8]: https://opensource.com/sites/default/files/vlc_0.png +[9]: http://videolan.org +[10]: https://opensource.com/sites/default/files/mpd-ncmpc.png +[11]: https://www.musicpd.org/ +[12]: https://opensource.com/article/21/1/raspberry-pi-hifi +[13]: https://www.musicpd.org/clients/ncmpc/ +[14]: http://www.netjukebox.nl/ From d3d82ff7244a61a7a1bebd6ce927a4cbd5f658c0 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 19 Feb 2021 05:06:28 +0800 Subject: [PATCH 057/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210218=20?= =?UTF-8?q?Not=20an=20engineer=3F=20Find=20out=20where=20you=20belong?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210218 Not an engineer- Find out where you belong.md --- ... an engineer- Find out where you belong.md | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 sources/tech/20210218 Not an engineer- Find out where you belong.md diff --git a/sources/tech/20210218 Not an engineer- Find out where you belong.md b/sources/tech/20210218 Not an engineer- Find out where you belong.md new file mode 100644 index 0000000000..0a6589a01b --- /dev/null +++ b/sources/tech/20210218 Not an engineer- Find out where you belong.md @@ -0,0 +1,98 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Not an engineer? Find out where you belong) +[#]: via: (https://opensource.com/article/21/2/advice-non-technical) +[#]: author: (Dawn Parzych https://opensource.com/users/dawnparzych) + +Not an engineer? Find out where you belong +====== +Whether you've been working for decades or are just starting in +non-engineering tech role, this advice can help you figure out where you +belong. +![Looking at a map for career journey][1] + +In the [first article in this series][2], I explained the problems with dividing people and roles into "technical" or "non-technical" categories. In the [second article][3], I shared some of the tech roles for people who don't code. Here, I'll wrap up this exploration into what it means to be technical or non-technical with some recommendations to help you on your journey. + +Whether you've been working in tech for decades, are just starting, or are looking to change careers, consider the advice in this article from people who have been labeled as non-technical but are succeeding in tech roles. + +> "Don't tie up what you do and your identity. Get them separate." +> —Adam Gordon Bell, Developer Relations, Earthly Technologies + +Switching roles doesn't mean your skills will disappear and you no longer have value. If you take on a new role, you need to focus on that role's critical skills. It takes time to develop skills. Take your time, and figure out the important skills for the new position. + +If you manage engineers, encourage them to develop their non-engineering skills and their technical skills. These skills often make a more significant difference in career growth and success than coding and technical skills. + +### Be yourself + +> "Don't let other people define whether you are technical or not-technical. "What's technical and what's not, and whether that's important or not is something the people have to figure out for themselves." +> —Adam Gordon Bell + +> "Don't ever start a conversation with, 'I'm not technical.' It can come across as, 'I need to warn you about this thing,' which is never a good impression to make for an interview, but it also has the potential to come across as a lack of confidence in your skills." +> —Mary Thengvall, Director of Developer Relations, Camunda + +Avoid the stereotypes; not all engineers like Star Wars or Star Trek. Not all engineers wear hoodies. Engineers can speak to people. + +> "People have a lot of perceptions about the technical, non-technical piece, in terms of how you present. When I was working in the office, I would wear a dress because that's how I feel comfortable." +> —Shailvi Wakhlu, Senior Director of Data, Strava + +### Know your worth + +As I discussed in the first article, being labeled non-technical can lead to [impostor syndrome][4]. Recognize your value, and don't apply the non-technical label to yourself because it can limit earning potential and career growth. + +> "People kept reboxing me into something else because they thought I was different from the normal stereotype that they had for an engineer. I'm so glad that I didn't listen to any of those people because inherently they were also telling me to go for a lesser-paying job on the basis of something that was in addition to the skills that I had." +> —Shailvi Wakhlu + +> "It is more likely the younger and … the woman in tech, especially new to tech, who's going to have imposter syndrome, who's going to consider themselves not technical enough. Like, 'oh, I only do front-end.' What do you mean you _only_ do front-end? Front-end is incredibly hard." +> —Liz Harris + +### Find where you can add value and help people + +You don't need to create a pull request to participate in open source. + +> "I always say to people when they try to contribute to open source projects, 'don't think, it's got to be a commit, it's got to be a pull request.' It's like, 'No. How can you add value to that project?' If you haven't got time to do the pull request, are you raising an issue and putting the points down?" +> —Eddie Jaoude, Open Source Developer, Jaoude Studios + +### Diversity of thought leads to success + +See the value and contributions of all roles and people. Don't pigeonhole them into a set of abilities based on their title. + +> "Realize how important everybody is, including yourself at all times, and the overall picture of things. Being creative shouldn't be ego-driven. Realize that you can always be better. You can also be worse at what you do. Don't be afraid to ask for help, and realize that we're in there together." +> —Therese Eberhard, scenic painter for film, commercials, and video + +> "The hackathons that I have attended where we've all been technical, we've built a great team of four or five hardcore coders, we've lost. I kid you not, we've lost. And before COVID, I won six previous hackathons, and half the team was focused on other areas. In the hackathons we won, half the team would be considered non-technical by most people, although I do not like this term, as it is about adding value to the team/project. We won because we had so many different perspectives on what we were building." +> —Eddie Jaoude + +> "The more we can move away from those labels of technical/not technical, developer/not developer, and understand that there's a continuum, the better off we're all going to be as far as hiring the right people for the job, instead of letting ourselves get hung up by the presumption that you need a technical team." +> —Mary Thengvall + +The more diverse our communities and teams are, the more inclusive they are. + +> "I honestly think the most important thing, whether it's from a community perspective or whether it's from a product perspective, just in general, we have to make sure that we built an inclusive community, not just for our products, not just for the technology that we're working on, but as a human society in general. And I'm going to guess… I'm going to wager that if we do that, as a human species, we will actually be better than what we were yesterday." +> —Leon Stigter, Senior Product Manager, Lightbend + +If you work in a non-coding tech role, what advice would you give people who consider themselves "non-technical" (or are considered by others to be so)? Share your insights in the comments. + +There are lots of non-code ways to contribute to open source: Here are three alternatives. + +This year's keynote speaker at the annual All Things Open conference is Red Hat's DeLisa Alexander... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/advice-non-technical + +作者:[Dawn Parzych][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/dawnparzych +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/career_journey_road_gps_path_map_520.png?itok=PpL6jJgY (Looking at a map for career journey) +[2]: https://opensource.com/article/21/2/what-does-it-mean-be-technical +[3]: https://opensource.com/article/21/2/non-engineering-jobs-tech +[4]: https://opensource.com/business/15/9/tips-avoiding-impostor-syndrome From 12a7ece7a358780bfab4a120ac3dc82ff09a1151 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 19 Feb 2021 08:47:48 +0800 Subject: [PATCH 058/818] translated --- ... source alternative to Google Analytics.md | 83 ------------------- ... source alternative to Google Analytics.md | 83 +++++++++++++++++++ 2 files changed, 83 insertions(+), 83 deletions(-) delete mode 100644 sources/tech/20210208 Why choose Plausible for an open source alternative to Google Analytics.md create mode 100644 translated/tech/20210208 Why choose Plausible for an open source alternative to Google Analytics.md diff --git a/sources/tech/20210208 Why choose Plausible for an open source alternative to Google Analytics.md b/sources/tech/20210208 Why choose Plausible for an open source alternative to Google Analytics.md deleted file mode 100644 index 463d9d9944..0000000000 --- a/sources/tech/20210208 Why choose Plausible for an open source alternative to Google Analytics.md +++ /dev/null @@ -1,83 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why choose Plausible for an open source alternative to Google Analytics) -[#]: via: (https://opensource.com/article/21/2/plausible) -[#]: author: (Ben Rometsch https://opensource.com/users/flagsmith) - -Why choose Plausible for an open source alternative to Google Analytics -====== -Plausible is gaining attention and users as a viable, effective -alternative to Google Analytics. -![Analytics: Charts and Graphs][1] - -Taking on the might of Google Analytics may seem like a big challenge. In fact, you could say it doesn't sound plausible… But that's exactly what [Plausible.io][2] has done with great success, signing up thousands of new users since 2018. - -Plausible's co-founders Uku Taht and Marko Saric recently appeared on [The Craft of Open Source][3] podcast to talk about the project and how they: - - * Created a viable alternative to Google Analytics - * Gained so much momentum in less than two years - * Achieved their goals by open sourcing the project - - - -Read on for a summary of their conversation with podcast host and Flagsmith founder Ben Rometsch. - -### How Plausible got started - -In winter 2018, Uku started coding a project that he thought was desperately needed—a viable, effective alternative to Google Analytics—after becoming disillusioned with the direction Google products were heading and the fact that all other data solutions seemed to use Google as a "data-handling middleman." - -Uku's first instinct was to focus on the analytics side of things using existing database solutions. Right away, he faced some challenges. The first attempt, using PostgreSQL, was technically naïve, as it became overwhelmed and inefficient pretty quickly. Therefore, his goal morphed into making an analytics product that can handle large quantities of data points with no discernable decline in performance. To cut a long story short, Uku succeeded, and Plausible can now ingest more than 80 million records per month. - -The first version of Plausible was released in summer 2019. In March 2020, Marko came on board to head up the project's communications and marketing side. Since then, its popularity has grown with considerable momentum. - -### Why open source? - -Uku was keen to follow the "indie hacker" route of software development: create a product, put it out there, and see how it grows. Open source makes sense in this respect because you can quickly grow a community and gain popularity. - -But Plausible didn't start out as open source. Uku was initially concerned about the software's sensitive code, such as billing codes, but he soon released that this was of no use to people without the API token. - -Now, Plausible is fully open source under [AGPL][4], which they chose instead of the MIT License. Uku explains that under an MIT License, anyone can do anything to the code without restriction. Under AGPL, if someone changes the code, they must open source their changes and contribute the code back to the community. This means that large corporations cannot take the original code, build from it, then reap all the rewards. They must share it, making for a more level playing field. For instance, if a company wanted to plug in their billing or login system, they would be legally obliged to publish the code. - -During the podcast, Uku asked me about Flagsmith's license which is currently under a BSD 3-Clause license, which is highly permissive, but I am about to move some features behind a more restrictive license. So far, the Flagsmith community has been understanding of the change as they realize this will lead to more and better features. - -### Plausible vs. Google Analytics - -Uku says, in his opinion, the spirit of open source is that the code should be open for commercial use by anyone and shared with the community, but you can keep back a closed-source API module as a proprietary add-on. In this way, Plausible and other companies can cater to different use-cases by creating and selling bespoke API add-on licenses. - -Marko is a developer by trade, but from the marketing side of things, he worked to get the project covered on sites such as Hacker News and Lobster and build a Twitter presence to help generate momentum. The buzz created by this publicity also meant that the project took off on GitHub, going from 500 to 4,300 stars. As traffic grew, Plausible appeared on GitHub's trending list, which helped its popularity snowball. - -Marko also focused heavily on publishing and promoting blog posts. This strategy paid off, as four or five posts went viral within the first six months, and he used those spikes to amplify the marketing message and accelerate growth. - -The biggest challenge in Plausible's growth was getting people to switch from Google Analytics. The project's main goal was to create a web analytics product that is useful, efficient, and accurate. It also needed to be compliant with regulations and offer a high degree of privacy for both the business and website visitors. - -Plausible is now running on more than 8,000 websites. From talking to customers, Uku estimates that around 90% of them would have run Google Analytics. - -Plausible runs on a standard software-as-a-service (SaaS) subscription model. To make things fairer, it charges per page view on a monthly basis, rather than charging per website. This can prove tricky with seasonal websites, say e-commerce sites that spike at the holidays or US election sites that spike once every four years. These can cause pricing problems under the monthly subscription model, but it generally works well for most sites. - -### Check out the podcast - -To discover more about how Uku and Marko grew the open source Plausible project at a phenomenal rate and made it into a commercial success, [listen to the podcast][3] and check out [other episodes][5] to learn more about "the ins-and-outs of the open source software community." - -Sandstorm's Jade Wang shares some of her favorite open source web apps that are self-hosted... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/plausible - -作者:[Ben Rometsch][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/flagsmith -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/analytics-graphs-charts.png?itok=sersoqbV (Analytics: Charts and Graphs) -[2]: https://plausible.io/ -[3]: https://www.flagsmith.com/podcast/02-plausible -[4]: https://www.gnu.org/licenses/agpl-3.0.en.html -[5]: https://www.flagsmith.com/podcast diff --git a/translated/tech/20210208 Why choose Plausible for an open source alternative to Google Analytics.md b/translated/tech/20210208 Why choose Plausible for an open source alternative to Google Analytics.md new file mode 100644 index 0000000000..989e43db08 --- /dev/null +++ b/translated/tech/20210208 Why choose Plausible for an open source alternative to Google Analytics.md @@ -0,0 +1,83 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Why choose Plausible for an open source alternative to Google Analytics) +[#]: via: (https://opensource.com/article/21/2/plausible) +[#]: author: (Ben Rometsch https://opensource.com/users/flagsmith) + +为什么选择 Plausible 作为 Google Analytics 的开源替代品? +====== +Plausible作为Google Analytics 的可行,有效的替代方案正在引起用户的关注。 +![Analytics: Charts and Graphs][1] + +发挥 Google Analytics 的威力似乎是一个巨大的挑战。实际上,你可以说这听起来似乎不合理。但这正是 [Plausible.io][2]取得巨大成功的原因,自 2018 年以来已注册了数千名新用户。 + +Plausible 的联合创始人 Uku Taht 和 Marko Saric 最近出现在 [The Craft of Open Source][3] 播客上,谈论了这个项目以及他们如何: + +* 创建了一个可行的替代 Google Analytics 的方案 +* 在不到两年的时间里获得了如此大的发展势头 +* 通过开源项目外包实现其目标 + + + +请继续阅读他们与播客主持人和 Flagsmith 创始人 Ben Rometsch 的对话摘要。 + +### Plausible 是如何开始的 + +2018年 冬天,Uku 开始编写一个他认为急需的项目:一个可行的、有效的 Google Analytics 替代方案。因为他对 Google 产品的发展方向感到失望,而且所有其他数据解决方案似乎都把 Google 当作“数据处理中间人”。 + +Uku 的第一直觉是利用现有的数据库解决方案专注于分析方面的工作。马上,他就遇到了一些挑战。第一次尝试使用了 PostgreSQL,这在技术上很幼稚,因为它很快就变得不堪重负,效率很低。因此,他的目标蜕变成了做一个分析产品,可以处理大量的数据点,而且性能不会有明显的下降。长话短说,Uku 成功了,Plausible 现在每月可以摄取超过 8000 万条记录。 + +Plausible 的第一个版本于 2019 年夏天发布。2020 年 3 月,Marko 加入,负责项目的传播和营销方面的工作。从那时起,它的受欢迎程度以相当大的势头增长。 + +### 为什么要开源? + +Uku 热衷于遵循“独立黑客”的软件开发路线:创建一个产品,把它放在那里,然后看看它如何成长。开源在这方面是有意义的,因为你可以迅速发展一个社区并获得人气。 + +但 Plausible 一开始并不是开源的。Uku 最初担心软件的敏感代码,比如计费代码,但他很快就发布了,因为这对没有 API 令牌的人来说是没有用的。 + + +现在,Plausible 是在 [AGPL][4] 下完全开源的,他们选择了 AGPL 而不是 MIT 许可。Uku 解释说,在 MIT 许可下,任何人都可以不受限制地对代码做任何事情。在 AGPL 下,如果有人修改代码,他们必须将他们的修改开源,并将代码回馈给社区。这意味着,大公司不能拿着原始代码,在此基础上进行构建,然后获得所有的回报。他们必须共享,使得竞争环境更加公平。例如,如果一家公司想插入他们的计费或登录系统,他们将有法律义务发布代码。 + + +在播客中,Uku 问我关于 Flagsmith 的授权,目前Flagsmith的授权采用 BSD 3-Clause 许可,该许可证是高度允许的,但我即将把一些功能移到更严格的许可后面。到目前为止,Flagsmith 社区已经理解了这一变化,因为他们意识到这将带来更多更好的功能。 + +### Plausible vs. Google Analytics + +Uku说,在他看来,开源的精神是,代码应该是开放的,任何人都可以进行商业使用,并与社区共享,但你可以把一个闭源的 API 模块作为专有附加组件保留下来。这样一来,Plausible 和其他公司就可以通过创建和销售定制的 API 附加许可来满足不同的使用场景。 + +Marko 职位上是一名开发者,但从营销方面来说,他努力让这个项目在 Hacker News 和 Lobster 等网站上得到报道,并建立了 Twitter 帐户以帮助产生动力。这种宣传带来的热潮也意味着该项目在 GitHub 上起飞,从 500 颗星到 4300 颗星。随着流量的增长,Plausible 出现在 GitHub 的趋势列表中,这帮助它的人气滚起了雪球。 + +Marko 还非常注重发布和推广博客文章。这一策略得到了回报,在最初的 6 个月里,有四五篇文章进入了病毒式传播,他利用这些峰值来放大营销信息,加速了增长。 + +Plausible 成长过程中最大的挑战是让人们从 Google Analytics 上转换过来。这个项目的主要目标是创建一个有用、高效、准确的网络分析产品。它还需要符合法规,并为企业和网站访问者提供高度的隐私。 + +Plausible 现在已经在 8000 多个网站上运行。通过与客户的交谈,Uku 估计其中约 90% 的客户会已经用过 Google Analytics。 + +Plausible 以标准的软件即服务 (SaaS) 订阅模式运行。为了让事情更公平,它按月页面浏览量收费,而不是按网站收费。对于季节性网站来说,这可能会有麻烦,比如说电子商务网站在节假日会激增,或者美国大选网站每四年激增一次。这些可能会导致月度订阅模式下的定价问题,但它通常对大多数网站很好。 + + +### 查看播客 + +想要了解更多关于 Uku 和 Marko 如何以惊人的速度发展开源 Plausible 项目,并使其获得商业上的成功,请[收听播客][3],并查看[其他集锦][5],了解更多关于“开源软件社区的来龙去脉”。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/plausible + +作者:[Ben Rometsch][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/flagsmith +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/analytics-graphs-charts.png?itok=sersoqbV (Analytics: Charts and Graphs) +[2]: https://plausible.io/ +[3]: https://www.flagsmith.com/podcast/02-plausible +[4]: https://www.gnu.org/licenses/agpl-3.0.en.html +[5]: https://www.flagsmith.com/podcast \ No newline at end of file From 2187dba603d426a855993a308ff50df16bb47770 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 19 Feb 2021 08:51:58 +0800 Subject: [PATCH 059/818] translating --- ... this bootable USB drive on Linux to rescue Windows users.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210217 Use this bootable USB drive on Linux to rescue Windows users.md b/sources/tech/20210217 Use this bootable USB drive on Linux to rescue Windows users.md index 22ddf703d9..9a8c541d12 100644 --- a/sources/tech/20210217 Use this bootable USB drive on Linux to rescue Windows users.md +++ b/sources/tech/20210217 Use this bootable USB drive on Linux to rescue Windows users.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 5df061104db6df2146740ed96d1cc0fc83704508 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 19 Feb 2021 09:25:54 +0800 Subject: [PATCH 060/818] Rename sources/tech/20210218 Not an engineer- Find out where you belong.md to sources/talk/20210218 Not an engineer- Find out where you belong.md --- .../20210218 Not an engineer- Find out where you belong.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20210218 Not an engineer- Find out where you belong.md (100%) diff --git a/sources/tech/20210218 Not an engineer- Find out where you belong.md b/sources/talk/20210218 Not an engineer- Find out where you belong.md similarity index 100% rename from sources/tech/20210218 Not an engineer- Find out where you belong.md rename to sources/talk/20210218 Not an engineer- Find out where you belong.md From cd3905f6df24c49632fb91bee2319923ec249958 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 19 Feb 2021 11:10:16 +0800 Subject: [PATCH 061/818] PRF @mengxinayan --- ...to get started with open source in 2021.md | 94 ++++++++++--------- 1 file changed, 48 insertions(+), 46 deletions(-) diff --git a/translated/tech/20210118 10 ways to get started with open source in 2021.md b/translated/tech/20210118 10 ways to get started with open source in 2021.md index b57fca86f5..c9c6e31bc0 100644 --- a/translated/tech/20210118 10 ways to get started with open source in 2021.md +++ b/translated/tech/20210118 10 ways to get started with open source in 2021.md @@ -1,100 +1,102 @@ [#]: collector: (lujun9972) [#]: translator: (mengxinayan) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (10 ways to get started with open source in 2021) [#]: via: (https://opensource.com/article/21/1/getting-started-open-source) [#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo) -2021 年开始使用开源的10钟方法 +2021 年开始使用开源的 10 种方式 ====== -如果您刚开始接触开源,那么下面的 2020 年十大文章有助于指导您的发展之路。 -![看着职业生涯的地图][1] -opensource.com 存在的意义是为了向世界宣传开源的一切,从新工具到框架拓展到社区。我们的目标是让想要使用开源或为开源做贡献的人更容易参与其中。 +> 如果你刚开始接触开源,那么下面的 2020 年十篇好文章有助于指导你的发展之路。 -入门开源可能很难,所以我们定期分享如何参与其中的提示和建议。如果你想要学习 Python,帮助抗击 COVID-19,或者加入 K8s 设置,我们将为您服务。 +![](https://img.linux.net.cn/data/attachment/album/202102/19/110943di1i609a9spys1i1.jpg) -为了帮助您开始,我们总结了2020年发布的 10 篇最流行的开源入门文章。希望它们能激发您在 2021 年学习一些新知识。 +我们存在的意义是为了向世界宣传开源的一切,从新工具到框架拓展到社区。我们的目标是让想要使用开源或为开源做贡献的人更容易参与其中。 -### 利用 Python 实现网络爬虫的新手指南 +入门开源可能很难,所以我们定期分享如何参与其中的提示和建议。如果你想要学习 Python,帮助抗击 COVID-19,或者加入 K8s 设置,我们将为你服务。 -您是否想通过实践而不是阅读来学习 Python?在本教程中,Julia Piaskowski 将会指导您完成她的第一个[Python 网页爬取项目][2]。她具体展示了如何使用 Python 库请求访问网页内容。 +为了帮助你开始,我们总结了 2020 年发布的 10 篇最流行的开源入门文章。希望它们能激发你在 2021 年学习一些新知识。 -Julia 详细介绍了每一步,从安装 Python3 到使用 pandas 来清洁 Web 抓取结果。她利用了大量截图解释了如何以最终目标为目的进行爬取。 +### 《利用 Python 爬取网站的新手指南》 -有关爬取相关内容的部分特别有用;当遇到困难处时,她会详细解释。但是,与本文的其余部分一样,她会指导您完成每个步骤。 +你是否想通过实践而不是阅读来学习 Python?在本教程中,Julia Piaskowski 将会指导你完成她的第一个[Python 网页爬取项目][2]。她具体展示了如何使用 Python 的 `requests` 库访问网页内容。 -### 在 Linux 上使用 SSH 进行远程连接的初学者指南 +Julia 详细介绍了每一步,从安装 Python3 到使用 Pandas 来清理 Web 抓取结果。她利用了大量截图解释了如何以最终目标为目的进行爬取。 + +有关爬取相关内容的部分特别有用;当遇到困难处时,她会详细解释。但是,与本文的其余部分一样,她会指导你完成每个步骤。 + +### 《在 Linux 上使用 SSH 进行远程连接的初学者指南》 如果你之前从未使用过安全 shell(SSH),那么你在第一次使用时可能会感到困惑。在本教程中,Seth Kenlon 展示了[如何为两台计算机之间配置 SSH 连接][3],以及如何不使用密码而安全地进行连接。 -Seth 解释了建立 SSH 连接的每个步骤,从您应该了解的四个关键术语到在每个主机上激活 SSH 的步骤。他还提供了有关查找计算机 IP 地址、创建 SSH 密钥以及堆远程计算机的远程访问权限的建议。 +Seth 解释了建立 SSH 连接的每个步骤,从你应该了解的四个关键术语到在每个主机上激活 SSH 的步骤。他还提供了有关查找计算机 IP 地址、创建 SSH 密钥以及对远程计算机的远程访问权限的建议。 -### 学习任何编程语言的 5 个步骤 +### 《五步学会任何编程语言》 -如果您已经掌握了一种编程语言,则可以[全部学习[4]。这是 Seth Kenlon 编写本文的前提,他认为了解一些基本编程逻辑便可以跨语言拓展。 +如果你已经掌握了一种编程语言,你就能[学习所有的语言][4]。这是 Seth Kenlon 编写本文的前提,他认为了解一些基本编程逻辑便可以跨语言拓展。 -Seth 分享了程序员在学习一种新的编程语言或编码方式时所需要的五种东西。语法、内置函数和解析器位于这五种之中,他将会陪着每个人采取行动。 +Seth 分享了程序员在学习一种新的编程语言或编码方式时所需要的五种东西。语法、内置函数和解析器是这五种之一,他对每一种都附上了行动步骤。 -那么团结它们的关键方式是?一旦了解了代码工作原理,您就可以跨语言拓展。没有什么太难的让您学习。 +那么将它们统一起来的关键方式是?一旦了解了代码工作原理,你就可以跨语言拓展。对你来说,没有什么是太难学的。 -### 为 COVID-19 贡献开源医疗项目 +### 《为 COVID-19 贡献开源医疗项目》 -您是否知道一家意大利医院通过 3D 打印机设备挽救了 COVID-19 患者的生命?这是开源贡献者为 2020 年 COVID-19 大流行[建立的众多解决方案之一][5]。 +你是否知道一家意大利医院通过 3D 打印机设备挽救了 COVID-19 患者的生命?这是开源贡献者为 2020 年 COVID-19 大流行[建立的众多解决方案之一][5]。 -在本文中,Joshua Pearce 分享了针对 COVID-19 的开源志愿服务项目。虽然 Open Air 是最大的项目,但 Joshua 解释了如何在 wiki 上为开源呼吸机工作,编写开源 COVID-19 医疗供应要求,测试开源氧气浓缩机原型等。 +在本文中,Joshua Pearce 分享了针对 COVID-19 的开源志愿服务项目。虽然 Open Air 是最大的项目,但 Joshua 解释了如何为开源呼吸机的维基工作,编写开源 COVID-19 医疗供应要求,测试开源氧气浓缩机原型等。 -### GNOME 入门建议 +### 《GNOME 入门建议》 -GNOME 是最受欢迎的 Linux 桌面之一,但是它适合您吗?本文分享了[来自 GNOME 用户的建议][6],以及 opensource.com 上有关此主题的文章。 +GNOME 是最受欢迎的 Linux 桌面之一,但是它适合你吗?本文分享了[来自 GNOME 用户的建议][6],以及有关此主题的文章。 -想要在配置桌面上寻找一些灵感吗?本文包含了有关 GNOME 拓展入门,将 Dash 安装到 Dock,使用 GNOME Tweak 工具等的链接。 +想要在配置桌面上寻找一些灵感吗?本文包含了有关 GNOME 扩展入门,将 Dash 安装到 Dock,使用 GNOME Tweak 工具等的链接。 -毕竟,您可能会认为 GNOME 仍然不适合您——不用担心,最后您将找到指向其他 Linux 桌面和窗口管理器的链接。 +不过,你仍然可能会认为 GNOME 不适合你——不用担心,最后你将找到指向其他 Linux 桌面和窗口管理器的链接。 -### 现在开始为开源做贡献的 3 个理由 +### 《现在开始为开源做贡献的 3 个理由》 -截至到 2020 年 6 月,Github 托管了超过 180,000 个公共仓库。现如今加入开源社区比过去更容易,但这是意味着您应该这样做?在本文中,opensource.com 通讯员 Jason Blais [分享了三个尝试的原因][7]。 +截至到 2020 年 6 月,Github 托管了超过 180,000 个公共仓库。现如今加入开源社区比过去更容易,但这是否意味着你应该加入开源?在本文中,Jason Blais [分享了三个投身开源的原因][7]。 -为开源做贡献可以增强您的信心,简历和专业网络。Jason 还解释了如何利用有用的信息,从如何在领英(LinkedIn)个人资料中添加开源信息,到如何将这些信息转变为付费角色。 最后还列出了供初学者使用的出色项目。 +为开源做贡献可以增强你的信心、简历和专业网络。Jason 还解释了如何利用有用的信息,从如何在领英个人资料中添加开源信息,到如何将这些贡献转变为付费角色。最后还列出了供初学者参与的出色项目。 -### 作为 Linux 系统管理员为开源做贡献的 4 种方法 +### 《作为 Linux 系统管理员为开源做贡献的 4 种方法》 系统管理员是开源的无名英雄。他们在代码背后做了大量工作,这些代码非常有价值,但通常是看不见的。 -在本文中,Elizabeth K. Joseph 介绍了她如何以 Linux 系统管理员的身份[来改善开源项目][8]。她离开社区比发现社区更好的几种方式为用户支持、托管项目资源以及查找新的网站环境。 +在本文中,Elizabeth K. Joseph 介绍了她如何以 Linux 系统管理员的身份[来改善开源项目][8]。用户支持、托管项目资源、寻找新的网站环境是让社区比她发现时变得更好的几种方式。 -也许最重要的贡献是什么?文档!Elizabeth 开始使用开源程序,为她使用的项目重写了快速入门指南。同时向您经常使用的项目提交错误和补丁报告是参与其中的理想方法。 +也许最重要的贡献是什么?文档!Elizabeth 在开源领域的起步是她为使用的项目重写了快速入门指南。向你经常使用的项目提交错误和补丁报告是参与其中的理想方法。 -### 为 Slack 的开源替代品做出贡献的 6 种方法 +### 《为 Slack 的开源替代品做出贡献的 6 种方法》 -Mattermost 是需要开源消息传递系统的团队的流行平台。其活跃、充满活力的社区是让用户保持忠诚度的关键因素,尤其是对那些具有 Go,React 和 DevOps 经验的用户。 +Mattermost 是一个很受欢迎的平台,适合那些想要一个开源消息传递系统的团队的平台。其活跃、充满活力的社区是让用户保持忠诚度的关键因素,尤其是对那些具有 Go、React 和 DevOps 经验的用户。 -如果您想[为 Mattermost 做出贡献][9],Jason Blais 具体介绍了如何参与其中。将本文视为您的入门文档:Blais 分享了您要采取的步骤,并介绍了您可以做出的六种贡献。 +如果你想[为 Mattermost 做出贡献][9],Jason Blais 具体介绍了如何参与其中。将本文视为你的入门文档:Blais 分享了你要采取的步骤,并介绍了你可以做出的六种贡献。 -无论您是要构建集成还是本地化语言,本文都将介绍如何进行。 +无论你是要构建一个集成还是本地化你的语言,本文都将介绍如何进行。 -### 如何为 K8s 做贡献 +### 《如何为 Kubernetes 做贡献》 -当我走进 2018 年温哥华青年开源峰会却不了解 K8s。主题演讲结束后,我离开会场后依然是一个困惑的女人。毫不夸张地说,K8s 已经彻底改变了开源:找到一个更受欢迎、更具影响力的项目很困难。 +当我走进 2018 年温哥华青年开源峰会时,还很年轻,对 Kubernetes 一无所知。主题演讲结束后,我离开会场后依然是一个有所改变而依然困惑的女人。毫不夸张地说,Kubernetes 已经彻底改变了开源,这并不夸张:很难找到一个更受欢迎、更有影响力的项目。 -如果您想做出贡献,那么 IBM 工程师 Tara Gu 介绍了[她是如何开始的][10]。本文介绍了她在 All Things Open 2019 会议上的闪电演讲的回顾以及包括她亲自演讲的视频。还记得那些吗? +如果你想做出贡献,那么 IBM 工程师 Tara Gu 介绍了[她是如何开始的][10]。本文介绍了她在 All Things Open 2019 会议上的闪电演讲的回顾以及包括她亲自演讲的视频。还记得吗? -### 任何人如何在工作中为开源软件做出贡献 +### 《任何人如何在工作中为开源软件做出贡献》 -必要性是发明之母,尤其是在开源中。许多人针对自己遇到的问题构建开源解决方案。但是如果开发人员在没有收集目标用户反馈的情况下通过构建产品而错过了商标,会发生什么呢? +需求是发明之母,尤其是在开源领域。许多人针对自己遇到的问题构建开源解决方案。但是如果开发人员在没有收集目标用户反馈的情况下通过构建产品而错过了目标,会发生什么呢? -产品和设计团队通常会填补企业中的这一空白。如果开源团队中不存在这样的角色,开发人员应该怎么做? +在企业中,产品和设计团队通常会填补这一空白。如果开源团队中不存在这样的角色,开发人员应该怎么做? 在本文中,Catherine Robson 介绍了开源团队如何从目标用户那里[收集反馈][11]。它为希望与开发人员分享他们的工作经验,从而将他们的反馈贡献到开源项目的人们而编写。 -Catherine 概述的步骤将帮助您与开源团队分享您的见解,并在帮助团队开发更好的产品方面发挥关键作用。 +Catherine 概述的步骤将帮助你与开源团队分享你的见解,并在帮助团队开发更好的产品方面发挥关键作用。 -### 您想要学习什么? +### 你想要学习什么? -您想了解开源入门哪些方面的知识?请在评论中分享您堆文章主题的建议。同时如果您有一个故事可以分享,以帮助他人开始使用开源软件,请考虑为 opensource.com [编写文章][12]。 +你想了解开源入门哪些方面的知识?请在评论中分享你对文章主题的建议。同时如果你有故事可以分享,以帮助他人开始使用开源软件,请考虑[撰写文章][12]。 -------------------------------------------------------------------------------- @@ -103,16 +105,16 @@ via: https://opensource.com/article/21/1/getting-started-open-source 作者:[Lauren Maffeo][a] 选题:[lujun9972][b] 译者:[萌新阿岩](https://github.com/mengxinayan) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]: https://opensource.com/users/lmaffeo [b]: https://github.com/lujun9972 [1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/career_journey_road_gps_path_map_520.png?itok=PpL6jJgY (Looking at a map for career journey) -[2]: https://opensource.com/article/20/5/web-scraping-python +[2]: https://linux.cn/article-13047-1.html [3]: https://opensource.com/article/20/9/ssh -[4]: https://opensource.com/article/20/10/learn-any-programming-language +[4]: https://linux.cn/article-12842-1.html [5]: https://opensource.com/article/20/3/volunteer-covid19 [6]: https://opensource.com/article/20/6/gnome-users [7]: https://opensource.com/article/20/6/why-contribute-open-source From 07671ed0f26af986ba7d319f05fa61b83c705949 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 19 Feb 2021 11:11:08 +0800 Subject: [PATCH 062/818] PUB @mengxinayan https://linux.cn/article-13132-1.html --- ...0210118 10 ways to get started with open source in 2021.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210118 10 ways to get started with open source in 2021.md (99%) diff --git a/translated/tech/20210118 10 ways to get started with open source in 2021.md b/published/20210118 10 ways to get started with open source in 2021.md similarity index 99% rename from translated/tech/20210118 10 ways to get started with open source in 2021.md rename to published/20210118 10 ways to get started with open source in 2021.md index c9c6e31bc0..0918235499 100644 --- a/translated/tech/20210118 10 ways to get started with open source in 2021.md +++ b/published/20210118 10 ways to get started with open source in 2021.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (mengxinayan) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13132-1.html) [#]: subject: (10 ways to get started with open source in 2021) [#]: via: (https://opensource.com/article/21/1/getting-started-open-source) [#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo) From 8651af28ee49711aa70e10750429785f270dde1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=B6=85=E6=99=BA?= Date: Fri, 19 Feb 2021 12:04:01 +0800 Subject: [PATCH 063/818] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020171025=20Typese?= =?UTF-8?q?t=20your=20docs=20with=20LaTeX=20and=20TeXstudio=20on=20Fedora?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md --- ...docs with LaTeX and TeXstudio on Fedora.md | 154 ++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 sources/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md diff --git a/sources/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md b/sources/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md new file mode 100644 index 0000000000..7f812b776b --- /dev/null +++ b/sources/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md @@ -0,0 +1,154 @@ +[#]: collector: (Chao-zhi) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Typeset your docs with LaTeX and TeXstudio on Fedora) +[#]: via: (https://fedoramagazine.org/typeset-latex-texstudio-fedora/) +[#]: author: (Julita Inca Chiroque ) + +Typeset your docs with LaTeX and TeXstudio on Fedora +====== +![](https://fedoramagazine.org/wp-content/uploads/2017/07/latex-texstudio-945x400.jpg) + +LaTeX is [a document preparation system][1] for high-quality typesetting. It’s often used for larger technical or scientific documents. However, you can use LaTeX for almost any form of publishing. Teachers can edit their exams and syllabi, and students can present their thesis and reports for classes. This article gets you started with the TeXstudio app. TeXstudio makes it easy to edit LaTeX documents. + +### Launching TeXstudio + +If you’re using Fedora Workstation, launch Software, and type TeXstudio to search for the app. Then select Install to add TeXstudio to your system. You can also launch the app from Software, or go to the shell overview as usual. + +Alternately, if you use a terminal, type texstudio. If the package isn’t installed, the system prompts you to install it. Type y to start the installation. + +``` +$ texstudio +bash: texstudio: command not found... +Install package 'texstudio' to provide command 'texstudio'? [N/y] y +``` + +LaTeX commands typically start with a backslash (), and command parameters are enclosed in curly braces { }. Start by declaring the type of the documentclass. This example shows you the document class is an article. + +Then, once you declare the documentclass, mark the beginning and the end of the document with begin and end. In between these commands, write a paragraph similar to the following: + +``` +\documentclass{article} +\begin{document} +The Fedora Project is a project sponsored by Red Hat primarily to co-ordinate the development of the Linux-based Fedora operating system, operating with the vision that the project "creates a world where free culture is welcoming and widespread, collaboration is commonplace, and people control their content and devices". The Fedora Project was founded on 22 September 2003 when Red Hat decided to split Red Hat Linux into Red Hat Enterprise Linux (RHEL) and a community-based operating system, Fedora. +\end{document} +``` + +![](https://fedoramagazine.org/wp-content/uploads/2017/07/Screenshot-from-2017-10-05-20-19-15.png) + +### Working with spacing + +To create a paragraph break, leave one or more blank spaces between text.  Here’s an example with four paragraphs: + +![](https://fedoramagazine.org/wp-content/uploads/2017/07/Screenshot-from-2017-10-18-14-24-42.png) + +You can see from the example that more than one line break doesn’t create additional blank space between paragraphs. However, if you do need to leave additional space, use the commands hspace and vspace. These add horizontal and vertical space, respectively. Here is some example code that shows additional spacing around paragraphs: + +``` +\documentclass{article} +\begin{document} + +\hspace{2.5cm} The four essential freedoms + +\vspace{0.6cm} +A program is free software if the program's users have the 4 essential freedoms: + +The freedom to run the program as you wish, for any purpose (freedom 0).\vspace{0.2cm} +The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this.\vspace{0.2cm} + +The freedom to redistribute copies so you can help your neighbour (freedom 2).\vspace{0.2cm} + +The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this. + +\end{document} +``` + +![](https://fedoramagazine.org/wp-content/uploads/2017/07/Screenshot-from-2017-10-18-17-24-53.png) + +### Using Lists and Formats + +This example would look better if it presented the four essential freedoms of free software as a list. Set the list structure by using \begin{itemize} at the beginning of the list, and \end{itemize} at the end. Precede each item with the command \item. + +Additional format also helps make the text more readable. Useful commands for formatting include bold, italic, underline, huge, large, tiny and textsc to help emphasize text: + +``` +\documentclass{article} +\begin{document} + +\hspace{2cm} {\huge The four essential freedoms} + +\vspace{0.6cm} +\noindent {\large A program is free software if the program's users have the 4 essential freedoms}: +\begin{itemize} +\item \vspace{0.2cm} +\noindent \textbf{The freedom to run} the program as you wish, for any purpose \textit{(freedom 0)}. \vspace{0.2cm} +\item \noindent \textbf{The freedom to study} how the program works, and change it so it does your computing as you wish \textit{(freedom 1)}. Access to the source code is a precondition for this.\vspace{0.2cm} + +\item \noindent \textbf{The freedom to redistribute} copies so you can help your neighbour \textit{(freedom 2)}.\vspace{0.2cm} + +\item \noindent \textbf{The freedom to distribute copies of your modified versions} to others \textit{(freedom 3)}. \tiny{By doing this you can give the whole community a chance to benefit from your changes.\underline{\textsc{ Access to the source code is a precondition for this.}}} +\end{itemize} +\end{document} +``` + +### Adding columns, images and links + +Columns, images and links help add further information to your text. LaTeX includes functions for some advanced features as packages. The \usepackage command loads the package so you can make use of these features. + +For example, to make an image visible, you might use the command \usepackage{graphicx}. Or, to set up columns and links, use \usepackage{multicol} and \usepackage{hyperref}, respectively. + +The \includegraphics command places an image inline in your document. (For simplicity, include the graphics file in the same directory as your LaTeX source file.) + +Here’s an example that uses all these concepts. It also uses two PNG graphics files that were downloaded. Try your own graphics to see how they work. + +``` +\documentclass{article} +\usepackage{graphicx} +\usepackage{multicol} +\usepackage{hyperref} +\begin{document} + \textbf{GNU} + \vspace{1cm} + + GNU is a recursive acronym for "GNU's Not Unix!", chosen because GNU's design is Unix-like, but differs from Unix by being free software and containing no Unix code. + + Richard Stallman, the founder of the project, views GNU as a "technical means to a social end". Stallman has written about "the social aspects of software and how Free Software can create community and social justice." in his "Free Society" book. + \vspace{1cm} + + \textbf{Some Projects} + + \begin{multicols}{2} + Fedora + \url{https://getfedora.org} + \includegraphics[width=1cm]{fedora.png} + + GNOME + \url{https://getfedora.org} + \includegraphics[width=1cm]{gnome.png} + \end{multicols} + +\end{document} +``` + +[][2] + +The features here only scratch the surface of LaTeX capabilities. You can learn more about them at the project [help and documentation site][3]. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/typeset-latex-texstudio-fedora/ + +作者:[Julita Inca Chiroque][a] +选题:[Chao-zhi][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/yulytas/ +[b]: https://github.com/Chao-zhi +[1]:http://www.latex-project.org/about/ +[2]:https://fedoramagazine.org/fedora-aarch64-on-the-solidrun-honeycomb-lx2k/ +[3]:https://www.latex-project.org/help/ From 6bca10569cfbfb98855ef1fe02a31001ace91c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=B6=85=E6=99=BA?= Date: Fri, 19 Feb 2021 12:08:32 +0800 Subject: [PATCH 064/818] translating by Chao-zhi --- ...25 Typeset your docs with LaTeX and TeXstudio on Fedora.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md b/sources/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md index 7f812b776b..4a64e58971 100644 --- a/sources/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md +++ b/sources/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md @@ -1,5 +1,5 @@ [#]: collector: (Chao-zhi) -[#]: translator: ( ) +[#]: translator: (Chao-zhi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -142,7 +142,7 @@ via: https://fedoramagazine.org/typeset-latex-texstudio-fedora/ 作者:[Julita Inca Chiroque][a] 选题:[Chao-zhi][b] -译者:[译者ID](https://github.com/译者ID) +译者:[Chao-zhi][b] 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 99cb7bc83176bc033242f8d8ca67cad57e9b8139 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 19 Feb 2021 13:50:02 +0800 Subject: [PATCH 065/818] PRF @wxy --- ...s that make Linux the ideal workstation.md | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/translated/tech/20210208 3 open source tools that make Linux the ideal workstation.md b/translated/tech/20210208 3 open source tools that make Linux the ideal workstation.md index 0669873c8b..50b5f80f3d 100644 --- a/translated/tech/20210208 3 open source tools that make Linux the ideal workstation.md +++ b/translated/tech/20210208 3 open source tools that make Linux the ideal workstation.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (3 open source tools that make Linux the ideal workstation) @@ -10,25 +10,25 @@ 让 Linux 成为理想的工作站的 3 个开源工具 ====== -> Linux 不但拥有你认为所需的一切,还有可以让你高效工作的更多工具。 +> Linux 不但拥有你认为所需的一切,还有更多可以让你高效工作的工具。 -![使用笔记本电脑的人][1] +![](https://img.linux.net.cn/data/attachment/album/202102/19/134935qhe252ifbvbpnzxk.jpg) -在 2021 年,人们喜欢 Linux 的理由比以往任何时候都多。在这个系列中,我将分享 21 个使用 Linux 的不同理由。今天,我将与你分享为什么 Linux 是你工作的最佳选择。 +在 2021 年,有更多让人们喜欢 Linux 的理由。在这个系列中,我将分享 21 种使用 Linux 的不同理由。今天,我将与你分享为什么 Linux 是你工作的最佳选择。 -每个人都希望在工作期间提高工作效率。如果你的工作通常涉及到文档、演示文稿和电子表格的工作,那么你可能已经习惯了一种特定的例行工作。问题是,这个*惯常的例行工作*通常是由一两个特定的应用程序决定的,无论是某个办公套件还是桌面操作系统。当然,一种习惯并不意味着它是理想的,然而它往往会毫无疑义地坚持下去,甚至影响到企业的运行结构。 +每个人都希望在工作期间提高工作效率。如果你的工作通常涉及到文档、演示文稿和电子表格的工作,那么你可能已经习惯了特定的例行工作。问题在于,这个*惯常的例行工作*通常是由一两个特定的应用程序决定的,无论是某个办公套件还是桌面操作系统。当然,习惯并不意味着它是理想的,但是它往往会毫无疑义地持续存在,甚至影响到企业的运作架构。 ### 更聪明地工作 -如今,许多办公应用程序都在云端运行,因此如果你确实愿意,你可以在 Linux 上使用相同的方式。然而,由于许多典型的大名鼎鼎的办公应用程序并不符合 Linux 上的文化预期,因此你可能会发现自己受到启发,想去探索其他的选择。正如任何渴望走出“舒适区”的人所知道的那样,这种微妙的打破可能会出奇的有用。很多时候,你不知道自己效率低下,因为你实际上并没有尝试过以不同的方式做事。强迫自己去探索其他方式,而你永远不知道会发现什么。你甚至不必完全知道要寻找的内容。 +如今,许多办公应用程序都在云端运行,因此如果你愿意的话,你可以在 Linux 上使用相同的方式。然而,由于许多典型的知名办公应用程序并不符合 Linux 上的文化预期,因此你可能会发现自己受到启发,想去探索其他的选择。正如任何渴望走出“舒适区”的人所知道的那样,这种微妙的打破可能会出奇的有用。很多时候,你不知道自己效率低下,因为你实际上并没有尝试过以不同的方式做事。强迫自己去探索其他方式,你永远不知道会发现什么。你甚至不必完全知道要寻找的内容。 ### LibreOffice -Linux(或任何其他平台)上最明显的开源办公主力之一是 [LibreOffice][2]。它具有多个组件,包括文字处理器、演示软件、电子表格、关系型数据库接口、矢量绘图等。它可以从其他流行的办公应用程序中导入许多文档格式,因此从其他工具过渡到 LibreOffice 通常很容易。 +Linux(或任何其他平台)上显而易见的开源办公主力之一是 [LibreOffice][2]。它具有多个组件,包括文字处理器、演示软件、电子表格、关系型数据库界面、矢量绘图等。它可以从其他流行的办公应用程序中导入许多文档格式,因此从其他工具过渡到 LibreOffice 通常很容易。 -然而,LibreOffice 不仅仅是一个伟大的办公套件。LibreOffice 支持宏,所以机智的用户可以自动完成重复性任务。它还具有终端命令的功能,因此你可以在不启动 LibreOffice 界面的情况下执行许多任务。 +然而,LibreOffice 不仅仅是一个出色的办公套件。LibreOffice 支持宏,所以机智的用户可以自动完成重复性任务。它还具有终端命令的功能,因此你可以在不启动 LibreOffice 界面的情况下执行许多任务。 -想象一下,例如,打开 21 个文档,导航到**文件**菜单,到**导出**或**打印**菜单项,并将文件导出为 PDF 或 EPUB。这至少需要 84 次以上的点击,可能要花费一个小时的时间。比较一下,打开一个文档文件夹,并转换所有文件为 PDF 或 EPUB,只需要执行一个迅速的命令或菜单操作。转换将在后台运行,而你可以处理其他事情。只需要四分之一的时间,可能更少。 +想象一下,比如要打开 21 个文档,导航到**文件**菜单,到**导出**或**打印**菜单项,并将文件导出为 PDF 或 EPUB。这至少需要 84 次以上的点击,可能要花费一个小时的时间。相比之下,打开一个文档文件夹,并转换所有文件为 PDF 或 EPUB,只需要执行一个迅速的命令或菜单操作。转换将在后台运行,而你可以处理其他事情。只需要四分之一的时间,可能更少。 ``` $ libreoffice --headless --convert-to epub *.docx @@ -38,24 +38,23 @@ $ libreoffice --headless --convert-to epub *.docx ### Abiword 和 Gnumeric -有时,你并不需要一个大而全的办公套件。如果你喜欢让办公室工作保持简单,你可能会更好地使用一个轻量级和针对特定任务的应用程序。例如,我大部分时间都是用文本编辑器写文章,因为我知道在转换为 HTML 的过程中,所有的样式都会被丢弃。但有些时候,文字处理器是很有用的,无论是打开别人发给我的文档,还是因为我想用一种快速简单的方法来生成一些样式漂亮的文本。 +有时,你并不需要一个大而全的办公套件。如果你喜欢简化你的办公室工作,那么使用一个轻量级和针对特定任务的应用程序可能更好。例如,我大部分时间都是用文本编辑器写文章,因为我知道在转换为 HTML 的过程中,所有的样式都会被丢弃。但有些时候,文字处理器是很有用的,无论是打开别人发给我的文档,还是因为我想用一种快速简单的方法来生成一些样式漂亮的文本。 -[Abiword][3] 是一款简单的文字处理器,它基本支持流行的文档格式,并具备你所期望的文字处理器的所有基本功能。它并不意味着是一个完整的办公套件,这是它最大的特点。虽然没有太多的选择,但绝对有信息过载这样的事情,而这正是一个完整的办公套件或文字处理器有时会犯的错误。如果你想避免这种情况,那就用一些简单的东西来代替。 +[Abiword][3] 是一款简单的文字处理器,它基本支持流行的文档格式,并具备你所期望的文字处理器的所有基本功能。它并不意味着是一个完整的办公套件,这是它最大的特点。虽然没有太多的选择,但我们仍然处于信息过载的时代,这正是一个完整的办公套件或文字处理器有时会犯的错误。如果你想避免这种情况,那就用一些简单的东西来代替。 -同样,[Gnumeric][4] 项目提供了一个简单的电子表格应用程序。Gnumeric 避免了任何严格意义上的电子表格所不需要的功能,所以你仍然可以得到一个强大的公式语法、大量的函数,以及所有你需要的样式和操作单元格的选项。我不怎么使用电子表格,所以我发现自己在极少数需要查看或处理分类账中的数据时,对 Gnumeric 相当满意。 +同样,[Gnumeric][4] 项目提供了一个简单的电子表格应用程序。Gnumeric 避免了任何严格意义上的电子表格所不需要的功能,所以你仍然可以获得强大的公式语法、大量的函数,以及样式和操作单元格的所有选项。我不怎么使用电子表格,所以我发现自己在极少数需要查看或处理分类账中的数据时,对 Gnumeric 相当满意。 ### Pandoc -通过专门的命令和文件处理程序,可以得到更多的最小化。`pandoc` 命令专门用于文件转换。它就像 `libreoffice --headless` 命令一样,只是要处理的文档格式数量是它的十倍。你甚至可以用它来生成演示文稿! 如果你的部分工作是从一个文档中提取源文本,并将其格式化以用于多种传输模式,那么 Pandoc 是必要的,所以你应该[下载我们的攻略][5]看看。 +通过专门的命令和文件处理程序,可以最小化。`pandoc` 命令专门用于文件转换。它就像 `libreoffice --headless` 命令一样,只是要处理的文档格式数量是它的十倍。你甚至可以用它来生成演示文稿! 如果你的工作之一是从一个文档中提取源文本,并以多种格式交付它,那么 Pandoc 是必要的,所以你应该[下载我们的攻略][5]看看。 -广义上讲,Pandoc 代表的是一种完全不同的工作方式。它让你脱离了办公应用的束缚。它将你从试图将你的想法写成文字,并决定这些文字应该使用什么字体的工作中分离出来,同时。在纯文本中工作,然后转换为所有的交付目标,让你可以使用任何你想要的应用程序,无论是移动设备上的记事本,还是你碰巧坐在电脑前的简单文本编辑器,或者是云端的文本编辑器。 +广义上讲,Pandoc 代表的是一种完全不同的工作方式。它让你脱离了办公应用的束缚。它将你从试图将你的想法写成文字,并同时决定这些文字应该使用什么字体的工作中分离出来。在纯文本中工作,然后转换为各种交付格式,让你可以使用任何你想要的应用程序,无论是移动设备上的记事本,还是你碰巧坐在电脑前的简单文本编辑器,或者是云端的文本编辑器。 ### 寻找替代品 -Linux 有很多意想不到的替代品。你可以通过从你正在做的事情中退后一步,分析你的工作流程,评估你所需的结果,并调查那些声称可以做你所依赖的事情的新应用程序来找到它们。 +Linux 有很多意想不到的替代品。你可以从你正在做的事情中退后一步,分析你的工作流程,评估你所需的结果,并调查那些声称可以完全你的需求的新应用程序来找到它们。 -改变你所使用的工具、你的工作流程和你的日常工作可能会让你迷失方向,特别是当你不知道你要找的到底是什么的时候。但 Linux 的优势在于,你有机会重新评估你在多年的计算机使用过程中潜意识里形成的假设。如果你足够努力地寻找答案,你最终会意识到问题的初衷是什么。而且很多时候,你最终会欣赏你学到的东西。 - +改变你所使用的工具、工作流程和日常工作可能会让你迷失方向,特别是当你不知道你要找的到底是什么的时候。但 Linux 的优势在于,你有机会重新评估你在多年的计算机使用过程中潜意识里形成的假设。如果你足够努力地寻找答案,你最终会意识到问题所在。通常,你最终会欣赏你学到的东西。 -------------------------------------------------------------------------------- @@ -64,7 +63,7 @@ via: https://opensource.com/article/21/2/linux-workday 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 3d8c082830f00f42be5d0a4d0635c8fa901e0cb6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 19 Feb 2021 13:50:54 +0800 Subject: [PATCH 066/818] PUB @wxy https://linux.cn/article-13133-1.html --- ...open source tools that make Linux the ideal workstation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210208 3 open source tools that make Linux the ideal workstation.md (98%) diff --git a/translated/tech/20210208 3 open source tools that make Linux the ideal workstation.md b/published/20210208 3 open source tools that make Linux the ideal workstation.md similarity index 98% rename from translated/tech/20210208 3 open source tools that make Linux the ideal workstation.md rename to published/20210208 3 open source tools that make Linux the ideal workstation.md index 50b5f80f3d..82a71b31f7 100644 --- a/translated/tech/20210208 3 open source tools that make Linux the ideal workstation.md +++ b/published/20210208 3 open source tools that make Linux the ideal workstation.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13133-1.html) [#]: subject: (3 open source tools that make Linux the ideal workstation) [#]: via: (https://opensource.com/article/21/2/linux-workday) [#]: author: (Seth Kenlon https://opensource.com/users/seth) From 9a0239e86683c3c79e83a564fed6ad66e6c500a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=B6=85=E6=99=BA?= Date: Fri, 19 Feb 2021 16:59:58 +0800 Subject: [PATCH 067/818] translate done 20171025 Typeset your docs with LaTeX and TeXstudio on Fedora --- ...docs with LaTeX and TeXstudio on Fedora.md | 154 ------------------ 1 file changed, 154 deletions(-) delete mode 100644 sources/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md diff --git a/sources/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md b/sources/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md deleted file mode 100644 index 4a64e58971..0000000000 --- a/sources/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md +++ /dev/null @@ -1,154 +0,0 @@ -[#]: collector: (Chao-zhi) -[#]: translator: (Chao-zhi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Typeset your docs with LaTeX and TeXstudio on Fedora) -[#]: via: (https://fedoramagazine.org/typeset-latex-texstudio-fedora/) -[#]: author: (Julita Inca Chiroque ) - -Typeset your docs with LaTeX and TeXstudio on Fedora -====== -![](https://fedoramagazine.org/wp-content/uploads/2017/07/latex-texstudio-945x400.jpg) - -LaTeX is [a document preparation system][1] for high-quality typesetting. It’s often used for larger technical or scientific documents. However, you can use LaTeX for almost any form of publishing. Teachers can edit their exams and syllabi, and students can present their thesis and reports for classes. This article gets you started with the TeXstudio app. TeXstudio makes it easy to edit LaTeX documents. - -### Launching TeXstudio - -If you’re using Fedora Workstation, launch Software, and type TeXstudio to search for the app. Then select Install to add TeXstudio to your system. You can also launch the app from Software, or go to the shell overview as usual. - -Alternately, if you use a terminal, type texstudio. If the package isn’t installed, the system prompts you to install it. Type y to start the installation. - -``` -$ texstudio -bash: texstudio: command not found... -Install package 'texstudio' to provide command 'texstudio'? [N/y] y -``` - -LaTeX commands typically start with a backslash (), and command parameters are enclosed in curly braces { }. Start by declaring the type of the documentclass. This example shows you the document class is an article. - -Then, once you declare the documentclass, mark the beginning and the end of the document with begin and end. In between these commands, write a paragraph similar to the following: - -``` -\documentclass{article} -\begin{document} -The Fedora Project is a project sponsored by Red Hat primarily to co-ordinate the development of the Linux-based Fedora operating system, operating with the vision that the project "creates a world where free culture is welcoming and widespread, collaboration is commonplace, and people control their content and devices". The Fedora Project was founded on 22 September 2003 when Red Hat decided to split Red Hat Linux into Red Hat Enterprise Linux (RHEL) and a community-based operating system, Fedora. -\end{document} -``` - -![](https://fedoramagazine.org/wp-content/uploads/2017/07/Screenshot-from-2017-10-05-20-19-15.png) - -### Working with spacing - -To create a paragraph break, leave one or more blank spaces between text.  Here’s an example with four paragraphs: - -![](https://fedoramagazine.org/wp-content/uploads/2017/07/Screenshot-from-2017-10-18-14-24-42.png) - -You can see from the example that more than one line break doesn’t create additional blank space between paragraphs. However, if you do need to leave additional space, use the commands hspace and vspace. These add horizontal and vertical space, respectively. Here is some example code that shows additional spacing around paragraphs: - -``` -\documentclass{article} -\begin{document} - -\hspace{2.5cm} The four essential freedoms - -\vspace{0.6cm} -A program is free software if the program's users have the 4 essential freedoms: - -The freedom to run the program as you wish, for any purpose (freedom 0).\vspace{0.2cm} -The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this.\vspace{0.2cm} - -The freedom to redistribute copies so you can help your neighbour (freedom 2).\vspace{0.2cm} - -The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this. - -\end{document} -``` - -![](https://fedoramagazine.org/wp-content/uploads/2017/07/Screenshot-from-2017-10-18-17-24-53.png) - -### Using Lists and Formats - -This example would look better if it presented the four essential freedoms of free software as a list. Set the list structure by using \begin{itemize} at the beginning of the list, and \end{itemize} at the end. Precede each item with the command \item. - -Additional format also helps make the text more readable. Useful commands for formatting include bold, italic, underline, huge, large, tiny and textsc to help emphasize text: - -``` -\documentclass{article} -\begin{document} - -\hspace{2cm} {\huge The four essential freedoms} - -\vspace{0.6cm} -\noindent {\large A program is free software if the program's users have the 4 essential freedoms}: -\begin{itemize} -\item \vspace{0.2cm} -\noindent \textbf{The freedom to run} the program as you wish, for any purpose \textit{(freedom 0)}. \vspace{0.2cm} -\item \noindent \textbf{The freedom to study} how the program works, and change it so it does your computing as you wish \textit{(freedom 1)}. Access to the source code is a precondition for this.\vspace{0.2cm} - -\item \noindent \textbf{The freedom to redistribute} copies so you can help your neighbour \textit{(freedom 2)}.\vspace{0.2cm} - -\item \noindent \textbf{The freedom to distribute copies of your modified versions} to others \textit{(freedom 3)}. \tiny{By doing this you can give the whole community a chance to benefit from your changes.\underline{\textsc{ Access to the source code is a precondition for this.}}} -\end{itemize} -\end{document} -``` - -### Adding columns, images and links - -Columns, images and links help add further information to your text. LaTeX includes functions for some advanced features as packages. The \usepackage command loads the package so you can make use of these features. - -For example, to make an image visible, you might use the command \usepackage{graphicx}. Or, to set up columns and links, use \usepackage{multicol} and \usepackage{hyperref}, respectively. - -The \includegraphics command places an image inline in your document. (For simplicity, include the graphics file in the same directory as your LaTeX source file.) - -Here’s an example that uses all these concepts. It also uses two PNG graphics files that were downloaded. Try your own graphics to see how they work. - -``` -\documentclass{article} -\usepackage{graphicx} -\usepackage{multicol} -\usepackage{hyperref} -\begin{document} - \textbf{GNU} - \vspace{1cm} - - GNU is a recursive acronym for "GNU's Not Unix!", chosen because GNU's design is Unix-like, but differs from Unix by being free software and containing no Unix code. - - Richard Stallman, the founder of the project, views GNU as a "technical means to a social end". Stallman has written about "the social aspects of software and how Free Software can create community and social justice." in his "Free Society" book. - \vspace{1cm} - - \textbf{Some Projects} - - \begin{multicols}{2} - Fedora - \url{https://getfedora.org} - \includegraphics[width=1cm]{fedora.png} - - GNOME - \url{https://getfedora.org} - \includegraphics[width=1cm]{gnome.png} - \end{multicols} - -\end{document} -``` - -[][2] - -The features here only scratch the surface of LaTeX capabilities. You can learn more about them at the project [help and documentation site][3]. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/typeset-latex-texstudio-fedora/ - -作者:[Julita Inca Chiroque][a] -选题:[Chao-zhi][b] -译者:[Chao-zhi][b] -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://fedoramagazine.org/author/yulytas/ -[b]: https://github.com/Chao-zhi -[1]:http://www.latex-project.org/about/ -[2]:https://fedoramagazine.org/fedora-aarch64-on-the-solidrun-honeycomb-lx2k/ -[3]:https://www.latex-project.org/help/ From 890b2afbcfaeb4883ea295ff19b292b3304e8734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=B6=85=E6=99=BA?= Date: Fri, 19 Feb 2021 17:00:42 +0800 Subject: [PATCH 068/818] translate done 20171025 Typeset your docs with LaTeX and TeXstudio on Fedora --- ...docs with LaTeX and TeXstudio on Fedora.md | 154 ++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 translated/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md diff --git a/translated/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md b/translated/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md new file mode 100644 index 0000000000..950268f89b --- /dev/null +++ b/translated/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md @@ -0,0 +1,154 @@ +[#]: collector: (Chao-zhi) +[#]: translator: (Chao-zhi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Typeset your docs with LaTeX and TeXstudio on Fedora) +[#]: via: (https://fedoramagazine.org/typeset-latex-texstudio-fedora/) +[#]: author: (Julita Inca Chiroque) + +在 fedora 上使用 LaTeX 和 TeXstudio 排版你的文档 +====== +![](https://fedoramagazine.org/wp-content/uploads/2017/07/latex-texstudio-945x400.jpg) + +LaTeX 是一个服务于高质量排版的[文档准备系统][1]。通常用于大量的技术和科学文档的排版。不过,你也可以使用 LaTex 排版各种形式的文档。教师可以编辑他们的考试和教学大纲,学生可以展示他们的论文和报告。这篇文章让你尝试使用 TeXstudio。TeXstudio 是一个便于编辑 LaTeX 文档的软件。 + +### 启动 TeXstudio + +如果您使用的是 Fedora Workstation,请启动软件管理,然后输入 TeXstudio 以搜索该应用程序。然后选择安装并添加 TeXstudio 到您的系统。你可以从软件中启动这个程序,或者像以往一样在概览中启动这个软件。 + +或者,如果你使用终端,请输入 texstudio。如果未安装该软件包,系统将提示您安装它。键入 y 开始安装。 + +``` +$ texstudio +bash: texstudio: command not found... +Install package 'texstudio' to provide command 'texstudio'? [N/y] y +``` + +LaTeX命令通常以反斜杠`\`开头,命令参数用大括号{}括起来。首先声明 documentclass 的类型。这个例子向您展示了 document 类是一篇文章。 + +然后,在声明 documentclass 之后,用 begin 和 end 标记文档的开始和结束。在这些命令之间,写一段类似以下的内容: + +``` +\documentclass{article} +\begin{document} +The Fedora Project is a project sponsored by Red Hat primarily to co-ordinate the development of the Linux-based Fedora operating system, operating with the vision that the project "creates a world where free culture is welcoming and widespread, collaboration is commonplace, and people control their content and devices". The Fedora Project was founded on 22 September 2003 when Red Hat decided to split Red Hat Linux into Red Hat Enterprise Linux (RHEL) and a community-based operating system, Fedora. +\end{document} +``` + +![](https://fedoramagazine.org/wp-content/uploads/2017/07/Screenshot-from-2017-10-05-20-19-15.png) + +### 使用间距 + +要创建段落分隔符,请在文本之间保留一个或多个换行符。下面是一个包含四个段落的示例: + +![](https://fedoramagazine.org/wp-content/uploads/2017/07/Screenshot-from-2017-10-18-14-24-42.png) + +从该示例中可以看出,多个换行符不会在段落之间创建额外的空格。但是,如果您确实需要留出额外的空间,请使用 hspace 和 vspace 命令。这两个命令分别添加水平和垂直空间。下面是一些示例代码,显示了段落周围的附加间距: + +``` +\documentclass{article} +\begin{document} + +\hspace{2.5cm} The four essential freedoms + +\vspace{0.6cm} +A program is free software if the program's users have the 4 essential freedoms: + +The freedom to run the program as you wish, for any purpose (freedom 0).\vspace{0.2cm} +The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this.\vspace{0.2cm} + +The freedom to redistribute copies so you can help your neighbour (freedom 2).\vspace{0.2cm} + +The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this. + +\end{document} +``` + +![](https://fedoramagazine.org/wp-content/uploads/2017/07/Screenshot-from-2017-10-18-17-24-53.png) + +### 使用列表和格式 + +如果把自由软件的四大基本自由列为一个清单,这个例子看起来会更好。通过在列表的开头使用`\begin{itemize}`,在末尾使用`\end{itemize}`来设置列表结构。在每个项目前面加上`\item`命令。 + +额外的格式也有助于使文本更具可读性。用于格式化的有用命令包括粗体、斜体、下划线、大、小和 textsc 以帮助强调文本: + +``` +\documentclass{article} +\begin{document} + +\hspace{2cm} {\huge The four essential freedoms} + +\vspace{0.6cm} +\noindent {\large A program is free software if the program's users have the 4 essential freedoms}: +\begin{itemize} +\item \vspace{0.2cm} +\noindent \textbf{The freedom to run} the program as you wish, for any purpose \textit{(freedom 0)}. \vspace{0.2cm} +\item \noindent \textbf{The freedom to study} how the program works, and change it so it does your computing as you wish \textit{(freedom 1)}. Access to the source code is a precondition for this.\vspace{0.2cm} + +\item \noindent \textbf{The freedom to redistribute} copies so you can help your neighbour \textit{(freedom 2)}.\vspace{0.2cm} + +\item \noindent \textbf{The freedom to distribute copies of your modified versions} to others \textit{(freedom 3)}. \tiny{By doing this you can give the whole community a chance to benefit from your changes.\underline{\textsc{ Access to the source code is a precondition for this.}}} +\end{itemize} +\end{document} +``` + +### 添加列、图像和链接 + +列、图像和链接有助于为文本添加更多信息。LaTeX 包含一些高级功能的函数作为宏包。`\usepackage` 命令加载宏包以便您可以使用这些功能。 + +例如,要使用图像,可以使用命令 `\usepackage{graphicx}`。或者,要设置列和链接,请分别使用 `\usepackage{multicol}` 和 `\usepackage{hyperref}`。 + +`\includegraphics` 命令将图像内联放置在文档中。(为简单起见,请将图形文件包含在与LaTeX源文件相同的目录中。) + +下面是一个使用所有这些概念的示例。它还使用下载的两个 PNG 图片。试试你自己的图片,看看它们是如何工作的。 + +``` +\documentclass{article} +\usepackage{graphicx} +\usepackage{multicol} +\usepackage{hyperref} +\begin{document} + \textbf{GNU} + \vspace{1cm} + + GNU is a recursive acronym for "GNU's Not Unix!", chosen because GNU's design is Unix-like, but differs from Unix by being free software and containing no Unix code. + + Richard Stallman, the founder of the project, views GNU as a "technical means to a social end". Stallman has written about "the social aspects of software and how Free Software can create community and social justice." in his "Free Society" book. + \vspace{1cm} + + \textbf{Some Projects} + + \begin{multicols}{2} + Fedora + \url{https://getfedora.org} + \includegraphics[width=1cm]{fedora.png} + + GNOME + \url{https://getfedora.org} + \includegraphics[width=1cm]{gnome.png} + \end{multicols} + +\end{document} +``` + +[][2] + +这里的功能只触及 LaTeX 功能的表皮。您可以在项目[帮助和文档站点][3]了解更多关于它们的信息。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/typeset-latex-texstudio-fedora/ + +作者:[Julita Inca Chiroque][a] +选题:[Chao-zhi][b] +译者:[Chao-zhi][b] +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/yulytas/ +[b]: https://github.com/Chao-zhi +[1]:http://www.latex-project.org/about/ +[2]:https://fedoramagazine.org/fedora-aarch64-on-the-solidrun-honeycomb-lx2k/ +[3]:https://www.latex-project.org/help/ From 100620165c4ee2a48d552ff72e162e7d579fd4ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=B6=85=E6=99=BA?= Date: Fri, 19 Feb 2021 21:57:02 +0800 Subject: [PATCH 069/818] =?UTF-8?q?=E9=80=89=E9=A2=98=EF=BC=9A20171025=20T?= =?UTF-8?q?ypeset=20your=20docs=20with=20LaTeX=20and=20TeXstudio=20on=20Fe?= =?UTF-8?q?dora?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...dora classroom- LaTeX 101 for beginners.md | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sources/tech/20190102 Fedora classroom- LaTeX 101 for beginners.md diff --git a/sources/tech/20190102 Fedora classroom- LaTeX 101 for beginners.md b/sources/tech/20190102 Fedora classroom- LaTeX 101 for beginners.md new file mode 100644 index 0000000000..a857721d33 --- /dev/null +++ b/sources/tech/20190102 Fedora classroom- LaTeX 101 for beginners.md @@ -0,0 +1,73 @@ + +[#]: collector: (Chao-zhi) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Fedora classroom: LaTeX 101 for beginners) +[#]: via: (https://fedoramagazine.org/fedora-classroom-latex-101-beginners/) +[#]: author: (Ankur Sinha) + +Fedora classroom: LaTeX 101 for beginners +====== + +![](https://fedoramagazine.org/wp-content/uploads/2017/07/fedora-classroom.jpg) + +Fedora Classroom sessions continue with an introductory session on [LaTeX][4]. The general schedule for sessions is available [on the wiki][5], along with [resources and recordings from previous sessions][6]. + +### Topic: LaTeX 101 + +LaTeX is a typesetting system that the de-facto standard for scientific publishing. It is [Free software][7], and enables the generation of a multitude of high quality documents. LaTeX documents are written in plaintext and compiled to DVI/PDF. This permits the user to focus on writing the text, leaving the typesetting to LaTeX. + +This LaTeX 101 session is aimed at absolute beginners. So, no prior knowledge of LaTeX is required. The session will: + +* introduce LaTeX. +* walk through writing a simple LaTeX document explaining basic commands. +* demonstrate compiling the document to a PDF. +* show the inclusion of references in the document from a bibliography. +* give an example of collaborative writing using LaTeX and Git. + +You will need: + +* a text editor of choice. +* a LaTeX installation. +* optionally, a knowledge of Git and Github would be useful. + +LaTeX and Git can be installed on Fedora using dnf: + +``` +sudo dnf install texlive-latex texlive-bibtex git +``` + +### When and where + +* The session will be held on the Jitsi video-conferencing platform. Please use this URL to join the session: [https://meet.jit.si/20190110-latex-101][1] +* It will be held on [Thursday, January 10 at 1400 UTC][2] on Jitsi. (Please click the link to see the time in your time zone.) +* Update: The [classroom materials are available here][3]. + +### Instructor + +[Ankur Sinha][8] (“FranciscoD”) is a Free Software supporter and has been with the Fedora community for the better part of a decade now. Ankur started as a font package maintainer and has since branched out to many other teams and SIGs. He uses Fedora Workstation and prefers the terminal whenever possible. Currently, he’s working on his PhD in computational neuroscience in the UK. When he has time to spare, he focuses on the Fedora Join SIG, Fedora classrooms, and [NeuroFedora][9]. You can get in touch with him via his Fedora project e-mail or on one of the many Fedora IRC channels. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/fedora-classroom-latex-101-beginners/ + +作者:[Ankur Sinha][a] +选题:[Chao-zhi][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/ankursinha/ +[b]: https://github.com/Chao-zhi +[1]:https://meet.jit.si/20190110-latex-101 +[2]:https://www.timeanddate.com/worldclock/fixedtime.html?iso=20190110T1400 +[3]:https://github.com/sanjayankur31/20190110-LaTeX-101 +[4]:https://en.wikibooks.org/wiki/LaTeX +[5]:https://fedoraproject.org/wiki/Classroom/F29 +[6]:https://fedoraproject.org/wiki/Classroom#Previous_Sessions +[7]:https://www.fsf.org/blogs/community/user-liberation-watch-and-share-our-new-video/ +[8]:https://fedoraproject.org/wiki/User:Ankursinha +[9]:https://fedoraproject.org/wiki/SIGs/NeuroFedora \ No newline at end of file From e196165e5f1d92bfec09e29db1f712e1ca1402a3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 19 Feb 2021 23:36:55 +0800 Subject: [PATCH 070/818] PRF @geekpi --- ... source alternative to Google Analytics.md | 41 +++++++++---------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/translated/tech/20210208 Why choose Plausible for an open source alternative to Google Analytics.md b/translated/tech/20210208 Why choose Plausible for an open source alternative to Google Analytics.md index 989e43db08..bfc952c928 100644 --- a/translated/tech/20210208 Why choose Plausible for an open source alternative to Google Analytics.md +++ b/translated/tech/20210208 Why choose Plausible for an open source alternative to Google Analytics.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Why choose Plausible for an open source alternative to Google Analytics) @@ -9,59 +9,56 @@ 为什么选择 Plausible 作为 Google Analytics 的开源替代品? ====== -Plausible作为Google Analytics 的可行,有效的替代方案正在引起用户的关注。 -![Analytics: Charts and Graphs][1] -发挥 Google Analytics 的威力似乎是一个巨大的挑战。实际上,你可以说这听起来似乎不合理。但这正是 [Plausible.io][2]取得巨大成功的原因,自 2018 年以来已注册了数千名新用户。 +> Plausible 作为 Google Analytics 的可行、有效的替代方案正在引起用户的关注。 -Plausible 的联合创始人 Uku Taht 和 Marko Saric 最近出现在 [The Craft of Open Source][3] 播客上,谈论了这个项目以及他们如何: +![](https://img.linux.net.cn/data/attachment/album/202102/19/233627sb7mvtt7hn93lvvr.jpg) + +替代 Google Analytics 似乎是一个巨大的挑战。实际上,你可以说这听起来似乎不合理(LCTT 译注:Plausible 意即“貌似合理”)。但这正是 [Plausible.io][2] 取得巨大成功的原因,自 2018 年以来已注册了数千名新用户。 + +Plausible 的联合创始人 Uku Taht 和 Marko Saric 最近出现在 [The Craft of Open Source][3] 播客上,谈论了这个项目以及他们是如何: * 创建了一个可行的替代 Google Analytics 的方案 * 在不到两年的时间里获得了如此大的发展势头 -* 通过开源项目外包实现其目标 - - +* 通过开源他们的项目实现其目标 请继续阅读他们与播客主持人和 Flagsmith 创始人 Ben Rometsch 的对话摘要。 ### Plausible 是如何开始的 -2018年 冬天,Uku 开始编写一个他认为急需的项目:一个可行的、有效的 Google Analytics 替代方案。因为他对 Google 产品的发展方向感到失望,而且所有其他数据解决方案似乎都把 Google 当作“数据处理中间人”。 +2018 年冬天,Uku 开始编写一个他认为急需的项目:一个可行的、有效的 Google Analytics 替代方案。因为他对 Google 产品的发展方向感到失望,而且所有其他数据解决方案似乎都把 Google 当作“数据处理中间人”。 -Uku 的第一直觉是利用现有的数据库解决方案专注于分析方面的工作。马上,他就遇到了一些挑战。第一次尝试使用了 PostgreSQL,这在技术上很幼稚,因为它很快就变得不堪重负,效率很低。因此,他的目标蜕变成了做一个分析产品,可以处理大量的数据点,而且性能不会有明显的下降。长话短说,Uku 成功了,Plausible 现在每月可以摄取超过 8000 万条记录。 +Uku 的第一直觉是利用现有的数据库解决方案专注于分析方面的工作。马上,他就遇到了一些挑战。开始尝试使用了 PostgreSQL,这在技术上很幼稚,因为它很快就变得不堪重负,效率低下。因此,他的目标蜕变成了做一个分析产品,可以处理大量的数据点,而且性能不会有明显的下降。简而言之,Uku 成功了,Plausible 现在每月可以收取超过 8000 万条记录。 -Plausible 的第一个版本于 2019 年夏天发布。2020 年 3 月,Marko 加入,负责项目的传播和营销方面的工作。从那时起,它的受欢迎程度以相当大的势头增长。 +Plausible 的第一个版本于 2019 年夏天发布。2020 年 3 月,Marko 加入,负责项目的传播和营销方面的工作。从那时起,它它的受欢迎程度有了很大的增长。 ### 为什么要开源? -Uku 热衷于遵循“独立黑客”的软件开发路线:创建一个产品,把它放在那里,然后看看它如何成长。开源在这方面是有意义的,因为你可以迅速发展一个社区并获得人气。 +Uku 热衷于遵循“独立黑客”的软件开发路线:创建一个产品,把它投放出去,然后看看它如何成长。开源在这方面是有意义的,因为你可以迅速发展一个社区并获得人气。 但 Plausible 一开始并不是开源的。Uku 最初担心软件的敏感代码,比如计费代码,但他很快就发布了,因为这对没有 API 令牌的人来说是没有用的。 +现在,Plausible 是在 [AGPL][4] 下完全开源的,他们选择了 AGPL 而不是 MIT 许可。Uku 解释说,在 MIT 许可下,任何人都可以不受限制地对代码做任何事情。在 AGPL 下,如果有人修改代码,他们必须将他们的修改开源,并将代码回馈给社区。这意味着,大公司不能拿着原始代码在此基础上进行构建,然后获得所有的回报。他们必须共享,使得竞争环境更加公平。例如,如果一家公司想插入他们的计费或登录系统,他们有法律义务发布代码。 -现在,Plausible 是在 [AGPL][4] 下完全开源的,他们选择了 AGPL 而不是 MIT 许可。Uku 解释说,在 MIT 许可下,任何人都可以不受限制地对代码做任何事情。在 AGPL 下,如果有人修改代码,他们必须将他们的修改开源,并将代码回馈给社区。这意味着,大公司不能拿着原始代码,在此基础上进行构建,然后获得所有的回报。他们必须共享,使得竞争环境更加公平。例如,如果一家公司想插入他们的计费或登录系统,他们将有法律义务发布代码。 - - -在播客中,Uku 问我关于 Flagsmith 的授权,目前Flagsmith的授权采用 BSD 3-Clause 许可,该许可证是高度允许的,但我即将把一些功能移到更严格的许可后面。到目前为止,Flagsmith 社区已经理解了这一变化,因为他们意识到这将带来更多更好的功能。 +在播客中,Uku 向我询问了关于 Flagsmith 的授权,目前 Flagsmith 的授权采用 BSD 三句版许可,该许可证是高度开放的,但我即将把一些功能移到更严格的许可后面。到目前为止,Flagsmith 社区已经理解了这一变化,因为他们意识到这将带来更多更好的功能。 ### Plausible vs. Google Analytics -Uku说,在他看来,开源的精神是,代码应该是开放的,任何人都可以进行商业使用,并与社区共享,但你可以把一个闭源的 API 模块作为专有附加组件保留下来。这样一来,Plausible 和其他公司就可以通过创建和销售定制的 API 附加许可来满足不同的使用场景。 +Uku 说,在他看来,开源的精神是,代码应该是开放的,任何人都可以进行商业使用,并与社区共享,但你可以把一个闭源的 API 模块作为专有附加组件保留下来。这样一来,Plausible 和其他公司就可以通过创建和销售定制的 API 附加许可来满足不同的使用场景。 -Marko 职位上是一名开发者,但从营销方面来说,他努力让这个项目在 Hacker News 和 Lobster 等网站上得到报道,并建立了 Twitter 帐户以帮助产生动力。这种宣传带来的热潮也意味着该项目在 GitHub 上起飞,从 500 颗星到 4300 颗星。随着流量的增长,Plausible 出现在 GitHub 的趋势列表中,这帮助它的人气滚起了雪球。 +Marko 职位上是一名开发者,但从营销方面来说,他努力让这个项目在 Hacker News 和 Lobster 等网站上得到报道,并建立了 Twitter 帐户以帮助产生动力。这种宣传带来的热潮也意味着该项目在 GitHub 上起飞,从 500 颗星到 4300 颗星。随着流量的增长,Plausible 出现在 GitHub 的趋势列表中,这让其受欢迎程度像滚雪球一样。 Marko 还非常注重发布和推广博客文章。这一策略得到了回报,在最初的 6 个月里,有四五篇文章进入了病毒式传播,他利用这些峰值来放大营销信息,加速了增长。 Plausible 成长过程中最大的挑战是让人们从 Google Analytics 上转换过来。这个项目的主要目标是创建一个有用、高效、准确的网络分析产品。它还需要符合法规,并为企业和网站访问者提供高度的隐私。 -Plausible 现在已经在 8000 多个网站上运行。通过与客户的交谈,Uku 估计其中约 90% 的客户会已经用过 Google Analytics。 +Plausible 现在已经在 8000 多个网站上运行。通过与客户的交谈,Uku 估计其中约 90% 的客户运行过 Google Analytics。 Plausible 以标准的软件即服务 (SaaS) 订阅模式运行。为了让事情更公平,它按月页面浏览量收费,而不是按网站收费。对于季节性网站来说,这可能会有麻烦,比如说电子商务网站在节假日会激增,或者美国大选网站每四年激增一次。这些可能会导致月度订阅模式下的定价问题,但它通常对大多数网站很好。 - ### 查看播客 -想要了解更多关于 Uku 和 Marko 如何以惊人的速度发展开源 Plausible 项目,并使其获得商业上的成功,请[收听播客][3],并查看[其他集锦][5],了解更多关于“开源软件社区的来龙去脉”。 +想要了解更多关于 Uku 和 Marko 如何以惊人的速度发展开源 Plausible 项目,并使其获得商业上的成功,请[收听播客][3],并查看[其他剧集][5],了解更多关于“开源软件社区的来龙去脉”。 -------------------------------------------------------------------------------- @@ -70,7 +67,7 @@ via: https://opensource.com/article/21/2/plausible 作者:[Ben Rometsch][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/) 荣誉推出 From cfe893eaaa3a0e3ae6863c35b94c2229a2bd87aa Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 19 Feb 2021 23:37:45 +0800 Subject: [PATCH 071/818] PUB @geekpi https://linux.cn/article-13135-1.html --- ...ible for an open source alternative to Google Analytics.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210208 Why choose Plausible for an open source alternative to Google Analytics.md (98%) diff --git a/translated/tech/20210208 Why choose Plausible for an open source alternative to Google Analytics.md b/published/20210208 Why choose Plausible for an open source alternative to Google Analytics.md similarity index 98% rename from translated/tech/20210208 Why choose Plausible for an open source alternative to Google Analytics.md rename to published/20210208 Why choose Plausible for an open source alternative to Google Analytics.md index bfc952c928..ed909d31a1 100644 --- a/translated/tech/20210208 Why choose Plausible for an open source alternative to Google Analytics.md +++ b/published/20210208 Why choose Plausible for an open source alternative to Google Analytics.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13135-1.html) [#]: subject: (Why choose Plausible for an open source alternative to Google Analytics) [#]: via: (https://opensource.com/article/21/2/plausible) [#]: author: (Ben Rometsch https://opensource.com/users/flagsmith) From 5f7c4d8b79b7c77070d602e82a1ed4a5855b2a93 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 20 Feb 2021 05:04:35 +0800 Subject: [PATCH 072/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210220=20?= =?UTF-8?q?Starship:=20Open-Source=20Customizable=20Prompt=20for=20Any=20S?= =?UTF-8?q?hell?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210220 Starship- Open-Source Customizable Prompt for Any Shell.md --- ...ource Customizable Prompt for Any Shell.md | 178 ++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 sources/tech/20210220 Starship- Open-Source Customizable Prompt for Any Shell.md diff --git a/sources/tech/20210220 Starship- Open-Source Customizable Prompt for Any Shell.md b/sources/tech/20210220 Starship- Open-Source Customizable Prompt for Any Shell.md new file mode 100644 index 0000000000..c8e47f13ff --- /dev/null +++ b/sources/tech/20210220 Starship- Open-Source Customizable Prompt for Any Shell.md @@ -0,0 +1,178 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Starship: Open-Source Customizable Prompt for Any Shell) +[#]: via: (https://itsfoss.com/starship/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +Starship: Open-Source Customizable Prompt for Any Shell +====== + +_**Brief: A cross-shell prompt that makes it easy to customize and configure the Linux terminal prompt, if you care too much about the looks of your terminal.**_ + +While I’ve already covered a few tips to help you [customize the looks of your terminal][1], I also came across suggestions for an interesting cross-shell prompt. + +### Starship: Tweak your Linux Shell Prompt Easily + +![][2] + +[Starship][3] is an open-source project that’s written in [Rust][4] to help you set up a minimal, fast, and customizable shell prompt. + +No matter whether you’re using bash, fish, PowerShell on Windows or any other shell, you can utilize Starship to customize the appearance. + +Do note that you do have to go through its [official documentation][5] to be able to perform advanced configuration for everything you like but here I will include a simple sample configuration to get a head start along with some key information about Startship. + +Starship focuses on giving you a minimal, fast, and useful shell prompt by default. It even records and shows the time taken to perform a command as well. For instance, here’s a screenshot: + +![][6] + +Not just limited to that, it is also fairly easy to customize the prompt to your liking. Here’s an official GIF that shows it in action: + +![][7] + +Let me help you set it up. I am using bash shell on Ubuntu to test this out. You can refer to the steps I mention, or you can take a look at the [official installation instructions][8] for more options to install it on your system. + +### Key Highlights of Starship + + * Cross-platform + * Cross-shell support + * Ability to add custom commands + * Customize git experience + * Customize the experience while using specific programming languages + * Easily customize every aspect of the prompt without taking a hit on performance in a meaningful way + + + +### Installing Starship on Linux + +Note + +Installing Starship requires downloading a bash script from the internet and then run the script with root access.| +If you are not comfortable with that, you may use snap here: +`sudo snap install starship` + +**Note**: _You need to have [Nerd Font][9] installed to get the complete experience._ + +To get started, ensure that you have [curl][10] installed. You can install it easily by typing in: + +``` +sudo apt install curl +``` + +Once you do that, type in the following to install Starship: + +``` +curl -fsSL https://starship.rs/install.sh | bash +``` + +This should install Starship to **usr/local/bin** as root. You might be prompted for the password. Here’s how it would look: + +![][11] + +### Add startship to bash + +As the screenshot suggests, you will get the instruction to set it up in the terminal itself. But, in this case, we need to add the following line at the end of our **bashrc** user file: + +``` +eval "$(starship init bash)" +``` + +To add it easily, simply type in: + +``` +nano .bashrc +``` + +Now, navigate to the end of the file by scrolling down and add the line at the end of the file as shown in the image below: + +![][12] + +Once done, simply restart the terminal or restart your session to see the minimal prompt. It might look a bit different for your shell, but more or less it should be the same by default. + +![][13] + +Once you set it up, you can proceed customizing and configuring the prompt. Let me show you an example configuration that I did: + +### Configure Starship Shell Prompt: The Basics + +To get started, you just need to make a configuration file ([TOML file][14]) inside a .config directory. If you already have one, you should simply navigate to the directory and just create the configuration file. + +Here’s what you have to type to create the directory and the config file: + +``` +mkdir -p ~/.config && touch ~/.config/starship.toml +``` + +Do note that this is a hidden directory. So, when you try to access it from your home directory using the file manager, make sure to [enable viewing hidden files][15] before proceeding. + +From this point onwards, you should refer to the configuration documentation if you want to explore something you like. + +For an example, I configured a simple custom prompt that looks like: + +![][16] + +To achieve this, my configuration file looks like this: + +![][17] + +It is a basic custom format as per their official documentation. But, if you do not want a custom format and simply want to customize the default prompt with a color or a different symbol, that would look like: + +![][18] + +And, the configuration file for the above customization looks like: + +![][19] + +Of course, that’s not the best-looking prompt one can make but I hope you get the idea. + +You can customize how the directory looks by including icons/emojis, you can tweak the variables, format strings git commits, or while using specific programming languages. + +Not just limited to that, you can also create custom commands to use in your shell to make things easier or comfortable for yourself. + +You should explore more about in their [official website][3] and its [GitHub page][20]. + +[Starship.rs][3] + +### Concluding Thoughts + +If you just want some minor tweaks, the documentation might prove to be too overwhelming. But, even then, it lets you achieve a custom prompt or a minimal prompt with little effort that you can apply on any common shell and any system you’re working on. + +Perosnally, I don’t think it’s very useful but several readers suggested it and it seems people do love it. I am eager to see how you [customize the Linux terminal][1] for different kinds of usage. + +Feel free to share what you think about it and if you like it, in the comments down below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/starship/ + +作者:[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/customize-linux-terminal/ +[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/starship-screenshot.png?resize=800%2C577&ssl=1 +[3]: https://starship.rs/ +[4]: https://www.rust-lang.org/ +[5]: https://starship.rs/config/ +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/starship-time.jpg?resize=800%2C281&ssl=1 +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/starship-demo.gif?resize=800%2C501&ssl=1 +[8]: https://starship.rs/guide/#%F0%9F%9A%80-installation +[9]: https://www.nerdfonts.com +[10]: https://curl.se/ +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/install-starship.png?resize=800%2C534&ssl=1 +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/startship-bashrc-file.png?resize=800%2C545&ssl=1 +[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/starship-prompt.png?resize=800%2C552&ssl=1 +[14]: https://en.wikipedia.org/wiki/TOML +[15]: https://itsfoss.com/hide-folders-and-show-hidden-files-in-ubuntu-beginner-trick/ +[16]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/starship-custom.png?resize=800%2C289&ssl=1 +[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/starship-custom-config.png?resize=800%2C320&ssl=1 +[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/starship-different-symbol.png?resize=800%2C224&ssl=1 +[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/starship-symbol-change.jpg?resize=800%2C167&ssl=1 +[20]: https://github.com/starship/starship From 57728019c2e813dfe95d120c3a16fc77539b49d0 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 20 Feb 2021 05:05:01 +0800 Subject: [PATCH 073/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210219=20?= =?UTF-8?q?Unlock=20your=20Chromebook's=20hidden=20potential=20with=20Linu?= =?UTF-8?q?x?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210219 Unlock your Chromebook-s hidden potential with Linux.md --- ...hromebook-s hidden potential with Linux.md | 131 ++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 sources/tech/20210219 Unlock your Chromebook-s hidden potential with Linux.md diff --git a/sources/tech/20210219 Unlock your Chromebook-s hidden potential with Linux.md b/sources/tech/20210219 Unlock your Chromebook-s hidden potential with Linux.md new file mode 100644 index 0000000000..eec79e2a75 --- /dev/null +++ b/sources/tech/20210219 Unlock your Chromebook-s hidden potential with Linux.md @@ -0,0 +1,131 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Unlock your Chromebook's hidden potential with Linux) +[#]: via: (https://opensource.com/article/21/2/chromebook-linux) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +Unlock your Chromebook's hidden potential with Linux +====== +Chromebooks are amazing tools, but by unlocking the Linux inside them, +you can make them even more impressive. +![Working from home at a laptop][1] + +Google Chromebooks run on Linux, but normally the Linux they run isn't particularly accessible to the user. Linux is used as a backend technology for an environment based on the open source [Chromium OS][2], which Google then transforms into Chrome OS. The interface most users experience is a desktop that can run Chrome browser apps and the Chrome browser itself. And yet underneath all that, there's Linux to be found. If you know how, you can enable Linux on your Chromebook and turn a computer that was probably relatively cheap and basic into a serious laptop with access to hundreds of applications and all the power you need to make it an all-purpose computer. + +### What are Chromebooks? + +Chromebooks are laptops created especially for Chrome OS, which itself is designed for specific laptop models. Chrome OS isn't a general-purpose operating system like Linux or Windows, but instead has more in common with Android or iOS. Should you decide to purchase a Chromebook, you'll find models available from many different manufacturers, including HP, Asus, and Lenovo (among others). Some are built for school children, while others are intended for a home or business user. The main difference usually focusing on battery power or processing power, respectively. + +Regardless of what you decide upon, a Chromebook runs Chrome OS and provides you with the basic functions you'd expect from a modern computer. There's a network manager to connect to the Internet, Bluetooth, volume control, a file manager, a desktop, and so on. + +![Chrome OS desktop][3] + +Chrome OS desktop + +To get more out of this unassuming OS, though, all you have to do is activate Linux. + +### Enable developer mode on a Chromebook + +If I've made enabling Linux sound deceptively simple, that's because it is both deceptive and simple. It's deceptive because you _do_ have to backup your data before enabling Linux. + +The process is simple, but it does reset your computer back to its factory defaults. You'll have to sign back into your laptop and, if you have data stored on your account's Google Drive, then you'll have to let it resynchronize back onto your computer. Enabling Linux also requires that you reserve space just for Linux, so whatever amount of storage your Chromebook has will be cut in half or a quarter (your choice). + +Interfacing with Linux on your Chromebook is still considered a beta feature by Google, so you have to opt in to Developer Mode. The intent of Developer Mode is to allow software developers to test new features, to install a new build of the OS, and so on, but what it will do for you is unlock special features considered to be still in development. + +To enable Developer Mode, first turn off your Chromebook. This assumes you've already backed up any important information you have on your device. + +Next, press the **ESC** and refresh buttons on your keyboard and power on your Chromebook. + +![ESC and refresh buttons][4] + +ESC and refresh + +When prompted to start recovery, press **Ctrl+D** on your keyboard. + +Your Chromebook is reset to factory settings, but without the default restrictions. + +### Booting into Developer Mode + +Running in Developer Mode means that every time you boot your Chromebook, you'll be reminded that you're in Developer Mode. You can press **Ctrl+D** to skip the boot delay. Some Chromebooks beep after a few seconds to remind you about Developer Mode, making **Ctrl+D** almost mandatory. Theoretically, this is annoying, but in practice, I don't boot my Chromebook as often as I just wake it up, and when I do, **Ctrl+D** is a simple routine to incorporate into the process. + +The first time you boot after enabling Developer Mode, you must set up your device as if it were brand new. This is the only time you have to do that (unless you deactivate Developer Mode at some point in the future). + +### Enable Linux on a Chromebook + +Now that you're running in Developer Mode, you can activate the **Linux Beta** feature in Chrome OS. To do that, open **Settings** and click on **Linux Beta** in the left column. + +Activate **Linux Beta** and allot some hard drive space for your Linux system and applications. Linux is pretty lightweight at the worst of times, so you don't really need much space, but it obviously depends on how much you intend to do with Linux. 4 GB is enough for Linux plus a few hundred terminal commands and two dozen graphical applications. Because my Chromebook has a 64 GB memory chip, I gave 30 GB over to Linux because most of what I do on my Chromebook is in Linux. + +Once your Linux Beta environment is ready, you can launch a terminal by pressing the **Search** button on your keyboard and typing `terminal`. If you're new to Linux, you may not know what to install now that you have access. This, of course, depends on what you want to do with Linux. If you're interested in Linux for programming, then you might start with Bash (that's already installed and running in the terminal) and Python. If you're interested in Linux for all of its amazing open source applications, you might try applications like GIMP, MyPaint, LibreOffice, or Inkscape. + +The Linux Beta mode of Chrome OS lacks a graphical installer for software, but [applications can be installed from the terminal][5]. Install applications with the `sudo apt install` command. + + * The `sudo` command grants you permission to run commands as an administrator (called `root` in Linux). + * `apt` is an application installer. + * `install` is what you want `apt` to do. + + + +You must also give `apt` the name of a package you want installed along with that command. For instance, to install LibreOffice: + + +``` +`sudo apt install libreoffice` +``` + +When prompted to continue, type **y** (for "yes") and then press **Enter**. + +Once an application has been installed, you can launch it the same way you launch any application on Chrome OS: Type it into your application launcher. + +Learning the names and package names of Linux applications takes time, but you can also search using the `apt search` command. For instance, here is a good way to find out about useful photo applications: + + +``` +`apt search photo` +``` + +There are many applications out there, so browse through articles here on [opensource.com][6] and find something that interests you, and then try it out! + +### Share files and devices with Linux + +The Linux Beta environment runs in a [container][7], so Chrome OS needs permission to access your Linux files. To grant Chrome OS permission to interact with files you create on Linux, right-click on any folder you want to share and select **Manage Linux sharing**. + +![Chrome OS Manage Linux sharing interface][8] + +Chrome OS Managing Linux Sharing interface + +You can manage these settings and many others through the **Settings** application of Chrome OS. + +![Chrome OS Settings menu][9] + +Chrome OS Settings menu + +### Learning Linux + +If you take the time to learn Linux, you'll not only be able to unlock the hidden potential in your Chromebook, but you'll also end up learning a lot about computers in general. Linux is a valuable tool, a really fun toy, and the gateway to something much more exciting than routine computing. Get to know it. It might surprise you to know what you and your Chromebook are capable of. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/chromebook-linux + +作者:[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/wfh_work_home_laptop_work.png?itok=VFwToeMy (Working from home at a laptop) +[2]: https://www.chromium.org/chromium-os +[3]: https://opensource.com/sites/default/files/chromeos.png +[4]: https://opensource.com/sites/default/files/esc-refresh.png +[5]: https://opensource.com/article/18/1/how-install-apps-linux +[6]: https://opensource.com/tags/linux +[7]: https://opensource.com/resources/what-are-linux-containers +[8]: https://opensource.com/sites/default/files/chromeos-manage-linux-sharing.png +[9]: https://opensource.com/sites/default/files/chromeos-beta-linux.png From 015f5364d10b3bacc0ec2f5ffc5777e850f46311 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 20 Feb 2021 05:05:19 +0800 Subject: [PATCH 074/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210219=20?= =?UTF-8?q?Why=20every=20job=20in=20the=20tech=20industry=20is=20technical?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210219 Why every job in the tech industry is technical.md --- ...y job in the tech industry is technical.md | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 sources/tech/20210219 Why every job in the tech industry is technical.md diff --git a/sources/tech/20210219 Why every job in the tech industry is technical.md b/sources/tech/20210219 Why every job in the tech industry is technical.md new file mode 100644 index 0000000000..5ff7f47a7c --- /dev/null +++ b/sources/tech/20210219 Why every job in the tech industry is technical.md @@ -0,0 +1,69 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Why every job in the tech industry is technical) +[#]: via: (https://opensource.com/article/21/2/every-job-technical) +[#]: author: (Lauren Pritchett https://opensource.com/users/lauren-pritchett) + +Why every job in the tech industry is technical +====== +Let's break free from the technical vs. non-technical labels in the tech +industry in order to be successful. +![Puzzle pieces coming together to form a computer screen][1] + +Several years ago, I applied for a marketing job at a tech company. I got called back for the phone screening and had a delightful conversation with the recruiter. The next day, I got an email from the recruiter saying that I was not “technical” enough to move forward to the next round of interviews. I was shocked.  + +I had always been the one my colleagues would call on for technical help and feedback. Understanding and using technology came naturally to me. By that point in my career, I had become even more proficient and technical within my specialty. So how could the recruiter think that I am not “technical”?  + +I wrote a letter to the recruiter explaining why the hiring manager should not dismiss me just yet. Sure, I did not have experience in the tech industry (I had always worked for companies in consumer goods and retail), but isn’t every company a software company these days? I also wanted to alleviate any concerns about my lack of coding abilities. Between managing website migrations, blog redesigns, product merchandising, and fixing that annoying indent on a particularly finicky landing page, I felt that I had that “in the weeds” troubleshooting practice similar to that of a programmer.  + +The letter convinced the hiring manager to bring me in for an interview. I was so happy that they would get the chance to meet me in person.  + +### How to break free from harmful labels + +I recently read Correspondent Dawn Parzych’s series about freeing us from the labels of "technical" and "non-technical" roles in the tech industry. I realized that I had not been alone in feeling undervalued for a non-traditional set of technical skills.  + +In her [first article][2], she tells us why these labels are harmful and she gives three tips for moving away from them: + + * Find alternative words + * Embrace a growth mindset + * Recognize everyone's contributions + + + +Next, Dawn provides [examples of non-engineering jobs][3], including technical writer, product manager, data analyst, and developer relations. There are plenty of other roles that fit this category, like project manager, community manager, product marketer, editor (me!), recruiter, and more. Remember, if you work in the tech industry, you are technical. + +Dawn closes out her series with [four key pieces of advice][4] from industry leaders for those who have been mislabeled as "non-technical":  + + * Be yourself + * Know your worth + * Find where you can add value and help people + * Diversity of thought leads to success + + + +### Moving forward + +Ultimately, that marketing job did not work out, and it is for the best because I may not be where I am today without that experience. I do not regret making a case for a “non-technical” person to get a fair shot at a “technical” job, but it took me a while to gain my confidence back. I hope that others will take the advice and guidance from Dawn’s series to see that they _are_ technical and have valuable skills needed in this industry.  + +There are lots of non-code ways to contribute to open source: Here are three alternatives. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/every-job-technical + +作者:[Lauren Pritchett][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/lauren-pritchett +[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://opensource.com/article/21/2/what-technical +[3]: https://opensource.com/article/21/2/non-engineering-jobs-tech +[4]: https://opensource.com/article/21/2/advice-non-technical From cfd39fc9844b5f2e271060d07c0c1d929345d9c9 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 20 Feb 2021 08:33:54 +0800 Subject: [PATCH 075/818] translated --- ...al Graph Plotting App for Linux Desktop.md | 103 ------------------ ...al Graph Plotting App for Linux Desktop.md | 96 ++++++++++++++++ 2 files changed, 96 insertions(+), 103 deletions(-) delete mode 100644 sources/tech/20210216 Meet Plots- A Mathematical Graph Plotting App for Linux Desktop.md create mode 100644 translated/tech/20210216 Meet Plots- A Mathematical Graph Plotting App for Linux Desktop.md diff --git a/sources/tech/20210216 Meet Plots- A Mathematical Graph Plotting App for Linux Desktop.md b/sources/tech/20210216 Meet Plots- A Mathematical Graph Plotting App for Linux Desktop.md deleted file mode 100644 index deb84d80ea..0000000000 --- a/sources/tech/20210216 Meet Plots- A Mathematical Graph Plotting App for Linux Desktop.md +++ /dev/null @@ -1,103 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Meet Plots: A Mathematical Graph Plotting App for Linux Desktop) -[#]: via: (https://itsfoss.com/plots-graph-app/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -Meet Plots: A Mathematical Graph Plotting App for Linux Desktop -====== - -Plots is a graph plotting application that makes it easy to visualize mathematical formulae. You can use it for trigonometric, hyperbolic, exponential and logarithmic functions along with arbitrary sums and products. - -### Plot mathematical graphs with Plots on Linux - -[Plots][1] is a simple application inspired by graph plotting web apps like [Desmos][2]. It allows you to plot graphs of different math functions, which you can enter interactively, as well as customizing the color of your plots. - -Written in Python, Plots takes advantage of modern hardware using [OpenGL][3]. It uses GTK 3 and thus integrates well with the GNOME desktop. - -![][4] - -Using plots is straightforward. To add a new equation, click the plus sign. Clicking the trash icon deletes the equation. There is also the option to undo and redo. You can also zoom in and zoom out. - -![][5] - -The text box where you type is equation friendly. The hamburger menu has a ‘help’ option to access the documentation. You’ll find useful tips on how to write various mathematical notations here. You can also copy-paste the equations. - -![][6] - -In dark mode, the sidebar equation area turns dark but the main plotting area remains white. I believe that’s by design perhaps. - -You can use multiple functions and plot them all in one graph: - -![][7] - -I found it crashing while trying to paste some equations it could not understand. If you write something that it cannot understand or conflicts with existing equations, all plots disappear, Removing the incorrect equation brings back the plot. - -No option to export the plots or copy them to clipboard unfortunately. You can always [take screenshots in Linux][8] and use the image in your document where you have to add the graphs. - -**Recommended Read:** - -![][9] - -#### [KeenWrite: An Open Source Text Editor for Data Scientists and Mathematicians][10] - -### Installing Plots on Linux - -Plots has different installation options available for various kinds of distributions. - -Ubuntu 20.04 and 20.10 users can [take advantage of the PPA][11]: - -``` -sudo add-apt-repository ppa:apandada1/plots -sudo apt update -sudo apt install plots -``` - -For other Debian based distributions, you can [install it from the deb file][12] available [here][13]. - -I didn’t find it in AUR package list but as an Arch Linux user, you can either use the Flatpak package or install it using Python. - -[Plots Flatpak Package][14] - -If interested, you may check out the source code on its GitHub repository. If you like the application, please consider giving it a star on GitHub. - -[Plots Source Code on GitHub][1] - -**Conclusion** - -The primary use case for Plots is for students learning math or related subjects, but it can be useful in many other scenarios. I know not everyone would need that but surely helpful for the people in the academics and schools. - -I would have liked the option to export the images though. Perhaps the developers can add this feature in the future releases. - -Do you know any similar applications for plotting graphs? How does Plots stack up against them? - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/plots-graph-app/ - -作者:[Abhishek Prakash][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/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://github.com/alexhuntley/Plots/ -[2]: https://www.desmos.com/ -[3]: https://www.opengl.org/ -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/fourier-graph-plots.png?resize=800%2C492&ssl=1 -[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/plots-app-linux-1.png?resize=800%2C518&ssl=1 -[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/plots-app-linux.png?resize=800%2C527&ssl=1 -[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/multiple-equations-plots.png?resize=800%2C492&ssl=1 -[8]: https://itsfoss.com/take-screenshot-linux/ -[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/keenwrite.png?fit=800%2C450&ssl=1 -[10]: https://itsfoss.com/keenwrite/ -[11]: https://itsfoss.com/ppa-guide/ -[12]: https://itsfoss.com/install-deb-files-ubuntu/ -[13]: https://launchpad.net/~apandada1/+archive/ubuntu/plots/+packages -[14]: https://flathub.org/apps/details/com.github.alexhuntley.Plots diff --git a/translated/tech/20210216 Meet Plots- A Mathematical Graph Plotting App for Linux Desktop.md b/translated/tech/20210216 Meet Plots- A Mathematical Graph Plotting App for Linux Desktop.md new file mode 100644 index 0000000000..e732ddf738 --- /dev/null +++ b/translated/tech/20210216 Meet Plots- A Mathematical Graph Plotting App for Linux Desktop.md @@ -0,0 +1,96 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Meet Plots: A Mathematical Graph Plotting App for Linux Desktop) +[#]: via: (https://itsfoss.com/plots-graph-app/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +认识 Plots:一款适用于 Linux 桌面的数学图形绘图应用 +====== + +Plots 是一款图形绘图应用,它可以轻松实现数学公式的可视化。你可以用它来绘制任意三角函数、双曲函数、指数函数和对数函数的和和积。 + +### 在 Linux 上使用 Plots 绘制数学图形 + +[Plots][1] 是一款简单的应用,它的灵感来自于像 [Desmos][2] 这样的网络图形绘图应用。它能让你绘制不同数学函数的图形,你可以交互式地输入这些函数,还可以自定义绘图的颜色。 + +Plots 是用 Python 编写的,它使用 [OpenGL][3] 来利用现代硬件。它使用 GTK 3,因此可以很好地与 GNOME 桌面集成。 + +![][4] + +使用 plots 是很直接的。要添加一个新的方程,点击加号。点击垃圾箱图标可以删除方程。还可以选择撤销和重做。你也可以放大和缩小。 + +![][5] + +你输入方程的文本框是友好的。菜单中有一个“帮助”选项可以访问文档。你可以在这里找到关于如何编写各种数学符号的有用提示。你也可以复制粘贴方程。 + +![][6] + +在深色模式下,侧栏公式区域变成了深色,但主绘图区域仍然是白色。我相信这也许是设计好的。 + +你可以使用多个函数,并将它们全部绘制在一张图中: + +![][7] + +我发现它在尝试粘贴一些它无法理解的方程时崩溃了。如果你写了一些它不能理解的东西,或者与现有的方程冲突,所有图形都会消失,去掉不正确的方程就会恢复图形。 + +不幸的是,没有导出绘图或复制到剪贴板的选项。你可以随时[在 Linux 中截图][8],并在你要添加图像的文档中使用它。 + +### 在 Linux 上安装 Plots + +Plots 为各种发行版提供了不同的安装方式。 + +Ubuntu 20.04 和 20.10 用户可以[使用 PPA][11]: + +``` +sudo add-apt-repository ppa:apandada1/plots +sudo apt update +sudo apt install plots +``` + +对于其他基于 Debian 的发行版,你可以使用[这里][13]的 [deb 文件安装][12]。 + +我没有在 AUR 软件包列表中找到它,但是作为 Arch Linux 用户,你可以使用 Flatpak 软件包或者使用 Python 安装它。 + +[Plots Flatpak Package][14] + +如果你感兴趣,可以在它的 GitHub 仓库中查看源代码。如果你喜欢这款应用,请考虑在 GitHub 上给它 star。 + +[GitHub 上的 Plots 源码][1] + +**结论** + +Plots 主要用于帮助学生学习数学或相关科目,但它在很多其他场景下也能发挥作用。我知道不是每个人都需要,但肯定会对学术界和学校的人有帮助。 + +不过我倒是希望能有导出图片的功能。也许开发者可以在未来的版本中加入这个功能。 + +你知道有什么类似的绘图应用吗?Plots 与它们相比如何? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/plots-graph-app/ + +作者:[Abhishek Prakash][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://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://github.com/alexhuntley/Plots/ +[2]: https://www.desmos.com/ +[3]: https://www.opengl.org/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/fourier-graph-plots.png?resize=800%2C492&ssl=1 +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/plots-app-linux-1.png?resize=800%2C518&ssl=1 +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/plots-app-linux.png?resize=800%2C527&ssl=1 +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/multiple-equations-plots.png?resize=800%2C492&ssl=1 +[8]: https://itsfoss.com/take-screenshot-linux/ +[10]: https://itsfoss.com/keenwrite/ +[11]: https://itsfoss.com/ppa-guide/ +[12]: https://itsfoss.com/install-deb-files-ubuntu/ +[13]: https://launchpad.net/~apandada1/+archive/ubuntu/plots/+packages +[14]: https://flathub.org/apps/details/com.github.alexhuntley.Plots From 6e14cc2ab882997880a800819e7984bd2a468715 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 20 Feb 2021 08:40:03 +0800 Subject: [PATCH 076/818] translating --- ... to Customize Cinnamon Desktop in Linux -Beginner-s Guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210219 7 Ways to Customize Cinnamon Desktop in Linux -Beginner-s Guide.md b/sources/tech/20210219 7 Ways to Customize Cinnamon Desktop in Linux -Beginner-s Guide.md index c6e7195bf8..4ee3e43876 100644 --- a/sources/tech/20210219 7 Ways to Customize Cinnamon Desktop in Linux -Beginner-s Guide.md +++ b/sources/tech/20210219 7 Ways to Customize Cinnamon Desktop in Linux -Beginner-s Guide.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 71c8b4a9a8a572e69225f435a65d1fa475c3ab30 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 20 Feb 2021 09:45:43 +0800 Subject: [PATCH 077/818] PRF @Chao-zhi --- ...docs with LaTeX and TeXstudio on Fedora.md | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/translated/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md b/translated/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md index 950268f89b..fcecc2b24e 100644 --- a/translated/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md +++ b/translated/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md @@ -1,23 +1,24 @@ [#]: collector: (Chao-zhi) [#]: translator: (Chao-zhi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Typeset your docs with LaTeX and TeXstudio on Fedora) [#]: via: (https://fedoramagazine.org/typeset-latex-texstudio-fedora/) -[#]: author: (Julita Inca Chiroque) +[#]: author: (Julita Inca Chiroque https://fedoramagazine.org/author/yulytas/) -在 fedora 上使用 LaTeX 和 TeXstudio 排版你的文档 +使用 LaTeX 和 TeXstudio 排版文档 ====== + ![](https://fedoramagazine.org/wp-content/uploads/2017/07/latex-texstudio-945x400.jpg) LaTeX 是一个服务于高质量排版的[文档准备系统][1]。通常用于大量的技术和科学文档的排版。不过,你也可以使用 LaTex 排版各种形式的文档。教师可以编辑他们的考试和教学大纲,学生可以展示他们的论文和报告。这篇文章让你尝试使用 TeXstudio。TeXstudio 是一个便于编辑 LaTeX 文档的软件。 ### 启动 TeXstudio -如果您使用的是 Fedora Workstation,请启动软件管理,然后输入 TeXstudio 以搜索该应用程序。然后选择安装并添加 TeXstudio 到您的系统。你可以从软件中启动这个程序,或者像以往一样在概览中启动这个软件。 +如果你使用的是 Fedora Workstation,请启动软件管理,然后输入 TeXstudio 以搜索该应用程序。然后选择安装并添加 TeXstudio 到你的系统。你可以从软件管理中启动这个程序,或者像以往一样在概览中启动这个软件。 -或者,如果你使用终端,请输入 texstudio。如果未安装该软件包,系统将提示您安装它。键入 y 开始安装。 +或者,如果你使用终端,请输入 `texstudio`。如果未安装该软件包,系统将提示你安装它。键入 `y` 开始安装。 ``` $ texstudio @@ -25,9 +26,11 @@ bash: texstudio: command not found... Install package 'texstudio' to provide command 'texstudio'? [N/y] y ``` -LaTeX命令通常以反斜杠`\`开头,命令参数用大括号{}括起来。首先声明 documentclass 的类型。这个例子向您展示了 document 类是一篇文章。 +### 你的第一份文档 -然后,在声明 documentclass 之后,用 begin 和 end 标记文档的开始和结束。在这些命令之间,写一段类似以下的内容: +LaTeX 命令通常以反斜杠 `\` 开头,命令参数用大括号 `{}` 括起来。首先声明 `documentclass` 的类型。这个例子向你展示了该文档的类是一篇文章。 + +然后,在声明 `documentclass` 之后,用 `begin` 和 `end` 标记文档的开始和结束。在这些命令之间,写一段类似以下的内容: ``` \documentclass{article} @@ -44,7 +47,7 @@ The Fedora Project is a project sponsored by Red Hat primarily to co-ordinate th ![](https://fedoramagazine.org/wp-content/uploads/2017/07/Screenshot-from-2017-10-18-14-24-42.png) -从该示例中可以看出,多个换行符不会在段落之间创建额外的空格。但是,如果您确实需要留出额外的空间,请使用 hspace 和 vspace 命令。这两个命令分别添加水平和垂直空间。下面是一些示例代码,显示了段落周围的附加间距: +从该示例中可以看出,多个换行符不会在段落之间创建额外的空格。但是,如果你确实需要留出额外的空间,请使用 `hspace` 和 `vspace` 命令。这两个命令分别添加水平和垂直空间。下面是一些示例代码,显示了段落周围的附加间距: ``` \documentclass{article} @@ -65,13 +68,15 @@ The freedom to distribute copies of your modified versions to others (freedom 3) \end{document} ``` +如果需要,你也可以使用 `noindent` 命令来避免缩进。这里是上面 LaTeX 源码的结果: + ![](https://fedoramagazine.org/wp-content/uploads/2017/07/Screenshot-from-2017-10-18-17-24-53.png) ### 使用列表和格式 -如果把自由软件的四大基本自由列为一个清单,这个例子看起来会更好。通过在列表的开头使用`\begin{itemize}`,在末尾使用`\end{itemize}`来设置列表结构。在每个项目前面加上`\item`命令。 +如果把自由软件的四大基本自由列为一个清单,这个例子看起来会更好。通过在列表的开头使用`\begin{itemize}`,在末尾使用 `\end{itemize}` 来设置列表结构。在每个项目前面加上 `\item` 命令。 -额外的格式也有助于使文本更具可读性。用于格式化的有用命令包括粗体、斜体、下划线、大、小和 textsc 以帮助强调文本: +额外的格式也有助于使文本更具可读性。用于格式化的有用命令包括粗体、斜体、下划线、超大、大、小和 textsc 以帮助强调文本: ``` \documentclass{article} @@ -93,13 +98,15 @@ The freedom to distribute copies of your modified versions to others (freedom 3) \end{document} ``` +![](https://fedoramagazine.org/wp-content/uploads/2017/07/Screenshot-from-2017-10-18-17-21-30.png) + ### 添加列、图像和链接 -列、图像和链接有助于为文本添加更多信息。LaTeX 包含一些高级功能的函数作为宏包。`\usepackage` 命令加载宏包以便您可以使用这些功能。 +列、图像和链接有助于为文本添加更多信息。LaTeX 包含一些高级功能的函数作为宏包。`\usepackage` 命令加载宏包以便你可以使用这些功能。 例如,要使用图像,可以使用命令 `\usepackage{graphicx}`。或者,要设置列和链接,请分别使用 `\usepackage{multicol}` 和 `\usepackage{hyperref}`。 -`\includegraphics` 命令将图像内联放置在文档中。(为简单起见,请将图形文件包含在与LaTeX源文件相同的目录中。) +`\includegraphics` 命令将图像内联放置在文档中。(为简单起见,请将图形文件包含在与 LaTeX 源文件相同的目录中。) 下面是一个使用所有这些概念的示例。它还使用下载的两个 PNG 图片。试试你自己的图片,看看它们是如何工作的。 @@ -132,9 +139,9 @@ The freedom to distribute copies of your modified versions to others (freedom 3) \end{document} ``` -[][2] +![](https://fedoramagazine.org/wp-content/uploads/2017/07/Screenshot-from-2017-10-18-20-32-32.png) -这里的功能只触及 LaTeX 功能的表皮。您可以在项目[帮助和文档站点][3]了解更多关于它们的信息。 +这里的功能只触及 LaTeX 功能的表面。你可以在该项目的[帮助和文档站点][3]了解更多关于它们的信息。 -------------------------------------------------------------------------------- @@ -143,7 +150,7 @@ via: https://fedoramagazine.org/typeset-latex-texstudio-fedora/ 作者:[Julita Inca Chiroque][a] 选题:[Chao-zhi][b] 译者:[Chao-zhi][b] -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 837d58913bc9fdb80f4e7e9f08ceba2765423960 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 20 Feb 2021 09:46:16 +0800 Subject: [PATCH 078/818] PUB @Chao-zhi https://linux.cn/article-13136-1.html --- ...25 Typeset your docs with LaTeX and TeXstudio on Fedora.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md (99%) diff --git a/translated/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md b/published/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md similarity index 99% rename from translated/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md rename to published/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md index fcecc2b24e..8339eaf7d4 100644 --- a/translated/tech/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md +++ b/published/20171025 Typeset your docs with LaTeX and TeXstudio on Fedora.md @@ -1,8 +1,8 @@ [#]: collector: (Chao-zhi) [#]: translator: (Chao-zhi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13136-1.html) [#]: subject: (Typeset your docs with LaTeX and TeXstudio on Fedora) [#]: via: (https://fedoramagazine.org/typeset-latex-texstudio-fedora/) [#]: author: (Julita Inca Chiroque https://fedoramagazine.org/author/yulytas/) From c9c757a9b16053e42a45467762ee5deac72ed399 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sat, 20 Feb 2021 10:11:58 +0800 Subject: [PATCH 079/818] Rename sources/tech/20210219 Why every job in the tech industry is technical.md to sources/talk/20210219 Why every job in the tech industry is technical.md --- .../20210219 Why every job in the tech industry is technical.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20210219 Why every job in the tech industry is technical.md (100%) diff --git a/sources/tech/20210219 Why every job in the tech industry is technical.md b/sources/talk/20210219 Why every job in the tech industry is technical.md similarity index 100% rename from sources/tech/20210219 Why every job in the tech industry is technical.md rename to sources/talk/20210219 Why every job in the tech industry is technical.md From b86aace44992ea957f39cdc95bef49ac9d888f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=B6=85=E6=99=BA?= Date: Sat, 20 Feb 2021 10:14:21 +0800 Subject: [PATCH 080/818] translate done 20190102 Fedora classroom- LaTeX 101 for beginners.md --- ...dora classroom- LaTeX 101 for beginners.md | 73 ------------------ ...dora classroom- LaTeX 101 for beginners.md | 74 +++++++++++++++++++ 2 files changed, 74 insertions(+), 73 deletions(-) delete mode 100644 sources/tech/20190102 Fedora classroom- LaTeX 101 for beginners.md create mode 100644 translated/tech/20190102 Fedora classroom- LaTeX 101 for beginners.md diff --git a/sources/tech/20190102 Fedora classroom- LaTeX 101 for beginners.md b/sources/tech/20190102 Fedora classroom- LaTeX 101 for beginners.md deleted file mode 100644 index a857721d33..0000000000 --- a/sources/tech/20190102 Fedora classroom- LaTeX 101 for beginners.md +++ /dev/null @@ -1,73 +0,0 @@ - -[#]: collector: (Chao-zhi) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Fedora classroom: LaTeX 101 for beginners) -[#]: via: (https://fedoramagazine.org/fedora-classroom-latex-101-beginners/) -[#]: author: (Ankur Sinha) - -Fedora classroom: LaTeX 101 for beginners -====== - -![](https://fedoramagazine.org/wp-content/uploads/2017/07/fedora-classroom.jpg) - -Fedora Classroom sessions continue with an introductory session on [LaTeX][4]. The general schedule for sessions is available [on the wiki][5], along with [resources and recordings from previous sessions][6]. - -### Topic: LaTeX 101 - -LaTeX is a typesetting system that the de-facto standard for scientific publishing. It is [Free software][7], and enables the generation of a multitude of high quality documents. LaTeX documents are written in plaintext and compiled to DVI/PDF. This permits the user to focus on writing the text, leaving the typesetting to LaTeX. - -This LaTeX 101 session is aimed at absolute beginners. So, no prior knowledge of LaTeX is required. The session will: - -* introduce LaTeX. -* walk through writing a simple LaTeX document explaining basic commands. -* demonstrate compiling the document to a PDF. -* show the inclusion of references in the document from a bibliography. -* give an example of collaborative writing using LaTeX and Git. - -You will need: - -* a text editor of choice. -* a LaTeX installation. -* optionally, a knowledge of Git and Github would be useful. - -LaTeX and Git can be installed on Fedora using dnf: - -``` -sudo dnf install texlive-latex texlive-bibtex git -``` - -### When and where - -* The session will be held on the Jitsi video-conferencing platform. Please use this URL to join the session: [https://meet.jit.si/20190110-latex-101][1] -* It will be held on [Thursday, January 10 at 1400 UTC][2] on Jitsi. (Please click the link to see the time in your time zone.) -* Update: The [classroom materials are available here][3]. - -### Instructor - -[Ankur Sinha][8] (“FranciscoD”) is a Free Software supporter and has been with the Fedora community for the better part of a decade now. Ankur started as a font package maintainer and has since branched out to many other teams and SIGs. He uses Fedora Workstation and prefers the terminal whenever possible. Currently, he’s working on his PhD in computational neuroscience in the UK. When he has time to spare, he focuses on the Fedora Join SIG, Fedora classrooms, and [NeuroFedora][9]. You can get in touch with him via his Fedora project e-mail or on one of the many Fedora IRC channels. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/fedora-classroom-latex-101-beginners/ - -作者:[Ankur Sinha][a] -选题:[Chao-zhi][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/ankursinha/ -[b]: https://github.com/Chao-zhi -[1]:https://meet.jit.si/20190110-latex-101 -[2]:https://www.timeanddate.com/worldclock/fixedtime.html?iso=20190110T1400 -[3]:https://github.com/sanjayankur31/20190110-LaTeX-101 -[4]:https://en.wikibooks.org/wiki/LaTeX -[5]:https://fedoraproject.org/wiki/Classroom/F29 -[6]:https://fedoraproject.org/wiki/Classroom#Previous_Sessions -[7]:https://www.fsf.org/blogs/community/user-liberation-watch-and-share-our-new-video/ -[8]:https://fedoraproject.org/wiki/User:Ankursinha -[9]:https://fedoraproject.org/wiki/SIGs/NeuroFedora \ No newline at end of file diff --git a/translated/tech/20190102 Fedora classroom- LaTeX 101 for beginners.md b/translated/tech/20190102 Fedora classroom- LaTeX 101 for beginners.md new file mode 100644 index 0000000000..20145a63cf --- /dev/null +++ b/translated/tech/20190102 Fedora classroom- LaTeX 101 for beginners.md @@ -0,0 +1,74 @@ +[#]: collector: (Chao-zhi) +[#]: translator: (Chao-zhi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Fedora classroom: LaTeX 101 for beginners) +[#]: via: (https://fedoramagazine.org/fedora-classroom-latex-101-beginners/) +[#]: author: (Ankur Sinha) + +Fedora 课堂:LaTeX 入门 101 +====== + +![](https://fedoramagazine.org/wp-content/uploads/2017/07/fedora-classroom.jpg) + +Fedora 课堂课程来到了 [LaTeX][4] 的介绍性课程。课程的总日程安排在 [wiki][5] 上,这里面还有[以前课程的资源和录音][6]。 + +### 课题:LaTeX 101 + +LaTeX 是一种排版系统,是科学出版的事实标准。它是[自由软件][7],能够生成大量高质量的文档。LaTeX 文档以明文编写并编译为 DVI/PDF。这使得用户将精力集中在文本的书写上,而将排版留给 LaTeX。 + +这个 LaTeX 101 课程是针对绝对初学者。因此,不需要事先了解 LaTeX。会议将: + +* 介绍 LaTeX. +* 通过编写一个简单的LaTeX文档来讲解基本命令。 +* 演示如何将文档编译为PDF。 +* 在文档中显示 bibliography 中包含的参考文献。 +* 展示一个使用 LaTeX 和 Git 进行协作写作的例子。 + +你需要准备: + +* 选择一个文本编辑器。 +* 安装 LaTeX。 +* 或者,了解 Git 和 Github 也会很有用。 + +LaTeX和Git可以使用dnf安装在Fedora上: + +``` +sudo dnf install texlive-latex texlive-bibtex git +``` +其他系统你可以参考[这里][10]安装 + +### 时间地点 + +* 会议将在 Jitsi 视频会议平台上举行。请使用此 URL 加入会话:[https://meet.jit.si/20190110-latex-101][1] +* 会议将于[2019年1月10日,星期四,14:00 UTC][2]在Jitsi举行。(请单击链接查看您所在时区的时间。) +* [课堂材料可在此处获取][3]。 + +### 讲师 + +[Ankur Sinha][8](FranciscoD)是一个自由软件的支持者,在 Fedora 社区已经有十年的时间了。Ankur 最初是一名字体包维护人员,后来扩展到许多其他团队和 SIG。他使用 Fedora 工作站,并相对更喜欢使用终端。目前,他正在英国攻读计算神经科学博士学位。当他有时间的时候,他专注于 Fedora 加入 SIG:Fedora 课堂,和 [NeuroFedora][9]。你可以通过他的 Fedora 项目电子邮件或 Fedora IRC 与他联系。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/fedora-classroom-latex-101-beginners/ + +作者:[Ankur Sinha][a] +选题:[Chao-zhi][b] +译者:[Chao-zhi](https://github.com/Chao-zhi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/ankursinha/ +[b]: https://github.com/Chao-zhi +[1]:https://meet.jit.si/20190110-latex-101 +[2]:https://www.timeanddate.com/worldclock/fixedtime.html?iso=20190110T1400 +[3]:https://github.com/sanjayankur31/20190110-LaTeX-101 +[4]:https://en.wikibooks.org/wiki/LaTeX +[5]:https://fedoraproject.org/wiki/Classroom/F29 +[6]:https://fedoraproject.org/wiki/Classroom#Previous_Sessions +[7]:https://www.fsf.org/blogs/community/user-liberation-watch-and-share-our-new-video/ +[8]:https://fedoraproject.org/wiki/User:Ankursinha +[9]:https://fedoraproject.org/wiki/SIGs/NeuroFedora +[10]:http://www.tug.org/texlive/ From a59270d72d16b8dfff556e163a502acdbf9b6e59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=B6=85=E6=99=BA?= Date: Sat, 20 Feb 2021 10:30:50 +0800 Subject: [PATCH 081/818] =?UTF-8?q?=E9=80=89=E9=A2=98=EF=BC=9A20200724=20L?= =?UTF-8?q?aTeX=20typesetting,=20Part=203-=20formatting.md=E2=80=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...4 LaTeX typesetting, Part 3- formatting.md | 272 ++++++++++++++++++ 1 file changed, 272 insertions(+) create mode 100644 sources/tech/20200724 LaTeX typesetting, Part 3- formatting.md diff --git a/sources/tech/20200724 LaTeX typesetting, Part 3- formatting.md b/sources/tech/20200724 LaTeX typesetting, Part 3- formatting.md new file mode 100644 index 0000000000..1d0bb448a9 --- /dev/null +++ b/sources/tech/20200724 LaTeX typesetting, Part 3- formatting.md @@ -0,0 +1,272 @@ +[#]: collector: (Chao-zhi) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (LaTeX typesetting, Part 3: formatting) +[#]: via: (https://fedoramagazine.org/latex-typesetting-part-3-formatting/) +[#]: author: (Earl Ramirez https://fedoramagazine.org/author/earlramirez/) + + +LaTeX typesetting, Part 3: formatting +====== + +![](https://fedoramagazine.org/wp-content/uploads/2020/07/latex-series-redux-1536x650.jpg) + +This [series][1] covers basic formatting in LaTeX. [Part 1][2] introduced lists. [Part 2][3] covered tables. In part 3, you will learn about another great feature of LaTeX: the flexibility of granular document formatting. This article covers customizing the page layout, table of contents, title sections, and page style. + +### Page dimension + +When you first wrote your LaTeX document you may have noticed that the default margin is slightly bigger than you may imagine. The margins have to do with the type of paper you specified, for example, a4, letter, and the document class: article, book, report, and so on. To modify the page margins there are a few options, one of the simplest options is using the [fullpage][4] package. + +> This package sets the body of the page such that the page is almost full.FULLPAGE PACKAGE DOCUMENTATION + +The illustration below demonstrates the LaTeX default body compared to using the fullpage package. + +Another option is to use the [geometry][5] package. Before you explore how the geometry package can manipulate margins, first look at the page dimensions as depicted below. + +![](https://fedoramagazine.org/wp-content/uploads/2020/07/image.png) + +1. one inch + \hoffset + +2. one inch + \voffset + +3. \oddsidemargin = 31pt + +4. \topmargin = 20pt + +5. \headheight = 12pt + +6. \headsep = 25pt + +7. \textheight = 592pt + +8. \textwidth = 390pt + +9. \marginparsep = 35pt + +10. \marginparwidth = 35pt + +11. \footskip = 30pt + +To set the margin to 1 (one) inch using the geometry package use the following example + +``` +\usepackage{geometry} +\geometry{a4paper, margin=1in} +``` + +``` +\usepackage[a4paper, total={7in, 8in}]{geometry} +``` + +![](https://fedoramagazine.org/wp-content/uploads/2020/07/image-2-1024x287.png) + +To change the page orientation, you need to add landscape to the geometry options as shown below: + +``` +\usepackage{geometery} +\geometry{a4paper, landscape, margin=1.5in +``` + +### Table of contents + +By default, a LaTeX table of contents is titled “Contents”. There are times when you prefer to relabel the text to be “Table of Content”, change the vertical spacing between the ToC and your first section of chapter, or simply change the color of the text. + +To change the text you add the following lines to your preamble, substitute english with your desired language : + +``` +\usepackage[english]{babel} +\addto\captionsenglish{ +\renewcommand{\contentsname} +{\bfseries{Table of Contents}}} +``` + +> The tocloft package provides means of controlling the typographic design of the ToC, List of Figures and List of Tables.TOCLOFT PACKAGE DOUCMENTATION + +``` +\usepackage{tocloft} +\setlength\ctfbeforesecskip{2pt} +\setlength\cftaftertoctitleskip{30pt} +``` + +![](https://fedoramagazine.org/wp-content/uploads/2020/07/image-3.png) +Default ToC +![](https://fedoramagazine.org/wp-content/uploads/2020/07/image-4.png) +Customized ToC + +### Borders + +When using the package [hyperref][6] in your document, LaTeX section lists in the ToC and references including \url have a border, as shown in the images below. + +![](https://fedoramagazine.org/wp-content/uploads/2020/07/image-5.png) + +To remove these borders, include the following in the preamble, In the previous section, “Table of Contents,” you will see that there are not any borders in the ToC. + +``` +\usepackage{hyperref} +\hypersetup{ pdfborder = {0 0 0}} +``` + +To modify the title section font, style, and/or color, use the package [titlesec][7]. In this example, you will change the font size, font style, and font color of the section, subsection, and subsubsection. First, add the following to the preamble. + +``` +\usepackage{titlesec} +\titleformat*{\section}{\Huge\bfseries\color{darkblue}} +\titleformat*{\subsection}{\huge\bfseries\color{darkblue}} +\titleformat*{\subsubsection}{\Large\bfseries\color{darkblue}} +``` + +Taking a closer look at the code, \titleformat*{\section} specifies the depth of section to use. The above example, uses up to the third depth. The {\Huge\bfseries\color{darkblue}} portion specifies the size of the font, font style and, font color + +### Page style + +To customize the page headers and footers one of the packages, use [fancyhdr][8]. This example uses this package to modify the page style, header, and footer. The code below provides a brief description of what each option does. + +``` +\pagestyle{fancy} %for header to be on each page +\fancyhead[L]{} %keep left header blank +\fancyhead[C]{} %keep centre header blank +\fancyhead[R]{\leftmark} %add the section/chapter to the header right +\fancyfoot[L]{Static Content} %add static test to the left footer +\fancyfoot[C]{} %keep centre footer blank +\fancyfoot[R]{\thepage} %add the page number to the right footer +\setlength\voffset{-0.25in} %space between page border and header (1in + space) +\setlength\headheight{12pt} %height of the actual header. +\setlength\headsep{25pt} %separation between header and text. +\renewcommand{\headrulewidth}{2pt} % add header horizontal line +\renewcommand{\footrulewidth}{1pt} % add footer horizontal line +``` + +![](https://fedoramagazine.org/wp-content/uploads/2020/07/image-7.png) +Header +![](https://fedoramagazine.org/wp-content/uploads/2020/07/image-8.png) +Footer + +### Tips + +### Centralize the preamble + +If write many TeX documents, you can create a .tex file with all your preamble based on your document categories and reference this file. For example, I use a structure.tex as shown below. + +``` +$ cat article_structure.tex +\usepackage[english]{babel} +\addto\captionsenglish{ +\renewcommand{\contentsname} +{\bfseries{\color{darkblue}Table of Contents}} +} % Relable the contents +%\usepackage[margin=0.5in]{geometry} % specifies the margin of the document +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{graphicx} % allows you to add graphics to the document +\usepackage{hyperref} % permits redirection of URL from a PDF document +\usepackage{fullpage} % formate the content to utilise the full page +%\usepackage{a4wide} +\usepackage[export]{adjustbox} % to force image position +%\usepackage[section]{placeins} % to have multiple images in a figure +\usepackage{tabularx} % for wrapping text in a table +%\usepackage{rotating} +\usepackage{multirow} +\usepackage{subcaption} % to have multiple images in a figure +%\usepackage{smartdiagram} % initialise smart diagrams +\usepackage{enumitem} % to manage the spacing between lists and enumeration +\usepackage{fancyhdr} %, graphicx} %for header to be on each page +\pagestyle{fancy} %for header to be on each page +%\fancyhf{} +\fancyhead[L]{} +\fancyhead[C]{} +\fancyhead[R]{\leftmark} +\fancyfoot[L]{Static Content} %\includegraphics[width=0.02\textwidth]{virgin_voyages.png}} +\fancyfoot[C]{} % clear center +\fancyfoot[R]{\thepage} +\setlength\voffset{-0.25in} %Space between page border and header (1in + space) +\setlength\headheight{12pt} %Height of the actual header. +\setlength\headsep{25pt} %Separation between header and text. +\renewcommand{\headrulewidth}{2pt} % adds horizontal line +\renewcommand{\footrulewidth}{1pt} % add horizontal line (footer) +%\renewcommand{\oddsidemargin}{2pt} % adjuct the margin spacing +%\renewcommand{\pagenumbering}{roman} % change the numbering style +%\renewcommand{\hoffset}{20pt} +%\usepackage{color} +\usepackage[table]{xcolor} +\hypersetup{ pdfborder = {0 0 0}} % removes the red boarder from the table of content +%\usepackage{wasysym} %add checkbox +%\newcommand\insq[1]{% +% \Square\ #1\quad% +%} % specify the command to add checkbox +%\usepackage{xcolor} +%\usepackage{colortbl} +%\definecolor{Gray}{gray}{0.9} % create new colour +%\definecolor{LightCyan}{rgb}{0.88,1,1} % create new colour +%\usepackage[first=0,last=9]{lcg} +%\newcommand{\ra}{\rand0.\arabic{rand}} +%\newcolumntype{g}{>{\columncolor{LightCyan}}c} % create new column type g +%\usesmartdiagramlibrary{additions} +%\setcounter{figure}{0} +\setcounter{secnumdepth}{0} % sections are level 1 +\usepackage{csquotes} % the proper was of using double quotes +%\usepackage{draftwatermark} % Enable watermark +%\SetWatermarkText{DRAFT} % Specify watermark text +%\SetWatermarkScale{5} % Toggle watermark size +\usepackage{listings} % add code blocks +\usepackage{titlesec} % Manipulate section/subsection +\titleformat{\section}{\Huge\bfseries\color{darkblue}} % update sections to bold with the colour blue \titleformat{\subsection}{\huge\bfseries\color{darkblue}} % update subsections to bold with the colour blue +\titleformat*{\subsubsection}{\Large\bfseries\color{darkblue}} % update subsubsections to bold with the colour blue +\usepackage[toc]{appendix} % Include appendix in TOC +\usepackage{xcolor} +\usepackage{tocloft} % For manipulating Table of Content virtical spacing +%\setlength\cftparskip{-2pt} +\setlength\cftbeforesecskip{2pt} %spacing between the sections +\setlength\cftaftertoctitleskip{30pt} % space between the first section and the text ``Table of Contents'' +\definecolor{navyblue}{rgb}{0.0,0.0,0.5} +\definecolor{zaffre}{rgb}{0.0, 0.08, 0.66} +\definecolor{white}{rgb}{1.0, 1.0, 1.0} +\definecolor{darkblue}{rgb}{0.0, 0.2, 0.6} +\definecolor{darkgray}{rgb}{0.66, 0.66, 0.66} +\definecolor{lightgray}{rgb}{0.83, 0.83, 0.83} +%\pagenumbering{roman} +``` + +``` +\documentclass[a4paper,11pt]{article} +\input{/path_to_structure.tex}} +\begin{document} +…... +\end{document} +``` + +To enable watermarks in your LaTeX document, use the [draftwatermark][9] package. The below code snippet and image demonstrates the how to add a watermark to your document. By default the watermark color is grey which can be modified to your desired color. + +``` +\usepackage{draftwatermark} +\SetWatermarkText{\color{red}Classified} %add watermark text +\SetWatermarkScale{4} %specify the size of the text +``` + +### Conclusion + +In this series you saw some of the basic, but rich features that LaTeX provides for customizing your document to cater to your needs or the audience the document will be presented to. With LaTeX, there are many packages available to customize the page layout, style, and more. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/latex-typesetting-part-3-formatting/ + +作者:[Earl Ramirez][a] +选题:[Chao-zhi][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/earlramirez/ +[b]: https://github.com/Chao-zhi +[1]:https://fedoramagazine.org/tag/latex/ +[2]:https://fedoramagazine.org/latex-typesetting-part-1/ +[3]:https://fedoramagazine.org/latex-typesetting-part-2-tables/ +[4]:https://www.ctan.org/pkg/fullpage +[5]:https://www.ctan.org/geometry +[6]:https://www.ctan.org/pkg/hyperref +[7]:https://www.ctan.org/pkg/titlesec +[8]:https://www.ctan.org/pkg/fancyhdr +[9]:https://www.ctan.org/pkg/draftwatermark \ No newline at end of file From abb9c4c2b9a4934e158146da28a400538e74fe1a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 20 Feb 2021 11:32:00 +0800 Subject: [PATCH 082/818] APL --- .../tech/20201001 Navigating your Linux files with ranger.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20201001 Navigating your Linux files with ranger.md b/sources/tech/20201001 Navigating your Linux files with ranger.md index c5d4f8007e..a4bbd4471a 100644 --- a/sources/tech/20201001 Navigating your Linux files with ranger.md +++ b/sources/tech/20201001 Navigating your Linux files with ranger.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 2a4c55ee03939fcc917e809188eb60a915bf78a6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 20 Feb 2021 12:16:49 +0800 Subject: [PATCH 083/818] TSL&PRF --- ...Navigating your Linux files with ranger.md | 126 ------------------ ...Navigating your Linux files with ranger.md | 124 +++++++++++++++++ 2 files changed, 124 insertions(+), 126 deletions(-) delete mode 100644 sources/tech/20201001 Navigating your Linux files with ranger.md create mode 100644 translated/tech/20201001 Navigating your Linux files with ranger.md diff --git a/sources/tech/20201001 Navigating your Linux files with ranger.md b/sources/tech/20201001 Navigating your Linux files with ranger.md deleted file mode 100644 index a4bbd4471a..0000000000 --- a/sources/tech/20201001 Navigating your Linux files with ranger.md +++ /dev/null @@ -1,126 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Navigating your Linux files with ranger) -[#]: via: (https://www.networkworld.com/article/3583890/navigating-your-linux-files-with-ranger.html) -[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) - -Navigating your Linux files with ranger -====== -Ranger is a great tool for providing a multi-level view of your Linux files and allowing you to both browse and make changes using arrow keys and some handy commands. -[Heidi Sandstrom][1] [(CC0)][2] - -Ranger is a unique and very handy file system navigator that allows you to move around in your Linux file system, go in and out of subdirectories, view text-file contents and even make changes to files without leaving the tool. - -It runs in a terminal window and lets you navigate by pressing arrow keys. It provides a multi-level file display that makes it easy to see where you are, move around the file system and select particular files. - -To install ranger, use your standard install command (e.g., **sudo apt install ranger**). To start it, simply type “ranger”. It comes with a lengthy, very detailed man page, but getting started with ranger is very simple. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][3] - -### The ranger display - -One of the most important things you need to get used to right away is ranger’s way of displaying files. Once you start ranger, you will see four columns of data. The first column is one level up from wherever you started ranger. If you start from your home directory, for example, ranger will list all of the home directories in column 1. The second column will show the first screenful of directories and files in your home directory (or whatever directory you start it from). - -The key here is moving past any inclination you might have to see the details in each line of the display as related. All the entries in column 2 relate to a single entry in column 1 and content in column 4 relates to the selected file or directory in column 2. - -Unlike your normal command-line view, directories will be listed first (alphanumerically) and files will be listed second (also alphanumerically). Starting in your home directory, the display might look something like this: - -``` -shs@dragonfly /home/shs/backups <== current selection - bugfarm backups 0 empty - dory bin 59 - eel Buttons 15 - nemo Desktop 0 - shark Documents 0 - shs Downloads 1 - ^ ^ ^ ^ - | | | | - homes directories # files listing - in selected in each of files in - home directory selected directory -``` - -The top line in ranger's display tells you where  you are. In the abive example, the current directory is **/home/shs/backups**. We see the highlighted word "empty" because there are no files in this directory. If we press the down arrow key to select **bin** instead, we'll see a list of files: - -``` -shs@dragonfly /home/shs/bin <== current selection - bugfarm backups 0 append - dory bin 59 calcPower - eel Buttons 15 cap - nemo Desktop 0 extract - shark Documents 0 finddups - shs Downloads 1 fix - ^ ^ ^ ^ - | | | | - homes directories # files listing - in selected in each of files in - home directory selected directory -``` - -The highlighted entries in each column show the current selections. Use the right arrow to move into deeper directories or view file content. - -If you continue pressing the down arrow key to move to the file portion of the listing, you will note that the third column will show file sizes (instead of the numbers of files). The "current selection" line will also display the currently selected file name while the rightmost column displays the file content when possible. - -``` -shs@dragonfly /home/shs/busy_wait.c <== current selection - bugfarm BushyRidge.zip 170 K /* - dory busy_wait.c 338 B * program that does a busy wait - eel camper.jpg 5.55 M * it's used to show ASLR, and that's it - nemo check_lockscreen 80 B */ - shark chkrootkit-output 438 B #include - ^ ^ ^ ^ - | | | | - homes files sizes file content -``` - -The bottom line of the display will show some file and directory details: - -``` --rw-rw-r—- shs shs 338B 2019-01-05 14:44 1.52G, 365G free 67/488 11% -``` - -If you select a directory and press enter, you will move into that directory. The leftmost column in your display will then be a listing of the contents of your home directory, and the second column will be a file listing of the directory contents. You can then examine the contents of subdirectories and the contents of files. - -Press the left arrow key to move back up a level. - -Quit ranger by pressing "q". - -### Making changes - -You can press **?** to bring up a help line at the bottom of your screen. It should look like this: - -``` -View [m]an page, [k]ey bindings, [c]commands or [s]ettings? (press q to abort) -``` - -Press **c** and ranger will provide information on commands that you can use within the tool. For example, you can change permissions on the current file by entering **:chmod** followed by the intended permissions. For example, once a file is selected, you can type **:chmod 700** to set permissions to **rwx------**. - -Typing **:edit** instead would open the file in **nano** and allow you to make changes and then save the file using **nano** commands. - -### Wrap-Up - -There are more ways to use **ranger** than are described in this post. The tool provides a very different way to list and interact with files on a Linux system and is easy to navigate once you get used to its multi-tiered way of listing directories and files and using arrow keys in place of **cd** commands to move around. - -Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3583890/navigating-your-linux-files-with-ranger.html - -作者:[Sandra Henry-Stocker][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://www.networkworld.com/author/Sandra-Henry_Stocker/ -[b]: https://github.com/lujun9972 -[1]: https://unsplash.com/photos/mHC0qJ7l-ls -[2]: https://creativecommons.org/publicdomain/zero/1.0/ -[3]: https://www.networkworld.com/newsletters/signup.html -[4]: https://www.facebook.com/NetworkWorld/ -[5]: https://www.linkedin.com/company/network-world diff --git a/translated/tech/20201001 Navigating your Linux files with ranger.md b/translated/tech/20201001 Navigating your Linux files with ranger.md new file mode 100644 index 0000000000..32645d565e --- /dev/null +++ b/translated/tech/20201001 Navigating your Linux files with ranger.md @@ -0,0 +1,124 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Navigating your Linux files with ranger) +[#]: via: (https://www.networkworld.com/article/3583890/navigating-your-linux-files-with-ranger.html) +[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) + +用 ranger 在 Linux 文件的海洋中导航 +===== + +> ranger 是一个很好的工具,它为你的 Linux 文件提供了一个多级视图,并允许你使用方向键和一些方便的命令进行浏览和更改。 + +![](https://images.idgesg.net/images/article/2018/05/compass_direction_path_guidance_lost_sea_ocean_heidi_sandstrom_cc0_via_unsplash_1200x800-100757640-large.jpg) + +`ranger` 是一款独特且非常方便的文件系统导航器,它允许你在 Linux 文件系统中移动,进出子目录,查看文本文件内容,甚至可以在不离开该工具的情况下对文件进行修改。 + +它运行在终端窗口中,并允许你按下方向键进行导航。它提供了一个多级的文件显示,让你很容易看到你在哪里、在文件系统中移动、并选择特定的文件。 + +要安装 `ranger`,请使用标准的安装命令(例如,`sudo apt install ranger`)。要启动它,只需键入 `ranger`。它有一个很长的、非常详细的手册页面,但开始使用 `ranger` 非常简单。 + +### ranger 的显示方式 + +你需要马上习惯的最重要的一件事就是 `ranger` 的文件显示方式。一旦你启动了 `ranger`,你会看到四列数据。第一列是你启动 `ranger` 的位置的上一级。例如,如果你从主目录开始,`ranger` 将在第一列中列出所有的主目录。第二列将显示你的主目录(或者你开始的目录)中的目录和文件的第一屏内容。 + +这里的关键是超越你可能有的任何习惯,将每一行显示的细节看作是相关的。第二列中的所有条目与第一列中的单个条目相关,第四列中的内容与第二列中选定的文件或目录相关。 + +与一般的命令行视图不同的是,目录将被列在第一位(按字母数字顺序),文件将被列在第二位(也是按字母数字顺序)。从你的主目录开始,显示的内容可能是这样的: + +``` +shs@dragonfly /home/shs/backups <== current selection + bugfarm backups 0 empty + dory bin 59 + eel Buttons 15 + nemo Desktop 0 + shark Documents 0 + shs Downloads 1 + ^ ^ ^ ^ + | | | | + homes directories # files listing + in selected in each of files in + home directory selected directory +``` + +`ranger` 显示的最上面一行告诉你在哪里。在这个例子中,当前目录是 `/home/shs/backups`。我们看到高亮显示的是 `empty`,因为这个目录中没有文件。如果我们按下方向键选择 `bin`,我们会看到一个文件列表: + +``` +shs@dragonfly /home/shs/bin <== current selection + bugfarm backups 0 append + dory bin 59 calcPower + eel Buttons 15 cap + nemo Desktop 0 extract + shark Documents 0 finddups + shs Downloads 1 fix + ^ ^ ^ ^ + | | | | + homes directories # files listing + in selected in each of files in + home directory selected directory +``` + +每一列中高亮显示的条目显示了当前的选择。使用右方向键可移动到更深的目录或查看文件内容。 + +如果你继续按下方向键移动到列表的文件部分,你会注意到第三列将显示文件大小(而不是文件的数量)。“当前选择”行也会显示当前选择的文件名,而最右边的一列则会尽可能地显示文件内容。 + +``` +shs@dragonfly /home/shs/busy_wait.c <== current selection + bugfarm BushyRidge.zip 170 K /* + dory busy_wait.c 338 B * program that does a busy wait + eel camper.jpg 5.55 M * it's used to show ASLR, and that's it + nemo check_lockscreen 80 B */ + shark chkrootkit-output 438 B #include + ^ ^ ^ ^ + | | | | + homes files sizes file content +``` + +在该显示的底行会显示一些文件和目录的详细信息: + +``` +-rw-rw-r—- shs shs 338B 2019-01-05 14:44 1.52G, 365G free 67/488 11% +``` + +如果你选择了一个目录并按下回车键,你将进入该目录。然后,在你的显示屏中最左边的一列将是你的主目录的内容列表,第二列将是该目录内容的文件列表。然后你可以检查子目录的内容和文件的内容。 + +按左方向键可以向上移动一级。 + +按 `q` 键退出 `ranger`。 + +### 做出改变 + +你可以按 `?` 键,在屏幕底部弹出一条帮助行。它看起来应该是这样的: + +``` +View [m]an page, [k]ey bindings, [c]commands or [s]ettings? (press q to abort) +``` + +按 `c` 键,`ranger` 将提供你可以在该工具内使用的命令信息。例如,你可以通过输入 `:chmod` 来改变当前文件的权限,后面跟着预期的权限。例如,一旦选择了一个文件,你可以输入 `:chmod 700` 将权限设置为 `rwx------`。 + +输入 `:edit` 可以在 `nano` 中打开该文件,允许你进行修改,然后使用 `nano` 的命令保存文件。 + +### 总结 + +使用 `ranger` 的方法比本篇文章所描述的更多。该工具提供了一种非常不同的方式来列出 Linux 系统上的文件并与之交互,一旦你习惯了它的多级的目录和文件列表方式,并使用方向键代替 `cd` 命令来移动,就可以很轻松地在 Linux 的文件中导航。 + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3583890/navigating-your-linux-files-with-ranger.html + +作者:[Sandra Henry-Stocker][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://www.networkworld.com/author/Sandra-Henry_Stocker/ +[b]: https://github.com/lujun9972 +[1]: https://unsplash.com/photos/mHC0qJ7l-ls +[2]: https://creativecommons.org/publicdomain/zero/1.0/ +[3]: https://www.networkworld.com/newsletters/signup.html +[4]: https://www.facebook.com/NetworkWorld/ +[5]: https://www.linkedin.com/company/network-world From caf23d72554f63ca733f19242be353f851ccce18 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 20 Feb 2021 12:20:12 +0800 Subject: [PATCH 084/818] PUB @wxy https://linux.cn/article-13137-1.html --- .../20201001 Navigating your Linux files with ranger.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20201001 Navigating your Linux files with ranger.md (97%) diff --git a/translated/tech/20201001 Navigating your Linux files with ranger.md b/published/20201001 Navigating your Linux files with ranger.md similarity index 97% rename from translated/tech/20201001 Navigating your Linux files with ranger.md rename to published/20201001 Navigating your Linux files with ranger.md index 32645d565e..4c2387fde9 100644 --- a/translated/tech/20201001 Navigating your Linux files with ranger.md +++ b/published/20201001 Navigating your Linux files with ranger.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13137-1.html) [#]: subject: (Navigating your Linux files with ranger) [#]: via: (https://www.networkworld.com/article/3583890/navigating-your-linux-files-with-ranger.html) [#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) @@ -12,7 +12,7 @@ > ranger 是一个很好的工具,它为你的 Linux 文件提供了一个多级视图,并允许你使用方向键和一些方便的命令进行浏览和更改。 -![](https://images.idgesg.net/images/article/2018/05/compass_direction_path_guidance_lost_sea_ocean_heidi_sandstrom_cc0_via_unsplash_1200x800-100757640-large.jpg) +![](https://img.linux.net.cn/data/attachment/album/202102/20/121918g5hqhjfcjyffh3lt.jpg) `ranger` 是一款独特且非常方便的文件系统导航器,它允许你在 Linux 文件系统中移动,进出子目录,查看文本文件内容,甚至可以在不离开该工具的情况下对文件进行修改。 From 85b82744f8a716f9253c8a8062126d5fb3a9462c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=B6=85=E6=99=BA?= Date: Sat, 20 Feb 2021 15:25:23 +0800 Subject: [PATCH 085/818] translating by Chao-zhi --- .../tech/20200724 LaTeX typesetting, Part 3- formatting.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20200724 LaTeX typesetting, Part 3- formatting.md b/sources/tech/20200724 LaTeX typesetting, Part 3- formatting.md index 1d0bb448a9..b6d601f3f6 100644 --- a/sources/tech/20200724 LaTeX typesetting, Part 3- formatting.md +++ b/sources/tech/20200724 LaTeX typesetting, Part 3- formatting.md @@ -1,5 +1,5 @@ [#]: collector: (Chao-zhi) -[#]: translator: ( ) +[#]: translator: (Chao-zhi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -254,7 +254,7 @@ via: https://fedoramagazine.org/latex-typesetting-part-3-formatting/ 作者:[Earl Ramirez][a] 选题:[Chao-zhi][b] -译者:[译者ID](https://github.com/译者ID) +译者:[Chao-zhi](https://github.com/Chao-zhi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 1ed4a2a17140741b3b38ba923ea44dd3f3420202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=B6=85=E6=99=BA?= Date: Sat, 20 Feb 2021 16:27:41 +0800 Subject: [PATCH 086/818] translate done: 20200724 LaTeX typesetting, Part 3- formatting.md --- ...4 LaTeX typesetting, Part 3- formatting.md | 112 ++++++++++-------- 1 file changed, 60 insertions(+), 52 deletions(-) rename {sources => translated}/tech/20200724 LaTeX typesetting, Part 3- formatting.md (63%) diff --git a/sources/tech/20200724 LaTeX typesetting, Part 3- formatting.md b/translated/tech/20200724 LaTeX typesetting, Part 3- formatting.md similarity index 63% rename from sources/tech/20200724 LaTeX typesetting, Part 3- formatting.md rename to translated/tech/20200724 LaTeX typesetting, Part 3- formatting.md index b6d601f3f6..79d65a9eb1 100644 --- a/sources/tech/20200724 LaTeX typesetting, Part 3- formatting.md +++ b/translated/tech/20200724 LaTeX typesetting, Part 3- formatting.md @@ -3,77 +3,74 @@ [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) -[#]: subject: (LaTeX typesetting, Part 3: formatting) +[#]: subject: (LaTeX typesetting,Part 3: formatting) [#]: via: (https://fedoramagazine.org/latex-typesetting-part-3-formatting/) [#]: author: (Earl Ramirez https://fedoramagazine.org/author/earlramirez/) -LaTeX typesetting, Part 3: formatting +LaTeX 排版 (3):排版 ====== ![](https://fedoramagazine.org/wp-content/uploads/2020/07/latex-series-redux-1536x650.jpg) -This [series][1] covers basic formatting in LaTeX. [Part 1][2] introduced lists. [Part 2][3] covered tables. In part 3, you will learn about another great feature of LaTeX: the flexibility of granular document formatting. This article covers customizing the page layout, table of contents, title sections, and page style. +本[系列 ][1] 介绍了 LaTeX 中的基本格式。[第 1 部分 ][2] 介绍了列表。[第 2 部分 ][3] 阐述了表格。在第 3 部分中,您将了解 LaTeX 的另一个重要特性:细腻灵活的文档排版。本文介绍如何自定义页面布局、目录、标题部分和页面样式。 -### Page dimension +### 页面维度 -When you first wrote your LaTeX document you may have noticed that the default margin is slightly bigger than you may imagine. The margins have to do with the type of paper you specified, for example, a4, letter, and the document class: article, book, report, and so on. To modify the page margins there are a few options, one of the simplest options is using the [fullpage][4] package. +当您第一次编写 LaTeX 文档时,您可能已经注意到默认边距比您想象的要大一些。页边距与指定的纸张类型有关,例如 A4、letter 和 documentclass(article、book、report) 等等。要修改页边距,有几个选项,最简单的选项之一是使用 [fullpage][4] 包。 -> This package sets the body of the page such that the page is almost full.FULLPAGE PACKAGE DOCUMENTATION +> 该软件包设置页面的主体,可以使主体几乎占满整个页面。 +> +> ——FULLPAGE PACKAGE DOCUMENTATION -The illustration below demonstrates the LaTeX default body compared to using the fullpage package. +下图演示了使用 fullpage 包和没有使用的区别。 +<!-- 但是原文中并没有这个图 --> -Another option is to use the [geometry][5] package. Before you explore how the geometry package can manipulate margins, first look at the page dimensions as depicted below. +另一个选择是使用 [geometry][5] 包。在探索 geometry 包如何操纵页边距之前,请首先查看如下所示的页面尺寸。 ![](https://fedoramagazine.org/wp-content/uploads/2020/07/image.png) -1. one inch + \hoffset +1。1 英寸 + \hoffset +2。1 英寸 + \voffset +3。\oddsidemargin = 31pt +4。\topmargin = 20pt +5。\headheight = 12pt +6。\headsep = 25pt +7。\textheight = 592pt +8。\textwidth = 390pt +9。\marginparsep = 35pt +10。\marginparwidth = 35pt +11。\footskip = 30pt -2. one inch + \voffset - -3. \oddsidemargin = 31pt - -4. \topmargin = 20pt - -5. \headheight = 12pt - -6. \headsep = 25pt - -7. \textheight = 592pt - -8. \textwidth = 390pt - -9. \marginparsep = 35pt - -10. \marginparwidth = 35pt - -11. \footskip = 30pt - -To set the margin to 1 (one) inch using the geometry package use the following example +要使用 geometry 包将边距设置为 1 英寸,请使用以下示例 ``` \usepackage{geometry} \geometry{a4paper, margin=1in} ``` +除上述示例外,geometry 命令还可以修改纸张尺寸和方向。要更改纸张尺寸,请使用以下示例: + ``` \usepackage[a4paper, total={7in, 8in}]{geometry} ``` ![](https://fedoramagazine.org/wp-content/uploads/2020/07/image-2-1024x287.png) -To change the page orientation, you need to add landscape to the geometry options as shown below: +要更改页面方向,需要将横向添加到 geometery 选项中,如下所示: ``` \usepackage{geometery} \geometry{a4paper, landscape, margin=1.5in ``` -### Table of contents +![](https://fedoramagazine.org/wp-content/uploads/2020/07/image-9.png) -By default, a LaTeX table of contents is titled “Contents”. There are times when you prefer to relabel the text to be “Table of Content”, change the vertical spacing between the ToC and your first section of chapter, or simply change the color of the text. +### 目录 -To change the text you add the following lines to your preamble, substitute english with your desired language : +默认情况下,目录的标题为 “contents”。有时,您更想将标题改为 “Table of Content”,更改目录和章节第一节之间的垂直间距,或者只更改文本的颜色。 + +若要更改文本,请在导言区中添加以下行,用所需语言替换英语: ``` \usepackage[english]{babel} @@ -81,8 +78,11 @@ To change the text you add the following lines to your preamble, substitute engl \renewcommand{\contentsname} {\bfseries{Table of Contents}}} ``` +要操纵目录与图,小节和章节列表之间的虚拟间距,请使用 tocloft 软件包。本文中使用的两个选项是 cftbeforesecskip 和 cftaftertoctitleskip。 -> The tocloft package provides means of controlling the typographic design of the ToC, List of Figures and List of Tables.TOCLOFT PACKAGE DOUCMENTATION +> tocloft 包提供了控制目录、图表列表和表格列表的排版方法。 +> +> ——TOCLOFT PACKAGE DOUCMENTATION ``` \usepackage{tocloft} @@ -91,24 +91,25 @@ To change the text you add the following lines to your preamble, substitute engl ``` ![](https://fedoramagazine.org/wp-content/uploads/2020/07/image-3.png) -Default ToC +默认目录 + ![](https://fedoramagazine.org/wp-content/uploads/2020/07/image-4.png) -Customized ToC +定制目录 -### Borders +### 边框 -When using the package [hyperref][6] in your document, LaTeX section lists in the ToC and references including \url have a border, as shown in the images below. +在文档中使用包 [hyperref][6] 时,目录中的 LaTeX 章节列表和包含 `\url` 的引用都有边框,如下图所示。 ![](https://fedoramagazine.org/wp-content/uploads/2020/07/image-5.png) -To remove these borders, include the following in the preamble, In the previous section, “Table of Contents,” you will see that there are not any borders in the ToC. +要删除这些边框,请在导言区中包括以下内容,您将看到目录中没有任何边框。 ``` \usepackage{hyperref} \hypersetup{ pdfborder = {0 0 0}} ``` -To modify the title section font, style, and/or color, use the package [titlesec][7]. In this example, you will change the font size, font style, and font color of the section, subsection, and subsubsection. First, add the following to the preamble. +要修改标题部分的字体、样式或颜色,请使用程序包 [titlesec][7]。在本例中,您将更改节、子节和子节的字体大小、字体样式和字体颜色。首先,在导言区中增加以下内容。 ``` \usepackage{titlesec} @@ -117,11 +118,11 @@ To modify the title section font, style, and/or color, use the package [titlesec \titleformat*{\subsubsection}{\Large\bfseries\color{darkblue}} ``` -Taking a closer look at the code, \titleformat*{\section} specifies the depth of section to use. The above example, uses up to the third depth. The {\Huge\bfseries\color{darkblue}} portion specifies the size of the font, font style and, font color +仔细看看代码,`\titleformat*{\section}` 指定要使用的节的深度。上面的示例最多使用第三个深度。`{\Huge\bfseries\color{darkblue}}` 部分指定字体大小、字体样式和字体颜色 -### Page style +### 页面样式 -To customize the page headers and footers one of the packages, use [fancyhdr][8]. This example uses this package to modify the page style, header, and footer. The code below provides a brief description of what each option does. +要自定义的页眉和页脚,请使用 [fancyhdr][8]。此示例使用此包修改页面样式、页眉和页脚。下面的代码简要描述了每个选项的作用。 ``` \pagestyle{fancy} %for header to be on each page @@ -137,17 +138,19 @@ To customize the page headers and footers one of the packages, use [fancyhdr][8] \renewcommand{\headrulewidth}{2pt} % add header horizontal line \renewcommand{\footrulewidth}{1pt} % add footer horizontal line ``` +结果如下所示 ![](https://fedoramagazine.org/wp-content/uploads/2020/07/image-7.png) -Header +页眉 + ![](https://fedoramagazine.org/wp-content/uploads/2020/07/image-8.png) -Footer +页脚 -### Tips +### 小贴士 -### Centralize the preamble +#### 集中导言区 -If write many TeX documents, you can create a .tex file with all your preamble based on your document categories and reference this file. For example, I use a structure.tex as shown below. +如果要编写许多 TeX 文档,可以根据文档类别创建一个包含所有导言区的 `.tex` 文件并引用此文件。例如,我使用结构 `.tex` 如下所示。 ``` $ cat article_structure.tex @@ -228,6 +231,8 @@ $ cat article_structure.tex %\pagenumbering{roman} ``` +在您的文章中,请参考以下示例中所示的方法引用 `structure.tex` 文件: + ``` \documentclass[a4paper,11pt]{article} \input{/path_to_structure.tex}} @@ -236,17 +241,20 @@ $ cat article_structure.tex \end{document} ``` -To enable watermarks in your LaTeX document, use the [draftwatermark][9] package. The below code snippet and image demonstrates the how to add a watermark to your document. By default the watermark color is grey which can be modified to your desired color. +#### 添加水印 + +要在 LaTeX 文档中启用水印,请使用 [draftwatermark][9] 软件包。下面的代码段和图像演示了如何在文档中添加水印。默认情况下,水印颜色为灰色,可以将其修改为所需的颜色。 ``` \usepackage{draftwatermark} \SetWatermarkText{\color{red}Classified} %add watermark text \SetWatermarkScale{4} %specify the size of the text ``` +![](https://fedoramagazine.org/wp-content/uploads/2020/07/image-10.png) -### Conclusion +### 结论 -In this series you saw some of the basic, but rich features that LaTeX provides for customizing your document to cater to your needs or the audience the document will be presented to. With LaTeX, there are many packages available to customize the page layout, style, and more. +在本系列中,您了解了 LaTeX 提供的一些基本但丰富的功能,这些功能可用于自定义文档以满足您的需要或将文档呈现给的受众。LaTeX 海洋中,还有许多软件包需要大家自行去探索。 -------------------------------------------------------------------------------- From 13f4b8085e6fe3b4f2b754c4627696a6a14b9016 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Sat, 20 Feb 2021 21:08:59 +0800 Subject: [PATCH 087/818] Translating --- ...ation, Configuration and Quick Start Guide.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sources/tech/20200121 Ansible Automation Tool Installation, Configuration and Quick Start Guide.md b/sources/tech/20200121 Ansible Automation Tool Installation, Configuration and Quick Start Guide.md index 76cf181ff2..48d91cd8ff 100644 --- a/sources/tech/20200121 Ansible Automation Tool Installation, Configuration and Quick Start Guide.md +++ b/sources/tech/20200121 Ansible Automation Tool Installation, Configuration and Quick Start Guide.md @@ -1,11 +1,11 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Ansible Automation Tool Installation, Configuration and Quick Start Guide) -[#]: via: (https://www.2daygeek.com/install-configure-ansible-automation-tool-linux-quick-start-guide/) -[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) +[#]: collector: "lujun9972" +[#]: translator: "MjSeven" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " +[#]: subject: "Ansible Automation Tool Installation, Configuration and Quick Start Guide" +[#]: via: "https://www.2daygeek.com/install-configure-ansible-automation-tool-linux-quick-start-guide/" +[#]: author: "Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/" Ansible Automation Tool Installation, Configuration and Quick Start Guide ====== From c899c9af5b4d487f08fd62daf03b62d061418f55 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 20 Feb 2021 21:29:14 +0800 Subject: [PATCH 088/818] APL --- sources/tech/20210216 How to install Linux in 3 steps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210216 How to install Linux in 3 steps.md b/sources/tech/20210216 How to install Linux in 3 steps.md index fd860505c8..b5268c2a15 100644 --- a/sources/tech/20210216 How to install Linux in 3 steps.md +++ b/sources/tech/20210216 How to install Linux in 3 steps.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From b09aad976c5fa1b155571bd3e923ebb57e840c0f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 20 Feb 2021 23:11:37 +0800 Subject: [PATCH 089/818] TSL --- ...0210216 How to install Linux in 3 steps.md | 146 ------------------ ...0210216 How to install Linux in 3 steps.md | 145 +++++++++++++++++ 2 files changed, 145 insertions(+), 146 deletions(-) delete mode 100644 sources/tech/20210216 How to install Linux in 3 steps.md create mode 100644 translated/tech/20210216 How to install Linux in 3 steps.md diff --git a/sources/tech/20210216 How to install Linux in 3 steps.md b/sources/tech/20210216 How to install Linux in 3 steps.md deleted file mode 100644 index b5268c2a15..0000000000 --- a/sources/tech/20210216 How to install Linux in 3 steps.md +++ /dev/null @@ -1,146 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to install Linux in 3 steps) -[#]: via: (https://opensource.com/article/21/2/linux-installation) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -How to install Linux in 3 steps -====== -Operating system installations may seem mysterious, but they are -actually pretty straight forward. Here are the steps for a successful -Linux installation. -![bash logo on green background][1] - -In 2021, there are more reasons why people love Linux than ever before. In this series, I'll share 21 different reasons to use Linux. Here's how to install Linux.  - -Installing an operating system (OS) is always daunting. It's something of a puzzle to most people: Installing an OS can't happen from inside the OS because it either hasn't been installed, or it's about to be replaced by a different one, so how does it happen? And worse yet, it usually involves confusing questions about hard drive formats, install destinations, time zones, user names, passwords, and a bunch of other stuff that you just don't normally think about. Linux distributions know this, and so they've worked diligently over the years to reduce the time you spend in the OS installer down to the absolute minimum. - -### What happens when you install - -Whether you're installing just an application or a whole operating system, the process of _installation_ is just a fancy way to copy files from one medium to another. Regardless of any user interface or animations used to disguise the procedure as something highly specialized, it all amounts to the same thing in the end: Files that were once stored on a disc or drive are copied to specific locations on your hard drive. - -When it's an application being installed, the valid locations for those files are highly restricted to your _file system_ or the part of your hard drive that your operating system knows it can use. This is significant because it's possible to partition a hard drive into separate spaces (Apple used this trick back in the early '00s for what they called "Bootcamp", allowing users to install both macOS and Windows onto a drive, but as separate entities). When you install an operating system, some special files are installed into places on your drive that are normally off-limits. More importantly, all existing data on your drive is, at least by default, erased to make room for the new system, so creating a backup is _essential_. - -### Installers - -Technically speaking, you don't actually _need_ an installer to install applications or even operating systems. Believe it or not, some people install Linux manually, by mounting a blank hard drive, compiling code, and copying files. This is accomplished with the help of a project called [Linux From Scratch (LFS)][2]. This project aims to help enthusiasts, students, and future OS designers to learn more about how computers work and what function each component performs. This isn't the recommended method of installing Linux, but you'll find that in open source, it's usually true that _if_ something can be done, then somebody's doing it. And it's a good thing, too, because these niche interests very often lead to surprisingly useful innovations. - -Assuming you're not trying to reverse engineer Linux, though, the normal way to install it is with an install disc or install image. - -### 3 easy steps to install Linux - -When you boot from a Linux install DVD or thumb drive, you're placed into a minimal operating environment designed to run one or more useful applications. The installer is the primary application, but because Linux is such a flexible system, you can usually also run standard desktop applications to get a feel for what the OS is like before you commit to installing it. - -Different Linux distributions have different installer interfaces. Here are two examples: - -Fedora Linux has a flexible installer (called **Anaconda**) capable of complex system configuration. - -![Anaconda installer screen on Fedora][3] - -The Anaconda installer on Fedora - -Elementary OS has a simple installer designed primarily for an install on a personal computer: - -![Elementary OS installer][4] - -Elementary OS installer - -#### 1\. Get an installer - -The first step toward installing Linux is to download an installer. You obtain a Linux install image from the distribution you've chosen to try. - - * [Fedora][5] is famous for being the first to update its software - * [Linux Mint][6] provides easy options to install missing drivers - * [Elementary][7] provides a beautiful desktop experience and several special, custom-built applications - - - -Linux installers are `.iso` files, which are "blueprints" for DVD media. You can burn the `.iso` file to a DVD-R if you still use optical media, or you can _flash_ it to a USB drive (make sure it's an empty USB drive, as all of its contents are erased when the image is flashed onto it). To flash an image to a USB drive, you can [use the open source Etcher application][8]. - -![Etcher used to flash a USB thumb drive][9] - -Etcher application can flash a USB thumb drive - -You're now ready to install Linux. - -#### 2\. Boot order - -To install an OS onto a computer, you must boot to the OS installer. This is not common behavior for a computer because it's so rarely done. In theory, you install an OS once, and then you update it. When you opt to install a different operating system onto a computer, you're interrupting that normal lifecycle. That's not a bad thing. It's your computer, so you have the authority to do re-image it. However, it's different from the default behavior of a computer, which is to boot to whatever operating system it finds on the hard drive immediately after being powered on. - -Before installing Linux, you must back up any data you have on your target computer because it will all be erased upon installation. - -Assuming you've saved your data to an external hard drive, which you've then secreted away to somewhere safe (and not attached to your computer), then you're ready to proceed. - -First, attach the USB drive containing your Linux installer to your computer. Power on the computer and watch the screen for some indication of how to interrupt its default boot sequence. This is usually a key like **F2**, **F8**, **Esc**, or even **Del**, but it varies depending on your motherboard manufacturer. If you miss your window of opportunity, just wait for the default OS to load, and then reboot and try again. - -When you interrupt the boot sequence, your computer prompts you for boot instructions. Specifically, the firmware embedded into the motherboard needs to know what drive to look to for an operating system it can load. In this case, you want the computer to boot from the USB drive containing the Linux image. How you're prompted for this information varies, depending on the motherboard manufacturer. Sometimes, it's a very direct question complete with a menu: - -![Boot device menu][10] - -The boot device selection menu - -Other times, you're taken into a rudimentary interface you can use to set the boot order. Computers are usually set by default to look to the internal hard drive first. Failing that, it moves on to a USB drive, a network drive, or an optical drive. You need to tell your computer to look for a USB drive _first_ so that it bypasses its own internal hard drive and instead boots the Linux image on your USB drive. - -![BIOS selection screen][11] - -BIOS selection screen - -This may seem daunting at first, but once you get familiar with the interface, it's a quick and easy task. You won't have to do this once Linux is installed because, after that, you'll want your computer to boot off the internal hard drive again. This is a great trick to get comfortable with, though, because it's the key to using Linux off of a thumb drive, testing a computer for Linux compatibility before installing, and general troubleshooting regardless of what OS is involved. - -Once you've selected your USB drive as the boot device, save your settings, let the computer reset, and boot to the Linux image. - -#### 3\. Install Linux - -Once you've booted into the Linux installer, it's just a matter of stepping through prompts. - -The Fedora installer, Anaconda, presents you a "menu" of all the things you can customize prior to installation. Most are set to sensible defaults and probably require no interaction from you, but others are marked with alert symbols to indicate that your configurations can't safely be guessed and so need to be set. These include the location of the hard drive you want the OS installed onto and the user name you want to use for your account. Until you resolve these issues, you can't proceed with the installation. - -For the hard drive location, you must know which drive you want to erase and re-image with your Linux distribution of choice. This might be an obvious choice on a laptop that has only one drive, to begin with: - -![Screen to select the installation drive][12] - -Select the drive to install the OS to (there's only one drive in this example) - -If you've got more than one drive in your computer, and you only want Linux on one of them, or else you want to treat both drives as one, then you must help the installer understand your goal. It's easiest to assign just one drive to Linux, letting the installer perform automatic partitioning and formatting, but there are plenty of other options for advanced users. - -Your computer must have at least one user, so create a user account for yourself. Once that's done, you can click the **Done** button at last and install Linux. - -![Anaconda options complete and ready for installation][13] - -Anaconda options are complete and you're ready to install - -Other installers can be even simpler, believe it or not, so your experience may differ from the images in this article. No matter what, the install process is one of the easiest operating system installations available outside of getting something pre-installed for you, so don't let the idea of installing an OS intimidate you. This is your computer. You can and should install an OS in which you have ownership. - -### Own your computer - -Ultimately, Linux is your OS. It's an operating system developed by people from all over the world, with one interest at heart: Create a computing culture of participation, mutual ownership, and co-operative stewardship. If you're interested in getting to know open source better, then take the step to know one of its shining examples and install Linux. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/linux-installation - -作者:[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/bash_command_line.png?itok=k4z94W2U (bash logo on green background) -[2]: http://www.linuxfromscratch.org -[3]: https://opensource.com/sites/default/files/anaconda-installer.png -[4]: https://opensource.com/sites/default/files/elementary-installer.png -[5]: http://getfedora.org -[6]: http://linuxmint.com -[7]: http://elementary.io -[8]: https://opensource.com/article/18/7/getting-started-etcherio -[9]: https://opensource.com/sites/default/files/etcher_0.png -[10]: https://opensource.com/sites/default/files/boot-menu.jpg -[11]: https://opensource.com/sites/default/files/bios_1.jpg -[12]: https://opensource.com/sites/default/files/install-harddrive-chooser.png -[13]: https://opensource.com/sites/default/files/anaconda-done.png diff --git a/translated/tech/20210216 How to install Linux in 3 steps.md b/translated/tech/20210216 How to install Linux in 3 steps.md new file mode 100644 index 0000000000..6e50ef1eb6 --- /dev/null +++ b/translated/tech/20210216 How to install Linux in 3 steps.md @@ -0,0 +1,145 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to install Linux in 3 steps) +[#]: via: (https://opensource.com/article/21/2/linux-installation) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +安装 Linux,只需三步 +====== + +> 操作系统的安装看似神秘,但其实很简单。以下是成功安装 Linux 的步骤。 + +![绿色背景的bash标志][1] + +在 2021 年,有更多让人们喜欢 Linux 的理由。在这个系列中,我将分享 21 种使用 Linux 的不同理由。下面是如何安装 Linux。  + +安装一个操作系统(OS)总是令人生畏。对大多数人来说,这是一个难题。安装操作系统不能从操作系统内部进行,因为它要么没有被安装,要么即将被另一个操作系统取代,那么它是如何发生的呢?更糟糕的是,它通常会涉及到硬盘格式、安装目的地、时区、用户名、密码等一系列你通常不会想到的混乱问题。Linux 发行版知道这一点,所以它们多年来一直在努力将你在操作系统安装程序中花费的时间减少到最低限度。 + +### 安装时发生了什么 + +无论你安装的是一个应用程序还是整个操作系统,*安装*的过程只是将文件从一种媒介复制到另一种媒介的一种花哨方式。不管是什么用户界面,还是用动画将安装过程伪装成多么高度专业化的东西,最终都是一回事:曾经存储在光盘或驱动器上的文件被复制到硬盘上的特定位置。 + +当安装的是一个应用程序时,放置这些文件的有效位置被高度限制在你的*文件系统*或你的操作系统知道它可以使用的硬盘驱动器的部分。这一点很重要,因为它可以将硬盘分割成不同的空间(苹果公司在世纪初的 Bootcamp 中使用了这一技巧,允许用户将 macOS 和 Windows 安装到一个硬盘上,但作为单独的实体)。当你安装一个操作系统时,一些特殊的文件会被安装到硬盘上通常是禁区的地方。更重要的是,至少在默认情况下,你的硬盘上的所有现有数据都会被擦除,以便为新系统腾出空间,所以创建一个备份是*必要的*。 + +### 安装程序 + +从技术上讲,你实际上不需要安装程序来安装应用程序甚至操作系统。不管你信不信,有些人通过挂载一块空白硬盘、编译代码并复制文件来手动安装 Linux。这是在一个名为 [Linux From Scratch(LFS)][2] 的项目的帮助下完成的。这个项目旨在帮助爱好者、学生和未来的操作系统设计者更多地了解计算机的工作原理以及每个组件执行的功能。这并不是推荐的安装 Linux 的方法,但你会发现,在开源中,通常是这样的:*如果*有些事情可以做,那么就有人在做。而这也是一件好事,因为这些小众的兴趣往往会带来令人惊讶的有用的创新。 + +假设你不是想对 Linux 进行逆向工程,那么正常的安装方式是使用安装光盘或安装镜像。 + +### 3 个简单的步骤来安装 Linux + +当你从一个 Linux 安装 DVD 或 U 盘启动时,你会置身于一个最小化的操作环境中,这个环境是为了运行一个或多个有用的应用程序。安装程序是最主要的应用程序,但由于 Linux 是一个如此灵活的系统,你通常也可以运行标准的桌面应用程序,以在你决定安装它之前感受一下这个操作系统是什么样子的。 + +不同的 Linux 发行版有不同的安装程序界面。下面是两个例子。 + +Fedora Linux 有一个灵活的安装程序(称为 Anaconda),能够进行复杂的系统配置: + +![Fedora 上的 Anaconda 安装界面][3] + +*Fedora 上的 Anaconda 安装程序* + +Elementary OS 有一个简单的安装程序,主要是为了在个人电脑上安装而设计的: + +![Elementary OS 安装程序][4] + +*Elementary OS 安装程序* + +#### 1、获取安装程序 + +安装 Linux 的第一步是下载一个安装程序。你可以从你选择尝试的发行版中获得一个 Linux 安装镜像。 + + * [Fedora][5] 以率先更新软件而闻名。 + * [Linux Mint][6] 提供了安装缺失驱动程序的简易选项。 + * [Elementary][7] 提供了一个美丽的桌面体验和几个特殊的、定制的应用程序。 + +Linux 安装程序是 `.iso` 文件,是 DVD 介质的“蓝图”。如果你还在使用光学介质,你可以把 `.iso` 文件刻录到 DVD-R 上,或者你可以把它烧录到 USB 驱动器上(确保它是一个空的 USB 驱动器,因为当镜像被烧录到它上时,它的所有内容都会被删除)。要将镜像烧录到 USB 驱动器上,你可以 [使用开源的 Etcher 应用程序][8]。 + +![Etcher 用于烧录 USB 驱动器][9] + +*Etcher 应用程序可以烧录 USB 驱动器。* + +现在你可以安装 Linux 了。 + +#### 2、引导顺序 + +要在电脑上安装操作系统,你必须引导到操作系统安装程序。这对于一台电脑来说并不是常见的行为,因为很少有人这样做。理论上,你只需要安装一次操作系统,然后你就会不断更新它。当你选择在电脑上安装不同的操作系统时,你就中断了这个正常的生命周期。这不是一件坏事。这是你的电脑,所以你有权力对它进行重新规划。然而,这与电脑的默认行为不同,它的默认行为是开机后立即启动到硬盘上找到的任何操作系统。 + +在安装 Linux 之前,你必须备份你在目标计算机上的任何数据,因为这些数据在安装时都会被清除。 + +假设你已经将数据保存到了一个外部硬盘上,然后你将它秘密地存放在安全的地方(而不是连接到你的电脑上),那么你就可以继续了。 + +首先,将装有 Linux 安装程序的 USB 驱动器连接到电脑上。打开电脑电源,观察屏幕上是否有一些如何中断其默认启动序列的指示。这通常是像 `F2`、`F8`、`Esc` 甚至 `Del` 这样的键,但根据你的主板制造商的不同而不同。如果你错过了这个时间窗口,只需等待默认操作系统加载,然后重新启动并再次尝试。 + +当你中断启动序列时,电脑会提示你引导指令。具体来说,嵌入主板的固件需要知道该到哪个驱动器寻找可以加载的操作系统。在这种情况下,你希望计算机从包含 Linux 镜像的 USB 驱动器启动。如何提示你这些信息取决于主板制造商。有时,它会直接问你,并配有一个菜单: + +![引导设备菜单][10] + +*启动设备选择菜单* + +其他时候,你会被带入一个简陋的界面,你可以用来设置启动顺序。计算机通常默认设置为先查看内部硬盘。如果引导失败,它就会移动到 USB 驱动器、网络驱动器或光驱。你需要告诉你的计算机先寻找一个 USB 驱动器,这样它就会绕过自己的内部硬盘驱动器,而引导 USB 驱动器上的 Linux 镜像。 + +![BIOS 选择屏幕][11] + +*BIOS 选择屏幕* + +起初,这可能会让人望而生畏,但一旦你熟悉了界面,这就是一个快速而简单的任务。一旦安装了Linux,你就不必这样做了,因为,在这之后,你会希望你的电脑再次从内部硬盘启动。这是一个很好的技巧,因为它是在 USB 驱动器上使用 Linux 的关键,在安装前测试计算机的 Linux 兼容性,以及无论涉及什么操作系统的一般性故障排除。 + +一旦你选择了你的 USB 驱动器作为引导设备,保存你的设置,让电脑复位,然后启动到 Linux 镜像。 + +#### 3、安装 Linux + +一旦你启动进入 Linux 安装程序,就只需通过提示进行操作。 + +Fedora 安装程序 Anaconda 为你提供了一个“菜单”,上面有你在安装前可以自定义的所有事项。大多数设置为合理的默认值,可能不需要你的互动,但有些则用警示符号标记,表示你的配置不能被安全地猜测,因此需要设置。这些配置包括你想安装操作系统的硬盘位置,以及你想为账户使用的用户名。在你解决这些问题之前,你不能继续安装。 + +对于硬盘的位置,你必须知道你要擦除哪个硬盘,然后用你选择的 Linux 发行版重新写入。对于只有一个硬盘的笔记本来说,这可能是一个显而易见的选择。 + +![选择安装驱动器的屏幕][12] + +*选择要安装操作系统的硬盘(本例中只有一个硬盘)。* + +如果你的电脑里有不止一个硬盘,而你只想在其中一个硬盘上安装 Linux,或者你想把两个硬盘当作一个硬盘,那么你必须帮助安装程序了解你的目标。最简单的方法是只给 Linux 分配一个硬盘,让安装程序执行自动分区和格式化,但对于高级用户来说,还有很多其他的选择。 + +你的电脑必须至少有一个用户,所以要为自己创建一个用户账户。完成后,你可以最后点击 **Done** 按钮,安装 Linux。 + +![Anaconda 选项完成并准备安装][13] + +*Anaconda 选项已经完成,可以安装了* + +其他的安装程序可能会更简单,不管你信不信,所以你看到的可能与本文中的图片不同。无论怎样,除了预装的操作系统之外,这个安装过程都是最简单的操作系统安装之一,所以不要让安装操作系统的想法吓到你。这是你的电脑。你可以也应该安装一个你拥有所有权的操作系统。 + +### 拥有你的电脑 + +最终,Linux 是你的操作系统。它是一个由来自世界各地的人们开发的操作系统,其核心是一个:创造一种参与、共同拥有、合作管理的计算文化。如果你有兴趣更好地了解开源,那么就请你迈出一步,了解它的一个光辉典范,并安装 Linux。 + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/linux-installation + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者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/bash_command_line.png?itok=k4z94W2U (bash logo on green background) +[2]: http://www.linuxfromscratch.org +[3]: https://opensource.com/sites/default/files/anaconda-installer.png +[4]: https://opensource.com/sites/default/files/elementary-installer.png +[5]: http://getfedora.org +[6]: http://linuxmint.com +[7]: http://elementary.io +[8]: https://opensource.com/article/18/7/getting-started-etcherio +[9]: https://opensource.com/sites/default/files/etcher_0.png +[10]: https://opensource.com/sites/default/files/boot-menu.jpg +[11]: https://opensource.com/sites/default/files/bios_1.jpg +[12]: https://opensource.com/sites/default/files/install-harddrive-chooser.png +[13]: https://opensource.com/sites/default/files/anaconda-done.png From d0d5b105b91c147289a383db9266e44ec314f512 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 21 Feb 2021 05:04:25 +0800 Subject: [PATCH 090/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210221=20?= =?UTF-8?q?Not=20Comfortable=20Using=20youtube-dl=20in=20Terminal=3F=20Use?= =?UTF-8?q?=20These=20GUI=20Apps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210221 Not Comfortable Using youtube-dl in Terminal- Use These GUI Apps.md --- ...tube-dl in Terminal- Use These GUI Apps.md | 169 ++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 sources/tech/20210221 Not Comfortable Using youtube-dl in Terminal- Use These GUI Apps.md diff --git a/sources/tech/20210221 Not Comfortable Using youtube-dl in Terminal- Use These GUI Apps.md b/sources/tech/20210221 Not Comfortable Using youtube-dl in Terminal- Use These GUI Apps.md new file mode 100644 index 0000000000..bf7d77d784 --- /dev/null +++ b/sources/tech/20210221 Not Comfortable Using youtube-dl in Terminal- Use These GUI Apps.md @@ -0,0 +1,169 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Not Comfortable Using youtube-dl in Terminal? Use These GUI Apps) +[#]: via: (https://itsfoss.com/youtube-dl-gui-apps/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +Not Comfortable Using youtube-dl in Terminal? Use These GUI Apps +====== + +If you’ve been following us, you probably already know that [youtube-dl project was taken down temporarily by GitHub][1] to comply with a request. + +Considering that it’s now restored and completely accessible, it is safe to say that it not an illegal tool out there. + +It is a very useful command-line tool that lets you [download videos from YouTube][2] and some other websites. [Using youtube-dl][3] is not that complicated but I understand that using commands for such tasks is not everyone’s favorite way. + +The good thing is that there are a few applications that provide GUI frontend for youtube-dl tool. + +### Prerequisites for Using youtube-dl GUI Apps + +Before you try some of the options mentioned below, you may need to have youtube-dl and [FFmpeg][4] installed on your system to be able to download / choose different format to download. + +You can follow our [complete guide on using ffmpeg][5] to set it up and explore more about it. + +To install [youtube-dl][6], you can type in the following commands in your Linux terminal: + +``` +sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl +``` + +Once you download the latest version, you just need to make it executable and ready for use by typing in: + +``` +sudo chmod a+rx /usr/local/bin/youtube-dl +``` + +You can also follow the [official setup instructions][7] if you need other methods to install it. + +### Youtube-dl GUI Apps + +Most download managers on Linux also allow you to download videos from YouTube and other websites. However, the youtube-dl GUI apps might have additional options like extracting only audio or downloading the videos in a particular resolution and video format. + +Do note that the list below is in no particular order of ranking. You may choose what suits your requirements. + +#### 1\. AllTube Download + +![][8] + +**Key Features:** + + * Web GUI + * Open-Source + * Self-host option + + + +AllTube is an open-source web GUI that you can access by visiting + +If you choose to utilize this, you do not need to install youtube-dl or ffmpeg on your system. It offers a simple user interface where you just have to paste the URL of the video and then proceed to choose your preferred file format to download. You can also choose to deploy it on your server. + +Do note that you cannot extract the MP3 file of a video using this tool, it is only applicable for videos. You can explore more about it through their [GitHub page][9]. + +[AllTube Download Web GUI][10] + +#### 2\. youtube-dl GUI + +![][11] + +**Key Features:** + + * Cross-platform + * Displays estimated download size + * Audio and video download option available + + + +A useful cross-platform GUI app made using electron and node.js. You can easily download both audio and video along with the option to choose various file formats available. + +You also get the ability to download parts of a channel or playlist, if you want. The estimated download size definitely comes in handy especially if you are downloading high quality video files. + +As mentioned, it is also available for Windows and macOS. And, you will get an AppImage file available for Linux in its [GitHub releases][12]. + +[Youtube-dl GUI][13] + +#### 3\. Videomass + +![][14] + +**Key Features:** + + * Cross-platform + * Convert audio/video format + * Multiple URLs supported + * Suitable for users who also want to utilize FFmpeg + + + +If you want to download video or audio from YouTube and also convert them to your preferred format, Videomass can be a nice option. + +To make this work, you need both youtube-dl and ffmpeg installed on your system. You can easily add multiple URLs to download and also set the output directory as you like. + +![][15] + +You also get some advanced settings to disable youtube-dl, change file preferences, and a few more handy options as you explore. + +It offers a PPA for Ubuntu users and an AppImage file for any other Linux distribution. Explore more about it in its [GitHu][16][b][16] [page][16]. + +[Videomass][17] + +#### Additional Mention: Haruna Video Player + +![][18] + +**Key Features:** + + * Play/Stream YouTube videos + + + +Haruna video player is originally a front-end for [MPV][19]. Even though you cannot download YouTube videos using it, you can watch/stream YouTube videos through youtube-dl. + +You can explore more about the video player in our [original article][20] about it. + +### Wrapping Up + +Even though you may find more youtube-dl GUIs on GitHub and other platforms, most of them do not function well and end up showing multiple errors or aren’t actively developed anymore. + +[Tartube][21] is one such option that you can try, but it may not work as expected. I tested it with Pop!_OS and on Ubuntu MATE 20.04 (fresh install). Every time I try to download something, it fails, no matter what I do (even with youtube-dl and ffmpeg installed in the system). + +So, my personal favorite seems to be the web GUI ([AllTube Download][9]) that does not depend on anything installed on your system and can be self-hosted as well. + +Let me know in the comments what works for you best and if I’ve missed any of your favorite options. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/youtube-dl-gui-apps/ + +作者:[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/youtube-dl-github-takedown/ +[2]: https://itsfoss.com/download-youtube-videos-ubuntu/ +[3]: https://itsfoss.com/download-youtube-linux/ +[4]: https://ffmpeg.org/ +[5]: https://itsfoss.com/ffmpeg/#install +[6]: https://youtube-dl.org/ +[7]: https://ytdl-org.github.io/youtube-dl/download.html +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/alltube-download.jpg?resize=772%2C593&ssl=1 +[9]: https://github.com/Rudloff/alltube +[10]: https://alltubedownload.net/ +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/youtube-dl-gui.jpg?resize=800%2C548&ssl=1 +[12]: https://github.com/jely2002/youtube-dl-gui/releases/tag/v1.8.7 +[13]: https://github.com/jely2002/youtube-dl-gui +[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/videomass.jpg?resize=800%2C537&ssl=1 +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/videomass-1.jpg?resize=800%2C542&ssl=1 +[16]: https://github.com/jeanslack/Videomass +[17]: https://jeanslack.github.io/Videomass/ +[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/01/haruna-video-player-dark.jpg?resize=800%2C512&ssl=1 +[19]: https://mpv.io/ +[20]: https://itsfoss.com/haruna-video-player/ +[21]: https://github.com/axcore/tartube From 8737ac9e42040b73dc37cead011fd3e7156d444c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 21 Feb 2021 05:04:48 +0800 Subject: [PATCH 091/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210220=20?= =?UTF-8?q?Run=20your=20favorite=20Windows=20applications=20on=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210220 Run your favorite Windows applications on Linux.md --- ... favorite Windows applications on Linux.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sources/tech/20210220 Run your favorite Windows applications on Linux.md diff --git a/sources/tech/20210220 Run your favorite Windows applications on Linux.md b/sources/tech/20210220 Run your favorite Windows applications on Linux.md new file mode 100644 index 0000000000..dbc1b80f17 --- /dev/null +++ b/sources/tech/20210220 Run your favorite Windows applications on Linux.md @@ -0,0 +1,99 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Run your favorite Windows applications on Linux) +[#]: via: (https://opensource.com/article/21/2/linux-wine) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +Run your favorite Windows applications on Linux +====== +WINE is an open source project that helps many Windows applications run +on Linux as if they were native programs. +![Computer screen with files or windows open][1] + +In 2021, there are more reasons why people love Linux than ever before. In this series, I'll share 21 different reasons to use Linux. Here's how switching from Windows to Linux can be made seamless with WINE. + +Do you have an application that only runs on Windows? Is that one application the one and only thing holding you back from switching to Linux? If so, you'll be happy to know about WINE, an open source project that has all but reinvented key Windows libraries so that applications compiled for Windows can run on Linux. + +WINE stands for "Wine Is Not an Emulator," which references the code driving this technology. Open source developers have worked since 1993 to translate any incoming Windows API calls an application makes to [POSIX][2] calls. + +This is an astonishing feat of programming, especially given that the project operated independently, with no help from Microsoft (to say the least), but there are limits. The farther an application strays from the "core" of the Windows API, the less likely it is that WINE could have anticipated its requests. There are vendors that may make up for this, notably [Codeweavers][3] and [Valve Software][4]. There's no coordination between the producers of the applications requiring translation and the people and companies doing the translation, so there can be some lag time between, for instance, an updated software title and when it earns a "gold" status from [WINE headquarters][5]. + +However, if you're looking to run a well-known Windows application on Linux, the chances are good that WINE is ready for it. + +### Installing WINE + +You can install WINE from your Linux distribution's software repository. On Fedora, CentOS Stream, or RHEL: + + +``` +`$ sudo dnf install wine` +``` + +On Debian, Linux Mint, Elementary, and similar: + + +``` +`$ sudo apt install wine` +``` + +WINE isn't an application that you launch on its own. It's a backend that gets invoked when a Windows application is launched. Your first interaction with WINE will most likely occur when you launch the installer of a Windows application. + +### Installing an application + +[TinyCAD][6] is a nice open source application for designing circuits, but it's only available for Windows. While it is a small application, it does incorporate some .NET components, so that ought to stress test WINE a little. + +First, download the installer for TinyCAD. As is often the case for Windows installers, it's a `.exe` file. Once downloaded, double-click the file to launch it. + +![WINE TinyCAD installation wizard][7] + +WINE installation wizard for TinyCAD + +Step through the installer as you would on Windows. It's usually best to accept the defaults, especially where WINE is concerned. The WINE environment is largely self-contained, hidden away on your hard drive in a **drive_c** directory that gets used by a Windows application as the fake root directory of the file system. + +![WINE TinyCAD installation and destination drive][8] + +WINE TinyCAD destination drive + +Once it's installed, the application usually offers to launch for you. If you're ready to test it out, launch the application. + +### Launching a Windows application + +Aside from the first launch immediately after installation, you normally launch a WINE application the same way as you launch a native Linux application. Whether you use an applications menu or an Activities screen or just type the application's name into a runner, desktop Windows applications running in WINE are treated essentially as native applications on Linux. + +![TinyCAD running with WINE][9] + +TinyCAD running with WINE support + +### When WINE fails + +Most applications I run in WINE, TinyCAD included, run as expected. There are exceptions, however. In those cases, you can either wait a few months to see whether WINE developers (or, if it's a game, Valve Software) manage to catch up, or you can contact a vendor like Codeweavers to find out whether they sell support for the application you require. + +### WINE is cheating, but in a good way + +Some Linux users feel that if you use WINE, you're "cheating" on Linux. It might feel that way, but WINE is an open source project that's enabling users to switch to Linux and still run required applications for their work or hobbies. If WINE solves your problem and lets you use Linux, then use it, and embrace the flexibility of Linux. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/linux-wine + +作者:[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/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open) +[2]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[3]: https://www.codeweavers.com/crossover +[4]: https://github.com/ValveSoftware/Proton +[5]: http://winehq.org +[6]: https://sourceforge.net/projects/tinycad/ +[7]: https://opensource.com/sites/default/files/wine-tinycad-install.jpg +[8]: https://opensource.com/sites/default/files/wine-tinycad-drive_0.jpg +[9]: https://opensource.com/sites/default/files/wine-tinycad-running.jpg From d45031f660b140e41c6dfd6ecdcd691974c22bc8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 21 Feb 2021 10:04:26 +0800 Subject: [PATCH 092/818] =?UTF-8?q?=E8=B6=85=E6=9C=9F=E5=9B=9E=E6=94=B6?= =?UTF-8?q?=EF=BC=8C=E8=BF=87=E6=9C=9F=E5=9B=9E=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2019 年文章清理 --- ...w You Can Download MX Linux KDE Edition.md | 91 - ...formance of Kubernetes apps over SD-WAN.md | 66 - ...5.20 is Here With Exciting Improvements.md | 122 -- ...atter- A guide for open source projects.md | 95 -- ...acher goes to an open source conference.md | 68 - ...ense scenarios and how to navigate them.md | 59 - .../20190131 OOP Before OOP with Simula.md | 203 --- ... dead- Long live Config Management Camp.md | 118 -- ... to becoming an awesome agile developer.md | 82 - ... open source communities have in common.md | 64 - ... Top 5 podcasts for Linux news and tips.md | 80 - ...ting has changed and what matters today.md | 99 -- ...rks openly to make education accessible.md | 136 -- ...5 Teaching scientists how to share code.md | 72 - ...-s happening in the OpenStack community.md | 73 - .../20190306 How to pack an IT travel kit.md | 100 -- ...Small Scale Scrum vs. Large Scale Scrum.md | 106 -- ...0313 Why is no one signing their emails.md | 104 -- ...ack, not metrics, is critical to DevOps.md | 84 - ... ethical debt in AI product development.md | 148 -- ... (or, How I Find Good, Boring Software).md | 100 -- ...anaging changes in open source projects.md | 97 -- ...ition into a Developer Relations career.md | 74 - ...ential process we-re ignoring in DevOps.md | 115 -- ... Why do organizations have open secrets.md | 77 - .../20190331 Codecademy vs. The BBC Micro.md | 145 -- ...ow Kubeflow is evolving without ksonnet.md | 62 - ...ence curricula as adaptable as our code.md | 72 - sources/talk/20190405 D as a C Replacement.md | 247 --- ...perfect antennas, greater data capacity.md | 69 - ...415 Nyansa-s Voyance expands to the IoT.md | 75 - ...nd simplify your data-driven operations.md | 59 - ...190416 What SDN is and where it-s going.md | 146 -- ...ing up confusion between edge and cloud.md | 69 - ...RAM and Optane into massive memory pool.md | 58 - ... know future of IoT- Ask the developers.md | 119 -- ...n-air- 5G network research gets funding.md | 64 - ...d open source - The new wave for SD-WAN.md | 186 --- ...w data storage will shift to blockchain.md | 70 - ...livery still isn-t ready for prime time.md | 91 - ...ng D-s Garbage Collection with Bpftrace.md | 412 ----- ...- Finding success with edge deployments.md | 73 - ...d quarter puts pressure on data centers.md | 92 - ...ion technique could slash compute costs.md | 65 - .../20190507 SD-WAN is Critical for IoT.md | 74 - ...ome IT pros say they have too much data.md | 66 - ...t all cloud providers are created equal.md | 83 - ... makers rely on cloud providers for IoT.md | 53 - ...Part 1- SD-WAN with 4G LTE is a Reality.md | 64 - ...xtreme addresses networked-IoT security.md | 71 - ... 5G be the first carbon-neutral network.md | 88 - ...e rise in open-source IP routing suites.md | 140 -- ...mpanies want solutions in these 4 areas.md | 119 -- ...rise IoT enters the mass-adoption phase.md | 78 - ...ay be the coolest-dumbest IoT idea ever.md | 97 -- ... of forthcoming Epyc 2 processor leaked.md | 55 - ...kchain-nodes speed up data transmission.md | 74 - ...rks all companies should try to achieve.md | 80 - ...rprise IoT transactions are unencrypted.md | 93 -- .../20190528 Analysing D Code with KLEE.md | 680 -------- ...Managed WAN and the cloud-native SD-WAN.md | 121 -- ...528 Moving to the Cloud- SD-WAN Matters.md | 69 - ...ernet possible by year-end, says SpaceX.md | 63 - ...ot, but satisfaction with telcos is not.md | 69 - ...- HPE Simplivity With Composable Fabric.md | 28 - ... IoT security, Microsoft leans into IoT.md | 71 - ...time for the IoT to -optimize for trust.md | 102 -- ...omplex despite promises to the contrary.md | 64 - ...ng to the Cloud- SD-WAN Matters- Part 2.md | 66 - sources/talk/20190604 Why Emacs.md | 94 -- ...ion of application delivery controllers.md | 67 - ...rage, persistent memory is here to stay.md | 118 -- ...arning sensor chips won-t need networks.md | 82 - ...nology won-t meet today-s support needs.md | 53 - ...s to make enterprise IoT cost effective.md | 89 - ... IT shops that train AI models are huge.md | 68 - ...ty vs. privacy- Which is a bigger issue.md | 95 -- ...(SDP)- Creating a new network perimeter.md | 121 -- ...uld sell spare UPS capacity to the grid.md | 59 - ... 5 transferable higher-education skills.md | 64 - ...edictions about 5G networks and devices.md | 82 - ...ments aren-t as effective as you-d like.md | 144 -- ...lesforce becomes a hybrid cloud company.md | 67 - ...xpand healthcare, with 5G in the offing.md | 85 - ...ppear in Intel-s grip on supercomputing.md | 63 - ...d cloud-s status as the cloud of choice.md | 77 - sources/talk/20190630 Data Still Dominates.md | 100 -- ...ation Performance as well as Resiliency.md | 49 - ...internet of disposable things is coming.md | 92 - ...ns in Vendor Lock-in- Google and Huawei.md | 58 - ...lities buck the cloud-data-center trend.md | 96 -- ...iness Success in Digital Transformation.md | 79 - ...player in the edge computing revolution.md | 112 -- ...r IoT concepts reveal creaking networks.md | 79 - ...re makers shift production out of China.md | 73 - ...e computing is driving a new era of CDN.md | 107 -- ...internet should be all software-defined.md | 73 - ...st DNS attacks and how to mitigate them.md | 151 -- ... may soon recycle heat into electricity.md | 67 - ...the IoT grows, so do its threats to DNS.md | 78 - ...to the IoT, Wi-Fi has the best security.md | 88 - ...90725 IoT-s role in expanding drone use.md | 61 - ...- Smart-city IoT isn-t smart enough yet.md | 73 - ...gement a weak area for most enterprises.md | 82 - ...torage spec enters final review process.md | 71 - ...fer a live demo to be perfect or broken.md | 82 - ...y On A 50 MB Budget - Smashing Magazine.md | 538 ------ ... Bridging the gap on network complexity.md | 107 -- ... m-learning- Open education-s next move.md | 87 - ...afety sensors and tracking rent-a-bikes.md | 72 - ...ailure is a feature in blameless DevOps.md | 77 - ...obots may soon swarm the industrial IoT.md | 85 - ...mni-Path networking fabric architecture.md | 62 - .../talk/20190806 Is Perl going extinct.md | 62 - ...n open source alternative to Salesforce.md | 249 --- ...N Transformation- It-s More Than SD-WAN.md | 103 -- ...ear of failure is a silent DevOps virus.md | 91 - ...ata transmission revolution is underway.md | 67 - ...esses today-s network security concerns.md | 99 -- ...ce of IT and OT networking and security.md | 73 - ...ue energy might be the perfect solution.md | 73 - ...hroughs bring a quantum Internet closer.md | 64 - ...loud isn-t killing open source software.md | 88 - ...ack to School- Your SD-WAN Reading List.md | 102 -- ...ut shadow IT. Shadow IoT is much worse..md | 82 - ... had the greatest impact on your career.md | 81 - ...efined perimeter - the essence of trust.md | 137 -- ...ips for leading a cross-functional team.md | 155 -- ...20190827 Why Spinnaker matters to CI-CD.md | 104 -- ...ecific AI completes tasks twice as fast.md | 59 - ...s to gauge their impact on your network.md | 81 - ...innovate thanks to open source hardware.md | 69 - ...20190830 7 rules for remote-work sanity.md | 94 -- ...le in the industrial internet of things.md | 113 -- ...2 Top take-aways from DevOps World 2019.md | 76 - ...r important considerations on community.md | 65 - ...de to human communication for sysadmins.md | 60 - ... about Linux nerds and the web that was.md | 71 - ...falls to avoid when implementing DevOps.md | 126 -- ...volution, revolution and radical change.md | 106 -- ...m sends excess building heat into space.md | 66 - ...en source your academic work in 7 steps.md | 114 -- ...0190911 How Linux came to the mainframe.md | 67 - ..., use segmentation instead of firewalls.md | 66 - ...s to handle transient faults for DevOps.md | 147 -- ...al WAN- Moving closer to the enterprise.md | 120 -- ...ill work- Terahertz-to-fiber conversion.md | 62 - ...ain is Your Best Bet for Cyber Security.md | 105 -- ...under of Apache is all-in on blockchain.md | 88 - ...strategies to simplify complex networks.md | 75 - ...Cloud Billing Can Benefit Your Business.md | 63 - ...teps to developing psychological safety.md | 120 -- ...17 How Ansible brought peace to my home.md | 138 -- ...fraud- Is there an open source solution.md | 107 -- ...Things to Communicate Over the Internet.md | 143 -- ...ommunity-led renaissance of open source.md | 79 - ...ication Edge Must Converge in the Cloud.md | 77 - ...19 Linux on the mainframe- Then and now.md | 71 - ...rnet service closer to becoming reality.md | 83 - ...mi Device with the Pixel Experience ROM.md | 213 --- ... it, own it with full-service ownership.md | 86 - ...90920 How to decommission a data center.md | 134 -- ...ghts- Jeff Bezos Top 5 Tips for Success.md | 56 - ...20190921 How spicy should a jalapeno be.md | 79 - ... Trajectory of Open Source Technologies.md | 67 - ... Simulating Smart Cities with CupCarbon.md | 100 -- ...t Are Revolutionizing the Finance Space.md | 86 - ...ler mmWave architecture can connect IoT.md | 74 - ...5 The 10 most powerful companies in IoT.md | 79 - ...Hippocratic License and the Controversy.md | 143 -- ...le Open Source M2M Development Platform.md | 114 -- .../20190926 How to contribute to GitLab.md | 111 -- ...e takeaways from 10 years of DevOpsDays.md | 146 -- ...ear will increasingly move off-premises.md | 55 - .../20190927 How to contribute to Fedora.md | 99 -- ...does an open source AI future look like.md | 95 -- ...e Software Lets Us Push It to the Limit.md | 77 - ...he currency of influence in open source.md | 90 - ...essages private with an open source app.md | 100 -- ...Tips to Secure Your Mobile Applications.md | 89 - ...P- A Communication Protocol for the IoT.md | 99 -- ...GBox Pro Mini PC Review for Linux Users.md | 117 -- ...looks for new NICs to speed up networks.md | 62 - ... Quantum computing, the open source way.md | 62 - ... Edge (SASE)- A reflection of our times.md | 130 -- ... IoT can Work Together to Improve Lives.md | 85 - ...dden Force behind Swift App Development.md | 57 - .../20191007 DevOps is Eating the World.md | 71 - ...platform and open culture at Greenpeace.md | 117 -- ...xpanding IoT Innovation In India Market.md | 87 - ...t to Become a Machine Learning Engineer.md | 76 - ...mate challenges call for open solutions.md | 111 -- ...ining-the-Internet project gets funding.md | 73 - ...hat is it and why you-ll use it one day.md | 108 -- ...spectives of an American Anthropologist.md | 66 - ...inux- The story of Jupiter Broadcasting.md | 94 -- ...w the oil and gas industry exploits IoT.md | 55 - ...urce Tools and Concepts in IoT Security.md | 170 -- ... Integration of Enterprise Applications.md | 148 -- ... Pros and cons of event-driven security.md | 160 -- ... it makes wireless communication faster.md | 106 -- ... of Edge Analytics in the IoT Ecosystem.md | 93 -- ...ware-defined data center drives agility.md | 102 -- ...s leadership on diversity and inclusion.md | 135 -- ... center liquid-cooling to gain momentum.md | 75 - ... district tackles network modernization.md | 88 - ...Mware on AWS gets an on-premises option.md | 83 - ...19 To space and beyond with open source.md | 77 - ...0 Project Trident Ditches BSD for Linux.md | 85 - ...ames- blockchain and containerized apps.md | 71 - ...utomates configuration of lab test-beds.md | 84 - ...OSS community to billion-dollar darling.md | 80 - ... infrastructure trends you need to know.md | 104 -- ...g Service is Having Troubles with Linux.md | 85 - ...23 IT-as-a-Service Simplifies Hybrid IT.md | 68 - ...S Transformed the WANs of 4 IT Managers.md | 92 - .../20191023 Psst- Wanna buy a data center.md | 76 - ...Things to Communicate Over the Internet.md | 141 -- ...can have a say in what agile looks like.md | 89 - ...020 at the top IT-changing technologies.md | 122 -- ...hy introduce people to the Raspberry Pi.md | 55 - ...dge (SASE) is being driven by necessity.md | 124 -- ...y demos petabit-per-second network node.md | 69 - ...8 Building trust in the Linux community.md | 83 - ...volving into Secure Access Service Edge.md | 93 -- ...) ways to influence your open community.md | 91 - ... IoT chief- AI can broaden IoT services.md | 64 - ...-s Eye View of Big Data for Enterprises.md | 62 - ... Enterprise Network Management Software.md | 67 - ...ess noise protocol can extend IoT range.md | 73 - ...iers want to rule IoT by simplifying it.md | 104 -- ...n finally delivers its answer to Optane.md | 63 - ...1101 Product vs. project in open source.md | 85 - ...1 Retro computing with FPGAs and MiSTer.md | 166 -- ...w United Nations open source initiative.md | 56 - ...ta Scientists be Replaced by Automation.md | 66 - ...ution to open source- Impostor Syndrome.md | 76 - ...olutions Support Digital Transformation.md | 107 -- ...-s Eye View of Big Data for Enterprises.md | 69 - ...AI and 5G- Entering a new world of data.md | 94 -- ...ntation challenges on a massive project.md | 155 -- ...ester- Edge computing is about to bloom.md | 61 - ...sts taught me about playful development.md | 100 -- ...High Performance Computing Applications.md | 152 -- ...tive for product information management.md | 130 -- ...Using Binary Space Partitioning in Doom.md | 173 -- ...to open source- Make a fork of the repo.md | 50 - ...kes to Be a Successful Network Engineer.md | 78 - ...ce contribution- Keep the code relevant.md | 51 - ...tribution- Talk about your pull request.md | 45 - ...e using open source to attract students.md | 209 --- ...ools-Latest Tools to Use in Programming.md | 85 - ...N- Avoid these Pitfalls, Say IT Leaders.md | 93 -- ...ies teach us about empowering customers.md | 75 - ...stomer experience with agile principles.md | 110 -- ...ven servers to speed package processing.md | 60 - ...wer could beam electricity where needed.md | 65 - ...ujitsu Arm processor for supercomputers.md | 66 - ...a technical writer in the age of DevOps.md | 73 - ...al growth opportunities for open source.md | 99 -- ... IoT in 2020- The awkward teenage years.md | 96 -- ...ld I Choose a Managed WordPress Hosting.md | 87 - ...give rise to security-driven networking.md | 105 -- ...nternet Breakout but Pose Security Risk.md | 58 - ... open source projects to keep an eye on.md | 102 -- ...again) with GPU and cross-processor API.md | 80 - ... What makes a programming exercise good.md | 158 -- ... its network-centric Linux distribution.md | 64 - ...ors must have two radios for efficiency.md | 71 - ...nderstanding of open source in business.md | 115 -- ...re your data center for AI-s power draw.md | 142 -- ...y to becoming an open source maintainer.md | 251 --- ...ding products from open source projects.md | 124 -- ...ow cloud providers- performance differs.md | 88 - ...g the network and security architecture.md | 138 -- .../talk/20191127 Is your code inclusive.md | 70 - ...o we contribute to open source software.md | 97 -- ...ption across the client base at Infosys.md | 109 -- ... story- Covering open source in Spanish.md | 111 -- ... an 80-core Arm processor for the cloud.md | 70 - ...up to customers (and why it-s worth it).md | 82 - ...tum computing crowd with Braket testbed.md | 62 - ...hat doesn-t require electronics cooling.md | 85 - ...tate of blockchain and where it-s going.md | 90 - ... 5G in 2020- Still just a private party.md | 77 - ...ers in 2020- Automation, cheaper memory.md | 132 -- ...gets migrating legacy apps from on-prem.md | 87 - ...rtups on how to run the open source way.md | 103 -- ...ating our mission statement in the open.md | 106 -- ...Passive optical LAN- Its day is dawning.md | 91 - ... optical networking- Its day is dawning.md | 91 - ...ud to Escape Public Cloud Data Grabbity.md | 59 - ... computing are featured at Gartner show.md | 69 - ...rity vendors and their SD-WAN offerings.md | 136 -- ...1213 Space-data-as-a-service gets going.md | 83 - ...-data-as-a-service prepares to take off.md | 82 - ...-s hot at the edge for 2020- Everything.md | 119 -- ...for onboarding open source contributors.md | 192 --- ...ns when buying network-automation tools.md | 93 -- ...es the shift to a hybrid cloud strategy.md | 64 - ... than reviewing logs and parsing events.md | 126 -- ... Populating the globe with open leaders.md | 77 - ...Cisco- 5 hot networking trends for 2020.md | 135 -- ...er motherboards for greater performance.md | 68 - ... We Need Interoperable Service Identity.md | 59 - ... a business with open source- Top reads.md | 63 - ... organization- Top 10 reads for leaders.md | 89 - ...iend- The Facebook That Could Have Been.md | 236 --- ...nalyze your system with perf and Python.md | 1479 ----------------- ...ystemd-nspawn for Linux system recovery.md | 148 -- ... an email server, part 1- The Forwarder.md | 224 --- ...n Local And Google Drive from Linux CLI.md | 239 --- ...0107 How to manage your media with Kodi.md | 303 ---- .../tech/20190107 Testing isn-t everything.md | 135 -- ...ackage names like base, util, or common.md | 57 - ...ting deployment strategies with Ansible.md | 152 -- ...ld a retro gaming console with RetroPie.md | 82 - ...Library To Put All Games Under One Roof.md | 139 -- ...Dictionary And Vocabulary Building Tool.md | 239 --- ...nce (Virtual Machine) from Command line.md | 149 -- ...container image builder for researchers.md | 121 -- ... A flexible solution to web-based media.md | 108 -- ...line reverse Polish notation calculator.md | 128 -- ...tora for your open source documentation.md | 208 --- ...te error handling by eliminating errors.md | 204 --- ...20190129 A few early marketing thoughts.md | 164 -- ...all notebook for a system administrator.md | 552 ------ ...-wide Proxy Settings Easily And Quickly.md | 309 ---- ...u wouldn-t name your pets -dog- or -cat.md | 83 - ...he Linux Company That Once Ruled NASDAQ.md | 147 -- ...de is an Awesome 16-bit Sci-Fi RPG Game.md | 98 -- ... 5 open source network monitoring tools.md | 125 -- ... Disk And Hard Drive Partition On Linux.md | 435 ----- ...20190205 5 Linux GUI Cloud Backup Tools.md | 251 --- ...letely fair process scheduling in Linux.md | 122 -- ... Video Editing Tools and a Refreshed UI.md | 96 -- ... Debian System Administrator-s Handbook.md | 133 -- .../20190211 How does rootless Podman work.md | 107 -- ...of swap space for a modern Linux system.md | 68 - ...Top 10 Best Linux Media Server Software.md | 229 --- ...17 Organizing this blog into categories.md | 155 -- ...t started and organized with TiddlyWiki.md | 156 -- ...ow To Restore Sudo Privileges To A User.md | 194 --- sources/tech/20190220 Automation evolution.md | 81 - ... Riot Releases its First Stable Version.md | 99 -- ...ring- Defense against surprise downtime.md | 126 -- ...es Around Tux- Our Lovable Linux Mascot.md | 141 -- ...ves Your Old Laptop with Windows- Looks.md | 192 --- ...s Integrated With Active Directory (AD).md | 177 -- ...lay Weather Information in Ubuntu 18.04.md | 290 ---- ...ource behavior-driven development tools.md | 83 - ...ight Distro with an Old-School Approach.md | 161 -- ... you need to know about Ansible modules.md | 311 ---- ...containers in unprivileged environments.md | 133 -- ...- on Raspberry Pi 3- -For DIY Enthusiasts.md | 134 -- ...ting started with the Geany text editor.md | 141 -- ...ation stack of the future with rust-vmm.md | 76 - ...2 BackBox Linux for Penetration Testing.md | 200 --- ...n Source Edition- An Interesting Laptop.md | 93 -- ...l Rats is an Enjoyable Bike-Combat Game.md | 95 -- ...ssessing the Value Creation of Startups.md | 56 - ...lash Booting your Raspberry Pi on Linux.md | 182 -- ...te portable documents with CBZ and DjVu.md | 317 ---- ...a Modern Throwback to the Underdog Days.md | 125 -- ...20190315 New zine- Bite Size Networking.md | 100 -- ...braries by calling Rust from JavaScript.md | 176 -- ...stall MEAN.JS Stack In Ubuntu 18.04 LTS.md | 266 --- ...e- Released with Significant Improvements.md | 108 -- ...To Use Calculator In Linux Command Line.md | 342 ---- ...To Set Up a Firewall with GUFW on Linux.md | 365 ---- ...senger client- Alternatives to WhatsApp.md | 97 -- ...h Jaeger to build an Istio service mesh.md | 157 -- ...top Music Player for Streaming Services.md | 186 --- ... ways to jumpstart productivity at work.md | 96 -- ...Setup Linux Media Server Using Jellyfin.md | 268 --- ...w to use Spark SQL- A hands-on tutorial.md | 540 ------ ...9 Raspberry Pi Rival for AI Development.md | 98 -- ... Top 10 New Linux SBCs to Watch in 2019.md | 101 -- ...Install OpenLDAP on Ubuntu Server 18.04.md | 205 --- ...p Fedora Silverblue as a gaming station.md | 100 -- ...5 Backup on Fedora Silverblue with Borg.md | 314 ---- ...e Fedora Test Day for Fedora Modularity.md | 50 - ...urce Is Accelerating NFV Transformation.md | 77 - ...sadmin toil with Kubernetes controllers.md | 166 -- ...e look at an IIoT-powered smart factory.md | 74 - ...nging Kubernetes to the bare-metal edge.md | 72 - ...Drivers Show Maturity of the Technology.md | 65 - ...326 How to use NetBSD on a Raspberry Pi.md | 229 --- ... Retailer is Turning to the Edge for CX.md | 52 - ...Why are monoidal categories interesting.md | 134 -- ...eaponize fledgling technology companies.md | 66 - ...0327 How to make a Raspberry Pi gamepad.md | 235 --- ...l user experience (UX) in IoT platforms.md | 126 -- ...nergy use and Volkswagen teams with AWS.md | 71 - ...face to run WebAssembly outside the web.md | 347 ---- ...CIe is poised to overtake SATA for SSDs.md | 85 - ...ils to consider data from IoT equipment.md | 65 - ...icrosoft introduces Azure Stack for HCI.md | 63 - ...ss spectrum for enterprise LTE networks.md | 68 - ...tail are Real- and so is Edge Computing.md | 48 - ...ow to submit a bug report with Bugzilla.md | 102 -- ...emands access to VPN providers- servers.md | 77 - ... tests for replaying production traffic.md | 176 -- ... security into its Network-as-a-Service.md | 87 - ...- Simplify and Consolidate the WAN Edge.md | 103 -- ...ls for Achieving Resiliency at the Edge.md | 83 - ...90402 Automate password resets with PWM.md | 94 -- ...tall and Configure Plex on Ubuntu Linux.md | 202 --- ...family targets data-intensive workloads.md | 103 -- ...sitories- How to enable or disable them.md | 189 --- ...ero-trust- microsegmentation networking.md | 137 -- ...s an epic response to AMD-s server push.md | 78 - ...uter -1- It-s Time for a Router Refresh.md | 101 -- ...velopers should know about Selenium IDE.md | 158 -- ... and Partnerships Can Help Deliver Them.md | 72 - ...ols for teaching young children to read.md | 97 -- ...a Linux Desktop to Your OpenLDAP Server.md | 190 --- ...N- VMware-s vision for the network edge.md | 114 -- ... Dracut, and the Dracut Emergency Shell.md | 135 -- ...outing (PBR) - The gold rush for SD-WAN.md | 129 -- .../20190409 AI Ops- Let the data talk.md | 66 - ...iper opens SD-WAN service for the cloud.md | 80 - ...To A Specific Parent Directory In Linux.md | 149 -- ... takes to become a blockchain developer.md | 204 --- ...able serverless computing in Kubernetes.md | 136 -- ... contribute to open source without code.md | 73 - ...s of leadership in an open organization.md | 103 -- ...ing Small Scale Scrum in the real world.md | 57 - ...sters with Krita, Scribus, and Inkscape.md | 131 -- ... How libraries are adopting open source.md | 71 - .../20190412 Joe Doss- How Do You Fedora.md | 122 -- ...rosoft Exchange from your Linux Desktop.md | 100 -- ...f, ethics in open source, and more news.md | 75 - ...w to use Ansible to document procedures.md | 132 -- ... different countries with open hardware.md | 119 -- ...with Calculist- Ideas, events, and more.md | 120 -- ...mmand-line playgrounds with WebAssembly.md | 196 --- ...ional change- A guide for the perplexed.md | 167 -- ...erry- A Fork of Clementine Music Player.md | 132 -- ...0190425 Debian has a New Project Leader.md | 106 -- .../20190426 NomadBSD, a BSD for the Road.md | 125 -- .../tech/20190429 Awk utility in Fedora.md | 177 -- ... license compliance with ClearlyDefined.md | 99 -- ...f the Breaking the Code electronic book.md | 62 - ...r your System Drive using Software RAID.md | 306 ---- ...Open Source CRM Takes Aim At Salesforce.md | 105 -- ...Encrypted Tool to Support Press Freedom.md | 85 - ...ion Installation Guide with Screenshots.md | 207 --- ...(and Star Trek) inspired real life tech.md | 93 -- ...-Review- Void Linux, a Linux BSD Hybrid.md | 136 -- ...To Check Your Current Runlevel In Linux.md | 183 -- ...To Navigate Directories Faster In Linux.md | 350 ---- ... to build SELinux policy for containers.md | 199 --- .../20190507 Prefer table driven tests.md | 521 ------ ...top- A look at Fedora 30-s new features.md | 140 -- ...pen source performance engineering team.md | 138 -- ...xchange rate data with ExchangeRate-API.md | 162 -- ...) 8 Installation Steps with Screenshots.md | 256 --- ...ardware products for the great outdoors.md | 96 -- ... source project alive when people leave.md | 180 -- ... on RHEL 8 Server Using DVD or ISO File.md | 164 -- ...siness documents with OpenAS2 on Fedora.md | 153 -- ...0190514 Why bother writing tests at all.md | 93 -- ...anage access control lists with Ansible.md | 139 -- ...ntent with a headless management system.md | 113 -- ...516 System76-s secret sauce for success.md | 71 - ...g Enarx for running sensitive workloads.md | 83 - .../20190519 The three Rs of remote work.md | 65 - ...g And Distributed Applications -Part 11.md | 88 - ...Against Physical Disk And LUNs In Linux.md | 229 --- ...ow CPUs work so I simulated one in code.md | 174 -- ...n- Antergos Linux has been Discontinued.md | 103 -- ...nsible Galaxy Roles in Ansible Playbook.md | 193 --- ...23 Testing a Go-based S2I builder image.md | 222 --- ...ntaining and enhancing your IoT project.md | 96 -- ...4 open source mobile apps for Nextcloud.md | 140 -- ...uction To Hyperledger Sawtooth -Part 12.md | 103 -- ...packaging in Fedora with minimal effort.md | 244 --- ...a Source-to-Image build pipeline in OKD.md | 484 ------ ...the open- How this community changed us.md | 135 -- ...ft 98-366- Networking Fundamentals Exam.md | 103 -- ...es On Red Hat (RHEL) And CentOS Systems.md | 174 -- ... Monitor CPU Utilization And Send Email.md | 178 -- ... look of Fedora Workstation with themes.md | 140 -- ... of blameless culture outside of DevOps.md | 65 - ...sis-driven development is key to DevOps.md | 152 -- ...on to Kubernetes Secrets and ConfigMaps.md | 608 ------- ...structure For Developing DApps -Part 13.md | 88 - sources/tech/20190610 Constant Time.md | 281 ---- ...etworks smarter, safer, more manageable.md | 104 -- ...To Find Linux System Details Using inxi.md | 608 ------- ... 15 Installation Guide with Screenshots.md | 204 --- ...proach to patching systems with Ansible.md | 141 -- ... teaching, and speaking, in open source.md | 75 - ... Powerful Tool for Creating Screenplays.md | 101 -- ...h Linux Maintenance Program For Newbies.md | 257 --- ...ool to build an interactive dungeon RPG.md | 231 --- ... and Open Source Video Editing Software.md | 327 ---- ...620 How to SSH into a running container.md | 185 --- sources/tech/20190620 You can-t buy DevOps.md | 103 -- ...e and scaling tools you should be using.md | 94 -- ... tools for contributors to your project.md | 97 -- ...What does debugging a program look like.md | 184 -- ...curity with Have I Been Pwned- and pass.md | 113 -- ... to Install and Configure KVM on RHEL 8.md | 256 --- ...625 The cost of JavaScript in 2019 - V8.md | 178 -- ... 4 open source Android apps for writers.md | 105 -- ...ed Endless OS and teaching kids to hack.md | 98 -- ...lit helps improve website accessibility.md | 64 - ... work recognized- write a brag document.md | 256 --- .../20190630 Computational Photography.md | 539 ------ ...01 How to use to infrastructure as code.md | 373 ----- ...What makes a good code review in DevOps.md | 84 - ... 6 open source web browser alternatives.md | 199 --- ... RSS-Atom Feed Reader For Text Consoles.md | 262 --- ...eating and maintaining systems at-large.md | 82 - ...dl Tutorial With Examples For Beginners.md | 446 ----- ...sition from sysadmin to DevOps engineer.md | 106 -- .../20190709 Clear is better than clever.md | 298 ---- ... education- There isn-t an app for that.md | 81 - ...y Action and Impact Coordinator (FCAIC).md | 102 -- ...gineering students about the enterprise.md | 119 -- ...u can tinker with this conference badge.md | 89 - ...712 Certifications for DevOps engineers.md | 64 - ... Use BleachBit to Optimize Ubuntu Linux.md | 170 -- ... Security scanning your DevOps pipeline.md | 488 ------ ... web-based alternative to Google Sheets.md | 130 -- ...ing with the Circuit Playground Express.md | 96 -- ... release often- to build a better brand.md | 110 -- ...a GitHub Pages site with this HTTP hack.md | 85 - ...s local accounts with Fedora and chntpw.md | 375 ----- ...ources every sysadmin should know about.md | 237 --- ...ift ideas for Sysadmin Appreciation Day.md | 48 - ...ator responsibilities- 9 critical tasks.md | 147 -- ...0190723 8 Best Open Source CRM Software.md | 230 --- ...ople for sysadmins to follow on Twitter.md | 177 -- ...hat-s always learning- Tips for leaders.md | 103 -- ...the browser wars on Command Line Heroes.md | 69 - .../20190724 Introducing Fedora CoreOS.md | 120 -- .../20190726 The Future Of Red Hat At IBM.md | 85 - ...What does it mean to be a sysadmin hero.md | 68 - ...inux (plus 4 more ways to do it safely).md | 262 --- ...190801 GitHub Pages is a CI-CD pipeline.md | 74 - ...2 Getting started with the BBC Microbit.md | 92 - ... article type embeds live code and data.md | 79 - ...file paths and how to use them in Linux.md | 99 -- ... Install LXD - LXC Containers in Ubuntu.md | 508 ------ ...o Magnify Screen Areas On Linux Desktop.md | 127 -- ...nshot Right Click Context Menu On Linux.md | 74 - ...with relative paths at the command line.md | 93 -- ...s your favorite open source BI software.md | 56 - ...ing presentations from the command line.md | 207 --- ...tions for a more energetic organization.md | 104 -- ...t a Services When it Goes Down on Linux.md | 545 ------ ...ed- Here-s What-s New and How to Get it.md | 156 -- ...ting the Bash shell with pushd and popd.md | 203 --- ...ota on XFS File System in Linux Servers.md | 310 ---- .../tech/20190812 What open source is not.md | 94 -- ...nsive guide to agile project management.md | 143 -- ...Which is the query performance champion.md | 245 --- ...se VirtualBox Guest Additions on Ubuntu.md | 161 -- ...ty experts, we-ll need an open approach.md | 86 - ...conceptions about ethics and bias in AI.md | 121 -- .../20190814 Taz Brown- How Do You Fedora.md | 80 - ...e Music Player for All Your Audio Needs.md | 140 -- ... To Type Indian Rupee Sign (-) In Linux.md | 143 -- ... create a vanity Tor .onion web address.md | 282 ---- ...s- When do they log in and for how long.md | 195 --- ...signing open audio hardware as DIY kits.md | 208 --- ...o encrypt files with gocryptfs on Linux.md | 150 -- ...16 How to plan your next IT career move.md | 147 -- ...nd Mouse Between Linux and Raspberry Pi.md | 209 --- ...ty Zones in OpenStack from Command Line.md | 321 ---- ...9 An introduction to bpftrace for Linux.md | 353 ---- ... brief introduction to learning agility.md | 102 -- ...20 A project manager-s guide to Ansible.md | 72 - .../tech/20190820 Go compiler intrinsics.md | 307 ---- ...90821 5 notable open source 3D printers.md | 104 -- ...ed NoSQL database with Apache Cassandra.md | 189 --- ...t- Cloud-native security and compliance.md | 88 - ...legacy of Alan Turing- 5 books and more.md | 97 -- ...ong a Process Has Been Running in Linux.md | 166 -- .../tech/20190826 Using variables in Bash.md | 186 --- ...l Services For Privacy Concerned People.md | 232 --- ...Introduction to the Linux chmod command.md | 313 ---- .../tech/20190828 Using GNS3 with Fedora.md | 121 -- ... What are environment variables in Bash.md | 240 --- .../tech/20190829 Variables in PowerShell.md | 138 -- .../20190829 What is an Object in Java.md | 202 --- ...uick tips- Using pipes to connect tools.md | 110 -- ...01 How to write zines with simple tools.md | 138 -- ... Window Manager on Ubuntu With Regolith.md | 152 -- ...ity struggles, and more industry trends.md | 73 - ...904 Environment variables in PowerShell.md | 196 --- ... allocations on the callers of your API.md | 79 - ...oduction to monitoring with Pandora FMS.md | 221 --- ...ing storage management tasks in Cockpit.md | 100 -- ...nd Application Metrics using Metricbeat.md | 161 -- ...ne- HTTP- Learn your browser-s language.md | 197 --- ...90916 Constraint programming by example.md | 163 -- ...190916 The Emacs Series Exploring ts.el.md | 366 ---- ...to machines- Lisp and the origins of AI.md | 115 -- ...190917 What-s Good About TensorFlow 2.0.md | 328 ---- ...ssing and machine learning using Python.md | 162 -- ...mbrace top-down cybersecurity practices.md | 101 -- ...eep Learning Based Chatbots are Smarter.md | 113 -- ...ler-s Identity Really is a Miracle, Too.md | 138 -- ...20190920 How to compare strings in Java.md | 447 ----- ...ork interfaces and FirewallD in Cockpit.md | 120 -- ...Top Open Source Video Players for Linux.md | 295 ---- ...approach to reskilling in the age of AI.md | 121 -- ...complex solutions on OpenShift - Fedora.md | 165 -- ...on testing by example- Execute the test.md | 163 -- ...pen source social platforms to consider.md | 76 - ...g by example- Evolving from fragile TDD.md | 258 --- ...t ransomware, and more open source news.md | 83 - ...mble Makes a Big Release After 10 Years.md | 117 -- ...ine Tool for Modelling AWS Architecture.md | 72 - ...ture for a Corteza Low Code application.md | 225 --- ... Privacy and Keeping Information Secure.md | 134 -- ...e for your Corteza Low Code application.md | 240 --- ...reating a perfect landing page for free.md | 74 - ...003 SQL queries don-t start with SELECT.md | 144 -- ...kages to reduce your public API surface.md | 54 - ...Tricks That Will Save You A Lot of Time.md | 307 ---- ...open source observability on Kubernetes.md | 202 --- .../20191007 Understanding Joins in Hadoop.md | 66 - ... Order into a Collection of Photographs.md | 119 -- ...oping in the cloud with Eclipse Che IDE.md | 124 -- ...ht.el- The Hash Table Library for Emacs.md | 414 ----- ... application monitoring with Prometheus.md | 301 ---- ...rizer- The Taste of Sugar on Any Device.md | 59 - ...ory- I grew up on PC Magazine not candy.md | 48 - ...data for doing data science with Python.md | 235 --- ...Perceiving Python programming paradigms.md | 122 -- ...Various Update Related Errors in Ubuntu.md | 261 --- ... development breakthrough at Greenpeace.md | 108 -- ...eed approximate nearest neighbor search.md | 258 --- ...st practices in test-driven development.md | 206 --- ...ting Systems for the Internet of Things.md | 147 -- ...n a Remote System Using the Bash Script.md | 550 ------ ...e predictions, and more industry trends.md | 69 - ...ying namespaces and containers in Linux.md | 146 -- ... without assertions for web development.md | 163 -- .../20191031 Looping your way through bash.md | 236 --- ...ux host to Nagios Server for Monitoring.md | 308 ---- ...roduction to monitoring with Prometheus.md | 434 ----- ... guide to open source for microservices.md | 309 ---- ...ging software and services with Cockpit.md | 129 -- ...y and Anti-Affinity Policy in OpenStack.md | 214 --- ...ets management for Flatpak applications.md | 133 -- ...e Remote Linux Systems With eMail Alert.md | 200 --- ... Open Source Cloud Management Platforms.md | 302 ---- ...20191111 Understanding -disk space math.md | 124 -- ...at podcasts for open source enthusiasts.md | 99 -- ...1114 Creating Custom Themes in Drupal 8.md | 229 --- ...n source alternative for internet radio.md | 106 -- ...e- Error on Ubuntu -Beginner-s Tutorial.md | 166 -- ...8 How to use regular expressions in awk.md | 279 ---- ...91118 Some notes on vector drawing apps.md | 99 -- ...shot for Taking and Editing Screenshots.md | 153 -- ...reality checks and more industry trends.md | 53 - sources/tech/20191119 Loops in Emacs Lisp.md | 321 ---- ...ity of practice in an open organization.md | 97 -- ...gle sign-on for Fedora Project services.md | 105 -- ...bie-s Understanding of Machine Learning.md | 215 --- ...rity Corrected on Ubuntu and Linux Mint.md | 160 -- ...password protection on Active Directory.md | 219 --- ...t Ideas to Put Your Pi to Some Good Use.md | 303 ---- ...hallenge- Write a bouncy window manager.md | 104 -- ...r for Adding Subtitles to Online Videos.md | 122 -- ...Make Lua development easy with Luarocks.md | 233 --- ...anage Remote Windows Host using Ansible.md | 233 --- ...ner, explorer, or tinkerer on your list.md | 130 -- ...e your Linux desktop with Enlightenment.md | 72 - ...ide- Linux and open source tech gadgets.md | 109 -- ...r is a Beautiful Calculator - Converter.md | 99 -- ...and Failed User Login Attempts on Linux.md | 182 -- ...security integration module for Ansible.md | 189 --- ...ns to the tiny window manager challenge.md | 131 -- ... to control the flow of your awk script.md | 273 --- ...04 Complementary engineering indicators.md | 61 - ...ice up your Linux desktop with Cinnamon.md | 68 - ...- find Twitter memes with suffix arrays.md | 220 --- ...206 A beginner-s guide to using Vagrant.md | 219 --- ... 8 Best Open Source Accounting Software.md | 199 --- ...1208 Dynamically scoped variables in Go.md | 200 --- ...Xfce for your lightweight Linux desktop.md | 63 - ... Open Source Video Transcoder Handbrake.md | 151 -- ...Linux desktop with Joe-s Window Manager.md | 78 - ...efox Keyboard Shortcuts You Should Know.md | 129 -- ...w to generate code with Apache Velocity.md | 88 - ...ed to know about Seeed hardware devices.md | 121 -- ...op with the Trinity Desktop Environment.md | 65 - ...ng up the sway window manager on Fedora.md | 157 -- ... started with the Spacemacs text editor.md | 113 -- ...if you-re using a bash builtin in Linux.md | 153 -- ...duction to automation with Bash scripts.md | 164 -- ...sts- Getting started with LXQt and LXDE.md | 72 - ...admin work on Fedora easier with screen.md | 165 -- ...to Enhance Your Online Privacy With Tor.md | 260 --- ...0191219 Creating a Bash script template.md | 236 --- ...with the Linux Ratpoison window manager.md | 107 -- ...dd a Help facility to your Bash program.md | 346 ---- .../tech/20191221 Testing your Bash script.md | 288 ---- ...ience with the Unix Desktop Environment.md | 179 -- ... resources to become a better Bash user.md | 77 - ... 2019- Fedora for system administrators.md | 70 - ...ck to basics with the TWM Linux desktop.md | 109 -- ...rce resources for kids and young adults.md | 97 -- .../20191225 5 security tips from Santa.md | 84 - ...hadas VIM3L- An Open Source HTPC Device.md | 149 -- .../20191226 -server- is hard to define.md | 196 --- ...icles to become more data science savvy.md | 123 -- ...26 Top 10 Raspberry Pi articles of 2019.md | 72 - sources/tech/20191227 2019- Year in review.md | 100 -- ...t-read open source news stories of 2019.md | 90 - ...ead DevOps articles for success in 2020.md | 153 -- ...31 7 resources to grow your Java skills.md | 109 -- ... software alternatives for the new year.md | 70 - ...k at the Linux command line with TShark.md | 768 --------- ...pload an OpenStack disk image to Glance.md | 848 ---------- ...rm6 assembly language on a Raspberry Pi.md | 629 ------- ... Android Auto to display custom content.md | 13 - ...9 Try Deno as an alternative to Node.js.md | 12 - ...dora classroom- LaTeX 101 for beginners.md | 74 - 726 files changed, 101868 deletions(-) delete mode 100644 sources/news/20200820 Rejoice KDE Lovers- MX Linux Joins the KDE Bandwagon and Now You Can Download MX Linux KDE Edition.md delete mode 100644 sources/news/20200822 Cisco open-source code boosts performance of Kubernetes apps over SD-WAN.md delete mode 100644 sources/news/20201014 KDE Plasma 5.20 is Here With Exciting Improvements.md delete mode 100644 sources/talk/20190111 What metrics matter- A guide for open source projects.md delete mode 100644 sources/talk/20190115 What happens when a veteran teacher goes to an open source conference.md delete mode 100644 sources/talk/20190131 4 confusing open source license scenarios and how to navigate them.md delete mode 100644 sources/talk/20190131 OOP Before OOP with Simula.md delete mode 100644 sources/talk/20190204 Config management is dead- Long live Config Management Camp.md delete mode 100644 sources/talk/20190206 4 steps to becoming an awesome agile developer.md delete mode 100644 sources/talk/20190206 What blockchain and open source communities have in common.md delete mode 100644 sources/talk/20190214 Top 5 podcasts for Linux news and tips.md delete mode 100644 sources/talk/20190219 How Linux testing has changed and what matters today.md delete mode 100644 sources/talk/20190219 How our non-profit works openly to make education accessible.md delete mode 100644 sources/talk/20190225 Teaching scientists how to share code.md delete mode 100644 sources/talk/20190301 What-s happening in the OpenStack community.md delete mode 100644 sources/talk/20190306 How to pack an IT travel kit.md delete mode 100644 sources/talk/20190307 Small Scale Scrum vs. Large Scale Scrum.md delete mode 100644 sources/talk/20190313 Why is no one signing their emails.md delete mode 100644 sources/talk/20190314 Why feedback, not metrics, is critical to DevOps.md delete mode 100644 sources/talk/20190319 6 steps to stop ethical debt in AI product development.md delete mode 100644 sources/talk/20190319 Hello World Marketing (or, How I Find Good, Boring Software).md delete mode 100644 sources/talk/20190320 Managing changes in open source projects.md delete mode 100644 sources/talk/20190323 How to transition into a Developer Relations career.md delete mode 100644 sources/talk/20190328 Continuous response- The essential process we-re ignoring in DevOps.md delete mode 100644 sources/talk/20190328 Why do organizations have open secrets.md delete mode 100644 sources/talk/20190331 Codecademy vs. The BBC Micro.md delete mode 100644 sources/talk/20190401 How Kubeflow is evolving without ksonnet.md delete mode 100644 sources/talk/20190402 Making computer science curricula as adaptable as our code.md delete mode 100644 sources/talk/20190405 D as a C Replacement.md delete mode 100644 sources/talk/20190410 Anti-lasers could give us perfect antennas, greater data capacity.md delete mode 100644 sources/talk/20190415 Nyansa-s Voyance expands to the IoT.md delete mode 100644 sources/talk/20190416 Two tools to help visualize and simplify your data-driven operations.md delete mode 100644 sources/talk/20190416 What SDN is and where it-s going.md delete mode 100644 sources/talk/20190417 Clearing up confusion between edge and cloud.md delete mode 100644 sources/talk/20190417 Startup MemVerge combines DRAM and Optane into massive memory pool.md delete mode 100644 sources/talk/20190417 Want to the know future of IoT- Ask the developers.md delete mode 100644 sources/talk/20190418 -Fiber-in-air- 5G network research gets funding.md delete mode 100644 sources/talk/20190423 Open architecture and open source - The new wave for SD-WAN.md delete mode 100644 sources/talk/20190424 How data storage will shift to blockchain.md delete mode 100644 sources/talk/20190424 No, drone delivery still isn-t ready for prime time.md delete mode 100644 sources/talk/20190426 Profiling D-s Garbage Collection with Bpftrace.md delete mode 100644 sources/talk/20190430 Measuring the edge- Finding success with edge deployments.md delete mode 100644 sources/talk/20190501 Yet another killer cloud quarter puts pressure on data centers.md delete mode 100644 sources/talk/20190502 Revolutionary data compression technique could slash compute costs.md delete mode 100644 sources/talk/20190507 SD-WAN is Critical for IoT.md delete mode 100644 sources/talk/20190507 Some IT pros say they have too much data.md delete mode 100644 sources/talk/20190509 When it comes to uptime, not all cloud providers are created equal.md delete mode 100644 sources/talk/20190513 Top auto makers rely on cloud providers for IoT.md delete mode 100644 sources/talk/20190514 Mobility and SD-WAN, Part 1- SD-WAN with 4G LTE is a Reality.md delete mode 100644 sources/talk/20190515 Extreme addresses networked-IoT security.md delete mode 100644 sources/talk/20190516 Will 5G be the first carbon-neutral network.md delete mode 100644 sources/talk/20190517 The modern data center and the rise in open-source IP routing suites.md delete mode 100644 sources/talk/20190521 Enterprise IoT- Companies want solutions in these 4 areas.md delete mode 100644 sources/talk/20190522 Experts- Enterprise IoT enters the mass-adoption phase.md delete mode 100644 sources/talk/20190522 The Traffic Jam Whopper project may be the coolest-dumbest IoT idea ever.md delete mode 100644 sources/talk/20190523 Benchmarks of forthcoming Epyc 2 processor leaked.md delete mode 100644 sources/talk/20190523 Edge-based caching and blockchain-nodes speed up data transmission.md delete mode 100644 sources/talk/20190523 Online performance benchmarks all companies should try to achieve.md delete mode 100644 sources/talk/20190523 Study- Most enterprise IoT transactions are unencrypted.md delete mode 100644 sources/talk/20190528 Analysing D Code with KLEE.md delete mode 100644 sources/talk/20190528 Managed WAN and the cloud-native SD-WAN.md delete mode 100644 sources/talk/20190528 Moving to the Cloud- SD-WAN Matters.md delete mode 100644 sources/talk/20190529 Satellite-based internet possible by year-end, says SpaceX.md delete mode 100644 sources/talk/20190529 Survey finds SD-WANs are hot, but satisfaction with telcos is not.md delete mode 100644 sources/talk/20190601 True Hyperconvergence at Scale- HPE Simplivity With Composable Fabric.md delete mode 100644 sources/talk/20190602 IoT Roundup- New research on IoT security, Microsoft leans into IoT.md delete mode 100644 sources/talk/20190603 It-s time for the IoT to -optimize for trust.md delete mode 100644 sources/talk/20190604 Data center workloads become more complex despite promises to the contrary.md delete mode 100644 sources/talk/20190604 Moving to the Cloud- SD-WAN Matters- Part 2.md delete mode 100644 sources/talk/20190604 Why Emacs.md delete mode 100644 sources/talk/20190606 Cloud adoption drives the evolution of application delivery controllers.md delete mode 100644 sources/talk/20190606 For enterprise storage, persistent memory is here to stay.md delete mode 100644 sources/talk/20190606 Self-learning sensor chips won-t need networks.md delete mode 100644 sources/talk/20190606 What to do when yesterday-s technology won-t meet today-s support needs.md delete mode 100644 sources/talk/20190611 6 ways to make enterprise IoT cost effective.md delete mode 100644 sources/talk/20190611 The carbon footprints of IT shops that train AI models are huge.md delete mode 100644 sources/talk/20190612 IoT security vs. privacy- Which is a bigger issue.md delete mode 100644 sources/talk/20190612 Software Defined Perimeter (SDP)- Creating a new network perimeter.md delete mode 100644 sources/talk/20190613 Data centers should sell spare UPS capacity to the grid.md delete mode 100644 sources/talk/20190617 5 transferable higher-education skills.md delete mode 100644 sources/talk/20190618 17 predictions about 5G networks and devices.md delete mode 100644 sources/talk/20190618 Why your workplace arguments aren-t as effective as you-d like.md delete mode 100644 sources/talk/20190619 With Tableau, SaaS king Salesforce becomes a hybrid cloud company.md delete mode 100644 sources/talk/20190620 Carrier services help expand healthcare, with 5G in the offing.md delete mode 100644 sources/talk/20190620 Cracks appear in Intel-s grip on supercomputing.md delete mode 100644 sources/talk/20190620 Several deals solidify the hybrid cloud-s status as the cloud of choice.md delete mode 100644 sources/talk/20190630 Data Still Dominates.md delete mode 100644 sources/talk/20190702 SD-WAN Buyers Should Think Application Performance as well as Resiliency.md delete mode 100644 sources/talk/20190703 An eco-friendly internet of disposable things is coming.md delete mode 100644 sources/talk/20190705 Lessons in Vendor Lock-in- Google and Huawei.md delete mode 100644 sources/talk/20190708 Colocation facilities buck the cloud-data-center trend.md delete mode 100644 sources/talk/20190709 Improving IT Operations - Key to Business Success in Digital Transformation.md delete mode 100644 sources/talk/20190709 Linux a key player in the edge computing revolution.md delete mode 100644 sources/talk/20190711 Smarter IoT concepts reveal creaking networks.md delete mode 100644 sources/talk/20190716 Server hardware makers shift production out of China.md delete mode 100644 sources/talk/20190717 How edge computing is driving a new era of CDN.md delete mode 100644 sources/talk/20190717 Public internet should be all software-defined.md delete mode 100644 sources/talk/20190718 Worst DNS attacks and how to mitigate them.md delete mode 100644 sources/talk/20190724 Data centers may soon recycle heat into electricity.md delete mode 100644 sources/talk/20190724 Reports- As the IoT grows, so do its threats to DNS.md delete mode 100644 sources/talk/20190724 When it comes to the IoT, Wi-Fi has the best security.md delete mode 100644 sources/talk/20190725 IoT-s role in expanding drone use.md delete mode 100644 sources/talk/20190725 Report- Smart-city IoT isn-t smart enough yet.md delete mode 100644 sources/talk/20190725 Storage management a weak area for most enterprises.md delete mode 100644 sources/talk/20190726 NVMe over Fabrics enterprise storage spec enters final review process.md delete mode 100644 sources/talk/20190729 Do you prefer a live demo to be perfect or broken.md delete mode 100644 sources/talk/20190729 I Used The Web For A Day On A 50 MB Budget - Smashing Magazine.md delete mode 100644 sources/talk/20190729 Intent-Based Networking (IBN)- Bridging the gap on network complexity.md delete mode 100644 sources/talk/20190730 From e-learning to m-learning- Open education-s next move.md delete mode 100644 sources/talk/20190730 IoT roundup- Connected cows, food safety sensors and tracking rent-a-bikes.md delete mode 100644 sources/talk/20190801 Failure is a feature in blameless DevOps.md delete mode 100644 sources/talk/20190801 Self-organizing micro robots may soon swarm the industrial IoT.md delete mode 100644 sources/talk/20190806 Intel pulls the plug on Omni-Path networking fabric architecture.md delete mode 100644 sources/talk/20190806 Is Perl going extinct.md delete mode 100644 sources/talk/20190807 Intro to Corteza, an open source alternative to Salesforce.md delete mode 100644 sources/talk/20190807 WAN Transformation- It-s More Than SD-WAN.md delete mode 100644 sources/talk/20190807 Why fear of failure is a silent DevOps virus.md delete mode 100644 sources/talk/20190808 A data transmission revolution is underway.md delete mode 100644 sources/talk/20190812 How SD-Branch addresses today-s network security concerns.md delete mode 100644 sources/talk/20190816 Get ready for the convergence of IT and OT networking and security.md delete mode 100644 sources/talk/20190816 Powering edge data centers- Blue energy might be the perfect solution.md delete mode 100644 sources/talk/20190820 Breakthroughs bring a quantum Internet closer.md delete mode 100644 sources/talk/20190820 The cloud isn-t killing open source software.md delete mode 100644 sources/talk/20190822 Back to School- Your SD-WAN Reading List.md delete mode 100644 sources/talk/20190822 Don-t worry about shadow IT. Shadow IoT is much worse..md delete mode 100644 sources/talk/20190822 What piece of advice had the greatest impact on your career.md delete mode 100644 sources/talk/20190826 Software-defined perimeter - the essence of trust.md delete mode 100644 sources/talk/20190827 6 crucial tips for leading a cross-functional team.md delete mode 100644 sources/talk/20190827 Why Spinnaker matters to CI-CD.md delete mode 100644 sources/talk/20190829 Data center-specific AI completes tasks twice as fast.md delete mode 100644 sources/talk/20190829 Rating IoT devices to gauge their impact on your network.md delete mode 100644 sources/talk/20190829 SparkFun continues to innovate thanks to open source hardware.md delete mode 100644 sources/talk/20190830 7 rules for remote-work sanity.md delete mode 100644 sources/talk/20190830 Bluetooth finds a role in the industrial internet of things.md delete mode 100644 sources/talk/20190902 Top take-aways from DevOps World 2019.md delete mode 100644 sources/talk/20190903 Peanuts, paper towels, and other important considerations on community.md delete mode 100644 sources/talk/20190904 A guide to human communication for sysadmins.md delete mode 100644 sources/talk/20190904 Geeks in Cyberspace- A documentary about Linux nerds and the web that was.md delete mode 100644 sources/talk/20190905 10 pitfalls to avoid when implementing DevOps.md delete mode 100644 sources/talk/20190905 6 years of tech evolution, revolution and radical change.md delete mode 100644 sources/talk/20190905 Data center cooling- Electricity-free system sends excess building heat into space.md delete mode 100644 sources/talk/20190906 How to open source your academic work in 7 steps.md delete mode 100644 sources/talk/20190911 How Linux came to the mainframe.md delete mode 100644 sources/talk/20190911 To secure industrial IoT, use segmentation instead of firewalls.md delete mode 100644 sources/talk/20190912 3 ways to handle transient faults for DevOps.md delete mode 100644 sources/talk/20190912 A Virtual WAN- Moving closer to the enterprise.md delete mode 100644 sources/talk/20190913 How 6G will work- Terahertz-to-fiber conversion.md delete mode 100644 sources/talk/20190913 Why the Blockchain is Your Best Bet for Cyber Security.md delete mode 100644 sources/talk/20190913 Why the founder of Apache is all-in on blockchain.md delete mode 100644 sources/talk/20190916 3 strategies to simplify complex networks.md delete mode 100644 sources/talk/20190916 How Cloud Billing Can Benefit Your Business.md delete mode 100644 sources/talk/20190917 3 steps to developing psychological safety.md delete mode 100644 sources/talk/20190917 How Ansible brought peace to my home.md delete mode 100644 sources/talk/20190918 Election fraud- Is there an open source solution.md delete mode 100644 sources/talk/20190918 The Protocols That Help Things to Communicate Over the Internet.md delete mode 100644 sources/talk/20190918 The community-led renaissance of open source.md delete mode 100644 sources/talk/20190919 A Network for All Edges- Why SD-WAN, SDP, and the Application Edge Must Converge in the Cloud.md delete mode 100644 sources/talk/20190919 Linux on the mainframe- Then and now.md delete mode 100644 sources/talk/20190919 Space internet service closer to becoming reality.md delete mode 100644 sources/talk/20190919 Upgrade to Android Pie on Any Xiaomi Device with the Pixel Experience ROM.md delete mode 100644 sources/talk/20190920 Code it, ship it, own it with full-service ownership.md delete mode 100644 sources/talk/20190920 How to decommission a data center.md delete mode 100644 sources/talk/20190920 The Richest Man in History Shares his Thoughts- Jeff Bezos Top 5 Tips for Success.md delete mode 100644 sources/talk/20190921 How spicy should a jalapeno be.md delete mode 100644 sources/talk/20190923 Deloitte Launches New Tool for Tracking the Trajectory of Open Source Technologies.md delete mode 100644 sources/talk/20190923 Simulating Smart Cities with CupCarbon.md delete mode 100644 sources/talk/20190925 6 Fintech Startups That Are Revolutionizing the Finance Space.md delete mode 100644 sources/talk/20190925 How a simpler mmWave architecture can connect IoT.md delete mode 100644 sources/talk/20190925 The 10 most powerful companies in IoT.md delete mode 100644 sources/talk/20190925 The Great Open Source Divide- ICE, Hippocratic License and the Controversy.md delete mode 100644 sources/talk/20190926 DeviceHive- The Scalable Open Source M2M Development Platform.md delete mode 100644 sources/talk/20190926 How to contribute to GitLab.md delete mode 100644 sources/talk/20190927 10 counterintuitive takeaways from 10 years of DevOpsDays.md delete mode 100644 sources/talk/20190927 Data center gear will increasingly move off-premises.md delete mode 100644 sources/talk/20190927 How to contribute to Fedora.md delete mode 100644 sources/talk/20190927 What does an open source AI future look like.md delete mode 100644 sources/talk/20190930 How Open Source Software Lets Us Push It to the Limit.md delete mode 100644 sources/talk/20191001 Earning, spending, saving- The currency of influence in open source.md delete mode 100644 sources/talk/20191001 How to keep your messages private with an open source app.md delete mode 100644 sources/talk/20191003 Mobile App Security Tips to Secure Your Mobile Applications.md delete mode 100644 sources/talk/20191003 XMPP- A Communication Protocol for the IoT.md delete mode 100644 sources/talk/20191004 Chuwi GBox Pro Mini PC Review for Linux Users.md delete mode 100644 sources/talk/20191004 DARPA looks for new NICs to speed up networks.md delete mode 100644 sources/talk/20191004 Quantum computing, the open source way.md delete mode 100644 sources/talk/20191004 Secure Access Service Edge (SASE)- A reflection of our times.md delete mode 100644 sources/talk/20191005 Machine Learning (ML) and IoT can Work Together to Improve Lives.md delete mode 100644 sources/talk/20191006 Cloud Native Computing- The Hidden Force behind Swift App Development.md delete mode 100644 sources/talk/20191007 DevOps is Eating the World.md delete mode 100644 sources/talk/20191008 Fight for the planet- Building an open platform and open culture at Greenpeace.md delete mode 100644 sources/talk/20191009 -Open Standards Are The Key To Expanding IoT Innovation In India Market.md delete mode 100644 sources/talk/20191009 Things You Should Know If You Want to Become a Machine Learning Engineer.md delete mode 100644 sources/talk/20191010 Climate challenges call for open solutions.md delete mode 100644 sources/talk/20191010 Reimagining-the-Internet project gets funding.md delete mode 100644 sources/talk/20191010 SD-WAN- What is it and why you-ll use it one day.md delete mode 100644 sources/talk/20191011 FOSS in India- Perspectives of an American Anthropologist.md delete mode 100644 sources/talk/20191011 How a business was built on podcasts for Linux- The story of Jupiter Broadcasting.md delete mode 100644 sources/talk/20191012 How the oil and gas industry exploits IoT.md delete mode 100644 sources/talk/20191012 The Role of Open Source Tools and Concepts in IoT Security.md delete mode 100644 sources/talk/20191014 A Primer on Open Source IoT Middleware for the Integration of Enterprise Applications.md delete mode 100644 sources/talk/20191014 Pros and cons of event-driven security.md delete mode 100644 sources/talk/20191015 Beamforming explained- How it makes wireless communication faster.md delete mode 100644 sources/talk/20191015 The Emergence of Edge Analytics in the IoT Ecosystem.md delete mode 100644 sources/talk/20191015 The software-defined data center drives agility.md delete mode 100644 sources/talk/20191016 Drupal shows leadership on diversity and inclusion.md delete mode 100644 sources/talk/20191017 Data center liquid-cooling to gain momentum.md delete mode 100644 sources/talk/20191017 Pennsylvania school district tackles network modernization.md delete mode 100644 sources/talk/20191018 VMware on AWS gets an on-premises option.md delete mode 100644 sources/talk/20191019 To space and beyond with open source.md delete mode 100644 sources/talk/20191020 Project Trident Ditches BSD for Linux.md delete mode 100644 sources/talk/20191021 Enterprises find new uses for mainframes- blockchain and containerized apps.md delete mode 100644 sources/talk/20191021 Tokalabs Software Defined Labs automates configuration of lab test-beds.md delete mode 100644 sources/talk/20191022 -Making software liquid- a DevOps company founder-s journey from OSS community to billion-dollar darling.md delete mode 100644 sources/talk/20191022 Gartner- 10 infrastructure trends you need to know.md delete mode 100644 sources/talk/20191023 Disney-s Streaming Service is Having Troubles with Linux.md delete mode 100644 sources/talk/20191023 IT-as-a-Service Simplifies Hybrid IT.md delete mode 100644 sources/talk/20191023 MPLS Migration- How a KISS Transformed the WANs of 4 IT Managers.md delete mode 100644 sources/talk/20191023 Psst- Wanna buy a data center.md delete mode 100644 sources/talk/20191023 The Protocols That Help Things to Communicate Over the Internet.md delete mode 100644 sources/talk/20191024 4 ways developers can have a say in what agile looks like.md delete mode 100644 sources/talk/20191024 Gartner crystal ball- Looking beyond 2020 at the top IT-changing technologies.md delete mode 100644 sources/talk/20191024 My Linux Story- Why introduce people to the Raspberry Pi.md delete mode 100644 sources/talk/20191024 The evolution to Secure Access Service Edge (SASE) is being driven by necessity.md delete mode 100644 sources/talk/20191025 NICT successfully demos petabit-per-second network node.md delete mode 100644 sources/talk/20191028 Building trust in the Linux community.md delete mode 100644 sources/talk/20191029 How SD-WAN is evolving into Secure Access Service Edge.md delete mode 100644 sources/talk/20191029 The best (and worst) ways to influence your open community.md delete mode 100644 sources/talk/20191030 Watson IoT chief- AI can broaden IoT services.md delete mode 100644 sources/talk/20191031 A Bird-s Eye View of Big Data for Enterprises.md delete mode 100644 sources/talk/20191031 The Best Reasons To Use Enterprise Network Management Software.md delete mode 100644 sources/talk/20191031 Wireless noise protocol can extend IoT range.md delete mode 100644 sources/talk/20191101 Big Four carriers want to rule IoT by simplifying it.md delete mode 100644 sources/talk/20191101 Micron finally delivers its answer to Optane.md delete mode 100644 sources/talk/20191101 Product vs. project in open source.md delete mode 100644 sources/talk/20191101 Retro computing with FPGAs and MiSTer.md delete mode 100644 sources/talk/20191102 6 remarkable features of the new United Nations open source initiative.md delete mode 100644 sources/talk/20191102 Can Data Scientists be Replaced by Automation.md delete mode 100644 sources/talk/20191104 My first contribution to open source- Impostor Syndrome.md delete mode 100644 sources/talk/20191104 Open Source Big Data Solutions Support Digital Transformation.md delete mode 100644 sources/talk/20191105 A Bird-s Eye View of Big Data for Enterprises.md delete mode 100644 sources/talk/20191105 AI and 5G- Entering a new world of data.md delete mode 100644 sources/talk/20191105 Conquering documentation challenges on a massive project.md delete mode 100644 sources/talk/20191105 Forrester- Edge computing is about to bloom.md delete mode 100644 sources/talk/20191105 Open by nature- What building a platform for activists taught me about playful development.md delete mode 100644 sources/talk/20191106 A Quick Look at Some of the Best Cloud Platforms for High Performance Computing Applications.md delete mode 100644 sources/talk/20191106 Getting started with Pimcore- An open source alternative for product information management.md delete mode 100644 sources/talk/20191106 How Much of a Genius-Level Move Was Using Binary Space Partitioning in Doom.md delete mode 100644 sources/talk/20191106 My first contribution to open source- Make a fork of the repo.md delete mode 100644 sources/talk/20191106 What it Takes to Be a Successful Network Engineer.md delete mode 100644 sources/talk/20191107 My first open source contribution- Keep the code relevant.md delete mode 100644 sources/talk/20191108 My first open source contribution- Talk about your pull request.md delete mode 100644 sources/talk/20191110 How universities are using open source to attract students.md delete mode 100644 sources/talk/20191111 Best Tools-Latest Tools to Use in Programming.md delete mode 100644 sources/talk/20191112 Migrating to SD-WAN- Avoid these Pitfalls, Say IT Leaders.md delete mode 100644 sources/talk/20191112 What open communities teach us about empowering customers.md delete mode 100644 sources/talk/20191113 How to drive customer experience with agile principles.md delete mode 100644 sources/talk/20191113 USPS invests in GPU-driven servers to speed package processing.md delete mode 100644 sources/talk/20191114 Space-sourced power could beam electricity where needed.md delete mode 100644 sources/talk/20191115 Cray to license Fujitsu Arm processor for supercomputers.md delete mode 100644 sources/talk/20191115 Hiring a technical writer in the age of DevOps.md delete mode 100644 sources/talk/20191116 4 critical growth opportunities for open source.md delete mode 100644 sources/talk/20191116 IoT in 2020- The awkward teenage years.md delete mode 100644 sources/talk/20191116 Should I Choose a Managed WordPress Hosting.md delete mode 100644 sources/talk/20191119 Fortinet CEO- Network and security technologies give rise to security-driven networking.md delete mode 100644 sources/talk/20191119 SD-WANs Enable Scalable Local Internet Breakout but Pose Security Risk.md delete mode 100644 sources/talk/20191120 3 emerging open source projects to keep an eye on.md delete mode 100644 sources/talk/20191120 Intel targets Nvidia (again) with GPU and cross-processor API.md delete mode 100644 sources/talk/20191120 What makes a programming exercise good.md delete mode 100644 sources/talk/20191121 Cumulus Networks updates its network-centric Linux distribution.md delete mode 100644 sources/talk/20191121 IoT sensors must have two radios for efficiency.md delete mode 100644 sources/talk/20191121 Three-course professional specialization aims to close the gap between the use and understanding of open source in business.md delete mode 100644 sources/talk/20191125 8 ways to prepare your data center for AI-s power draw.md delete mode 100644 sources/talk/20191125 My journey to becoming an open source maintainer.md delete mode 100644 sources/talk/20191126 A framework for building products from open source projects.md delete mode 100644 sources/talk/20191126 How cloud providers- performance differs.md delete mode 100644 sources/talk/20191126 SASE- Redefining the network and security architecture.md delete mode 100644 sources/talk/20191127 Is your code inclusive.md delete mode 100644 sources/talk/20191127 Why do we contribute to open source software.md delete mode 100644 sources/talk/20191128 -We follow a holistic approach to drive open source adoption across the client base at Infosys.md delete mode 100644 sources/talk/20191129 My Linux story- Covering open source in Spanish.md delete mode 100644 sources/talk/20191203 Ampere preps an 80-core Arm processor for the cloud.md delete mode 100644 sources/talk/20191203 What we risk when we open up to customers (and why it-s worth it).md delete mode 100644 sources/talk/20191204 Amazon joins the quantum computing crowd with Braket testbed.md delete mode 100644 sources/talk/20191205 Researchers experiment with glass-based storage that doesn-t require electronics cooling.md delete mode 100644 sources/talk/20191205 The current state of blockchain and where it-s going.md delete mode 100644 sources/talk/20191209 5G in 2020- Still just a private party.md delete mode 100644 sources/talk/20191209 Data centers in 2020- Automation, cheaper memory.md delete mode 100644 sources/talk/20191209 Google Cloud bare-metal initiative targets migrating legacy apps from on-prem.md delete mode 100644 sources/talk/20191209 LibreCorps mentors humanitarian startups on how to run the open source way.md delete mode 100644 sources/talk/20191210 Italian job- Translating our mission statement in the open.md delete mode 100644 sources/talk/20191211 Passive optical LAN- Its day is dawning.md delete mode 100644 sources/talk/20191211 Passive optical networking- Its day is dawning.md delete mode 100644 sources/talk/20191212 Companies Prefer Hybrid Cloud to Escape Public Cloud Data Grabbity.md delete mode 100644 sources/talk/20191212 Liquid cooling and edge computing are featured at Gartner show.md delete mode 100644 sources/talk/20191212 Secure SD-WAN- The security vendors and their SD-WAN offerings.md delete mode 100644 sources/talk/20191213 Space-data-as-a-service gets going.md delete mode 100644 sources/talk/20191213 Space-data-as-a-service prepares to take off.md delete mode 100644 sources/talk/20191213 What-s hot at the edge for 2020- Everything.md delete mode 100644 sources/talk/20191216 10 tips for onboarding open source contributors.md delete mode 100644 sources/talk/20191216 7 considerations when buying network-automation tools.md delete mode 100644 sources/talk/20191217 How open source eases the shift to a hybrid cloud strategy.md delete mode 100644 sources/talk/20191217 SD-WAN management means more than reviewing logs and parsing events.md delete mode 100644 sources/talk/20191217 X factor- Populating the globe with open leaders.md delete mode 100644 sources/talk/20191218 Cisco- 5 hot networking trends for 2020.md delete mode 100644 sources/talk/20191219 Bamboo Systems redesigns server motherboards for greater performance.md delete mode 100644 sources/talk/20191220 Why We Need Interoperable Service Identity.md delete mode 100644 sources/talk/20191225 How to run a business with open source- Top reads.md delete mode 100644 sources/talk/20191231 How to be a better organization- Top 10 reads for leaders.md delete mode 100644 sources/talk/20200105 Friend of a Friend- The Facebook That Could Have Been.md delete mode 100644 sources/tech/20180727 How to analyze your system with perf and Python.md delete mode 100644 sources/tech/20181114 How to use systemd-nspawn for Linux system recovery.md delete mode 100644 sources/tech/20190105 Setting up an email server, part 1- The Forwarder.md delete mode 100644 sources/tech/20190107 DriveSync - Easy Way to Sync Files Between Local And Google Drive from Linux CLI.md delete mode 100644 sources/tech/20190107 How to manage your media with Kodi.md delete mode 100644 sources/tech/20190107 Testing isn-t everything.md delete mode 100644 sources/tech/20190108 Avoid package names like base, util, or common.md delete mode 100644 sources/tech/20190109 Automating deployment strategies with Ansible.md delete mode 100644 sources/tech/20190111 Build a retro gaming console with RetroPie.md delete mode 100644 sources/tech/20190116 GameHub - An Unified Library To Put All Games Under One Roof.md delete mode 100644 sources/tech/20190117 Pyvoc - A Command line Dictionary And Vocabulary Building Tool.md delete mode 100644 sources/tech/20190121 How to Resize OpenStack Instance (Virtual Machine) from Command line.md delete mode 100644 sources/tech/20190123 Dockter- A container image builder for researchers.md delete mode 100644 sources/tech/20190123 GStreamer WebRTC- A flexible solution to web-based media.md delete mode 100644 sources/tech/20190124 Orpie- A command-line reverse Polish notation calculator.md delete mode 100644 sources/tech/20190125 Using Antora for your open source documentation.md delete mode 100644 sources/tech/20190127 Eliminate error handling by eliminating errors.md delete mode 100644 sources/tech/20190129 A few early marketing thoughts.md delete mode 100644 sources/tech/20190129 A small notebook for a system administrator.md delete mode 100644 sources/tech/20190129 How To Configure System-wide Proxy Settings Easily And Quickly.md delete mode 100644 sources/tech/20190129 You shouldn-t name your variables after their types for the same reason you wouldn-t name your pets -dog- or -cat.md delete mode 100644 sources/tech/20190131 VA Linux- The Linux Company That Once Ruled NASDAQ.md delete mode 100644 sources/tech/20190202 CrossCode is an Awesome 16-bit Sci-Fi RPG Game.md delete mode 100644 sources/tech/20190204 Top 5 open source network monitoring tools.md delete mode 100644 sources/tech/20190205 12 Methods To Check The Hard Disk And Hard Drive Partition On Linux.md delete mode 100644 sources/tech/20190205 5 Linux GUI Cloud Backup Tools.md delete mode 100644 sources/tech/20190205 CFS- Completely fair process scheduling in Linux.md delete mode 100644 sources/tech/20190206 Flowblade 2.0 is Here with New Video Editing Tools and a Refreshed UI.md delete mode 100644 sources/tech/20190207 Review of Debian System Administrator-s Handbook.md delete mode 100644 sources/tech/20190211 How does rootless Podman work.md delete mode 100644 sources/tech/20190211 What-s the right amount of swap space for a modern Linux system.md delete mode 100644 sources/tech/20190212 Top 10 Best Linux Media Server Software.md delete mode 100644 sources/tech/20190217 Organizing this blog into categories.md delete mode 100644 sources/tech/20190218 Get started and organized with TiddlyWiki.md delete mode 100644 sources/tech/20190218 How To Restore Sudo Privileges To A User.md delete mode 100644 sources/tech/20190220 Automation evolution.md delete mode 100644 sources/tech/20190220 Decentralized Slack Alternative Riot Releases its First Stable Version.md delete mode 100644 sources/tech/20190220 Infrastructure monitoring- Defense against surprise downtime.md delete mode 100644 sources/tech/20190221 Some Incredible Stories Around Tux- Our Lovable Linux Mascot.md delete mode 100644 sources/tech/20190222 Q4OS Linux Revives Your Old Laptop with Windows- Looks.md delete mode 100644 sources/tech/20190225 How To Identify That The Linux Server Is Integrated With Active Directory (AD).md delete mode 100644 sources/tech/20190227 How to Display Weather Information in Ubuntu 18.04.md delete mode 100644 sources/tech/20190228 3 open source behavior-driven development tools.md delete mode 100644 sources/tech/20190228 MiyoLinux- A Lightweight Distro with an Old-School Approach.md delete mode 100644 sources/tech/20190304 What you need to know about Ansible modules.md delete mode 100644 sources/tech/20190305 How rootless Buildah works- Building containers in unprivileged environments.md delete mode 100644 sources/tech/20190305 Running the ‘Real Debian- on Raspberry Pi 3- -For DIY Enthusiasts.md delete mode 100644 sources/tech/20190306 Getting started with the Geany text editor.md delete mode 100644 sources/tech/20190311 Building the virtualization stack of the future with rust-vmm.md delete mode 100644 sources/tech/20190312 BackBox Linux for Penetration Testing.md delete mode 100644 sources/tech/20190312 Star LabTop Mk III Open Source Edition- An Interesting Laptop.md delete mode 100644 sources/tech/20190313 Game Review- Steel Rats is an Enjoyable Bike-Combat Game.md delete mode 100644 sources/tech/20190314 Open Source is Eating the Startup Ecosystem- A Guide for Assessing the Value Creation of Startups.md delete mode 100644 sources/tech/20190315 Getting started with PiFlash Booting your Raspberry Pi on Linux.md delete mode 100644 sources/tech/20190315 How to create portable documents with CBZ and DjVu.md delete mode 100644 sources/tech/20190315 Mageia Linux Is a Modern Throwback to the Underdog Days.md delete mode 100644 sources/tech/20190315 New zine- Bite Size Networking.md delete mode 100644 sources/tech/20190318 Building and augmenting libraries by calling Rust from JavaScript.md delete mode 100644 sources/tech/20190318 Install MEAN.JS Stack In Ubuntu 18.04 LTS.md delete mode 100644 sources/tech/20190318 Solus 4 ‘Fortitude- Released with Significant Improvements.md delete mode 100644 sources/tech/20190319 Five Commands To Use Calculator In Linux Command Line.md delete mode 100644 sources/tech/20190319 How To Set Up a Firewall with GUFW on Linux.md delete mode 100644 sources/tech/20190320 Choosing an open messenger client- Alternatives to WhatsApp.md delete mode 100644 sources/tech/20190320 Getting started with Jaeger to build an Istio service mesh.md delete mode 100644 sources/tech/20190320 Nuvola- Desktop Music Player for Streaming Services.md delete mode 100644 sources/tech/20190321 4 ways to jumpstart productivity at work.md delete mode 100644 sources/tech/20190321 How To Setup Linux Media Server Using Jellyfin.md delete mode 100644 sources/tech/20190321 How to use Spark SQL- A hands-on tutorial.md delete mode 100644 sources/tech/20190321 NVIDIA Jetson Nano is a -99 Raspberry Pi Rival for AI Development.md delete mode 100644 sources/tech/20190321 Top 10 New Linux SBCs to Watch in 2019.md delete mode 100644 sources/tech/20190322 How to Install OpenLDAP on Ubuntu Server 18.04.md delete mode 100644 sources/tech/20190322 How to set up Fedora Silverblue as a gaming station.md delete mode 100644 sources/tech/20190325 Backup on Fedora Silverblue with Borg.md delete mode 100644 sources/tech/20190325 Contribute at the Fedora Test Day for Fedora Modularity.md delete mode 100644 sources/tech/20190325 How Open Source Is Accelerating NFV Transformation.md delete mode 100644 sources/tech/20190325 Reducing sysadmin toil with Kubernetes controllers.md delete mode 100644 sources/tech/20190326 An inside look at an IIoT-powered smart factory.md delete mode 100644 sources/tech/20190326 Bringing Kubernetes to the bare-metal edge.md delete mode 100644 sources/tech/20190326 Changes in SD-WAN Purchase Drivers Show Maturity of the Technology.md delete mode 100644 sources/tech/20190326 How to use NetBSD on a Raspberry Pi.md delete mode 100644 sources/tech/20190326 Today-s Retailer is Turning to the Edge for CX.md delete mode 100644 sources/tech/20190326 Why are monoidal categories interesting.md delete mode 100644 sources/tech/20190327 Cisco forms VC firm looking to weaponize fledgling technology companies.md delete mode 100644 sources/tech/20190327 How to make a Raspberry Pi gamepad.md delete mode 100644 sources/tech/20190327 Identifying exceptional user experience (UX) in IoT platforms.md delete mode 100644 sources/tech/20190327 IoT roundup- Keeping an eye on energy use and Volkswagen teams with AWS.md delete mode 100644 sources/tech/20190327 Standardizing WASI- A system interface to run WebAssembly outside the web.md delete mode 100644 sources/tech/20190328 As memory prices plummet, PCIe is poised to overtake SATA for SSDs.md delete mode 100644 sources/tech/20190328 Elizabeth Warren-s right-to-repair plan fails to consider data from IoT equipment.md delete mode 100644 sources/tech/20190328 Microsoft introduces Azure Stack for HCI.md delete mode 100644 sources/tech/20190328 Motorola taps freed-up wireless spectrum for enterprise LTE networks.md delete mode 100644 sources/tech/20190328 Robots in Retail are Real- and so is Edge Computing.md delete mode 100644 sources/tech/20190329 How to submit a bug report with Bugzilla.md delete mode 100644 sources/tech/20190329 Russia demands access to VPN providers- servers.md delete mode 100644 sources/tech/20190329 ShadowReader- Serverless load tests for replaying production traffic.md delete mode 100644 sources/tech/20190401 Meta Networks builds user security into its Network-as-a-Service.md delete mode 100644 sources/tech/20190401 Top Ten Reasons to Think Outside the Router -2- Simplify and Consolidate the WAN Edge.md delete mode 100644 sources/tech/20190402 3 Essentials for Achieving Resiliency at the Edge.md delete mode 100644 sources/tech/20190402 Automate password resets with PWM.md delete mode 100644 sources/tech/20190402 How to Install and Configure Plex on Ubuntu Linux.md delete mode 100644 sources/tech/20190402 Intel-s Agilex FPGA family targets data-intensive workloads.md delete mode 100644 sources/tech/20190402 What are Ubuntu Repositories- How to enable or disable them.md delete mode 100644 sources/tech/20190402 Zero-trust- microsegmentation networking.md delete mode 100644 sources/tech/20190403 Intel unveils an epic response to AMD-s server push.md delete mode 100644 sources/tech/20190403 Top Ten Reasons to Think Outside the Router -1- It-s Time for a Router Refresh.md delete mode 100644 sources/tech/20190404 9 features developers should know about Selenium IDE.md delete mode 100644 sources/tech/20190404 Edge Computing is Key to Meeting Digital Transformation Demands - and Partnerships Can Help Deliver Them.md delete mode 100644 sources/tech/20190405 5 open source tools for teaching young children to read.md delete mode 100644 sources/tech/20190405 How to Authenticate a Linux Desktop to Your OpenLDAP Server.md delete mode 100644 sources/tech/20190408 Beyond SD-WAN- VMware-s vision for the network edge.md delete mode 100644 sources/tech/20190408 InitRAMFS, Dracut, and the Dracut Emergency Shell.md delete mode 100644 sources/tech/20190408 Performance-Based Routing (PBR) - The gold rush for SD-WAN.md delete mode 100644 sources/tech/20190409 AI Ops- Let the data talk.md delete mode 100644 sources/tech/20190409 Juniper opens SD-WAN service for the cloud.md delete mode 100644 sources/tech/20190409 UP Shell Script - Quickly Navigate To A Specific Parent Directory In Linux.md delete mode 100644 sources/tech/20190409 What it takes to become a blockchain developer.md delete mode 100644 sources/tech/20190410 How to enable serverless computing in Kubernetes.md delete mode 100644 sources/tech/20190411 How do you contribute to open source without code.md delete mode 100644 sources/tech/20190411 Managed, enabled, empowered- 3 dimensions of leadership in an open organization.md delete mode 100644 sources/tech/20190411 Testing Small Scale Scrum in the real world.md delete mode 100644 sources/tech/20190412 Designing posters with Krita, Scribus, and Inkscape.md delete mode 100644 sources/tech/20190412 How libraries are adopting open source.md delete mode 100644 sources/tech/20190412 Joe Doss- How Do You Fedora.md delete mode 100644 sources/tech/20190414 Working with Microsoft Exchange from your Linux Desktop.md delete mode 100644 sources/tech/20190415 Blender short film, new license for Chef, ethics in open source, and more news.md delete mode 100644 sources/tech/20190417 How to use Ansible to document procedures.md delete mode 100644 sources/tech/20190418 Electronics designed in 5 different countries with open hardware.md delete mode 100644 sources/tech/20190418 How to organize with Calculist- Ideas, events, and more.md delete mode 100644 sources/tech/20190418 Level up command-line playgrounds with WebAssembly.md delete mode 100644 sources/tech/20190418 Simplifying organizational change- A guide for the perplexed.md delete mode 100644 sources/tech/20190422 Strawberry- A Fork of Clementine Music Player.md delete mode 100644 sources/tech/20190425 Debian has a New Project Leader.md delete mode 100644 sources/tech/20190426 NomadBSD, a BSD for the Road.md delete mode 100644 sources/tech/20190429 Awk utility in Fedora.md delete mode 100644 sources/tech/20190502 Crowdsourcing license compliance with ClearlyDefined.md delete mode 100644 sources/tech/20190502 The making of the Breaking the Code electronic book.md delete mode 100644 sources/tech/20190503 Mirror your System Drive using Software RAID.md delete mode 100644 sources/tech/20190503 SuiteCRM- An Open Source CRM Takes Aim At Salesforce.md delete mode 100644 sources/tech/20190503 Tutanota Launches New Encrypted Tool to Support Press Freedom.md delete mode 100644 sources/tech/20190504 Fedora 30 Workstation Installation Guide with Screenshots.md delete mode 100644 sources/tech/20190504 May the fourth be with you- How Star Wars (and Star Trek) inspired real life tech.md delete mode 100644 sources/tech/20190505 -Review- Void Linux, a Linux BSD Hybrid.md delete mode 100644 sources/tech/20190505 Five Methods To Check Your Current Runlevel In Linux.md delete mode 100644 sources/tech/20190505 How To Navigate Directories Faster In Linux.md delete mode 100644 sources/tech/20190506 Use udica to build SELinux policy for containers.md delete mode 100644 sources/tech/20190507 Prefer table driven tests.md delete mode 100644 sources/tech/20190508 Innovations on the Linux desktop- A look at Fedora 30-s new features.md delete mode 100644 sources/tech/20190509 A day in the life of an open source performance engineering team.md delete mode 100644 sources/tech/20190509 Query freely available exchange rate data with ExchangeRate-API.md delete mode 100644 sources/tech/20190509 Red Hat Enterprise Linux (RHEL) 8 Installation Steps with Screenshots.md delete mode 100644 sources/tech/20190510 5 open source hardware products for the great outdoors.md delete mode 100644 sources/tech/20190510 Keeping an open source project alive when people leave.md delete mode 100644 sources/tech/20190512 How to Setup Local Yum-DNF Repository on RHEL 8 Server Using DVD or ISO File.md delete mode 100644 sources/tech/20190513 Manage business documents with OpenAS2 on Fedora.md delete mode 100644 sources/tech/20190514 Why bother writing tests at all.md delete mode 100644 sources/tech/20190515 How to manage access control lists with Ansible.md delete mode 100644 sources/tech/20190516 Create flexible web content with a headless management system.md delete mode 100644 sources/tech/20190516 System76-s secret sauce for success.md delete mode 100644 sources/tech/20190517 Announcing Enarx for running sensitive workloads.md delete mode 100644 sources/tech/20190519 The three Rs of remote work.md delete mode 100644 sources/tech/20190520 Blockchain 2.0 - Explaining Distributed Computing And Distributed Applications -Part 11.md delete mode 100644 sources/tech/20190520 How To Map Oracle ASM Disk Against Physical Disk And LUNs In Linux.md delete mode 100644 sources/tech/20190521 I don-t know how CPUs work so I simulated one in code.md delete mode 100644 sources/tech/20190522 Damn- Antergos Linux has been Discontinued.md delete mode 100644 sources/tech/20190522 How to Download and Use Ansible Galaxy Roles in Ansible Playbook.md delete mode 100644 sources/tech/20190523 Testing a Go-based S2I builder image.md delete mode 100644 sources/tech/20190524 Choosing the right model for maintaining and enhancing your IoT project.md delete mode 100644 sources/tech/20190527 4 open source mobile apps for Nextcloud.md delete mode 100644 sources/tech/20190527 Blockchain 2.0 - Introduction To Hyperledger Sawtooth -Part 12.md delete mode 100644 sources/tech/20190529 Packit - packaging in Fedora with minimal effort.md delete mode 100644 sources/tech/20190530 Creating a Source-to-Image build pipeline in OKD.md delete mode 100644 sources/tech/20190604 Aging in the open- How this community changed us.md delete mode 100644 sources/tech/20190604 ExamSnap Guide- 6 Excellent Resources for Microsoft 98-366- Networking Fundamentals Exam.md delete mode 100644 sources/tech/20190604 Four Ways To Install Security Updates On Red Hat (RHEL) And CentOS Systems.md delete mode 100644 sources/tech/20190604 Linux Shell Script To Monitor CPU Utilization And Send Email.md delete mode 100644 sources/tech/20190605 Tweaking the look of Fedora Workstation with themes.md delete mode 100644 sources/tech/20190606 Examples of blameless culture outside of DevOps.md delete mode 100644 sources/tech/20190606 Why hypothesis-driven development is key to DevOps.md delete mode 100644 sources/tech/20190607 An Introduction to Kubernetes Secrets and ConfigMaps.md delete mode 100644 sources/tech/20190610 Blockchain 2.0 - EOS.IO Is Building Infrastructure For Developing DApps -Part 13.md delete mode 100644 sources/tech/20190610 Constant Time.md delete mode 100644 sources/tech/20190611 Cisco software to make networks smarter, safer, more manageable.md delete mode 100644 sources/tech/20190611 How To Find Linux System Details Using inxi.md delete mode 100644 sources/tech/20190611 Step by Step Zorin OS 15 Installation Guide with Screenshots.md delete mode 100644 sources/tech/20190614 A data-centric approach to patching systems with Ansible.md delete mode 100644 sources/tech/20190614 Learning by teaching, and speaking, in open source.md delete mode 100644 sources/tech/20190617 KIT Scenarist is a Powerful Tool for Creating Screenplays.md delete mode 100644 sources/tech/20190618 Cylon - The Arch Linux Maintenance Program For Newbies.md delete mode 100644 sources/tech/20190618 How to use MapTool to build an interactive dungeon RPG.md delete mode 100644 sources/tech/20190619 11 Free and Open Source Video Editing Software.md delete mode 100644 sources/tech/20190620 How to SSH into a running container.md delete mode 100644 sources/tech/20190620 You can-t buy DevOps.md delete mode 100644 sources/tech/20190621 7 infrastructure performance and scaling tools you should be using.md delete mode 100644 sources/tech/20190621 The state of open source translation tools for contributors to your project.md delete mode 100644 sources/tech/20190623 What does debugging a program look like.md delete mode 100644 sources/tech/20190624 Check your password security with Have I Been Pwned- and pass.md delete mode 100644 sources/tech/20190624 How to Install and Configure KVM on RHEL 8.md delete mode 100644 sources/tech/20190625 The cost of JavaScript in 2019 - V8.md delete mode 100644 sources/tech/20190626 4 open source Android apps for writers.md delete mode 100644 sources/tech/20190626 How a trip to China inspired Endless OS and teaching kids to hack.md delete mode 100644 sources/tech/20190627 OpenAssessIt Tooklit helps improve website accessibility.md delete mode 100644 sources/tech/20190628 Get your work recognized- write a brag document.md delete mode 100644 sources/tech/20190630 Computational Photography.md delete mode 100644 sources/tech/20190701 How to use to infrastructure as code.md delete mode 100644 sources/tech/20190702 What makes a good code review in DevOps.md delete mode 100644 sources/tech/20190703 6 open source web browser alternatives.md delete mode 100644 sources/tech/20190703 Newsboat - A Command line RSS-Atom Feed Reader For Text Consoles.md delete mode 100644 sources/tech/20190704 How to be good at creating and maintaining systems at-large.md delete mode 100644 sources/tech/20190706 Youtube-dl Tutorial With Examples For Beginners.md delete mode 100644 sources/tech/20190708 The case for making the transition from sysadmin to DevOps engineer.md delete mode 100644 sources/tech/20190709 Clear is better than clever.md delete mode 100644 sources/tech/20190709 Open education- There isn-t an app for that.md delete mode 100644 sources/tech/20190710 Fedora job opening- Fedora Community Action and Impact Coordinator (FCAIC).md delete mode 100644 sources/tech/20190710 How to teach software engineering students about the enterprise.md delete mode 100644 sources/tech/20190710 You can tinker with this conference badge.md delete mode 100644 sources/tech/20190712 Certifications for DevOps engineers.md delete mode 100644 sources/tech/20190716 How to Use BleachBit to Optimize Ubuntu Linux.md delete mode 100644 sources/tech/20190716 Security scanning your DevOps pipeline.md delete mode 100644 sources/tech/20190717 Get going with EtherCalc, a web-based alternative to Google Sheets.md delete mode 100644 sources/tech/20190717 Start tinkering with the Circuit Playground Express.md delete mode 100644 sources/tech/20190718 How to apply -release early, release often- to build a better brand.md delete mode 100644 sources/tech/20190718 Redirect a GitHub Pages site with this HTTP hack.md delete mode 100644 sources/tech/20190719 Modifying Windows local accounts with Fedora and chntpw.md delete mode 100644 sources/tech/20190722 10 resources every sysadmin should know about.md delete mode 100644 sources/tech/20190722 Gift ideas for Sysadmin Appreciation Day.md delete mode 100644 sources/tech/20190722 System administrator responsibilities- 9 critical tasks.md delete mode 100644 sources/tech/20190723 8 Best Open Source CRM Software.md delete mode 100644 sources/tech/20190723 9 people for sysadmins to follow on Twitter.md delete mode 100644 sources/tech/20190723 Building an organization that-s always learning- Tips for leaders.md delete mode 100644 sources/tech/20190723 JavaScript-s surprising rise from the ashes of the browser wars on Command Line Heroes.md delete mode 100644 sources/tech/20190724 Introducing Fedora CoreOS.md delete mode 100644 sources/tech/20190726 The Future Of Red Hat At IBM.md delete mode 100644 sources/tech/20190726 What does it mean to be a sysadmin hero.md delete mode 100644 sources/tech/20190729 3 commands to reboot Linux (plus 4 more ways to do it safely).md delete mode 100644 sources/tech/20190801 GitHub Pages is a CI-CD pipeline.md delete mode 100644 sources/tech/20190802 Getting started with the BBC Microbit.md delete mode 100644 sources/tech/20190802 New research article type embeds live code and data.md delete mode 100644 sources/tech/20190802 Understanding file paths and how to use them in Linux.md delete mode 100644 sources/tech/20190804 Learn how to Install LXD - LXC Containers in Ubuntu.md delete mode 100644 sources/tech/20190805 How To Magnify Screen Areas On Linux Desktop.md delete mode 100644 sources/tech/20190805 How To Screenshot Right Click Context Menu On Linux.md delete mode 100644 sources/tech/20190805 Navigating the filesystem with relative paths at the command line.md delete mode 100644 sources/tech/20190805 What-s your favorite open source BI software.md delete mode 100644 sources/tech/20190806 3 tools for doing presentations from the command line.md delete mode 100644 sources/tech/20190806 Avoiding burnout- 4 considerations for a more energetic organization.md delete mode 100644 sources/tech/20190806 Bash Script to Automatically Start a Services When it Goes Down on Linux.md delete mode 100644 sources/tech/20190806 Linux Mint 19.2 -Tina- Released- Here-s What-s New and How to Get it.md delete mode 100644 sources/tech/20190807 Navigating the Bash shell with pushd and popd.md delete mode 100644 sources/tech/20190811 How to Setup Disk Quota on XFS File System in Linux Servers.md delete mode 100644 sources/tech/20190812 What open source is not.md delete mode 100644 sources/tech/20190813 A comprehensive guide to agile project management.md delete mode 100644 sources/tech/20190813 Apache Hive vs. Apache HBase- Which is the query performance champion.md delete mode 100644 sources/tech/20190813 How to Install - Use VirtualBox Guest Additions on Ubuntu.md delete mode 100644 sources/tech/20190813 To equip tomorrow-s cybersecurity experts, we-ll need an open approach.md delete mode 100644 sources/tech/20190814 4 misconceptions about ethics and bias in AI.md delete mode 100644 sources/tech/20190814 Taz Brown- How Do You Fedora.md delete mode 100644 sources/tech/20190815 Clementine Music Player for All Your Audio Needs.md delete mode 100644 sources/tech/20190815 How To Type Indian Rupee Sign (-) In Linux.md delete mode 100644 sources/tech/20190815 How to create a vanity Tor .onion web address.md delete mode 100644 sources/tech/20190815 Keeping track of Linux users- When do they log in and for how long.md delete mode 100644 sources/tech/20190816 Designing open audio hardware as DIY kits.md delete mode 100644 sources/tech/20190816 How to encrypt files with gocryptfs on Linux.md delete mode 100644 sources/tech/20190816 How to plan your next IT career move.md delete mode 100644 sources/tech/20190817 Share Your Keyboard and Mouse Between Linux and Raspberry Pi.md delete mode 100644 sources/tech/20190818 How to Create Availability Zones in OpenStack from Command Line.md delete mode 100644 sources/tech/20190819 An introduction to bpftrace for Linux.md delete mode 100644 sources/tech/20190820 A brief introduction to learning agility.md delete mode 100644 sources/tech/20190820 A project manager-s guide to Ansible.md delete mode 100644 sources/tech/20190820 Go compiler intrinsics.md delete mode 100644 sources/tech/20190821 5 notable open source 3D printers.md delete mode 100644 sources/tech/20190821 Build a distributed NoSQL database with Apache Cassandra.md delete mode 100644 sources/tech/20190821 Open Policy Agent- Cloud-native security and compliance.md delete mode 100644 sources/tech/20190823 Dive into the life and legacy of Alan Turing- 5 books and more.md delete mode 100644 sources/tech/20190823 Four Ways to Check How Long a Process Has Been Running in Linux.md delete mode 100644 sources/tech/20190826 Using variables in Bash.md delete mode 100644 sources/tech/20190827 Best Email Services For Privacy Concerned People.md delete mode 100644 sources/tech/20190828 Introduction to the Linux chmod command.md delete mode 100644 sources/tech/20190828 Using GNS3 with Fedora.md delete mode 100644 sources/tech/20190828 What are environment variables in Bash.md delete mode 100644 sources/tech/20190829 Variables in PowerShell.md delete mode 100644 sources/tech/20190829 What is an Object in Java.md delete mode 100644 sources/tech/20190830 Command line quick tips- Using pipes to connect tools.md delete mode 100644 sources/tech/20190901 How to write zines with simple tools.md delete mode 100644 sources/tech/20190903 Get a Preconfigured Tiling Window Manager on Ubuntu With Regolith.md delete mode 100644 sources/tech/20190903 Humbleness key to open source success, Kubernetes security struggles, and more industry trends.md delete mode 100644 sources/tech/20190904 Environment variables in PowerShell.md delete mode 100644 sources/tech/20190905 Don-t force allocations on the callers of your API.md delete mode 100644 sources/tech/20190906 Introduction to monitoring with Pandora FMS.md delete mode 100644 sources/tech/20190906 Performing storage management tasks in Cockpit.md delete mode 100644 sources/tech/20190911 How to Collect System and Application Metrics using Metricbeat.md delete mode 100644 sources/tech/20190912 New zine- HTTP- Learn your browser-s language.md delete mode 100644 sources/tech/20190916 Constraint programming by example.md delete mode 100644 sources/tech/20190916 The Emacs Series Exploring ts.el.md delete mode 100644 sources/tech/20190917 Talking to machines- Lisp and the origins of AI.md delete mode 100644 sources/tech/20190917 What-s Good About TensorFlow 2.0.md delete mode 100644 sources/tech/20190919 An introduction to audio processing and machine learning using Python.md delete mode 100644 sources/tech/20190919 Why it-s time to embrace top-down cybersecurity practices.md delete mode 100644 sources/tech/20190920 Deep Learning Based Chatbots are Smarter.md delete mode 100644 sources/tech/20190920 Euler-s Identity Really is a Miracle, Too.md delete mode 100644 sources/tech/20190920 How to compare strings in Java.md delete mode 100644 sources/tech/20190920 Managing network interfaces and FirewallD in Cockpit.md delete mode 100644 sources/tech/20190921 Top Open Source Video Players for Linux.md delete mode 100644 sources/tech/20190924 A human approach to reskilling in the age of AI.md delete mode 100644 sources/tech/20190924 CodeReady Containers- complex solutions on OpenShift - Fedora.md delete mode 100644 sources/tech/20190925 Mutation testing by example- Execute the test.md delete mode 100644 sources/tech/20190926 3 open source social platforms to consider.md delete mode 100644 sources/tech/20190926 Mutation testing by example- Evolving from fragile TDD.md delete mode 100644 sources/tech/20190928 Microsoft open sourcing its C-- library, Cloudera-s open source data platform, new tools to remove leaked passwords on GitHub and combat ransomware, and more open source news.md delete mode 100644 sources/tech/20190929 Open Source Voice Chat Mumble Makes a Big Release After 10 Years.md delete mode 100644 sources/tech/20190930 Cacoo- A Lightweight Online Tool for Modelling AWS Architecture.md delete mode 100644 sources/tech/20191001 How to create the data structure for a Corteza Low Code application.md delete mode 100644 sources/tech/20191001 The Best Android Apps for Protecting Privacy and Keeping Information Secure.md delete mode 100644 sources/tech/20191002 How to create the user interface for your Corteza Low Code application.md delete mode 100644 sources/tech/20191003 Creating a perfect landing page for free.md delete mode 100644 sources/tech/20191003 SQL queries don-t start with SELECT.md delete mode 100644 sources/tech/20191006 Use internal packages to reduce your public API surface.md delete mode 100644 sources/tech/20191007 20 Linux Command Tips and Tricks That Will Save You A Lot of Time.md delete mode 100644 sources/tech/20191007 Introduction to open source observability on Kubernetes.md delete mode 100644 sources/tech/20191007 Understanding Joins in Hadoop.md delete mode 100644 sources/tech/20191008 Bringing Some Order into a Collection of Photographs.md delete mode 100644 sources/tech/20191009 Start developing in the cloud with Eclipse Che IDE.md delete mode 100644 sources/tech/20191009 The Emacs Series ht.el- The Hash Table Library for Emacs.md delete mode 100644 sources/tech/20191010 Achieve high-scale application monitoring with Prometheus.md delete mode 100644 sources/tech/20191013 Sugarizer- The Taste of Sugar on Any Device.md delete mode 100644 sources/tech/20191014 My Linux story- I grew up on PC Magazine not candy.md delete mode 100644 sources/tech/20191015 Formatting NFL data for doing data science with Python.md delete mode 100644 sources/tech/20191018 Perceiving Python programming paradigms.md delete mode 100644 sources/tech/20191022 Beginner-s Guide to Handle Various Update Related Errors in Ubuntu.md delete mode 100644 sources/tech/20191022 How collaboration fueled a development breakthrough at Greenpeace.md delete mode 100644 sources/tech/20191022 NGT- A library for high-speed approximate nearest neighbor search.md delete mode 100644 sources/tech/20191023 Best practices in test-driven development.md delete mode 100644 sources/tech/20191024 The Five Most Popular Operating Systems for the Internet of Things.md delete mode 100644 sources/tech/20191026 How to Backup Configuration Files on a Remote System Using the Bash Script.md delete mode 100644 sources/tech/20191028 Enterprise JavaBeans, infrastructure predictions, and more industry trends.md delete mode 100644 sources/tech/20191029 Demystifying namespaces and containers in Linux.md delete mode 100644 sources/tech/20191030 Test automation without assertions for web development.md delete mode 100644 sources/tech/20191031 Looping your way through bash.md delete mode 100644 sources/tech/20191104 How to Add Windows and Linux host to Nagios Server for Monitoring.md delete mode 100644 sources/tech/20191106 An introduction to monitoring with Prometheus.md delete mode 100644 sources/tech/20191107 A guide to open source for microservices.md delete mode 100644 sources/tech/20191108 Managing software and services with Cockpit.md delete mode 100644 sources/tech/20191110 How to Create Affinity and Anti-Affinity Policy in OpenStack.md delete mode 100644 sources/tech/20191111 3 approaches to secrets management for Flatpak applications.md delete mode 100644 sources/tech/20191111 Bash Script to Monitor Disk Space Usage on Multiple Remote Linux Systems With eMail Alert.md delete mode 100644 sources/tech/20191111 The Top Nine Open Source Cloud Management Platforms.md delete mode 100644 sources/tech/20191111 Understanding -disk space math.md delete mode 100644 sources/tech/20191112 8 great podcasts for open source enthusiasts.md delete mode 100644 sources/tech/20191114 Creating Custom Themes in Drupal 8.md delete mode 100644 sources/tech/20191115 PyRadio- An open source alternative for internet radio.md delete mode 100644 sources/tech/20191116 Troubleshooting -E- Unable to locate package- Error on Ubuntu -Beginner-s Tutorial.md delete mode 100644 sources/tech/20191118 How to use regular expressions in awk.md delete mode 100644 sources/tech/20191118 Some notes on vector drawing apps.md delete mode 100644 sources/tech/20191119 App Highlight- Flameshot for Taking and Editing Screenshots.md delete mode 100644 sources/tech/20191119 Container reality checks and more industry trends.md delete mode 100644 sources/tech/20191119 Loops in Emacs Lisp.md delete mode 100644 sources/tech/20191119 What is a community of practice in an open organization.md delete mode 100644 sources/tech/20191120 Set up single sign-on for Fedora Project services.md delete mode 100644 sources/tech/20191120 Tools that Accelerate a Newbie-s Understanding of Machine Learning.md delete mode 100644 sources/tech/20191120 Troubleshooting PCIe Bus Error severity Corrected on Ubuntu and Linux Mint.md delete mode 100644 sources/tech/20191122 How to use Bitwarden for password protection on Active Directory.md delete mode 100644 sources/tech/20191125 25 Raspberry Pi Project Ideas to Put Your Pi to Some Good Use.md delete mode 100644 sources/tech/20191125 Challenge- Write a bouncy window manager.md delete mode 100644 sources/tech/20191126 App Highlight- Penguin Subtitle Player for Adding Subtitles to Online Videos.md delete mode 100644 sources/tech/20191126 Make Lua development easy with Luarocks.md delete mode 100644 sources/tech/20191127 How to Manage Remote Windows Host using Ansible.md delete mode 100644 sources/tech/20191129 Holiday gift guide- Books for the learner, explorer, or tinkerer on your list.md delete mode 100644 sources/tech/20191201 Modernize your Linux desktop with Enlightenment.md delete mode 100644 sources/tech/20191202 Holiday gift guide- Linux and open source tech gadgets.md delete mode 100644 sources/tech/20191203 App Highlight- Caligator is a Beautiful Calculator - Converter.md delete mode 100644 sources/tech/20191203 Bash Script to Check Successful and Failed User Login Attempts on Linux.md delete mode 100644 sources/tech/20191203 How to write a security integration module for Ansible.md delete mode 100644 sources/tech/20191203 Solutions to the tiny window manager challenge.md delete mode 100644 sources/tech/20191204 4 ways to control the flow of your awk script.md delete mode 100644 sources/tech/20191204 Complementary engineering indicators.md delete mode 100644 sources/tech/20191204 Spice up your Linux desktop with Cinnamon.md delete mode 100644 sources/tech/20191205 Challenge- find Twitter memes with suffix arrays.md delete mode 100644 sources/tech/20191206 A beginner-s guide to using Vagrant.md delete mode 100644 sources/tech/20191208 8 Best Open Source Accounting Software.md delete mode 100644 sources/tech/20191208 Dynamically scoped variables in Go.md delete mode 100644 sources/tech/20191208 Why choose Xfce for your lightweight Linux desktop.md delete mode 100644 sources/tech/20191210 App Highlight- Open Source Video Transcoder Handbrake.md delete mode 100644 sources/tech/20191211 Revamp your old Linux desktop with Joe-s Window Manager.md delete mode 100644 sources/tech/20191212 15 Useful Firefox Keyboard Shortcuts You Should Know.md delete mode 100644 sources/tech/20191213 How to generate code with Apache Velocity.md delete mode 100644 sources/tech/20191213 Why you need to know about Seeed hardware devices.md delete mode 100644 sources/tech/20191215 Customize your Linux desktop with the Trinity Desktop Environment.md delete mode 100644 sources/tech/20191216 Setting up the sway window manager on Fedora.md delete mode 100644 sources/tech/20191218 Emacs for Vim users- Getting started with the Spacemacs text editor.md delete mode 100644 sources/tech/20191218 How to tell if you-re using a bash builtin in Linux.md delete mode 100644 sources/tech/20191218 Introduction to automation with Bash scripts.md delete mode 100644 sources/tech/20191218 Linux desktops for minimalists- Getting started with LXQt and LXDE.md delete mode 100644 sources/tech/20191218 Make sysadmin work on Fedora easier with screen.md delete mode 100644 sources/tech/20191219 An Actionable Guide to Enhance Your Online Privacy With Tor.md delete mode 100644 sources/tech/20191219 Creating a Bash script template.md delete mode 100644 sources/tech/20191219 Go mouseless with the Linux Ratpoison window manager.md delete mode 100644 sources/tech/20191220 How to add a Help facility to your Bash program.md delete mode 100644 sources/tech/20191221 Testing your Bash script.md delete mode 100644 sources/tech/20191222 Create a unique Linux experience with the Unix Desktop Environment.md delete mode 100644 sources/tech/20191223 10 resources to become a better Bash user.md delete mode 100644 sources/tech/20191223 Best of 2019- Fedora for system administrators.md delete mode 100644 sources/tech/20191223 Get back to basics with the TWM Linux desktop.md delete mode 100644 sources/tech/20191225 12 open source resources for kids and young adults.md delete mode 100644 sources/tech/20191225 5 security tips from Santa.md delete mode 100644 sources/tech/20191225 Khadas VIM3L- An Open Source HTPC Device.md delete mode 100644 sources/tech/20191226 -server- is hard to define.md delete mode 100644 sources/tech/20191226 10 articles to become more data science savvy.md delete mode 100644 sources/tech/20191226 Top 10 Raspberry Pi articles of 2019.md delete mode 100644 sources/tech/20191227 2019- Year in review.md delete mode 100644 sources/tech/20191228 Most-read open source news stories of 2019.md delete mode 100644 sources/tech/20191230 8 must-read DevOps articles for success in 2020.md delete mode 100644 sources/tech/20191231 7 resources to grow your Java skills.md delete mode 100644 sources/tech/20200102 10 open source software alternatives for the new year.md delete mode 100644 sources/tech/20200120 Use Wireshark at the Linux command line with TShark.md delete mode 100644 sources/tech/20200316 How to upload an OpenStack disk image to Glance.md delete mode 100644 sources/tech/20201028 Program in Arm6 assembly language on a Raspberry Pi.md delete mode 100644 sources/tech/20201217 How to hack Android Auto to display custom content.md delete mode 100644 sources/tech/20210209 Try Deno as an alternative to Node.js.md delete mode 100644 translated/tech/20190102 Fedora classroom- LaTeX 101 for beginners.md diff --git a/sources/news/20200820 Rejoice KDE Lovers- MX Linux Joins the KDE Bandwagon and Now You Can Download MX Linux KDE Edition.md b/sources/news/20200820 Rejoice KDE Lovers- MX Linux Joins the KDE Bandwagon and Now You Can Download MX Linux KDE Edition.md deleted file mode 100644 index d5fcf0d379..0000000000 --- a/sources/news/20200820 Rejoice KDE Lovers- MX Linux Joins the KDE Bandwagon and Now You Can Download MX Linux KDE Edition.md +++ /dev/null @@ -1,91 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Rejoice KDE Lovers! MX Linux Joins the KDE Bandwagon and Now You Can Download MX Linux KDE Edition) -[#]: via: (https://itsfoss.com/mx-linux-kde-edition/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Rejoice KDE Lovers! MX Linux Joins the KDE Bandwagon and Now You Can Download MX Linux KDE Edition -====== - -Debian-based [MX Linux][1] is already an impressive Linux distribution with [Xfce desktop environment][2] as the default. Even though it works good and is suitable to run with minimal hardware configuration, it still isn’t the best Linux distribution in terms of eye candy. - -That’s where KDE comes to the rescue. Of late, KDE Plasma has reduced a lot of weight and it uses fewer system resources without compromising on the modern looks. No wonder KDE Plasma is one of [the best desktop environments][3] out there. - -![][4] - -With [MX Linux 19.2][5], they began testing a KDE edition and have finally released their first KDE version. - -Also, the KDE edition comes with Advanced Hardware Support (AHS) enabled. Here’s what they have mentioned in their release notes: - -> MX-19.2 KDE is an **Advanced Hardware Support (AHS) **enabled **64-bit only** version of MX featuring the KDE/plasma desktop. Applications utilizing Qt library frameworks are given a preference for inclusion on the iso. - -As I mentioned it earlier, this is MX Linux’s first KDE edition ever, and they’ve also shed some light on it with the announcement as well: - -> This will be first officially supported MX/antiX family iso utilizing the KDE/plasma desktop since the halting of the predecessor MEPIS project in 2013. - -Personally, I enjoyed the experience of using MX Linux until I started using [Pop OS 20.04][6]. So, I’ll give you some key highlights of MX Linux 19.2 KDE edition along with my impressions of testing it. - -### MX Linux 19.2 KDE: Overview - -![][7] - -Out of the box, MX Linux looks cleaner and more attractive with KDE desktop on board. Unlike KDE Neon, it doesn’t feature the latest and greatest KDE stuff, but it looks to be doing the job intended. - -Of course, you will get the same options that you expect from a KDE-powered distro to customize the look and feel of your desktop. In addition to the obvious KDE perks, you will also get the usual MX tools, antiX-live-usb-system, and snapshot feature that comes baked in the Xfce edition. - -It’s a great thing to have the best of both worlds here, as stated in their announcement: - -> MX-19.2 KDE includes the usual MX tools, antiX-live-usb-system, and snapshot technology that our users have come to expect from our standard flagship Xfce releases. Adding KDE/plasma to the existing Xfce/MX-fluxbox desktops will provide for a wider range user needs and wants. - -I haven’t performed a great deal of tests but I did have some issues with extracting archives (it didn’t work the first try) and copy-pasting a file to a new location. Not sure if those are some known bugs — but I thought I should let you know here. - -![][8] - -Other than that, it features every useful tool you’d want to have and works great. With KDE on board, it actually feels more polished and smooth in my case. - -Along with KDE Plasma 5.14.5 on top of Debian 10 “buster”, it also comes with GIMP 2.10.12, MESA, Debian (AHS) 5.6 Kernel, Firefox browser, and few other goodies like VLC, Thunderbird, LibreOffice, and Clementine music player. - -You can also look for more stuff in the MX repositories. - -![][9] - -There are some known issues with the release like the System clock settings not being able adjustable via KDE settings. You can check their [announcement post][10] for more information or their [bug list][11] to make sure everything’s fine before trying it out on your production system. - -### Wrapping Up - -MX Linux 19.2 KDE edition is definitely more impressive than its Xfce offering in my opinion. It would take a while to iron out the bugs for this first KDE release — but it’s not a bad start. - -Speaking of KDE, I recently tested out KDE Neon, the official KDE distribution. I shared my experience in this video. I’ll try to do a video on MX Linux KDE flavor as well. - -[Subscribe to our YouTube channel for more Linux videos][12] - -Have you tried it yet? Let me know your thoughts in the comments below! - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/mx-linux-kde-edition/ - -作者:[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://mxlinux.org/ -[2]: https://www.xfce.org/ -[3]: https://itsfoss.com/best-linux-desktop-environments/ -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/mx-linux-kde-edition.jpg?resize=800%2C450&ssl=1 -[5]: https://mxlinux.org/blog/mx-19-2-now-available/ -[6]: https://itsfoss.com/pop-os-20-04-review/ -[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/08/mx-linux-19-2-kde.jpg?resize=800%2C452&ssl=1 -[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/mx-linux-19-2-kde-filemanager.jpg?resize=800%2C452&ssl=1 -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/08/mx-linux-19-2-kde-info.jpg?resize=800%2C452&ssl=1 -[10]: https://mxlinux.org/blog/mx-19-2-kde-now-available/ -[11]: https://bugs.mxlinux.org/ -[12]: https://www.youtube.com/c/itsfoss?sub_confirmation=1 diff --git a/sources/news/20200822 Cisco open-source code boosts performance of Kubernetes apps over SD-WAN.md b/sources/news/20200822 Cisco open-source code boosts performance of Kubernetes apps over SD-WAN.md deleted file mode 100644 index 72ce014ff4..0000000000 --- a/sources/news/20200822 Cisco open-source code boosts performance of Kubernetes apps over SD-WAN.md +++ /dev/null @@ -1,66 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Cisco open-source code boosts performance of Kubernetes apps over SD-WAN) -[#]: via: (https://www.networkworld.com/article/3572310/cisco-open-source-code-boosts-performance-of-kubernetes-apps-over-sd-wan.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -Cisco open-source code boosts performance of Kubernetes apps over SD-WAN -====== -Cisco's Cloud-Native SD-WAN project marries SD-WANs to Kubernetes applications to cut down on the manual work needed to optimize latency and packet loss. -Thinkstock - -Cisco has introduced an open-source project that it says could go a long way toward reducing the manual work involved in optimizing performance of Kubernetes-applications across [SD-WANs][1]. - -Cisco said it launched the Cloud-Native SD-WAN (CN-WAN) project to show how Kubernetes applications can be automatically mapped to SD-WAN with the result that the applications perform better over the WAN. - -**More about SD-WAN**: [How to buy SD-WAN technology: Key questions to consider when selecting a supplier][2] • [How to pick an off-site data-backup method][3] •  [SD-Branch: What it is and why you’ll need it][4] • [What are the options for security SD-WAN?][5] - -“In many cases, enterprises deploy an SD-WAN to connect a Kubernetes cluster with users or workloads that consume cloud-native applications. In a typical enterprise, NetOps teams leverage their network expertise to program SD-WAN policies to optimize general connectivity to the Kubernetes hosted applications, with the goal to reduce latency, reduce packet loss, etc.” wrote John Apostolopoulos, vice president and CTO of Cisco’s intent-based networking group in a group [blog][6]. - -“The enterprise usually also has DevOps teams that maintain and optimize the Kubernetes infrastructure. However, despite the efforts of NetOps and DevOps teams, today Kubernetes and SD-WAN operate mostly like ships in the night, often unaware of each other. Integration between SD-WAN and Kubernetes typically involves time-consuming manual coordination between the two teams.” - -Current SD-WAN offering often have APIs that let customers programmatically influence how their traffic is handled over the WAN. This enables interesting and valuable opportunities for automation and application optimization, Apostolopoulos stated.  “We believe there is an opportunity to pair the declarative nature of Kubernetes with the programmable nature of modern SD-WAN solutions,”  he stated. - -Enter CN-WAN, which defines a set of components that can be used to integrate an SD-WAN package, such as Cisco Viptela SD-WAN, with Kubernetes to enable DevOps teams to express the WAN needs of the microservices they deploy in a Kubernetes cluster, while simultaneously letting NetOps automatically render the microservices needs to optimize the application performance over the WAN, Apostolopoulos stated. - -Apostolopoulos wrote that CN-WAN is composed of a Kubernetes Operator, a Reader, and an Adaptor. It works like this: The CN-WAN Operator runs in the Kubernetes cluster, actively monitoring the deployed services. DevOps teams can use standard Kubernetes annotations on the services to define WAN-specific metadata, such as the traffic profile of the application. The CN-WAN Operator then automatically registers the service along with the metadata in a service registry. In a demo at KubeCon EU this week Cisco used Google Service Directory as the service registry. - -Earlier this year [Cisco and Google][7] deepened their relationship with a turnkey package that lets customers mesh SD-WAN connectivity with applications running in a private [data center][8], Google Cloud or another cloud or SaaS application. That jointly developed platform, called Cisco SD-WAN Cloud Hub with Google Cloud, combines Cisco’s SD-WAN policy-, telemetry- and security-setting capabilities with Google's software-defined backbone to ensure that application service-level agreement, security and compliance policies are extended across the network. - -Meanwhile, on the SD-WAN side, the CN-WAN Reader connects to the service registry to learn about how Kubernetes is exposing the services and the associated WAN metadata extracted by the CN-WAN operator, Cisco stated. When new or updated services or metadata are detected, the CN-WAN Reader sends a message towards the CN-WAN Adaptor so SD-WAN policies can be updated. - -Finally, the CN-WAN Adaptor, maps the service-associated metadata into the detailed SD-WAN policies programmed by NetOps in the SD-WAN controller. The SD-WAN controller automatically renders the SD-WAN policies, specified by the NetOps for each metadata type, into specific SD-WAN data-plane optimizations for the service, Cisco stated.   - -“The SD-WAN may support multiple types of access at both sender and receiver (e.g., wired Internet, MPLS, wireless 4G or 5G), as well as multiple service options and prioritizations per access network, and of course multiple paths between source and destination,” Apostolopoulos stated. - -The code for the CN-WAN project is available as open-source in [GitHub][9]. - -Join the Network World communities on [Facebook][10] and [LinkedIn][11] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3572310/cisco-open-source-code-boosts-performance-of-kubernetes-apps-over-sd-wan.html - -作者:[Michael Cooney][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://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3031279/sd-wan-what-it-is-and-why-you-ll-use-it-one-day.html -[2]: https://www.networkworld.com/article/3323407/sd-wan/how-to-buy-sd-wan-technology-key-questions-to-consider-when-selecting-a-supplier.html -[3]: https://www.networkworld.com/article/3328488/backup-systems-and-services/how-to-pick-an-off-site-data-backup-method.html -[4]: https://www.networkworld.com/article/3250664/lan-wan/sd-branch-what-it-is-and-why-youll-need-it.html -[5]: https://www.networkworld.com/article/3285728/sd-wan/what-are-the-options-for-securing-sd-wan.html -[6]: https://blogs.cisco.com/networking/introducing-the-cloud-native-sd-wan-project -[7]: https://www.networkworld.com/article/3539252/cisco-integrates-sd-wan-connectivity-with-google-cloud.html -[8]: https://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html -[9]: https://github.com/CloudNativeSDWAN/cnwan-docs -[10]: https://www.facebook.com/NetworkWorld/ -[11]: https://www.linkedin.com/company/network-world diff --git a/sources/news/20201014 KDE Plasma 5.20 is Here With Exciting Improvements.md b/sources/news/20201014 KDE Plasma 5.20 is Here With Exciting Improvements.md deleted file mode 100644 index 2572d75bba..0000000000 --- a/sources/news/20201014 KDE Plasma 5.20 is Here With Exciting Improvements.md +++ /dev/null @@ -1,122 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (KDE Plasma 5.20 is Here With Exciting Improvements) -[#]: via: (https://itsfoss.com/kde-plasma-5-20/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -KDE Plasma 5.20 is Here With Exciting Improvements -====== - -KDE Plasma 5.20 is finally here and there’s a lot of things to be excited about, including the new wallpaper ‘**Shell’** by Lucas Andrade. - -It is worth noting that is not an LTS release unlike [KDE Plasma 5.18][1] and will be maintained for the next 4 months or so. So, if you want the latest and greatest, you can surely go ahead and give it a try. - -In this article, I shall mention the key highlights of KDE Plasma 5.20 from [my experience with it on KDE Neon][2] (Testing Edition). - -![][3] - -### Plasma 5.20 Features - -If you like to see things in action, we made a feature overview video for you. - -[Subscribe to our YouTube channel for more Linux videos][4] - -#### Icon-only Taskbar - -![][5] - -You must be already comfortable with a taskbar that mentions the title of the window along the icon. However, that takes a lot of space in the taskbar, which looks bad when you want to have a clean look with multiple applications/windows opened. - -Not just limited to that, if you launch several windows of the same application, it will group them together and let you cycle through it from a single icon on the task bar. - -So, with this update, you get an icon-only taskbar by default which makes it look a lot cleaner and you can have more things in the taskbar at a glance. - -#### Digital Clock Applet with Date - -![][6] - -If you’ve used any KDE-powered distro, you must have noticed that the digital clock applet (in the bottom-right corner) displays the time but not the date by default. - -It’s always a good choice to have the date and time as well (at least I prefer that). So, with KDE Plasma 5.20, the applet will have both time and date. - -#### Get Notified When your System almost Runs out of Space - -I know this is not a big addition, but a necessary one. No matter whether your home directory is on a different partition, you will be notified when you’re about to run out of space. - -#### Set the Charge Limit Below 100% - -You are in for a treat if you are a laptop user. To help you preserve the battery health, you can now set a charge limit below 100%. I couldn’t show it to you because I use a desktop. - -#### Workspace Improvements - -Working with the workspaces on KDE desktop was already an impressive experience, now with the latest update, several tweaks have been made to take the user experience up a notch. - -To start with, the system tray has been overhauled with a grid-like layout replacing the list view. - -The default shortcut has been re-assigned with Meta+drag instead of Alt+drag to move/re-size windows to avoid conflicts with some other productivity apps with Alt+drag keybind support. You can also use the key binds like Meta + up/left/down arrow to corner-tile windows. - -![][7] - -It is also easier to list all the disks using the old “**Device Notifier**” applet, which has been renamed to “**Disks & Devices**“. - -If that wasn’t enough, you will also find improvements to [KRunner][8], which is the essential application launcher or search utility for users. It will now remember the search text history and you can also have it centered on the screen instead of having it on top of the screen. - -#### System Settings Improvements - -The look and feel of the system setting is the same but it is more useful now. You will notice a new “**Highlight changed settings**” option which will show you the recent/modified changes when compared to the default values. - -So, in that way, you can monitor any changes that you did accidentally or if someone else did it. - -![][9] - -In addition to that, you also get to utilize S.M.A.R.T monitoring and disk failure notifications. - -#### Wayland Support Improvements - -If you prefer to use a Wayland session, you will be happy to know that it now supports [Klipper][10] and you can also middle-click to paste (on KDE apps only for the time being). - -The much-needed screencasting support has also been added. - -#### Other Improvements - -Of course, you will notice some subtle visual improvements or adjustments for the look and feel. You may notice a smooth transition effect when changing the brightness. Similarly, when changing the brightness or volume, the on-screen display that pops up is now less obtrusive - -Options like controlling the scroll speed of mouse/touchpad have been added to give you finer controls. - -You can find the detailed list of changes in its [official changelog][11], if you’re curious. - -### Wrapping Up - -The changes are definitely impressive and should make the KDE experience better than ever before. - -If you’re running KDE Neon, you should get the update soon. But, if you are on Kubuntu, you will have to try the 20.10 ISO to get your hands on Plasma 5.20. - -What do you like the most among the list of changes? Have you tried it yet? Let me know your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/kde-plasma-5-20/ - -作者:[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/kde-plasma-5-18-release/ -[2]: https://itsfoss.com/kde-neon-review/ -[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/kde-plasma-5-20-feat.png?resize=800%2C394&ssl=1 -[4]: https://www.youtube.com/c/itsfoss?sub_confirmation=1 -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/kde-plasma-5-20-taskbar.jpg?resize=472%2C290&ssl=1 -[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/kde-plasma-5-20-clock.jpg?resize=372%2C224&ssl=1 -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/kde-plasma-5-20-notify.jpg?resize=800%2C692&ssl=1 -[8]: https://docs.kde.org/trunk5/en/kde-workspace/plasma-desktop/krunner.html -[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/plasma-disks-smart.png?resize=800%2C539&ssl=1 -[10]: https://userbase.kde.org/Klipper -[11]: https://kde.org/announcements/plasma-5.20.0 diff --git a/sources/talk/20190111 What metrics matter- A guide for open source projects.md b/sources/talk/20190111 What metrics matter- A guide for open source projects.md deleted file mode 100644 index 1438450a99..0000000000 --- a/sources/talk/20190111 What metrics matter- A guide for open source projects.md +++ /dev/null @@ -1,95 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What metrics matter: A guide for open source projects) -[#]: via: (https://opensource.com/article/19/1/metrics-guide-open-source-projects) -[#]: author: (Gordon Haff https://opensource.com/users/ghaff) - -What metrics matter: A guide for open source projects -====== -5 principles for deciding what to measure. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_data_dashboard_system_computer_analytics.png?itok=oxAeIEI-) - -"Without data, you're just a person with an opinion." - -Those are the words of W. Edwards Deming, the champion of statistical process control, who was credited as one of the inspirations for what became known as the Japanese post-war economic miracle of 1950 to 1960. Ironically, Japanese manufacturers like Toyota were far more receptive to Deming’s ideas than General Motors and Ford were. - -Community management is certainly an art. It’s about mentoring. It’s about having difficult conversations with people who are hurting the community. It’s about negotiation and compromise. It’s about interacting with other communities. It’s about making connections. In the words of Red Hat’s Diane Mueller, it’s about "nurturing conversations." - -However, it’s also about metrics and data. - -Some have much in common with software development projects more broadly. Others are more specific to the management of the community itself. I think of deciding what to measure and how as adhering to five principles. - -### 1. Recognize that behaviors aren't independent of the measurements you choose to highlight. - -In 2008, Daniel Ariely published Predictably Irrational, one of a number of books written around that time that introduced behavioral psychology and behavioral economics to the general public. One memorable quote from that book is the following: “Human beings adjust behavior based on the metrics they’re held against. Anything you measure will impel a person to optimize his score on that metric. What you measure is what you’ll get. Period.” - -This shouldn’t be surprising. It’s a finding that’s been repeatedly confirmed by research. It should also be familiar to just about anyone with business experience. It’s certainly not news to anyone in sales management, for example. Base sales reps’ (or their managers’) bonuses solely on revenue, and they’ll try to discount whatever it takes to maximize revenue, even if it puts margin in the toilet. Conversely, want the sales force to push a new product line—which will probably take extra effort—but skip the spiffs? Probably not happening. - -And lest you think I’m unfairly picking on sales, this behavior is pervasive, all the way up to the CEO, as Ariely describes in a 2010 Harvard Business Review article: “CEOs care about stock value because that’s how we measure them. If we want to change what they care about, we should change what we measure.” - -Developers and other community members are not immune. - -### 2. You need to choose relevant metrics. - -There’s a lot of folk wisdom floating around about what’s relevant and important that’s not necessarily true. My colleague [Dave Neary offers an example from baseball][1]: “In the late '90s, the key measurements that were used to measure batter skill were RBI (runs batted in) and batting average (how often a player got on base with a hit, divided by the number of at-bats). The Oakland A’s were the first major league team to recruit based on a different measurement of player performance: on-base percentage. This measures how often they get to first base, regardless of how it happens.” - -Indeed, the whole revolution of sabermetrics in baseball and elsewhere, which was popularized in Michael Lewis’ Moneyball, often gets talked about in terms of introducing data in a field that historically was more about gut feel and personal experience. But it was also about taking a game that had actually always been fairly numbers-obsessed and coming up with new metrics based on mostly existing data to better measure player value. (The data revolution going on in sports today is more about collecting much more data through video and other means than was previously available.) - -### 3. Quantity may not lead to quality. - -As a corollary, collecting lots of tangential but easy-to-capture data isn’t better than just selecting a few measurements you’ve determined are genuinely useful. In a world where online behavior can be tracked with great granularity and displayed in colorful dashboards, it’s tempting to be distracted by sheer data volume, even when it doesn’t deliver any great insight into community health and trajectory. - -This may seem like an obvious point: Why measure something that isn’t relevant? In practice, metrics often get chosen because they’re easy to measure, not because they’re particularly useful. They tend to be more about inputs than outputs: The number of developers. The number of forum posts. The number of commits. Collectively, measures like this often get called vanity metrics. They’re ubiquitous, but most people involved with community management don’t think much of them. - -Number of downloads may be the worst of the bunch. It’s true that, at some level, they’re an indication of interest in a project. That’s something. But it’s sufficiently distant from actively using the project, much less engaging with the project deeply, that it’s hard to view downloads as a very useful number. - -Is there any harm in these vanity metrics? Yes, to the degree that you start thinking that they’re something to base action on. Probably more seriously, stakeholders like company management or industry observers can come to see them as meaningful indicators of project health. - -### 4. Understand what measurements really mean and how they relate to each other. - -Neary makes this point to caution against myopia. “In one project I worked on,” he says, ”some people were concerned about a recent spike in the number of bug reports coming in because it seemed like the project must have serious quality issues to resolve. However, when we looked at the numbers, it turned out that many of the bugs were coming in because a large company had recently started using the project. The increase in bug reports was actually a proxy for a big influx of new users, which was a good thing.” - -In practice, you often have to measure through proxies. This isn’t an inherent problem, but the further you get between what you want to measure and what you’re actually measuring, the harder it is to connect the dots. It’s fine to track progress in closing bugs, writing code, and adding new features. However, those don’t necessarily correlate with how happy users are or whether the project is doing a good job of working towards its long-term objectives, whatever those may be. - -### 5. Different measurements serve different purposes. - -Some measurements may be non-obvious but useful for tracking the success of a project and community relative to internal goals. Others may be better suited for a press release or other external consumption. For example, as a community manager, you may really care about the number of meetups, mentoring sessions, and virtual briefings your community has held over the past three months. But it’s the number of contributions and contributors that are more likely to grab the headlines. You probably care about those too. But maybe not as much, depending upon your current priorities. - -Still, other measurements may relate to the goals of any sponsoring organizations. The measurements most relevant for projects tied to commercial products are likely to be different from pure community efforts. - -Because communities differ and goals differ, it’s not possible to simply compile a metrics checklist, but here are some ideas to think about: - -Consider qualitative metrics in addition to quantitative ones. Conducting surveys and other studies can be time-consuming, especially if they’re rigorous enough to yield better-than-anecdotal data. It also requires rigor to construct studies so that they can be used to track changes over time. In other words, it’s a lot easier to measure quantitative contributor activity than it is to suss out if the community members are happier about their participation today than they were a year ago. However, given the importance of culture to the health of a community, measuring it in a systematic way can be a worthwhile exercise. - -Breadth of community, including how many are unaffiliated with commercial entities, is important for many projects. The greater the breadth, the greater the potential leverage of the open source development process. It can also be instructive to see how companies and individuals are contributing. Projects can be explicitly designed to better accommodate casual contributors. - -Are new contributors able to have an impact, or are they ignored? How long does it take for code contributions to get committed? How long does it take for a reported bug to be fixed or otherwise responded to? If they asked a question in a forum, did anyone answer them? In other words, are you letting contributors contribute? - -Advancement within the project is also an important metric. [Mikeal Rogers of the Node.js community][2] explains: “The shift that we made was to create a support system and an education system to take a user and turn them into a contributor, first at a very low level, and educate them to bring them into the committer pool and eventually into the maintainer pool. The end result of this is that we have a wide range of skill sets. Rather than trying to attract phenomenal developers, we’re creating new phenomenal developers.” - -Whatever metrics you choose, don’t forget why you made them metrics in the first place. I find a helpful question to ask is: “What am I going to do with this number?” If the answer is to just put it in a report or in a press release, that’s not a great answer. Metrics should be measurements that tell you either that you’re on the right path or that you need to take specific actions to course-correct. - -For this reason, Stormy Peters, who handles community leads at Red Hat, [argues for keeping it simple][3]. She writes, “It’s much better to have one or two key metrics than to worry about all the possible metrics. You can capture all the possible metrics, but as a project, you should focus on moving one. It’s also better to have a simple metric that correlates directly to something in the real world than a metric that is a complicated formula or ration between multiple things. As project members make decisions, you want them to be able to intuitively feel whether or not it will affect the project’s key metric in the right direction.” - -The article is adapted from [How Open Source Ate Software][4] by Gordon Haff (Apress 2018). - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/1/metrics-guide-open-source-projects - -作者:[Gordon Haff][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/ghaff -[b]: https://github.com/lujun9972 -[1]: https://community.redhat.com/blog/2014/07/when-metrics-go-wrong/ -[2]: https://opensource.com/article/17/3/nodejs-community-casual-contributors -[3]: https://medium.com/open-source-communities/3-important-things-to-consider-when-measuring-your-success-50e21ad82858 -[4]: https://www.apress.com/us/book/9781484238936 diff --git a/sources/talk/20190115 What happens when a veteran teacher goes to an open source conference.md b/sources/talk/20190115 What happens when a veteran teacher goes to an open source conference.md deleted file mode 100644 index e16505c36c..0000000000 --- a/sources/talk/20190115 What happens when a veteran teacher goes to an open source conference.md +++ /dev/null @@ -1,68 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What happens when a veteran teacher goes to an open source conference) -[#]: via: (https://opensource.com/open-organization/19/1/educator-at-open-source-conference) -[#]: author: (Ben Owens https://opensource.com/users/engineerteacher) - -What happens when a veteran teacher goes to an open source conference -====== -Sometimes feeling like a fish out of water is precisely what educators need. - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003588_01_rd3os.combacktoschoolseriesgen_rh_032x_0.png?itok=cApG9aB4) - -"Change is going to be continual, and today is the slowest day society will ever move."—[Tony Fadell][1] - -If ever there was an experience that brought the above quotation home for me, it was my experience at the [All Things Open conference][2] in Raleigh, NC last October. Thousands of people from all over the world attended the conference, and many (if not most), worked as open source coders and developers. As one of the relatively few educators in attendance, I saw and heard things that were completely foreign to me—terms like as Istio, Stack Overflow, Ubuntu, Sidecar, HyperLedger, and Kubernetes tossed around for days. - -I felt like a fish out of water. But in the end, that was the perfect dose of reality I needed to truly understand how open principles can reshape our approach to education. - -### Not-so-strange attractors - -All Things Open attracted me to Raleigh for two reasons, both of which have to do with how our schools must do a better job of creating environments that truly prepare students for a rapidly changing world. - -The first is my belief that schools should embrace the ideals of the [open source way][3]. The second is that educators have to periodically force themselves out of their relatively isolated worlds of "doing school" in order to get a glimpse of what the world is actually doing. - -When I was an engineer for 20 years, I developed a deep sense of the power of an open exchange of ideas, of collaboration, and of the need for rapid prototyping of innovations. Although we didn't call these ideas "open source" at the time, my colleagues and I constantly worked together to identify and solve problems using tools such as [Design Thinking][4] so that our businesses remained competitive and met market demands. When I became a science and math teacher at a small [public school][5] in rural Appalachia, my goal was to adapt these ideas to my classrooms and to the school at large as a way to blur the lines between a traditional school environment and what routinely happens in the "real world." - -Through several years of hard work and many iterations, my fellow teachers and I were eventually able to develop a comprehensive, school-wide project-based learning model, where students worked in collaborative teams on projects that [made real connections][6] between required curriculum and community-based applications. Doing so gave these students the ability to develop skills they can use for a lifetime, rather than just on the next test—skills such as problem solving, critical thinking, oral and written communication, perseverance through setbacks, and adapting to changing conditions, as well as how to have routine conversations with adult mentors form the community. Only after reading [The Open Organization][7] did I realize that what we had been doing essentially embodied what Jim Whitehurst had described. In our case, of course, we applied open principles to an educational context (that model, called Open Way Learning, is the subject of a [book][8] published in December). - -I felt like a fish out of water. But in the end, that was the perfect dose of reality I needed to truly understand how open principles can reshape our approach to education. - -As good as this model is in terms of pushing students into a relevant, engaging, and often unpredictable learning environments, it can only go so far if we, as educators who facilitate this type of project-based learning, do not constantly stay abreast of changing technologies and their respective lexicon. Even this unconventional but proven approach will still leave students ill-prepared for a global, innovation economy if we aren't constantly pushing ourselves into areas outside our own comfort zones. My experience at the All Things Open conference was a perfect example. While humbling, it also forced me to confront what I didn't know so that I can learn from it to help the work I do with other teachers and schools. - -### A critical decision - -I made this point to others when I shared a picture of the All Things Open job board with dozens of colleagues all over the country. I shared it with the caption: "What did you do in your school today to prepare your students for this reality tomorrow?" The honest answer from many was, unfortunately, "not much." That has to change. - -![](https://opensource.com/sites/default/files/images/open-org/owens_1.jpg) -![](https://opensource.com/sites/default/files/images/open-org/owens_2.jpg) -(Images courtesy of Ben Owens, CC BY-SA) - -People in organizations everywhere have to make a critical decision: either embrace the rapid pace of change that is a fact of life in our world or face the hard reality of irrelevance. Our systems in education are at this same crossroads—even ones who think of themselves as being innovative. It involves admitting to students, "I don't know, but I'm willing to learn." That's the kind of teaching and learning experience our students deserve. - -It can happen, but it will take pioneering educators who are willing to move away from comfortable, back-of-the-book answers to help students as they work on difficult and messy challenges. You may very well be a veritable fish out of water. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/19/1/educator-at-open-source-conference - -作者:[Ben Owens][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/engineerteacher -[b]: https://github.com/lujun9972 -[1]: https://en.wikipedia.org/wiki/Tony_Fadell -[2]: https://allthingsopen.org/ -[3]: https://opensource.com/open-source-way -[4]: https://dschool.stanford.edu/resources-collections/a-virtual-crash-course-in-design-thinking -[5]: https://www.tricountyearlycollege.org/ -[6]: https://www.bie.org/about/what_pbl -[7]: https://www.redhat.com/en/explore/the-open-organization-book -[8]: https://www.amazon.com/Open-Up-Education-Learning-Transform/dp/1475842007/ref=tmm_pap_swatch_0?_encoding=UTF8&qid=&sr= diff --git a/sources/talk/20190131 4 confusing open source license scenarios and how to navigate them.md b/sources/talk/20190131 4 confusing open source license scenarios and how to navigate them.md deleted file mode 100644 index fd93cdd9a6..0000000000 --- a/sources/talk/20190131 4 confusing open source license scenarios and how to navigate them.md +++ /dev/null @@ -1,59 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (4 confusing open source license scenarios and how to navigate them) -[#]: via: (https://opensource.com/article/19/1/open-source-license-scenarios) -[#]: author: (P.Kevin Nelson https://opensource.com/users/pkn4645) - -4 confusing open source license scenarios and how to navigate them -====== - -Before you begin using a piece of software, make sure you fully understand the terms of its license. - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LAW_openisopen.png?itok=FjmDxIaL) - -As an attorney running an open source program office for a Fortune 500 corporation, I am often asked to look into a product or component where there seems to be confusion as to the licensing model. Under what terms can the code be used, and what obligations run with such use? This often happens when the code or the associated project community does not clearly indicate availability under a [commonly accepted open source license][1]. The confusion is understandable as copyright owners often evolve their products and services in different directions in response to market demands. Here are some of the scenarios I commonly discover and how you can approach each situation. - -### Multiple licenses - -The product is truly open source with an [Open Source Initiative][2] (OSI) open source-approved license, but has changed licensing models at least once if not multiple times throughout its lifespan. This scenario is fairly easy to address; the user simply has to decide if the latest version with its attendant features and bug fixes is worth the conditions to be compliant with the current license. If so, great. If not, then the user can move back in time to a version released under a more palatable license and start from that fork, understanding that there may not be an active community for support and continued development. - -### Old open source - -This is a variation on the multiple licenses model with the twist that current licensing is proprietary only. You have to use an older version to take advantage of open source terms and conditions. Most often, the product was released under a valid open source license up to a certain point in its development, but then the copyright holder chose to evolve the code in a proprietary fashion and offer new releases only under proprietary commercial licensing terms. So, if you want the newest capabilities, you have to purchase a proprietary license, and you most likely will not get a copy of the underlying source code. Most often the open source community that grew up around the original code line falls away once the members understand there will be no further commitment from the copyright holder to the open source branch. While this scenario is understandable from the copyright holder's perspective, it can be seen as "burning a bridge" to the open source community. It would be very difficult to again leverage the benefits of the open source contribution models once a project owner follows this path. - -### Open core - -By far the most common discovery is that a product has both an open source-licensed "community edition" and a proprietary-licensed commercial offering, commonly referred to as open core. This is often encouraging to potential consumers, as it gives them a "try before you buy" option or even a chance to influence both versions of the product by becoming an active member of the community. I usually encourage clients to begin with the community version, get involved, and see what they can achieve. Then, if the product becomes a crucial part of their business plan, they have the option to upgrade to the proprietary level at any time. - -### Freemium - -The component is not open source at all, but instead it is released under some version of the "freemium" model. A version with restricted or time-limited functionality can be downloaded with no immediate purchase required. However, since the source code is usually not provided and its accompanying license does not allow perpetual use, the creation of derivative works, nor further distribution, it is definitely not open source. In this scenario, it is usually best to pass unless you are prepared to purchase a proprietary license and accept all attendant terms and conditions of use. Users are often the most disappointed in this outcome as it has somewhat of a deceptive feel. - -### OSI compliant - -Of course, the happy path I haven't mentioned is to discover the project has a single, clear, OSI-compliant license. In those situations, open source software is as easy as downloading and going forward within appropriate use. - -Each of the more complex scenarios described above can present problems to potential development projects, but consultation with skilled procurement or intellectual property professionals with regard to licensing lineage can reveal excellent opportunities. - -An earlier version of this article was published on [OSS Law][3] and is republished with the author's permission. - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/1/open-source-license-scenarios - -作者:[P.Kevin Nelson][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/pkn4645 -[b]: https://github.com/lujun9972 -[1]: https://opensource.org/licenses -[2]: https://opensource.org/licenses/category -[3]: http://www.pknlaw.com/2017/06/i-thought-that-was-open-source.html diff --git a/sources/talk/20190131 OOP Before OOP with Simula.md b/sources/talk/20190131 OOP Before OOP with Simula.md deleted file mode 100644 index cae9d9bd3a..0000000000 --- a/sources/talk/20190131 OOP Before OOP with Simula.md +++ /dev/null @@ -1,203 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (OOP Before OOP with Simula) -[#]: via: (https://twobithistory.org/2019/01/31/simula.html) -[#]: author: (Sinclair Target https://twobithistory.org) - -OOP Before OOP with Simula -====== - -Imagine that you are sitting on the grassy bank of a river. Ahead of you, the water flows past swiftly. The afternoon sun has put you in an idle, philosophical mood, and you begin to wonder whether the river in front of you really exists at all. Sure, large volumes of water are going by only a few feet away. But what is this thing that you are calling a “river”? After all, the water you see is here and then gone, to be replaced only by more and different water. It doesn’t seem like the word “river” refers to any fixed thing in front of you at all. - -In 2009, Rich Hickey, the creator of Clojure, gave [an excellent talk][1] about why this philosophical quandary poses a problem for the object-oriented programming paradigm. He argues that we think of an object in a computer program the same way we think of a river—we imagine that the object has a fixed identity, even though many or all of the object’s properties will change over time. Doing this is a mistake, because we have no way of distinguishing between an object instance in one state and the same object instance in another state. We have no explicit notion of time in our programs. We just breezily use the same name everywhere and hope that the object is in the state we expect it to be in when we reference it. Inevitably, we write bugs. - -The solution, Hickey concludes, is that we ought to model the world not as a collection of mutable objects but a collection of processes acting on immutable data. We should think of each object as a “river” of causally related states. In sum, you should use a functional language like Clojure. - -![][2] -The author, on a hike, pondering the ontological commitments -of object-oriented programming. - -Since Hickey gave his talk in 2009, interest in functional programming languages has grown, and functional programming idioms have found their way into the most popular object-oriented languages. Even so, most programmers continue to instantiate objects and mutate them in place every day. And they have been doing it for so long that it is hard to imagine that programming could ever look different. - -I wanted to write an article about Simula and imagined that it would mostly be about when and how object-oriented constructs we are familiar with today were added to the language. But I think the more interesting story is about how Simula was originally so unlike modern object-oriented programming languages. This shouldn’t be a surprise, because the object-oriented paradigm we know now did not spring into existence fully formed. There were two major versions of Simula: Simula I and Simula 67. Simula 67 brought the world classes, class hierarchies, and virtual methods. But Simula I was a first draft that experimented with other ideas about how data and procedures could be bundled together. The Simula I model is not a functional model like the one Hickey proposes, but it does focus on processes that unfold over time rather than objects with hidden state that interact with each other. Had Simula 67 stuck with more of Simula I’s ideas, the object-oriented paradigm we know today might have looked very different indeed—and that contingency should teach us to be wary of assuming that the current paradigm will dominate forever. - -### Simula 0 Through 67 - -Simula was created by two Norwegians, Kristen Nygaard and Ole-Johan Dahl. - -In the late 1950s, Nygaard was employed by the Norwegian Defense Research Establishment (NDRE), a research institute affiliated with the Norwegian military. While there, he developed Monte Carlo simulations used for nuclear reactor design and operations research. These simulations were at first done by hand and then eventually programmed and run on a Ferranti Mercury. Nygaard soon found that he wanted a higher-level way to describe these simulations to a computer. - -The kind of simulation that Nygaard commonly developed is known as a “discrete event model.” The simulation captures how a sequence of events change the state of a system over time—but the important property here is that the simulation can jump from one event to the next, since the events are discrete and nothing changes in the system between events. This kind of modeling, according to a paper that Nygaard and Dahl presented about Simula in 1966, was increasingly being used to analyze “nerve networks, communication systems, traffic flow, production systems, administrative systems, social systems, etc.” So Nygaard thought that other people might want a higher-level way to describe these simulations too. He began looking for someone that could help him implement what he called his “Simulation Language” or “Monte Carlo Compiler.” - -Dahl, who had also been employed by NDRE, where he had worked on language design, came aboard at this point to play Wozniak to Nygaard’s Jobs. Over the next year or so, Nygaard and Dahl worked to develop what has been called “Simula 0.” This early version of the language was going to be merely a modest extension to ALGOL 60, and the plan was to implement it as a preprocessor. The language was then much less abstract than what came later. The primary language constructs were “stations” and “customers.” These could be used to model certain discrete event networks; Nygaard and Dahl give an example simulating airport departures. But Nygaard and Dahl eventually came up with a more general language construct that could represent both “stations” and “customers” and also model a wider range of simulations. This was the first of two major generalizations that took Simula from being an application-specific ALGOL package to a general-purpose programming language. - -In Simula I, there were no “stations” or “customers,” but these could be recreated using “processes.” A process was a bundle of data attributes associated with a single action known as the process’ operating rule. You might think of a process as an object with only a single method, called something like `run()`. This analogy is imperfect though, because each process’ operating rule could be suspended or resumed at any time—the operating rules were a kind of coroutine. A Simula I program would model a system as a set of processes that conceptually all ran in parallel. Only one process could actually be “current” at any time, but once a process suspended itself the next queued process would automatically take over. As the simulation ran, behind the scenes, Simula would keep a timeline of “event notices” that tracked when each process should be resumed. In order to resume a suspended process, Simula needed to keep track of multiple call stacks. This meant that Simula could no longer be an ALGOL preprocessor, because ALGOL had only once call stack. Nygaard and Dahl were committed to writing their own compiler. - -In their paper introducing this system, Nygaard and Dahl illustrate its use by implementing a simulation of a factory with a limited number of machines that can serve orders. The process here is the order, which starts by looking for an available machine, suspends itself to wait for one if none are available, and then runs to completion once a free machine is found. There is a definition of the order process that is then used to instantiate several different order instances, but no methods are ever called on these instances. The main part of the program just creates the processes and sets them running. - -The first Simula I compiler was finished in 1965. The language grew popular at the Norwegian Computer Center, where Nygaard and Dahl had gone to work after leaving NDRE. Implementations of Simula I were made available to UNIVAC users and to Burroughs B5500 users. Nygaard and Dahl did a consulting deal with a Swedish company called ASEA that involved using Simula to run job shop simulations. But Nygaard and Dahl soon realized that Simula could be used to write programs that had nothing to do with simulation at all. - -Stein Krogdahl, a professor at the University of Oslo that has written about the history of Simula, claims that “the spark that really made the development of a new general-purpose language take off” was [a paper called “Record Handling”][3] by the British computer scientist C.A.R. Hoare. If you read Hoare’s paper now, this is easy to believe. I’m surprised that you don’t hear Hoare’s name more often when people talk about the history of object-oriented languages. Consider this excerpt from his paper: - -> The proposal envisages the existence inside the computer during the execution of the program, of an arbitrary number of records, each of which represents some object which is of past, present or future interest to the programmer. The program keeps dynamic control of the number of records in existence, and can create new records or destroy existing ones in accordance with the requirements of the task in hand. - -> Each record in the computer must belong to one of a limited number of disjoint record classes; the programmer may declare as many record classes as he requires, and he associates with each class an identifier to name it. A record class name may be thought of as a common generic term like “cow,” “table,” or “house” and the records which belong to these classes represent the individual cows, tables, and houses. - -Hoare does not mention subclasses in this particular paper, but Dahl credits him with introducing Nygaard and himself to the concept. Nygaard and Dahl had noticed that processes in Simula I often had common elements. Using a superclass to implement those common elements would be convenient. This also raised the possibility that the “process” idea itself could be implemented as a superclass, meaning that not every class had to be a process with a single operating rule. This then was the second great generalization that would make Simula 67 a truly general-purpose programming language. It was such a shift of focus that Nygaard and Dahl briefly considered changing the name of the language so that people would know it was not just for simulations. But “Simula” was too much of an established name for them to risk it. - -In 1967, Nygaard and Dahl signed a contract with Control Data to implement this new version of Simula, to be known as Simula 67. A conference was held in June, where people from Control Data, the University of Oslo, and the Norwegian Computing Center met with Nygaard and Dahl to establish a specification for this new language. This conference eventually led to a document called the [“Simula 67 Common Base Language,”][4] which defined the language going forward. - -Several different vendors would make Simula 67 compilers. The Association of Simula Users (ASU) was founded and began holding annual conferences. Simula 67 soon had users in more than 23 different countries. - -### 21st Century Simula - -Simula is remembered now because of its influence on the languages that have supplanted it. You would be hard-pressed to find anyone still using Simula to write application programs. But that doesn’t mean that Simula is an entirely dead language. You can still compile and run Simula programs on your computer today, thanks to [GNU cim][5]. - -The cim compiler implements the Simula standard as it was after a revision in 1986. But this is mostly the Simula 67 version of the language. You can write classes, subclass, and virtual methods just as you would have with Simula 67. So you could create a small object-oriented program that looks a lot like something you could easily write in Python or Ruby: - -``` -! dogs.sim ; -Begin - Class Dog; - ! The cim compiler requires virtual procedures to be fully specified ; - Virtual: Procedure bark Is Procedure bark;; - Begin - Procedure bark; - Begin - OutText("Woof!"); - OutImage; ! Outputs a newline ; - End; - End; - - Dog Class Chihuahua; ! Chihuahua is "prefixed" by Dog ; - Begin - Procedure bark; - Begin - OutText("Yap yap yap yap yap yap"); - OutImage; - End; - End; - - Ref (Dog) d; - d :- new Chihuahua; ! :- is the reference assignment operator ; - d.bark; -End; -``` - -You would compile and run it as follows: - -``` -$ cim dogs.sim -Compiling dogs.sim: -gcc -g -O2 -c dogs.c -gcc -g -O2 -o dogs dogs.o -L/usr/local/lib -lcim -$ ./dogs -Yap yap yap yap yap yap -``` - -(You might notice that cim compiles Simula to C, then hands off to a C compiler.) - -This was what object-oriented programming looked like in 1967, and I hope you agree that aside from syntactic differences this is also what object-oriented programming looks like in 2019. So you can see why Simula is considered a historically important language. - -But I’m more interested in showing you the process model that was central to Simula I. That process model is still available in Simula 67, but only when you use the `Process` class and a special `Simulation` block. - -In order to show you how processes work, I’ve decided to simulate the following scenario. Imagine that there is a village full of villagers next to a river. The river has lots of fish, but between them the villagers only have one fishing rod. The villagers, who have voracious appetites, get hungry every 60 minutes or so. When they get hungry, they have to use the fishing rod to catch a fish. If a villager cannot use the fishing rod because another villager is waiting for it, then the villager queues up to use the fishing rod. If a villager has to wait more than five minutes to catch a fish, then the villager loses health. If a villager loses too much health, then that villager has starved to death. - -This is a somewhat strange example and I’m not sure why this is what first came to mind. But there you go. We will represent our villagers as Simula processes and see what happens over a day’s worth of simulated time in a village with four villagers. - -The full program is [available here as a Gist][6]. - -The last lines of my output look like the following. Here we are seeing what happens in the last few hours of the day: - -``` -1299.45: John is hungry and requests the fishing rod. -1299.45: John is now fishing. -1311.39: John has caught a fish. -1328.96: Betty is hungry and requests the fishing rod. -1328.96: Betty is now fishing. -1331.25: Jane is hungry and requests the fishing rod. -1340.44: Betty has caught a fish. -1340.44: Jane went hungry waiting for the rod. -1340.44: Jane starved to death waiting for the rod. -1369.21: John is hungry and requests the fishing rod. -1369.21: John is now fishing. -1379.33: John has caught a fish. -1409.59: Betty is hungry and requests the fishing rod. -1409.59: Betty is now fishing. -1419.98: Betty has caught a fish. -1427.53: John is hungry and requests the fishing rod. -1427.53: John is now fishing. -1437.52: John has caught a fish. -``` - -Poor Jane starved to death. But she lasted longer than Sam, who didn’t even make it to 7am. Betty and John sure have it good now that only two of them need the fishing rod. - -What I want you to see here is that the main, top-level part of the program does nothing but create the four villager processes and get them going. The processes manipulate the fishing rod object in the same way that we would manipulate an object today. But the main part of the program does not call any methods or modify and properties on the processes. The processes have internal state, but this internal state only gets modified by the process itself. - -There are still fields that get mutated in place here, so this style of programming does not directly address the problems that pure functional programming would solve. But as Krogdahl observes, “this mechanism invites the programmer of a simulation to model the underlying system as a set of processes, each describing some natural sequence of events in that system.” Rather than thinking primarily in terms of nouns or actors—objects that do things to other objects—here we are thinking of ongoing processes. The benefit is that we can hand overall control of our program off to Simula’s event notice system, which Krogdahl calls a “time manager.” So even though we are still mutating processes in place, no process makes any assumptions about the state of another process. Each process interacts with other processes only indirectly. - -It’s not obvious how this pattern could be used to build, say, a compiler or an HTTP server. (On the other hand, if you’ve ever programmed games in the Unity game engine, this should look familiar.) I also admit that even though we have a “time manager” now, this may not have been exactly what Hickey meant when he said that we need an explicit notion of time in our programs. (I think he’d want something like the superscript notation [that Ada Lovelace used][7] to distinguish between the different values a variable assumes through time.) All the same, I think it’s really interesting that right there at the beginning of object-oriented programming we can find a style of programming that is not all like the object-oriented programming we are used to. We might take it for granted that object-oriented programming simply works one way—that a program is just a long list of the things that certain objects do to other objects in the exact order that they do them. Simula I’s process system shows that there are other approaches. Functional languages are probably a better thought-out alternative, but Simula I reminds us that the very notion of alternatives to modern object-oriented programming should come as no surprise. - -If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][8] on Twitter or subscribe to the [RSS feed][9] to make sure you know when a new post is out. - -Previously on TwoBitHistory… - -> Hey everyone! I sadly haven't had time to do any new writing but I've just put up an updated version of my history of RSS. This version incorporates interviews I've since done with some of the key people behind RSS like Ramanathan Guha and Dan Libby. -> -> — TwoBitHistory (@TwoBitHistory) [December 18, 2018][10] - - - --------------------------------------------------------------------------------- - -1. Jan Rune Holmevik, “The History of Simula,” accessed January 31, 2019, http://campus.hesge.ch/daehne/2004-2005/langages/simula.htm. ↩ - -2. Ole-Johan Dahl and Kristen Nygaard, “SIMULA—An ALGOL-Based Simulation Langauge,” Communications of the ACM 9, no. 9 (September 1966): 671, accessed January 31, 2019, http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.95.384&rep=rep1&type=pdf. ↩ - -3. Stein Krogdahl, “The Birth of Simula,” 2, accessed January 31, 2019, http://heim.ifi.uio.no/~steinkr/papers/HiNC1-webversion-simula.pdf. ↩ - -4. ibid. ↩ - -5. Ole-Johan Dahl and Kristen Nygaard, “The Development of the Simula Languages,” ACM SIGPLAN Notices 13, no. 8 (August 1978): 248, accessed January 31, 2019, https://hannemyr.com/cache/knojd_acm78.pdf. ↩ - -6. Dahl and Nygaard (1966), 676. ↩ - -7. Dahl and Nygaard (1978), 257. ↩ - -8. Krogdahl, 3. ↩ - -9. Ole-Johan Dahl, “The Birth of Object-Orientation: The Simula Languages,” 3, accessed January 31, 2019, http://www.olejohandahl.info/old/birth-of-oo.pdf. ↩ - -10. Dahl and Nygaard (1978), 265. ↩ - -11. Holmevik. ↩ - -12. Krogdahl, 4. ↩ - - --------------------------------------------------------------------------------- - -via: https://twobithistory.org/2019/01/31/simula.html - -作者:[Sinclair Target][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://twobithistory.org -[b]: https://github.com/lujun9972 -[1]: https://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey -[2]: /images/river.jpg -[3]: https://archive.computerhistory.org/resources/text/algol/ACM_Algol_bulletin/1061032/p39-hoare.pdf -[4]: http://web.eah-jena.de/~kleine/history/languages/Simula-CommonBaseLanguage.pdf -[5]: https://www.gnu.org/software/cim/ -[6]: https://gist.github.com/sinclairtarget/6364cd521010d28ee24dd41ab3d61a96 -[7]: https://twobithistory.org/2018/08/18/ada-lovelace-note-g.html -[8]: https://twitter.com/TwoBitHistory -[9]: https://twobithistory.org/feed.xml -[10]: https://twitter.com/TwoBitHistory/status/1075075139543449600?ref_src=twsrc%5Etfw diff --git a/sources/talk/20190204 Config management is dead- Long live Config Management Camp.md b/sources/talk/20190204 Config management is dead- Long live Config Management Camp.md deleted file mode 100644 index 679ac9033b..0000000000 --- a/sources/talk/20190204 Config management is dead- Long live Config Management Camp.md +++ /dev/null @@ -1,118 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Config management is dead: Long live Config Management Camp) -[#]: via: (https://opensource.com/article/19/2/configuration-management-camp) -[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberg) - -Config management is dead: Long live Config Management Camp -====== - -CfgMgmtCamp '19 co-organizers share their take on ops, DevOps, observability, and the rise of YoloOps and YAML engineers. - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/cicd_continuous_delivery_deployment_gears.png?itok=kVlhiEkc) - -Everyone goes to [FOSDEM][1] in Brussels to learn from its massive collection of talk tracks, colloquially known as developer rooms, that run the gauntlet of curiosities, covering programming languages like Rust, Go, and Python, to special topics ranging from community, to legal, to privacy. After two days of nonstop activity, many FOSDEM attendees move on to Ghent, Belgium, to join hundreds for Configuration Management Camp ([CfgMgmtCamp][2]). - -Kris Buytaert and Toshaan Bharvani run the popular post-FOSDEM show centered around infrastructure management, featuring hackerspaces, training, workshops, and keynotes. It's a deeply technical exploration of the who, what, and how of building resilient infrastructure. It started in 2013 as a PuppetCamp but expanded to include more communities and tools in 2014. - -I spoke with Kris and Toshaan, who both have a healthy sense of humor, about CfgMgmtCamp's past, present, and future. Our interview has been edited for length and clarity. - -**Matthew: Your opening[keynote][3] is called "CfgMgmtCamp is dead." Is config management dead? Will it live on, or will something take its place?** - -**Kris:** We've noticed people are jumping on the hype of containers, trying to solve the same problems in a different way. But they are still managing config, only in different ways and with other tools. Over the past couple of years, we've evolved from a conference with a focus on infrastructure-as-code tooling, such as Puppet, Chef, CFEngine, Ansible, Juju, and Salt, to a more open source infrastructure automation conference in general. So, config management is definitely not dead. Infrastructure-as-code is also not dead, but it all is evolving. - -**Toshaan:** We see people changing tools, jumping on hype, and communities changing; however, the basic ideas and concepts remain the same. - -**Matthew: It's great to see[observability as the topic][4] of one of your keynotes. Why should those who care about configuration management also care about monitoring and observability?** - -**Kris:** While the name of the conference hasn't changed, the tools have evolved and we have expanded our horizon. Ten years ago, [Devopsdays][5] was just #devopsdays, but it evolved to focus on culture—the C of [CAMS][6] in the DevOps' core principles of Culture, Automation, Measurement, and Sharing. - -![](https://opensource.com/sites/default/files/uploads/cams.png) - -[Monitorama][7] filled the gap on monitoring and metrics (tackling the M in CAMS). Config Management Camp is about open source Automation, the A. Since they are all open source conferences, they fulfill the Sharing part, completing the CAMS concept. - -Observability sits on the line between Automation and Measurement. To go one step further, in some of my talks about open source monitoring, I describe the evolution of monitoring tools from #monitoringsucks to #monitoringlove; for lots of people (including me), the love for monitoring returned because we tied it to automation. We started to provision a service and automatically adapted the monitoring of that service to its state. Gone were the days where the monitoring tool was out of sync with reality. - -Looking at it from the other side, when you have an infrastructure or application so complex that you need observability in it, you'd better not be deploying manually; you will need some form of automation at that level of complexity. So, observability and infrastructure automation are tied together. - -**Toshaan:** Yes, while in the past we focused on configuration management, we will be looking to expand that into all types of infrastructure management. Last year, we played with this idea, and we were able to have a lot of cross-tool presentations. This year, we've taken this a step further by having more differentiated content. - -**Matthew: Some of my virtualization and Linux admin friends push back, saying observability is a developer's responsibility. How would you respond without just saying "DevOps?"** - -**Kris:** What you describe is what I call "Ooops Devs." This is a trend where the people who run the platform don't really care what they run; as long as port 80 is listening and the node pings, they are happy. It's equally bad as "Dev Ooops." "Ooops Devs" is where the devs rant about the ops folks because they are slow, not agile, and not responsive. But, to me, your job as an ops person or as a Linux admin is to keep a service running, and the only way to do that is to take on that task is as a team—with your colleagues who have different roles and insights, people who write code, people who design, etc. It is a shared responsibility. And hiding behind "that is someone else's responsibility," doesn't smell like collaboration going on. - -**Toshaan:** Even in the dark ages of silos, I believe a true sysadmin should have cared about observability, monitoring, and automation. I believe that the DevOps movement has made this much more widespread, and that it has become easier to get this information and expose it. On the other hand, I believe that pure operators or sysadmins have learned to be team players (or, they may have died out). I like the analogy of an army unit composed of different specialty soldiers who work together to complete a mission; we have engineers who work to deliver products or services. - -**Matthew: In a[Devopsdays Zurich talk][8], Kris offered an opinion that Americans build software for acquisition and Europeans build for resilience. In that light, what are the best skills for someone who wants to build meaningful infrastructure?** - -**Toshaan:** I believe still some people don't understand the complexity of code sprawl, and they believe that some new hype will solve this magically. - -**Kris:** This year, we invited [Steve Traugott][9], co-author of the 1998 USENIX paper "[Bootstrapping an Infrastructure][10]" that helped kickstart our community. So many people never read [Infrastructures.org][11], never experienced the pain of building images and image sprawl, and don't understand the evolution we went through that led us to build things the way we build them from source code. - -People should study topics such as idempotence, resilience, reproducibility, and surviving the tenth floor test. (As explained in "Bootstrapping an Infrastructure": "The test we used when designing infrastructures was 'Can I grab a random machine and throw it out the tenth-floor window without adversely impacting users for more than 10 minutes?' If the answer to this was 'yes,' then we knew we were doing things right.") But only after they understand the service they are building—the service is the absolute priority—can they begin working on things like: how can we run this, how can we make sure it keeps running, how can it fail and how can we prevent that, and if it disappears, how can we spin it up again fast, unnoticed by the end user. - -**Toshaan:** 100% uptime. - -**Kris:** The challenge we have is that lots of people don't have that experience yet. We've seen the rise of [YoloOps][12]—just spin it up once, fire, and forget—which results in security problems, stability problems, data loss, etc., and they often grasp onto the solutions in YoloOps, the easy way to do something quickly and move on. But understanding how things will eventually fail takes time, it's called experience. - -**Toshaan:** Well, when I was a student and manned the CentOS stand at FOSDEM, I remember a guy coming up to the stand and complaining that he couldn't do consulting because of the "fire once and forgot" policy of CentOS, and that it just worked too well. I like to call this ZombieOps, but YoloOps works also. - -**Matthew: I see you're leading the second year of YamlCamp as well. Why does a markup language need its own camp?** - -**Kris:** [YamlCamp][13] is a parody, it's a joke. Last year, Bob Walker ([@rjw1][14]) gave a talk titled "Are we all YAML engineers now?" that led to more jokes. We've had a discussion for years about rebranding CfgMgmtCamp; the problem is that people know our name, we have a large enough audience to keep going, and changing the name would mean effort spent on logos, website, DNS, etc. We won't change the name, but we joked that we could rebrand to YamlCamp, because for some weird reason, a lot of the talks are about YAML. :) - -**Matthew: Do you think systems engineers should list YAML as a skill or a language on their CV? Should companies be hiring YAML engineers, or do you have "Long live all YAML engineers" on the website in jest?** - -**Toshaan:** Well, the real question is whether people are willing to call themselves YAML engineers proudly, because we already have enough DevOps engineers. - -**Matthew: What FOSS software helps you manage the event?** - -**Toshaan:** I re-did the website in Hugo CMS because we were spending too much time maintaining the website manually. I chose Hugo, because I was learning Golang, and because it has been successfully used for other conferences and my own website. I also wanted a static website and iCalendar output, so we could use calendar tooling such as Giggity to have a good scheduling tool. - -The website now builds quite nicely, and while I still have some ideas on improvements, maintenance is now much easier. - -For the call for proposals (CFP), we now use [OpenCFP][15]. We want to optimize the submission, voting, selection, and extraction to be as automated as possible, while being easy and comfortable for potential speakers, reviewers, and ourselves to use. OpenCFP seems to be the tool that works; while we still have some feature requirements, I believe that, once we have some time to contribute back to OpenCFP, we'll have a fully functional and easy tool to run CFPs with. - -Last, we switched from EventBrite to Pretix because I wanted to be GDPR compliant and have the ability to run our questions, vouchers, and extra features. Pretix allows us to control registration of attendees, speakers, sponsors, and organizers and have a single overview of all the people coming to the event. - -### Wrapping up - -The beauty of Configuration Management Camp to me is that it continues to evolve with its audience. Configuration management is certainly at the heart of the work, but it's in service to resilient infrastructure. Keep your eyes open for the talk recordings to learn from the [line up of incredible speakers][16], and thank you to the team for running this (free) show! - -You can follow Kris [@KrisBuytaert][17] and Toshaan [@toshywoshy][18]. You can also see Kris' past articles [on his blog][19]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/2/configuration-management-camp - -作者:[Matthew Broberg][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/mbbroberg -[b]: https://github.com/lujun9972 -[1]: https://fosdem.org/2019/ -[2]: https://cfgmgmtcamp.eu/ -[3]: https://cfgmgmtcamp.eu/schedule/monday/intro00/ -[4]: https://cfgmgmtcamp.eu/schedule/monday/keynote0/ -[5]: https://www.devopsdays.org/ -[6]: http://devopsdictionary.com/wiki/CAMS -[7]: http://monitorama.com/ -[8]: https://vimeo.com/272519813 -[9]: https://cfgmgmtcamp.eu/schedule/tuesday/keynote1/ -[10]: http://www.infrastructures.org/papers/bootstrap/bootstrap.html -[11]: http://www.infrastructures.org/ -[12]: https://gist.githubusercontent.com/mariozig/5025613/raw/yolo -[13]: https://twitter.com/yamlcamp -[14]: https://twitter.com/rjw1 -[15]: https://github.com/opencfp/opencfp -[16]: https://cfgmgmtcamp.eu/speaker/ -[17]: https://twitter.com/KrisBuytaert -[18]: https://twitter.com/toshywoshy -[19]: https://krisbuytaert.be/index.shtml diff --git a/sources/talk/20190206 4 steps to becoming an awesome agile developer.md b/sources/talk/20190206 4 steps to becoming an awesome agile developer.md deleted file mode 100644 index bad4025aef..0000000000 --- a/sources/talk/20190206 4 steps to becoming an awesome agile developer.md +++ /dev/null @@ -1,82 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (4 steps to becoming an awesome agile developer) -[#]: via: (https://opensource.com/article/19/2/steps-agile-developer) -[#]: author: (Daniel Oh https://opensource.com/users/daniel-oh) - -4 steps to becoming an awesome agile developer -====== -There's no magical way to do it, but these practices will put you well on your way to embracing agile in application development, testing, and debugging. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_lead-steps-measure.png?itok=DG7rFZPk) - -Enterprises are rushing into their DevOps journey through [agile][1] software development with cloud-native technologies such as [Linux containers][2], [Kubernetes][3], and [serverless][4]. Continuous integration helps enterprise developers reduce bugs, unexpected errors, and improve the quality of their code deployed in production. - -However, this doesn't mean all developers in DevOps automatically embrace agile for their daily work in application development, testing, and debugging. There is no magical way to do it, but the following four practical steps and best practices will put you well on your way to becoming an awesome agile developer. - -### Start with design thinking agile practices - -There are many opportunities to learn about using agile software development practices in your DevOps initiatives. Agile practices inspire people with new ideas and experiences for improving their daily work in application development with team collaboration. More importantly, those practices will help you discover the answers to questions such as: Why am I doing this? What kind of problems am I trying to solve? How do I measure the outcomes? - -A [domain-driven design][5] approach will help you start discovery sooner and easier. For example, the [Start At The End][6] practice helps you redesign your application and explore potential business outcomes—such as, what would happen if your application fails in production? You might also be interested in [Event Storming][7] for interactive and rapid discovery or [Impact Mapping][8] for graphical and strategic design as part of domain-driven design practices. - -### Use a predictive approach first - -In agile software development projects, enterprise developers are mainly focused on adapting to rapidly changing app development environments such as reactive runtimes, cloud-native frameworks, Linux container packaging, and the Kubernetes platform. They believe this is the best way to become an agile developer in their organization. However, this type of adaptive approach typically makes it harder for developers to understand and report what they will do in the next sprint. Developers might know the ultimate goal and, at best, the app features for a release about four months from the current sprint. - -In contrast, the predictive approach places more emphasis on analyzing known risks and planning future sprints in detail. For example, predictive developers can accurately report the functions and tasks planned for the entire development process. But it's not a magical way to make your agile projects succeed all the time because the predictive team depends totally on effective early-stage analysis. If the analysis does not work very well, it may be difficult for the project to change direction once it gets started. - -To mitigate this risk, I recommend that senior agile developers increase the predictive capabilities with a plan-driven method, and junior agile developers start with the adaptive methods for value-driven development. - -### Continuously improve code quality - -Don't hesitate to engage in [continuous integration][9] (CI) practices for improving your application before deploying code into production. To adopt modern application frameworks, such as cloud-native architecture, Linux container packaging, and hybrid cloud workloads, you have to learn about automated tools to address complex CI procedures. - -[Jenkins][10] is the standard CI tool for many organizations; it allows developers to build and test applications in many projects in an automated fashion. Its most important function is detecting unexpected errors during CI to prevent them from happening in production. This should increase business outcomes through better customer satisfaction. - -Automated CI enables agile developers to not only improve the quality of their code but their also application development agility through learning and using open source tools and patterns such as [behavior-driven development][11], [test-driven development][12], [automated unit testing][13], [pair programming][14], [code review][15], and [design pattern][16]. - -### Never stop exploring communities - -Never settle, even if you already have a great reputation as an agile developer. You have to continuously take on bigger challenges to make great software in an agile way. - -By participating in the very active and growing open source community, you will not only improve your skills as an agile developer, but your actions can also inspire other developers who want to learn agile practices. - -How do you get involved in specific communities? It depends on your interests and what you want to learn. It might mean presenting specific topics at conferences or local meetups, writing technical blog posts, publishing practical guidebooks, committing code, or creating pull requests to open source projects' Git repositories. It's worth exploring open source communities for agile software development, as I've found it is a great way to share your expertise, knowledge, and practices with other brilliant developers and, along the way, help each other. - -### Get started - -These practical steps can give you a shorter path to becoming an awesome agile developer. Then you can lead junior developers in your team and organization to become more flexible, valuable, and predictive using agile principles. - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/2/steps-agile-developer - -作者:[Daniel Oh][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/daniel-oh -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/article/18/10/what-agile -[2]: https://opensource.com/resources/what-are-linux-containers -[3]: https://opensource.com/resources/what-is-kubernetes -[4]: https://opensource.com/article/18/11/open-source-serverless-platforms -[5]: https://en.wikipedia.org/wiki/Domain-driven_design -[6]: https://openpracticelibrary.com/practice/start-at-the-end/ -[7]: https://openpracticelibrary.com/practice/event-storming/ -[8]: https://openpracticelibrary.com/practice/impact-mapping/ -[9]: https://en.wikipedia.org/wiki/Continuous_integration -[10]: https://jenkins.io/ -[11]: https://en.wikipedia.org/wiki/Behavior-driven_development -[12]: https://en.wikipedia.org/wiki/Test-driven_development -[13]: https://en.wikipedia.org/wiki/Unit_testing -[14]: https://en.wikipedia.org/wiki/Pair_programming -[15]: https://en.wikipedia.org/wiki/Code_review -[16]: https://en.wikipedia.org/wiki/Design_pattern diff --git a/sources/talk/20190206 What blockchain and open source communities have in common.md b/sources/talk/20190206 What blockchain and open source communities have in common.md deleted file mode 100644 index bc4f9464d0..0000000000 --- a/sources/talk/20190206 What blockchain and open source communities have in common.md +++ /dev/null @@ -1,64 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What blockchain and open source communities have in common) -[#]: via: (https://opensource.com/article/19/2/blockchain-open-source-communities) -[#]: author: (Gordon Haff https://opensource.com/users/ghaff) - -What blockchain and open source communities have in common -====== -Blockchain initiatives can look to open source governance for lessons on establishing trust. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/diversity_flowers_chain.jpg?itok=ns01UPOp) - -One of the characteristics of blockchains that gets a lot of attention is how they enable distributed trust. The topic of trust is a surprisingly complicated one. In fact, there's now an [entire book][1] devoted to the topic by Kevin Werbach. - -But here's what it means in a nutshell. Organizations that wish to work together, but do not fully trust one another, can establish a permissioned blockchain and invite business partners to record their transactions on a shared distributed ledger. Permissioned blockchains can trace assets when transactions are added to the blockchain. A permissioned blockchain implies a degree of trust (again, trust is complicated) among members of a consortium, but no single entity controls the storage and validation of transactions. - -The basic model is that a group of financial institutions or participants in a logistics system can jointly set up a permissioned blockchain that will validate and immutably record transactions. There's no dependence on a single entity, whether it's one of the direct participants or a third-party intermediary who set up the blockchain, to safeguard the integrity of the system. The blockchain itself does so through a variety of cryptographic mechanisms. - -Here's the rub though. It requires that competitors work together cooperatively—a relationship often called [coopetition][2]. The term dates back to the early 20th century, but it grew into widespread use when former Novell CEO Ray Noorda started using the term to describe the company's business strategy in the 1990s. Novell was then planning to get into the internet portal business, which required it to seek partnerships with some of the search engine providers and other companies it would also be competing against. In 1996, coopetition became the subject of a bestselling [book][3]. - -Coopetition can be especially difficult when a blockchain network initiative appears to be driven by a dominant company. And it's hard for the dominant company not to exert outsize influence over the initiative, just as a natural consequence of how big it is. For example, the IBM-Maersk joint venture has [struggled to sign up rival shipping companies][4], in part because Maersk is the world's largest carrier by capacity, a position that makes rivals wary. - -We see this same dynamic in open source communities. The original creators of a project need to not only let go; they need to put governance structures in place that give competing companies confidence that there's a level playing field. - -For example, Sarah Novotny, now head of open source strategy at Google Cloud Platform, [told me in a 2017 interview][5] about the [Kubernetes][6] project that it isn't always easy to give up control, even when people buy into doing what is best for a project. - -> Google turned Kubernetes over to the Cloud Native Computing Foundation (CNCF), which sits under the Linux Foundation umbrella. As [CNCF executive director Dan Kohn puts it][7]: "One of the things they realized very early on is that a project with a neutral home is always going to achieve a higher level of collaboration. They really wanted to find a home for it where a number of different companies could participate." -> -> Defaulting to public may not be either natural or comfortable. "Early on, my first six, eight, or 12 weeks at Google, I think half my electrons in email were spent on: 'Why is this discussion not happening on a public mailing list? Is there a reason that this is specific to GKE [Google Container Engine]? No, there's not a reason,'" said Novotny. - -To be sure, some grumble that open source foundations have become too common and that many are too dominated by paying corporate members. Simon Phipps, currently the president of the Open Source Initiative, gave a talk at OSCON way back in 2015 titled ["Enough Foundations Already!"][8] in which he argued that "before we start another open source foundation, let's agree that what we need protected is software freedom and not corporate politics." - -Nonetheless, while not appropriate for every project, foundations with business, legal, and technical governance are increasingly the model for open source projects that require extensive cooperation among competing companies. A [2017 analysis of GitHub data by the Linux Foundation][9] found a number of different governance models in use by the highest-velocity open source projects. Unsurprisingly, quite a few remained under the control of the company that created or acquired them. However, about a third were under the auspices of a foundation. - -Is there a lesson here for blockchain? Quite possibly. Open source projects can be sponsored by a company while still putting systems and governance in place that are welcoming to outside contributors. However, there's a great deal of history to suggest that doing so is hard because it's hard not to exert control and leverage when you can. Furthermore, even if you make a successful case for being truly open to equal participation to outsiders today, it will be hard to allay suspicions that you might not be as welcoming tomorrow. - -To the degree that we can equate blockchain consortiums with open source communities, this suggests that business blockchain initiatives should look to open source governance for lessons. Dominant players in the ecosystem need to forgo control, and they need to have conversations with partners and potential partners about what types of structures would make participating easier. - -Many blockchain infrastructure software projects are already under foundations such as Hyperledger. But perhaps some specific production deployments of blockchain aimed at specific industries and ecosystems will benefit from formal governance structures as well. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/2/blockchain-open-source-communities - -作者:[Gordon Haff][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/ghaff -[b]: https://github.com/lujun9972 -[1]: https://mitpress.mit.edu/books/blockchain-and-new-architecture-trust -[2]: https://en.wikipedia.org/wiki/Coopetition -[3]: https://en.wikipedia.org/wiki/Co-opetition_(book) -[4]: https://www.theregister.co.uk/2018/10/30/ibm_struggles_to_sign_up_shipping_carriers_to_blockchain_supply_chain_platform_reports/ -[5]: https://opensource.com/article/17/4/podcast-kubernetes-sarah-novotny -[6]: https://kubernetes.io/ -[7]: http://bitmason.blogspot.com/2017/02/podcast-cloud-native-computing.html -[8]: https://www.oreilly.com/ideas/enough-foundations-already -[9]: https://www.linuxfoundation.org/blog/2017/08/successful-open-source-projects-common/ diff --git a/sources/talk/20190214 Top 5 podcasts for Linux news and tips.md b/sources/talk/20190214 Top 5 podcasts for Linux news and tips.md deleted file mode 100644 index fb827bb39b..0000000000 --- a/sources/talk/20190214 Top 5 podcasts for Linux news and tips.md +++ /dev/null @@ -1,80 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Top 5 podcasts for Linux news and tips) -[#]: via: (https://opensource.com/article/19/2/top-linux-podcasts) -[#]: author: (Stephen Bancroft https://opensource.com/users/stevereaver) - -Top 5 podcasts for Linux news and tips -====== -A tried and tested podcast listener, shares his favorite Linux podcasts over the years, plus a couple of bonus picks. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux-penguin-penguins.png?itok=5hlVDue7) - -Like many Linux enthusiasts, I listen to a lot of podcasts. I find my daily commute is the best time to get some time to myself and catch up on the latest tech news. Over the years, I have subscribed and unsubscribed to more show feeds than I care to think about and have distilled them down to the best of the best. - -Here are my top five Linux podcasts I think you should be listening to in 2019, plus a couple of bonus picks. - - 5. [**Late Night Linux**][1]—This podcast, hosted by Joe, [Félim][2], [Graham][3], and [Will][4] from the UK, is rough, ready, and pulls no punches. [Joe Ressington][5] is always ready to tell it how it is, and Félim is always quick with his opinions. It's presented in a casual conversation format—but not one to have one with the kids around, especially with subjects they are all passionate about! - - - 4. [**Ask Noah Show**][6]—This show was forked from the Linux Action Show after it ended. Hosted by [Noah Chelliah][7], it's presented in a radio talkback style and takes live calls from listeners—it's syndicated from a local radio station in Grand Forks, North Dakota. The podcast isn't purely about Linux, but Noah takes on technical challenges and solves them with Linux and answers listeners' questions about how to achieve good technical solutions using Linux. - - - 3. [**The Ubuntu Podcast**][8]—If you want the latest about Ubuntu, you can't go past this show. In another podcast with a UK twist, hosts [Alan Pope][9] (Popey), [Mark Johnson][10], and [Martin Wimpress][11] (Wimpy) present a funny and insightful view of the open source community with news directly from Ubuntu. - - - 2. [**Linux Action News**][12]—The title says it all: it's a news show for Linux. This show was spawned from the popular Linux Action Show and is broadcast by the [Jupiter Broadcasting Network][13], which has many other tech-related podcasts. Hosts Chris Fisher and [Joe Ressington][5] present the show in a more formal "evening news" style, which runs around 30 minutes long. If you want to get a quick weekly update on Linux and Linux-related news, this is the show for you. - - - 1. [**Linux Unplugged**][14]—Finally, coming in at the number one spot is the granddaddy of them all, Linux Unplugged. This show gets to the core of what being in the Linux community is all about. Presented as a casual panel-style discussion by [Chris Fisher][15] and [Wes Payne][16], the podcast includes an interactive voice chatroom where listeners can connect and be heard live on the show as it broadcasts. - - - -Well, there you have it, my current shortlist of Linux podcasts. It's likely to change in the near future, but for now, I am enjoying every minute these guys put together. - -### Bonus podcasts - -Here are two bonus podcasts you might want to check out. - -**[Choose Linux][17]** is a brand-new podcast that is tantalizing because of its hosts: Joe Ressington of Linux Action News, who is a long-time Linux veteran, and [Jason Evangelho][18], a Forbes writer who recently shot to fame in the open source community with his articles showcasing his introduction to Linux and open source. Living vicariously through Jason's introduction to Linux has been and will continue to be fun. - -[**Command Line Heroes**][19] is a podcast produced by Red Hat. It has a very high production standard and has a slightly different format to the shows I have previously mentioned, anchored by a single presenter, developer, and [CodeNewbie][20] founder [Saron Yitbarek][21], who presents the latest innovations in open source. Now in its second season and released fortnightly, I highly recommend that you start from the first episode of this podcast. It starts with a great intro to the O/S wars of the '90s and sets the foundations for the start of Linux. - -Do you have a favorite Linux podcast that isn't on this list? Please share it in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/2/top-linux-podcasts - -作者:[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://latenightlinux.com/ -[2]: https://twitter.com/felimwhiteley -[3]: https://twitter.com/degville -[4]: https://twitter.com/8none1 -[5]: https://twitter.com/JoeRessington -[6]: http://www.asknoahshow.com/ -[7]: https://twitter.com/kernellinux?lang=en -[8]: http://ubuntupodcast.org/ -[9]: https://twitter.com/popey -[10]: https://twitter.com/marxjohnson -[11]: https://twitter.com/m_wimpress -[12]: https://linuxactionnews.com/ -[13]: https://www.jupiterbroadcasting.com/ -[14]: https://linuxunplugged.com/ -[15]: https://twitter.com/ChrisLAS -[16]: https://twitter.com/wespayne -[17]: https://chooselinux.show -[18]: https://twitter.com/killyourfm -[19]: https://www.redhat.com/en/command-line-heroes -[20]: https://www.codenewbie.org/ -[21]: https://twitter.com/saronyitbarek diff --git a/sources/talk/20190219 How Linux testing has changed and what matters today.md b/sources/talk/20190219 How Linux testing has changed and what matters today.md deleted file mode 100644 index ad26d6dbec..0000000000 --- a/sources/talk/20190219 How Linux testing has changed and what matters today.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How Linux testing has changed and what matters today) -[#]: via: (https://opensource.com/article/19/2/phoronix-michael-larabel) -[#]: author: (Don Watkins https://opensource.com/users/don-watkins) - -How Linux testing has changed and what matters today -====== -Michael Larabel, the founder of Phoronix, shares his insights on the evolution of Linux and open hardware. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/mistake_bug_fix_find_error.png?itok=PZaz3dga) - -If you've ever wondered how your Linux computer stacks up against other Linux, Windows, and MacOS machines or searched for reviews of Linux-compatible hardware, you're probably familiar with [Phoronix][1]. Along with its website, which attracts more than 250 million visitors a year to its Linux reviews and news, the company also offers the [Phoronix Test Suite][2], an open source hardware benchmarking tool, and [OpenBenchmarking.org][3], where test result data is stored. - -According to [Michael Larabel][4], who started Phoronix in 2004, the site "is frequently cited as being the leading source for those interested in computer hardware and Linux. It offers insights regarding the development of the Linux kernel, product reviews, interviews, and news regarding free and open source software." - -I recently had the opportunity to interview Michael about Phoronix and his work. - -The questions and answers have been edited for length and clarity. - -**Don Watkins:** What inspired you to start Phoronix? - -**Michael Larabel:** When I started [Phoronix.com][5] in June 2004, it was still challenging to get a mouse or other USB peripherals working on the popular distributions of the time, like Mandrake, Yoper, MEPIS, and others. So, I set out to work on reviewing different hardware components and their compatibility with Linux. Over time, that shifted more from "does the basic device work?" to how well they perform and what features are supported or unsupported under Linux. - -It's been interesting to see the evolution and the importance of Linux on hardware rise. Linux was very common to LAMP/web servers, but Linux has also become synonymous with high-performance computing (HPC), Android smartphones, cloud software, autonomous vehicles, edge computing, digital signage, and related areas. While Linux hasn't quite dominated the desktop, it's doing great practically everywhere else. - -I also developed the Phoronix Test Suite, with its initial 1.0 public release in 2008, to increase the viability of testing on Linux, engage with more hardware and software vendors on best practices for testing, and just get more test cases running on Linux. At the time, there weren't any really shiny benchmarks on Linux like there were on Windows. - -**DW:** Who are your website's readers? - -**ML:** Phoronix's audience is as diverse as the content. Initially, it was quite desktop/gamer/enthusiast oriented, but as Linux's dominance has grown in HPC, cloud, embedded, etc., my testing has expanded in those areas and thus so has the readership. Readers tend to be interested in open source/Linux ecosystem advancements, performance, and a slight bent towards graphics processor and hardware driver interests. - -**DW:** How important is testing in the Linux world and how has it changed from when you started? - -**ML:** Testing has changed radically since 2004. Back then, many open source projects weren't carrying out any continuous integration (CI) or testing for regressions—both functional issues and performance problems. The hardware vendors supporting Linux were mostly trying to get things working and maintained while being less concerned about performance or scratching away at catching up to Mac, Solaris, and Windows. With time, we've seen the desktop reach close parity with (or exceed, depending upon your views) alternative operating systems. Most PC hardware now works out-of-the-box on Linux, most open source projects engage in some form of CI or testing, and more time and resources are afforded to advancing Linux performance. With high-frequency trading and cloud platforms relying on Linux, performance has become of utmost importance. - -Most of my testing at Phoronix.com is focused on benchmarking processors, graphics cards, storage devices, and other areas of interest to gamers and enthusiasts, but also interesting server platforms. Readers are also quite interested in testing of software components like the Linux kernel, code compilers, and filesystems. But in terms of the Phoronix Test Suite, its scope is rather limitless, with a framework in which new tests can be easily added and automated. There are currently more than 1,000 different profiles/suites, and new ones are routinely added—from machine learning tests to traditional benchmarks. - -**DW:** How important is open source hardware? Where do you see it going? - -**ML:** Open hardware is of increasing importance, especially in light of all the security vulnerabilities and disclosures in recent years. Facebook's work on the [Open Compute Project][6] can be commended, as can Google leveraging [Coreboot][7] in its Chromebook devices, and [Raptor Computing Systems][8]' successful, high-performance, open source POWER9 desktops/workstations/servers. [Intel][9] potentially open sourcing its firmware support package this year is also incredibly tantalizing and will hopefully spur more efforts in this space. - -Outside of that, open source hardware has had a really tough time cracking the consumer space due to the sheer amount of capital necessary and the complexities of designing a modern chip, etc., not to mention competing with the established hardware vendors' marketing budgets and other resources. So, while I would love for 100% open source hardware to dominate—or even compete in features and performance with proprietary hardware—in most segments, that is sadly unlikely to happen, especially with open hardware generally being much more expensive due to economies of scale. - -Software efforts like [OpenBMC][10], Coreboot/[Libreboot][11], and [LinuxBoot][12] are opening up hardware much more. Those efforts at liberating hardware have proven successful and will hopefully continue to be endorsed by more organizations. - -As for [OSHWA][13], I certainly applaud their efforts and the enthusiasm they bring to open source hardware. Certainly, for niche and smaller-scale devices, open source hardware can be a great fit. It will certainly be interesting to see what comes about with OSHWA and some of its partners like Lulzbot, Adafruit, and System76. - -**DW:** Can people install Phoronix Test Suite on their own computers? - -ML: The Phoronix Test Suite benchmarking software is open source under the GPL and can be downloaded from [Phoronix-Test-Suite.com][2] and [GitHub][14]. The benchmarking software works on not only Linux systems but also MacOS, Solaris, BSD, and Windows 10/Windows Server. The Phoronix Test Suite works on x86/x86_64, ARM/AArch64, POWER, RISC-V, and other architectures. - -**DW:** How does [OpenBenchmarking.org][15] work with the Phoronix Test Suite? - -**ML:** OpenBenchmarking.org is, in essence, the "cloud" component to the Phoronix Test Suite. It stores test profiles/test suites in a package manager-like fashion, allows users to upload their own benchmarking results, and offers related functionality around our benchmarking software. - -OpenBenchmarking.org is seamlessly integrated into the Phoronix Test Suite, but from the web interface, it is also where anyone can see the public benchmark results, inspect the open source test profiles to understand their methodology, research hardware and software data, and use similar functionality. - -Another component developed as part of the Phoronix Test Suite is [Phoromatic][16], which effectively allows anyone to deploy their own OpenBenchmarking-like environment within their own private intranet/LAN. This allows organizations to archive their benchmark results locally (and privately), orchestrate benchmarks automatically against groups of systems, manage the benchmark systems, and develop new test cases. - -**DW:** How can people stay up to date on Phoronix? - -**ML:** You can follow [me][17], [Phoronix][18], [Phoronix Test Suite][19], and [OpenBenchMarking.org][20] on Twitter. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/2/phoronix-michael-larabel - -作者:[Don Watkins][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/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://www.phoronix.com/ -[2]: https://www.phoronix-test-suite.com/ -[3]: https://openbenchmarking.org/ -[4]: https://www.michaellarabel.com/ -[5]: http://Phoronix.com -[6]: https://www.opencompute.org/ -[7]: https://www.coreboot.org/ -[8]: https://www.raptorcs.com/ -[9]: https://www.phoronix.com/scan.php?page=news_item&px=Intel-Open-Source-FSP-Likely -[10]: https://en.wikipedia.org/wiki/OpenBMC -[11]: https://libreboot.org/ -[12]: https://linuxboot.org/ -[13]: https://www.oshwa.org/ -[14]: https://github.com/phoronix-test-suite/ -[15]: http://OpenBenchmarking.org -[16]: http://www.phoronix-test-suite.com/index.php?k=phoromatic -[17]: https://twitter.com/michaellarabel -[18]: https://twitter.com/phoronix -[19]: https://twitter.com/Phoromatic -[20]: https://twitter.com/OpenBenchmark diff --git a/sources/talk/20190219 How our non-profit works openly to make education accessible.md b/sources/talk/20190219 How our non-profit works openly to make education accessible.md deleted file mode 100644 index eee670610c..0000000000 --- a/sources/talk/20190219 How our non-profit works openly to make education accessible.md +++ /dev/null @@ -1,136 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How our non-profit works openly to make education accessible) -[#]: via: (https://opensource.com/open-organization/19/2/building-curriculahub) -[#]: author: (Tanner Johnson https://opensource.com/users/johnsontanner3) - -How our non-profit works openly to make education accessible -====== -To build an open access education hub, our team practiced the same open methods we teach our students. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_Education_2_OpenAccess_1040x584_12268077_0614MM.png?itok=xb96iaHe) - -I'm lucky to work with a team of impressive students at Duke University who are leaders in their classrooms and beyond. As members of [CSbyUs][1], a non-profit and student-run organization based at Duke, we connect university students to middle school students, mostly from [title I schools][2] across North Carolina's Research Triangle Park. Our mission is to fuel future change agents from under-resourced learning environments by fostering critical technology skills for thriving in the digital age. - -The CSbyUs Tech R&D team (TRD for short) recently set an ambitious goal to build and deploy a powerful web application over the course of one fall semester. Our team of six knew we had to do something about our workflow to ship a product by winter break. In our middle school classrooms, we teach our learners to use agile methodologies and design thinking to create mobile applications. On the TRD team, we realized we needed to practice what we preach in those classrooms to ship a quality product by semester's end. - -This is the story of how and why we utilized the principles we teach our students in order to deploy technology that will scale our mission and make our teaching resources open and accessible. - -### Setting the scene - -For the past two years, CSbyUs has operated "on the ground," connecting Duke undergraduates to Durham middle schools via after-school programming. After teaching and evaluating several iterations of our unique, student-centered mobile app development curriculum, we saw promising results. Our middle schoolers were creating functional mobile apps, connecting to their mentors, and leaving the class more confident in their computer science skills. Naturally, we wondered how to expand our programming. - -We knew we should take our own advice and lean into web-based technologies to share our work, but we weren't immediately sure what problem we needed to solve. Ultimately, we decided to create a web app that serves as a centralized hub for open source and open access digital education curricula. "CurriculaHub" (name inspired by GitHub) would be the defining pillar of CSbyUs's new website, where educators could share and adapt resources. - -But the vision and implementation didn't happen overnight. - -Given our sense of urgency and the potential of "CurriculaHub," we wanted to start this project with a well defined plan. The stakes were (and are) high, so planning, albeit occasionally tedious, was critical to our success. Like the curriculum we teach, we scaffolded our workflow process with design thinking and agile methodology, two critical 21st century frameworks we often fail to practice in higher ed. - -What follows is a step-wise explanation of our design thinking process, starting from inspiration and ending in a shipped prototype. - -``` -This is the story of how and why we utilized the principles we teach our students in order to deploy technology that will scale our mission and make our teaching resources open and accessible. -``` - -### Our Process - -#### **Step 1: Pre-Work** - -In order to understand the why to our what, you have to know who our team is. - -The members of this team are busy. All of us contribute to CSbyUs beyond our TRD-related responsibilities. As an organization with lofty goals beyond creating a web-based platform, we have to reconcile our "on the ground" commitments (i.e., curriculum curation, research and evaluation, mentorship training and practice, presentations at conferences, etc.) with our "in the cloud" technological goals. - -In addition to balancing time across our organization, we have to be flexible in the ways we communicate. As a remote member of the team, I'm writing this post from Spain, but the rest of our team is based in North Carolina, adding collaboration challenges. - -Before diving into development (or even problem identification), we knew we had to set some clear expectations for how we'd operate as a team. We took a note from our curriculum team's book and started with some [rules of engagement][3]. This is actually [a well-documented approach][4] to setting up a team's [social contract][5] used by teams across the tech space. During a summer internship at IBM, I remember pre-project meetings where my manager and team spent more than an hour clarifying principles of interaction. Whenever we faced uncertainty in our team operations, we'd pull out the rules of engagement and clear things up almost immediately. (An aside: I've found this strategy to be wildly effective not only in my teams, but in all relationships). - -Considering the remote nature of our team, one of our favorite tools is Slack. We use it for almost everything. We can't have sticky-note brainstorms, so we create Slack brainstorm threads. In fact, that's exactly what we did to generate our rules of engagement. One [open source principle we take to heart is transparency][6]; Slack allows us to archive and openly share our thought processes and decision-making steps with the rest of our team. - -#### **Step 2: Empathy Research** - -We're all here for unique reasons, but we find a common intersection: the desire to broaden equity in access to quality digital era education. - -Each member of our team has been lucky enough to study at Duke. We know how it feels to have limitless opportunities and the support of talented peers and renowned professors. But we're mindful that this isn't normal. Across the country and beyond, these opportunities are few and far between. Where they do exist, they're confined within the guarded walls of higher institutes of learning or come with a lofty price tag. - -While our team members' common desire to broaden access is clear, we work hard to root our decisions in research. So our team begins each semester [reviewing][7] [research][8] that justifies our existence. TRD works with CRD (curriculum research and development) and TT (teaching team), our two other CSbyUs sub-teams, to discuss current trends in digital education access, their systemic roots, and novel approaches to broaden access and make materials relevant to learners. We not only perform research collaboratively at the beginning of the semester but also implement weekly stand-up research meetings with the sub-teams. During these, CRD often presents new findings we've gleaned from interviewing current teachers and digging into the current state of access in our local community. They are our constant source of data-driven, empathy-fueling research. - -Through this type of empathy-based research, we have found that educators interested in student-centered teaching and digital era education lack a centralized space for proven and adaptable curricula and lesson plans. The bureaucracy and rigid structures that shape classroom learning in the United States makes reshaping curricula around the personal needs of students daunting and seemingly impossible. As students, educators, and technologists, we wondered how we might unleash the creativity and agency of others by sharing our own resources and creating an online ecosystem of support. - -#### **Step 3: Defining the Problem** - -We wanted to avoid [scope creep][9] caused by a poorly defined mission and vision (something that happens too often in some organizations). We needed structures to define our goals and maintain clarity in scope. Before imagining our application features, we knew we'd have to start with defining our north star. We would generate a clear problem statement to which we could refer throughout development. - -Before imagining our application features, we knew we'd have to start with defining our north star. - -This is common practice for us. Before committing to new programming, new partnerships, or new changes, the CSbyUs team always refers back to our mission and vision and asks, "Does this make sense?" (in fact, we post our mission and vision to the top of every meeting minutes document). If it fits and we have capacity to pursue it, we go for it. And if we don't, then we don't. In the case of a "no," we are always sure to document what and why because, as engineers know, [detailed logs are almost always a good decision][10]. TRD gleaned that big-picture wisdom and implemented a group-defined problem statement to guide our sub-team mission and future development decisions. - -To formulate a single, succinct problem statement, we each began by posting our own takes on the problem. Then, during one of our weekly [30-minute-no-more-no-less stand-up meetings][11], we identified commonalities and differences, ultimately [merging all our ideas into one][12]. Boiled down, we identified that there exist massive barriers for educators, parents, and students to share, modify, and discuss open source and accessible curricula. And of course, our mission would be to break down those barriers with user-centered technology. This "north star" lives as a highly visible document in our Google Drive, which has influenced our feature prioritization and future directions. - -#### **Step 4: Ideating a Solution** - -With our problem defined and our rules of engagement established, we were ready to imagine a solution. - -We believe that effective structures can ensure meritocracy and community. Sometimes, certain personalities dominate team decision-making and leave little space for collaborative input. To avoid that pitfall and maximize our equality of voice, we tend to use "offline" individual brainstorms and merge collective ideas online. It's the same process we used to create our rules of engagement and problem statement. In the case of ideating a solution, we started with "offline" brainstorms of three [S.M.A.R.T. goals][13]. Those goals would be ones we could achieve as a software development team (specifically because the CRD and TT teams offer different skill sets) and address our problem statement. Finally, we wrote these goals in a meeting minutes document, clustering common goals and ultimately identifying themes that describe our application features. In the end, we identified three: support, feedback, and open source curricula. - -From here, we divided ourselves into sub-teams, repeating the goal-setting process with those teams—but in a way that was specific to our features. And if it's not obvious by now, we realized a web-based platform would be the most optimal and scalable solution for supporting students, educators, and parents by providing a hub for sharing and adapting proven curricula. - -To work efficiently, we needed to be adaptive, reinforcing structures that worked and eliminating those that didn't. For example, we put a lot of effort in crafting meeting agendas. We strive to include only those subjects we must discuss in-person and table everything else for offline discussions on Slack or individually organized calls. We practice this in real time, too. During our regular meetings on Google Hangouts, if someone brings up a topic that isn't highly relevant or urgent, the current stand-up lead (a role that rotates weekly) "parking lots" it until the end of the meeting. If we have space at the end, we pull from the parking lot, and if not, we reserve that discussion for a Slack thread. - -This prioritization structure has led to massive gains in meeting efficiency and a focus on progress updates, shared technical hurdle discussions, collective decision-making, and assigning actionable tasks (the next-steps a person has committed to taking, documented with their name attached for everyone to view). - -#### **Step 5: Prototyping** - -This is where the fun starts. - -Our team was only able to unite new people with highly varied experience through the power of open principles and methodologies. - -Given our requirements—like an interactive user experience, the ability to collaborate on blogs and curricula, and the ability to receive feedback from our users—we began identifying the best technologies. Ultimately, we decided to build our web app with a ReactJS frontend and a Ruby on Rails backend. We chose these due to the extensive documentation and active community for both, and the well-maintained libraries that bridge the relationship between the two (e.g., react-on-rails). Since we chose Rails for our backend, it was obvious from the start that we'd work within a Model-View-Controller framework. - -Most of us didn't have previous experience with web development, neither on the frontend nor the backend. So, getting up and running with either technology independently presented a steep learning curve, and gluing the two together only steepened it. To centralize our work, we use an open-access GitHub repository. Given our relatively novice experience in web development, our success hinged on extremely efficient and open collaborations. - -And to explain that, we need to revisit the idea of structures. Some of ours include peer code reviews—where we can exchange best-practices and reusable solutions, maintaining up-to-date tech and user documentation so we can look back and understand design decisions—and (my personal favorite) our questions bot on Slack, which gently reminds us to post and answer questions in a separate Slack #questions channel. - -We've also dabbled with other strategies, like instructional videos for generating basic React components and rendering them in Rails Views. I tried this and in my first video, [I covered a basic introduction to our repository structure][14] and best practices for generating React components. While this proved useful, our team has since realized the wealth of online resources that document various implementations of these technologies robustly. Also, we simply haven't had enough time (but we might revisit them in the future—stay tuned). - -We're also excited about our cloud-based implementation. We use Heroku to host our application and manage data storage. In next iterations, we plan to both expand upon our current features and configure a continuous iteration/continuous development pipeline using services like Jenkins integrated with GitHub. - -#### **Step 6: Testing** - -Since we've [just deployed][1], we are now in a testing stage. Our goals are to collect user feedback across our feature domains and our application experience as a whole, especially as they interact with our specific audiences. Given our original constraints (namely, time and people power), this iteration is the first of many to come. For example, future iterations will allow for individual users to register accounts and post external curricula directly on our site without going through the extra steps of email. We want to scale and maximize our efficiency, and that's part of the recipe we'll deploy in future iterations. As for user testing: We collect user feedback via our contact form, via informal testing within our team, and via structured focus groups. [We welcome your constructive feedback and collaboration][15]. - -Our team was only able to unite new people with highly varied experience through the power of open principles and methodologies. Luckily enough, each one I described in this post is adaptable to virtually every team. - -Regardless of whether you work—on a software development team, in a classroom, or, heck, [even in your family][16]—principles like transparency and community are almost always the best foundation for a successful organization. - - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/19/2/building-curriculahub - -作者:[Tanner Johnson][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/johnsontanner3 -[b]: https://github.com/lujun9972 -[1]: http://csbyus.org -[2]: https://www2.ed.gov/programs/titleiparta/index.html -[3]: https://docs.google.com/document/d/1tqV6B6Uk-QB7Psj1rX9tfCyW3E64_v6xDlhRZ-L2rq0/edit -[4]: https://www.atlassian.com/team-playbook/plays/rules-of-engagement -[5]: https://openpracticelibrary.com/practice/social-contract/ -[6]: https://opensource.com/open-organization/resources/open-org-definition -[7]: https://services.google.com/fh/files/misc/images-of-computer-science-report.pdf -[8]: https://drive.google.com/file/d/1_iK0ZRAXVwGX9owtjUUjNz3_2kbyYZ79/view?usp=sharing -[9]: https://www.pmi.org/learning/library/top-five-causes-scope-creep-6675 -[10]: https://www.codeproject.com/Articles/42354/The-Art-of-Logging#what -[11]: https://opensource.com/open-organization/16/2/6-steps-running-perfect-30-minute-meeting -[12]: https://docs.google.com/document/d/1wdPRvFhMKPCrwOG2CGp7kP4rKOXrJKI77CgjMfaaXnk/edit?usp=sharing -[13]: https://www.projectmanager.com/blog/how-to-create-smart-goals -[14]: https://www.youtube.com/watch?v=52kvV0plW1E -[15]: http://csbyus.org/ -[16]: https://opensource.com/open-organization/15/11/what-our-families-teach-us-about-organizational-life diff --git a/sources/talk/20190225 Teaching scientists how to share code.md b/sources/talk/20190225 Teaching scientists how to share code.md deleted file mode 100644 index 541cce2719..0000000000 --- a/sources/talk/20190225 Teaching scientists how to share code.md +++ /dev/null @@ -1,72 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( jiangyaomin) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Teaching scientists how to share code) -[#]: via: (https://opensource.com/article/19/2/open-science-git) -[#]: author: (Jon Tennant https://opensource.com/users/jon-tennant) - -Teaching scientists how to share code -====== -This course teaches them how to set up a GitHub project, index their project in Zenodo, and integrate Git into an RStudio workflow. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003588_01_rd3os.combacktoschoolserieshe_rh_051x_0.png?itok=gIzbmxuI) - -Would it surprise you to learn that most of the world's scholarly research is not owned by the people who funded it or who created it? Rather it's owned by private corporations and locked up in proprietary systems, leading to [problems][1] around sharing, reuse, and reproducibility. - -The open science movement is challenging this system, aiming to give researchers control, ownership, and freedom over their work. The [Open Science MOOC][2] (massively open online community) is a mission-driven project launched in 2018 to kick-start an open scientific revolution and foster more partnerships between open source software and open science. - -The Open Science MOOC is a peer-to-peer community of practice, based around sharing knowledge and ideas, learning new skills, and using these things to develop as individuals so research communities can grow as part of a wider cultural shift towards openness. - -### The curriculum - -The Open Science MOOC is divided into 10 core modules, from the principles of open science to becoming an open science advocate. - -The first module, [Open Research Software and Open Source][3], was released in late 2018. It includes three main tasks, all designed to help make research workflows more efficient and more open for collaboration: - -#### 1\. Setting up your first GitHub project - -GitHub is a powerful project management tool, both for coders and non-coders. This task teaches how to create a community around the platform, select an appropriate license, and write good documentation (including README files, contributing guidelines, and codes of conduct) to foster open collaboration and a welcoming community. - -#### 2\. Indexing your project in Zenodo - -[Zenodo][4] is an open science platform that seamlessly integrates with GitHub to help make projects more permanent, reusable, and citable. This task explains how webhooks between Zenodo and GitHub allow new versions of projects to become permanently archived as they progress. This is critical for helping researchers get a [DOI][5] for their work so they can receive full credit for all aspects of a project. As citations are still a primary form of "academic capital," this is essential for researchers. - -#### 3\. Integrating Git into an RStudio workflow - -This task is about giving research a mega-boost through greater collaborative efficiency and reproducibility. Git enables version control in all forms of text-based content, including data analysis and writing papers. Each time you save your work during the development process, Git saves time-stamped copies. This saves the hassle of trying to "roll back" projects if you delete a file or text by mistake, and eliminates horrific file-naming conventions. (For example, does FINAL_Revised_2.2_supervisor_edits_ver1.7_scream.txt look familiar?) Getting Git to interface with RStudio is the painful part, but this task goes through it, step by step, to ease the stress. - -The third task also gives students the ability to interact directly with the MOOC by submitting pull requests to demonstrate their skills. This also adds their name to an online list of open source champions (aka "open sourcerers"). - -The MOOC's inherently interactive style is much more valuable than listening to someone talk at you, either on or off screen, like with many traditional online courses or educational programs. Each task is backed up by expert-gathered knowledge, so students get a rigorous, dual-learning experience. - -### Empowering researchers - -The Open Science MOOC strives to be as open as possible—this means we walk the walk and talk the talk. We are built upon a solid values-based foundation of freedom and equitable access to research. We see this route towards widespread adoption of best scientific practices as an essential part of the research process. - -Everything we produce is openly developed and openly licensed for maximum engagement, sharing, and reuse. An open source workflow underpins our development. All of this happens openly around channels such as [Slack][6] and [GitHub][7] and helps to make the community much more coherent. - -If we can instill the value of open source into modern research, this would empower current and future generations of researchers to think more about fundamental freedoms around knowledge production. We think that is something worth working towards as a community. - -The Open Science MOOC combines the best elements of the open education, open science, and open source worlds. If you're ready to join, [sign up for the full course][3], which is, of course, free. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/2/open-science-git - -作者:[Jon Tennant][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/jiangyaomin) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jon-tennant -[b]: https://github.com/lujun9972 -[1]: https://www.theguardian.com/science/political-science/2018/jun/29/elsevier-are-corrupting-open-science-in-europe -[2]: https://opensciencemooc.eu/ -[3]: https://eliademy.com/catalog/oer/module-5-open-research-software-and-open-source.html -[4]: https://zenodo.org/ -[5]: https://en.wikipedia.org/wiki/Digital_object_identifier -[6]: https://osmooc.herokuapp.com/ -[7]: https://open-science-mooc-invite.herokuapp.com/ diff --git a/sources/talk/20190301 What-s happening in the OpenStack community.md b/sources/talk/20190301 What-s happening in the OpenStack community.md deleted file mode 100644 index 28e3bf2fd3..0000000000 --- a/sources/talk/20190301 What-s happening in the OpenStack community.md +++ /dev/null @@ -1,73 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What's happening in the OpenStack community?) -[#]: via: (https://opensource.com/article/19/3/whats-happening-openstack) -[#]: author: (Jonathan Bryce https://opensource.com/users/jonathan-bryce) - -What's happening in the OpenStack community? -====== - -In many ways, 2018 was a transformative year for the OpenStack Foundation. - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/travel-mountain-cloud.png?itok=ZKsJD_vb) - -Since 2010, the OpenStack community has been building open source software to run cloud computing infrastructure. Initially, the focus was public and private clouds, but open infrastructure has been pulled into many new important use cases like telecoms, 5G, and manufacturing IoT. - -As OpenStack software matured and grew in scope to support new technologies like bare metal provisioning and container infrastructure, the community widened its thinking to embrace users who deploy and run the software in addition to the developers who build the software. Questions like, "What problems are users trying to solve?" "Which technologies are users trying to integrate?" and "What are the gaps?" began to drive the community's thinking and decision making. - -In response to those questions, the OSF reorganized its approach and created a new "open infrastructure" framework focused on use cases, including edge, container infrastructure, CI/CD, and private and hybrid cloud. And, for the first time, the OSF is hosting open source projects outside of the OpenStack project. - -Following are three highlights from the [OSF 2018 Annual Report][1]; I encourage you to read the entire report for more detailed information about what's new. - -### Pilot projects - -On the heels of launching [Kata Containers][2] in December 2017, the OSF launched three pilot projects in 2018—[Zuul][3], [StarlingX][4], and [Airship][5]—that help further our goals of taking our technology into additional relevant markets. Each project follows the tenets we consider key to the success of true open source, [the Four Opens][6]: open design, open collaboration, open development, and open source. While these efforts are still new, they have been extremely valuable in helping us learn how we should expand the scope of the OSF, as well as showing others the kind of approach we will take. - -While the OpenStack project remained at the core of the team's focus, pilot projects are helping expand usage of open infrastructure across markets and already benefiting the OpenStack community. This has attracted dozens of new developers to the open infrastructure community, which will ultimately benefit the OpenStack community and users. - -There is direct benefit from these contributors working upstream in OpenStack, such as through StarlingX, as well as indirect benefit from the relationships we've built with the Kubernetes community through the Kata Containers project. Airship is similarly bridging the gaps between the Kubernetes and OpenStack ecosystems. This shows users how the technologies work together. A rise in contributions to Zuul has provided the engine for OpenStack CI and keeps our development running smoothly. - -### Containers collaboration - -In addition to investing in new pilot projects, we continued efforts to work with key adjacent projects in 2018, and we made particularly good progress with Kubernetes. OSF staffer Chris Hoge helps lead the cloud provider special interest group, where he has helped standardize how Kubernetes deployments expect to run on top of various infrastructure. This has clarified OpenStack's place in the Kubernetes ecosystem and led to valuable integration points, like having OpenStack as part of the Kubernetes release testing process. - -Additionally, OpenStack Magnum was certified as a Kubernetes installer by the CNCF. Through the Kata Containers community, we have deepened these relationships into additional areas within the container ecosystem resulting in a number of companies getting involved for the first time. - -### Evolving events - -We knew heading into 2018 that the environment around our events was changing and we needed to respond. During the year, we held two successful project team gatherings (PTGs) in Dublin and Denver, reaching capacity for both events while also including new projects and OpenStack operators. We held OpenStack Summits in Vancouver and Berlin, both experiencing increases in attendance and project diversity since Sydney in 2017, with each Summit including more than 30 open source projects. Recognizing this broader audience and the OSF's evolving strategy, the OpenStack Summit was renamed the [Open Infrastructure Summit][7], beginning with the Denver event coming up in April. - -In 2018, we boosted investment in China, onboarding a China Community Manager based in Shanghai and hosting a strategy day in Beijing with 30+ attendees from Gold and Platinum Members in China. This effort will continue in 2019 as we host our first Summit in China: the [Open Infrastructure Summit Shanghai][8] in November. - -We also worked with the community in 2018 to define a new model for events to maximize participation while saving on travel and expenses for the individuals and companies who are increasingly stretched across multiple open source communities. We arrived at a plan that we will implement and iterate on in 2019 where we will collocate PTGs as standalone events adjacent to our Open Infrastructure Summits. - -### Looking ahead - -We've seen impressive progress, but the biggest accomplishment might be in establishing a framework for the future of the foundation itself. In 2018, we advanced the open infrastructure mission by establishing OSF as an effective place to collaborate for CI/CD, container infrastructure, and edge computing, in addition to the traditional public and private cloud use cases. The open infrastructure approach opened a lot of doors in 2018, from the initial release of software from each pilot project, to live 5G demos, to engagement with hyperscale public cloud providers. - -Ultimately, our value comes from the effectiveness of our communities and the software they produce. As 2019 unfolds, our community is excited to apply learnings from 2018 to the benefit of developers, users, and the commercial ecosystem across all our projects. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/3/whats-happening-openstack - -作者:[Jonathan Bryce][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/jonathan-bryce -[b]: https://github.com/lujun9972 -[1]: https://www.openstack.org/foundation/2018-openstack-foundation-annual-report -[2]: https://katacontainers.io/ -[3]: https://zuul-ci.org/ -[4]: https://www.starlingx.io/ -[5]: https://www.airshipit.org/ -[6]: https://www.openstack.org/four-opens/ -[7]: https://www.openstack.org/summit/denver-2019/ -[8]: https://www.openstack.org/summit/shanghai-2019 diff --git a/sources/talk/20190306 How to pack an IT travel kit.md b/sources/talk/20190306 How to pack an IT travel kit.md deleted file mode 100644 index b05ee460b7..0000000000 --- a/sources/talk/20190306 How to pack an IT travel kit.md +++ /dev/null @@ -1,100 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to pack an IT travel kit) -[#]: via: (https://opensource.com/article/19/3/it-toolkit-remote) -[#]: author: (Peter Cheer https://opensource.com/users/petercheer) - -How to pack an IT travel kit -====== -Before you travel, make sure you're ready for challenges in hardware, infrastructure, and software. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_sysadmin_cloud.png?itok=sUciG0Cn) - -I've had several opportunities to do IT work in less-developed and remote areas, where internet coverage and technology access aren't at the high level we have in our first-world cities. Many people heading off to undeveloped areas ask me for advice on preparing for the local technology landscape. Since conditions vary greatly around this big world, it's impossible to give specific advice for most areas, but I do have some general suggestions based on my experience that may help you. - -Also, before you leave home, do as much research as you can about the general IT and telecom environment where you are traveling so you're a little better prepared for what you may encounter there. - -### Planning for the local hardware and infrastructure - - * Even in many cities, internet connections tend to be expensive, slow, and not reliable for large downloads. Don't forget that internet coverage, speeds, and cost in cities are unlikely to be matched in more remote areas. - - - * The electricity supply may be unreliable with inconsistent voltage. If you are taking your computer, bring some surge protection—although in my experience, the electricity voltage is more likely to drop than to spike. - - - * It is always useful to have a small selection of hand tools, such as screwdrivers and needle-nose pliers, for repairing computer hardware. A lack of spare parts can limit opportunities for much beyond basic troubleshooting, although stripping usable components from dead computers can be worthwhile. - - - -### Planning for the software you'll find - - * You can assume that most of the computer systems you'll find will be some incarnation of Microsoft Windows. You can expect that many will not be officially licensed, not be getting updates nor security patches, and are infected by multiple viruses and other malware. - - - * You can also expect that most application software will be proprietary and much of it will be unlicensed and lag behind the latest release versions. These conditions are depressing for open source enthusiasts, but this is the world as it is, rather than the world we would like it to be. - - - * It is wise to view any Windows system you do not control as potentially infected with viruses and malware. It's good practice to reserve a USB thumb drive for files you'll use with these Windows systems; this means that if (or more likely when) that thumb drive becomes infected, you can just reformat it at no cost. - - - * Bring copies of free antivirus software such as [AVG][1] and [Avast][2], including recent virus definition files for them, as well as virus removal and repair tools such as [Sophos][3] and [Hirens Boot CD][4]. - - - * Trying to keep software current on machines that have no or infrequent access to the internet is a challenge. This is particularly true with web browsers, which tend to go through rapid release cycles. My preferred web browser is Mozilla Firefox and having a copy of the latest release is useful. - - - * Bring repair discs for a selection of recent Microsoft operating systems, and make sure that includes service packs for Windows and Microsoft Office. - - - -### Planning for the software you'll bring - -There's no better way to convey the advantages of open source software than by showing it to people. Here are some recommendations along that line. - - * When gathering software to take with you, make sure you get the full offline installation option. Often, the most prominently displayed download links on websites are stubs that require internet access to download the components. They won't work if you're in an area with poor (or no) internet service. - - - * Also, make sure to get the 32-bit and 64-bit versions of the software. While 32-bit machines are becoming less common, you may encounter them and it's best to be prepared. - - - * Having a [bootable version of Linux][5] is vital for two reasons. First, it can be used to rescue data from a seriously damaged Windows machine. Second, it's an easy way to show off Linux without installing it on someone's machine. [Linux Mint][6] is my favorite distro for this purpose, because the graphical interface (GUI) is similar enough to Windows to appear non-threatening and it includes a good range of application software. - - - * Bring the widest selection of open source applications you can—you can't count on being able to download something from the internet. - - - * When possible, bring your open source software library as portable applications that will run without installing them. One of the many ways to mess up those Windows machines is to install and uninstall a lot of software, and using portable apps gets around this problem. Many open source applications, including Libre Office, GIMP, Blender, and Inkscape, have portable app versions for Windows. - - - * It's smart to bring a supply of blank disks so you can give away copies of your open source software stash on media that is a bit more secure than a USB thumb drive. - - - * Don't forget to bring programs and resources related to projects you will be working on. (For example, most of my overseas work involves tuition, mentoring, and skills transfer, so I usually add a selection of open source software tools for creating learning resources.) - - - -### Your turn - -There are many variables and surprises when doing IT work in undeveloped areas. If you have suggestions—for programs I've missed or tips that I didn't cover—please share them in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/3/it-toolkit-remote - -作者:[Peter Cheer][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/petercheer -[b]: https://github.com/lujun9972 -[1]: https://www.avg.com/en-gb/free-antivirus-download -[2]: https://www.avast.com/en-gb/free-antivirus-download -[3]: https://www.sophos.com/en-us/products/free-tools/virus-removal-tool.aspx -[4]: https://www.hiren.info/ -[5]: https://opensource.com/article/18/7/getting-started-etcherio -[6]: https://linuxmint.com/ diff --git a/sources/talk/20190307 Small Scale Scrum vs. Large Scale Scrum.md b/sources/talk/20190307 Small Scale Scrum vs. Large Scale Scrum.md deleted file mode 100644 index 7da83306a5..0000000000 --- a/sources/talk/20190307 Small Scale Scrum vs. Large Scale Scrum.md +++ /dev/null @@ -1,106 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Small Scale Scrum vs. Large Scale Scrum) -[#]: via: (https://opensource.com/article/19/3/small-scale-scrum-vs-large-scale-scrum) -[#]: author: (Agnieszka Gancarczyk https://opensource.com/users/agagancarczyk) - -Small Scale Scrum vs. Large Scale Scrum -====== -We surveyed individual members of small and large scrum teams. Here are some key findings. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_crowdvsopen.png?itok=AFjno_8v) - -Following the publication of the [Small Scale Scrum framework][1], we wanted to collect feedback on how teams in our target demographic (consultants, open source developers, and students) work and what they value. With this first opportunity to inspect, adapt, and help shape the next stage of Small Scale Scrum, we decided to create a survey to capture some data points and begin to validate some of our assumptions and hypotheses. - -**[[Download the Introduction to Small Scale Scrum guide]][2]** - -Our reasons for using the survey were multifold, but chief among them were the global distribution of teams, the small local data sample available in our office, access to customers, and the industry’s utilization of surveys (e.g., the [Stack Overflow Developer Survey 2018][3], [HackerRank 2018 Developer Skills Report][4], and [GitLab 2018 Global Developer Report][5]). - -The scrum’s iterative process was used to facilitate the creation of the survey shown below: - -![](https://opensource.com/sites/default/files/uploads/survey_process.png) - -[The survey][6], which we invite you to complete, consisted of 59 questions and was distributed at a local college ([Waterford Institute of Technology][7]) and to Red Hat's consultancy and engineering teams. Our initial data was gathered from the responses of 54 individuals spread across small and large scrum teams, who were asked about their experiences with agile within their teams. - -Here are the main results and initial findings of the survey: - - * A full 96% of survey participants practice a form of agile, work in distributed teams, think scrum principles help them reduce development complexity, and believe agile contributes to the success of their projects. - - * Only 8% of survey participants belong to small (one- to three-person) teams, and 10 out of 51 describe their typical project as short-lived (three months or less). - - * The majority of survey participants were software engineers, but quality engineers (QE), project managers (PM), product owners (PO), and scrum masters were also represented. - - * Scrum master, PO, and team member are typical roles in projects. - - * Nearly half of survey respondents work on, or are assigned to, more than one project at the same time. - - * Almost half of projects are customer/value-generating vs. improvement/not directly value-generating or unclassified. - - * Almost half of survey participants said that their work is clarified sometimes or most of the time and estimated before development with extensions available sometimes or most of the time. They said asking for clarification of work items is the team’s responsibility. - - * Almost half of survey respondents said they write tests for their code, and they adhere to best coding practices, document their code, and get their code reviewed before merging. - - * Almost all survey participants introduce bugs to the codebase, which are prioritized by them, the team, PM, PO, team lead, or the scrum master. - - * Participants ask for help and mentoring when a task is complex. They also take on additional roles on their projects when needed, including business analyst, PM, QE, and architect, and they sometimes find changing roles difficult. - - * When changing roles on a daily basis, individuals feel they lose one to two hours on average, but they still complete their work on time most of the time. - - * Most survey participants use scrum (65%), followed by hybrid (18%) and Kanban (12%). This is consistent with results of [VersionOne’s State of Agile Report][8]. - - * The daily standup, sprint, sprint planning and estimating, backlog grooming, and sprint retrospective are among the top scrum ceremonies and principles followed, and team members do preparation work before meetings. - - * The majority of sprints (62%) are three weeks long, followed by two-week sprints (26%), one-week sprints (6%), and four-week sprints (4%). Two percent of participants are not using sprints due to strict release and update timings, with all activities organized and planned around those dates. - - * Teams use [planning poker][9] to estimate (storypoint) user stories. User stories contain acceptance criteria. - - * Teams create and use a [Definition of Done][10] mainly in respect to features and determining completion of user stories. - - * The majority of teams don’t have or use a [Definition of Ready][11] to ensure that user stories are actionable, testable, and clear. - - * Unit, integration, functional, automated, performance/load, and acceptance tests are commonly used. - - * Overall collaboration between team members is considered high, and team members use various communication channels. - - * The majority of survey participants spend more than four hours weekly in meetings, including face-to-face meetings, web conferences, and email communication. - - * The majority of customers are considered large, and half of them understand and follow scrum principles. - - * Customers respect “no deadlines” most of the time and sometimes help create user stories and participate in sprint planning, sprint review and demonstration, sprint retrospective, and backlog review and refinement. - - * Only 27% of survey participants know their customers have a high level of satisfaction with the adoption of agile, while the majority (58%) don’t know this information at all. - - - - -These survey results will inform the next stage of our data-gathering exercise. We will apply Small Scale Scrum to real-world projects, and the guidance obtained from the survey will help us gather key data points as we move toward version 2.0 of Small Scale Scrum. If you want to help, take our [survey][6]. If you have a project to which you'd like to apply Small Scale Scrum, please get in touch. - -[Download the Introduction to Small Scale Scrum guide][2] - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/3/small-scale-scrum-vs-large-scale-scrum - -作者:[Agnieszka Gancarczyk][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/agagancarczyk -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/article/19/2/small-scale-scrum-framework -[2]: https://opensource.com/downloads/small-scale-scrum -[3]: https://insights.stackoverflow.com/survey/2018/ -[4]: https://research.hackerrank.com/developer-skills/2018/ -[5]: https://about.gitlab.com/developer-survey/2018/ -[6]: https://docs.google.com/forms/d/e/1FAIpQLScAXf52KMEiEzS68OOIsjLtwZJto_XT7A3b9aB0RhasnE_dEw/viewform?c=0&w=1 -[7]: https://www.wit.ie/ -[8]: https://explore.versionone.com/state-of-agile/versionone-12th-annual-state-of-agile-report -[9]: https://en.wikipedia.org/wiki/Planning_poker -[10]: https://www.scruminc.com/definition-of-done/ -[11]: https://www.scruminc.com/definition-of-ready/ diff --git a/sources/talk/20190313 Why is no one signing their emails.md b/sources/talk/20190313 Why is no one signing their emails.md deleted file mode 100644 index b2b862951a..0000000000 --- a/sources/talk/20190313 Why is no one signing their emails.md +++ /dev/null @@ -1,104 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why is no one signing their emails?) -[#]: via: (https://arp242.net/weblog/signing-emails.html) -[#]: author: (Martin Tournoij https://arp242.net/) - -Why is no one signing their emails? -====== - - -I received this email a while ago: - -> Queensland University of Technology sent you an Amazon.com Gift Card! -> -> You’ve received an Amazon.com gift card! You’ll need the claim code below to place your order. -> -> Happy shopping! - -Queensland University of Technology? Why would they send me anything? Where is that even? Australia right? That’s the other side of the world! Looks like spam! - -It did look pretty good for spam, so I took a second look. And a very close third look, and then I decided it wasn’t spam. - -I was still confused why they sent me this. A week later I remembered: half a year prior I had done an interview regarding my participation on Stack Overflow for someone’s paper; she was studying somewhere in Australia – presumably the university of Queensland. No one had ever mentioned anything about a reward or Amazon gift card so I wasn’t expecting it. It’s a nice bonus though. - -Here’s the thing: I’ve spent several years professionally developing email systems; I administered email servers; I read all the relevant RFCs. While there are certainly people who are more knowledgable, I know more about email than the vast majority of the population. And I still had to take a careful look to verify the email wasn’t a phishing attempt. - -And I’m not even a target; I’m just this guy, you know? [Ask John Podesta what it is to be targeted][1]: - -> SecureWorks concluded Fancy Bear had sent Podesta an email on March 19, 2016, that had the appearance of a Google security alert, but actually contained a misleading link—a strategy known as spear-phishing. [..] The email was initially sent to the IT department as it was suspected of being a fake but was described as “legitimate” in an e-mail sent by a department employee, who later said he meant to write “illegitimate”. - -Yikes! If I was even remotely high-profile I’d be crazy paranoid about all emails I get. - -It seems to me that there is a fairly easy solution to verify the author of an email: sign it with a digital signature; PGP is probably the best existing solution right now. I don’t even care about encryption here, just signing to prevent phishing. - -PGP has a well-deserved reputation for being hard, but that’s only for certain scenarios. A lot of the problems/difficulties stem from trying to accommodate the “random person A emails random person B” use case, but this isn’t really what I care about here. “Large company with millions of users sends thousands of emails daily” is a very different use case. - -Much of the key exchange/web-of-trust dilemma can be bypassed by shipping email clients with keys for large organisations (PayPal, Google, etc.) baked in, like browsers do with some certificates. Even just publishing your key on your website (or, if you’re a bank, in local branches etc.) is already a lot better than not signing anything at all. Right now there seems to be a catch-22 scenario: clients don’t implement better support as very few people are using PGP, while very few companies bother signing their emails with PGP because so few people can benefit from it. - -On the end-user side, things are also not very hard; we’re just conceded with validating signatures, nothing more. For this purpose PGP isn’t hard. It’s like verifying your Linux distro’s package system: all of them sign their packages (usually with PGP) and they get verified on installation, but as an end-user I never see it unless something goes wrong. - -There are many aspects of PGP that are hard to set up and manage, but verifying signatures isn’t one of them. The user-visible part of this is very limited. Remember, no one is expected to sign their own emails: just verify that the signature is correct (which the software will do). Conceptually, it’s not that different from verifying a handwritten signature. - -DKIM and SPF already exist and are useful, but limited. All both do is verify that an email which claims to be from `amazon.com` is really from `amazon.com`. If I send an email from `mail.amazon-account-security.com` or `amazonn.com` then it just verifies that it was sent from that domain, not that it was sent from the organisation Amazon. - -What I am proposing is subtly different. In my (utopian) future every serious organisation will sign their email with PGP (just like every serious organisation uses https). Then every time I get an email which claims to be from Amazon I can see it’s either not signed, or not signed by a key I know. If adoption is broad enough we can start showing warnings such as “this email wasn’t signed, do you want to trust it?” and “this signature isn’t recognized, yikes!” - -There’s also S/MIME, which has better client support and which works more or less the same as HTTPS: you get a certificate from the Certificate Authority Mafia, sign your email with it, and presto. The downside of this is that anyone can sign their emails with a valid key, which isn’t necessarily telling you much (just because haxx0r.ru has a certificate doesn’t mean it’s trustworthy). - -Is it perfect? No. I understand stuff like key exchange is hard and that baking in keys isn’t perfect. Is it better? Hell yes. Would probably have avoided Podesta and the entire Democratic Party a lot of trouble. Here’s a “[sophisticated new phishing campaign][2]” targeted at PayPal users. How “sophisticated”? Well, by not having glaring stupid spelling errors, duplicating the PayPal layout in emails, duplicating the PayPal login screen, a few forms, and getting an SSL certificate. Truly, the pinnacle of Computer Science. - -Okay sure, they spent some effort on it; but any nincompoop can do it; if this passes for “sophisticated phishing” where “it’s easy to see how users could be fooled” then the bar is pretty low. - -I can’t recall receiving a single email from any organisation that is signed (much less encrypted). Banks, financial services, utilities, immigration services, governments, tax services, voting registration, Facebook, Twitter, a zillion websites … all happily sent me emails hoping I wouldn’t consider them spam and hoping I wouldn’t confuse a phishing email for one of theirs. - -Interesting experiment: send invoices for, say, a utility bill for a local provider. Just copy the layout from the last utility bill you received. I’ll bet you’ll make more money than freelancing on UpWork if you do it right. - -I’ve been intending to write this post for years, but never quite did because “surely not everyone is stupid?” I’m not a crypto expert, so perhaps I’m missing something here, but I wouldn’t know what. Let me know if I am. - -In the meanwhile PayPal is attempting to solve the problem by publishing [articles which advise you to check for spelling errors][3]. Okay, it’s good advice, but do we really want this to be the barrier between an attacker and your money? Or Russian hacking groups and your emails? Anyone can sign any email with any key, but “unknown signature” warnings strike me as a lot better UX than “carefully look for spelling errors or misleading domain names”. - -The way forward is to make it straight-forward to implement signing in apps and then just do it as a developer, whether asked or not; just as you set up https whether you’re asked or not. I’ll write a follow-up with more technical details later, assuming no one pokes holes in this article :-) - -#### Response to some feedback - -Some response to some feedback that I couldn’t be bothered to integrate in the article’s prose: - - * “You can’t trust webmail with crypto!” -If you use webmail then you’re already trusting the email provider with everything. What’s so bad with trusting them to verify a signature, too? - -We’re not communicating state secrets over encrypted email here; we’re just verifying the signature on “PayPal sent you a message, click here to view it”-kind of emails. - - * “Isn’t this ignoring the massive problem that is key management?” -Yes, it’s hard problem; but that doesn’t mean it can’t be done. I already mentioned some possible solutions in the article. - - - - -**Footnotes** - - 1. We could make something better; PGP contians a lot of cruft. But for now PGP is “good enough”. - - - - - --------------------------------------------------------------------------------- - -via: https://arp242.net/weblog/signing-emails.html - -作者:[Martin Tournoij][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://arp242.net/ -[b]: https://github.com/lujun9972 -[1]: https://en.wikipedia.org/wiki/Podesta_emails#Data_theft -[2]: https://www.eset.com/us/about/newsroom/corporate-blog/paypal-users-targeted-in-sophisticated-new-phishing-campaign/ -[3]: https://www.paypal.com/cs/smarthelp/article/how-to-spot-fake,-spoof,-or-phishing-emails-faq2340 diff --git a/sources/talk/20190314 Why feedback, not metrics, is critical to DevOps.md b/sources/talk/20190314 Why feedback, not metrics, is critical to DevOps.md deleted file mode 100644 index b2a79226ed..0000000000 --- a/sources/talk/20190314 Why feedback, not metrics, is critical to DevOps.md +++ /dev/null @@ -1,84 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why feedback, not metrics, is critical to DevOps) -[#]: via: (https://opensource.com/article/19/3/devops-feedback-not-metrics) -[#]: author: (Ranjith Varakantam (Red Hat) https://opensource.com/users/ranjith) - -Why feedback, not metrics, is critical to DevOps -====== - -Metrics can tell you some things, but not the most important things about how your products and teams are doing. - -![CICD with gears][1] - -Most managers and agile coaches depend on metrics over feedback from their teams, users, and even customers. In fact, quite a few use feedback and metrics synonymously, where they present feedback from teams or customers as a bunch of numbers or a graphical representation of those numbers. This is not only unfortunate, but it can be misleading as it presents only part of the story and not the entire truth. - -When it comes to two critical factors—how we manage or guide our teams and how we operate and influence the product that our teams are developing—few exceptional leaders and teams get it right. For one thing, it has become very easy to get your hands on data and metrics. Furthermore, it's still hard to get real feedback from teams and users. It requires significant investments and energy, and unless everyone understands the critical need for it, getting and giving feedback tends to be a low priority and keeps getting pushed to the back burner. - -### How to manage and guide teams - -With the acceptance of agile, a lot of teams have put a ridiculously high value on metrics, such as velocity, burndown charts, cumulative flow diagram (CFD), etc., instead of the value delivered by the team in each iteration or deployment. The focus is on the delivery or output produced without a clear understanding of how this relates to personal performance or implications for the project, product, or service. - -A few managers and agile coaches even abuse the true spirit of agile by misusing metrics to chastise or even penalize their teams. Instead of creating an environment of empowerment, they are slipping back into the command-and-control method where metrics are used to bully teams into submission. - -In our group, the best managers have weekly one-on-one meetings with every team member. These meetings not only give them a real pulse on team morale but also a profound understanding of the project and the decisions being made to move it forward. This weekly feedback loop also helps the team members communicate technical, functional, and even personal issues better. As a result, the team is much more cohesive in understanding the overall project needs and able to make decisions promptly. - -These leaders also skip levels—reaching out to team members two or three levels below them—and have frequent conversations with other group members who interact with their teams on a regular basis. These actions give the managers a holistic picture, which they couldn't get if they relied on feedback from one manager or lead, and help them identify any blind spots the leads and managers may have. - -These one-on-one meetings effectively transform a manager into a coach who has a close understanding of every team member. Like a good coach, these managers both give and receive feedback from the team members regarding the product, decision-making transparency, places where the team feels management is lagging, and areas that are being ignored. This empowers the teams by giving them a voice, not once in a while in an annual meeting or an annual survey, but every week. This is the level where DevOps teams should be in order to deliver their commitments successfully. - -This demands significant investments of time and energy, but the results more than justify it. The alternative is to rely on metrics and annual reviews and surveys, which has failed miserably. Unless we begin valuing feedback over metrics, we will keep seeing the metrics we want to see but failed projects and miserable team morale. - -### Influencing projects and product development - -We see similar behavior on the project or product side, with too few conversations with the users and developers and too much focus on metrics. Let's take the example of a piece of software that was released to the community or market, and the primary success metric is the number of downloads or installs. This can be deceiving for several reasons: - - 1. This product was packaged into another piece of software that users installed; even though the users are not even aware of your product's existence or purpose, it is still counted as a win and something the user needs. - - 2. The marketing team spent a huge budget promoting the product—and even offered an incentive to developers to download it. The _incentive_ drives the downloads, not user need or desire, but the metric is still considered a measure of success. - - 3. Software updates are counted as downloads, even when they are involuntary updates pushed rather than initiated by the user. This keeps bumping up the number, even though the user might have used it once, a year ago, for a specific task. - - - - -In these cases, the user automatically becomes a metric that's used to report how well the product is doing, just based on the fact it was downloaded and it's accepting updates, regardless of whether the user likes or uses the software. Instead, we should be focusing on actual usage of the product and the feedback these users have to offer us, rather than stopping short at the download numbers. - -The same holds true for SaaS products—instead of counting the number of signups, we should look at how often users use the product or service. Signups by themselves have little meaning, especially to the DevOps team where the focus is on getting constant feedback and striving for continuous improvements. - -### Gathering feedback - -So, why do we rely on metrics so much? My guess is they are easy to collect, and the marketing team is more interested in getting the product into the users' hands than evaluating how it is fairing. Unless the engineering team invests quite a bit of time in collecting feedback with tracing, which captures how often the program is executed and which components are used most often, it can be difficult to collect feedback. - -A big advantage of working in an open source community is that we first release the piece of software into a community where we can get feedback. Most open source enthusiasts take the time to log issues and bugs based on their experience with the product. If we can supplement this data with tracing, the team has an accurate record of how the product is used. - -Open as many channels of communication as possible–chat, email, Twitter, etc.—and allow users to choose their feedback channel. - -A few DevOps teams have integrated blue-green deployments, A/B testing, and canary releases to shorten the feedback loop. Setting up these frameworks it is not a trivial matter and calls for a huge upfront investment and constant updates to make them seamlessly work. But once everything is set up and data begins to flow, the team can act upon real feedback based on real user interactions with every new bit of software released. - -Most agile practitioners and lean movement activists push for a build-deploy-measure-learn cycle, and for this to happen, we need to collect feedback in addition to metrics. It might seem expensive and time consuming in the short term, but in the long run, it is a foolproof way of learning. - -### Proof that feedback pays off - -Whether it pertains to people or projects, it pays to rely on first-hand feedback rather than metrics, which are seldom interpreted in impartial ways. We have ample proof of this in other industries, where companies such as Zappos and the Virgin Group have done wonders for their business simply by listening to their customers. There is no reason we cannot follow suit, especially those of us working in open source communities. - -Feedback is the only effective way we can uncover our blind spots. Metrics are not of much help in this regard, as we can't find out what's wrong when we are dealing with unknowns. Blind spots can create serious gaps between reality and what we think we know. Feedback not only encourages continuous improvement, whether it's on a personal or a product level, but the simple act of listening and acting on it increases trust and loyalty. - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/3/devops-feedback-not-metrics - -作者:[Ranjith Varakantam (Red Hat)][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/ranjith -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/cicd_continuous_delivery_deployment_gears.png?itok=kVlhiEkc (CICD with gears) diff --git a/sources/talk/20190319 6 steps to stop ethical debt in AI product development.md b/sources/talk/20190319 6 steps to stop ethical debt in AI product development.md deleted file mode 100644 index 9bfe810a15..0000000000 --- a/sources/talk/20190319 6 steps to stop ethical debt in AI product development.md +++ /dev/null @@ -1,148 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (6 steps to stop ethical debt in AI product development) -[#]: via: (https://opensource.com/article/19/3/ethical-debt-ai-product-development) -[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo) - -6 steps to stop ethical debt in AI product development -====== - -Machine bias in artificial intelligence is a known and unavoidable problem—but it is not unmanageable. - -![old school calculator][1] - -It's official: artificial intelligence (AI) isn't the unbiased genius we want it to be. - -Alphabet (Google's parent company) used its latest annual report [to warn][2] that ethical concerns about its products might hurt future revenue. Entrepreneur Joy Buolamwini established the [Safe Face Pledge][3] to prevent abuse of facial analysis technology. - -And years after St. George's Hospital Medical School in London was found to have used AI that inadvertently [screened out qualified female candidates][4], Amazon scrapped a recruiting tool last fall after machine learning (ML) specialists found it [doing the same thing][5]. - -We've learned the hard way that technologies built with AI are biased like people. Left unchecked, the datasets used to train such products can pose [life-or-death consequences][6] for their end users. - -For example, imagine a self-driving car that can't recognize commands from people with certain accents. If the dataset used to train the technology powering that car isn't exposed to enough voice variations and inflections, it risks not recognizing all its users as fully human. - -Here's the good news: Machine bias in AI is unavoidable—but it is _not_ unmanageable. Just like product and development teams work to reduce technical debt, you can [reduce the risk of ethical debt][7] as well. - -Here are six steps that your technical team can start taking today: - -### 1\. Document your priorities upfront - -Reducing ethical debt within your product will require you to answer two key questions in the product specification phase: - - * Which methods of fairness will you use? - * How will you prioritize them? - - - -If your team is building a product based on ML, it's not enough to reactively fix bugs or pull products from shelves. Instead, answer these questions [in your tech spec][8] so that they're included from the start of your product lifecycle. - -### 2\. Train your data under fairness constraints - -This step is tough because when you try to control or eliminate both direct and indirect bias, you'll find yourself in a Catch-22. - -If you train exclusively on non-sensitive attributes, you eliminate direct discrimination but introduce or reinforce indirect bias. - -However, if you train separate classifiers for each sensitive feature, you reintroduce direct discrimination. - -Another challenge is that detection can occur only after you've trained your model. When this occurs, the only recourse is to scrap the model and retrain it from scratch. - -To reduce these risks, don't just measure average strengths of acceptance and rejection across sensitive groups. Instead, use limits to determine what is or isn't included in the model you're training. When you do this, discrimination tests are expressed as restrictions and limitations on the learning process. - -### 3\. Monitor your datasets throughout the product lifecycle - -Developers build training sets based on data they hope the model will encounter. But many don't monitor the data their creations receive from the real world. - -ML products are unique in that they're continuously taking in data. New data allows the algorithms powering these products to keep refining their results. - -But such products often encounter data in deployment that differs from what they were trained on in production. It's also not uncommon for the algorithm to be updated without the model itself being revalidated. - -This risk will decrease if you appoint someone to monitor the source, history, and context of the data in your algorithm. This person should conduct continuous audits to find unacceptable behavior. - -Bias should be reduced as much as possible while maintaining an acceptable level of accuracy, as defined in the product specification. If unacceptable biases or behaviors are detected, the model should be rolled back to an earlier state prior to the first time you saw bias. - -### 4\. Use tagged training data - -We live in a world with trillions of images and videos at our fingertips, but most neural networks can't use this data for one reason: Most of it isn't tagged. - -Tagging refers to which classes are present in an image and their locations. When you tag an image, you share which classes are present and where they're located. - -This sounds simple—until you realize how much work it would take to draw shapes around every single person in a photo of a crowd or a box around every single person on a highway. - -Even if you succeeded, you might rush your tagging and draw your shapes sloppily, leading to a poorly trained neural network. - -The good news is that more products are coming to market so they can decrease the time and cost of tagging. - -As one example, [Brain Builder][9] is a data annotation product from Neurala that uses open source frameworks like TensorFlow and Caffe. Its goal is to help users [manage and annotate their training data][10]. It also aims to bring diverse class examples to datasets—another key step in data training. - -### 5\. Use diverse class examples - -Training data needs positive and negative examples of classes. If you want specific classes of objects, you need negative examples as well. This (hopefully) mimics the data that the algorithm will encounter in the wild. - -Consider the example of “homes” within a dataset. If the algorithm contains only images of homes in North America, it won't know to recognize homes in Japan, Morocco, or other international locations. Its concept of a “home” is thus limited. - -Neurala warns, "Most AI applications require thousands of images to be tagged, and since data tagging cost is proportional to the time spent tagging, this step alone often costs tens to hundreds of thousands of dollars per project." - -Luckily, 2018 saw a strong increase in the number of open source AI datasets. Synced has a helpful [roundup of 10 datasets][11]—from multi-label images to semantic parsing—that were open sourced last year. If you're looking for datasets by industry, GitHub [has a longer list][12]. - -### 6\. Focus on the subject, not the context - -Tech leaders in monitoring ML datasets should aim to understand how the algorithm classifies data. That's because AI sometimes focuses on irrelevant attributes that are shared by several targets in the training set. - -Let's start by looking at the biased training set below. Wolves were tagged standing in snow, but the model wasn't shown images of dogs. So, when dogs were introduced, the model started tagging them as wolves because both animals were standing in snow. In this case, the AI put too much emphasis on the context (a snowy backdrop). - -![Wolves in snow][13] - -Source: [Gartner][14] (full research available for clients) - -By contrast, here is a training set from Brain Builder that is focused on the subject dogs. When monitoring your own training set, make sure the AI is giving more weight to the subject of each image. If you saw an image classifier state that one of the dogs below is a wolf, you would need to know which aspects of the input led to this misclassification. This is a sign to check your training set and confirm that the data is accurate. - -![Dogs training set][15] - -Source: [Brain Builder][16] - -Reducing ethical debt isn't just the “right thing to do”—it also reduces _technical_ debt. Since programmatic bias is so tough to detect, working to reduce it, from the start of your lifecycle, will save you the need to retrain models from scratch. - -This isn't an easy or perfect job; tech teams will have to make tradeoffs between fairness and accuracy. But this is the essence of product management: compromises based on what's best for the product and its end users. - -Strategy is the soul of all strong products. If your team includes measures of fairness and algorithmic priorities from the start, you'll sail ahead of your competition. - -* * * - -_Lauren Maffeo will present_ [_Erase Unconscious Bias From Your AI Datasets_][17] _at[DrupalCon][18] in Seattle, April 8-12, 2019._ - -* * * - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/3/ethical-debt-ai-product-development - -作者:[Lauren Maffeo][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/lmaffeo -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/math_money_financial_calculator_colors.jpg?itok=_yEVTST1 (old school calculator) -[2]: https://www.yahoo.com/news/google-warns-rise-ai-may-181710642.html?soc_src=mail&soc_trk=ma -[3]: https://www.safefacepledge.org/ -[4]: https://futurism.com/ai-bias-black-box -[5]: https://uk.reuters.com/article/us-amazon-com-jobs-automation-insight/amazon-scraps-secret-ai-recruiting-tool-that-showed-bias-against-women-idUKKCN1MK08G -[6]: https://opensource.com/article/18/10/open-source-classifiers-ai-algorithms -[7]: https://thenewstack.io/tech-ethics-new-years-resolution-dont-build-software-you-will-regret/ -[8]: https://eng.lyft.com/awesome-tech-specs-86eea8e45bb9 -[9]: https://www.neurala.com/tech -[10]: https://www.roboticsbusinessreview.com/ai/brain-builder-neurala-video-annotation/ -[11]: https://medium.com/syncedreview/2018-in-review-10-open-sourced-ai-datasets-696b3b49801f -[12]: https://github.com/awesomedata/awesome-public-datasets -[13]: https://opensource.com/sites/default/files/uploads/wolves_in_snow.png (Wolves in snow) -[14]: https://www.gartner.com/doc/3889586/control-bias-eliminate-blind-spots -[15]: https://opensource.com/sites/default/files/uploads/ai_ml_canine_recognition.png (Dogs training set) -[16]: https://www.neurala.com/ -[17]: https://events.drupal.org/seattle2019/sessions/erase-unconscious-bias-your-ai-datasets -[18]: https://events.drupal.org/seattle2019 diff --git a/sources/talk/20190319 Hello World Marketing (or, How I Find Good, Boring Software).md b/sources/talk/20190319 Hello World Marketing (or, How I Find Good, Boring Software).md deleted file mode 100644 index 02f7e3fcac..0000000000 --- a/sources/talk/20190319 Hello World Marketing (or, How I Find Good, Boring Software).md +++ /dev/null @@ -1,100 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Hello World Marketing (or, How I Find Good, Boring Software)) -[#]: via: (https://theartofmachinery.com/2019/03/19/hello_world_marketing.html) -[#]: author: (Simon Arneaud https://theartofmachinery.com) - -Hello World Marketing (or, How I Find Good, Boring Software) -====== - -Back in 2001 Joel Spolsky wrote his classic essay [“Good Software Takes Ten Years. Get Used To it”][1]. Nothing much has changed since then: software is still taking around a decade of development to get good, and the industry is still getting used to that fact. Unfortunately, the industry has investors who want to see hockey stick growth rates on software that’s a year old or less. The result is an antipattern I like to call “Hello World Marketing”. Once you start to notice it, you see it everywhere, and it’s a huge red flag when choosing software tools. - - -Of course, by “Hello World”, I’m referring to the programmer’s traditional first program: the one that just displays the message “Hello World”. The aim isn’t to make a useful program; it’s to make a minimal starting point. - -Hello World Marketing is about doing the same thing, but pretending that it’s useful. You’re supposed to be distracted into admiring how neatly a tool solves trivial problems, and forget about features you’ll need in real applications. HWM emphasises what can be done in the first five minutes, and downplays what you might need after several months. HWMed software is optimised for looking good in demos, and sounding exciting in blog posts and presentations. - -For a good example, see Nemil Dalal’s [great series of articles about the early marketing for MongoDB][2]. Notice the heavy use of hackathons, and that a lot of the marketing was about how “SQL looks like COBOL”. Now, I can criticise SQL, too, but if `SELECT` and `WHERE` are serious problems for an application, there are already hundreds of solutions like [SQLAlchemy][3] and [LINQ][4] — solutions that don’t compromise on more advanced features of traditional databases. On the other hand, if you were wondering about those advanced features, you could read vomity-worthy, hand-wavey pieces like “[Living in the post-transactional database future][5]”. - -### How I Find Good, Boring Software - -Obviously, one way to avoid HWM is to stick to software that’s much more than ten years old, and has a good reputation. But sometimes that’s not possible because the tools for a problem only came out during the last decade. Also, sometimes newer tools really do bring new benefits. - -However, it’s much harder to rely on reputation for newer software because “good reputation” often just means “popular”, which often just means “current fad”. Thankfully, there’s a simple and effective trick to avoid being dazzled by hype: just look elsewhere. Instead of looking at the marketing for the core features, look at the things that are usually forgotten. Here are the kinds of things I look at: - -#### Backups and Disaster Recovery - -Backup support is both super important and regularly an afterthought. - -The minimum viable product is full data dump/import functionality, but longer term it’s nice to have things like incremental backups. Some vendors will try to tell you to just copy the data files from disk, but this isn’t guaranteed to give you a consistent snapshot if the software is running live. - -There’s no point backing up data if you can’t restore it, and restoration is the difficult part. Yet many people never test the restoration (until they actually need it). About five years ago I was working with a team that had started using a new, cutting-edge, big-data database. The database looked pretty good, but I suggested we do an end-to-end test of the backup support. We loaded a cluster with one of the multi-terabyte datasets we had, did a backup, wiped the data in the cluster and then tried to restore it. Turns out we were the first people to actually try to restore a dataset of that size — the backup “worked”, but the restoration caused the cluster to crash and burn. We filed a bug report with the original database developers and they fixed it. - -Backup processes that work on small test datasets but fail on large production datasets is a recurring theme. I always recommend testing on production-sized datasets, and testing again as production data grows. - -For batch jobs, a related concept is restartability. If you’re copying large amounts of data from one place to another, and the job gets interrupted in the middle, what happens? Can you keep going from the middle? Alternatively, can you safely retry by starting from the beginning? - -#### Configuration - -A lot of HWMed software can only be configured using a GUI or web UI because that’s what’s obvious and looks good in demos and docs. For one thing, this usually means there’s no good way to back up or restore the configuration. So if a team of people use a shared instance over a year or so, forget about trying to restore it if (or when) it breaks. It’s also much more work to keep multiple deployments consistent (e.g., for dev, testing and prod environments) using separate GUIs. In practice, it just doesn’t happen. - -I prefer a well-commented config file for software I deploy, if nothing else because it can be checked into source control, and I know I can reproduce the deployment using nothing but what’s checked into source control. If something is configured using a UI, I look for a config export/import function. Even then, that feature is often an afterthought, and often imcomplete, so it’s worth testing if it’s possible to deploy the software without ever needing to manually tweak something in the UI. - -There seems to be a recent trend for software to be configured using a REST API instead. Honestly, this is the worst of both config files and GUI-based config, and most of the time people end up using [hacky ways to put the config into a file instead][6]. - -#### Upgrades - -Life would be much easier if everything were static; software upgrade support makes everything more complicated. It’s also not usually shown in demos, so the first upgrade often ends the honeymoon with shiny, new software. - -For HA distributed systems, you’ll need support for graceful shutdown and a certain amount of forward _and_ backwards compatibility (because you’ll have multiple versions running during upgrades). It’s a common mistake to forget about downgrade support. - -Distributed systems are simpler when components have independent replicas that don’t communicate with each other. Anything with clustering (or, worse, consensus algorithms) is often extra tricky to upgrade, and worth testing. - -Things that support horizontal scaling don’t necessarily support rescaling without downtime. This is especially true whenever sharding is involved because live resharding isn’t trivial. - -Here’s a story from a certain popular container app platform. Demos showed how easy it was to launch an app on the platform, and then showed how easy it was to scale it to multiple replicas. What they didn’t show was the upgrade process: When you pushed a new version of your app, the first thing the platform did was _shut down all running instances of it_. Then it would upload the code to a build server and start building it — meaning downtime for however long the build took, plus the time needed to roll out the new version (if it worked). This problem has been fixed in newer releases of the platform. - -#### Security - -Even if software has no built-in access control, all-or-nothing access control is easy to implement (e.g., using a reverse proxy with HTTP basic auth). The harder problem is fine-grained access control. Sometimes you don’t care, but in some environments it makes a big difference to what features you can even use. - -Some immature software has a quick-and-dirty implementation of user-based access control, typically with a GUI for user management. For everything except the core business tool, this isn’t very useful. For human users, every project I’ve worked on has either been with a small team that just shared a single username/password, or with a large team that wanted integration with OpenID Connect, or LDAP, or whatever centralised single-sign-on (SSO) system was used by the organisation. No one wants to manually manage credentials for every tool, every time someone joins or leaves. Similarly, credentials for applications or other non-human users are better generated using an automatable approach — like a config file or API. - -Immature implementations of access control are often missing anything like user groups, but managing permissions at the user level is a time waster. Some SSO integrations only integrate users, not groups, which is a “so close yet so far” when it comes to avoiding permissions busywork. - -#### Others - -I talked about ignoring the hype, but there’s one good signal you can get from the marketing: whether the software is branded as “enterprise” software. Enterprise software is normally bought by someone other than the end user, so it’s usually pleasant to buy but horrible to use. The only exceptions I know of are enterprise versions of normal consumer software, and enterprise software that the buyer will also have to use. Be warned: even if a company sells enterprise software alongside consumer software, there’s no guarantee that they’re just different versions of the same product. Often they’ll be developed by separate teams with different priorities. - -A lot of the stuff in this post can be checked just by skimming through the documentation. If a tool stores data, but the documentation doesn’t mention backups, there probably isn’t any backup suppport. Even if there is and it’s just not documented, that’s not exactly a good sign either. So, sure, documentation quality is worth evaluating by itself. On the other hand, sometimes the documentation is better than the product, so I never trust a tool until I’ve actually tried it out. - -When I first saw Python, I knew that it was a terrible programming language because of the way it used whitespace indentation. Yeah, that was stupid. Later on I learned that 1) the syntax wasn’t a big deal, especially when I’m already indenting C-like languages in the same way, and 2) a lot of practical problems can be solved just by gluing libraries together with a few dozen lines of Python, and that was really useful. We often have strong opinions about syntax that are just prejudice. Syntax can matter, but it’s less important than how the tool integrates with the rest of the system. - -### Weighing Pros and Cons - -You never need to do deep analysis to detect the most overhyped products. Just check a few of these things and they’ll fail spectacularly. - -Even with software that looks solid, I still like to do more tests before entrusting a serious project with it. That’s not because I’m looking for excuses to nitpick and use my favourite tool instead. New tools often really do bring new benefits. But it’s much better to understand the pros and cons of new software, and to use it because the pros outweigh the cons, not because of how slick the Hello World demo is. - --------------------------------------------------------------------------------- - -via: https://theartofmachinery.com/2019/03/19/hello_world_marketing.html - -作者:[Simon Arneaud][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://theartofmachinery.com -[b]: https://github.com/lujun9972 -[1]: https://www.joelonsoftware.com/2001/07/21/good-software-takes-ten-years-get-used-to-it/ -[2]: https://www.nemil.com/mongo/ -[3]: https://www.sqlalchemy.org/ -[4]: https://msdn.microsoft.com/en-us/library/bb308959.aspx -[5]: https://www.mongodb.com/post/36151042528/post-transactional-future -[6]: /2017/07/15/use_terraform_with_vault.html diff --git a/sources/talk/20190320 Managing changes in open source projects.md b/sources/talk/20190320 Managing changes in open source projects.md deleted file mode 100644 index efcd5257b5..0000000000 --- a/sources/talk/20190320 Managing changes in open source projects.md +++ /dev/null @@ -1,97 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Managing changes in open source projects) -[#]: via: (https://opensource.com/article/19/3/managing-changes-open-source-projects) -[#]: author: (Ben Cotton (Red Hat, Community Moderator) https://opensource.com/users/bcotton) - -Managing changes in open source projects -====== - -Here's how to create a visible change process to support the community around an open source project. - -![scrabble letters: "time for change"][1] - -Why bother having a process for proposing changes to your open source project? Why not just let people do what they're doing and merge the features when they're ready? Well, you can certainly do that if you're the only person on the project. Or maybe if it's just you and a few friends. - -But if the project is large, you might need to coordinate how some of the changes land. Or, at the very least, let people know a change is coming so they can adjust if it affects the parts they work on. A visible change process is also helpful to the community. It allows them to give feedback that can improve your idea. And if nothing else, it lets people know what's coming so that they can get excited, and maybe get you a little bit of coverage on Opensource.com or the like. Basically, it's "here's what I'm going to do" instead of "here's what I did," and it might save you some headaches as you scramble to QA right before your release. - -So let's say I've convinced you that having a change process is a good idea. How do you build one? - -**[Watch my talk on this topic]** - - -### Right-size your change process - -Before we start talking about what a change process looks like, I want to make it very clear that this is not a one-size-fits-all situation. The smaller your project is—mainly in the number of contributors—the less process you'll probably need. As [Richard Hackman says][2], the number of communication channels in a team goes up exponentially with the number of people on the team. In community-driven projects, this becomes even more complicated as people come and go, and even your long-time contributors might not be checking in every day. So the change process consolidates those communication channels into a single area where people can quickly check to see if they care and then get back to whatever it is they do. - -At one end of the scale, there's the command-line Twitter client I maintain. The change process there is, "I pick something I want to work on, probably make a Git branch for it but I might forget that, merge it, and tag a release when I'm out of stuff that I can/want to do." At the other end is Fedora. Fedora isn't really a single project; it's a program of related projects that mostly move in the same direction. More than 200 people a week touch Fedora in a technical sense: spec file maintenance, build submission, etc. This doesn't even include the untold number of people who are working on the upstreams. And these upstreams all have their own release schedules and their own processes for how features land and when. Nobody can keep up with everything on their own, so the change process brings important changes to light. - -### Decide who needs to review changes - -One of the first things you need to consider when putting together a change process for your community is: "who needs to review changes?" This isn't necessarily approving the changes; we'll come to that shortly. But are there people who should take a look early in the process? Maybe your release engineering or infrastructure teams need to review them to make sure they don't require changes to build infrastructure. Maybe you have a legal review process to make sure licenses are in order. Or maybe you just have a change wrangler who looks to make sure all the required information is included. Or you may choose to do none of these and have change proposals go directly to the community. - -But this brings up the next step. Do you want full community feedback or only a select group to provide feedback? My preference, and what we do in Fedora, is to publish changes to the community before they're approved. But the structure of your community may fit a model where some approval body signs off on the change before it is sent to the community as an announcement. - -### Determine who approves changes - -Even if you lack any sort of organizational structure, someone ends up approving changes. This should reflect the norms and values of your community. The simplest form of approval is the person who proposed the change implements it. Easy peasy! In loosely organized communities, that might work. Fully democratic communities might put it to a community-wide vote. If a certain number or proportion of members votes in favor, the change is approved. Other communities may give that power to an individual or group. They could be responsible for the entire project or certain subsections. - -In Fedora, change approval is the role of the Fedora Engineering Steering Committee (FESCo). This is a nine-person body elected by community members. This gives the community the ability to remove members who are not acting in the best interests of the project but also enables relatively quick decisions without large overhead. - -In much of this article, I am simply presenting information, but I'm going to take a moment to be opinionated. For any project with a significant contributor base, a model where a small body makes approval decisions is the right approach. A pure democracy can be pretty messy. People who may have no familiarity with the technical ramifications of a change will be able to cast a binding vote. And that process is subject to "brigading," where someone brings along a large group of otherwise-uninterested people to support their position. Think about what it might look like if someone proposed changing the default text editor. Would the decision process be rational? - -### Plan how to enforce changes - -The other advantage of having a defined approval body is it can mediate conflicts between changes. What happens if two proposed changes conflict? Or if a change turns out to have a negative impact? Someone needs to have the authority to say "this isn't going in after all" or make sure conflicting changes are brought into agreement. Your QA team and processes will be a part of this, and maybe they're the ones who will make the final call. - -It's relatively straightforward to come up with a plan if a change doesn't work as expected or is incomplete by the deadline. If you require a contingency plan as part of the change process, then you implement that plan. The harder part is: what happens if someone makes a change that doesn't go through your change process? Here's a secret your friendly project manager doesn't want you to know: you can't force people to go through your process, particularly in community projects. - -So if something sneaks in and you don't discover it until you have a release candidate, you have a couple of options: you can let it in, or you can get someone to forcibly remove it. In either case, you'll have someone who is very unhappy. Either the person who made the change, because you kicked their work out, or the people who had to deal with the breakage it caused. (If it snuck in without anyone noticing, then it's probably not that big of a deal.) - -The answer, in either case, is going to be social pressure to follow the process. Processes are sometimes painful to follow, but a well-designed and well-maintained process will give more benefit than it costs. In this case, the benefit may be identifying breakages sooner or giving other developers a chance to take advantage of new features that are offered. And it can help prevent slips in the release schedule or hero effort from your QA team. - -### Implement your change process - -So we've thought about the life of a change proposal in your project. Throw in some deadlines that make sense for your release cadence, and you can now come up with the policy—but how do you implement it? - -First, you'll want to identify the required information for a change proposal. At a minimum, I'd suggest the following. You may have more requirements depending on the specifics of what your community is making and how it operates. - - * Name and summary - * Benefit to the project - * Scope - * Owner - * Test plan - * Dependencies and impacts - * Contingency plan - - - -You'll also want one or several change wranglers. These aren't gatekeepers so much as shepherds. They may not have the ability to approve or reject change proposals, but they are responsible for moving the proposals through the process. They check the proposal for completeness, submit it to the appropriate bodies, make appropriate announcements, etc. You can have people wrangle their own changes, but this can be a specialized task and will generally benefit from a dedicated person who does this regularly, instead of making community members do it less frequently. - -And you'll need some tooling to manage these changes. This could be a wiki page, a kanban board, a ticket tracker, something else, or a combination of these. But basically, you want to be able to track their state and provide some easy reporting on the status of changes. This makes it easier to know what is complete, what is at risk, and what needs to be deferred to a later release. You can use whatever works best for you, but in general, you'll want to minimize copy-and-pasting and maximize scriptability. - -### Remember to iterate - -Your change process may seem perfect. Then people will start using it. You'll discover edge cases you didn't consider. You'll find that the community hates a certain part of it. Decisions that were once valid will become invalid over time as technology and society change. In Fedora, our Features process revealed itself to be ambiguous and burdensome, so it was refined into the [Changes][3] process we use today. Even though the Changes process is much better than its predecessor, we still adjust it here and there to make sure it's best meeting the needs of the community. - -When designing your process, make sure it fits the size and values of your community. Consider who gets a voice and who gets a vote in approving changes. Come up with a plan for how you'll handle incomplete changes and other exceptions. Decide who will guide the changes through the process and how they'll be tracked. And once you design your change policy, write it down in a place that's easy for your community to find so that they can follow it. But most of all, remember that the process is here to serve the community; the community is not here to serve the process. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/3/managing-changes-open-source-projects - -作者:[Ben Cotton (Red Hat, Community Moderator)][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/bcotton -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/change_words_scrabble_letters.jpg?itok=mbRFmPJ1 (scrabble letters: "time for change") -[2]: https://hbr.org/2009/05/why-teams-dont-work -[3]: https://fedoraproject.org/wiki/Changes/Policy diff --git a/sources/talk/20190323 How to transition into a Developer Relations career.md b/sources/talk/20190323 How to transition into a Developer Relations career.md deleted file mode 100644 index 40de0edf21..0000000000 --- a/sources/talk/20190323 How to transition into a Developer Relations career.md +++ /dev/null @@ -1,74 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to transition into a Developer Relations career) -[#]: via: (https://opensource.com/article/19/3/developer-relations-career) -[#]: author: (Mary Thengvall https://opensource.com/users/marygrace-0) - -How to transition into a Developer Relations career -====== - -Combine your love for open source software with your love for the community in a way that allows you to invest your time in both. - -![][1] - -Let's say you've found an open source project you really love and you want to do more than just contribute. Or you love coding, but you don't want to spend the rest of your life interacting more with your computer than you do with people. How do you combine your love for open source software with your love for the community in a way that allows you to invest your time in both? - -### Developer Relations: A symbiotic relationship - -Enter community management, or as it's more commonly called in the tech industry, Developer Relations (DevRel for short). The goal of DevRel is, at its core, to empower developers. From writing content and creating documentation to supporting local meetups and bubbling up developer feedback internally, everything that a Developer Relations professional does on a day-to-day basis is for the benefit of the community. That's not to say that it doesn't benefit the company as well! After all, as Developer Relations professionals understand, if the community succeeds, so will the company. It's the best kind of symbiotic relationship! - -These hybrid roles have been around since shortly after the open source and free software movements started, but the Developer Relations industry—and the Developer Advocate role, in particular—have exploded over the past few years. So what is Developer Relations exactly? Let's start by defining "community" so that we're all on the same page: - -> **Community:** A group of people who not only share common principles, but also develop and share practices that help individuals in the group thrive. - -This could be a group of people who have gathered around an open source project, a particular topic such as email, or who are all in a similar job function—the DevOps community, for instance. - -As I mentioned, the role of a DevRel team is to empower the community by building up, encouraging, and amplifying the voice of the community members. While this will look slightly different at every company, depending on its goals, priorities, and direction, there are a few themes that are consistent throughout the industry. - - 1. **Listen:** Before making any plans or goals, take the time to listen. - * _Listen to your company stakeholders:_ What do they expect of your team? What do they think you should be responsible for? What metrics are they accustomed to? And what business needs do they care most about? - * _Listen to your customer community:_ What are customers' biggest pain points with your product? Where do they struggle with onboarding? Where does the documentation fail them? - * _Listen to your product's technical audience:_ What problems are they trying to solve? What could be done to make their work life easier? Where do they get their content? What technological advances are they most excited about? - - - 2. **Gather information** -Based on these answers, you can start making your plan. Find the overlapping areas where you can make your product a better fit for the larger technical audience and also make it easier for your customers to use. Figure out what content you can provide that not only answers your community's questions but also solves problems for your company's stakeholders. Learn about the areas where your co-workers struggle and see where your strengths can supplement those needs. - - - 3. **Make connections** -Above all, community managers are responsible for making connections within the community as well as between community members and coworkers. These connections, or "DevRel qualified leads," are what ultimately shows the business value of a community manager's work. By making connections between community members Marie and Bob, who are both interested in the latest developments in Python, or between Marie and your coworker Phil, who's responsible for developer-focused content on your website, you're making your community a valuable source of information for everyone around you. - - - -By getting to know your technical community, you become an expert on what customer needs your product can meet. With great power comes great responsibility. As the expert, you are now responsible for advocating internally for those needs, and you have the potential to make a big difference for your community. - -### Getting started - -So now what? If you're still with me, congratulations! You might just be a good fit for a Community Manager or Developer Advocate role. I'd encourage you to take community work for a test drive and see if you like the pace and the work. There's a lot of context switching and moving around between tasks, which can be a bit of an adjustment for some folks. - -Volunteer to write a blog post for your marketing team (or for [Opensource.com][2]) or help out at an upcoming conference. Apply to speak at a local meetup or offer to advise on a few technical support cases. Get to know your community members on a deeper level. - -Above all, Community Managers are 100% driven by a passion for building technical communities and bringing people together. If that resonates with you, it may be time for a career change! - -I love talking to professionals that help others grow through community and Developer Relations practices. Don't hesitate to [reach out to me][3] if you have any questions or send me a [DM on Twitter][4]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/3/developer-relations-career - -作者:[Mary Thengvall][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/marygrace-0 -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/resume_career_document_general.png?itok=JEaFL2XI -[2]: https://opensource.com/how-submit-article -[3]: https://www.marythengvall.com/about -[4]: http://twitter.com/mary_grace diff --git a/sources/talk/20190328 Continuous response- The essential process we-re ignoring in DevOps.md b/sources/talk/20190328 Continuous response- The essential process we-re ignoring in DevOps.md deleted file mode 100644 index f0f0190742..0000000000 --- a/sources/talk/20190328 Continuous response- The essential process we-re ignoring in DevOps.md +++ /dev/null @@ -1,115 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Continuous response: The essential process we're ignoring in DevOps) -[#]: via: (https://opensource.com/article/19/3/continuous-response-devops) -[#]: author: (Randy Bias https://opensource.com/users/randybias) - -Continuous response: The essential process we're ignoring in DevOps -====== -You probably practice CI and CD, but if you aren't thinking about -continuous response, you aren't really doing DevOps. -![CICD with gears][1] - -Continuous response (CR) is an overlooked link in the DevOps process chain. The two other major links—[continuous integration (CI) and continuous delivery (CD)][2]—are well understood, but CR is not. Yet, CR is the essential element of follow-through required to make customers happy and fulfill the promise of greater speed and agility. At the heart of the DevOps movement is the need for greater velocity and agility to bring businesses into our new digital age. CR plays a pivotal role in enabling this. - -### Defining CR - -We need a crisp definition of CR to move forward with breaking it down. To put it into context, let's revisit the definitions of continuous integration (CI) and continuous delivery (CD). Here are Gartner's definitions when I wrote this them down in 2017: - -> [Continuous integration][3] is the practice of integrating, building, testing, and delivering functional software on a scheduled, repeatable, and automated basis. -> -> Continuous delivery is a software engineering approach where teams keep producing valuable software in short cycles while ensuring that the software can be reliably released at any time. - -I propose the following definition for CR: - -> Continuous response is a practice where developers and operators instrument, measure, observe, and manage their deployed software looking for changes in performance, resiliency, end-user behavior, and security posture and take corrective actions as necessary. - -We can argue about whether these definitions are 100% correct. They are good enough for our purposes, which is framing the definition of CR in rough context so we can understand it is really just the last link in the chain of a holistic cycle. - -![The holistic DevOps cycle][4] - -What is this multi-colored ring, you ask? It's the famous [OODA Loop][5]. Before continuing, let's touch on what the OODA Loop is and why it's relevant to DevOps. We'll keep it brief though, as there is already a long history between the OODA Loop and DevOps. - -#### A brief aside: The OODA Loop - -At the heart of core DevOps thinking is using the OODA Loop to create a proactive process for evolving and responding to changing environments. A quick [web search][6] makes it easy to learn the long history between the OODA Loop and DevOps, but if you want the deep dive, I highly recommend [The Tao of Boyd: How to Master the OODA Loop][7]. - -Here is the "evolved OODA Loop" presented by John Boyd: - -![OODA Loop][8] - -The most important thing to understand about the OODA Loop is that it's a cognitive process for adapting to and handling changing circumstances. - -The second most important thing to understand about the OODA Loop is, since it is a thought process that is meant to evolve, it depends on driving feedback back into the earlier parts of the cycle as you iterate. - -As you can see in the diagram above, CI, CD, and CR are all their own isolated OODA Loops within the overall DevOps OODA Loop. The key here is that each OODA Loop is an evolving thought process for how test, release, and success are measured. Simply put, those who can execute on the OODA Loop fastest will win. - -Put differently, DevOps wants to drive speed (executing the OODA Loop faster) combined with agility (taking feedback and using it to constantly adjust the OODA Loop). This is why CR is a vital piece of the DevOps process. We must drive production feedback into the DevOps maturation process. The DevOps notion of Culture, Automation, Measurement, and Sharing ([CAMS][9]) partially but inadequately captures this, whereas CR provides a much cleaner continuation of CI/CD in my mind. - -### Breaking CR down - -CR has more depth and breadth than CI or CD. This is natural, given that what we're categorizing is the post-deployment process by which our software is taking a variety of actions from autonomic responses to analytics of customer experience. I think, when it's broken down, there are three key buckets that CR components fall into. Each of these three areas forms a complete OODA Loop; however, the level of automation throughout the OODA Loop varies significantly. - -The following table will help clarify the three areas of CR: - -CR Type | Purpose | Examples ----|---|--- -Real-time | Autonomics for availability and resiliency | Auto-scaling, auto-healing, developer-in-the-loop automated responses to real-time failures, automated root-cause analysis -Analytic | Feature/fix pipeline | A/B testing, service response times, customer interaction models -Predictive | History-based planning | Capacity planning, hardware failure prediction models, cost-basis analysis - -_Real-time CR_ is probably the best understood of the three. This kind of CR is where our software has been instrumented for known issues and can take an immediate, automated response (autonomics). Examples of known issues include responding to high or low demand (e.g., elastic auto-scaling), responding to expected infrastructure resource failures (e.g., auto-healing), and responding to expected distributed application failures (e.g., circuit breaker pattern). In the future, we will see machine learning (ML) and similar technologies applied to automated root-cause analysis and event correlation, which will then provide a path towards "no ops" or "zero ops" operational models. - -_Analytic CR_ is still the most manual of the CR processes. This kind of CR is focused primarily on observing end-user experience and providing feedback to the product development cycle to add features or fix existing functionality. Examples of this include traditional A/B website testing, measuring page-load times or service-response times, post-mortems of service failures, and so on. - -_Predictive CR_ , due to the resurgence of AI and ML, is one of the innovation areas in CR. It uses historical data to predict future needs. ML techniques are allowing this area to become more fully automated. Examples include automated and predictive capacity planning (primarily for the infrastructure layer), automated cost-basis analysis of service delivery, and real-time reallocation of infrastructure resources to resolve capacity and hardware failure issues before they impact the end-user experience. - -### Diving deeper on CR - -CR, like CI or CD, is a DevOps process supported by a set of underlying tools. CI and CD are not Jenkins, unit tests, or automated deployments alone. They are a process flow. Similarly, CR is a process flow that begins with the delivery of new code via CD, which open source tools like [Spinnaker][10] give us. CR is not monitoring, machine learning, or auto-scaling, but a diverse set of processes that occur after code deployment, supported by a variety of tools. CR is also different in two specific ways. - -First, it is different because, by its nature, it is broader. The general software development lifecycle (SDLC) process means that most [CI/CD processes][11] are similar. However, code running in production differs from app to app or service to service. This means that CR differs as well. - -Second, CR is different because it is nascent. Like CI and CD before it, the process and tools existed before they had a name. Over time, CI/CD became more normalized and easier to scope. CR is new, hence there is lots of room to discuss what's in or out. I welcome your comments in this regard and hope you will run with these ideas. - -### CR: Closing the loop on DevOps - -DevOps arose because of the need for greater service delivery velocity and agility. Essentially, DevOps is an extension of agile software development practices to an operational mindset. It's a direct response to the flexibility and automation possibilities that cloud computing affords. However, much of the thinking on DevOps to date has focused on deploying the code to production and ends there. But our jobs don't end there. As professionals, we must also make certain our code is behaving as expected, we are learning as it runs in production, and we are taking that learning back into the product development process. - -This is where CR lives and breathes. DevOps without CR is the same as saying there is no OODA Loop around the DevOps process itself. It's like saying that operators' and developers' jobs end with the code being deployed. We all know this isn't true. Customer experience is the ultimate measurement of our success. Can people use the software or service without hiccups or undue friction? If not, we need to fix it. CR is the final link in the DevOps chain that enables delivering the truest customer experience. - -If you aren't thinking about continuous response, you aren't doing DevOps. Share your thoughts on CR, and tell me what you think about the concept and the definition. - -* * * - -_This article is based on[The Essential DevOps Process We're Ignoring: Continuous Response][12], which originally appeared on the Cloudscaling blog under a [CC BY 4.0][13] license and is republished with permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/3/continuous-response-devops - -作者:[Randy Bias][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/randybias -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/cicd_continuous_delivery_deployment_gears.png?itok=kVlhiEkc (CICD with gears) -[2]: https://opensource.com/article/18/8/what-cicd -[3]: https://www.gartner.com/doc/3187420/guidance-framework-continuous-integration-continuous -[4]: https://opensource.com/sites/default/files/uploads/holistic-devops-cycle-smaller.jpeg (The holistic DevOps cycle) -[5]: https://en.wikipedia.org/wiki/OODA_loop -[6]: https://www.google.com/search?q=site%3Ablog.b3k.us+ooda+loop&rlz=1C5CHFA_enUS730US730&oq=site%3Ablog.b3k.us+ooda+loop&aqs=chrome..69i57j69i58.8660j0j4&sourceid=chrome&ie=UTF-8#q=devops+ooda+loop&* -[7]: http://www.artofmanliness.com/2014/09/15/ooda-loop/ -[8]: https://opensource.com/sites/default/files/uploads/ooda-loop-2-1.jpg (OODA Loop) -[9]: https://itrevolution.com/devops-culture-part-1/ -[10]: https://www.spinnaker.io -[11]: https://opensource.com/article/18/12/cicd-tools-sysadmins -[12]: http://cloudscaling.com/blog/devops/the-essential-devops-process-were-ignoring-continuous-response/ -[13]: https://creativecommons.org/licenses/by/4.0/ diff --git a/sources/talk/20190328 Why do organizations have open secrets.md b/sources/talk/20190328 Why do organizations have open secrets.md deleted file mode 100644 index 8a4c8c0017..0000000000 --- a/sources/talk/20190328 Why do organizations have open secrets.md +++ /dev/null @@ -1,77 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why do organizations have open secrets?) -[#]: via: (https://opensource.com/open-organization/19/3/open-secrets-bystander-effect) -[#]: author: (Laura Hilliger https://opensource.com/users/laurahilliger/users/maryjo) - -Why do organizations have open secrets? -====== -Everyone sees something, but no one says anything—that's the bystander -effect. And it's damaging your organizational culture. -![][1] - -[The five characteristics of an open organization][2] must work together to ensure healthy and happy communities inside our organizations. Even the most transparent teams, departments, and organizations require equal doses of additional open principles—like inclusivity and collaboration—to avoid dysfunction. - -The "open secrets" phenomenon illustrates the limitations of transparency when unaccompanied by additional open values. [A recent article in Harvard Business Review][3] explored the way certain organizational issues—widely apparent but seemingly impossible to solve—lead to discomfort in the workforce. Authors Insiya Hussain and Subra Tangirala performed a number of studies, and found that the more people in an organization who knew about a particular "secret," be it a software bug or a personnel issue, the less likely any one person would be to report the issue or otherwise _do_ something about it. - -Hussain and Tangirala explain that so-called "open secrets" are the result of a [bystander effect][4], which comes into play when people think, "Well, if _everyone_ knows, surely _I_ don't need to be the one to point it out." The authors mention several causes of this behavior, but let's take a closer look at why open secrets might be circulating in your organization—with an eye on what an open leader might do to [create a safe space for whistleblowing][5]. - -### 1\. Fear - -People don't want to complain about a known problem only to have their complaint be the one that initiates the quality assurance, integrity, or redress process. What if new information emerges that makes their report irrelevant? What if they are simply _wrong_? - -At the root of all bystander behavior is fear—fear of repercussions, fear of losing reputation or face, or fear that the very thing you've stood up against turns out to be a non-issue for everyone else. Going on record as "the one who reported" carries with it a reputational risk that is very intimidating. - -The first step to ensuring that your colleagues report malicious behavior, code, or _whatever_ needs reporting is to create a fear-free workplace. We're inundated with the idea that making a mistake is bad or wrong. We're taught that we have to "protect" our reputations. However, the qualities of a good and moral character are _always_ subjective. - -_Tip for leaders_ : Reward courage and strength every time you see it, regardless of whether you deem it "necessary." For example, if in a meeting where everyone except one person agrees on something, spend time on that person's concerns. Be patient and kind in helping that person change their mind, and be open minded about that person being able to change yours. Brains work in different ways; never forget that one person might have a perspective that changes the lay of the land. - -### 2\. Policies - -Usually, complaint procedures and policies are designed to ensure fairness towards all parties involved in the complaint. Discouraging false reporting and ensuring such fairness in situations like these is certainly a good idea. But policies might actually deter people from standing up—because a victim might be discouraged from reporting an experience if the formal policy for reporting doesn't make them feel protected. Standing up to someone in a position of power and saying "Your behavior is horrid, and I'm not going to take it" isn't easy for anyone, but it's particularly difficult for marginalized groups. - -The "open secrets" phenomenon illustrates the limitations of transparency when unaccompanied by additional open values. - -To ensure fairness to all parties, we need to adjust for victims. As part of making the decision to file a report, a victim will be dealing with a variety of internal fears. They'll wonder what might happen to their self-worth if they're put in a situation where they have to talk to someone about their experience. They'll wonder if they'll be treated differently if they're the one who stands up, and how that will affect their future working environments and relationships. Especially in a situation involving an open secret, asking a victim to be strong is asking them to have to trust that numerous other people will back them up. This fear shouldn't be part of their workplace experience; it's just not fair. - -Remember that if one feels responsible for a problem (e.g., "Crap, that's _my code_ that's bringing down the whole server!"), then that person might feel fear at pointing out the mistake. _The important thing is dealing with the situation, not finding someone to blame._ Policies that make people feel personally protected—no matter what the situation—are absolutely integral to ensuring the organization deals with open secrets. - -_Tip for leaders_ : Make sure your team's or organization's policy regarding complaints makes anonymous reporting possible. Asking a victim to "go on record" puts them in the position of having to defend their perspective. If they feel they're the victim of harassment, they're feeling as if they are harassed _and_ being asked to defend their experience. This means they're doing double the work of the perpetrator, who only has to defend themselves. - -### 3\. Marginalization - -Women, LGBTQ people, racial minorities, people with physical disabilities, people who are neuro-atypical, and other marginalized groups often find themselves in positions that them feel routinely dismissed, disempowered, disrespected—and generally dissed. These feelings are valid (and shouldn't be too surprising to anyone who has spent some time looking at issues of diversity and inclusion). Our emotional safety matters, and we tend to be quite protective of it—even if it means letting open secrets go unaddressed. - -Marginalized groups have enough worries weighing on them, even when they're _not_ running the risk of damaging their relationships with others at work. Being seen and respected in both an organization and society more broadly is difficult enough _without_ drawing potentially negative attention. - -Policies that make people feel personally protected—no matter what the situation—are absolutely integral to ensuring the organization deals with open secrets. - -Luckily, in recent years attitudes towards marginalized groups have become visible, and we as a society have begun to talk about our experiences as "outliers." We've also come to realize that marginalized groups aren't actually "outliers" at all; we can thank the colorful, beautiful internet for that. - -_Tip for leaders_ : Diversity and inclusion plays a role in dispelling open secrets. Make sure your diversity and inclusion practices and policies truly encourage a diverse workplace. - -### Model the behavior - -The best way to create a safe workplace and give people the ability to call attention to pervasive problems found within it is to _model the behaviors that you want other people to display_. Dysfunction occurs in cultures that don't pay attention to and value the principles upon which they are built. In order to discourage bystander behavior, transparent, inclusive, adaptable and collaborative communities must create policies that support calling attention to open secrets and then empathetically dealing with whatever the issue may be. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/19/3/open-secrets-bystander-effect - -作者:[Laura Hilliger][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/laurahilliger/users/maryjo -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_secret_ingredient_520x292.png?itok=QbKzJq-N -[2]: https://opensource.com/open-organization/resources/open-org-definition -[3]: https://hbr.org/2019/01/why-open-secrets-exist-in-organizations -[4]: https://www.psychologytoday.com/us/basics/bystander-effect -[5]: https://opensource.com/open-organization/19/2/open-leaders-whistleblowers diff --git a/sources/talk/20190331 Codecademy vs. The BBC Micro.md b/sources/talk/20190331 Codecademy vs. The BBC Micro.md deleted file mode 100644 index a85aadad46..0000000000 --- a/sources/talk/20190331 Codecademy vs. The BBC Micro.md +++ /dev/null @@ -1,145 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Codecademy vs. The BBC Micro) -[#]: via: (https://twobithistory.org/2019/03/31/bbc-micro.html) -[#]: author: (Two-Bit History https://twobithistory.org) - -Codecademy vs. The BBC Micro -====== - -In the late 1970s, the computer, which for decades had been a mysterious, hulking machine that only did the bidding of corporate overlords, suddenly became something the average person could buy and take home. An enthusiastic minority saw how great this was and rushed to get a computer of their own. For many more people, the arrival of the microcomputer triggered helpless anxiety about the future. An ad from a magazine at the time promised that a home computer would “give your child an unfair advantage in school.” It showed a boy in a smart blazer and tie eagerly raising his hand to answer a question, while behind him his dim-witted classmates look on sullenly. The ad and others like it implied that the world was changing quickly and, if you did not immediately learn how to use one of these intimidating new devices, you and your family would be left behind. - -In the UK, this anxiety metastasized into concern at the highest levels of government about the competitiveness of the nation. The 1970s had been, on the whole, an underwhelming decade for Great Britain. Both inflation and unemployment had been high. Meanwhile, a series of strikes put London through blackout after blackout. A government report from 1979 fretted that a failure to keep up with trends in computing technology would “add another factor to our poor industrial performance.”[1][1] The country already seemed to be behind in the computing arena—all the great computer companies were American, while integrated circuits were being assembled in Japan and Taiwan. - -In an audacious move, the BBC, a public service broadcaster funded by the government, decided that it would solve Britain’s national competitiveness problems by helping Britons everywhere overcome their aversion to computers. It launched the _Computer Literacy Project_, a multi-pronged educational effort that involved several TV series, a few books, a network of support groups, and a specially built microcomputer known as the BBC Micro. The project was so successful that, by 1983, an editor for BYTE Magazine wrote, “compared to the US, proportionally more of Britain’s population is interested in microcomputers.”[2][2] The editor marveled that there were more people at the Fifth Personal Computer World Show in the UK than had been to that year’s West Coast Computer Faire. Over a sixth of Great Britain watched an episode in the first series produced for the _Computer Literacy Project_ and 1.5 million BBC Micros were ultimately sold.[3][3] - -[An archive][4] containing every TV series produced and all the materials published for the _Computer Literacy Project_ was put on the web last year. I’ve had a huge amount of fun watching the TV series and trying to imagine what it would have been like to learn about computing in the early 1980s. But what’s turned out to be more interesting is how computing was _taught_. Today, we still worry about technology leaving people behind. Wealthy tech entrepreneurs and governments spend lots of money trying to teach kids “to code.” We have websites like Codecademy that make use of new technologies to teach coding interactively. One would assume that this approach is more effective than a goofy ’80s TV series. But is it? - -### The Computer Literacy Project - -The microcomputer revolution began in 1975 with the release of [the Altair 8800][5]. Only two years later, the Apple II, TRS-80, and Commodore PET had all been released. Sales of the new computers exploded. In 1978, the BBC explored the dramatic societal changes these new machines were sure to bring in a documentary called “Now the Chips Are Down.” - -The documentary was alarming. Within the first five minutes, the narrator explains that microelectronics will “totally revolutionize our way of life.” As eerie synthesizer music plays, and green pulses of electricity dance around a magnified microprocessor on screen, the narrator argues that the new chips are why “Japan is abandoning its ship building, and why our children will grow up without jobs to go to.” The documentary goes on to explore how robots are being used to automate car assembly and how the European watch industry has lost out to digital watch manufacturers in the United States. It castigates the British government for not doing more to prepare the country for a future of mass unemployment. - -The documentary was supposedly shown to the British Cabinet.[4][6] Several government agencies, including the Department of Industry and the Manpower Services Commission, became interested in trying to raise awareness about computers among the British public. The Manpower Services Commission provided funds for a team from the BBC’s education division to travel to Japan, the United States, and other countries on a fact-finding trip. This research team produced a report that cataloged the ways in which microelectronics would indeed mean major changes for industrial manufacturing, labor relations, and office work. In late 1979, it was decided that the BBC should make a ten-part TV series that would help regular Britons “learn how to use and control computers and not feel dominated by them.”[5][7] The project eventually became a multimedia endeavor similar to the _Adult Literacy Project_, an earlier BBC undertaking involving both a TV series and supplemental courses that helped two million people improve their reading. - -The producers behind the _Computer Literacy Project_ were keen for the TV series to feature “hands-on” examples that viewers could try on their own if they had a microcomputer at home. These examples would have to be in BASIC, since that was the language (really the entire shell) used on almost all microcomputers. But the producers faced a thorny problem: Microcomputer manufacturers all had their own dialects of BASIC, so no matter which dialect they picked, they would inevitably alienate some large fraction of their audience. The only real solution was to create a new BASIC—BBC BASIC—and a microcomputer to go along with it. Members of the British public would be able to buy the new microcomputer and follow along without worrying about differences in software or hardware. - -The TV producers and presenters at the BBC were not capable of building a microcomputer on their own. So they put together a specification for the computer they had in mind and invited British microcomputer companies to propose a new machine that met the requirements. The specification called for a relatively powerful computer because the BBC producers felt that the machine should be able to run real, useful applications. Technical consultants for the _Computer Literacy Project_ also suggested that, if it had to be a BASIC dialect that was going to be taught to the entire nation, then it had better be a good one. (They may not have phrased it exactly that way, but I bet that’s what they were thinking.) BBC BASIC would make up for some of BASIC’s usual shortcomings by allowing for recursion and local variables.[6][8] - -The BBC eventually decided that a Cambridge-based company called Acorn Computers would make the BBC Micro. In choosing Acorn, the BBC passed over a proposal from Clive Sinclair, who ran a company called Sinclair Research. Sinclair Research had brought mass-market microcomputing to the UK in 1980 with the Sinclair ZX80. Sinclair’s new computer, the ZX81, was cheap but not powerful enough for the BBC’s purposes. Acorn’s new prototype computer, known internally as the Proton, would be more expensive but more powerful and expandable. The BBC was impressed. The Proton was never marketed or sold as the Proton because it was instead released in December 1981 as the BBC Micro, also affectionately called “The Beeb.” You could get a 16k version for £235 and a 32k version for £335. - -In 1980, Acorn was an underdog in the British computing industry. But the BBC Micro helped establish the company’s legacy. Today, the world’s most popular microprocessor instruction set is the ARM architecture. “ARM” now stands for “Advanced RISC Machine,” but originally it stood for “Acorn RISC Machine.” ARM Holdings, the company behind the architecture, was spun out from Acorn in 1990. - -![Picture of the BBC Micro.][9] _A bad picture of a BBC Micro, taken by me at the Computer History Museum -in Mountain View, California._ - -### The Computer Programme - -A dozen different TV series were eventually produced as part of the _Computer Literacy Project_, but the first of them was a ten-part series known as _The Computer Programme_. The series was broadcast over ten weeks at the beginning of 1982. A million people watched each week-night broadcast of the show; a quarter million watched the reruns on Sunday and Monday afternoon. - -The show was hosted by two presenters, Chris Serle and Ian McNaught-Davis. Serle plays the neophyte while McNaught-Davis, who had professional experience programming mainframe computers, plays the expert. This was an inspired setup. It made for [awkward transitions][10]—Serle often goes directly from a conversation with McNaught-Davis to a bit of walk-and-talk narration delivered to the camera, and you can’t help but wonder whether McNaught-Davis is still standing there out of frame or what. But it meant that Serle could voice the concerns that the audience would surely have. He can look intimidated by a screenful of BASIC and can ask questions like, “What do all these dollar signs mean?” At several points during the show, Serle and McNaught-Davis sit down in front of a computer and essentially pair program, with McNaught-Davis providing hints here and there while Serle tries to figure it out. It would have been much less relatable if the show had been presented by a single, all-knowing narrator. - -The show also made an effort to demonstrate the many practical applications of computing in the lives of regular people. By the early 1980s, the home computer had already begun to be associated with young boys and video games. The producers behind _The Computer Programme_ sought to avoid interviewing “impressively competent youngsters,” as that was likely “to increase the anxieties of older viewers,” a demographic that the show was trying to attract to computing.[7][11] In the first episode of the series, Gill Nevill, the show’s “on location” reporter, interviews a woman that has bought a Commodore PET to help manage her sweet shop. The woman (her name is Phyllis) looks to be 60-something years old, yet she has no trouble using the computer to do her accounting and has even started using her PET to do computer work for other businesses, which sounds like the beginning of a promising freelance career. Phyllis says that she wouldn’t mind if the computer work grew to replace her sweet shop business since she enjoys the computer work more. This interview could instead have been an interview with a teenager about how he had modified _Breakout_ to be faster and more challenging. But that would have been encouraging to almost nobody. On the other hand, if Phyllis, of all people, can use a computer, then surely you can too. - -While the show features lots of BASIC programming, what it really wants to teach its audience is how computing works in general. The show explains these general principles with analogies. In the second episode, there is an extended discussion of the Jacquard loom, which accomplishes two things. First, it illustrates that computers are not based only on magical technology invented yesterday—some of the foundational principles of computing go back two hundred years and are about as simple as the idea that you can punch holes in card to control a weaving machine. Second, the interlacing of warp and weft threads is used to demonstrate how a binary choice (does the weft thread go above or below the warp thread?) is enough, when repeated over and over, to produce enormous variation. This segues, of course, into a discussion of how information can be stored using binary digits. - -Later in the show there is a section about a steam organ that plays music encoded in a long, segmented roll of punched card. This time the analogy is used to explain subroutines in BASIC. Serle and McNaught-Davis lay out the whole roll of punched card on the floor in the studio, then point out the segments where it looks like a refrain is being repeated. McNaught-Davis explains that a subroutine is what you would get if you cut out those repeated segments of card and somehow added an instruction to go back to the original segment that played the refrain for the first time. This is a brilliant explanation and probably one that stuck around in people’s minds for a long time afterward. - -I’ve picked out only a few examples, but I think in general the show excels at demystifying computers by explaining the principles that computers rely on to function. The show could instead have focused on teaching BASIC, but it did not. This, it turns out, was very much a conscious choice. In a retrospective written in 1983, John Radcliffe, the executive producer of the _Computer Literacy Project_, wrote the following: - -> If computers were going to be as important as we believed, some genuine understanding of this new subject would be important for everyone, almost as important perhaps as the capacity to read and write. Early ideas, both here and in America, had concentrated on programming as the main route to computer literacy. However, as our thinking progressed, although we recognized the value of “hands-on” experience on personal micros, we began to place less emphasis on programming and more on wider understanding, on relating micros to larger machines, encouraging people to gain experience with a range of applications programs and high-level languages, and relating these to experience in the real world of industry and commerce…. Our belief was that once people had grasped these principles, at their simplest, they would be able to move further forward into the subject. - -Later, Radcliffe writes, in a similar vein: - -> There had been much debate about the main explanatory thrust of the series. One school of thought had argued that it was particularly important for the programmes to give advice on the practical details of learning to use a micro. But we had concluded that if the series was to have any sustained educational value, it had to be a way into the real world of computing, through an explanation of computing principles. This would need to be achieved by a combination of studio demonstration on micros, explanation of principles by analogy, and illustration on film of real-life examples of practical applications. Not only micros, but mini computers and mainframes would be shown. - -I love this, particularly the part about mini-computers and mainframes. The producers behind _The Computer Programme_ aimed to help Britons get situated: Where had computing been, and where was it going? What can computers do now, and what might they do in the future? Learning some BASIC was part of answering those questions, but knowing BASIC alone was not seen as enough to make someone computer literate. - -### Computer Literacy Today - -If you google “learn to code,” the first result you see is a link to Codecademy’s website. If there is a modern equivalent to the _Computer Literacy Project_, something with the same reach and similar aims, then it is Codecademy. - -“Learn to code” is Codecademy’s tagline. I don’t think I’m the first person to point this out—in fact, I probably read this somewhere and I’m now ripping it off—but there’s something revealing about using the word “code” instead of “program.” It suggests that the important thing you are learning is how to decode the code, how to look at a screen’s worth of Python and not have your eyes glaze over. I can understand why to the average person this seems like the main hurdle to becoming a professional programmer. Professional programmers spend all day looking at computer monitors covered in gobbledygook, so, if I want to become a professional programmer, I better make sure I can decipher the gobbledygook. But dealing with syntax is not the most challenging part of being a programmer, and it quickly becomes almost irrelevant in the face of much bigger obstacles. Also, armed only with knowledge of a programming language’s syntax, you may be able to _read_ code but you won’t be able to _write_ code to solve a novel problem. - -I recently went through Codecademy’s “Code Foundations” course, which is the course that the site recommends you take if you are interested in programming (as opposed to web development or data science) and have never done any programming before. There are a few lessons in there about the history of computer science, but they are perfunctory and poorly researched. (Thank heavens for [this noble internet vigilante][12], who pointed out a particularly egregious error.) The main focus of the course is teaching you about the common structural elements of programming languages: variables, functions, control flow, loops. In other words, the course focuses on what you would need to know to start seeing patterns in the gobbledygook. - -To be fair to Codecademy, they offer other courses that look meatier. But even courses such as their “Computer Science Path” course focus almost exclusively on programming and concepts that can be represented in programs. One might argue that this is the whole point—Codecademy’s main feature is that it gives you little interactive programming lessons with automated feedback. There also just isn’t enough room to cover more because there is only so much you can stuff into somebody’s brain in a little automated lesson. But the producers at the BBC tasked with kicking off the _Computer Literacy Project_ also had this problem; they recognized that they were limited by their medium and that “the amount of learning that would take place as a result of the television programmes themselves would be limited.”[8][13] With similar constraints on the volume of information they could convey, they chose to emphasize general principles over learning BASIC. Couldn’t Codecademy replace a lesson or two with an interactive visualization of a Jacquard loom weaving together warp and weft threads? - -I’m banging the drum for “general principles” loudly now, so let me just explain what I think they are and why they are important. There’s a book by J. Clark Scott about computers called _But How Do It Know?_ The title comes from the anecdote that opens the book. A salesman is explaining to a group of people that a thermos can keep hot food hot and cold food cold. A member of the audience, astounded by this new invention, asks, “But how do it know?” The joke of course is that the thermos is not perceiving the temperature of the food and then making a decision—the thermos is just constructed so that cold food inevitably stays cold and hot food inevitably stays hot. People anthropomorphize computers in the same way, believing that computers are digital brains that somehow “choose” to do one thing or another based on the code they are fed. But learning a few things about how computers work, even at a rudimentary level, takes the homunculus out of the machine. That’s why the Jacquard loom is such a good go-to illustration. It may at first seem like an incredible device. It reads punch cards and somehow “knows” to weave the right pattern! The reality is mundane: Each row of holes corresponds to a thread, and where there is a hole in that row the corresponding thread gets lifted. Understanding this may not help you do anything new with computers, but it will give you the confidence that you are not dealing with something magical. We should impart this sense of confidence to beginners as soon as we can. - -Alas, it’s possible that the real problem is that nobody wants to learn about the Jacquard loom. Judging by how Codecademy emphasizes the professional applications of what it teaches, many people probably start using Codecademy because they believe it will help them “level up” their careers. They believe, not unreasonably, that the primary challenge will be understanding the gobbledygook, so they want to “learn to code.” And they want to do it as quickly as possible, in the hour or two they have each night between dinner and collapsing into bed. Codecademy, which after all is a business, gives these people what they are looking for—not some roundabout explanation involving a machine invented in the 18th century. - -The _Computer Literacy Project_, on the other hand, is what a bunch of producers and civil servants at the BBC thought would be the best way to educate the nation about computing. I admit that it is a bit elitist to suggest we should laud this group of people for teaching the masses what they were incapable of seeking out on their own. But I can’t help but think they got it right. Lots of people first learned about computing using a BBC Micro, and many of these people went on to become successful software developers or game designers. [As I’ve written before][14], I suspect learning about computing at a time when computers were relatively simple was a huge advantage. But perhaps another advantage these people had is shows like _The Computer Programme_, which strove to teach not just programming but also how and why computers can run programs at all. After watching _The Computer Programme_, you may not understand all the gobbledygook on a computer screen, but you don’t really need to because you know that, whatever the “code” looks like, the computer is always doing the same basic thing. After a course or two on Codecademy, you understand some flavors of gobbledygook, but to you a computer is just a magical machine that somehow turns gobbledygook into running software. That isn’t computer literacy. - -_If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][15] on Twitter or subscribe to the [RSS feed][16] to make sure you know when a new post is out._ - -_Previously on TwoBitHistory…_ - -> FINALLY some new damn content, amirite? -> -> Wanted to write an article about how Simula bought us object-oriented programming. It did that, but early Simula also flirted with a different vision for how OOP would work. Wrote about that instead! -> -> — TwoBitHistory (@TwoBitHistory) [February 1, 2019][17] - - 1. Robert Albury and David Allen, Microelectronics, report (1979). [↩︎][18] - - 2. Gregg Williams, “Microcomputing, British Style”, Byte Magazine, 40, January 1983, accessed on March 31, 2019, . [↩︎][19] - - 3. John Radcliffe, “Toward Computer Literacy,” Computer Literacy Project Achive, 42, accessed March 31, 2019, [https://computer-literacy-project.pilots.bbcconnectedstudio.co.uk/media/Towards Computer Literacy.pdf][20]. [↩︎][21] - - 4. David Allen, “About the Computer Literacy Project,” Computer Literacy Project Archive, accessed March 31, 2019, . [↩︎][22] - - 5. ibid. [↩︎][23] - - 6. Williams, 51. [↩︎][24] - - 7. Radcliffe, 11. [↩︎][25] - - 8. Radcliffe, 5. [↩︎][26] - - - - --------------------------------------------------------------------------------- - -via: https://twobithistory.org/2019/03/31/bbc-micro.html - -作者:[Two-Bit History][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://twobithistory.org -[b]: https://github.com/lujun9972 -[1]: tmp.05mfBL4kP8#fn:1 -[2]: tmp.05mfBL4kP8#fn:2 -[3]: tmp.05mfBL4kP8#fn:3 -[4]: https://computer-literacy-project.pilots.bbcconnectedstudio.co.uk/ -[5]: https://twobithistory.org/2018/07/22/dawn-of-the-microcomputer.html -[6]: tmp.05mfBL4kP8#fn:4 -[7]: tmp.05mfBL4kP8#fn:5 -[8]: tmp.05mfBL4kP8#fn:6 -[9]: https://twobithistory.org/images/beeb.jpg -[10]: https://twitter.com/TwoBitHistory/status/1112372000742404098 -[11]: tmp.05mfBL4kP8#fn:7 -[12]: https://twitter.com/TwoBitHistory/status/1111305774939234304 -[13]: tmp.05mfBL4kP8#fn:8 -[14]: https://twobithistory.org/2018/09/02/learning-basic.html -[15]: https://twitter.com/TwoBitHistory -[16]: https://twobithistory.org/feed.xml -[17]: https://twitter.com/TwoBitHistory/status/1091148050221944832?ref_src=twsrc%5Etfw -[18]: tmp.05mfBL4kP8#fnref:1 -[19]: tmp.05mfBL4kP8#fnref:2 -[20]: https://computer-literacy-project.pilots.bbcconnectedstudio.co.uk/media/Towards%20Computer%20Literacy.pdf -[21]: tmp.05mfBL4kP8#fnref:3 -[22]: tmp.05mfBL4kP8#fnref:4 -[23]: tmp.05mfBL4kP8#fnref:5 -[24]: tmp.05mfBL4kP8#fnref:6 -[25]: tmp.05mfBL4kP8#fnref:7 -[26]: tmp.05mfBL4kP8#fnref:8 diff --git a/sources/talk/20190401 How Kubeflow is evolving without ksonnet.md b/sources/talk/20190401 How Kubeflow is evolving without ksonnet.md deleted file mode 100644 index bad5611f3d..0000000000 --- a/sources/talk/20190401 How Kubeflow is evolving without ksonnet.md +++ /dev/null @@ -1,62 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How Kubeflow is evolving without ksonnet) -[#]: via: (https://opensource.com/article/19/4/kubeflow-evolution) -[#]: author: (Jonathan Gershater (Red Hat) https://opensource.com/users/jgershat/users/jgershat) - -How Kubeflow is evolving without ksonnet -====== -There are big differences in how open source communities handle change compared to closed source vendors. -![Chat bubbles][1] - -Many software projects depend on modules that are run as separate open source projects. When one of those modules loses support (as is inevitable), the community around the main project must determine how to proceed. - -This situation is happening right now in the [Kubeflow][2] community. Kubeflow is an evolving open source platform for developing, orchestrating, deploying, and running scalable and portable machine learning workloads on [Kubernetes][3]. Recently, the primary supporter of the Kubeflow component [ksonnet][4] announced that it would [no longer support][5] the software. - -When a piece of software loses support, the decision-making process (and the outcome) differs greatly depending on whether the software is open source or closed source. - -### A cellphone analogy - -To illustrate the differences in how an open source community and a closed source/single software vendor proceed when a component loses support, let's use an example from hardware design. - -Suppose you buy cellphone Model A and it stops working. When you try to get it repaired, you discover the manufacturer is out of business and no longer offering support. Since the cellphone's design is proprietary and closed, no other manufacturers can support it. - -Now, suppose you buy cellphone Model B, it stops working, and its manufacturer is also out of business and no longer offering support. However, Model B's design is open, and another company is in business manufacturing, repairing and upgrading Model B cellphones. - -This illustrates one difference between software written using closed and open source principles. If the vendor of a closed source software solution goes out of business, support disappears with the vendor, unless the vendor sells the software's design and intellectual property. But, if the vendor of an open source solution goes out of business, there is no intellectual property to sell. By the principles of open source, the source code is available for anyone to use and modify, under license, so another vendor can continue to maintain the software. - -### How Kubeflow is evolving without ksonnet - -The ramification of ksonnet's backers' decision to cease development illustrates Kubeflow's open and collaborative design process. Kubeflow's designers have several options, such as replacing ksonnet, adopting and developing ksonnet, etc. Because Kubeflow is an open source project, all options are discussed in the open on the Kubeflow mailing list. Some of the community's suggestions include: - -> * Should we look at projects that are CNCF/Apache projects e.g. [helm][6] -> * I would opt for back to the basics. KISS. How about plain old jsonnet + kubectl + makefile/scripts ? Thats how e.g. the coreos [prometheus operator][7] does it. It would also lower the entry barrier (no new tooling) and let vendors of k8s (gke, openshift, etc) easily build on top of that. -> * I vote for using a simple, _programmatic_ context, be it manual jsonnet + kubectl, or simple Python scripts + Python K8s client, or any tool be can build on top of these. -> - - -The members of the mailing list are discussing and debating alternatives to ksonnet and will arrive at a decision to continue development. What I love about the open source way of adapting is that it's done communally. Unlike closed source software, which is often designed by one vendor, the organizations that are members of an open source project can collaboratively steer the project in the direction they best see fit. As Kubeflow evolves, it will benefit from an open, collaborative decision-making framework. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/4/kubeflow-evolution - -作者:[Jonathan Gershater (Red Hat)][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/jgershat/users/jgershat -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/talk_chat_communication_team.png?itok=CYfZ_gE7 (Chat bubbles) -[2]: https://www.kubeflow.org/ -[3]: https://github.com/kubernetes -[4]: https://ksonnet.io/ -[5]: https://blogs.vmware.com/cloudnative/2019/02/05/welcoming-heptio-open-source-projects-to-vmware/ -[6]: https://landscape.cncf.io -[7]: https://github.com/coreos/prometheus-operator/tree/master/contrib/kube-prometheus diff --git a/sources/talk/20190402 Making computer science curricula as adaptable as our code.md b/sources/talk/20190402 Making computer science curricula as adaptable as our code.md deleted file mode 100644 index 150034a20b..0000000000 --- a/sources/talk/20190402 Making computer science curricula as adaptable as our code.md +++ /dev/null @@ -1,72 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Making computer science curricula as adaptable as our code) -[#]: via: (https://opensource.com/open-organization/19/4/adaptable-curricula-computer-science) -[#]: author: (Amarachi Achonu https://opensource.com/users/amarach1/users/johnsontanner3) - -Making computer science curricula as adaptable as our code -====== -No two computer science students are alike—so teachers need curricula -that are open and adaptable. -![][1] - -Educators in elementary computer science face a lack of adaptable curricula. Calls for more modifiable, non-rigid curricula are therefore enticing—assuming that such curricula could benefit teachers by increasing their ability to mold resources for individual classrooms and, ultimately, produce better teaching experiences and learning outcomes. - -Our team at [CSbyUs][2] noticed this scarcity, and we've created an open source web platform to facilitate more flexible, adaptable, and tested curricula for computer science educators. The mission of the CSbyUs team has always been utilizing open source technology to improve pedagogy in computer science, which includes increasing support for teachers. Therefore, this project primarily seeks to use open source principles—and the benefits inherent in them—to expand the possibilities of modern curriculum-making and support teachers by increasing access to more adaptable curricula. - -### Rigid, monotonous, mundane - -Why is the lack of adaptable curricula a problem for computer science education? Rigid curricula dominates most classrooms today, primarily through monotonous and routinely distributed lesson plans. Many of these plans are developed without the capacity for dynamic use and application to different classroom atmospheres. In contrast, an _adaptable_ curriculum is one that would _account_ for dynamic and changing classroom environments. - -An adaptable curriculum means freedom and more options for educators. This is especially important in elementary-level classrooms, where instructors are introducing students to computer science for the first time, and in classrooms with higher populations of groups typically underrepresented in the field of computer science. Here especially, it's advantageous for instructors to have access to curricula that explicitly consider diverse classroom landscapes and grants the freedom necessary to adapt to specific student populations. - -### Making it adaptable - -This kind of adaptability is certainly at work at CSbyUs. Hayley Barton—a member of both the organization's curriculum-making team and its teaching team, and a senior at Duke University majoring in Economics and minoring in Computer Science and Spanish—recently demonstrated the benefits of adaptable curricula during an engagement in the field. Reflecting on her teaching experiences, Barton describes a major reason why curriculum adaptation is necessary in computer science classrooms. "We are seeing the range of students that we work with," she says, "and trying to make the curriculum something that can be tailored to different students." - -An adaptable curriculum means freedom and more options for educators. - -A more adaptable curriculum is necessary for truly challenging students, Barton continues. - -The need for change became most evident to Barton when working students to make their own preliminary apps. Barton collaborated with students who appeared to be at different levels of focus and attention. On the one hand, a group of more advanced students took well to the style of a demonstrative curriculum and remained attentive and engaged to the task. On the other hand, another group of students seemed to have more trouble focusing in the classroom or even being motivated to engage with topics of computer science skills. Witnessing this difference among students, it became important that curriculum would need to be adaptable in multiple ways to be able to engage more students at their level. - -"We want to challenge every student without making it too challenging for any individual student," Barton says. "Thinking about those things definitely feeds into how I'm thinking about the curriculum in terms of making it accessible for all the students." - -As a curriculum-maker, she subsequently uses experiences like this to make changes to the original curriculum. - -"If those other students have one-on-one time themselves, they could be doing even more amazing things with their apps," says Barton. - -Taking this advice, Barton would potentially incorporate into the curriculum more emphasis on cultivating students' sense of ownership in computer science, since this is important to their focus and productivity. For this, students may be afforded that sense of one-on-one time. The result will affect the next round of teachers who use the curriculum. - -For these changes to be effective, the onus is on teachers to notice the dynamics of the classroom. In the future, curriculum adaptation may depend on paying particular attention to and identifying these subtle differences of style of curriculum. Identifying and commenting about these subtleties allows the possibility of applying a different strategy, and these are the changes that are applied to the curriculum. - -Curriculum adaptation should be iterative, as it involves learning from experience, returning to the drawing board, making changes, and finally, utilizing the curriculum again. - -"We've gone through a lot of stages of development," Barton says. "The goal is to have this kind of back and forth, where the curriculum is something that's been tested, where we've used our feedback, and also used other research that we've done, to make it something that's actually impactful." - -Hayley's "back and forth" process is an iterative process of curriculum-making. Between utilizing curricula and modifying curricula, instructors like Hayley can take a once-rigid curriculum and mold it to any degree that the user sees fit—again and again. This iterative process depends on tests performed first in the classroom, and it depends on the teacher's rationale and reflection on how curricula uniquely pans out for them. - -Adaptability of curriculum is the most important principle on which the CSbyUs platform is built. Much like Hayley's process of curriculum-making, curriculum adaptation should be _iterative_ , as it involves learning from experience, returning to the drawing board, making changes, and finally, utilizing the curriculum again. Once launched, the CSbyUS website will document this iterative process. - -The open-focused pedagogy behind the CSByUs platform, then, brings to life the flexibility inherent in the process of curriculum adaptation. First, it invites and collects the valuable first-hand perspectives of real educators working with real curricula to produce real learning. Next, it capitalizes on an iterative processes of development—one familiar to open source programmers—to enable modifications to curriculum (and the documentation of those modifications). Finally, it transforms the way teachers encounter curricula by helping them make selections from different versions of both modified curriculum and "the original." Our platform's open source strategy is crucial to cultivating a hub of flexible curricula for educators. - -Open source practices can be a key difference in making rigid curricula more moldable for educators. Furthermore, since this approach effectively melds open source technologies with open-focused pedagogy, open pedagogy can potentially provide flexibility for educators teaching various curriculum across disciplines. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/19/4/adaptable-curricula-computer-science - -作者:[Amarachi Achonu][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/amarach1/users/johnsontanner3 -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003588_01_rd3os.combacktoschoolserieshe_rh_051x_0.png?itok=gIzbmxuI -[2]: https://csbyus.herokuapp.com/ diff --git a/sources/talk/20190405 D as a C Replacement.md b/sources/talk/20190405 D as a C Replacement.md deleted file mode 100644 index 36b60bb278..0000000000 --- a/sources/talk/20190405 D as a C Replacement.md +++ /dev/null @@ -1,247 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (D as a C Replacement) -[#]: via: (https://theartofmachinery.com/2019/04/05/d_as_c_replacement.html) -[#]: author: (Simon Arneaud https://theartofmachinery.com) - -D as a C Replacement -====== - -Sircmpwn (the main developer behind the [Sway Wayland compositor][1]) recently wrote a blog post about how he thinks [Rust is not a good C replacement][2]. I don’t know if he’d like the [D programming language][3] either, but it’s become a C replacement for me. - -### My C to D Story - -My story is like a lot of systems programmers’ stories. At one time, C was my go-to language for most programming. One day I realised that most of my C programs kept reimplementing things from C++: dynamic arrays, better strings, polymorphic classes, etc. So I tried using C++ instead, and at first I loved it. RAII and classes and generics made programming fun again. Even better was the promise that if I read all these books on C++, and learned to master things like template metaprogramming, I’d become an almighty god of systems programming and my code would be amazing. But learning more eventually had the opposite effect: (in hindsight) my code actually got worse, and I fell out of love. I remember reading Scott Meyer’s Effective C++ and realising it was really more about _ineffective_ C++ — and that most of my C++ code until then was broken. Let’s face it: C might be fiddly to use, but it has a kind of elegance, and “elegant” is rarely a word you hear when C++ is involved. - -Apparently, a lot of ex-C C++ programmers end up going back to C. In my case, I discovered D. It’s also not perfect, but I use it because it feels to me a lot more like the `C += 1` that C++ was meant to be. Here’s an example that’s very superficial, but I think is representative. Take this simple C program: - -``` -#include - -int main() -{ - printf("1 + 1 = %d!\n", 1 + 1); - return 0; -} -``` - -Here’s a version using the C++ standard library: - -``` -#include - -int main() -{ - std::cout << "1 + 1 = " << 1 + 1 << "!" << std::endl; - return 0; -} -``` - -Here’s an idiomatic D version: - -``` -import std.stdio; - -void main() -{ - writef("1 + 1 = %d!\n", 1 + 1); -} -``` - -As I said, it’s a superficial example, but I think it shows a general difference in philosophy between C++ and D. (If I wanted to make the difference even clearer, I’d use an example that needed `iomanip` in C++.) - -Update: Unlike in C, [D’s format strings can work with custom types][4]. Stefan Rohe has also pointed out that [D supports compile-time checking of format strings][5] using its metaprogramming features — unlike C which does it through built-in compiler special casing that can’t be used with custom code. - -This [article about C++ member function pointers][6] happens to also be a good explanation of the origins of D. It’s a good read if you’re a programming language nerd like me, but here’s my TL;DR for everyone else: C++ member function pointers are supposed to feel like a low-level feature (like normal function pointers are), but the complexity and diversity of implementations means they’re really high level. The complexity of the implementations is because of the subtleties of the rules about what you can do with them. The author explains the implementations from several C++ compilers, including what’s “easily [his] favorite implementation”: the elegantly simple Digital Mars C++ implementation. (“Why doesn’t everyone else do it this way?”) The DMC compiler was written by Walter Bright, who invented D. - -D has classes and templates and other core features of C++, but designed by someone who has spent a heck of a lot of time thinking about the C++ spec and how things could be simpler. Walter once said that his experiences implementing C++ templates made him consider not including them in D at all, until he realised they didn’t need to be so complex. - -Here’s a quick tour of D from the point of view of incrementally improving C. - -### `-betterC` - -D compilers support a `-betterC` switch that disables [the D runtime][7] and all high-level features that depend on it. The example C code above can be translated directly into betterC: - -``` -import core.stdc.stdio; - -extern(C): - -int main() -{ - printf("1 + 1 = %d!\n", 1 + 1); - return 0; -} - -$ dmd -betterC example.d -$ ./example -1 + 1 = 2! -``` - -The resulting binary looks a lot like the equivalent C binary. In fact, if you rewrote a C library in betterC, it could still link to code that had been compiled against the C version, and work without changes. Walter Bright wrote a good article walking through all [the changes needed to convert a real C program to betterC][8]. - -You don’t actually need the `-betterC` switch just to write C-like code in D. It’s only needed in special cases where you simply can’t have the D runtime. But let me point out some of my favourite D features that still work with `-betterC`. - -#### `static assert()` - -This allows verifying some assumption at compile time. - -``` -static assert(kNumInducers < 16); -``` - -Systems code often makes assumptions about alignment or structure size or other things. With `static assert`, it’s possible to not only document these assumptions, but trigger a compilation error if someone breaks them by adding a struct member or something. - -#### Slices - -Typical C code is full of pointer/length pairs, and it’s a common bug for them to go out of sync. Slices are a simple and super-useful abstraction for a range of memory defined by a pointer and length. Instead of code like this: - -``` -buffer_p += offset; -buffer_len -= offset; // Got to update both -``` - -You can use this much-less-bug-prone alternative: - -``` -buffer = buffer[offset..$]; -``` - -A slice is nothing but a pointer/length pair with first-class syntactic support. - -Update: [Walter Bright has written more about pointer/length pair problem in C][9]. - -#### Compile Time Function Evaluation (CTFE) - -[Many functions can be evaluated at compile time.][10] - -``` -long factorial(int n) pure -{ - assert (n >= 0 && n <= 20); - long ret = 1; - foreach (j; 2..n+1) ret *= j; - return ret; -} - -// Statically allocated array -// Size is calculated at compile time -Permutation[factorial(kNumThings)] permutation_table; -``` - -#### `scope` Guards - -Code in one part of a function is often coupled to cleanup code in a later part. Failing to match this code up correctly is another common source of bugs (especially when multiple control flow paths are involved). D’s scope guards make it simple to get this stuff right: - -``` -p = malloc(128); -// free() will be called when the current scope exits -scope (exit) free(p); -// Put whatever if statements, or loops, or early returns you like here -``` - -You can even have multiple scope guards in a scope, or have nested scopes. The cleanup routines will be called when needed, in the right order. - -D also supports RAII using struct destructors. - -#### `const` and `immutable` - -It’s a popular myth that `const` in C and C++ is useful for compiler optimisations. Walter Bright has complained that every time he thought of a new `const`-based optimisation for C++, he eventually discovered it didn’t work in real code. So he made some changes to `const` semantics for D, and added `immutable`. You can read more in the [D `const` FAQ][11]. - -#### `pure` - -Functional purity can be enforced. I’ve written about [some of the benefits of the `pure` keyword before][12]. - -#### `@safe` - -SafeD is a subset of D that forbids risky language features like pointer typecasts and inline assembly. Code marked `@safe` is enforced by the compiler to not use these features, so that risky code can be limited to the small percentage of the application that needs it. You can [read more about SafeD in this article][13]. - -#### Metaprogramming - -Like I hinted earlier, metaprogramming has got a bad reputation among some C++ programmers. But [D has the advantage of making metaprogramming less interesting][14], so D programmers tend to just do it when it’s useful, and not as a fun puzzle. - -D has great support for [compile-time reflection][15]. In most cases, compile-time reflection can solve the same problems as run-time reflection, but with compile-time guarantees. Compile-time reflection can also be used to implement run-time reflection where it’s truly needed. - -Need the names of an enumerated type as an array? - -``` -enum State -{ - stopped, - starting, - running, - stopping, -} - -string[] state_names = [__traits(allMembers, State)]; -``` - -Thanks to D’s metaprogramming, the standard library has many nice, type-safe tools, like this [compile-time checked bit flag enum][16]. - -I’ve written more about [using metaprogramming in `-betterC` code][17]. - -#### No Preprocessor - -Okay, this a non-feature as a feature, but D has no equivalent to C’s preprocessor. All its sane use-cases are replaced with native language features, like [manifest constants][18] and [templates][19]. That includes proper [modules][20] support, which means D can break free of the limitations of that old `#include` hack. - -### Normal D - -C-like D code can be written and compiled as normal D code without the `-betterC` switch. The difference is that normal D code is linked to the D runtime, which supports higher-level features, the most obvious ones being garbage collection and object-oriented classes. Some people have confused the D runtime with something like the Java virtual machine, so I once wrote [an article explaining exactly what it is][7] (spoiler: it’s like the C and C++ runtimes, but with more features). - -Even with the runtime, compiled D is not much different from compiled C++. Sometimes I like to write throwaway code to, say, experiment with a new Linux system call or something. I used to think the best language for that is plain old C, but now I always use D. - -D doesn’t natively support `#include`ing C code, but for nice APIs that don’t have a lot of preprocessor craziness (like most of Linux) I usually just write [ad-hoc bindings][21]. Many popular C libraries have maintained D bindings, which can be found in the [Dub registry][22], or in [the Derelict project][23], or in the newer [BindBC project][24]. There are also tools for automated bindings, including the awesome [dpp tool][25] that brings `#include` support directly to D code. - -Update: This post has got a lot of attention from people who’ve never heard of D before. If you’re interested in learning D, I recommend - - * [The DLang Tour][26] for a quick dive into the language - * [Ali Çehreli’s Programming in D book][27] if you prefer something in-depth - * [The D forum Learn group][28] or [IRC channel][29] to get answers to your questions - - - --------------------------------------------------------------------------------- - -via: https://theartofmachinery.com/2019/04/05/d_as_c_replacement.html - -作者:[Simon Arneaud][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://theartofmachinery.com -[b]: https://github.com/lujun9972 -[1]: https://swaywm.org/ -[2]: https://drewdevault.com/2019/03/25/Rust-is-not-a-good-C-replacement.html -[3]: https://dlang.org -[4]: https://wiki.dlang.org/Defining_custom_print_format_specifiers -[5]: https://dlang.org/phobos/std_format.html#format -[6]: https://www.codeproject.com/Articles/7150/Member-Function-Pointers-and-the-Fastest-Possible -[7]: /2017/06/04/what_is_the_d_runtime.html -[8]: https://dlang.org/blog/2018/06/11/dasbetterc-converting-make-c-to-d/ -[9]: https://www.digitalmars.com/articles/b44.html -[10]: https://dlang.org/spec/function.html#interpretation -[11]: https://dlang.org/articles/const-faq.html -[12]: /2016/03/28/dirtying_pure_functions_can_be_useful.html -[13]: https://dlang.org/blog/2016/09/28/how-to-write-trusted-code-in-d/ -[14]: https://epi.github.io/2017/03/18/less_fun.html -[15]: https://dlang.org/spec/traits.html -[16]: https://dlang.org/phobos/std_typecons.html#BitFlags -[17]: /2018/08/13/inheritance_and_polymorphism_2.html -[18]: https://dlang.org/spec/enum.html#manifest_constants -[19]: https://tour.dlang.org/tour/en/basics/templates -[20]: https://ddili.org/ders/d.en/modules.html -[21]: https://wiki.dlang.org/Bind_D_to_C -[22]: https://code.dlang.org/ -[23]: https://github.com/DerelictOrg -[24]: https://github.com/BindBC -[25]: https://github.com/atilaneves/dpp -[26]: https://tour.dlang.org/ -[27]: https://ddili.org/ders/d.en/index.html -[28]: https://forum.dlang.org/group/learn -[29]: irc://irc.freenode.net/d diff --git a/sources/talk/20190410 Anti-lasers could give us perfect antennas, greater data capacity.md b/sources/talk/20190410 Anti-lasers could give us perfect antennas, greater data capacity.md deleted file mode 100644 index 2d2f4d5c05..0000000000 --- a/sources/talk/20190410 Anti-lasers could give us perfect antennas, greater data capacity.md +++ /dev/null @@ -1,69 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Anti-lasers could give us perfect antennas, greater data capacity) -[#]: via: (https://www.networkworld.com/article/3386879/anti-lasers-could-give-us-perfect-antennas-greater-data-capacity.html#tk.rss_all) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -Anti-lasers could give us perfect antennas, greater data capacity -====== -Anti-lasers get close to providing a 100% efficient signal channel for data, say engineers. -![Guirong Hao / Valery Brozhinsky / Getty Images][1] - -Playing laser light backwards could adjust data transmission signals so that they perfectly match receiving antennas. The fine-tuning of signals like this, not achieved with such detail before, could create more capacity for ever-increasing data demand. - -"Imagine, for example, that you could adjust a cell phone signal exactly the right way, so that it is perfectly absorbed by the antenna in your phone," says Stefan Rotter of the Institute for Theoretical Physics of Technische Universität Wien (TU Wien) in a [press release][2]. - -Rotter is talking about “Random Anti-Laser,” a project he has been a part of. The idea behind it is that if one could time-reverse a laser, then the laser (right now considered the best light source ever built) becomes the best available light absorber. Perfect absorption of a signal wave would mean that all of the data-carrying energy is absorbed by the receiving device, thus it becomes 100% efficient. - -**[ Related:[What is 5G wireless? How it will change networking as we know it?][3] ]** - -“The easiest way to think about this process is in terms of a movie showing a conventional laser sending out laser light, which is played backwards,” the TU Wein article says. The anti-laser is the exact opposite of the laser — instead of sending specific colors perfectly when energy is applied, it receives specific colors perfectly. - -Perfect absorption of a signal wave would mean that all of the data-carrying energy is absorbed by the receiving device, thus it becomes 100% efficient. - -Counter-intuitively, it’s the random scattering of light in all directions that’s behind the engineering. However, the Vienna, Austria, university group performs precise calculations on those scattering, splitting signals. That lets the researchers harness the light. - -### How the anti-laser technology works - -The microwave-based, experimental device the researchers have built in the lab to prove the idea doesn’t just potentially apply to cell phones; wireless internet of things (IoT) devices would also get more data throughput. How it works: The device consists of an antenna-containing chamber encompassed by cylinders, all arranged haphazardly, the researchers explain. The cylinders distribute an elaborate, arbitrary wave pattern “similar to [throwing] stones in a puddle of water, at which water waves are deflected.” - -Measurements then take place to identify exactly how the signals return. The team involved, which also includes collaborators from the University of Nice, France, then “characterize the random structure and calculate the wave front that is completely swallowed by the central antenna at the right absorption strength.” Ninety-nine point eight percent is absorbed, making it remarkably and virtually perfect. Data throughput, range, and other variables thus improve. - -**[[Take this mobile device management course from PluralSight and learn how to secure devices in your company without degrading the user experience.][4] ]** - -Achieving perfect antennas has been pretty much only theoretically possible for engineers to date. Reflected energy (RF back into the transmitter from antenna inefficiencies) has always been an issue in general. Reflections from surfaces, too, have been always been a problem. - -“Think about a mobile phone signal that is reflected several times before it reaches your cell phone,” Rotter says. It’s not easy to get the tuning right — as the antennas’ physical locations move, reflected surfaces become different. - -### Scattering lasers - -Scattering, similar to that used in this project, is becoming more important in communications overall. “Waves that are being scattered in a complex way are really all around us,” the group says. - -An example is random-lasers (which the group’s anti-laser is based on) that unlike traditional lasers, do not use reflective surfaces but trap scattered light and then “emit a very complicated, system-specific laser field when supplied with energy.” The anti-random-laser developed by Rotter and his group simply reverses that in time: - -“Instead of a light source that emits a specific wave depending on its random inner structure, it is also possible to build the perfect absorber.” The anti-random-laser. - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3386879/anti-lasers-could-give-us-perfect-antennas-greater-data-capacity.html#tk.rss_all - -作者:[Patrick Nelson][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://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/03/data_cubes_transformation_conversion_by_guirong_hao_gettyimages-1062387214_plus_abstract_binary_by_valerybrozhinsky_gettyimages-865457032_3x2_2400x1600-100790211-large.jpg -[2]: https://www.tuwien.ac.at/en/news/news_detail/article/126574/ -[3]: https://www.networkworld.com/article/3203489/lan-wan/what-is-5g-wireless-networking-benefits-standards-availability-versus-lte.html -[4]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fmobile-device-management-big-picture -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190415 Nyansa-s Voyance expands to the IoT.md b/sources/talk/20190415 Nyansa-s Voyance expands to the IoT.md deleted file mode 100644 index e893c86d53..0000000000 --- a/sources/talk/20190415 Nyansa-s Voyance expands to the IoT.md +++ /dev/null @@ -1,75 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Nyansa’s Voyance expands to the IoT) -[#]: via: (https://www.networkworld.com/article/3388301/nyansa-s-voyance-expands-to-the-iot.html#tk.rss_all) -[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) - -Nyansa’s Voyance expands to the IoT -====== - -![Brandon Mowinkel \(CC0\)][1] - -Nyansa announced today that their flagship Voyance product can now apply its AI-based secret sauce to [IoT][2] devices, over and above the networking equipment and IT endpoints it could already manage. - -Voyance – a network management product that leverages AI to automate the discovery of devices on the network and identify unusual behavior – has been around for two years now, and Nyansa says that it’s being used to observe a total of 25 million client devices operating across roughly 200 customer networks. - -**More on IoT:** - - * [Most powerful Internet of Things companies][3] - * [10 Hot IoT startups to watch][4] - * [The 6 ways to make money in IoT][5] - * [][6] [Blockchain, service-centric networking key to IoT success][7] - * [Getting grounded in IoT networking and security][8] - * [Building IoT-ready networks must become a priority][9] - * [What is the Industrial IoT? [And why the stakes are so high]][10] - - - -It’s a software-only product (available either via public SaaS or private cloud) that works by scanning a customer’s network and identifying every device attached to it, then establishing a behavioral baseline that will let it flag suspicious actions (e.g., sending a lot more data than other devices of its kind, connecting to unusual servers) and even perform automated root-cause analysis of network issues. - -The process doesn’t happen instantaneously, particularly the creation of the baseline, but it’s designed to be minimally invasive to existing network management frameworks and easy to implement. - -Nyansa said that the medical field has been one of the key targets for the newly IoT-enabled iteration of Voyance, and one early customer – Baptist Health, a Florida-based healthcare company that runs four hospitals and several other clinics and practices – said that Voyance IoT has offered a new level of visibility into the business’ complex array of connected diagnostic and treatment machines. - -“In the past we didn’t have the ability to identify security concerns in this way, related to rogue devices on the enterprise network, and now we’re able to do that,” said CISO Thad Phillips. - -While spiraling network complexity isn’t an issue confined to the IoT, there’s a strong argument that the number and variety of devices connected to an IoT-enabled network represent a new challenge to network management, particularly in light of the fact that many such devices aren’t particularly secure. - -“They’re not manufactured by networking vendors or security vendors, so for a performance standpoint, they have a lot of quirks … and on the security side, that’s sort of a big problem there as well,” said Anand Srinivas, Nyansa’s co-founder and CTO. - -Enabling the Voyance platform to identify and manage IoT devices along with traditional endpoints seems to be mostly a matter of adding new device signatures to the system, but Enterprise Management Associates research director Shamus McGillicuddy said that, while the system’s designed for automation and ease of use, AIOps products like Voyance do need to be managed to make sure that they’re functioning correctly. - -“Anything based on machine learning is going to take a while to make sure it understands your environment and you might have to retrain it,” he said. “There’s always going to be more and more things connecting to IP networks, and it’s just going to be a question of building up a database.” - -Voyance IoT is available now. Pricing starts at $16,000 per year, and goes up with the number of total devices managed. (Current Voyance users can manage up to 100 IoT devices at no additional cost.) - -Join the Network World communities on [Facebook][11] and [LinkedIn][12] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3388301/nyansa-s-voyance-expands-to-the-iot.html#tk.rss_all - -作者:[Jon Gold][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://www.networkworld.com/author/Jon-Gold/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/02/geometric_architecture_ceiling_structure_lines_connections_networks_perspective_by_brandon_mowinkel_cc0_via_unsplash_2400x1600-100788530-large.jpg -[2]: https://www.networkworld.com/article/3207535/what-is-iot-how-the-internet-of-things-works.html -[3]: https://www.networkworld.com/article/2287045/internet-of-things/wireless-153629-10-most-powerful-internet-of-things-companies.html -[4]: https://www.networkworld.com/article/3270961/internet-of-things/10-hot-iot-startups-to-watch.html -[5]: https://www.networkworld.com/article/3279346/internet-of-things/the-6-ways-to-make-money-in-iot.html -[6]: https://www.networkworld.com/article/3280225/internet-of-things/what-is-digital-twin-technology-and-why-it-matters.html -[7]: https://www.networkworld.com/article/3276313/internet-of-things/blockchain-service-centric-networking-key-to-iot-success.html -[8]: https://www.networkworld.com/article/3269736/internet-of-things/getting-grounded-in-iot-networking-and-security.html -[9]: https://www.networkworld.com/article/3276304/internet-of-things/building-iot-ready-networks-must-become-a-priority.html -[10]: https://www.networkworld.com/article/3243928/internet-of-things/what-is-the-industrial-iot-and-why-the-stakes-are-so-high.html -[11]: https://www.facebook.com/NetworkWorld/ -[12]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190416 Two tools to help visualize and simplify your data-driven operations.md b/sources/talk/20190416 Two tools to help visualize and simplify your data-driven operations.md deleted file mode 100644 index 8a44c56ca7..0000000000 --- a/sources/talk/20190416 Two tools to help visualize and simplify your data-driven operations.md +++ /dev/null @@ -1,59 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Two tools to help visualize and simplify your data-driven operations) -[#]: via: (https://www.networkworld.com/article/3389756/two-tools-to-help-visualize-and-simplify-your-data-driven-operations.html#tk.rss_all) -[#]: author: (Kent McNeil, Vice President of Software, Ciena Blue Planet ) - -Two tools to help visualize and simplify your data-driven operations -====== -Amidst the rising complexity of networks, and influx of data, service providers are striving to keep operational complexity under control. Blue Planet’s Kent McNeil explains how they can turn this challenge into a huge opportunity, and in fact reduce operational effort by exploiting state-of-the-art graph database visualization and delta-based federation technologies. -![danleap][1] - -**Build the picture: Visualize your data** - -The Internet of Things (IoT), 5G, smart technology, virtual reality – all these applications guarantee one thing for communications service providers (CSPs): more data. As networks become increasingly overwhelmed by mounds of data, CSPs are on the hunt for ways to make the most of the intelligence collected and are looking for ways to monetize their services, provide more customizable offerings, and enhance their network performance. - -Customer analytics has gone some way towards fulfilling this need for greater insights, but with the rise in the volume and variety of consumer and IoT applications, the influx of data will increase at a phenomenal rate. The data includes not only customer-related data, but also device and network data, adding complexity to the picture. CSPs must harness this information to understand the relationships between any two things, to understand the connections within their data and to ultimately, leverage it for a better customer experience. - -**See the upward graphical trend with graph databases** - -Traditional relational databases certainly have their use, but graph databases offer a novel perspective. The visual representation between the component parts enables CSPs to understand and analyze the characteristics, as well as to act in a timely manner when confronted with any discrepancies. - -Graph databases can help CSPs tackle this new challenge, ensuring the data is not just stored, but also processed and analyzed. It enables complex network questions to be asked and answered, ensuring that CSPs are not sidelined as “dumb pipes” in the IoT movement. - -The use of graph databases has started to become more mainstream, as businesses see the benefits. IBM conducted a generic industry study, entitled “The State of Graph Databases Worldwide”, which found that people are moving to graph databases for speed, performance enhancement of applications, and streamlined operations. Ways in which businesses are using, or are planning to use, graph technology is highest for network and IT operations, followed by master data management. Performance is a key factor for CSPs, as is personalization, which enables support for more tailored service offerings. - -Another advantage of graph databases for CSPs is that of unravelling the complexity of network inventory in a clear, visualized picture – this capability gives CSPs a competitive advantage as speed and performance become increasingly paramount. This need for speed and reliability will increase tenfold as IoT continues its impressive global ramp-up. Operational complexity also grows as the influx of generated data produced by IoT will further challenge the scalability of existing operational environments. Graph databases can help CSPs tackle this new challenge, ensuring the data is not just stored, but also processed and analyzed. It enables complex network questions to be asked and answered, ensuring that CSPs are not sidelined as “dumb pipes” in the IoT movement. - -**Change the tide of data with delta-based federation** - -New data, updated data, corrected data, deleted data – all needs to be managed, in line with regulations, and instantaneously. But this capability does not exist in the reality of many CSP’s Operational Support Systems (OSS). Many still battle with updating data and relying on full uploads of network inventory in order to perform key service fulfillment and assurance tasks. This method is time-intensive and risky due to potential conflicts and inaccuracies. With data being accessed from a variety of systems, CSPs must have a way to effectively hone in on only what is required. - -Integrating network data into one simplified system limits the impact on the legacy OSS systems. This allows each OSS to continue its specific role, yet to feed data into a single interface, hence enabling teams to see the complete picture and gain efficiencies while launching new services or pinpointing and resolving service and network issues. - -A delta-based federation model ensures that an accurate picture is presented, and only essential changes are conducted reliably and quickly. This simplified method filters the delta changes, reducing the time involved in updating, and minimizing the system load and risks. A validation process takes place to catch any errors or issues with the data, so CSPs can apply checks and retain control over modifications. Integrating network data into one simplified system limits the impact on the legacy OSS systems. This allows each OSS to continue its specific role, yet to feed data into a single interface, hence enabling teams to see the complete picture and gain efficiencies while launching new services or pinpointing and resolving service and network issues. - -**Ride the wave** - -25 billion connected things are predicted by Gartner on a global scale by 2021 and CSPs are already struggling with the current levels of data, which Gartner estimates at 14.2 billion in 2019. Over the last decade, CSPs have faced significant rises in the levels of data consumed as demand for new services and higher bandwidth applications has taken off. This data wave is set to continue and CSPs have two important tools at their disposal helping them ride the wave. Firstly, CSPs have specialist, legacy OSS already in place which they can leverage as a basis for integrating data and implementing optimized systems. Secondly, they can utilize new technologies in database inventory management: graph databases and delta-based federation. The advantages of effectively integrating network data, visualizing it, and creating a clear map of the inter-connections, enable CSPs to make critical decisions more quickly and accurately, resulting in most optimized and informed service operations. - -[Watch this video to learn more about Blue Planet][2] - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3389756/two-tools-to-help-visualize-and-simplify-your-data-driven-operations.html#tk.rss_all - -作者:[Kent McNeil, Vice President of Software, Ciena Blue Planet][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/04/istock-165721901-100793858-large.jpg -[2]: https://www.blueplanet.com/resources/IT-plus-network-now-a-powerhouse-combination.html?utm_campaign=X1058319&utm_source=NWW&utm_term=BPVideo&utm_medium=sponsoredpost4 diff --git a/sources/talk/20190416 What SDN is and where it-s going.md b/sources/talk/20190416 What SDN is and where it-s going.md deleted file mode 100644 index 381c227b65..0000000000 --- a/sources/talk/20190416 What SDN is and where it-s going.md +++ /dev/null @@ -1,146 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What SDN is and where it’s going) -[#]: via: (https://www.networkworld.com/article/3209131/what-sdn-is-and-where-its-going.html#tk.rss_all) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -What SDN is and where it’s going -====== -Software-defined networking (SDN) established a foothold in cloud computing, intent-based networking, and network security, with Cisco, VMware, Juniper and others leading the charge. -![seedkin / Getty Images][1] - -Hardware reigned supreme in the networking world until the emergence of software-defined networking (SDN), a category of technologies that separate the network control plane from the forwarding plane to enable more automated provisioning and policy-based management of network resources. - -SDN's origins can be traced to a research collaboration between Stanford University and the University of California at Berkeley that ultimately yielded the [OpenFlow][2] protocol in the 2008 timeframe. - -**[Learn more about the[difference between SDN and NFV][3]. Get regularly scheduled insights by [signing up for Network World newsletters][4]]** - -OpenFlow is only one of the first SDN canons, but it's a key component because it started the networking software revolution. OpenFlow defined a programmable network protocol that could help manage and direct traffic among routers and switches no matter which vendor made the underlying router or switch. - -In the years since its inception, SDN has evolved into a reputable networking technology offered by key vendors including Cisco, VMware, Juniper, Pluribus and Big Switch. The Open Networking Foundation develops myriad open-source SDN technologies as well. - -"Datacenter SDN no longer attracts breathless hype and fevered expectations, but the market is growing healthily, and its prospects remain robust," wrote Brad Casemore, IDC research vice president, data center networks, in a recent report, [_Worldwide Datacenter Software-Defined Networking Forecast, 2018–2022_][5]*. "*Datacenter modernization, driven by the relentless pursuit of digital transformation and characterized by the adoption of cloudlike infrastructure, will help to maintain growth, as will opportunities to extend datacenter SDN overlays and fabrics to multicloud application environments." - -SDN will be increasingly perceived as a form of established, conventional networking, Casemore said. - -IDC estimates that the worldwide data center SDN market will be worth more than $12 billion in 2022, recording a CAGR of 18.5% during the 2017–2022 period. The market generated revenue of nearly $5.15 billion in 2017, up more than 32.2% from 2016. - -In 2017, the physical network represented the largest segment of the worldwide datacenter SDN market, accounting for revenue of nearly $2.2 billion, or about 42% of the overall total revenue. In 2022, however, the physical network is expected to claim about $3.65 billion in revenue, slightly less than the $3.68 billion attributable to network virtualization overlays/SDN controller software but more than the $3.18 billion for SDN applications. - -“We're now at a point where SDN is better understood, where its use cases and value propositions are familiar to most datacenter network buyers and where a growing number of enterprises are finding that SDN offerings offer practical benefits,” Casemore said. “With SDN growth and the shift toward software-based network automation, the network is regaining lost ground and moving into better alignment with a wave of new application workloads that are driving meaningful business outcomes.” - -### **What is SDN? ** - -The idea of programmability is the basis for the most precise definition of what SDN is: technology that separates the control plane management of network devices from the underlying data plane that forwards network traffic. - -IDC broadens that definition of SDN by stating: “Datacenter SDN architectures feature software-defined overlays or controllers that are abstracted from the underlying network hardware, offering intent-or policy-based management of the network as a whole. This results in a datacenter network that is better aligned with the needs of application workloads through automated (thereby faster) provisioning, programmatic network management, pervasive application-oriented visibility, and where needed, direct integration with cloud orchestration platforms.” - -The driving ideas behind the development of SDN are myriad. For example, it promises to reduce the complexity of statically defined networks; make automating network functions much easier; and allow for simpler provisioning and management of networked resources, everywhere from the data center to the campus or wide area network. - -Separating the control and data planes is the most common way to think of what SDN is, but it is much more than that, said Mike Capuano, chief marketing officer for [Pluribus][6]. - -“At its heart SDN has a centralized or distributed intelligent entity that has an entire view of the network, that can make routing and switching decisions based on that view,” Capuano said. “Typically, network routers and switches only know about their neighboring network gear. But with a properly configured SDN environment, that central entity can control everything, from easily changing policies to simplifying configuration and automation across the enterprise.” - -### How does SDN support edge computing, IoT and remote access? - -A variety of networking trends have played into the central idea of SDN. Distributing computing power to remote sites, moving data center functions to the [edge][7], adopting cloud computing, and supporting [Internet of Things][8] environments – each of these efforts can be made easier and more cost efficient via a properly configured SDN environment. - -Typically in an SDN environment, customers can see all of their devices and TCP flows, which means they can slice up the network from the data or management plane to support a variety of applications and configurations, Capuano said. So users can more easily segment an IoT application from the production world if they want, for example. - -Some SDN controllers have the smarts to see that the network is getting congested and, in response, pump up bandwidth or processing to make sure remote and edge components don’t suffer latency. - -SDN technologies also help in distributed locations that have few IT personnel on site, such as an enterprise branch office or service provider central office, said Michael Bushong, vice president of enterprise and cloud marketing at Juniper Networks. - -“Naturally these places require remote and centralized delivery of connectivity, visibility and security. SDN solutions that centralize and abstract control and automate workflows across many places in the network, and their devices, improve operational reliability, speed and experience,” Bushong said. - -### **How does SDN support intent-based networking?** - -Intent-based networking ([IBN][9]) has a variety of components, but basically is about giving network administrators the ability to define what they want the network to do, and having an automated network management platform create the desired state and enforce policies to ensure what the business wants happens. - -“If a key tenet of SDN is abstracted control over a fleet of infrastructure, then the provisioning paradigm and dynamic control to regulate infrastructure state is necessarily higher level,” Bushong said. “Policy is closer to declarative intent, moving away from the minutia of individual device details and imperative and reactive commands.” - -IDC says that intent-based networking “represents an evolution of SDN to achieve even greater degrees of operational simplicity, automated intelligence, and closed-loop functionality.” - -For that reason, IBN represents a notable milestone on the journey toward autonomous infrastructure that includes a self-driving network, which will function much like the self-driving car, producing desired outcomes based on what network operators and their organizations wish to accomplish, Casemore stated. - -“While the self-driving car has been designed to deliver passengers safely to their destination with minimal human intervention, the self-driving network, as part of autonomous datacenter infrastructure, eventually will achieve similar outcomes in areas such as network provisioning, management, and troubleshooting — delivering applications and data, dynamically creating and altering network paths, and providing security enforcement with minimal need for operator intervention,” Casemore stated. - -While IBN technologies are relatively young, Gartner says by 2020, more than 1,000 large enterprises will use intent-based networking systems in production, up from less than 15 in the second quarter of 2018. - -### **How does SDN help customers with security?** - -SDN enables a variety of security benefits. A customer can split up a network connection between an end user and the data center and have different security settings for the various types of network traffic. A network could have one public-facing, low security network that does not touch any sensitive information. Another segment could have much more fine-grained remote access control with software-based [firewall][10] and encryption policies on it, which allow sensitive data to traverse over it. - -“For example, if a customer has an IoT group it doesn’t feel is all that mature with regards to security, via the SDN controller you can segment that group off away from the critical high-value corporate traffic,” Capuano stated. “SDN users can roll out security policies across the network from the data center to the edge and if you do all of this on top of white boxes, deployments can be 30 – 60 percent cheaper than traditional gear.” - -The ability to look at a set of workloads and see if they match a given security policy is a key benefit of SDN, especially as data is distributed, said Thomas Scheibe, vice president of product management for Cisco’s Nexus and ACI product lines. - -"The ability to deploy a whitelist security model like we do with ACI [Application Centric Infrastructure] that lets only specific entities access explicit resources across your network fabric is another key security element SDN enables," Scheibe said. - -A growing number of SDN platforms now support [microsegmentation][11], according to Casemore. - -“In fact, micro-segmentation has developed as a notable use case for SDN. As SDN platforms are extended to support multicloud environments, they will be used to mitigate the inherent complexity of establishing and maintaining consistent network and security policies across hybrid IT landscapes,” Casemore said. - -### **What is SDN’s role in cloud computing?** - -SDN’s role in the move toward [private cloud][12] and [hybrid cloud][13] adoption seems a natural. In fact, big SDN players such as Cisco, Juniper and VMware have all made moves to tie together enterprise data center and cloud worlds. - -Cisco's ACI Anywhere package would, for example, let policies configured through Cisco's SDN APIC (Application Policy Infrastructure Controller) use native APIs offered by a public-cloud provider to orchestrate changes within both the private and public cloud environments, Cisco said. - -“As organizations look to scale their hybrid cloud environments, it will be critical to leverage solutions that help improve productivity and processes,” said [Bob Laliberte][14], a senior analyst with Enterprise Strategy Group, in a recent [Network World article][15]. “The ability to leverage the same solution, like Cisco’s ACI, in your own private-cloud environment as well as across multiple public clouds will enable organizations to successfully scale their cloud environments.” - -Growth of public and private clouds and enterprises' embrace of distributed multicloud application environments will have an ongoing and significant impact on data center SDN, representing both a challenge and an opportunity for vendors, said IDC’s Casemore. - -“Agility is a key attribute of digital transformation, and enterprises will adopt architectures, infrastructures, and technologies that provide for agile deployment, provisioning, and ongoing operational management. In a datacenter networking context, the imperative of digital transformation drives adoption of extensive network automation, including SDN,” Casemore said. - -### Where does SD-WAN fit in? - -The software-defined wide area network ([SD-WAN][16]) is a natural application of SDN that extends the technology over a WAN. While the SDN architecture is typically the underpinning in a data center or campus, SD-WAN takes it a step further. - -At its most basic, SD-WAN lets companies aggregate a variety of network connections – including MPLS, 4G LTE and DSL – into a branch or network edge location and have a software management platform that can turn up new sites, prioritize traffic and set security policies. - -SD-WAN's driving principle is to simplify the way big companies turn up new links to branch offices, better manage the way those links are utilized – for data, voice or video – and potentially save money in the process. - -[SD-WAN][17] lets networks route traffic based on centrally managed roles and rules, no matter what the entry and exit points of the traffic are, and with full security. For example, if a user in a branch office is working in Office365, SD-WAN can route their traffic directly to the closest cloud data center for that app, improving network responsiveness for the user and lowering bandwidth costs for the business. - -"SD-WAN has been a promised technology for years, but in 2019 it will be a major driver in how networks are built and re-built," Anand Oswal, senior vice president of engineering in Cisco’s Enterprise Networking Business, said a Network World [article][18] earlier this year. - -It's a profoundly hot market with tons of players including [Cisco][19], VMware, Silver Peak, Riverbed, Aryaka, Fortinet, Nokia and Versa. - -IDC says the SD-WAN infrastructure market will hit $4.5 billion by 2022, growing at a more than 40% yearly clip between now and then. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3209131/what-sdn-is-and-where-its-going.html#tk.rss_all - -作者:[Michael Cooney][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://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/04/what-is-sdn_2_where-is-it-going_arrows_fork-in-the-road-100793314-large.jpg -[2]: https://www.networkworld.com/article/2202144/data-center-faq-what-is-openflow-and-why-is-it-needed.html -[3]: https://www.networkworld.com/article/3206709/lan-wan/what-s-the-difference-between-sdn-and-nfv.html -[4]: https://www.networkworld.com/newsletters/signup.html -[5]: https://www.idc.com/getdoc.jsp?containerId=US43862418 -[6]: https://www.networkworld.com/article/3192318/pluribus-recharges-expands-software-defined-network-platform.html -[7]: https://www.networkworld.com/article/3224893/what-is-edge-computing-and-how-it-s-changing-the-network.html -[8]: https://www.networkworld.com/article/3207535/what-is-iot-how-the-internet-of-things-works.html -[9]: https://www.networkworld.com/article/3202699/what-is-intent-based-networking.html -[10]: https://www.networkworld.com/article/3230457/what-is-a-firewall-perimeter-stateful-inspection-next-generation.html -[11]: https://www.networkworld.com/article/3247672/what-is-microsegmentation-how-getting-granular-improves-network-security.html -[12]: https://www.networkworld.com/article/2159885/cloud-computing-gartner-5-things-a-private-cloud-is-not.html -[13]: https://www.networkworld.com/article/3233132/what-is-hybrid-cloud-computing.html -[14]: https://www.linkedin.com/in/boblaliberte90/ -[15]: https://www.networkworld.com/article/3336075/cisco-serves-up-flexible-data-center-options.html -[16]: https://www.networkworld.com/article/3031279/sd-wan-what-it-is-and-why-you-ll-use-it-one-day.html -[17]: https://www.networkworld.com/article/3031279/sd-wan/sd-wan-what-it-is-and-why-you-ll-use-it-one-day.html -[18]: https://www.networkworld.com/article/3332027/cisco-touts-5-technologies-that-will-change-networking-in-2019.html -[19]: https://www.networkworld.com/article/3322937/what-will-be-hot-for-cisco-in-2019.html diff --git a/sources/talk/20190417 Clearing up confusion between edge and cloud.md b/sources/talk/20190417 Clearing up confusion between edge and cloud.md deleted file mode 100644 index 722051e8a7..0000000000 --- a/sources/talk/20190417 Clearing up confusion between edge and cloud.md +++ /dev/null @@ -1,69 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Clearing up confusion between edge and cloud) -[#]: via: (https://www.networkworld.com/article/3389364/clearing-up-confusion-between-edge-and-cloud.html#tk.rss_all) -[#]: author: (Anne Taylor https://www.networkworld.com/author/Anne-Taylor/) - -Clearing up confusion between edge and cloud -====== -The benefits of edge computing are not just hype; however, that doesn’t mean you should throw cloud computing initiatives to the wind. -![iStock][1] - -Edge computing and cloud computing are sometimes discussed as if they’re mutually exclusive approaches to network infrastructure. While they may function in different ways, utilizing one does not preclude the use of the other. - -Indeed, [Futurum Research][2] found that, among companies that have deployed edge projects, only 15% intend to separate these efforts from their cloud computing initiatives — largely for security or compartmentalization reasons. - -So then, what’s the difference, and how do edge and cloud work together? - -**Location, location, location** - -Moving data and processing to the cloud, as opposed to on-premises data centers, has enabled the business to move faster, more efficiently, less expensively — and in many cases, more securely. - -Yet cloud computing is not without challenges, particularly: - - * Users will abandon a graphics-heavy website if it doesn’t load quickly. So, imagine the lag for compute-heavy processing associated artificial intelligence or machine learning functions. - - * The strength of network connectivity is crucial for large data sets. As enterprises increasingly generate data, particularly with the adoption of Internet of Things (IoT), traditional cloud connections will be insufficient. - - - - -To make up for the lack of speed and connectivity with cloud, processing for mission-critical applications will need to occur closer to the data source. Maybe that’s a robot on the factory floor, digital signage at a retail store, or an MRI machine in a hospital. That’s edge computing, which reduces the distance the data must travel and thereby boosts the performance and reliability of applications and services. - -**One doesn’t supersede the other** - -That said, the benefits gained by edge computing don’t negate the need for cloud. In many cases, IT will now become a decision-maker in terms of best usage for each. For example, edge might make sense for devices running processing-power-hungry apps such as IoT, artificial intelligence, and machine learning. And cloud will work for apps where time isn’t necessarily of the essence, like inventory or big-data projects. - -> “By being able to triage the types of data processing on the edge versus that heading to the cloud, we can keep both systems running smoothly – keeping our customers and employees safe and happy,” [writes Daniel Newman][3], principal analyst for Futurum Research. - -And in reality, edge will require cloud. “To enable digital transformation, you have to build out the edge computing side and connect it with the cloud,” [Tony Antoun][4], senior vice president of edge and digital at GE Digital, told _Automation World_. “It’s a journey from the edge to the cloud and back, and the cycle keeps continuing. You need both to enrich and boost the business and take advantage of different points within this virtual lifecycle.” - -**Ensuring resiliency of cloud and edge** - -Both edge and cloud computing require careful consideration to the underlying processing power. Connectivity and availability, no matter the application, are always critical measures. - -But especially for the edge, it will be important to have a resilient architecture. Companies should focus on ensuring security, redundancy, connectivity, and remote management capabilities. - -Discover how your edge and cloud computing environments can coexist at [APC.com][5]. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3389364/clearing-up-confusion-between-edge-and-cloud.html#tk.rss_all - -作者:[Anne Taylor][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://www.networkworld.com/author/Anne-Taylor/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/04/istock-612507606-100793995-large.jpg -[2]: https://futurumresearch.com/edge-computing-from-edge-to-enterprise/ -[3]: https://futurumresearch.com/edge-computing-data-centers/ -[4]: https://www.automationworld.com/article/technologies/cloud-computing/its-not-edge-vs-cloud-its-both -[5]: https://www.apc.com/us/en/solutions/business-solutions/edge-computing.jsp diff --git a/sources/talk/20190417 Startup MemVerge combines DRAM and Optane into massive memory pool.md b/sources/talk/20190417 Startup MemVerge combines DRAM and Optane into massive memory pool.md deleted file mode 100644 index 71ddf70826..0000000000 --- a/sources/talk/20190417 Startup MemVerge combines DRAM and Optane into massive memory pool.md +++ /dev/null @@ -1,58 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Startup MemVerge combines DRAM and Optane into massive memory pool) -[#]: via: (https://www.networkworld.com/article/3389358/startup-memverge-combines-dram-and-optane-into-massive-memory-pool.html#tk.rss_all) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Startup MemVerge combines DRAM and Optane into massive memory pool -====== -MemVerge bridges two technologies that are already a bridge. -![monsitj / Getty Images][1] - -A startup called MemVerge has announced software to combine regular DRAM with Intel’s Optane DIMM persistent memory into a single clustered storage pool and without requiring any changes to applications. - -MemVerge has been working with Intel in developing this new hardware platform for close to two years. It offers what it calls a Memory-Converged Infrastructure (MCI) to allow existing apps to use Optane DC persistent memory. It's architected to integrate seamlessly with existing applications. - -**[ Read also:[Mass data fragmentation requires a storage rethink][2] ]** - -Optane memory is designed to sit between high-speed memory and [solid-state drives][3] (SSDs) and acts as a cache for the SSD, since it has speed comparable to DRAM but SSD persistence. With Intel’s new Xeon Scalable processors, this can make up to 4.5TB of memory available to a processor. - -Optane runs in one of two modes: Memory Mode and App Direct Mode. In Memory Mode, the Optane memory functions like regular memory and is not persistent. In App Direct Mode, it functions as the SSD cache but apps don’t natively support it. They need to be tweaked to function properly in Optane memory. - -As it was explained to me, apps aren’t designed for persistent storage because the data is already in memory on powerup rather than having to load it from storage. So, the app has to know memory doesn’t go away and that it does not need to shuffle data back and forth between storage and memory. Therefore, apps natively don’t work in persistent memory. - -### Why didn't Intel think of this? - -All of which really begs a question I can’t get answered, at least not immediately: Why didn’t Intel think of this when it created Optane in the first place? - -MemVerge has what it calls Distributed Memory Objects (DMO) hypervisor technology to provide a logical convergence layer to run data-intensive workloads at memory speed with guaranteed data consistency across multiple systems. This allows Optane memory to process and derive insights from the enormous amounts of data in real time. - -That’s because MemVerge’s technology makes random access as fast as sequential access. Normally, random access is slower than sequential because of all the jumping around with random access vs. reading one sequential file. But MemVerge can handle many small files as fast as it handles one large file. - -MemVerge itself is actually software, with a single API for both DRAM and Optane. It’s also available via a hyperconverged server appliance that comes with 2 Cascade Lake processors, up to 512 GB DRAM, 6TB of Optane memory, and 360TB of NVMe physical storage capacity. - -However, all of this is still vapor. MemVerge doesn’t expect to ship a beta product until at least June. - -Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3389358/startup-memverge-combines-dram-and-optane-into-massive-memory-pool.html#tk.rss_all - -作者:[Andy Patrizio][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://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/02/big_data_center_server_racks_storage_binary_analytics_by_monsitj_gettyimages-951389152_3x2-100787358-large.jpg -[2]: https://www.networkworld.com/article/3323580/mass-data-fragmentation-requires-a-storage-rethink.html -[3]: https://www.networkworld.com/article/3326058/what-is-an-ssd.html -[4]: https://www.facebook.com/NetworkWorld/ -[5]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190417 Want to the know future of IoT- Ask the developers.md b/sources/talk/20190417 Want to the know future of IoT- Ask the developers.md deleted file mode 100644 index 4f96f34b2b..0000000000 --- a/sources/talk/20190417 Want to the know future of IoT- Ask the developers.md +++ /dev/null @@ -1,119 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Want to the know future of IoT? Ask the developers!) -[#]: via: (https://www.networkworld.com/article/3389877/want-to-the-know-future-of-iot-ask-the-developers.html#tk.rss_all) -[#]: author: (Fredric Paul https://www.networkworld.com/author/Fredric-Paul/) - -Want to the know future of IoT? Ask the developers! -====== -A new survey of IoT developers reveals that connectivity, performance, and standards are growing areas of concern as IoT projects hit production. -![Avgust01 / Getty Images][1] - -It may be a cliché that software developers rule the world, but if you want to know the future of an important technology, it pays to look at what the developers are doing. With that in mind, there are some real, on-the-ground insights for the entire internet of things (IoT) community to be gained in a new [survey of more than 1,700 IoT developers][2] (pdf) conducted by the [Eclipse Foundation][3]. - -### IoT connectivity concerns - -Perhaps not surprisingly, security topped the list of concerns, easily outpacing other IoT worries. But that's where things begin to get interesting. More than a fifth (21%) of IoT developers cited connectivity as a challenge, followed by data collection and analysis (19%), performance (18%), privacy (18%), and standards (16%). - -Connectivity rose to second place after being the number three IoT concern for developers last year. Worries over security and data collection and analysis, meanwhile, actually declined slightly year over year. (Concerns over performance, privacy, and standards also increased significantly from last year.) - -**[ Learn more:[Download a PDF bundle of five essential articles about IoT in the enterprise][4] ]** - -“If you look at the list of developers’ top concerns with IoT in the survey,” said [Mike Milinkovich][5], executive director of the Eclipse Foundation via email, “I think connectivity, performance, and standards stand out — those are speaking to the fact that the IoT projects are getting real, that they’re getting out of sandboxes and into production.” - -“With connectivity in IoT,” Milinkovich continued, “everything seems straightforward until you have a sensor in a corner somewhere — narrowband or broadband — and physical constraints make it hard to connect." - -He also cited a proliferation of incompatible technologies that is driving developer concerns over connectivity. - -![][6] - -### IoT standards and interoperability - -Milinkovich also addressed one of [my personal IoT bugaboos: interoperability][7]. “Standards is a proxy for interoperability” among products from different vendors, he explained, which is an “elusive goal” in industrial IoT (IIoT). - -**[[Learn Java from beginning concepts to advanced design patterns in this comprehensive 12-part course!][8] ]** - -“IIoT is about breaking down the proprietary silos and re-tooling the infrastructure that’s been in our factories and logistics for many years using OSS standards and implementations — standard sets of protocols as opposed to vendor-specific protocols,” he said. - -That becomes a big issue when you’re deploying applications in the field and different manufacturers are using different protocols or non-standard extensions to existing protocols and the machines can’t talk to each other. - -**[ Also read:[Interoperability is the key to IoT success][7] ]** - -“This ties back to the requirement of not just having open standards, but more robust implementations of those standards in open source stacks,” Milinkovich said. “To keep maturing, the market needs not just standards, but out-of-the-box interoperability between devices.” - -“Performance is another production-grade concern,” he said. “When you’re in development, you think you know the bottlenecks, but then you discover the real-world issues when you push to production.” - -### Cloudy developments for IoT - -The survey also revealed that in some ways, IoT is very much aligned with the larger technology community. For example, IoT use of public and hybrid cloud architectures continues to grow. Amazon Web Services (AWS) (34%), Microsoft Azure (23%), and Google Cloud Platform (20%) are the leading IoT cloud providers, just as they are throughout the industry. If anything, AWS’ lead may be smaller in the IoT space than it is in other areas, though reliable cloud-provider market share figures are notoriously hard to come by. - -But Milinkovich sees industrial IoT as “a massive opportunity for hybrid cloud” because many industrial IoT users are very concerned about minimizing latency with their factory data, what he calls “their gold.” He sees factories moving towards hybrid cloud environments, leveraging “modern infrastructure technology like Kubernetes, and building around open protocols like HTTP and MQTT while getting rid of the older proprietary protocols.” - -### How IoT development is different - -In some ways, the IoT development world doesn’t seem much different than wider software development. For example, the top IoT programming languages mirror [the popularity of those languages][9] over all, with C and Java ruling the roost. (C led the way on constrained devices, while Java was the top choice for gateway and edge nodes, as well as the IoT cloud.) - -![][10] - -But Milinkovich noted that when developing for embedded or constrained devices, the programmer’s interface to a device could be through any number of esoteric hardware connectors. - -“You’re doing development using emulators and simulators, and it’s an inherently different and more complex interaction between your dev environment and the target for your application,” he said. “Sometimes hardware and software are developed in tandem, which makes it even more complicated.” - -For example, he explained, building an IoT solution may bring in web developers working on front ends using JavaScript and Angular, while backend cloud developers control cloud infrastructure and embedded developers focus on building software to run on constrained devices. - -No wonder IoT developers have so many things to worry about. - -**More about IoT:** - - * [What is the IoT? How the internet of things works][11] - * [What is edge computing and how it’s changing the network][12] - * [Most powerful Internet of Things companies][13] - * [10 Hot IoT startups to watch][14] - * [The 6 ways to make money in IoT][15] - * [What is digital twin technology? [and why it matters]][16] - * [Blockchain, service-centric networking key to IoT success][17] - * [Getting grounded in IoT networking and security][4] - * [Building IoT-ready networks must become a priority][18] - * [What is the Industrial IoT? [And why the stakes are so high]][19] - - - -Join the Network World communities on [Facebook][20] and [LinkedIn][21] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3389877/want-to-the-know-future-of-iot-ask-the-developers.html#tk.rss_all - -作者:[Fredric Paul][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://www.networkworld.com/author/Fredric-Paul/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/02/iot_internet_of_things_mobile_connections_by_avgust01_gettyimages-1055659210_2400x1600-100788447-large.jpg -[2]: https://drive.google.com/file/d/17WEobD5Etfw5JnoKC1g4IME_XCtPNGGc/view -[3]: https://www.eclipse.org/ -[4]: https://www.networkworld.com/article/3269736/internet-of-things/getting-grounded-in-iot-networking-and-security.html -[5]: https://blogs.eclipse.org/post/mike-milinkovich/measuring-industrial-iot%E2%80%99s-evolution -[6]: https://images.idgesg.net/images/article/2019/04/top-developer-concerns-2019-eclipse-foundation-100793974-large.jpg -[7]: https://www.networkworld.com/article/3204529/interoperability-is-the-key-to-iot-success.html -[8]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fjava -[9]: https://blog.newrelic.com/technology/popular-programming-languages-2018/ -[10]: https://images.idgesg.net/images/article/2019/04/top-iot-programming-languages-eclipse-foundation-100793973-large.jpg -[11]: https://www.networkworld.com/article/3207535/internet-of-things/what-is-the-iot-how-the-internet-of-things-works.html -[12]: https://www.networkworld.com/article/3224893/internet-of-things/what-is-edge-computing-and-how-it-s-changing-the-network.html -[13]: https://www.networkworld.com/article/2287045/internet-of-things/wireless-153629-10-most-powerful-internet-of-things-companies.html -[14]: https://www.networkworld.com/article/3270961/internet-of-things/10-hot-iot-startups-to-watch.html -[15]: https://www.networkworld.com/article/3279346/internet-of-things/the-6-ways-to-make-money-in-iot.html -[16]: https://www.networkworld.com/article/3280225/internet-of-things/what-is-digital-twin-technology-and-why-it-matters.html -[17]: https://www.networkworld.com/article/3276313/internet-of-things/blockchain-service-centric-networking-key-to-iot-success.html -[18]: https://www.networkworld.com/article/3276304/internet-of-things/building-iot-ready-networks-must-become-a-priority.html -[19]: https://www.networkworld.com/article/3243928/internet-of-things/what-is-the-industrial-iot-and-why-the-stakes-are-so-high.html -[20]: https://www.facebook.com/NetworkWorld/ -[21]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190418 -Fiber-in-air- 5G network research gets funding.md b/sources/talk/20190418 -Fiber-in-air- 5G network research gets funding.md deleted file mode 100644 index 4a82248cde..0000000000 --- a/sources/talk/20190418 -Fiber-in-air- 5G network research gets funding.md +++ /dev/null @@ -1,64 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: ('Fiber-in-air' 5G network research gets funding) -[#]: via: (https://www.networkworld.com/article/3389881/extreme-5g-network-research-gets-funding.html#tk.rss_all) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -'Fiber-in-air' 5G network research gets funding -====== -A consortium of tech companies and universities plan to aggressively investigate the exploitation of D-Band to develop a new variant of 5G infrastructure. -![Peshkova / Getty Images][1] - -Wireless transmission at data rates of around 45gbps could one day be commonplace, some engineers say. “Fiber-in-air” is how the latest variant of 5G infrastructure is being described. To get there, a Britain-funded consortium of chip makers, universities, and others intend to aggressively investigate the exploitation of D-Band. That part of the radio spectrum is at 151-174.8 GHz in millimeter wavelengths (mm-wave) and hasn’t been used before. - -The researchers intend to do it by riffing on a now roughly 70-year-old gun-like electron-sending device that can trace its roots back through the annals of radio history: The Traveling Wave Tube, or TWT, an electron gun-magnet-combo that was used in the development of television and still brings space images back to Earth. - -**[ Also read:[The time of 5G is almost here][2] ]** - -D-Band, the spectrum the researchers want to use, has the advantage that it’s wide, so theoretically it should be good for fast, copious data rates. The problem with it though, and the reason it hasn’t thus far been used, is that it’s subject to monkey-wrenching from atmospheric conditions such as rain, explains IQE, a semiconductor wafer and materials producer involved in the project, in a [press release][3]. The team says attenuation is fixable, though. Their solution is the now-aging TWTs. - -The group, which includes BT, Filtronic, Glasgow University, Intel, Nokia Bell Labs, Optocap, and Teledyne e2v, has secured funding of the equivalent of $1.12 million USD from the U.K.’s [Engineering and Physical Sciences Research Council (EPSRC)][4]. That’s the principal public funding body for engineering science research there. - -### Tapping the power of TWTs - -The DLINK system, as the team calls it, will use a high-power vacuum TWT with a special, newly developed tunneling diode and a modulator. Two bands of 10 GHz, each will deliver the throughput, [explains Lancaster University on its website][5]. The tubes are, in fact, special amplifiers that produce 10 Watts. That’s 10 times what an equivalent solid-state solution would likely produce at the same spot in the band, they say. Energy is basically sent from the electron beam to an electric field generated by the input signal. - -Despite TWTs being around for eons, “no D-band TWTs are available in the market.” The development of one is key to these fiber-in-air speeds, the researchers say. - -They will include “unprecedented data rate and transmission distance,” IQE writes. - -The TWT device, although used extensively in space wireless communications since its invention in the 1950s, is overlooked as a significant contributor to global communications systems, say a group of French researchers working separately from this project, who recently argue that TWTs should be given more recognition. - -TWT’s are “the unsung heroes of space exploration,” the Aix-Marseille Université researchers say in [an article on publisher Springer’s website][6]. Springer is promoting the group's 2019-published [paper][7] in the European Physical Journal H in which they delve into the history of the simple electron gun and magnet device. - -“Its role in the history of wireless communications and in the space conquest is significant, but largely ignored,” they write in their paper. - -They will be pleased to hear it maybe isn’t going away anytime soon. - -Join the Network World communities on [Facebook][8] and [LinkedIn][9] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3389881/extreme-5g-network-research-gets-funding.html#tk.rss_all - -作者:[Patrick Nelson][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://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/02/abstract_data_coding_matrix_structure_network_connections_by_peshkova_gettyimages-897683944_2400x1600-100788487-large.jpg -[2]: https://www.networkworld.com/article/3354477/mobile-world-congress-the-time-of-5g-is-almost-here.html -[3]: https://www.iqep.com/media/2019/03/iqe-partners-in-key-wireless-communications-project-for-5g-infrastructure-(1)/ -[4]: https://epsrc.ukri.org/ -[5]: http://wp.lancs.ac.uk/dlink/ -[6]: https://www.springer.com/gp/about-springer/media/research-news/all-english-research-news/traveling-wave-tubes--the-unsung-heroes-of-space-exploration/16578434 -[7]: https://link.springer.com/article/10.1140%2Fepjh%2Fe2018-90023-1 -[8]: https://www.facebook.com/NetworkWorld/ -[9]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190423 Open architecture and open source - The new wave for SD-WAN.md b/sources/talk/20190423 Open architecture and open source - The new wave for SD-WAN.md deleted file mode 100644 index 8be9e14ada..0000000000 --- a/sources/talk/20190423 Open architecture and open source - The new wave for SD-WAN.md +++ /dev/null @@ -1,186 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Open architecture and open source – The new wave for SD-WAN?) -[#]: via: (https://www.networkworld.com/article/3390151/open-architecture-and-open-source-the-new-wave-for-sd-wan.html#tk.rss_all) -[#]: author: (Matt Conran https://www.networkworld.com/author/Matt-Conran/) - -Open architecture and open source – The new wave for SD-WAN? -====== -As networking continues to evolve, you certainly don't want to break out a forklift every time new technologies are introduced. Open architecture would allow you to replace the components of a system, and give you more flexibility to control your own networking destiny. -![opensource.com \(CC BY-SA 2.0\)][1] - -I recently shared my thoughts about the [role of open source in networking][2]. I discussed two significant technological changes that we have witnessed. I call them waves, and these waves will redefine how we think about networking and security. - -The first wave signifies that networking is moving to the software so that it can run on commodity off-the-shelf hardware. The second wave is the use of open source technologies, thereby removing the barriers to entry for new product innovation and rapid market access. This is especially supported in the SD-WAN market rush. - -Seemingly, we are beginning to see less investment in hardware unless there is a specific segment that needs to be resolved. But generally, software-based platforms are preferred as they bring many advantages. It is evident that there has been a technology shift. We have moved networking from hardware to software and this shift has positive effects for users, enterprises and service providers. - -**[ Don’t miss[customer reviews of top remote access tools][3] and see [the most powerful IoT companies][4] . | Get daily insights by [signing up for Network World newsletters][5]. ]** - -### Performance (hardware vs software) - -There has always been a misconception that the hardware-based platforms are faster due to the hardware acceleration that exists in the network interface controller (NIC). However, this is a mistaken belief. Nowadays, software platforms can reach similar performance levels as compared to hardware-based platforms. - -Initially, people viewed hardware as a performance-based vehicle but today this does not hold true anymore. Even the bigger vendors are switching to software-based platforms. We are beginning to see this almost everywhere in networking. - -### SD-WAN and open source - -SD-WAN really took off quite rapidly due to the availability of open source. It enabled the vendors to leverage all the available open source components and then create their solution on top. By and large, SD-WAN vendors used the open source as the foundation of their solution and then added additional proprietary code over the baseline. - -However, even when using various open source components, there is still a lot of work left for these vendors to make it to a complete SD-WAN solution, even for reaching a baseline of centrally managed routers with flexible network architecture control, not to talk about complete feature set of SD-WAN. - -The result of the work done by these vendors is still closed products so the fact they are using open source components in their products is merely a time-to-market advantage but not a big benefit to the end users (enterprises) or service providers launching hosted services with these products. They are still limited in flexibility and vendor diversity is only achieved through a multi-vendor strategy which in practice means launching multiple silo services each based on a different SD-WAN vendor without real selection of the technologies that make each of the SD-WAN services they launch. - -I recently came across a company called [Flexiwan][6], their goal is to fundamentally change this limitation of SD-WAN by offering a full open source solution that, as they say, “includes integration points in the core of the system that allow for 3rd party logic to be integrated in an efficient way.” They call this an open architecture, which, in practical terms, means a service provider or enterprise can integrate his own application logic into the core of the SD-WAN router…or select best of breed sub-technologies or applications instead of having these dictated by the vendor himself. I believe there is the possibility of another wave of SD-WAN with a fully open source and open architecture to SD-WAN. - -This type of architecture brings many benefits to users, enterprises and service providers, especially when compared to the typical lock-in of bigger vendors, such as Cisco and VMware. - -With an open source open architecture, it’s easier to control the versions and extend more flexibility by using the software offered by different providers. It offers the ability to switch providers, not to mention being easier to install and upgrade the versions. - -### SD-WAN, open source and open architecture - -An SD-WAN solution that is an open source with open architecture provides a modular and decomposed type of SD-WAN. This enables the selection of elements to provide a solution. - -For example, enterprises and service providers can select the best-of-breed technologies from independent vendors, such as deep packet inspection (DPI), security, wide area network (WAN) optimization, session border controller (SBC), VoIP and other traffic specific optimization logic. - -Some SD-WAN vendors define an open architecture in such a way that they just have a set of APIs, for example, northbound APIs, to enable one to build management or do service chaining. This is one approach to an open architecture but in fact, it’s pretty limited since it does not bring the full benefits that an open architecture should offer. - -### Open source and the fear of hacking - -However, when I think about an open source and open architecture for SD-WAN, the first thing that comes to mind is bad actors. What about the code? If it’s an open source, the bad actor can find vulnerabilities, right? - -The community is a powerful force and will fix any vulnerability. Also with open source, the vendor, who is the one responsible for the open source component will fix the vulnerability much faster than a closed solution, where you are unaware of the vulnerability until a fix is released. - -### The SD-WAN evolution - -Before we go any further, let’s examine the history of SD-WAN and its origins, how we used to connect from the wide area network (WAN) to other branches via private or public links. - -SD-WAN offers the ability to connect your organization to a WAN. This could be connecting to the Internet or other branches, to optimally deliver applications with a good user-experience. Essentially, SD-WAN allows the organizations to design the architecture of their network dynamically by means of software. - -### In the beginning, there was IPSec - -It started with IPSec. Around two decades back, in 1995, the popular design was that of mesh architecture. As a result, we had a lot of point-to-point connections. Firstly, mesh architectures with IPSec VPNs are tiresome to manage as there is a potential for 100s of virtual private network (VPN) configurations. - -Authentically, IPSec started with two fundamental goals. The first was the tunneling protocol that would allow organizations to connect the users or other networks to their private network. This enabled the enterprises to connect to networks that they did not have a direct route to. - -The second goal of IPSec was to encrypt packets at the network layer and therefore securing the data in motion. Let’s face it: at that time, IPSec was terrible for complicated multi-site interconnectivity and high availability designs. If left to its defaults, IPSec is best suited for static designs. - -This was the reason why we had to step in the next era where additional functionality was added to IPSec. For example, IPSec had issues in supporting routing protocols using multicast. To overcome this, IPSec over generic routing encapsulation (GRE) was introduced. - -### The next era of SD-WAN - -During the journey to 2008, one could argue that the next era of WAN connectivity was when additional features were added to IPSec. At this time IPSec became known as a “Swiss army knife.” It could do many things but not anything really well. - -Back then, you could create multiple links, but it failed to select the traffic over these links other than by using simple routing. You needed to add a routing protocol. For advanced agile architectures, IPSec had to be incorporated with other higher-level protocols. - -Features were then added based on measuring the quality. Link quality features were added to analyze any delay, drops and to select alternative links for your applications. We began to add tunnels, multi-links and to select the traffic based on the priority, not just based on the routing. - -The most common way to the tunnel was to have IPSec over GRE. You have the GRE tunnel that enables you to send any protocol end-to-end by using IPSec for the encryption. All this functionality was added to achieve and create dynamic tunnels over IPSec and to optimize the IPSec tunnels. - -This was a move in the right direction, but it was still complex. It was not centrally managed and was error-prone with complex configurations that were unable to manage large deployments. IPSec had far too many limitations, so in the mid-2000s early SD-WAN vendors started cropping up. Some of these vendors enabled the enterprises to aggregate many separate digital subscriber lines (DSL) links into one faster logical link. At the same time, others added time stamps and/or sequence numbers to packets to improve the network performance and security when running over best effort (internet) links. - -International WAN connectivity was a popular focus since the cost delta between the Internet and private multiprotocol label switching (MPLS) was 10x+ different. Primarily, enterprises wanted the network performance and security of MPLS without having to pay a premium for it. - -Most of these solutions sat in-front or behind a traditional router from companies like Cisco. Evidently, just like WAN Optimization vendors, these were additional boxes/solutions that enterprises added to their networks. - -### The next era of SD-WAN, circa 2012 - -It was somewhere in 2012 that we started to see the big rush to the SD-WAN market. Vendors such as Velocloud, Viptela and a lot of the other big players in the SD-WAN market kicked off with the objective of claiming some of the early SD-WAN success and going after the edge router market with a full feature router replacement and management simplicity. - -Open source networking software and other open source components for managing the traffic enabled these early SD-WAN vendors to lay a foundation where a lot of the code base was open source. They would then “glue” it together and add their own additional features. - -Around this time, Intel was driving data plane development kit (DPDK) and advanced encryption standard (AES) instruction set, which enabled that software to run on commodity hardware. The SD-WAN solutions were delivered as closed solutions where each solution used its own set of features. The features and technologies chosen for each vendor were different and not compatible with each other. - -### The recent era of SD-WAN, circa 2017 - -A tipping point in 2017 was the gold rush for SD-WAN deployments. Everyone wanted to have SD-WAN as fast as possible. - -The SD-WAN market has taken off, as seen by 50 vendors with competing, proprietary solutions and market growth curves with a CAGR of 100%. There is a trend of big vendors like Cisco, Vmware and Oracle acquiring startups to compete in this new market. - -As a result, Cisco, which is the traditional enterprise market leader in WAN routing solutions felt threatened since its IWAN solution, which had been around since 2008, was too complex (a 900-page configuration and operations manual). Besides, its simple solution based on the Meraki acquisition was not feature-rich enough for the large enterprises. - -With their acquisition of Viptela, Cisco currently has a 13% of the market share, and for the first time in decades, it is not the market leader. The large cloud vendors, such as Google and Facebook are utilizing their own technology for routing within their very large private networks. - -At some point between 2012 and 2017, we witnessed the service providers adopting SD-WAN. This introduced the onset and movement of managed SD-WAN services. As a result, the service providers wanted to have SD-WAN on the menu for their customers. But there were many limitations in the SD-WAN market, as it was offered as a closed-box solution, giving the service providers limited control. - -At this point surfaced an expectation of change, as service providers and enterprises looked for more control. Customers can get better functionality from a multi-vendor approach than from a single vendor. - -### Don’t forget DIY SD-WAN - -Up to 60% of service providers and enterprises within the USA are now looking at DIY SD-WAN. A DIY SD-WAN solution is not where the many pieces of open source are taken and caste into something. The utmost focus is on the solution that can be self-managed but buy from a vendor. - -Today, the majority of the market is looking for managed solutions and the upper section that has the expertise wants to be equipped with more control options. - -### SD-WAN vendors attempting everything - -There is a trend that some vendors try to do everything with SD-WAN. As a result, whether you are an enterprise or a service provider, you are locked into a solution that is dictated by the SD-WAN vendor. - -The SD-WAN vendors have made the supplier choice or developed what they think is relevant. Evidently, some vendors are using stacks and software development kits (SDKs) that they purchased, for example, for deep packet inspection (DPI). - -Ultimately, you are locked into a specific solution that the vendor has chosen for you. If you are a service provider, you might disapprove of this limitation and if you are an enterprise with specific expertise, you might want to zoom in for more control. - -### All-in-one security vendors - -Many SD-WAN vendors promote themselves as security companies. But would you prefer to buy a security solution from an SD-WAN vendor or from an experienced vendor, such as Checkpoint? - -Both: enterprise and service providers want to have a choice, but with an integrated black box security solution, you don't have a choice. The more you integrate and throw into the same box, the stronger the vendor lock-in is and the weaker the flexibility. - -Essentially, with this approach, you are going for the lowest common denominator instead of the highest. Ideally, the technology of the services that you deploy on your network requires expertise. One vendor cannot be an expert in everything. - -An open architecture lies in a place for experts in different areas to join together and add their own specialist functionality. - -### Encrypted traffic - -As a matter of fact, what is not encrypted today will be encrypted tomorrow. The vendor of the application can perform intelligent things that the SD-WAN vendor cannot because they control both sides. Hence, if you can put something inside the SD-WAN edge device, they can make smart decisions even if the traffic is encrypted. - -But in the case of traditional SD-WANs, there needs to be a corporation with a content provider. However, with an open architecture, you can integrate anything, and nothing prevents the integration. A lot of traffic is encrypted and it's harder to manage encrypted traffic. However, an open architecture would allow the content providers to manage the traffic more effectively. - -### 2019 and beyond: what is an open architecture? - -Cloud providers and enterprises have discovered that 90% of the user experience and security problems arise due to the network: between where the cloud provider resides and where the end-user consumes the application. - -Therefore, both cloud providers and large enterprise with digital strategies are focusing on building their solutions based on open source stacks. Having a viable open source SD-WAN solution is the next step in the SD-WAN evolution, where it moves to involve the community in the solution. This is similar to what happens with containers and tools. - -Now, since we’re in 2019, are we going to witness a new era of SD-WAN? Are we moving to the open architecture with an open source SD-WAN solution? An open architecture should be the core of the SD-WAN infrastructure, where additional technologies are integrated inside the SD-WAN solution and not only complementary VNFs. There is an interface and native APIs that allow you to integrate logic into the router. This way, the router will be able to intercept and act according to the traffic. - -So, if I’m a service provider and have my own application, I would want to write logic that would be able to communicate with my application. Without an open architecture, the service providers can’t really offer differentiation and change the way SD-WAN makes decisions and interacts with the traffic of their applications. - -There is a list of various technologies that you need to be an expert in to be able to integrate. And each one of these technologies can be a company, for example, DPI, VoIP optimization, and network monitoring to name a few. An open architecture will allow you to pick and choose these various elements as per your requirements. - -Networking is going through a lot of changes and it will continue to evolve with the passage of time. As a result, you wouldn’t want something that forces you to break out a forklift each time new technologies are introduced. Primarily, open architecture allows you to replace the components of the system and add code or elements that handle specific traffic and applications. - -### Open source - -Open source gives you more flexibility to control your own destiny. It offers the ability to select your own services that you want to be applied to your system. It provides security in the sense that if something happens to the vendor or there is a vulnerability in the system, you know that you are backed by the community that can fix such misadventures. - -From the perspective of the business model, it makes a more flexible and cost-effective system. Besides, with open source, the total cost of ownership will also be lower. - -**This article is published as part of the IDG Contributor Network.[Want to Join?][7]** - -Join the Network World communities on [Facebook][8] and [LinkedIn][9] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3390151/open-architecture-and-open-source-the-new-wave-for-sd-wan.html#tk.rss_all - -作者:[Matt Conran][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://www.networkworld.com/author/Matt-Conran/ -[b]: https://github.com/lujun9972 -[1]: https://images.techhive.com/images/article/2017/03/6554314981_7f95641814_o-100714680-large.jpg -[2]: https://www.networkworld.com/article/3338143/the-role-of-open-source-in-networking.html -[3]: https://www.networkworld.com/article/3262145/lan-wan/customer-reviews-top-remote-access-tools.html#nww-fsb -[4]: https://www.networkworld.com/article/2287045/internet-of-things/wireless-153629-10-most-powerful-internet-of-things-companies.html#nww-fsb -[5]: https://www.networkworld.com/newsletters/signup.html#nww-fsb -[6]: https://flexiwan.com/sd-wan-open-source/ -[7]: /contributor-network/signup.html -[8]: https://www.facebook.com/NetworkWorld/ -[9]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190424 How data storage will shift to blockchain.md b/sources/talk/20190424 How data storage will shift to blockchain.md deleted file mode 100644 index b31653e0f7..0000000000 --- a/sources/talk/20190424 How data storage will shift to blockchain.md +++ /dev/null @@ -1,70 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How data storage will shift to blockchain) -[#]: via: (https://www.networkworld.com/article/3390722/how-data-storage-will-shift-to-blockchain.html#tk.rss_all) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -How data storage will shift to blockchain -====== -Move over cloud and traditional in-house enterprise data center storage, distributed storage based on blockchain may be arriving imminently. -![Cybrain / Getty Images][1] - -If you thought cloud storage was digging in its heels to become the go-to method for storing data, and at the same time grabbing share from own-server, in-house storage, you may be interested to hear that some think both are on the way out. Instead organizations will use blockchain-based storage. - -Decentralized blockchain-based file storage will be more secure, will make it harder to lose data, and will be cheaper than anything seen before, say organizations actively promoting the slant on encrypted, distributed technology. - -**[ Read also:[Why blockchain (might be) coming to an IoT implementation near you][2] ]** - -### Storing transactional data in a blockchain - -China company [FileStorm][3], which describes itself in marketing materials as the first [Interplanetary File Storage][4] (IPFS) platform on blockchain, says the key to making it all work is to only store the transactional data in blockchain. The actual data files, such as large video files, are distributed in IPFS. - -IPFS is a distributed, peer-to-peer file storage protocol. File parts come from multiple computers all at the same time, supposedly making the storage hardy. FileStorm adds blockchain on top of it for a form of transactional indexing. - -“Blockchain is designed to store transactions forever, and the data can never be altered, thus a trustworthy system is created,” says Raymond Fu, founder of FileStorm and chief product officer of MOAC, the underlying blockchain system used, in a video on the FileStorm website. - -“The blocks are used to store only small transactional data,” he says. You can’t store the large files on it. Those are distributed. Decentralized data storage platforms are needed for added decentralized blockchain, he says. - -YottaChain, another blockchain storage start-up project is coming at the whole thing from a slightly different angle. It claims its non-IPFS system is more secure partly because it performs deduplication after encryption. - -“Data is 10,000 times more secure than [traditional] centralized storage,” it says on its [website][5]. Deduplication eliminates duplicated or redundant data. - -### Disrupting data storage - -“Blockchain will disrupt data storage,” [says BlockApps separately][6]. The blockchain backend platform provider says advantages to this new generation of storage include that decentralizing data provides more security and privacy. That's due in part because it's harder to hack than traditional centralized storage. That the files are spread piecemeal among nodes, conceivably all over the world, makes it impossible for even the participating node to view the contents of the complete file, it says. - -Sharding, which is the term for the breaking apart and node-spreading of the actual data, is secured through keys. Markets can award token coins for mining, and coins can be spent to gain storage. Excess storage can even be sold. And cryptocurrencies have been started to “incentivize usage and to create a market for buying and selling decentralized storage,” BlockApps explains. - -The final parts of this new storage mix are that lost files are minimized because data can be duplicated simply — the data sets, for example, can be stored multiple times for error correction — and costs are reduced due to efficiencies. - -Square Tech (Shenzhen) Co., which makes blockchain file storage nodes, says in its marketing materials that it intends to build service centers globally to monitor its nodes in real time. Interestingly, another area the company has gotten involved in is the internet of things (IoT), and [it says][7] it wants “to unite the technical resources, capital, and human resources of the IoT industry and blockchain.” Perhaps we end up with a form of the internet of storage things? - -“The entire cloud computing industry will be disrupted by blockchain technology in just a few short years,” says BlockApps. Dropbox and Amazon “may even become overpriced and obsolete if they do not find ways to integrate with the advances.” - -Join the Network World communities on [Facebook][8] and [LinkedIn][9] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3390722/how-data-storage-will-shift-to-blockchain.html#tk.rss_all - -作者:[Patrick Nelson][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://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/02/chains_binary_data_blockchain_security_by_cybrain_gettyimages-926677890_2400x1600-100788435-large.jpg -[2]: https://www.networkworld.com/article/3386881/why-blockchain-might-be-coming-to-an-iot-implementation-near-you.html -[3]: http://filestorm.net/ -[4]: https://ipfs.io/ -[5]: https://www.yottachain.io/ -[6]: https://blockapps.net/blockchain-disrupt-data-storage/ -[7]: http://www.sikuaikeji.com/ -[8]: https://www.facebook.com/NetworkWorld/ -[9]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190424 No, drone delivery still isn-t ready for prime time.md b/sources/talk/20190424 No, drone delivery still isn-t ready for prime time.md deleted file mode 100644 index c948f458ce..0000000000 --- a/sources/talk/20190424 No, drone delivery still isn-t ready for prime time.md +++ /dev/null @@ -1,91 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (No, drone delivery still isn’t ready for prime time) -[#]: via: (https://www.networkworld.com/article/3390677/drone-delivery-not-ready-for-prime-time.html#tk.rss_all) -[#]: author: (Fredric Paul https://www.networkworld.com/author/Fredric-Paul/) - -No, drone delivery still isn’t ready for prime time -====== -Despite incremental progress and limited regulatory approval in the U.S. and Australia, drone delivery still isn’t a viable option in the vast majority of use cases. -![Sorry imKirk \(CC0\)][1] - -April has a been a big month for drone delivery. First, [Alphabet’s Wing Aviation drones got approval from Australia’s Civil Aviation Safety Authority (CASA)][2], for public deliveries in the country, and this week [Wing earned Air Carrier Certification from the U.S. Federal Aviation Administration][3]. These two regulatory wins got lot of people got very excited. Finally, the conventional wisdom exulted, drone delivery is actually becoming a reality. - -Not so fast. - -### Drone delivery still in pilot/testing mode - -Despite some small-scale successes and the first signs of regulatory acceptance, drone delivery remains firmly in the carefully controlled pilot/test phase (and yes, I know drones don’t carry pilots). - -**[ Also read:[Coffee drone delivery: Ideas this bad could kill the internet of things][4] ]** - -For example, despite getting FAA approval to begin commercial deliveries, Wing is still working up beginning delivery trials to test the technology and gather information in Virginia later this year. - -But what about that public approval from CASA for deliveries outside Canberra? That’s [a real business][5] now, right? - -Well, yes and no. - -On the “yes” side, the Aussie approval reportedly came after 18 months of tests, 70,000 flights, and more than 3,000 actual deliveries of products from local coffee shops and pharmacies. So, at least some people somewhere in the world are actually getting stuff dropped at their doors by drones. - -In the “no” column, however, goes the fact that the approval covers only about 100 suburban homes, though more are planned to be added “in the coming weeks and months.” More importantly, the approval includes strict limits on when and where the drones can go. No crossing main roads, no nighttime deliveries, and prohibitions to stay away from people. And drone-eligible customers need a safety briefing! - -### Safety briefings required for customers - -That still sounds like a small-scale test, not a full-scale commercial roll-out. And while I think drone-safety classes are probably a good idea – and the testing period apparently passed without any injuries – even the perceived _need_ for them is not be a great advertisement for rapid expansion of drone deliveries. - -Ironically, though, a bigger issue than protecting people from the drones, perhaps, is protecting the drones from people. Instructions to stay 2 to 5 meters away from folks will help, but as I’ve previously addressed, these things are already seen as attractive nuisances and vandalism targets. Further raising the stakes, many local residents were said to be annoyed at the noise created by the drones. Now imagine those contraptions buzzing right by you all loaded down with steaming hot coffee or delicious ice cream. - -And even with all those caveats, no one is talking about the key factors in making drone deliveries a viable business: How much will those deliveries cost and who will pay? For a while, the desire to explore the opportunity will drive investment, but that won’t last forever. If drone deliveries aren’t cost effective for businesses, they won’t spread very far. - -From the customer perspective, most drone delivery tests are not yet charging for the service. If and when they start carrying fees as well as purchases, the novelty factor will likely entice many shoppers to pony up to get their items airlifted directly to their homes. But that also won’t last. Drone delivery will have to demonstrate that it’s better — faster, cheaper, or more reliable — than the existing alternatives to find its niche. - -### Drone deliveries are fast, commercial roll-out will be slow - -Long term, I have no doubt that drone delivery will eventually become an accepted part of the transportation infrastructure. I don’t necessarily buy into Wing’s prediction of an AU $40 million drone delivery market in Australia coming to pass anytime soon, but real commercial operations seem inevitable. - -It’s just going to be more limited than many proponents claim, and it’s likely to take a lot longer than expected to become mainstream. For example, despite ongoing testing, [Amazon has already missed Jeff Bezos’ 2018 deadline to begin commercial drone deliveries][6], and we haven’t heard much about [Walmart’s drone delivery plans][7] lately. And while tests by a number of companies continue in locations ranging from Iceland and Finland to the U.K. and the U.S. have created a lot of interest, they have not yet translated into widespread availability. - -Apart from the issue of how much consumers really want their stuff delivered by an armada of drones (a [2016 U.S. Post Office study][8] found that 44% of respondents liked the idea, while 34% didn’t — and 37% worried that drone deliveries might not be safe), a lot has to happen before that vision becomes reality. - -At a minimum, successful implementations of full-scale commercial drone delivery will require better planning, better-thought-out business cases, more rugged and efficient drone technology, and significant advances in flight control and autonomous flight. Like drone deliveries themselves, all that stuff is coming; it just hasn’t arrived yet. - -**More about drones and the internet of things:** - - * [Drone defense -- powered by IoT -- is now a thing][9] - * [Ideas this bad could kill the Internet of Things][4] - * [10 reasons Amazon's drone delivery plan still won't fly][10] - * [Amazon’s successful drone delivery test doesn’t really prove anything][11] - - - -Join the Network World communities on [Facebook][12] and [LinkedIn][13] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3390677/drone-delivery-not-ready-for-prime-time.html#tk.rss_all - -作者:[Fredric Paul][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://www.networkworld.com/author/Fredric-Paul/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2018/07/drone_mountains_by_sorry_imkirk_cc0_via_unsplash_1200x800-100763763-large.jpg -[2]: https://medium.com/wing-aviation/wing-launches-commercial-air-delivery-service-in-canberra-5da134312474 -[3]: https://medium.com/wing-aviation/wing-becomes-first-certified-air-carrier-for-drones-in-the-us-43401883f20b -[4]: https://www.networkworld.com/article/3301277/ideas-this-bad-could-kill-the-internet-of-things.html -[5]: https://wing.com/australia/canberra -[6]: https://www.businessinsider.com/jeff-bezos-predicted-amazon-would-be-making-drone-deliveries-by-2018-2018-12?r=US&IR=T -[7]: https://www.networkworld.com/article/2999828/walmart-delivery-drone-plans.html -[8]: https://www.uspsoig.gov/sites/default/files/document-library-files/2016/RARC_WP-17-001.pdf -[9]: https://www.networkworld.com/article/3309413/drone-defense-powered-by-iot-is-now-a-thing.html -[10]: https://www.networkworld.com/article/2900317/10-reasons-amazons-drone-delivery-plan-still-wont-fly.html -[11]: https://www.networkworld.com/article/3185478/amazons-successful-drone-delivery-test-doesnt-really-prove-anything.html -[12]: https://www.facebook.com/NetworkWorld/ -[13]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190426 Profiling D-s Garbage Collection with Bpftrace.md b/sources/talk/20190426 Profiling D-s Garbage Collection with Bpftrace.md deleted file mode 100644 index ce0a408ae6..0000000000 --- a/sources/talk/20190426 Profiling D-s Garbage Collection with Bpftrace.md +++ /dev/null @@ -1,412 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Profiling D's Garbage Collection with Bpftrace) -[#]: via: (https://theartofmachinery.com/2019/04/26/bpftrace_d_gc.html) -[#]: author: (Simon Arneaud https://theartofmachinery.com) - -Profiling D's Garbage Collection with Bpftrace -====== - -Recently I’ve been playing around with using [`bpftrace`][1] to trace and profile D’s garbage collector. Here are some examples of the cool stuff that’s possible. - -### What is `bpftrace`? - -It’s a high-level debugging tool based on Linux’s eBPF. “eBPF” stands for “extended Berkely packet filter”, but that’s just a historical name and doesn’t mean much today. It’s really a virtual machine (like the [JVM][2]) that sits inside the Linux kernel and runs code in a special eBPF instruction set similar to normal machine code. Users are expected to write short programs in high-level languages (including C and others) that get compiled to eBPF and loaded into the kernel on the fly to do interesting things. - -As you might guess, eBPF is powerful for instrumenting a running kernel, but it also supports instrumenting user-space programs. - -### What you need - -First you need a Linux kernel. Sorry BSD, Mac OS and Windows users. (But some of you can use [DTrace][3].) - -Also, not just any Linux kernel will work. This stuff is relatively new, so you’ll need a modern kernel with BPF-related features enabled. You might need to use the newest (or even testing) version of a distro. Here’s how to check if your kernel meets the requirements: - -``` -$ uname -r -4.19.27-gentoo-r1sub -$ # 4.9+ recommended by bpftrace -$ zgrep CONFIG_UPROBES /proc/config.gz -CONFIG_UPROBES=y -$ # Also need -$ # CONFIG_BPF=y -$ # CONFIG_BPF_SYSCALL=y -$ # CONFIG_BPF_JIT=y -$ # CONFIG_HAVE_EBPF_JIT=y -$ # CONFIG_BPF_EVENTS=y -``` - -Of course, [you also need to install the `bpftrace` tool itself][4]. - -### `bpftrace` D “Hello World” - -Here’s a quick test you can do to make sure you’ve got everything working. First, let’s make a Hello World D binary: - -``` -$ pwd -/tmp/ -$ cat hello.d -import std.stdio; - -void main() -{ - writeln("Hello World"); -} -$ dmd hello.d -$ ./hello -Hello World -$ -``` - -Now let’s `bpftrace` it. `bpftrace` uses a high-level language that’s obviously inspired by AWK. I’ll explain enough to understand the post, but you can also check out the [`bpftrace` reference guide][5] and [one-liner tutorial][6]. The minimum you need to know is that a bpftrace program is a list of `event:name /filter predicate/ { program(); code(); }` blocks that define code snippets to be run on events. - -This time I’m only using Linux uprobes, which trigger on functions in user-space programs. The syntax is `uprobe:/path/to/binary:functionName`. One gotcha is that D “[mangles][7]” (encodes) function names before inserting them into the binary. If we want to trigger on the D code’s `main()` function, we need to use the mangled name: `_Dmain`. (By the way, `nm program | grep ' _D.*functionName'` is one quick trick for finding mangled names.) - -Run this `bpftrace` invocation in a terminal as root user: - -``` -# bpftrace -e 'uprobe:/tmp/hello:_Dmain { printf("D Hello World run with process ID %d\n", pid); }' -Attaching 1 probe... -``` - -While this is running, it’ll print a message every time the D Hello World program is executed by any user in any terminal. Press `Ctrl+C` to quit. - -All `bpftrace` code can be run directly from the command line like in the example above. But to make things easier to read from now on, I’ll make neatly formatted scripts. - -### Tracing some real code - -I’m using [D-Scanner][8], the D code analyser, as an example of a simple but non-trivial D workload. One nice thing about `bpftrace` and uprobes is that no modification of the program is needed. I’m just using a normal build of the `dscanner` tool, and using the [D runtime source code][9] as a codebase to analyse. - -Before using `bpftrace`, let’s try using [the profiling that’s built into the D GC implementation itself][10]: - -``` -$ dscanner --DRT-gcopt=profile:1 --etags -... - Number of collections: 85 - Total GC prep time: 0 milliseconds - Total mark time: 17 milliseconds - Total sweep time: 6 milliseconds - Total page recovery time: 3 milliseconds - Max Pause Time: 1 milliseconds - Grand total GC time: 28 milliseconds -GC summary: 35 MB, 85 GC 28 ms, Pauses 17 ms < 1 ms -``` - -(If you can make a custom build, you can also use [the D runtime GC API to get stats][11].) - -There’s one more gotcha when using `bpftrace` on `dscanner` to trace GC functions: the binary file we specify for the uprobe needs to be the binary file that actually contains the GC functions. That could be the D binary itself, or it could be a shared D runtime library. Try running `ldd /path/to/d_program` to list any linked shared libraries, and if the output contains `druntime`, use that full path when specifying uprobes. My `dscanner` binary doesn’t link to a shared D runtime, so I just use the full path to `dscanner`. (Running `which dscanner` gives `/usr/local/bin/dscanner` for me.) - -Anyway, all the GC functions live in a `gc` module, so their mangled names start with `_D2gc`. Here’s a `bpftrace` invocation that tallies GC function calls. For convenience, it also includes a uretprobe to automatically exit when `main()` returns. The output is sorted to make it a little easier to read. - -``` -# cat dumpgcfuncs.bt -uprobe:/usr/local/bin/dscanner:_D2gc* -{ - @[probe] = count(); -} - -uretprobe:/usr/local/bin/dscanner:_Dmain -{ - exit(); -} -# bpftrace dumpgcfuncs.bt | sort - -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC10freeNoSyncMFNbNiPvZv]: 31 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC10initializeFKCQCd11gcinterface2GCZv]: 1 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC11queryNoSyncMFNbPvZS4core6memory8BlkInfo_]: 44041 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC11removeRangeMFNbNiPvZv]: 2 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC12extendNoSyncMFNbPvmmxC8TypeInfoZm]: 251946 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC14collectNoStackMFNbZv]: 1 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC18fullCollectNoStackMFNbZv]: 1 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC4freeMFNbNiPvZv]: 31 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC5queryMFNbPvZS4core6memory8BlkInfo_]: 47704 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC6__ctorMFZCQBzQBzQBxQCiQBn]: 1 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC6callocMFNbmkxC8TypeInfoZPv]: 80 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC6extendMFNbPvmmxC8TypeInfoZm]: 251946 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC6mallocMFNbmkxC8TypeInfoZPv]: 12423 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC6qallocMFNbmkxC8TypeInfoZS4core6memory8BlkInfo_]: 948995 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC7getAttrMFNbPvZ2goFNbPSQClQClQCjQCu3GcxQBbZk]: 5615 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC7getAttrMFNbPvZk]: 5615 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC8addRangeMFNbNiPvmxC8TypeInfoZv]: 2 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC__T9runLockedS_DQCeQCeQCcQCnQBs10freeNoSyncMFNbNiPvZvS_DQDsQDsQDqQEb8freeTimelS_DQErQErQEpQFa8numFreeslTQCdZQEbMFNbNiKQCrZv]: 31 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC__T9runLockedS_DQCeQCeQCcQCnQBs11queryNoSyncMFNbPvZS4core6memory8BlkInfo_S_DQEmQEmQEkQEv9otherTimelS_DQFmQFmQFkQFv9numOtherslTQDaZQExMFNbKQDmZQDn]: 44041 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC__T9runLockedS_DQCeQCeQCcQCnQBs12extendNoSyncMFNbPvmmxC8TypeInfoZmS_DQEfQEfQEdQEo10extendTimelS_DQFhQFhQFfQFq10numExtendslTQCwTmTmTxQDaZQFdMFNbKQDrKmKmKxQDvZm]: 251946 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC__T9runLockedS_DQCeQCeQCcQCnQBs12mallocNoSyncMFNbmkKmxC8TypeInfoZPvS_DQEgQEgQEeQEp10mallocTimelS_DQFiQFiQFgQFr10numMallocslTmTkTmTxQCzZQFcMFNbKmKkKmKxQDsZQDl]: 961498 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC__T9runLockedS_DQCeQCeQCcQCnQBs18fullCollectNoStackMFNbZ2goFNbPSQEaQEaQDyQEj3GcxZmTQvZQDfMFNbKQBgZm]: 1 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC__T9runLockedS_DQCeQCeQCcQCnQBs7getAttrMFNbPvZ2goFNbPSQDqQDqQDoQDz3GcxQBbZkS_DQEoQEoQEmQEx9otherTimelS_DQFoQFoQFmQFx9numOtherslTQCyTQDlZQFdMFNbKQDoKQEbZk]: 5615 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw15LargeObjectPool10allocPagesMFNbmZm]: 5597 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw15LargeObjectPool13updateOffsetsMFNbmZv]: 10745 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw15LargeObjectPool7getInfoMFNbPvZS4core6memory8BlkInfo_]: 3844 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw15SmallObjectPool7getInfoMFNbPvZS4core6memory8BlkInfo_]: 40197 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw15SmallObjectPool9allocPageMFNbhZPSQChQChQCfQCq4List]: 15022 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw3Gcx10smallAllocMFNbhKmkZ8tryAllocMFNbZb]: 955967 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw3Gcx10smallAllocMFNbhKmkZPv]: 955912 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw3Gcx11ToScanStack4growMFNbZv]: 1 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw3Gcx11fullcollectMFNbbZm]: 85 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw3Gcx11removeRangeMFNbNiPvZv]: 1 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw3Gcx23updateCollectThresholdsMFNbZv]: 84 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw3Gcx4markMFNbNlPvQcZv]: 253 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw3Gcx5sweepMFNbZm]: 84 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw3Gcx7markAllMFNbbZ14__foreachbody3MFNbKSQCm11gcinterface5RangeZi]: 85 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw3Gcx7markAllMFNbbZv]: 85 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw3Gcx7newPoolMFNbmbZPSQBtQBtQBrQCc4Pool]: 6 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw3Gcx7recoverMFNbZm]: 84 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw3Gcx8addRangeMFNbNiPvQcxC8TypeInfoZv]: 2 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw3Gcx8bigAllocMFNbmKmkxC8TypeInfoZ15tryAllocNewPoolMFNbZb]: 5 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw3Gcx8bigAllocMFNbmKmkxC8TypeInfoZ8tryAllocMFNbZb]: 5616 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw3Gcx8bigAllocMFNbmKmkxC8TypeInfoZPv]: 5586 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw3Gcx8isMarkedMFNbNlPvZi]: 635 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw3Gcx9allocPageMFNbhZPSQBuQBuQBsQCd4List]: 15024 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw4Pool10initializeMFNbmbZv]: 6 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw4Pool12freePageBitsMFNbmKxG4mZv]: 16439 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl5protoQo7ProtoGC4termMFZv]: 1 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl5protoQo7ProtoGC6qallocMFNbmkxC8TypeInfoZS4core6memory8BlkInfo_]: 1 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl5protoQo7ProtoGC8addRangeMFNbNiPvmxC8TypeInfoZv]: 1 -@[uprobe:/usr/local/bin/dscanner:_D2gc4impl6manualQp8ManualGC10initializeFKCQBp11gcinterface2GCZv]: 1 -@[uprobe:/usr/local/bin/dscanner:_D2gc9pooltable__T9PoolTableTSQBc4impl12conservativeQBy4PoolZQBr6insertMFNbNiPQBxZb]: 6 -@[uprobe:/usr/local/bin/dscanner:_D2gc9pooltable__T9PoolTableTSQBc4impl12conservativeQBy4PoolZQBr8findPoolMFNaNbNiPvZPQCe]: 302268 -@[uprobe:/usr/local/bin/dscanner:_D2gc9pooltable__T9PoolTableTSQBc4impl12conservativeQBy4PoolZQBr8minimizeMFNaNbNjZAPQCd]: 30 -Attaching 231 probes... -``` - -All these functions are in [`src/gc/`][12], and most of the interesting ones here are in [`src/gc/impl/conservative/`][13]. There are 85 calls to `_D2gc4impl12conservativeQw3Gcx11fullcollectMFNbbZm`, which [`ddemangle`][14] translates to `nothrow ulong gc.impl.conservative.gc.Gcx.fullcollect(bool)`. That matches up with the report from `--DRT-gcopt=profile:1`. - -The heart of the `bpftrace` program is `@[probe] = count();`. `@` prefixes a global variable, in this case a variable with an empty name (allowed by `bpftrace`). We’re using the variable as a map (like an associative array in D), and indexing it with `probe`, a built-in variable containing the name of the uprobe that was triggered. The tally is kept using the magic `count()` function. - -### Garbage collection timings - -How about something more interesting, like generating a profile of collection timings? This time, to get more data, I won’t make `bpftrace` exit as soon as the `dscanner` exits. I’ll keep it running and run `dscanner` 100 times before quitting `bpftrace` with `Ctrl+C`: - -``` -# cat gcprofile.bt -uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw3Gcx11fullcollectMFNbbZm -{ - @t = nsecs; -} - -uretprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw3Gcx11fullcollectMFNbbZm / @t / -{ - @gc_times = hist(nsecs - @t); -} -# bpftrace gcprofile.bt -Attaching 2 probes... -^C - -@gc_times: -[64K, 128K) 138 |@ | -[128K, 256K) 1367 |@@@@@@@@@@ | -[256K, 512K) 6687 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -[512K, 1M) 7 | | -[1M, 2M) 301 |@@ | -``` - -Et voila! A log-scale histogram of the `nsecs` timestamp difference between entering and exiting `fullcollect()`. The times are in nanoseconds, so we see that most collections are taking less than half a millisecond, but we have tail cases that take 1-2ms. - -### Function arguments - -`bpftrace` provides `arg0`, `arg1`, `arg2`, etc. built-in variables for accessing the arguments to a traced function. There are a couple of complications with using them with D code, however. - -The first is that (at the binary level) `dmd` makes `extern(D)` functions (i.e., normal D functions) take arguments in the reverse order of `extern(C)` functions (that `bpftrace` is expecting). Suppose you have a simple three-argument function. If it’s using the C calling convention, `bpftrace` will recognise the first argument as `arg0`. If it’s using the D calling convention, however, it’ll be picked up as `arg2`. - -``` -extern(C) void cfunc(int arg0, int arg1, int arg2) -{ - // ... -} - -// (extern(D) is the default) -extern(D) void dfunc(int arg2, int arg1, int arg0) -{ - // ... -} -``` - -If you look at [the D ABI spec][15], you’ll notice that (just like in C++) there can be a couple of hidden arguments if the function is more complex. If `dfunc` above returned a large struct, there can be an extra hidden argument for implementing [copy elision][16], which means the first argument would actually be `arg3`, and `arg0` would be the hidden argument. If `dfunc` were also a member function, it would have a hidden `this` argument, which would bump up the first argument to `arg4`. - -To get the hang of this, you might need to experiment with tracing function calls with known arguments. - -### Allocation sizes - -Let’s get a histogram of the memory allocation request sizes. Looking at the list of GC functions traced earlier, and comparing it with the GC source code, it looks like we need to trace these functions and grab the `size` argument: - -``` -class ConservativeGC : GC -{ - // ... - void *malloc(size_t size, uint bits, const TypeInfo ti) nothrow; - void *calloc(size_t size, uint bits, const TypeInfo ti) nothrow; - BlkInfo qalloc( size_t size, uint bits, const TypeInfo ti) nothrow; - // ... -} -``` - -As class member functions, they have a hidden `this` argument as well. The last one, `qalloc()`, returns a struct, so it also has a hidden argument for copy elision. So `size` is `arg3` for the first two functions, and `arg4` for `qalloc()`. Time to run a trace: - -``` -# cat allocsizeprofile.bt -uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC6mallocMFNbmkxC8TypeInfoZPv, -uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC6callocMFNbmkxC8TypeInfoZPv -{ - @ = hist(arg3); -} - -uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC6qallocMFNbmkxC8TypeInfoZS4core6memory8BlkInfo_ -{ - @ = hist(arg4); -} - -uretprobe:/usr/local/bin/dscanner:_Dmain -{ - exit(); -} -# bpftrace allocsizeprofile.bt -Attaching 4 probes... -@: -[2, 4) 2489 | | -[4, 8) 9324 |@ | -[8, 16) 46527 |@@@@@ | -[16, 32) 206324 |@@@@@@@@@@@@@@@@@@@@@@@ | -[32, 64) 448020 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| -[64, 128) 147053 |@@@@@@@@@@@@@@@@@ | -[128, 256) 88072 |@@@@@@@@@@ | -[256, 512) 2519 | | -[512, 1K) 1830 | | -[1K, 2K) 3749 | | -[2K, 4K) 1668 | | -[4K, 8K) 256 | | -[8K, 16K) 2533 | | -[16K, 32K) 312 | | -[32K, 64K) 239 | | -[64K, 128K) 209 | | -[128K, 256K) 164 | | -[256K, 512K) 124 | | -[512K, 1M) 48 | | -[1M, 2M) 30 | | -[2M, 4M) 7 | | -[4M, 8M) 1 | | -[8M, 16M) 2 | | -``` - -So, we have a lot of small allocations, with a very long tail of larger allocations. Remember, size is on a log scale, so that long tail represents a very skewed distribution. - -### Small allocation hotspots - -Now for something more complex. Suppose we’re profiling our code and looking for low-hanging fruit for reducing the number of memory allocations. Code that makes a lot of small allocations tends to be a good candidate for this kind of refactoring. `bpftrace` lets us grab stack traces, which can be used to see what part of the main program caused an allocation. - -As of writing, there’s one little complication because of a limitation of `bpftrace`’s stack trace handling: it can only show meaningful function symbol names (as opposed to raw memory addresses) if `bpftrace` quits while the target program is still running. There’s [an open bug report for improving this behaviour][17], but in the meantime I just made sure `dscanner` took a long time, and that I shut down `bpftrace` first. - -Here’s how to grab the top three stack traces that lead to small (<16B) memory allocations with `qalloc()`: - -``` -# cat smallallocs.bt -uprobe:/usr/local/bin/dscanner:_D2gc4impl12conservativeQw14ConservativeGC6qallocMFNbmkxC8TypeInfoZS4core6memory8BlkInfo_ -{ - if (arg4 < 16) - { - @[ustack] = count(); - } -} - -END -{ - print(@, 3); - clear(@); -} -# bpftrace smallallocs.bt -Attaching 2 probes... -^C@[ - _D2gc4impl12conservativeQw14ConservativeGC6qallocMFNbmkxC8TypeInfoZS4core6memory8BlkInfo_+0 - _D2rt8lifetime12__arrayAllocFNaNbmxC8TypeInfoxQlZS4core6memory8BlkInfo_+236 - _d_arraysetlengthT+248 - _D8dscanner8analysis25label_var_same_name_check17LabelVarNameCheck9pushScopeMFZv+29 - _D8dscanner8analysis25label_var_same_name_check17LabelVarNameCheck9__mixin175visitMFxC6dparse3ast6ModuleZv+21 - _D8dscanner8analysis3run7analyzeFAyaxC6dparse3ast6ModulexSQCeQBy6config20StaticAnalysisConfigKS7dsymbol11modulecache11ModuleCacheAxS3std12experimental5lexer__T14TokenStructureThVQFpa305_0a20202020737472696e6720636f6d6d656e743b0a20202020737472696e6720747261696c696e67436f6d6d656e743b0a0a20202020696e74206f70436d702873697a655f7420692920636f6e73742070757265206e6f7468726f77204073616665207b0a202020202020202069662028696e646578203c2069292072657475726e202d313b0a202020202020202069662028696e646578203e2069292072657475726e20313b0a202020202020202072657475726e20303b0a202020207d0a0a20202020696e74206f70436d702872656620636f6e737420747970656f66287468697329206f746865722920636f6e73742070757265206e6f7468726f77204073616665207b0a202020202020202072657475726e206f70436d70286f746865722e696e646578293b0a202020207d0aZQYobZCQZv9container6rbtree__T12RedBlackTreeTSQBGiQBGd4base7MessageVQBFza62_20612e6c696e65203c20622e6c696e65207c7c2028612e6c696e65203d3d20622e6c696e6520262620612e636f6c756d6e203c20622e636f6c756d6e2920Vbi1ZQGt+11343 - _D8dscanner8analysis3run7analyzeFAAyaxSQBlQBf6config20StaticAnalysisConfigQBoKS6dparse5lexer11StringCacheKS7dsymbol11modulecache11ModuleCachebZb+337 - _Dmain+3618 - _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv+40 - _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ7tryExecMFMDFZvZv+32 - _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZv+139 - _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ7tryExecMFMDFZvZv+32 - _d_run_main+463 - main+16 - __libc_start_main+235 - 0x41fd89415541f689 -]: 450 -@[ - _D2gc4impl12conservativeQw14ConservativeGC6qallocMFNbmkxC8TypeInfoZS4core6memory8BlkInfo_+0 - _D2rt8lifetime12__arrayAllocFNaNbmxC8TypeInfoxQlZS4core6memory8BlkInfo_+236 - _d_arrayappendcTX+1944 - _D8dscanner8analysis10unmodified16UnmodifiedFinder9pushScopeMFZv+61 - _D8dscanner8analysis10unmodified16UnmodifiedFinder5visitMFxC6dparse3ast6ModuleZv+21 - _D8dscanner8analysis3run7analyzeFAyaxC6dparse3ast6ModulexSQCeQBy6config20StaticAnalysisConfigKS7dsymbol11modulecache11ModuleCacheAxS3std12experimental5lexer__T14TokenStructureThVQFpa305_0a20202020737472696e6720636f6d6d656e743b0a20202020737472696e6720747261696c696e67436f6d6d656e743b0a0a20202020696e74206f70436d702873697a655f7420692920636f6e73742070757265206e6f7468726f77204073616665207b0a202020202020202069662028696e646578203c2069292072657475726e202d313b0a202020202020202069662028696e646578203e2069292072657475726e20313b0a202020202020202072657475726e20303b0a202020207d0a0a20202020696e74206f70436d702872656620636f6e737420747970656f66287468697329206f746865722920636f6e73742070757265206e6f7468726f77204073616665207b0a202020202020202072657475726e206f70436d70286f746865722e696e646578293b0a202020207d0aZQYobZCQZv9container6rbtree__T12RedBlackTreeTSQBGiQBGd4base7MessageVQBFza62_20612e6c696e65203c20622e6c696e65207c7c2028612e6c696e65203d3d20622e6c696e6520262620612e636f6c756d6e203c20622e636f6c756d6e2920Vbi1ZQGt+11343 - _D8dscanner8analysis3run7analyzeFAAyaxSQBlQBf6config20StaticAnalysisConfigQBoKS6dparse5lexer11StringCacheKS7dsymbol11modulecache11ModuleCachebZb+337 - _Dmain+3618 - _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv+40 - _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ7tryExecMFMDFZvZv+32 - _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZv+139 - _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ7tryExecMFMDFZvZv+32 - _d_run_main+463 - main+16 - __libc_start_main+235 - 0x41fd89415541f689 -]: 450 -@[ - _D2gc4impl12conservativeQw14ConservativeGC6qallocMFNbmkxC8TypeInfoZS4core6memory8BlkInfo_+0 - _D2rt8lifetime12__arrayAllocFNaNbmxC8TypeInfoxQlZS4core6memory8BlkInfo_+236 - _d_arrayappendcTX+1944 - _D8dscanner8analysis3run7analyzeFAyaxC6dparse3ast6ModulexSQCeQBy6config20StaticAnalysisConfigKS7dsymbol11modulecache11ModuleCacheAxS3std12experimental5lexer__T14TokenStructureThVQFpa305_0a20202020737472696e6720636f6d6d656e743b0a20202020737472696e6720747261696c696e67436f6d6d656e743b0a0a20202020696e74206f70436d702873697a655f7420692920636f6e73742070757265206e6f7468726f77204073616665207b0a202020202020202069662028696e646578203c2069292072657475726e202d313b0a202020202020202069662028696e646578203e2069292072657475726e20313b0a202020202020202072657475726e20303b0a202020207d0a0a20202020696e74206f70436d702872656620636f6e737420747970656f66287468697329206f746865722920636f6e73742070757265206e6f7468726f77204073616665207b0a202020202020202072657475726e206f70436d70286f746865722e696e646578293b0a202020207d0aZQYobZCQZv9container6rbtree__T12RedBlackTreeTSQBGiQBGd4base7MessageVQBFza62_20612e6c696e65203c20622e6c696e65207c7c2028612e6c696e65203d3d20622e6c696e6520262620612e636f6c756d6e203c20622e636f6c756d6e2920Vbi1ZQGt+680 - _D8dscanner8analysis3run7analyzeFAAyaxSQBlQBf6config20StaticAnalysisConfigQBoKS6dparse5lexer11StringCacheKS7dsymbol11modulecache11ModuleCachebZb+337 - _Dmain+3618 - _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv+40 - _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ7tryExecMFMDFZvZv+32 - _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZv+139 - _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ7tryExecMFMDFZvZv+32 - _d_run_main+463 - main+16 - __libc_start_main+235 - 0x41fd89415541f689 -]: 450 -``` - -It looks like a lot of the small allocations are due to a red-black tree in `ModuleCache`. - -### What’s next? - -I think these examples already show that `bpftrace` is a pretty powerful tool. There’s a lot more that can done, and I highly recommended reading [Brendan Gregg’s eBPF tutorials][18]. - -I used uprobes to trace arbitrary functions in the D runtime. The pro of this is the freedom to do anything, but the cons are that I had to refer to the D runtime source code and manually deal with the D ABI. There’s also no guarantee that a script I write today will work with future versions of the runtime. Linux also supports making well-defined tracepoints in user code using a feature called [USDT][19]. That should let D code export stable tracepoints that can be used without worrying about the D ABI. I might do more experiments in future. - --------------------------------------------------------------------------------- - -via: https://theartofmachinery.com/2019/04/26/bpftrace_d_gc.html - -作者:[Simon Arneaud][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://theartofmachinery.com -[b]: https://github.com/lujun9972 -[1]: https://github.com/iovisor/bpftrace -[2]: https://en.wikipedia.org/wiki/Java_virtual_machine -[3]: http://dtrace.org/blogs/about/ -[4]: https://github.com/iovisor/bpftrace/blob/master/INSTALL.md -[5]: https://github.com/iovisor/bpftrace/blob/master/docs/reference_guide.md -[6]: https://github.com/iovisor/bpftrace/blob/master/docs/tutorial_one_liners.md -[7]: https://dlang.org/spec/abi.html#name_mangling -[8]: https://github.com/dlang-community/D-Scanner -[9]: https://github.com/dlang/druntime/ -[10]: https://dlang.org/spec/garbage.html#gc_config -[11]: https://dlang.org/phobos/core_memory.html#.GC.stats -[12]: https://github.com/dlang/druntime/tree/v2.081.1/src/gc -[13]: https://github.com/dlang/druntime/tree/v2.081.1/src/gc/impl/conservative -[14]: https://github.com/dlang/tools -[15]: https://dlang.org/spec/abi.html#parameters -[16]: https://en.wikipedia.org/wiki/Copy_elision -[17]: https://github.com/iovisor/bpftrace/issues/246 -[18]: http://www.brendangregg.com/blog/2019-01-01/learn-ebpf-tracing.html -[19]: https://lwn.net/Articles/753601/ diff --git a/sources/talk/20190430 Measuring the edge- Finding success with edge deployments.md b/sources/talk/20190430 Measuring the edge- Finding success with edge deployments.md deleted file mode 100644 index abc1d7dd0c..0000000000 --- a/sources/talk/20190430 Measuring the edge- Finding success with edge deployments.md +++ /dev/null @@ -1,73 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Measuring the edge: Finding success with edge deployments) -[#]: via: (https://www.networkworld.com/article/3391570/measuring-the-edge-finding-success-with-edge-deployments.html#tk.rss_all) -[#]: author: (Anne Taylor https://www.networkworld.com/author/Anne-Taylor/) - -Measuring the edge: Finding success with edge deployments -====== -To make the most of edge computing investments, it’s important to first understand objectives and expectations. -![iStock][1] - -Edge computing deployments are well underway as companies seek to better process the wealth of data being generated, for example, by Internet of Things (IoT) devices. - -So, what are the results? Plus, how can you ensure success with your own edge projects? - -**Measurements of success** - -The [use cases for edge computing deployments][2] vary widely, as do the business drivers and, ultimately, the benefits. - -Whether they’re seeking improved network or application performance, real-time data analytics, a better customer experience, or other efficiencies, enterprises are accomplishing their goals. Based on two surveys — one by [_Automation World_][3] and another by [Futurum Research][4] — respondents have reported: - - * Decreased network downtime - * Increased productivity - * Increased profitability/reduced costs - * Improved business processes - - - -Basically, success metrics can be bucketed into two categories: direct value propositions and cost reductions. In the former, companies are seeking results that measure revenue generation — such as improved digital experiences with customers and users. In the latter, metrics that prove the value of digitizing processes — like speed, quality, and efficacy — will demonstrate success with edge deployments. - -**Goalposts for success with edge** - -Edge computing deployments are underway. But before diving in, understand what’s driving these projects. - -According to the Futurum Research, 29% of respondents are currently investing in edge infrastructure, and 62% expect to adopt within the year. For these companies, the driving force has been the business, which expects operational efficiencies from these investments. Beyond that, there’s an expectation down the road to better align with IoT strategy. - -That being the case, it’s worth considering your business case before diving into edge. Ask: Are you seeking innovation and revenue generation amid digital transformation efforts? Or is your company looking for a low-risk, “test the waters” type of investment in edge? - -Next up, what type of edge project makes sense for your environment? Edge data centers fall into three categories: local devices for a specific purpose (e.g., an appliance for security systems or a gateway for cloud-to-premises storage); small local data centers (typically one to 10 racks for storage and processing); and regional data centers (10+ racks for large office spaces). - -Then, think about these best practices before talking with vendors: - - * Management: Especially for unmanned edge data centers, remote management is critical. You’ll need predictive alerts and a service contract that enables IT to be just as resilient as a regular data center. - * Security:Much of today’s conversation has been around data security. That starts with physical protection. Too many data breaches — including theft and employee error — are caused by physical access to IT assets. - * Standardization: There is no need to reinvent the wheel when it comes to edge data center deployments. Using standard components makes it easier for the internal IT team to deploy, manage, and maintain. - - - -Finally, consider the ecosystem. The end-to-end nature of edge requires not just technology integration, but also that all third parties work well together. A good ecosystem connects customers, partners, and vendors. - -Get further information to kickstart your edge computing environment at [APC.com][5]. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3391570/measuring-the-edge-finding-success-with-edge-deployments.html#tk.rss_all - -作者:[Anne Taylor][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://www.networkworld.com/author/Anne-Taylor/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/04/istock-912928582-100795093-large.jpg -[2]: https://www.networkworld.com/article/3391016/edge-computing-is-in-most-industries-future.html -[3]: https://www.automationworld.com/article/technologies/cloud-computing/its-not-edge-vs-cloud-its-both -[4]: https://futurumresearch.com/edge-computing-from-edge-to-enterprise/ -[5]: https://www.apc.com/us/en/solutions/business-solutions/edge-computing.jsp diff --git a/sources/talk/20190501 Yet another killer cloud quarter puts pressure on data centers.md b/sources/talk/20190501 Yet another killer cloud quarter puts pressure on data centers.md deleted file mode 100644 index d65fe448b4..0000000000 --- a/sources/talk/20190501 Yet another killer cloud quarter puts pressure on data centers.md +++ /dev/null @@ -1,92 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Yet another killer cloud quarter puts pressure on data centers) -[#]: via: (https://www.networkworld.com/article/3391465/another-strong-cloud-computing-quarter-puts-pressure-on-data-centers.html#tk.rss_all) -[#]: author: (Fredric Paul https://www.networkworld.com/author/Fredric-Paul/) - -Yet another killer cloud quarter puts pressure on data centers -====== -Continued strong growth from Amazon Web Services, Microsoft Azure, and Google Cloud Platform signals even more enterprises are moving to the cloud. -![Getty Images][1] - -You’d almost think I’d get tired of [writing this story over and over and over][2]… but the ongoing growth of cloud computing is too big a trend to ignore. - -Critically, the impressive growth numbers of the three leading cloud infrastructure providers—Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform—doesn’t occur in a vacuum. It’s not just about new workloads being run in the cloud; it’s also about more and more enterprises moving existing workloads to the cloud from on-premises data centers. - -**[ Also read:[Is the cloud already killing the enterprise data center?][3] ]** - -To put these trends in perspective, let’s take a look at the results for all three vendors. - -### AWS keeps on trucking - -AWS remains by far the dominant player in the cloud infrastructure market, with a massive [$7.7 billion in quarterly sales][4] (an annual run rate of a whopping $30.8 billion). Even more remarkable, somehow AWS continues to grow revenue by almost 42% year over year. Oh, and that kind of growth is not just unique _this_ quarter; the unit has topped 40% revenue growth _every_ quarter since the beginning of 2017. (To be fair, the first quarter of 2018 saw an amazing 49% revenue growth.) - -And unlike many fast-growing tech companies, that incredible expansion isn’t being fueled by equally impressive losses. AWS earned a healthy $2.2 billion operating profit in the quarter, up 59% from the same period last year. One reason? [The company told analysts][5] it made big data center investments in 2016 and 2017, so it hasn’t had to do so more recently (it expects to boost spending on data centers later this year). The company [reportedly][6] described AWS revenue growth as “lumpy,” but it seems to me that the numbers merely vary between huge and even bigger. - -### Microsoft Azure grows even faster than AWS - -Sure, 41% growth is good, but [Microsoft’s quarterly Azure revenue][7] almost doubled that, jumping 73% year over year (fairly consistent with the previous—also stellar—quarter), helping the company exceed estimates for both sales and revenue and sparking a brief shining moment of a $1 billion valuation for the company. Microsoft doesn’t break out Azure’s sales and revenue, but [the commercial cloud business, which includes Azure as well as other cloud businesses, grew 41% in the quarter to $9.6 billion][8]. - -It’s impossible to tell exactly how big Azure is, but it appears to be growing faster than AWS, though off a much smaller base. While some analysts reportedly say Azure is growing faster than AWS was at a similar stage in its development, that may not bear much significance because the addressable cloud market is now far larger than it used be. - -According to [the New York Times][9], like AWS, Microsoft is also now reaping the benefits of heavy investments in new data centers around the world. And the Times credits Microsoft with “particular success” in [hybrid cloud installations][10], helping ease concerns among some slow-to-change enterprise about full-scale cloud adoption. - -**[ Also read:[Why hybrid cloud will turn out to be a transition strategy][11] ]** - -### Can Google Cloud Platform keep up? - -Even as the [overall quarterly numbers for Alphabet][12]—Google’s parent company—didn’t meet analysts’ revenue expectations (which sent the stock tumbling), Google Cloud Platform seems to have continued its strong growth. Alphabet doesn’t break out its cloud unit, but sales in Alphabet’s “Other Revenue” category—which includes cloud computing along with hardware—jumped 25% compared to the same period last year, hitting $5.4 billion. - -More telling, perhaps, Alphabet Chief Financial Officer Ruth Porat [reportedly][13] told analysts that "Google Cloud Platform remains one of the fastest growing businesses in Alphabet." [Porat also mentioned][14] that hiring in the cloud unit was so aggressive that it drove a 20% jump in Alphabet’s operating expenses! - -### Companies keep going cloud - -But the raw numbers tell only part of the story. All that growth means existing customers are spending more, but also that ever-increasing numbers of enterprises are abandoning their hassle and expense of running their data centers in favor of buying what they need from the cloud. - -**[ Also read:[Large enterprises abandon data centers for the cloud][15] ]** - -The New York Times quotes Amy Hood, Microsoft’s chief financial officer, explaining that, “You don’t really get revenue growth unless you have a usage growth, so this is customers deploying and using Azure.” And the Times notes that Microsoft has signed big deals with companies such as [Walgreens Boots Alliance][16] that combined Azure with other Microsoft cloud-based services. - -This growth is true in existing markets, and also includes new markets. For example, AWS just opened new regions in [Indonesia][17] and [Hong Kong][18]. - -**[ Now read:[After virtualization and cloud, what's left on premises?][19] ]** - -Join the Network World communities on [Facebook][20] and [LinkedIn][21] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3391465/another-strong-cloud-computing-quarter-puts-pressure-on-data-centers.html#tk.rss_all - -作者:[Fredric Paul][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://www.networkworld.com/author/Fredric-Paul/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/02/cloud_comput_connect_blue-100787048-large.jpg -[2]: https://www.networkworld.com/article/3292935/cloud-computing-just-had-another-kick-ass-quarter.html -[3]: https://www.networkworld.com/article/3268384/is-the-cloud-already-killing-the-enterprise-data-center.html -[4]: https://www.latimes.com/business/la-fi-amazon-earnings-cloud-computing-aws-20190425-story.html -[5]: https://www.businessinsider.com/amazon-q1-2019-earnings-aws-advertising-retail-prime-2019-4 -[6]: https://www.computerweekly.com/news/252462310/Amazon-cautions-against-reading-too-much-into-slowdown-in-AWS-revenue-growth-rate -[7]: https://www.microsoft.com/en-us/Investor/earnings/FY-2019-Q3/press-release-webcast -[8]: https://www.cnbc.com/2019/04/24/microsoft-q3-2019-earnings.html -[9]: https://www.nytimes.com/2019/04/24/technology/microsoft-earnings.html -[10]: https://www.networkworld.com/article/3268448/what-is-hybrid-cloud-really-and-whats-the-best-strategy.html -[11]: https://www.networkworld.com/article/3238466/why-hybrid-cloud-will-turn-out-to-be-a-transition-strategy.html -[12]: https://abc.xyz/investor/static/pdf/2019Q1_alphabet_earnings_release.pdf?cache=8ac2b86 -[13]: https://www.forbes.com/sites/jilliandonfro/2019/04/29/google-alphabet-q1-earnings-2019/#52f5c8c733be -[14]: https://www.youtube.com/watch?v=31_KHdse_0Y -[15]: https://www.networkworld.com/article/3240587/large-enterprises-abandon-data-centers-for-the-cloud.html -[16]: https://www.walgreensbootsalliance.com -[17]: https://www.businesswire.com/news/home/20190403005931/en/AWS-Open-New-Region-Indonesia -[18]: https://www.apnews.com/Business%20Wire/57eaf4cb603e46e6b05b634d9751699b -[19]: https://https//www.networkworld.com/article/3232626/virtualization/extreme-virtualization-impact-on-enterprises.html -[20]: https://www.facebook.com/NetworkWorld/ -[21]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190502 Revolutionary data compression technique could slash compute costs.md b/sources/talk/20190502 Revolutionary data compression technique could slash compute costs.md deleted file mode 100644 index 00316946f6..0000000000 --- a/sources/talk/20190502 Revolutionary data compression technique could slash compute costs.md +++ /dev/null @@ -1,65 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Revolutionary data compression technique could slash compute costs) -[#]: via: (https://www.networkworld.com/article/3392716/revolutionary-data-compression-technique-could-slash-compute-costs.html#tk.rss_all) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -Revolutionary data compression technique could slash compute costs -====== -A new form of data compression, called Zippads, will create faster computer programs that could drastically lower the costs of computing. -![Kevin Stanchfield \(CC BY 2.0\)][1] - -There’s a major problem with today’s money-saving memory compression used for storing more data in less space. The issue is that computers store and run memory in predetermined blocks, yet many modern programs function and play out in variable chunks. - -The way it’s currently done is actually, highly inefficient. That’s because the compressed programs, which use objects rather than evenly configured slabs of data, don’t match the space used to store and run them, explain scientists working on a revolutionary new compression system called Zippads. - -The answer, they say—and something that if it works would drastically reduce those inefficiencies, speed things up, and importantly, reduce compute costs—is to compress the varied objects and not the cache lines, as is the case now. Cache lines are fixed-size blocks of memory that are transferred to memory cache. - -**[ Read also:[How to deal with backup when you switch to hyperconverged infrastructure][2] ]** - -“Objects, not cache lines, are the natural unit of compression,” writes Po-An Tsai and Daniel Sanchez in their MIT Computer Science and Artificial Intelligence Laboratory (CSAIL) [paper][3] (pdf). - -They say object-based programs — of the kind used now everyday, such as Python — should be compressed based on their programmed object size, not on some fixed value created by traditional or even state-of-the art cached methods. - -The alternative, too, isn’t to recklessly abandon object-oriented programming just because it’s inefficient at using compression. One must adapt compression to that now common object-using code. - -The scientists claim their new system can increase the compression ratio 1.63 times and improve performance by 17%. It’s the “first compressed memory hierarchy designed for object-based applications,” they say. - -### The benefits of compression - -Compression is a favored technique for making computers more efficient. The main advantage over simply adding more memory is that costs are lowered significantly—you don’t need to add increasing physical main memory hardware because you’re cramming more data into existing. - -However, to date, hardware memory compression has been best suited to more old-school large blocks of data, not the “random, fine-grained memory accesses,” the team explains. It’s not great at accessing small pieces of data, such as words, for example. - -### How the Zippads compression system works - -In Zippads, as the new system is called, stored object hierarchical levels (called “pads”) are located on-chip and are directly accessed. The different levels (pads) have changing speed grades, with newly referenced objects being placed in the fastest pad. As a pad fills up, it begins the process of evicting older, not-so-active objects and ultimately recycles the unused code that is taking up desirable fast space and isn’t being used. Cleverly, at the fast level, the code parts aren’t even compressed, but as they prove their non-usefulness they get kicked down to compressed, slow-to-access, lower-importance pads—and are brought back up as necessary. - -Zippads would “see computers that can run much faster or can run many more apps at the same speeds,” an[ MIT News][4] article says. “Each application consumes less memory, it runs faster, so a device can support more applications within its allotted memory.” Bandwidth is freed up, in other words. - -“All computer systems would benefit from this,” Sanchez, a professor of computer science and electrical engineering, says in the article. “Programs become faster because they stop being bottlenecked by memory bandwidth.” - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3392716/revolutionary-data-compression-technique-could-slash-compute-costs.html#tk.rss_all - -作者:[Patrick Nelson][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://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/02/memory-100787327-large.jpg -[2]: https://www.networkworld.com/article/3389396/how-to-deal-with-backup-when-you-switch-to-hyperconverged-infrastructure.html -[3]: http://people.csail.mit.edu/poantsai/papers/2019.zippads.asplos.pdf -[4]: http://news.mit.edu/2019/hardware-data-compression-0416 -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190507 SD-WAN is Critical for IoT.md b/sources/talk/20190507 SD-WAN is Critical for IoT.md deleted file mode 100644 index a5867d5afd..0000000000 --- a/sources/talk/20190507 SD-WAN is Critical for IoT.md +++ /dev/null @@ -1,74 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (SD-WAN is Critical for IoT) -[#]: via: (https://www.networkworld.com/article/3393445/sd-wan-is-critical-for-iot.html#tk.rss_all) -[#]: author: (Rami Rammaha https://www.networkworld.com/author/Rami-Rammaha/) - -SD-WAN is Critical for IoT -====== - -![istock][1] - -The Internet of Things (IoT) is everywhere and its use is growing fast. IoT is used by local governments to build smart cities. It’s used to build smart businesses. And, consumers are benefitting as it’s built into smart homes and smart cars. Industry analyst first estimates that over 20 billion IoT devices will be connected by 2020. That’s a 2.5x increase from the more than 8 billion connected devices in 2017*. - -Manufacturing companies have the highest IoT spend to date of industries while the health care market is experiencing the highest IoT growth. By 2020, 50 percent of IoT spending will be driven by manufacturing, transportation and logistics, and utilities. - -IoT growth is being fueled by the promise of analytical data insights that will ultimately yield greater efficiencies and enhanced customer satisfaction. The top use cases driving IoT growth are self-optimizing production, predictive maintenance and automated inventory management. - -From a high-level view, the IoT architecture includes sensors that collect and transmit data (i.e. temperature, speed, humidity, video feed, pressure, IR, proximity, etc.) from “things” like cars, trucks, machines, etc. that are connected over the internet. Data collected is then analyzed, translating raw data into actionable information. Businesses can then act on this information. And at more advanced levels, machine learning and AI algorithms learn and adapt to this information and automatically respond at a system level. - -IDC estimates that by 2025, over 75 billion IoT devices* will be connected. By that time, nearly a quarter of the world’s projected 163 zettabytes* (163 trillion gigabytes) of data will have been created in real-time, and the vast majority of that data will have been created by IoT devices. This massive amount of data will drive an exponential increase in traffic on the network infrastructure requiring massive scalability. Also, this increasing amount of data will require tremendous processing power to mine it and transform it into actionable intelligence. In parallel, security risks will continue to increase as there will be many more potential entry points onto the network. Lastly, management of the overall infrastructure will require better orchestration of policies as well as the means to streamline on-going operations. - -### **How does SD-WAN enable IoT business initiatives?** - -There are three key elements that an [SD-WAN][2] platform must include: - - 1. **Visibility** : Real-time visibility into the network is key. It takes the guesswork out of rapid problem resolution, enabling organizations to run more efficiently by accelerating troubleshooting and applying preventive measures. Furthermore, a CIO is able to pull metrics and see bandwidth consumed by any IoT application. - 2. **Security** : IoT traffic must be isolated from other application traffic. IT must prevent – or at least reduce – the possible attack surface that may be exposed to IoT device traffic. Also, the network must continue delivering other application traffic in the event of a melt down on a WAN link caused by a DDoS attack. - 3. **Agility** : With the increased number of connected devices, applications and users, a comprehensive, intelligent and centralized orchestration approach that continuously adapts to deliver the best experience to the business and users is critical to success. - - - -### Key Silver Peak EdgeConnect SD-WAN capabilities for IoT - -1\. Silver Peak has an [embedded real-time visibility engine][3] allowing IT to gain complete observability into the performance attributes of the network and applications in real-time. The [EdgeConnect][4] SD-WAN appliances deployed in branch offices send information to the centralized [Unity Orchestrator™][5]. Orchestrator collects the data and presents it in a comprehensive management dashboard via customizable widgets. These widgets provide a wealth of operational data including a health heatmap for every SD-WAN appliance deployed, flow counts, active tunnels, logical topologies, top talkers, alarms, bandwidth consumed by each application and location, latency and jitter and much more. Furthermore, the platform maintains weeks’ worth of data with context allowing IT to playback and see what has transpired at a specific time and location, similar to a DVR. - -![Click to read Solution Brief][6] - -2\. The second set of key capabilities center around security and end-to-end zone-based segmentation. An IoT traffic zone may be created on the LAN or branch side. IoT traffic is then mapped all the way across the WAN to the data center or cloud where the data will be processed. Zone-based segmentation is accomplished in a simplified and automated way within the Orchestrator GUI. In cases where further traffic inspection is required, IT can simply service chain to another security service. There are several key benefits realized by this approach. IT can easily and quickly apply segmentation policies; segmentation mitigates the attack surface; and IT can save on additional security investments. - -![***Click to read Solution Brief ***][7] - -3\. EdgeConnect employs machine learning at the global level where with internet sensors and third-party sensors feed into the cloud portal software. The software tracks the geolocation of all IP addresses and IP reputation, distributing signals down to the Unity Orchestrator running in each individual customer’s enterprise. In turn, it is speaking to the edge devices sitting in the branch offices. There, distributed learning is done by looking at the first packet, making an inference based on the first packet what the application is. So, if seeing that 100 times now, every time packets come from that particular IP address and turns out to be an IoT, we can make an inference that IP belongs to IoT application. In parallel, we’re using a mix of traditional techniques to validate the identification of the application. All this combined other multi-level intelligence enables simple and automated policy orchestration across a large number of devices and applications. - -![***Click to read Solution Brief ***][8] - -SD-WAN plays a foundational role as businesses continue to embrace IoT, but choosing the right SD-WAN platform is even more critical to ensuring businesses are ultimately able to fully optimize their operations. - -* Source: [IDC][9] - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3393445/sd-wan-is-critical-for-iot.html#tk.rss_all - -作者:[Rami Rammaha][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://www.networkworld.com/author/Rami-Rammaha/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/05/istock-1019172426-100795551-large.jpg -[2]: https://www.silver-peak.com/sd-wan/sd-wan-explained -[3]: https://www.silver-peak.com/resource-center/simplify-sd-wan-operations-greater-visibility -[4]: https://www.silver-peak.com/products/unity-edge-connect -[5]: https://www.silver-peak.com/products/unity-orchestrator -[6]: https://images.idgesg.net/images/article/2019/05/1_simplify-100795554-large.jpg -[7]: https://images.idgesg.net/images/article/2019/05/2_centralize-100795555-large.jpg -[8]: https://images.idgesg.net/images/article/2019/05/3_increase-100795558-large.jpg -[9]: https://www.information-age.com/data-forecast-grow-10-fold-2025-123465538/ diff --git a/sources/talk/20190507 Some IT pros say they have too much data.md b/sources/talk/20190507 Some IT pros say they have too much data.md deleted file mode 100644 index a645ae52e9..0000000000 --- a/sources/talk/20190507 Some IT pros say they have too much data.md +++ /dev/null @@ -1,66 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Some IT pros say they have too much data) -[#]: via: (https://www.networkworld.com/article/3393205/some-it-pros-say-they-have-too-much-data.html#tk.rss_all) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Some IT pros say they have too much data -====== -IT professionals have too many data sources to count, and they spend a huge amount of time wrestling that data into usable condition, a survey from Ivanti finds. -![Getty Images][1] - -A new survey has found that a growing number of IT professionals have too many data sources to even count, and they are spending more and more time just wrestling that data into usable condition. - -Ivanti, an IT asset management firm, [surveyed 400 IT professionals on their data situation][2] and found IT faces numerous challenges when it comes to siloes, data, and implementation. The key takeaway is data overload is starting to overwhelm IT managers and data lakes are turning into data oceans. - -**[ Read also:[Understanding mass data fragmentation][3] | Get daily insights [Sign up for Network World newsletters][4] ]** - -Among the findings from Ivanti's survey: - - * Fifteen percent of IT professionals say they have too many data sources to count, and 37% of professionals said they have about 11-25 different sources for data. - * More than half of IT professionals (51%) report they have to work with their data for days, weeks or more before it's actionable. - * Only 10% of respondents said the data they receive is actionable within minutes. - * One in three respondents said they have the resources to act on their data, but more than half (52%) said they only sometimes have the resources. - - - -“It’s clear from the results of this survey that IT professionals are in need of a more unified approach when working across organizational departments and resulting silos,” said Duane Newman, vice president of product management at Ivanti, in a statement. - -### The problem with siloed data - -The survey found siloed data represents a number of problems and challenges. Three key priorities suffer the most: automation (46%), user productivity and troubleshooting (42%), and customer experience (41%). The survey also found onboarding/offboarding suffers the least (20%) due to siloes, so apparently HR and IT are getting things right. - -In terms of what they want from real-time insight, about 70% of IT professionals said their security status was the top priority over other issues. Respondents were least interested in real-time insights around warranty data. - -### Data lake method a recipe for disaster - -I’ve been immersed in this subject for other publications for some time now. Too many companies are hoovering up data for the sake of collecting it with little clue as to what they will do with it later. One thing you have to say about data warehouses, the schema on write at least forces you to think about what you are collecting and how you might use it because you have to store it away in a usable form. - -The new data lake method is schema on read, meaning you filter/clean it when you read it into an application, and that’s just a recipe for disaster. If you are looking at data collected a month or a year ago, do you even know what it all is? Now you have to apply schema to data and may not even remember collecting it. - -Too many people think more data is good when it isn’t. You just drown in it. When you reach a point of having too many data sources to count, you’ve gone too far and are not going to get insight. You’re going to get overwhelmed. Collect data you know you can use. Otherwise you are wasting petabytes of disk space. - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3393205/some-it-pros-say-they-have-too-much-data.html#tk.rss_all - -作者:[Andy Patrizio][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://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2018/03/database_data-center_futuristic-technology-100752012-large.jpg -[2]: https://www.ivanti.com/blog/survey-it-professionals-data-sources -[3]: https://www.networkworld.com/article/3262145/lan-wan/customer-reviews-top-remote-access-tools.html#nww-fsb -[4]: https://www.networkworld.com/newsletters/signup.html#nww-fsb -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190509 When it comes to uptime, not all cloud providers are created equal.md b/sources/talk/20190509 When it comes to uptime, not all cloud providers are created equal.md deleted file mode 100644 index 8f9db8a94b..0000000000 --- a/sources/talk/20190509 When it comes to uptime, not all cloud providers are created equal.md +++ /dev/null @@ -1,83 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (When it comes to uptime, not all cloud providers are created equal) -[#]: via: (https://www.networkworld.com/article/3394341/when-it-comes-to-uptime-not-all-cloud-providers-are-created-equal.html#tk.rss_all) -[#]: author: (Zeus Kerravala https://www.networkworld.com/author/Zeus-Kerravala/) - -When it comes to uptime, not all cloud providers are created equal -====== -Cloud uptime is critical today, but vendor-provided data can be confusing. Here's an analysis of how AWS, Google Cloud and Microsoft Azure compare. -![Getty Images][1] - -The cloud is not just important; it's mission-critical for many companies. More and more IT and business leaders I talk to look at public cloud as a core component of their digital transformation strategies — using it as part of their hybrid cloud or public cloud implementation. - -That raises the bar on cloud reliability, as a cloud outage means important services are not available to the business. If this is a business-critical service, the company may not be able to operate while that key service is offline. - -Because of the growing importance of the cloud, it’s critical that buyers have visibility into the reliability number for the cloud providers. The challenge is the cloud providers don't disclose the disruptions in a consistent manner. In fact, some are confusing to the point where it’s difficult to glean any kind of meaningful conclusion. - -**[ RELATED:[What IT pros need to know about Azure Stack][2] and [Which cloud performs better, AWS, Azure or Google?][3] | Get regularly scheduled insights: [Sign up for Network World newsletters][4] ]** - -### Reported cloud outage times don't always reflect actual downtime - -Microsoft Azure and Google Cloud Platform (GCP) both typically provide information on date and time, but only high-level data on the services affected and sparse information on regional impact. The problem with that is it’s difficult to get a sense of overall reliability. For instance, if Azure reports a one-hour outage that impacts five services in three regions, the website might show just a single hour. In actuality, that’s 15 hours of total downtime. - -Between Azure, GCP and Amazon Web Services (AWS), [Azure is the most obscure][5], as it provides the least amount of detail. [GCP does a better job of providing detail][6] at the service level but tends to be obscure with regional information. Sometimes it’s very clear as to what services are unavailable, and other times it’s not. - -[AWS has the most granular reporting][7], as it shows every service in every region. If an incident occurs that impacts three services, all three of those services would light up red. If those were unavailable for one hour, AWS would record three hours of downtime. - -Another inconsistency between the cloud providers is the amount of historical downtime data that is available. At one time, all three of the cloud vendors provided a one-year view into outages. GCP and AWS still do this, but Azure moved to only a [90-day view][5] sometime over the past year. - -### Azure has significantly higher downtime than GCP and AWS - -The next obvious question is who has the most downtime? To answer that, I worked with a third-party firm that has continually collected downtime information directly from the vendor websites. I have personally reviewed the information and can validate its accuracy. Based on the vendors own reported numbers, from the beginning of 2018 through May 3, 2019, AWS leads the pack with only 338 hours of downtime, followed by GCP closely at 361. Microsoft Azure has a whopping total of 1,934 hours of self-reported downtime. - -![][8] - -A few points on these numbers. First, this is an aggregation of the self-reported data from the vendors' websites, which isn’t the “true” number, as regional information or service granularity is sometimes obscured. If a service is unavailable for an hour and it’s reported for an hour on the website but it spanned five regions, correctly five hours should have been used. But for this calculation, we used only one hour because that is what was self-reported. - -Because of this, the numbers are most favorable to Microsoft because they provide the least amount of regional information. The numbers are least favorable to AWS because they provide the most granularity. Also, I believe AWS has the most services in most regions, so they have more opportunities for an outage. - -We had considered normalizing the data, but that would require a significant amount of work to destruct the downtime on a per service per region basis. I may choose to do that in the future, but for now, the vendor-reported view is a good indicator of relative performance. - -Another important point is that only infrastructure as a service (IaaS) services were used to calculate downtime. If Google Street View or Bing Maps went down, most businesses would not care, so it would have been unfair to roll those number in. - -### SLAs do not correlate to reliability - -Given the importance of cloud services today, I would like to see every cloud provider post a 12-month running total of downtime somewhere on their website so customers can do an “apples to apples” comparison. This obviously isn’t the only factor used in determining which cloud provider to use, but it is one of the more critical ones. - -Also, buyers should be aware that there is a big difference between service-level agreements (SLAs) and downtime. A cloud operator can promise anything they want, even provide a 100% SLA, but that just means they need to reimburse the business when a service isn’t available. Most IT leaders I have talked to say the few bucks they get back when a service is out is a mere fraction of what the outage actually cost them. - -### Measure twice and cut once to minimize business disruption - -If you’re reading this and you’re researching cloud services, it’s important to not just make the easy decision of buying for convenience. Many companies look at Azure because Microsoft gives away Azure credits as part of the Enterprise Agreement (EA). I’ve interviewed several companies that took the path of least resistance, but they wound up disappointed with availability and then switched to AWS or GCP later, which can have a disruptive effect. - -I’m certainly not saying to not buy Microsoft Azure, but it is important to do your homework to understand the historical performance of the services you’re considering in the regions you need them. The information on the vendor websites may not tell the full picture, so it’s important to do the necessary due diligence to ensure you understand what you’re buying before you buy it. - -Join the Network World communities on [Facebook][9] and [LinkedIn][10] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3394341/when-it-comes-to-uptime-not-all-cloud-providers-are-created-equal.html#tk.rss_all - -作者:[Zeus Kerravala][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://www.networkworld.com/author/Zeus-Kerravala/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/02/cloud_comput_connect_blue-100787048-large.jpg -[2]: https://www.networkworld.com/article/3208029/azure-stack-microsoft-s-private-cloud-platform-and-what-it-pros-need-to-know-about-it -[3]: https://www.networkworld.com/article/3319776/the-network-matters-for-public-cloud-performance.html -[4]: https://www.networkworld.com/newsletters/signup.html -[5]: https://azure.microsoft.com/en-us/status/history/ -[6]: https://status.cloud.google.com/incident/appengine/19008 -[7]: https://status.aws.amazon.com/ -[8]: https://images.idgesg.net/images/article/2019/05/public-cloud-downtime-100795948-large.jpg -[9]: https://www.facebook.com/NetworkWorld/ -[10]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190513 Top auto makers rely on cloud providers for IoT.md b/sources/talk/20190513 Top auto makers rely on cloud providers for IoT.md deleted file mode 100644 index 5adf5f65a7..0000000000 --- a/sources/talk/20190513 Top auto makers rely on cloud providers for IoT.md +++ /dev/null @@ -1,53 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Top auto makers rely on cloud providers for IoT) -[#]: via: (https://www.networkworld.com/article/3395137/top-auto-makers-rely-on-cloud-providers-for-iot.html) -[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) - -Top auto makers rely on cloud providers for IoT -====== - -For the companies looking to implement the biggest and most complex [IoT][1] setups in the world, the idea of pairing up with [AWS][2], [Google Cloud][3] or [Azure][4] seems to be one whose time has come. Within the last two months, BMW and Volkswagen have both announced large-scale deals with Microsoft and Amazon, respectively, to help operate their extensive network of operational technology. - -According to Alfonso Velosa, vice president and analyst at Gartner, part of the impetus behind those two deals is that the automotive sector fits in very well with the architecture of the public cloud. Public clouds are great at collecting and processing data from a diverse array of different sources, whether they’re in-vehicle sensors, dealerships, mechanics, production lines or anything else. - -**[ RELATED:[What hybrid cloud means in practice][5]. | Get regularly scheduled insights by [signing up for Network World newsletters][6]. ]** - -“What they’re trying to do is create a broader ecosystem. They think they can leverage the capabilities from these folks,” Velosa said. - -### Cloud providers as IoT partners - -The idea is automated analytics for service and reliability data, manufacturing and a host of other operational functions. And while the full realization of that type of service is still very much a work in progress, it has clear-cut advantages for big companies – a skilled partner handling tricky implementation work, built-in capability for sophisticated analytics and security, and, of course, the ability to scale up in a big way. - -Hence, the structure of the biggest public clouds has upside for many large-scale IoT deployments, not just the ones taking place in the auto industry. The cloud giants have vast infrastructures, with multiple points of presence all over the world. - -To continue reading this article register now - -[Get Free Access][7] - -[Learn More][8] Existing Users [Sign In][7] - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3395137/top-auto-makers-rely-on-cloud-providers-for-iot.html - -作者:[Jon Gold][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://www.networkworld.com/author/Jon-Gold/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3207535/what-is-iot-how-the-internet-of-things-works.html -[2]: https://www.networkworld.com/article/3324043/aws-does-hybrid-cloud-with-on-prem-hardware-vmware-help.html -[3]: https://www.networkworld.com/article/3388218/cisco-google-reenergize-multicloudhybrid-cloud-joint-development.html -[4]: https://www.networkworld.com/article/3385078/microsoft-introduces-azure-stack-for-hci.html -[5]: https://www.networkworld.com/article/3249495/what-hybrid-cloud-mean-practice -[6]: https://www.networkworld.com/newsletters/signup.html -[7]: javascript:// -[8]: /learn-about-insider/ diff --git a/sources/talk/20190514 Mobility and SD-WAN, Part 1- SD-WAN with 4G LTE is a Reality.md b/sources/talk/20190514 Mobility and SD-WAN, Part 1- SD-WAN with 4G LTE is a Reality.md deleted file mode 100644 index 1ecd68fa41..0000000000 --- a/sources/talk/20190514 Mobility and SD-WAN, Part 1- SD-WAN with 4G LTE is a Reality.md +++ /dev/null @@ -1,64 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Mobility and SD-WAN, Part 1: SD-WAN with 4G LTE is a Reality) -[#]: via: (https://www.networkworld.com/article/3394866/mobility-and-sd-wan-part-1-sd-wan-with-4g-lte-is-a-reality.html) -[#]: author: (Francisca Segovia ) - -Mobility and SD-WAN, Part 1: SD-WAN with 4G LTE is a Reality -====== - -![istock][1] - -Without a doubt, 5G — the fifth generation of mobile wireless technology — is the hottest topic in wireless circles today. You can’t throw a stone without hitting 5G news. While telecommunications providers are in a heated competition to roll out 5G, it’s important to reflect on current 4G LTE (Long Term Evolution) business solutions as a preview of what we have learned and what’s possible. - -This is part one of a two-part blog series that will explore the [SD-WAN][2] journey through the evolution of these wireless technologies. - -### **Mobile SD-WAN is a reality** - -4G LTE commercialization continues to expand. According to [the GSM (Groupe Spéciale Mobile) Association][3], 710 operators have rolled out 4G LTE in 217 countries, reaching 83 percent of the world’s population. The evolution of 4G is transforming the mobile industry and is setting the stage for the advent of 5G. - -Mobile connectivity is increasingly integrated with SD-WAN, along with MPLS and broadband WAN services today. 4G LTE represents a very attractive transport alternative, as a backup or even an active member of the WAN transport mix to connect users to critical business applications. And in some cases, 4G LTE might be the only choice in locations where fixed lines aren’t available or reachable. Furthermore, an SD-WAN can optimize 4G LTE connectivity and bring new levels of performance and availability to mobile-based business use cases by selecting the best path available across several 4G LTE connections. - -### **Increasing application performance and availability with 4G LTE** - -Silver Peak has partnered with [BEC Technologies][4] to create a joint solution that enables customers to incorporate one or more low-cost 4G LTE services into any [Unity EdgeConnect™][5] SD-WAN edge platform deployment. All the capabilities of the EdgeConnect platform are supported across LTE links including packet-based link bonding, dynamic path control, path conditioning along with the optional [Unity Boost™ WAN Optimization][6] performance pack. This ensures always-consistent, always-available application performance even in the event of an outage or degraded service. - -EdgeConnect also incorporates sophisticated NAT traversal technology that eliminates the requirement for provisioning the LTE service with extra-cost static IP addresses. The Silver Peak [Unity Orchestrator™][7] management software enables the prioritization of LTE bandwidth usage based on branch and application requirements – active-active or backup-only. This solution is ideal in retail point-of-sale and other deployment use cases where always-available WAN connectivity is critical for the business. - -### **Automated SD-WAN enables innovative services** - -An example of an innovative mobile SD-WAN service is [swyMed’s DOT Telemedicine Backpack][8] powered by the EdgeConnect [Ultra Small][9] hardware platform. This integrated telemedicine solution enables first responders to connect to doctors and communicate patient vital statistics and real-time video anywhere, any time, greatly improving and expediting care for emergency patients. Using a lifesaving backpack provisioned with two LTE services from different carriers, EdgeConnect continuously monitors the underlying 4G LTE services for packet loss, latency and jitter. In the case of transport failure or brownout, EdgeConnect automatically initiates a sub-second failover so that voice, video and data connections continue without interruption over the remaining active 4G service. By bonding the two LTE links together with the EdgeConnect SD-WAN, swyMed can achieve an aggregate signal quality in excess of 90 percent, bringing mobile telemedicine to areas that would have been impossible in the past due to poor signal strength. - -To learn more about SD-WAN and the unique advantages that SD-WAN provides to enterprises across all industries, visit the [SD-WAN Explained][2] page on our website. - -### **Prepare for the 5G future** - -In summary, the adoption of 4G LTE is a reality. Service providers are taking advantage of the distinct benefits of SD-WAN to offer managed SD-WAN services that leverage 4G LTE. - -As the race for the 5G gains momentum, service providers are sure to look for ways to drive new revenue streams to capitalize on their initial investments. Stay tuned for part 2 of this 2-blog series where I will discuss how SD-WAN is one of the technologies that can help service providers to transition from 4G to 5G and enable the monetization of a new wave of managed 5G services. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3394866/mobility-and-sd-wan-part-1-sd-wan-with-4g-lte-is-a-reality.html - -作者:[Francisca Segovia][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/05/istock-952414660-100796279-large.jpg -[2]: https://www.silver-peak.com/sd-wan/sd-wan-explained -[3]: https://www.gsma.com/futurenetworks/resources/all-ip-statistics/ -[4]: https://www.silver-peak.com/resource-center/edgeconnect-4glte-solution-bec-technologies -[5]: https://www.silver-peak.com/products/unity-edge-connect -[6]: https://www.silver-peak.com/products/unity-boost -[7]: https://www.silver-peak.com/products/unity-orchestrator -[8]: https://www.silver-peak.com/resource-center/mobile-telemedicine-helps-save-lives-streaming-real-time-clinical-data-and-patient -[9]: https://www.silver-peak.com/resource-center/edgeconnect-us-ec-us-specification-sheet diff --git a/sources/talk/20190515 Extreme addresses networked-IoT security.md b/sources/talk/20190515 Extreme addresses networked-IoT security.md deleted file mode 100644 index 1ad756eded..0000000000 --- a/sources/talk/20190515 Extreme addresses networked-IoT security.md +++ /dev/null @@ -1,71 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Extreme addresses networked-IoT security) -[#]: via: (https://www.networkworld.com/article/3395539/extreme-addresses-networked-iot-security.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -Extreme addresses networked-IoT security -====== -The ExtremeAI security app features machine learning that can understand typical behavior of IoT devices and alert when it finds anomalies. -![Getty Images][1] - -[Extreme Networks][2] has taken the wraps off a new security application it says will use machine learning and artificial intelligence to help customers effectively monitor, detect and automatically remediate security issues with networked IoT devices. - -The application – ExtremeAI security—features machine-learning technology that can understand typical behavior of IoT devices and automatically trigger alerts when endpoints act in unusual or unexpected ways, Extreme said. - -**More about edge networking** - - * [How edge networking and IoT will reshape data centers][3] - * [Edge computing best practices][4] - * [How edge computing can help secure the IoT][5] - - - -Extreme said that the ExtremeAI Security application can tie into all leading threat intelligence feeds, and had close integration with its existing [Extreme Workflow Composer][6] to enable automatic threat mitigation and remediation. - -The application integrates the company’s ExtremeAnalytics application which lets customers view threats by severity, category, high-risk endpoints and geography. An automated ticketing feature integrates with variety of popular IT tools such as Slack, Jira, and ServiceNow, and the application interoperates with many popular security tools, including existing network taps, the vendor stated. - -There has been an explosion of new endpoints ranging from million-dollar smart MRI machines to five-dollar sensors, which creates a complex and difficult job for network and security administrators, said Abby Strong, vice president of product marketing for Extreme. “We need smarter, secure and more self-healing networks especially where IT cybersecurity resources are stretched to the limit.” - -Extreme is trying to address an issue that is important to enterprise-networking customers: how to get actionable, usable insights as close to real-time as possible, said Rohit Mehra, Vice President of Network Infrastructure at IDC. “Extreme is melding automation, analytics and security that can look at network traffic patterns and allow the system to take action when needed.” - -The ExtremeAI application, which will be available in October, is but one layer of IoT security Extreme offers. Already on the market, its [Defender for IoT][7] package, which includes a Defender application and adapter, lets customers monitor, set policies and isolate IoT devices across an enterprise. - -**[[Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][8] ]** - -The Extreme AI and Defender packages are now part of what the company calls Extreme Elements, which is a menu of its new and existing Smart OmniEdge, Automated Campus and Agile Data Center software, hardware and services that customers can order to build a manageable, secure system. - -Aside from the applications, the Elements include Extreme Management Center, the company’s network management software; the company’s x86-based intelligent appliances, including the ExtremeCloud Appliance; and [ExtremeSwitching X465 premium][9], a stackable multi-rate gigabit Ethernet switch. - -The switch and applications are just the beginning of a very busy time for Extreme. In its [3Q earnings cal][10]l this month company CEO Ed Meyercord noted Extreme was in the “early stages of refreshing 70 percent of our products” and seven different products will become generally available this quarter – a record for Extreme, he said. - -Join the Network World communities on [Facebook][11] and [LinkedIn][12] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3395539/extreme-addresses-networked-iot-security.html - -作者:[Michael Cooney][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://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/02/iot_security_tablet_conference_digital-100787102-large.jpg -[2]: https://www.networkworld.com/article/3289508/extreme-facing-challenges-girds-for-future-networking-battles.html -[3]: https://www.networkworld.com/article/3291790/data-center/how-edge-networking-and-iot-will-reshape-data-centers.html -[4]: https://www.networkworld.com/article/3331978/lan-wan/edge-computing-best-practices.html -[5]: https://www.networkworld.com/article/3331905/internet-of-things/how-edge-computing-can-help-secure-the-iot.html -[6]: https://www.extremenetworks.com/product/workflow-composer/ -[7]: https://www.extremenetworks.com/product/extreme-defender-for-iot/ -[8]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr -[9]: https://community.extremenetworks.com/extremeswitching-exos-223284/extremexos-30-2-and-smart-omniedge-premium-x465-switches-are-now-available-7823377 -[10]: https://seekingalpha.com/news/3457137-extreme-networks-minus-15-percent-quarterly-miss-light-guidance -[11]: https://www.facebook.com/NetworkWorld/ -[12]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190516 Will 5G be the first carbon-neutral network.md b/sources/talk/20190516 Will 5G be the first carbon-neutral network.md deleted file mode 100644 index decacfac5d..0000000000 --- a/sources/talk/20190516 Will 5G be the first carbon-neutral network.md +++ /dev/null @@ -1,88 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Will 5G be the first carbon-neutral network?) -[#]: via: (https://www.networkworld.com/article/3395465/will-5g-be-the-first-carbon-neutral-network.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -Will 5G be the first carbon-neutral network? -====== -Increased energy consumption in new wireless networks could become ecologically unsustainable. Engineers think they have solutions that apply to 5G, but all is not certain. -![Dushesina/Getty Images][1] - -If wireless networks transfer 1,000 times more data, does that mean they will use 1,000 times more energy? It probably would with the old 4G LTE wireless technologies— LTE doesn’t have much of a sleep-standby. But with 5G, we might have a more energy-efficient option. - -More customers want Earth-friendly options, and engineers are now working on how to achieve it — meaning 5G might introduce the first zero-carbon networks. It’s not all certain, though. - -**[ Related:[What is 5G wireless? And how it will change networking as we know it][2] ]** - -“When the 4G technology for wireless communication was developed, not many people thought about how much energy is consumed in transmitting bits of information,” says Emil Björnson, associate professor of communication systems at Linkoping University, [in an article on the school’s website][3]. - -Standby was never built into 4G, Björnson explains. Reasons include overbuilding — the architects wanted to ensure connections didn’t fail, so they just kept the power up. The downside to that redundancy was that almost the same amount of energy is used whether the system is transmitting data or not. - -“We now know that this is not necessary,” Björnson says. 5G networks don’t use much power during periods of low traffic, and that reduces power consumption. - -Björnson says he knows how to make future-networks — those 5G networks that one day may become the enterprise broadband replacement — super efficient even when there is heavy use. Massive-MIMO (multiple-in, multiple-out) antennas are the answer, he says. That’s hundreds of connected antennas taking advantage of multipath. - -I’ve written before about some of Björnson's Massive-MIMO ideas. He thinks [Massive-MIMO will remove all capacity ceilings from wireless networks][4]. However, he now adds calculations to his research that he claims prove that the Massive-MIMO antenna technology will also reduce power use. He and his group are actively promoting their academic theories in a paper ([pdf][5]). - -**[[Take this mobile device management course from PluralSight and learn how to secure devices in your company without degrading the user experience.][6] ]** - -### Nokia's plan to reduce wireless networks' CO2 emissions - -Björnson's isn’t the only 5G-aimed eco-concept out there. Nokia points out that it isn't just radios transmitting that use electricity. Cooling is actually the main electricity hog, says the telcommunications company, which is one of the world’s principal manufacturers of mobile network equipment. - -Nokia says the global energy cost of Radio Access Networks (RANs) in 2016 (the last year numbers were available), which includes base transceiver stations (BTSs) needed by mobile networks, was around $80 billion. That figure increases with more users coming on stream, something that’s probable. Of the BTS’s electricity use, about 90% “converts to waste heat,” [Harry Kuosa, a marketing executive, writes on Nokia’s blog][7]. And base station sites account for about 80% of a mobile network’s entire energy use, Nokia expands on its website. - -“A thousand-times more traffic that creates a thousand-times higher energy costs is unsustainable,” Nokia says in its [ebook][8] on the subject, “Turning the zero carbon vision into business opportunity,” and it’s why Nokia plans liquid-cooled 5G base stations among other things, including chip improvements. It says the liquid-cooling can reduce CO2 emissions by up to 80%. - -### Will those ideas work? - -Not all agree power consumption can be reduced when implementing 5G, though. Gabriel Brown of Heavy Reading, quotes [in a tweet][9] a China Mobile executive as saying that 5G BTSs will use three times as much power as 4G LTE ones because the higher frequencies used in 5G mean one needs more BTS units to provide the same geographic coverage: For physics reasons, higher frequencies equals shorter range. - -If, as is projected, 5G develops into the new enterprise broadband for the internet of things (IoT), along with associated private networks covering everything else, then these eco- and cost-important questions are going to be salient — and they need answers quickly. 5G will soon be here, and [Gartner estimates that 60% of organizations will adopt it][10]. - -**More about 5G networks:** - - * [How enterprises can prep for 5G networks][11] - * [5G vs 4G: How speed, latency and apps support differ][12] - * [Private 5G networks are coming][13] - * [5G and 6G wireless have security issues][14] - * [How millimeter-wave wireless could help support 5G and IoT][15] - - - -Join the Network World communities on [Facebook][16] and [LinkedIn][17] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3395465/will-5g-be-the-first-carbon-neutral-network.html - -作者:[Patrick Nelson][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://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/01/4g-versus-5g_horizon_sunrise-100784230-large.jpg -[2]: https://www.networkworld.com/article/3203489/lan-wan/what-is-5g-wireless-networking-benefits-standards-availability-versus-lte.html -[3]: https://liu.se/en/news-item/okningen-av-mobildata-kraver-energieffektivare-nat -[4]: https://www.networkworld.com/article/3262991/future-wireless-networks-will-have-no-capacity-limits.html -[5]: https://arxiv.org/pdf/1812.01688.pdf -[6]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fmobile-device-management-big-picture -[7]: https://www.nokia.com/blog/nokia-has-ambitious-plans-reduce-network-power-consumption/ -[8]: https://pages.nokia.com/2364.Zero.Emissions.ebook.html?did=d000000001af&utm_campaign=5g_in_action_&utm_source=twitter&utm_medium=organic&utm_term=0dbf430c-1c94-47d7-8961-edc4f0ba3270 -[9]: https://twitter.com/Gabeuk/status/1099709788676636672?ref_src=twsrc%5Etfw%7Ctwcamp%5Etweetembed%7Ctwterm%5E1099709788676636672&ref_url=https%3A%2F%2Fwww.lightreading.com%2Fmobile%2F5g%2Fpower-consumption-5g-basestations-are-hungry-hungry-hippos%2Fd%2Fd-id%2F749979 -[10]: https://www.gartner.com/en/newsroom/press-releases/2018-12-18-gartner-survey-reveals-two-thirds-of-organizations-in -[11]: https://www.networkworld.com/article/3306720/mobile-wireless/how-enterprises-can-prep-for-5g.html -[12]: https://www.networkworld.com/article/3330603/mobile-wireless/5g-versus-4g-how-speed-latency-and-application-support-differ.html -[13]: https://www.networkworld.com/article/3319176/mobile-wireless/private-5g-networks-are-coming.html -[14]: https://www.networkworld.com/article/3315626/network-security/5g-and-6g-wireless-technologies-have-security-issues.html -[15]: https://www.networkworld.com/article/3291323/mobile-wireless/millimeter-wave-wireless-could-help-support-5g-and-iot.html -[16]: https://www.facebook.com/NetworkWorld/ -[17]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190517 The modern data center and the rise in open-source IP routing suites.md b/sources/talk/20190517 The modern data center and the rise in open-source IP routing suites.md deleted file mode 100644 index 02063687a0..0000000000 --- a/sources/talk/20190517 The modern data center and the rise in open-source IP routing suites.md +++ /dev/null @@ -1,140 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The modern data center and the rise in open-source IP routing suites) -[#]: via: (https://www.networkworld.com/article/3396136/the-modern-data-center-and-the-rise-in-open-source-ip-routing-suites.html) -[#]: author: (Matt Conran https://www.networkworld.com/author/Matt-Conran/) - -The modern data center and the rise in open-source IP routing suites -====== -Open source enables passionate people to come together and fabricate work of phenomenal quality. This is in contrast to a single vendor doing everything. -![fdecomite \(CC BY 2.0\)][1] - -As the cloud service providers and search engines started with the structuring process of their business, they quickly ran into the problems of managing the networking equipment. Ultimately, after a few rounds of getting the network vendors to understand their problems, these hyperscale network operators revolted. - -Primarily, what the operators were looking for was a level of control in managing their network which the network vendors couldn’t offer. The revolution burned the path that introduced open networking, and network disaggregation to the work of networking. Let us first learn about disaggregation followed by open networking. - -### Disaggregation - -The concept of network disaggregation involves breaking-up of the vertical networking landscape into individual pieces, where each piece can be used in the best way possible. The hardware can be separated from the software, along with open or closed IP routing suites. This enables the network operators to use the best of breed for the hardware, software and the applications. - -**[ Now see[7 free network tools you must have][2]. ]** - -Networking has always been built as an appliance and not as a platform. The mindset is that the network vendor builds an appliance and as a specialized appliance, they will completely control what you can and cannot do on that box. In plain words, they will not enable anything that is not theirs. As a result, they act as gatekeepers and not gate-enablers. - -Network disaggregation empowers the network operators with the ability to lay hands on the features they need when they need them. However, this is impossible in case of non-disaggregated hardware. - -### Disaggregation leads to using best-of-breed - -In the traditional vertically integrated networking market, you’re forced to live with the software because you like the hardware, or vice-versa. But network disaggregation drives different people to develop things that matter to them. This allows multiple groups of people to connect, with each one focused on doing what he or she does the best. Switching silicon manufacturers can provide the best merchant silicon. Routing suites can be provided by those who are the best at that. And the OS vendors can provide the glue that enables all of these to work well together. - -With disaggregation, people are driven to do what they are good at. One company does the hardware, whereas another does the software and other company does the IP routing suites. Hence, today the networking world looks like more of the server world. - -### Open source - -Within this rise of the modern data center, there is another element that is driving network disaggregation; the notion of open source. Open source is “denoting software for which the original source code is made freely available, it may be redistributed and modified.” It enables passionate people to come together and fabricate work of phenomenal quality. This is in contrast to a single vendor doing everything. - -As a matter of fact, the networking world has always been very vendor driven. However, the advent of open source gives the opportunity to like-minded people rather than the vendor controlling the features. This eliminates the element of vendor lock-in, thereby enabling interesting work. Open source allows more than one company to be involved. - -### Open source in the data center - -The traditional enterprise and data center networks were primarily designed by bridging and Spanning Tree Protocol (STP). However, the modern data center is driven by IP routing and the CLOS topology. As a result, you need a strong IP routing suite. - -That was the point where the need for an open-source routing suite surfaced, the suite that can help drive the modern data center. The primary open-source routing suites are [FRRouting (FRR)][3], BIRD, GoBGP and ExaBGP. - -Open-source IP routing protocol suites are slowly but steadily gaining acceptance and are used in data centers of various sizes. Why? It is because they allow a community of developers and users to work on finding solutions to common problems. Open-source IP routing protocol suites equip them to develop the specific features that they need. It also helps the network operators to create simple designs that make sense to them, as opposed to having everything controlled by the vendor. They also enable routing suites to run on compute nodes. Kubernetes among others uses this model of running a routing protocol on a compute node. - -Today many startups are using FRR. Out of all of the IP routing suites, FRR is preferred in the data center as the primary open-source IP routing protocol suite. Some traditional network vendors have even demonstrated the use of FRR on their networking gear. - -There are lots of new features currently being developed for FRR, not just by the developers but also by the network operators. - -### Use cases for open-source routing suites - -When it comes to use-cases, where do IP routing protocol suites sit? First and foremost, if you want to do any type of routing in the disaggregated network world, you need an IP routing suite. - -Some operators are using FRR at the edge of the network as well, thereby receiving full BGP feeds. Many solutions which use Intel’s DPDK for packet forwarding use FRR as the control plane, receiving full BGP feeds. In addition, there are other vendors using FRR as the core IP routing suite for a full leaf and spine data center architecture. You can even get a version of FRR on pfSense which is a free and open source firewall. - -We need to keep in mind that reference implementations are important. Open source allows you to test at scale. But vendors don’t allow you to do that. However, with FRR, we have the ability to spin up virtual machines (VMs) or even containers by using software like Vagrant to test your network. Some vendors do offer software versions, but they are not fully feature-compatible. - -Also, with open source you do not need to wait. This empowers you with flexibility and speed which drives the modern data center. - -### Deep dive on FRRouting (FRR) - -FRR is a Linux foundation project. In a technical Linux sense, FRR is a group of daemons that work together, providing a complete routing suite that includes BGP, IS-IS, LDP, OSPF, BFD, PIM, and RIP. - -Each one of these daemons communicate with the common routing information base (RIB) daemon called Zebra in order to interface with the OS and to resolve conflicts between the multiple routing protocols providing the same information. Interfacing with the OS is used to receive the link up/down events, to add and delete routes etc. - -### FRRouting (FRR) components: Zebra - -Zebra is the RIB of the routing systems. It knows everything about the state of the system relevant to routing and is able to pass and disseminate this information to all the interested parties. - -The RIB in FRR acts just like a traditional RIB. When a route wins, it goes into the Linux kernel data plane where the forwarding occurs. All of the routing protocols run as separate processes and each of them have their source code in FRR. - -For example, when BGP starts up, it needs to know, for instance, what kind of virtual routing and forwarding (VRF) and IP interfaces are available. Zebra collects and passes this information back to the interested daemons. It passes all the relevant information about state of the machine. - -Furthermore, you can also register information with Zebra. For example, if a particular route changes, the daemon can be informed. This can also be used for reverse path forwarding (RPF). FRR doesn't need to do a pull when changes happen on the network. - -There are a myriad of ways through which you can control Linux and the state. Sometimes you have to use options like the Netlink bus and sometimes you may need to read the state in proc file system of Linux. The goal of Zebra is to gather all this data for the upper level protocols. - -### FRR supports remote data planes - -FRR also has the ability to manage the remote data planes. So, what does this mean? Typically, the data forwarding plane and the routing protocols run on the same box. Another model, adopted by Openflow and SDN for example, is one in which the data forwarding plane can be on one box while FRR runs on a different box on behalf of the first box and pushes the computed routing state on the first box. In other words, the data plane and the control plane run on different boxes. - -If you examine the traditional world, it’s like having one large chassis with different line cards with the ability to install routes in those different line cards. FRR operates with the same model which has one control plane and the capability to offer 3 boxes, if needed. It does this via the forwarding plane manager. - -### Forwarding plane manager - -Zebra can either install routes directly into the data plane of the box it is running on or use a forwarding plane manager to install routes on a remote box. When it installs a route, the forwarding plane manager abstracts the data which displays the route and the next hops. It then pushes the data to a remote system where the remote machine processes it and programs the ASIC appropriately. - -After the data is abstracted, you can use whatever protocol you want in order to push the data to the remote machine. You can even include the data in an email. - -### What is holding people back from open source? - -Since last 30 years the networking world meant that you need to go to a vendor to solve a problem. But now with open-source routing suites, such as, FRR, there is a major drift in the mindset as to how you approach troubleshooting. - -This causes the fear of not being able to use it properly because with open source you are the one who has to fix it. This at first can be scary and daunting. But it doesn’t necessarily have to be. Also, to switch to FRR on a traditional network gear, you need the vendor to enable it, but they may be reluctant as they are on competing platforms which can be another road blocker. - -### The future of FRR - -If we examine FRR from the use case perspective of the data center, FRR is feature-complete. Anyone building an IP based data center FRR has everything available. The latest 7.0 release of FRR adds Yang/NetConf, BGP Enhancements and OpenFabric. - -FRR is not just about providing features, boosting the performance or being the same as or better than the traditional network vendor’s software, it is also about simplifying the process for the end user. - -Since the modern data center is focused on automation and ease of use, FRR has made such progress that the vendors have not caught up with. FRR is very automation friendly. For example, FRR takes BGP and makes it automation-friendly without having to change the protocol. It supports BGP unnumbered that is unmatched by any other vendor suite. This is where the vendors are trying to catch up. - -Also, while troubleshooting, FRR shows peer’s and host’s names and not just the IP addresses. This allows you to understand without having spent much time. However, vendors show the peer’s IP addresses which can be daunting when you need to troubleshoot. - -FRR provides the features that you need to run an efficient network and data center. It makes easier to configure and manage the IP routing suite. Vendors just add keep adding features over features whether they are significant or not. Then you need to travel the certification paths that teach you how to twiddle 20 million nobs. How many of those networks are robust and stable? - -FRR is about supporting features that matter and not every imaginable feature. FRR is an open source project that brings like-minded people together, good work that is offered isn’t turned away. As a case in point, FRR has an open source implementation of EIGRP. - -The problem surfaces when you see a bunch of things, you think you need them. But in reality, you should try to keep the network as simple as possible. FRR is laser-focused on the ease of use and simplifying the use rather than implementing features that are mostly not needed to drive the modern data center. - -For more information and to contribute, why not join the [FRR][4] [mailing list group][4]. - -**This article is published as part of the IDG Contributor Network.[Want to Join?][5]** - -Join the Network World communities on [Facebook][6] and [LinkedIn][7] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3396136/the-modern-data-center-and-the-rise-in-open-source-ip-routing-suites.html - -作者:[Matt Conran][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://www.networkworld.com/author/Matt-Conran/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2018/12/modular_humanoid_polyhedra_connections_structure_building_networking_by_fdecomite_cc_by_2-0_via_flickr_1200x800-100782334-large.jpg -[2]: https://www.networkworld.com/article/2825879/7-free-open-source-network-monitoring-tools.html -[3]: https://frrouting.org/community/7.0-launch.html -[4]: https://frrouting.org/#participate -[5]: /contributor-network/signup.html -[6]: https://www.facebook.com/NetworkWorld/ -[7]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190521 Enterprise IoT- Companies want solutions in these 4 areas.md b/sources/talk/20190521 Enterprise IoT- Companies want solutions in these 4 areas.md deleted file mode 100644 index 9df4495f05..0000000000 --- a/sources/talk/20190521 Enterprise IoT- Companies want solutions in these 4 areas.md +++ /dev/null @@ -1,119 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Enterprise IoT: Companies want solutions in these 4 areas) -[#]: via: (https://www.networkworld.com/article/3396128/the-state-of-enterprise-iot-companies-want-solutions-for-these-4-areas.html) -[#]: author: (Fredric Paul https://www.networkworld.com/author/Fredric-Paul/) - -Enterprise IoT: Companies want solutions in these 4 areas -====== -Based on customer pain points, PwC identified four areas companies are seeking enterprise solutions for, including energy use and sustainability. -![Jackie Niam / Getty Images][1] - -Internet of things (IoT) vendors and pundits like to crow about the billions and billions of connected devices that make the IoT so ubiquitous and powerful. But how much of that installed base is really relevant to the enterprise? - -To find out, I traded emails with Rob Mesirow, principal at [PwC’s Connected Solutions][2], the firm’s new one-stop-shop of IoT solutions, who suggests that consumer adoption may not paint a true picture of the enterprise opportunities. If you remove the health trackers and the smart thermostats from the market, he suggested, there are very few connected devices left. - -So, I wondered, what is actually happening on the enterprise side of IoT? What kinds of devices are we talking about, and in what kinds of numbers? - -**[ Read also:[Forget 'smart homes,' the new goal is 'autonomous buildings'][3] ]** - -“When people talk about the IoT,” Mesirow told me, “they usually focus on [consumer devices, which far outnumber business devices][4]. Yet [connected buildings currently represent only 12% of global IoT projects][5],” he noted, “and that’s without including wearables and smart home projects.” (Mesirow is talking about buildings that “use various IoT devices, including occupancy sensors that determine when people are present in a room in order to keep lighting and temperature controls at optimal levels, lowering energy costs and aiding sustainability goals. Sensors can also detect water and gas leaks and aid in predictive maintenance for HVAC systems.”) - -### 4 key enterprise IoT opportunities - -More specifically, based on customer pain points, PwC’s Connected Solutions is focusing on a few key opportunities, which Mesirow laid out in a [blog post][6] earlier this year. (Not surprisingly, the opportunities seem tied to [the group’s products][7].) - -“A lot of these solutions came directly from our customers’ request,” he noted. “We pre-qualify our solutions with customers before we build them.” - -Let’s take a look at the top four areas, along with a quick reality check on how important they are and whether the technology is ready for prime time. - -#### **1\. Energy use and sustainability** - -The IoT makes it possible to manage buildings and spaces more efficiently, with savings of 25% or more. Occupancy sensors can tell whether anyone is actually in a room, adjusting lighting and temperature to saving money and conserve energy. - -Connected buildings can also help determine when meeting spaces are available, which can boost occupancy at large businesses and universities by 40% while cutting infrastructure and maintenance costs. Other sensors, meanwhile, can detect water and gas leaks and aid in predictive maintenance for HVAC systems. - -**Reality check:** Obviously, much of this technology is not new, but there’s a real opportunity to make it work better by integrating disparate systems and adding better analytics to the data to make planning more effective. - -#### **2. Asset tracking - -** - -“Businesses can also use the IoT to track their assets,“ Mesirow told me, “which can range from trucks to hotel luggage carts to medical equipment. It can even assist with monitoring trash by alerting appropriate people when dumpsters need to be emptied.” - -Asset trackers can instantly identify the location of all kinds of equipment (saving employee time and productivity), and they can reduce the number of lost, stolen, and misplaced devices and machines as well as provide complete visibility into the location of your assets. - -Such trackers can also save employees from wasting time hunting down the devices and machines they need. For example, PwC noted that during an average hospital shift, more than one-third of nurses spend at least an hour looking for equipment such as blood pressure monitors and insulin pumps. Just as important, location tracking often improves asset optimization, reduced inventory needs, and improved customer experience. - -**Reality check:** Asset tracking offers clear value. The real question is whether a given use case is cost effective or not, as well as how the data gathered will actually be used. Too often, companies spend a lot of money and effort tracking their assets, but don’t do much with the information. - -#### **3\. Security and compliance** - -Connected solutions can create better working environments, Mesirow said. “In a hotel, for example, these smart devices can ensure that air and water quality is up to standards, provide automated pest traps, monitor dumpsters and recycling bins, detect trespassers, determine when someone needs assistance, or discover activity in an unauthorized area. Monitoring the water quality of hotel swimming pools can lower chemical and filtering costs,” he said. - -Mesirow cited an innovative use case where, in response to workers’ complaints about harassment, hotel operators—in conjunction with the [American Hotel and Lodging Association][8]—are giving their employees portable devices that alert security staff when workers request assistance. - -**Reality check:** This seems useful, but the ROI might be difficult to calculate. - -#### **4\. Customer experience** - -According to PwC, “Sensors, facial recognition, analytics, dashboards, and notifications can elevate and even transform the customer experience. … Using connected solutions, you can identify and reward your best customers by offering perks, reduced wait times, and/or shorter lines.” - -Those kinds of personalized customer experiences can potentially boost customer loyalty and increase revenue, Mesirow said, adding that the technology can also make staff deployments more efficient and “enhance safety by identifying trespassers and criminals who are tampering with company property.” - -**Reality check:** Creating a great customer experience is critical for businesses today, and this kind of personalized targeting promises to make it more efficient and effective. However, it has to be done in a way that makes customers comfortable and not creeped out. Privacy concerns are very real, especially when it comes to working with facial recognition and other kinds of surveillance technology. For example, [San Francisco recently banned city agencies from using facial recognition][9], and others may follow. - -**More on IoT:** - - * [What is the IoT? How the internet of things works][10] - * [What is edge computing and how it’s changing the network][11] - * [Most powerful Internet of Things companies][12] - * [10 Hot IoT startups to watch][13] - * [The 6 ways to make money in IoT][14] - * [What is digital twin technology? [and why it matters]][15] - * [Blockchain, service-centric networking key to IoT success][16] - * [Getting grounded in IoT networking and security][17] - * [Building IoT-ready networks must become a priority][18] - * [What is the Industrial IoT? [And why the stakes are so high]][19] - - - -Join the Network World communities on [Facebook][20] and [LinkedIn][21] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3396128/the-state-of-enterprise-iot-companies-want-solutions-for-these-4-areas.html - -作者:[Fredric Paul][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://www.networkworld.com/author/Fredric-Paul/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/02/iot_internet_of_things_by_jackie_niam_gettyimages-996958260_2400x1600-100788446-large.jpg -[2]: https://digital.pwc.com/content/pwc-digital/en/products/connected-solutions.html#get-connected -[3]: https://www.networkworld.com/article/3309420/forget-smart-homes-the-new-goal-is-autonomous-buildings.html -[4]: https://www.statista.com/statistics/370350/internet-of-things-installed-base-by-category/) -[5]: https://iot-analytics.com/top-10-iot-segments-2018-real-iot-projects/ -[6]: https://www.digitalpulse.pwc.com.au/five-unexpected-ways-internet-of-things/ -[7]: https://digital.pwc.com/content/pwc-digital/en/products/connected-solutions.html -[8]: https://www.ahla.com/ -[9]: https://www.nytimes.com/2019/05/14/us/facial-recognition-ban-san-francisco.html -[10]: https://www.networkworld.com/article/3207535/internet-of-things/what-is-the-iot-how-the-internet-of-things-works.html -[11]: https://www.networkworld.com/article/3224893/internet-of-things/what-is-edge-computing-and-how-it-s-changing-the-network.html -[12]: https://www.networkworld.com/article/2287045/internet-of-things/wireless-153629-10-most-powerful-internet-of-things-companies.html -[13]: https://www.networkworld.com/article/3270961/internet-of-things/10-hot-iot-startups-to-watch.html -[14]: https://www.networkworld.com/article/3279346/internet-of-things/the-6-ways-to-make-money-in-iot.html -[15]: https://www.networkworld.com/article/3280225/internet-of-things/what-is-digital-twin-technology-and-why-it-matters.html -[16]: https://www.networkworld.com/article/3276313/internet-of-things/blockchain-service-centric-networking-key-to-iot-success.html -[17]: https://www.networkworld.com/article/3269736/internet-of-things/getting-grounded-in-iot-networking-and-security.html -[18]: https://www.networkworld.com/article/3276304/internet-of-things/building-iot-ready-networks-must-become-a-priority.html -[19]: https://www.networkworld.com/article/3243928/internet-of-things/what-is-the-industrial-iot-and-why-the-stakes-are-so-high.html -[20]: https://www.facebook.com/NetworkWorld/ -[21]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190522 Experts- Enterprise IoT enters the mass-adoption phase.md b/sources/talk/20190522 Experts- Enterprise IoT enters the mass-adoption phase.md deleted file mode 100644 index 86d7bf0efe..0000000000 --- a/sources/talk/20190522 Experts- Enterprise IoT enters the mass-adoption phase.md +++ /dev/null @@ -1,78 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Experts: Enterprise IoT enters the mass-adoption phase) -[#]: via: (https://www.networkworld.com/article/3397317/experts-enterprise-iot-enters-the-mass-adoption-phase.html) -[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) - -Experts: Enterprise IoT enters the mass-adoption phase -====== -Dropping hardware prices, 5G boost business internet-of-things deployments; technical complexity encourages partnerships. -![Avgust01 / Getty Images][1] - -[IoT][2] in general has taken off quickly over the past few years, but experts at the recent IoT World highlighted that the enterprise part of the market has been particularly robust of late – it’s not just an explosion of connected home gadgets anymore. - -Donna Moore, chairwoman of the LoRa Alliance, an industry group that works to develop and scale low-power WAN technology for mass usage, said on a panel that she’s never seen growth this fast in the sector. “I’d say we’re now in the early mass adopters [stage],” she said. - -**More on IoT:** - - * [Most powerful Internet of Things companies][3] - * [10 Hot IoT startups to watch][4] - * [The 6 ways to make money in IoT][5] - * [What is digital twin technology? [and why it matters]][6] - * [Blockchain, service-centric networking key to IoT success][7] - * [Getting grounded in IoT networking and security][8] - * [Building IoT-ready networks must become a priority][9] - * [What is the Industrial IoT? [And why the stakes are so high]][10] - - - -The technology itself has pushed adoption to these heights, said Graham Trickey, head of IoT for the GSMA, a trade organization for mobile network operators. Along with price drops for wireless connectivity modules, the array of upcoming technologies nestling under the umbrella label of [5G][11] could simplify the process of connecting devices to [edge-computing][12] hardware – and the edge to the cloud or [data center][13]. - -“Mobile operators are not just providers of connectivity now, they’re farther up the stack,” he said. Technologies like narrow-band IoT and support for highly demanding applications like telehealth are all set to be part of the final 5G spec. - -### Partnerships needed to deal with IoT complexity** - -** - -That’s not to imply that there aren’t still huge tasks facing both companies trying to implement their own IoT frameworks and the creators of the technology underpinning them. For one thing, IoT tech requires a huge array of different sets of specialized knowledge. - -“That means partnerships, because you need an expert in your [vertical] area to know what you’re looking for, you need an expert in communications, and you might need a systems integrator,” said Trickey. - -Phil Beecher, the president and CEO of the Wi-SUN Alliance (the acronym stands for Smart Ubiquitous Networks, and the group is heavily focused on IoT for the utility sector), concurred with that, arguing that broad ecosystems of different technologies and different partners would be needed. “There’s no one technology that’s going to solve all these problems, no matter how much some parties might push it,” he said. - -One of the central problems – [IoT security][14] – is particularly dear to Beecher’s heart, given the consequences of successful hacks of the electrical grid or other utilities. More than one panelist praised the passage of the EU’s General Data Protection Regulation, saying that it offered concrete guidelines for entities developing IoT tech – a crucial consideration for some companies that may not have a lot of in-house expertise in that area. - -Join the Network World communities on [Facebook][15] and [LinkedIn][16] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3397317/experts-enterprise-iot-enters-the-mass-adoption-phase.html - -作者:[Jon Gold][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://www.networkworld.com/author/Jon-Gold/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/02/iot_internet_of_things_mobile_connections_by_avgust01_gettyimages-1055659210_2400x1600-100788447-large.jpg -[2]: https://www.networkworld.com/article/3207535/what-is-iot-how-the-internet-of-things-works.html -[3]: https://www.networkworld.com/article/2287045/internet-of-things/wireless-153629-10-most-powerful-internet-of-things-companies.html -[4]: https://www.networkworld.com/article/3270961/internet-of-things/10-hot-iot-startups-to-watch.html -[5]: https://www.networkworld.com/article/3279346/internet-of-things/the-6-ways-to-make-money-in-iot.html -[6]: https://www.networkworld.com/article/3280225/internet-of-things/what-is-digital-twin-technology-and-why-it-matters.html -[7]: https://www.networkworld.com/article/3276313/internet-of-things/blockchain-service-centric-networking-key-to-iot-success.html -[8]: https://www.networkworld.com/article/3269736/internet-of-things/getting-grounded-in-iot-networking-and-security.html -[9]: https://www.networkworld.com/article/3276304/internet-of-things/building-iot-ready-networks-must-become-a-priority.html -[10]: https://www.networkworld.com/article/3243928/internet-of-things/what-is-the-industrial-iot-and-why-the-stakes-are-so-high.html -[11]: https://www.networkworld.com/article/3203489/what-is-5g-how-is-it-better-than-4g.html -[12]: https://www.networkworld.com/article/3224893/what-is-edge-computing-and-how-it-s-changing-the-network.html?nsdr=true -[13]: https://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html -[14]: https://www.networkworld.com/article/3269736/getting-grounded-in-iot-networking-and-security.html -[15]: https://www.facebook.com/NetworkWorld/ -[16]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190522 The Traffic Jam Whopper project may be the coolest-dumbest IoT idea ever.md b/sources/talk/20190522 The Traffic Jam Whopper project may be the coolest-dumbest IoT idea ever.md deleted file mode 100644 index be8a4833cc..0000000000 --- a/sources/talk/20190522 The Traffic Jam Whopper project may be the coolest-dumbest IoT idea ever.md +++ /dev/null @@ -1,97 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The Traffic Jam Whopper project may be the coolest/dumbest IoT idea ever) -[#]: via: (https://www.networkworld.com/article/3396188/the-traffic-jam-whopper-project-may-be-the-coolestdumbest-iot-idea-ever.html) -[#]: author: (Fredric Paul https://www.networkworld.com/author/Fredric-Paul/) - -The Traffic Jam Whopper project may be the coolest/dumbest IoT idea ever -====== -Burger King uses real-time IoT data to deliver burgers to drivers stuck in traffic — and it seems to be working. -![Mike Mozart \(CC BY 2.0\)][1] - -People love to eat in their cars. That’s why we invented the drive-in and the drive-thru. - -But despite a fast-food outlet on the corner of every major intersection, it turns out we were only scratching the surface of this idea. Burger King is taking this concept to the next logical step with its new IoT-powered Traffic Jam Whopper project. - -I have to admit, when I first heard about this, I thought it was a joke, but apparently the [Traffic Jam Whopper project is totally real][2] and has already passed a month-long test in Mexico City. While the company hasn’t specified a timeline, it plans to roll out the Traffic Jam Whopper project in Los Angeles (where else?) and other traffic-plagued megacities such as São Paulo and Shanghai. - -**[ Also read:[Is IoT in the enterprise about making money or saving money?][3] | Get regularly scheduled insights: [Sign up for Network World newsletters][4] ]** - -### How Burger King's Traffic Jam Whopper project works - -According to [Nations Restaurant News][5], this is how Burger King's Traffic Jam Whopper project works: - -The project uses real-time data to target hungry drivers along congested roads and highways for food delivery by couriers on motorcycles. - -The system leverages push notifications to the Burger King app and personalized messaging on digital billboards positioned along busy roads close to a Burger King restaurant. - -[According to the We Believers agency][6] that put it all together, “By leveraging traffic and drivers’ real-time data [location and speed], we adjusted our billboards’ location and content, displaying information about the remaining time in traffic to order, and personalized updates about deliveries in progress.” The menu is limited to Whopper Combos to speed preparation (though the company plans to offer a wider menu as it works out the kinks). - -**[[Become a Microsoft Office 365 administrator in record time with this quick start course from PluralSight.][7] ]** - -The company said orders in Mexico City were delivered in an average of 15 minutes. Fortunately (or unfortunately, depending on how you look at it) many traffic jams hold drivers captive for far longer than that. - -Once the order is ready, the motorcyclist uses Google maps and GPS technology embedded into the app to locate the car that made the order. The delivery person then weaves through traffic to hand over the Whopper. (Lane-splitting is legal in California, but I have no idea if there are other potential safety or law-enforcement issues involved here. For drivers ordering burgers, at least, the Burger King app supports voice ordering. I also don’t know what happens if traffic somehow clears up before the burger arrives.) - -Here’s a video of the pilot program in Mexico City: - -#### **New technology = > new opportunities** - -Even more amazing, this is not _just_ a publicity stunt. NRN quotes Bruno Cardinali, head of marketing for Burger King Latin America and Caribbean, claiming the project boosted sales during rush hour, when app orders are normally slow: - -“Thanks to The Traffic Jam Whopper campaign, we’ve increased deliveries by 63% in selected locations across the month of April, adding a significant amount of orders per restaurant per day, just during rush hours." - -If nothing else, this project shows that creative thinking really can leverage IoT technology into new businesses. In this case, it’s turning notoriously bad traffic—pretty much required for this process to work—from a problem into an opportunity to generate additional sales during slow periods. - -**More on IoT:** - - * [What is the IoT? How the internet of things works][8] - * [What is edge computing and how it’s changing the network][9] - * [Most powerful Internet of Things companies][10] - * [10 Hot IoT startups to watch][11] - * [The 6 ways to make money in IoT][12] - * [What is digital twin technology? [and why it matters]][13] - * [Blockchain, service-centric networking key to IoT success][14] - * [Getting grounded in IoT networking and security][15] - * [Building IoT-ready networks must become a priority][16] - * [What is the Industrial IoT? [And why the stakes are so high]][17] - - - -Join the Network World communities on [Facebook][18] and [LinkedIn][19] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3396188/the-traffic-jam-whopper-project-may-be-the-coolestdumbest-iot-idea-ever.html - -作者:[Fredric Paul][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://www.networkworld.com/author/Fredric-Paul/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/05/burger-king-gift-card-100797164-large.jpg -[2]: https://abc7news.com/food/burger-king-to-deliver-to-drivers-stuck-in-traffic/5299073/ -[3]: https://www.networkworld.com/article/3343917/the-big-picture-is-iot-in-the-enterprise-about-making-money-or-saving-money.html -[4]: https://www.networkworld.com/newsletters/signup.html -[5]: https://www.nrn.com/technology/tech-tracker-burger-king-deliver-la-motorists-stuck-traffic?cid= -[6]: https://www.youtube.com/watch?v=LXNgEZV7lNg -[7]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fadministering-office-365-quick-start -[8]: https://www.networkworld.com/article/3207535/internet-of-things/what-is-the-iot-how-the-internet-of-things-works.html -[9]: https://www.networkworld.com/article/3224893/internet-of-things/what-is-edge-computing-and-how-it-s-changing-the-network.html -[10]: https://www.networkworld.com/article/2287045/internet-of-things/wireless-153629-10-most-powerful-internet-of-things-companies.html -[11]: https://www.networkworld.com/article/3270961/internet-of-things/10-hot-iot-startups-to-watch.html -[12]: https://www.networkworld.com/article/3279346/internet-of-things/the-6-ways-to-make-money-in-iot.html -[13]: https://www.networkworld.com/article/3280225/internet-of-things/what-is-digital-twin-technology-and-why-it-matters.html -[14]: https://www.networkworld.com/article/3276313/internet-of-things/blockchain-service-centric-networking-key-to-iot-success.html -[15]: https://www.networkworld.com/article/3269736/internet-of-things/getting-grounded-in-iot-networking-and-security.html -[16]: https://www.networkworld.com/article/3276304/internet-of-things/building-iot-ready-networks-must-become-a-priority.html -[17]: https://www.networkworld.com/article/3243928/internet-of-things/what-is-the-industrial-iot-and-why-the-stakes-are-so-high.html -[18]: https://www.facebook.com/NetworkWorld/ -[19]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190523 Benchmarks of forthcoming Epyc 2 processor leaked.md b/sources/talk/20190523 Benchmarks of forthcoming Epyc 2 processor leaked.md deleted file mode 100644 index 61ae9e656b..0000000000 --- a/sources/talk/20190523 Benchmarks of forthcoming Epyc 2 processor leaked.md +++ /dev/null @@ -1,55 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Benchmarks of forthcoming Epyc 2 processor leaked) -[#]: via: (https://www.networkworld.com/article/3397081/benchmarks-of-forthcoming-epyc-2-processor-leaked.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Benchmarks of forthcoming Epyc 2 processor leaked -====== -Benchmarks of AMD's second-generation Epyc server briefly found their way online and show the chip is larger but a little slower than the Epyc 7601 on the market now. -![Gordon Mah Ung][1] - -Benchmarks of engineering samples of AMD's second-generation Epyc server, code-named “Rome,” briefly found their way online and show a very beefy chip running a little slower than its predecessor. - -Rome is based on the Zen 2 architecture, believed to be more of an incremental improvement over the prior generation than a major leap. It’s already known that Rome would feature a 64-core, 128-thread design, but that was about all of the details. - -**[ Also read:[Who's developing quantum computers][2] ]** - -The details came courtesy of SiSoftware's Sandra PC analysis and benchmarking tool. It’s very popular and has been used by hobbyists and benchmarkers alike for more than 20 years. New benchmarks are uploaded to the Sandra database all the time, and what I suspect happened is someone running a Rome sample ran the benchmark, not realizing the results would be uploaded to the Sandra database. - -The benchmarks were from two different servers, a Dell PowerEdge R7515 and a Super Micro Super Server. The Dell product number is not on the market, so this would indicate a future server with Rome processors. The entry has since been deleted, but several sites, including the hobbyist site Tom’s Hardware Guide, managed to [take a screenshot][3]. - -According to the entry, the chip is a mid-range processor with a base clock speed of 1.4GHz, jumping up to 2.2GHz in turbo mode, with 16MB of Level 2 cache and 256MB of Level 3 cache, the latter of which is crazy. The first-generation Epyc had just 32MB of L3 cache. - -That’s a little slower than the Epyc 7601 on the market now, but when you double the number of cores in the same space, something’s gotta give, and in this case, it’s electricity. The thermal envelope was not revealed by the benchmark. Previous Epyc processors ranged from 120 watts to 180 watts. - -Sandra ranked the processor at #3 for arithmetic and #5 for multimedia processing, which makes me wonder what on Earth beat the Rome chip. Interestingly, the servers were running Windows 10, not Windows Server 2019. - -**[[Get certified as an Apple Technical Coordinator with this seven-part online course from PluralSight.][4] ]** - -Rome is expected to be officially launched at the massive Computex trade show in Taiwan on May 27 and will begin shipping in the third quarter of the year. - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3397081/benchmarks-of-forthcoming-epyc-2-processor-leaked.html - -作者:[Andy Patrizio][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://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2018/11/rome_2-100779395-large.jpg -[2]: https://www.networkworld.com/article/3275385/who-s-developing-quantum-computers.html -[3]: https://www.tomshardware.co.uk/amd-epyc-rome-processor-data-center,news-60265.html -[4]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fapple-certified-technical-trainer-10-11 -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190523 Edge-based caching and blockchain-nodes speed up data transmission.md b/sources/talk/20190523 Edge-based caching and blockchain-nodes speed up data transmission.md deleted file mode 100644 index 54ddf76db3..0000000000 --- a/sources/talk/20190523 Edge-based caching and blockchain-nodes speed up data transmission.md +++ /dev/null @@ -1,74 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Edge-based caching and blockchain-nodes speed up data transmission) -[#]: via: (https://www.networkworld.com/article/3397105/edge-based-caching-and-blockchain-nodes-speed-up-data-transmission.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -Edge-based caching and blockchain-nodes speed up data transmission -====== -Using a combination of edge-based data caches and blockchain-like distributed networks, Bluzelle claims it can significantly speed up the delivery of data across the globe. -![OlgaSalt / /getty][1] - -The combination of a blockchain-like distributed network, along with the ability to locate data at the edge will massively speed up future networks, such as those used by the internet of things (IoT), claims Bluzelle in announcing what is says is the first decentralized data delivery network (DDN). - -Distributed DDNs will be like content delivery networks (CDNs) that now cache content around the world to speed up the web, but in this case, it will be for data, the Singapore-based company explains. Distributed key-value (blockchain) networks and edge computing built into Bluzelle's system will provide significantly faster delivery than existing caching, the company claims in a press release announcing its product. - -“The future of data delivery can only ever be de-centrally distributed,” says Pavel Bains, CEO and co-founder of Bluzelle. It’s because the world requires instant access to data that’s being created at the edge, he argues. - -“But delivery is hampered by existing technology,” he says. - -**[ Also read:[What is edge computing?][2] and [How edge networking and IoT will reshape data centers][3]. ]** - -Bluzelle says decentralized caching is the logical next step to generalized data caching, used for reducing latency. “Decentralized caching expands the theory of caching,” the company writes in a [report][4] (Dropbox pdf) on its [website][5]. It says the cache must be expanded from simply being located at one unique location. - -“Using a combination of distributed networks, the edge and the cloud, [it’s] thereby increasing the transactional throughput of data,” the company says. - -This kind of thing is particularly important in consumer gaming now, where split-second responses from players around the world make or break a game experience, but it will likely be crucial for the IoT, higher-definition media, artificial intelligence, and virtual reality as they gain more of a role in digitization—including at critical enterprise applications. - -“Currently applications are limited to data caching technologies that require complex configuration and management of 10-plus-year-old technology constrained to a few data centers,” Bains says. “These were not designed to handle the ever-increasing volumes of data.” - -Bains says one of the key selling points of Bluzelle's network is that developers should be able to implement and run networks without having to also physically expand the networks manually. - -“Software developers don’t want to react to where their customers come from. Our architecture is designed to always have the data right where the customer is. This provides a superior consumer experience,” he says. - -Data caches are around now, but Bluzelle claims its system, written in C++ and available on Linux and Docker containers, among other platforms, is faster than others. It further says that if its system and a more traditional cache would connect to the same MySQL database in Virginia, say, their users will get the data three to 16 times faster than a traditional “non-edge-caching” network. Write updates to all Bluzelle nodes around the world takes 875 milliseconds (ms), it says. - -The company has been concentrating its efforts on gaming, and with a test setup in Virginia, it says it was able to deliver data 33 times faster—at 22ms to Singapore—than a normal, cloud-based data cache. That traditional cache (located near the database) took 727ms in the Bluzelle-published test. In a test to Ireland, it claims 16ms over 223ms using a traditional cache. - -An algorithm is partly the reason for the gains, the company explains. It “allows the nodes to make decisions and take actions without the need for masternodes,” the company says. Masternodes are the server-like parts of blockchain systems. - -**More about edge networking** - - * [How edge networking and IoT will reshape data centers][3] - * [Edge computing best practices][6] - * [How edge computing can help secure the IoT][7] - - - -Join the Network World communities on [Facebook][8] and [LinkedIn][9] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3397105/edge-based-caching-and-blockchain-nodes-speed-up-data-transmission.html - -作者:[Patrick Nelson][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://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/02/blockchain_crypotocurrency_bitcoin-by-olgasalt-getty-100787949-large.jpg -[2]: https://www.networkworld.com/article/3224893/internet-of-things/what-is-edge-computing-and-how-it-s-changing-the-network.html -[3]: https://www.networkworld.com/article/3291790/data-center/how-edge-networking-and-iot-will-reshape-data-centers.html -[4]: https://www.dropbox.com/sh/go5bnhdproy1sk5/AAC5MDoafopFS7lXUnmiLAEFa?dl=0&preview=Bluzelle+Report+-+The+Decentralized+Internet+Is+Here.pdf -[5]: https://bluzelle.com/ -[6]: https://www.networkworld.com/article/3331978/lan-wan/edge-computing-best-practices.html -[7]: https://www.networkworld.com/article/3331905/internet-of-things/how-edge-computing-can-help-secure-the-iot.html -[8]: https://www.facebook.com/NetworkWorld/ -[9]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190523 Online performance benchmarks all companies should try to achieve.md b/sources/talk/20190523 Online performance benchmarks all companies should try to achieve.md deleted file mode 100644 index 829fb127f8..0000000000 --- a/sources/talk/20190523 Online performance benchmarks all companies should try to achieve.md +++ /dev/null @@ -1,80 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Online performance benchmarks all companies should try to achieve) -[#]: via: (https://www.networkworld.com/article/3397322/online-performance-benchmarks-all-companies-should-try-to-achieve.html) -[#]: author: (Zeus Kerravala https://www.networkworld.com/author/Zeus-Kerravala/) - -Online performance benchmarks all companies should try to achieve -====== -With digital performance more important than ever, companies must ensure their online performance meets customers’ needs. A new ThousandEyes report can help them determine that. -![Thinkstock][1] - -There's no doubt about it: We have entered the experience economy, and digital performance is more important than ever. - -Customer experience is the top brand differentiator, topping price and every other factor. And businesses that provide a poor digital experience will find customers will actively seek a competitor. In fact, recent ZK Research found that in 2018, about two-thirds of millennials changed loyalties to a brand because of a bad experience. (Note: I am an employee of ZK Research.) - -To help companies determine if their online performance is leading, lacking, or on par with some of the top companies, ThousandEyes this week released its [2019 Digital Experience Performance Benchmark Report][2]. This document provides a comparative analysis of web, infrastructure, and network performance from the top 20 U.S. digital retail, travel, and media websites. Although this is a small sampling of companies, those three industries are the most competitive when it comes to using their digital platforms for competitive advantage. The aggregated data from this report can be used as an industry-agnostic performance benchmark that all companies should strive to meet. - -**[ Read also:[IoT providers need to take responsibility for performance][3] ]** - -The methodology of the study was for ThousandEyes to use its own platform to provide an independent view of performance. It uses active monitoring and a global network of monitoring agents to measure application and network layer performance for websites, applications, and services. The company collected data from 36 major cities scattered across the U.S. Six of the locations (Ashburn, Chicago, Dallas, Los Angeles, San Jose, and Seattle) also included vantage points connected to six major broadband ISPs (AT&T, CenturyLink, Charter, Comcast, Cox, and Verizon). This acts as a good proxy for what a user would experience. - -The test involved page load tests against the websites of the major companies in retail, media, and travel and looked at several factors, including DNS response time, round-trip latency, network time (one-way latency), HTTP response time, and page load. The averages and median times can be seen in the table below. Those can be considered the average benchmarks that all companies should try to attain. - -![][4] - -### Choice of content delivery network matters by location - -ThousandEyes' report also looked at how the various services that companies use impacts web performance. For example, the study measured the performance of the content delivery network (CDN) providers in the 36 markets. It found that in Albuquerque, Akamai and Fastly had the most latency, whereas Edgecast had the least. It also found that in Boston, all of the CDN providers were close. Companies can use this type of data to help them select a CDN. Without it, decision makers are essentially guessing and hoping. - -### CDN performance is impacted by ISP - -Another useful set of data was cross-referencing CDN performance by ISP, which lead to some fascinating information. With Comcast, Akamai, Cloudfront, Google and Incapula all had high amounts of latency. Only Edgecast and Fastly offered average latency. On the other hand, all of the CDNs worked great with CenturyLink. This tells a buyer, "If my customer base is largely in Comcast’s footprint, I should look at Edgecast or Fastly or my customers will be impacted." - -### DNS and latency directly impact page load times - -The ThousandEyes study also confirmed some points that many people believe as true but until now had no quantifiable evidence to support it. For example, it's widely accepted that DNS response time and network latency to the CDN edge correlate to web performance; the data in the report now supports that belief. ThousandEyes did some regression analysis and fancy math and found that in general, companies that were in the top quartile of HTTP performance had above-average DNS response time and network performance. There were a few exceptions, but in most cases, this is true. - -Based on all the data, the below are the benchmarks for the three infrastructure metrics gathered and is what businesses, even ones outside the three verticals studied, should hope to achieve to support a high-quality digital experience. - - * DNS response time 25 ms - * Round trip network latency 15 ms - * HTTP response time 250 ms - - - -### Operations teams need to focus on digital performance - -Benchmarking certainly provides value, but the report also offers some recommendations on how operations teams can use the data to improve digital performance. Those include: - - * **Measure site from distributed user vantage points**. There is no single point that will provide a view of digital performance everywhere. Instead, measure from a range of ISPs in different regions and take a multi-layered approach to visibility (application, network and routing). - * **Use internet performance information as a baseline**. Compare your organization's data to the baselines, and if you’re not meeting it in some markets, focus on improvement there. - * **Compare performance to industry peers**. In highly competitive industries, it’s important to understand how you rank versus the competition. Don’t be satisfied with hitting the benchmarks if your key competitors exceed them. - * **Build a strong performance stack.** The data shows that solid DNS and HTTP response times and low latency are correlated to solid page load times. Focus on optimizing those factors and consider them foundational to digital performance. - - - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3397322/online-performance-benchmarks-all-companies-should-try-to-achieve.html - -作者:[Zeus Kerravala][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://www.networkworld.com/author/Zeus-Kerravala/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2017/07/racing_speed_runners_internet-speed-100728363-large.jpg -[2]: https://www.thousandeyes.com/research/digital-experience -[3]: https://www.networkworld.com/article/3340318/iot-providers-need-to-take-responsibility-for-performance.html -[4]: https://images.idgesg.net/images/article/2019/05/thousandeyes-100797290-large.jpg -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190523 Study- Most enterprise IoT transactions are unencrypted.md b/sources/talk/20190523 Study- Most enterprise IoT transactions are unencrypted.md deleted file mode 100644 index 51098dad33..0000000000 --- a/sources/talk/20190523 Study- Most enterprise IoT transactions are unencrypted.md +++ /dev/null @@ -1,93 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Study: Most enterprise IoT transactions are unencrypted) -[#]: via: (https://www.networkworld.com/article/3396647/study-most-enterprise-iot-transactions-are-unencrypted.html) -[#]: author: (Tim Greene https://www.networkworld.com/author/Tim-Greene/) - -Study: Most enterprise IoT transactions are unencrypted -====== -A Zscaler report finds 91.5% of IoT communications within enterprises are in plaintext and so susceptible to interference. -![HYWARDS / Getty Images][1] - -Of the millions of enterprise-[IoT][2] transactions examined in a recent study, the vast majority were sent without benefit of encryption, leaving the data vulnerable to theft and tampering. - -The research by cloud-based security provider Zscaler found that about 91.5 percent of transactions by internet of things devices took place over plaintext, while 8.5 percent were encrypted with [SSL][3]. That means if attackers could intercept the unencrypted traffic, they’d be able to read it and possibly alter it, then deliver it as if it had not been changed. - -**[ For more on IoT security, see[our corporate guide to addressing IoT security concerns][4]. | Get regularly scheduled insights by [signing up for Network World newsletters][5]. ]** - -Researchers looked through one month’s worth of enterprise traffic traversing Zscaler’s cloud seeking the digital footprints of IoT devices. It found and analyzed 56 million IoT-device transactions over that time, and identified the type of devices, protocols they used, the servers they communicated with, how often communication went in and out and general IoT traffic patterns. - -The team tried to find out which devices generate the most traffic and the threats they face. It discovered that 1,015 organizations had at least one IoT device. The most common devices were set-top boxes (52 percent), then smart TVs (17 percent), wearables (8 percent), data-collection terminals (8 percent), printers (7 percent), IP cameras and phones (5 percent) and medical devices (1 percent). - -While they represented only 8 percent of the devices, data-collection terminals generated 80 percent of the traffic. - -The breakdown is that 18 percent of the IoT devices use SSL to communicate all the time, and of the remaining 82 percent, half used it part of the time and half never used it. -The study also found cases of plaintext HTTP being used to authenticate devices and to update software and firmware, as well as use of outdated crypto libraries and weak default credentials. - -While IoT devices are common in enterprises, “many of the devices are employee owned, and this is just one of the reasons they are a security concern,” the report says. Without strict policies and enforcement, these devices represent potential vulnerabilities. - -**[[Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][6] ]** - -Another reason employee-owned IoT devices are a concern is that many businesses don’t consider them a threat because no data is stored on them. But if the data they gather is transmitted insecurely, it is at risk. - -### 5 tips to protect enterprise IoT - -Zscaler recommends these security precautions: - - * Change default credentials to something more secure. As employees bring in devices, encourage them to use strong passwords and to keep their firmware current. - * Isolate IoT devices on networks and restrict inbound and outbound network traffic. - * Restrict access to IoT devices from external networks and block unnecessary ports from external access. - * Apply regular security and firmware updates to IoT devices, and secure network traffic. - * Deploy tools to gain visibility of shadow-IoT devices already inside the network so they can be protected. - - - -**More on IoT:** - - * [What is edge computing and how it’s changing the network][7] - * [Most powerful Internet of Things companies][8] - * [10 Hot IoT startups to watch][9] - * [The 6 ways to make money in IoT][10] - * [What is digital twin technology? [and why it matters]][11] - * [Blockchain, service-centric networking key to IoT success][12] - * [Getting grounded in IoT networking and security][13] - * [Building IoT-ready networks must become a priority][14] - * [What is the Industrial IoT? [And why the stakes are so high]][15] - - - -Join the Network World communities on [Facebook][16] and [LinkedIn][17] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3396647/study-most-enterprise-iot-transactions-are-unencrypted.html - -作者:[Tim Greene][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://www.networkworld.com/author/Tim-Greene/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/05/network_security_network_traffic_scanning_by_hywards_gettyimages-673891964_2400x1600-100796830-large.jpg -[2]: https://www.networkworld.com/article/3207535/what-is-iot-how-the-internet-of-things-works.html -[3]: https://www.networkworld.com/article/3045953/5-things-you-need-to-know-about-ssl.html -[4]: https://www.networkworld.com/article/3269165/internet-of-things/a-corporate-guide-to-addressing-iot-security-concerns.html -[5]: https://www.networkworld.com/newsletters/signup.html -[6]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr -[7]: https://www.networkworld.com/article/3224893/internet-of-things/what-is-edge-computing-and-how-it-s-changing-the-network.html -[8]: https://www.networkworld.com/article/2287045/internet-of-things/wireless-153629-10-most-powerful-internet-of-things-companies.html -[9]: https://www.networkworld.com/article/3270961/internet-of-things/10-hot-iot-startups-to-watch.html -[10]: https://www.networkworld.com/article/3279346/internet-of-things/the-6-ways-to-make-money-in-iot.html -[11]: https://www.networkworld.com/article/3280225/internet-of-things/what-is-digital-twin-technology-and-why-it-matters.html -[12]: https://www.networkworld.com/article/3276313/internet-of-things/blockchain-service-centric-networking-key-to-iot-success.html -[13]: https://www.networkworld.com/article/3269736/internet-of-things/getting-grounded-in-iot-networking-and-security.html -[14]: https://www.networkworld.com/article/3276304/internet-of-things/building-iot-ready-networks-must-become-a-priority.html -[15]: https://www.networkworld.com/article/3243928/internet-of-things/what-is-the-industrial-iot-and-why-the-stakes-are-so-high.html -[16]: https://www.facebook.com/NetworkWorld/ -[17]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190528 Analysing D Code with KLEE.md b/sources/talk/20190528 Analysing D Code with KLEE.md deleted file mode 100644 index c93f6e2b8d..0000000000 --- a/sources/talk/20190528 Analysing D Code with KLEE.md +++ /dev/null @@ -1,680 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Analysing D Code with KLEE) -[#]: via: (https://theartofmachinery.com/2019/05/28/d_and_klee.html) -[#]: author: (Simon Arneaud https://theartofmachinery.com) - -Analysing D Code with KLEE -====== - -[KLEE][1] is symbolic execution engine that can rigorously verify or find bugs in software. It’s designed for C and C++, but it’s just an interpreter for LLVM bitcode combined with theorem prover backends, so it can work with bitcode generated by `ldc2`. One catch is that it needs a compatible bitcode port of the D runtime to run normal D code. I’m still interested in getting KLEE to work with normal D code, but for now I’ve done some experiments with `-betterC` D. - -### How KLEE works - -What makes KLEE special is its support for two kinds of variables: concrete and symbolic. Concrete variables are just like the normal variables in normal code: they have a deterministic value at any given point in the program. On the other hand, symbolic variables contain a bundle of logical constraints instead of values. Take this code: - -``` -int x = klee_int("x"); -klee_assume(x >= 0); -if (x > 42) -{ - doA(x); -} -else -{ - doB(x); - assert (3 * x != 21); -} -``` - -`klee_int("x")` creates a symbolic integer that will be called “`x`” in output reports. Initially it has no contraints and can imply any value that a 32b signed integer can have. `klee_assume(x >= 0)` tells KLEE to add `x >= 0` as a constraint, so now we’re only analysing the code for non-negative 32b signed integers. On hitting the `if`, KLEE checks if both branches are possible. Sure enough, `x > 42` can be true or false even with the constraint `x >= 0`, so KLEE has to _fork_. We now have two processes being interpreted on the VM: one executing `doA()` while `x` holds the constraints `x >= 0, x > 42`, and another executing `doB()` while `x` holds the contraints `x >= 0, x <= 42`. The second process will hit the `assert` statement, and KLEE will try to prove or disprove `3 * x != 21` using the assumptions `x >= 0, x <= 42` — in this case it will disprove it and report a bug with `x = 7` as a crashing example. - -### First steps - -Here’s a toy example just to get things working. Suppose we have a function that makes an assumption for a performance optimisation. Thankfully the assumption is made explicit with `assert` and is documented with a comment. Is the assumption valid? - -``` -int foo(int x) -{ - // 17 is a prime number, so let's use it as a sentinel value for an awesome optimisation - assert (x * x != 17); - // ... - return x; -} -``` - -Here’s a KLEE test rig. The KLEE function declarations and the `main()` entry point need to have `extern(C)` linkage, but anything else can be normal D code as long as it compiles under `-betterC`: - -``` -extern(C): - -int klee_int(const(char*) name); - -int main() -{ - int x = klee_int("x"); - foo(x); - return 0; -} -``` - -It turns out there’s just one (frustrating) complication with running `-betterC` D under KLEE. In D, `assert` is handled specially by the compiler. By default, it throws an `Error`, but for compatibility with KLEE, I’m using the `-checkaction=C` flag. In C, `assert` is usually a macro that translates to code that calls some backend implementation. That implementation isn’t standardised, so of course various C libraries work differently. `ldc2` actually has built-in logic for implementing `-checkaction=C` correctly depending on the C library used. - -KLEE uses a port of [uClibc][2], which translates `assert()` to a four-parameter `__assert()` function, which conflicts with the three-parameter `__assert()` function in other implementations. `ldc2` uses LLVM’s (target) `Triple` type for choosing an `assert()` implementation configuration, but that doesn’t recognise uClibc. As a hacky workaround, I’m telling `ldc2` to compile for Musl, which “tricks” it into using an `__assert_fail()` implementation that KLEE happens to support as well. I’ve opened [an issue report][3]. - -Anyway, if we put all that code above into a file, we can compile it to KLEE-ready bitcode like this: - -``` -ldc2 -g -checkaction=C -mtriple=x86_64-linux-musl -output-bc -betterC -c first.d -``` - -`-g` is optional, but adds debug information that can be useful for later analysis. The KLEE developers recommend disabling compiler optimisations and letting KLEE do its own optimisations instead. - -Now to run KLEE: - -``` -$ klee first.bc -KLEE: output directory is "/tmp/klee-out-1" -KLEE: Using Z3 solver backend -warning: Linking two modules of different target triples: klee_int.bc' is 'x86_64-pc-linux-gnu' whereas 'first.bc' is 'x86_64--linux-musl' - -KLEE: ERROR: first.d:4: ASSERTION FAIL: x * x != 17 -KLEE: NOTE: now ignoring this error at this location - -KLEE: done: total instructions = 35 -KLEE: done: completed paths = 2 -KLEE: done: generated tests = 2 -``` - -Straight away, KLEE has found two execution paths through the program: a happy path, and a path that fails the assertion. Let’s see the results: - -``` -$ ls klee-last/ -assembly.ll -info -messages.txt -run.istats -run.stats -run.stats-journal -test000001.assert.err -test000001.kquery -test000001.ktest -test000002.ktest -warnings.txt -``` - -Here’s the example that triggers the happy path: - -``` -$ ktest-tool klee-last/test000002.ktest -ktest file : 'klee-last/test000002.ktest' -args : ['first.bc'] -num objects: 1 -object 0: name: 'x' -object 0: size: 4 -object 0: data: b'\x00\x00\x00\x00' -object 0: hex : 0x00000000 -object 0: int : 0 -object 0: uint: 0 -object 0: text: .... -``` - -Here’s the example that causes an assertion error: - -``` -$ cat klee-last/test000001.assert.err -Error: ASSERTION FAIL: x * x != 17 -File: first.d -Line: 4 -assembly.ll line: 32 -Stack: - #000000032 in _D5first3fooFiZi () at first.d:4 - #100000055 in main (=1, =94262044506880) at first.d:16 -$ ktest-tool klee-last/test000001.ktest -ktest file : 'klee-last/test000001.ktest' -args : ['first.bc'] -num objects: 1 -object 0: name: 'x' -object 0: size: 4 -object 0: data: b'\xe9&\xd33' -object 0: hex : 0xe926d333 -object 0: int : 869476073 -object 0: uint: 869476073 -object 0: text: .&.3 -``` - -So, KLEE has deduced that when `x` is 869476073, `x * x` does a 32b overflow to 17 and breaks the code. - -It’s overkill for this simple example, but `run.istats` can be opened with [KCachegrind][4] to view things like call graphs and source code coverage. (Unfortunately, coverage stats can be misleading because correct code won’t ever hit boundary check code inserted by the compiler.) - -### MurmurHash preimage - -Here’s a slightly more useful example. D currently uses 32b MurmurHash3 as its standard non-cryptographic hash function. What if we want to find strings that hash to a given special value? In general, we can solve problems like this by asserting that something doesn’t exist (i.e., a string that hashes to a given value) and then challenging the theorem prover to prove us wrong with a counterexample. - -Unfortunately, we can’t just use `hashOf()` directly without the runtime, but we can copy [the hash code from the runtime source][5] into its own module, and then import it into a test rig like this: - -``` -import dhash; - -extern(C): - -void klee_make_symbolic(void* addr, size_t nbytes, const(char*) name); -int klee_assume(ulong condition); - -int main() -{ - // Create a buffer for 8-letter strings and let KLEE manage it symbolically - char[8] s; - klee_make_symbolic(s.ptr, s.sizeof, "s"); - - // Constrain the string to be letters from a to z for convenience - foreach (j; 0..s.length) - { - klee_assume(s[j] > 'a' && s[j] <= 'z'); - } - - assert (dHash(cast(ubyte[])s) != 0xdeadbeef); - return 0; -} -``` - -Here’s how to compile and run it. Because we’re not checking correctness, we can use `-boundscheck=off` for a slight performance boost. It’s also worth enabling KLEE’s optimiser. - -``` -$ ldc2 -g -boundscheck=off -checkaction=C -mtriple=x86_64-linux-musl -output-bc -betterC -c dhash.d dhash_klee.d -$ llvm-link -o dhash_test.bc dhash.bc dhash_klee.bc -$ klee -optimize dhash_test.bc -``` - -It takes just over 4s: - -``` -$ klee-stats klee-last/ -------------------------------------------------------------------------- -| Path | Instrs| Time(s)| ICov(%)| BCov(%)| ICount| TSolver(%)| -------------------------------------------------------------------------- -|klee-last/| 168| 4.37| 87.50| 50.00| 160| 99.95| -------------------------------------------------------------------------- -``` - -And it actually works: - -``` -$ ktest-tool klee-last/test000001.ktest -ktest file : 'klee-last/test000001.ktest' -args : ['dhash_test.bc'] -num objects: 1 -object 0: name: 's' -object 0: size: 8 -object 0: data: b'psgmdxvq' -object 0: hex : 0x7073676d64787671 -object 0: int : 8175854546265273200 -object 0: uint: 8175854546265273200 -object 0: text: psgmdxvq -$ rdmd --eval 'writef("%x\n", hashOf("psgmdxvq"));' -deadbeef -``` - -For comparison, here’s a simple brute force version in plain D: - -``` -import std.stdio; - -void main() -{ - char[8] buffer; - - bool find(size_t idx) - { - if (idx == buffer.length) - { - auto hash = hashOf(buffer[]); - if (hash == 0xdeadbeef) - { - writeln(buffer[]); - return true; - } - return false; - } - - foreach (char c; 'a'..'z') - { - buffer[idx] = c; - auto is_found = find(idx + 1); - if (is_found) return true; - } - - return false; - } - - find(0); -} -``` - -This takes ~17s: - -``` -$ ldc2 -O3 -boundscheck=off hash_brute.d -$ time ./hash_brute -aexkaydh - -real 0m17.398s -user 0m17.397s -sys 0m0.001s -$ rdmd --eval 'writef("%x\n", hashOf("aexkaydh"));' -deadbeef -``` - -The constraint solver implementation is simpler to write, but is still faster because it can automatically do smarter things than calculating hashes of strings from scratch every iteration. - -### Binary search - -Now for an example of testing and debugging. Here’s an implementation of [binary search][6]: - -``` -bool bsearch(const(int)[] haystack, int needle) -{ - while (haystack.length) - { - auto mid_idx = haystack.length / 2; - if (haystack[mid_idx] == needle) return true; - if (haystack[mid_idx] < needle) - { - haystack = haystack[mid_idx..$]; - } - else - { - haystack = haystack[0..mid_idx]; - } - } - return false; -} -``` - -Does it work? Here’s a test rig: - -``` -extern(C): - -void klee_make_symbolic(void* addr, size_t nbytes, const(char*) name); -int klee_range(int begin, int end, const(char*) name); -int klee_assume(ulong condition); - -int main() -{ - // Making an array arr and an x to find in it. - // This time we'll also parameterise the array length. - // We have to apply klee_make_symbolic() to the whole buffer because of limitations in KLEE. - int[8] arr_buffer; - klee_make_symbolic(arr_buffer.ptr, arr_buffer.sizeof, "a"); - int len = klee_range(0, arr_buffer.length+1, "len"); - auto arr = arr_buffer[0..len]; - // Keeping the values in [0, 32) makes the output easier to read. - // (The binary-friendly limit 32 is slightly more efficient than 30.) - int x = klee_range(0, 32, "x"); - foreach (j; 0..arr.length) - { - klee_assume(arr[j] >= 0); - klee_assume(arr[j] < 32); - } - - // Make the array sorted. - // We don't have to actually sort the array. - // We can just tell KLEE to constrain it to be sorted. - foreach (j; 1..arr.length) - { - klee_assume(arr[j - 1] <= arr[j]); - } - - // Test against simple linear search - bool has_x = false; - foreach (a; arr[]) - { - has_x |= a == x; - } - - assert (bsearch(arr, x) == has_x); - - return 0; -} -``` - -When run in KLEE, it keeps running for a long, long time. How do we know it’s doing anything? By default KLEE writes stats every 1s, so we can watch the live progress in another terminal: - -``` -$ watch klee-stats --print-more klee-last/ -Every 2.0s: klee-stats --print-more klee-last/ - ---------------------------------------------------------------------------------------------------------------------- -| Path | Instrs| Time(s)| ICov(%)| BCov(%)| ICount| TSolver(%)| States| maxStates| Mem(MB)| maxMem(MB)| ---------------------------------------------------------------------------------------------------------------------- -|klee-last/| 5834| 637.27| 79.07| 68.75| 172| 100.00| 22| 22| 24.51| 24| ---------------------------------------------------------------------------------------------------------------------- -``` - -`bsearch()` should be pretty fast, so we should see KLEE discovering new states rapidly. But instead it seems to be stuck. [At least one fork of KLEE has heuristics for detecting infinite loops][7], but plain KLEE doesn’t. There are timeout and batching options for making KLEE work better with code that might have infinite loops, but let’s just take another look at the code. In particular, the loop condition: - -``` -while (haystack.length) -{ - // ... -} -``` - -Binary search is supposed to reduce the search space by about half each iteration. `haystack.length` is an unsigned integer, so the loop must terminate as long as it goes down every iteration. Let’s rewrite the code slightly so we can verify if that’s true: - -``` -bool bsearch(const(int)[] haystack, int needle) -{ - while (haystack.length) - { - auto mid_idx = haystack.length / 2; - if (haystack[mid_idx] == needle) return true; - const(int)[] next_haystack; - if (haystack[mid_idx] < needle) - { - next_haystack = haystack[mid_idx..$]; - } - else - { - next_haystack = haystack[0..mid_idx]; - } - // This lets us verify that the search terminates - assert (next_haystack.length < haystack.length); - haystack = next_haystack; - } - return false; -} -``` - -Now KLEE can find the bug! - -``` -$ klee -optimize bsearch.bc -KLEE: output directory is "/tmp/klee-out-2" -KLEE: Using Z3 solver backend -warning: Linking two modules of different target triples: klee_range.bc' is 'x86_64-pc-linux-gnu' whereas 'bsearch.bc' is 'x86_64--linux-musl' - -warning: Linking two modules of different target triples: memset.bc' is 'x86_64-pc-linux-gnu' whereas 'bsearch.bc' is 'x86_64--linux-musl' - -KLEE: ERROR: bsearch.d:18: ASSERTION FAIL: next_haystack.length < haystack.length -KLEE: NOTE: now ignoring this error at this location - -KLEE: done: total instructions = 2281 -KLEE: done: completed paths = 42 -KLEE: done: generated tests = 31 -``` - -Using the failing example as input and stepping through the code, it’s easy to find the problem: - -``` -/// ... -if (haystack[mid_idx] < needle) -{ - // If mid_idx == 0, next_haystack is the same as haystack - // Nothing changes, so the loop keeps repeating - next_haystack = haystack[mid_idx..$]; -} -/// ... -``` - -Thinking about it, the `if` statement already excludes `haystack[mid_idx]` from being `needle`, so there’s no reason to include it in `next_haystack`. Here’s the fix: - -``` -// The +1 matters -next_haystack = haystack[mid_idx+1..$]; -``` - -But is the code correct now? Terminating isn’t enough; it needs to get the right answer, of course. - -``` -$ klee -optimize bsearch.bc -KLEE: output directory is "/tmp/kee-out-3" -KLEE: Using Z3 solver backend -warning: Linking two modules of different target triples: klee_range.bc' is 'x86_64-pc-linux-gnu' whereas 'bsearch.bc' is 'x86_64--linux-musl' - -warning: Linking two modules of different target triples: memset.bc' is 'x86_64-pc-linux-gnu' whereas 'bsearch.bc' is 'x86_64--linux-musl' - -KLEE: done: total instructions = 3152 -KLEE: done: completed paths = 81 -KLEE: done: generated tests = 81 -``` - -In just under 7s, KLEE has verified every possible execution path reachable with arrays of length from 0 to 8. Note, that’s not just coverage of individual code lines, but coverage of full pathways through the code. KLEE hasn’t ruled out stack corruption or integer overflows with large arrays, but I’m pretty confident the code is correct now. - -KLEE has generated test cases that trigger each path, which we can keep and use as a faster-than-7s regression test suite. Trouble is, the output from KLEE loses all type information and isn’t in a convenient format: - -``` -$ ktest-tool klee-last/test000042.ktest -ktest file : 'klee-last/test000042.ktest' -args : ['bsearch.bc'] -num objects: 3 -object 0: name: 'a' -object 0: size: 32 -object 0: data: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -object 0: hex : 0x0000000000000000000000000000000001000000100000000000000000000000 -object 0: text: ................................ -object 1: name: 'x' -object 1: size: 4 -object 1: data: b'\x01\x00\x00\x00' -object 1: hex : 0x01000000 -object 1: int : 1 -object 1: uint: 1 -object 1: text: .... -object 2: name: 'len' -object 2: size: 4 -object 2: data: b'\x06\x00\x00\x00' -object 2: hex : 0x06000000 -object 2: int : 6 -object 2: uint: 6 -object 2: text: .... -``` - -But we can write our own pretty-printing code and put it at the end of the test rig: - -``` -char[256] buffer; -char* output = buffer.ptr; -output += sprintf(output, "TestCase(["); -foreach (a; arr[]) -{ - output += sprintf(output, "%d, ", klee_get_value_i32(a)); -} -sprintf(output, "], %d, %s),\n", klee_get_value_i32(x), klee_get_value_i32(has_x) ? "true".ptr : "false".ptr); -fputs(buffer.ptr, stdout); -``` - -Ugh, that would be just one format call with D’s `%(` array formatting specs. The output needs to be buffered up and printed all at once to stop output from different parallel executions getting mixed up. `klee_get_value_i32()` is needed to get a concrete example from a symbolic variable (remember that a symbolic variable is just a bundle of constraints). - -``` -$ klee -optimize bsearch.bc > tests.d -... -$ # Sure enough, 81 test cases -$ wc -l tests.d -81 tests.d -$ # Look at the first 10 -$ head tests.d -TestCase([], 0, false), -TestCase([0, ], 0, true), -TestCase([16, ], 1, false), -TestCase([0, ], 1, false), -TestCase([0, 0, ], 0, true), -TestCase([0, 0, ], 1, false), -TestCase([1, 16, ], 1, true), -TestCase([0, 0, 0, ], 0, true), -TestCase([16, 16, ], 1, false), -TestCase([1, 16, ], 3, false), -``` - -Nice! An autogenerated regression test suite that’s better than anything I would write by hand. This is my favourite use case for KLEE. - -### Change counting - -One last example: - -In Australia, coins come in 5c, 10c, 20c, 50c, $1 (100c) and $2 (200c) denominations. So you can make 70c using 14 5c coins, or using a 50c coin and a 20c coin. Obviously, fewer coins is usually more convenient. There’s a simple [greedy algorithm][8] to make a small pile of coins that adds up to a given value: just keep adding the biggest coin you can to the pile until you’ve reached the target value. It turns out this trick is optimal — at least for Australian coins. Is it always optimal for any set of coin denominations? - -The hard thing about testing optimality is that you don’t know what the correct optimal values are without a known-good algorithm. Without a constraints solver, I’d compare the output of the greedy algorithm with some obviously correct brute force optimiser, run over all possible cases within some small-enough limit. But with KLEE, we can use a different approach: comparing the greedy solution to a non-deterministic solution. - -The greedy algorithm takes the list of coin denominations and the target value as input, so (like in the previous examples) we make those symbolic. Then we make another symbolic array that represents an assignment of coin counts to each coin denomination. We don’t specify anything about how to generate this assignment, but we constrain it to be a valid assignment that adds up to the target value. It’s [non-deterministic][9]. Then we just assert that the total number of coins in the non-deterministic assignment is at least the number of coins needed by the greedy algorithm, which would be true if the greedy algorithm were universally optimal. Finally we ask KLEE to prove the program correct or incorrect. - -Here’s the code: - -``` -// Greedily break value into coins of values in denominations -// denominations must be in strictly decreasing order -int greedy(const(int[]) denominations, int value, int[] coins_used_output) -{ - int num_coins = 0; - foreach (j; 0..denominations.length) - { - int num_to_use = value / denominations[j]; - coins_used_output[j] = num_to_use; - num_coins += num_to_use; - value = value % denominations[j]; - } - return num_coins; -} - -extern(C): - -void klee_make_symbolic(void* addr, size_t nbytes, const(char*) name); -int klee_int(const(char*) name); -int klee_assume(ulong condition); -int klee_get_value_i32(int expr); - -int main(int argc, char** argv) -{ - enum kNumDenominations = 6; - int[kNumDenominations] denominations, coins_used; - klee_make_symbolic(denominations.ptr, denominations.sizeof, "denominations"); - - // We're testing the algorithm itself, not implementation issues like integer overflow - // Keep values small - foreach (d; denominations) - { - klee_assume(d >= 1); - klee_assume(d <= 1024); - } - // Make the smallest denomination 1 so that all values can be represented - // This is just for simplicity so we can focus on optimality - klee_assume(denominations[$-1] == 1); - - // Greedy algorithm expects values in descending order - foreach (j; 1..denominations.length) - { - klee_assume(denominations[j-1] > denominations[j]); - } - - // What we're going to represent - auto value = klee_int("value"); - - auto num_coins = greedy(denominations[], value, coins_used[]); - - // The non-deterministic assignment - int[kNumDenominations] nd_coins_used; - klee_make_symbolic(nd_coins_used.ptr, nd_coins_used.sizeof, "nd_coins_used"); - - int nd_num_coins = 0, nd_value = 0; - foreach (j; 0..kNumDenominations) - { - klee_assume(nd_coins_used[j] >= 0); - klee_assume(nd_coins_used[j] <= 1024); - nd_num_coins += nd_coins_used[j]; - nd_value += nd_coins_used[j] * denominations[j]; - } - - // Making the assignment valid is 100% up to KLEE - klee_assume(nd_value == value); - - // If we find a counterexample, dump it and fail - if (nd_num_coins < num_coins) - { - import core.stdc.stdio; - - puts("Counterexample found."); - - puts("Denominations:"); - foreach (ref d; denominations) - { - printf("%d ", klee_get_value_i32(d)); - } - printf("\nValue: %d\n", klee_get_value_i32(value)); - - void printAssignment(const ref int[kNumDenominations] coins) - { - foreach (j; 0..kNumDenominations) - { - printf("%d * %dc\n", klee_get_value_i32(coins[j]), klee_get_value_i32(denominations[j])); - } - } - - printf("Greedy \"optimum\": %d\n", klee_get_value_i32(num_coins)); - printAssignment(coins_used); - - printf("Better assignment for %d total coins:\n", klee_get_value_i32(nd_num_coins)); - printAssignment(nd_coins_used); - assert (false); - } - - return 0; -} -``` - -And here’s the counterexample it found after 14s: - -``` -Counterexample found. -Denominations: -129 12 10 3 2 1 -Value: 80 -Greedy "optimum": 9 -0 * 129c -6 * 12c -0 * 10c -2 * 3c -1 * 2c -0 * 1c -Better assignment for 8 total coins: -0 * 129c -0 * 12c -8 * 10c -0 * 3c -0 * 2c -0 * 1c -``` - -Note that this isn’t proven to be the new optimum; it’s just a witness that the greedy algorithm isn’t always optimal. There’s a well-known [dynamic programming][10] [solution][11] that always works. - -### What’s next? - -As I said, I’m interesting in getting this to work with full D code. I’m also interested in using [one of the floating point forks of KLEE][12] on some D because floating point is much harder to test thoroughly than integer and string code. - --------------------------------------------------------------------------------- - -via: https://theartofmachinery.com/2019/05/28/d_and_klee.html - -作者:[Simon Arneaud][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://theartofmachinery.com -[b]: https://github.com/lujun9972 -[1]: https://klee.github.io/ -[2]: https://www.uclibc.org/ -[3]: https://github.com/ldc-developers/ldc/issues/3078 -[4]: https://kcachegrind.github.io/html/Home.html -[5]: https://github.com/dlang/druntime/blob/4ad638f61a9b4a98d8ed6eb9f9429c0ef6afc8e3/src/core/internal/hash.d#L670 -[6]: https://www.calhoun.io/lets-learn-algorithms-an-intro-to-binary-search/ -[7]: https://github.com/COMSYS/SymbolicLivenessAnalysis -[8]: https://en.wikipedia.org/wiki/Greedy_algorithm -[9]: http://people.clarkson.edu/~alexis/PCMI/Notes/lectureB03.pdf -[10]: https://www.algorithmist.com/index.php/Dynamic_Programming -[11]: https://www.topcoder.com/community/competitive-programming/tutorials/dynamic-programming-from-novice-to-advanced/ -[12]: https://github.com/srg-imperial/klee-float diff --git a/sources/talk/20190528 Managed WAN and the cloud-native SD-WAN.md b/sources/talk/20190528 Managed WAN and the cloud-native SD-WAN.md deleted file mode 100644 index 026b5d8e81..0000000000 --- a/sources/talk/20190528 Managed WAN and the cloud-native SD-WAN.md +++ /dev/null @@ -1,121 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Managed WAN and the cloud-native SD-WAN) -[#]: via: (https://www.networkworld.com/article/3398476/managed-wan-and-the-cloud-native-sd-wan.html) -[#]: author: (Matt Conran https://www.networkworld.com/author/Matt-Conran/) - -Managed WAN and the cloud-native SD-WAN -====== -The motivation for WAN transformation is clear, today organizations require: improved internet access and last mile connectivity, additional bandwidth and a reduction in the WAN costs. -![Gerd Altmann \(CC0\)][1] - -In recent years, a significant number of organizations have transformed their wide area network (WAN). Many of these organizations have some kind of cloud-presence across on-premise data centers and remote site locations. - -The vast majority of organizations that I have consulted with have over 10 locations. And it is common to have headquarters in both the US and Europe, along with remote site locations spanning North America, Europe, and Asia. - -A WAN transformation project requires this diversity to be taken into consideration when choosing the best SD-WAN vendor to satisfy both; networking and security requirements. Fundamentally, SD-WAN is not just about physical connectivity, there are many more related aspects. - -**[ Related:[MPLS explained – What you need to know about multi-protocol label switching][2]** - -### Motivations for transforming the WAN - -The motivation for WAN transformation is clear: Today organizations prefer improved internet access and last mile connectivity, additional bandwidth along with a reduction in the WAN costs. Replacing Multiprotocol Label Switching (MPLS) with SD-WAN has of course been the main driver for the SD-WAN evolution, but it is only a single piece of the jigsaw puzzle. - -Many SD-WAN vendors are quickly brought to their knees when they try to address security and gain direct internet access from remote site locations. The problem is how to ensure optimized cloud access that is secure, has improved visibility and predictable performance without the high costs associated with MPLS? SD-WAN is not just about connecting locations. Primarily, it needs to combine many other important network and security elements into one seamless worldwide experience. - -According to a recent report from [Cato Networks][3] into enterprise IT managers, a staggering 85% will confront use cases in 2019 that are poorly addressed or outright ignored by SD-WAN. Examples includes providing secure, Internet access from any location (50%) and improving visibility into and control over mobile access to cloud applications, such as Office 365 (46%). - -### Issues with traditional SD-WAN vendors - -First and foremost, SD-WAN unable to address the security challenges that arise during the WAN transformation. Such security challenges include protection against malware, ransomware and implementing the necessary security policies. Besides, there is a lack of visibility that is required to police the mobile users and remote site locations accessing resources in the public cloud. - -To combat this, organizations have to purchase additional equipment. There has always been and will always be a high cost associated with buying such security appliances. Furthermore, the additional tools that are needed to protect the remote site locations increase the network complexity and reduce visibility. Let’s us not forget that the variety of physical appliances require talented engineers for design, deployment and maintenance. - -There will often be a single network-cowboy. This means the network and security configuration along with the design essentials are stored in the mind of the engineer, not in a central database from where the knowledge can be accessed if the engineer leaves his or her employment. - -The physical appliance approach to SD-WAN makes it hard, if not impossible, to accommodate for the future. If the current SD-WAN vendors continue to focus just on connecting the devices with the physical appliances, they will have limited ability to accommodate for example, with the future of network IoT devices. With these factors in mind what are the available options to overcome the SD-WAN shortcomings? - -One can opt for a do it yourself (DIY) solution, or a managed service, which can fall into the category of telcos, with the improvements of either co-managed or self-managed service categories. - -### Option 1: The DIY solution - -Firstly DIY, from the experience of trying to stitch together a global network, this is not only costly but also complex and is a very constrained approach to the network transformation. We started with physical appliances decades ago and it was sufficient to an extent. The reason it worked was that it suited the requirements of the time, but our environment has changed since then. Hence, we need to accommodate these changes with the current requirements. - -Even back in those days, we always had a breachable perimeter. The perimeter-approach to networking and security never really worked and it was just a matter of time before the bad actor would penetrate the guarded walls. - -Securing a global network involves more than just firewalling the devices. A solid security perimeter requires URL filtering, anti-malware and IPS to secure the internet traffic. If you try to deploy all these functions in a single device, such as, unified threat management (UTM), you will hit scaling problems. As a result, you will be left with appliance sprawl. - -Back in my early days as an engineer, I recall stitching together a global network with a mixture of security and network appliances from a variety of vendors. It was me and just two others who used to get the job done on time and for a production network, our uptime levels were superior to most. - -However, it involved too many late nights, daily flights to our PoPs and of course the major changes required a forklift. A lot of work had to be done at that time, which made me want to push some or most of the work to a 3rd party. - -### Option 2: The managed service solution - -Today, there is a growing need for the managed service approach to SD-WAN. Notably, it simplifies the network design, deployment and maintenance activities while offloading the complexity, in line with what most CIOs are talking about today. - -Managed service provides a number of benefits, such as the elimination of backhauling to centralized cloud connectors or VPN concentrators. Evidently, backhauling is never favored for a network architect. More than often it will result in increased latency, congested links, internet chokepoints, and last-mile outages. - -Managed service can also authenticate mobile users at the local communication hub and not at a centralized point which would increase the latency. So what options are available when considering a managed service? - -### Telcos: An average service level - -Let’s be honest, telcos have a mixed track record and enterprises rely on them with caution. Essentially, you are building a network with 3rd party appliances and services that put the technical expertise outside of the organization. - -Secondly, the telco must orchestrate, monitor and manage numerous technical domains which are likely to introduce further complexity. As a result, troubleshooting requires close coordination with the suppliers which will have an impact on the customer experience. - -### Time equals money - -To resolve a query could easily take two or three attempts. It’s rare that you will get to the right person straight away. This eventually increases the time to resolve problems. Even for a minor feature change, you have to open tickets. Hence, with telcos, it increases the time required to solve a problem. - -In addition, it takes time to make major network changes such as opening new locations, which could take up to 45 days. In the same report mentioned above, 71% of the respondents are frustrated with the telco customer-service-time to resolve the problems, 73% indicated that deploying new locations requires at least 15 days and 47% claimed that “high bandwidth costs” is the biggest frustration while working with telcos. - -When it comes to lead times for projects, an engineer does not care. Does a project manager care if you have an optimum network design? No, many don’t, most just care about the timeframes. During my career, now spanning 18 years, I have never seen comments from any of my contacts saying “you must adhere to your project manager’s timelines”. - -However, out of the experience, the project managers have their ways and lead times do become a big part of your daily job. So as an engineer, 45-day lead time will certainly hit your brand hard, especially if you are an external consultant. - -There is also a problem with bandwidth costs. Telcos need to charge due to their complexity. There is always going to be a series of problems when working with them. Let’s face it, they offer an average service level. - -### Co-management and self-service management - -What is needed is a service that equips with the visibility and control of DIY to managed services. This, ultimately, opens the door to co-management and self-service management. - -Co-management allows both the telco and enterprise to make changes to the WAN. Then we have the self-service management of WAN that allows the enterprises to have sole access over the aspect of their network. - -However, these are just sticking plasters covering up the flaws. We need a managed service that not only connects locations but also synthesizes the site connectivity, along with security, mobile access, and cloud access. - -### Introducing the cloud-native approach to SD-WAN - -There should be a new style of managed services that combines the best of both worlds. It should offer the uptime, predictability and reach of the best telcos along with the cost structure and versatility of cloud providers. All such requirements can be met by what is known as the cloud-native carrier. - -Therefore, we should be looking for a platform that can connect and secure all the users and resources at scale, no matter where they are positioned. Eventually, such a platform will limit the costs and increase the velocity and agility. - -This is what a cloud-native carrier can offer you. You could say it’s a new kind of managed service, which is what enterprises are now looking for. A cloud-native carrier service brings the best of cloud services to the world of networking. This new style of managed service brings to SD-WAN the global reach, self-service, and agility of the cloud with the ability to easily migrate from MPLS. - -In summary, a cloud-native carrier service will improve global connectivity to on-premises and cloud applications, enable secure branch to internet access, and both securely and optimally integrate cloud datacenters. - -**This article is published as part of the IDG Contributor Network.[Want to Join?][4]** - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3398476/managed-wan-and-the-cloud-native-sd-wan.html - -作者:[Matt Conran][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://www.networkworld.com/author/Matt-Conran/ -[b]: https://github.com/lujun9972 -[1]: https://images.techhive.com/images/article/2017/03/network-wan-100713693-large.jpg -[2]: https://www.networkworld.com/article/2297171/sd-wan/network-security-mpls-explained.html -[3]: https://www.catonetworks.com/news/digital-transformation-survey -[4]: /contributor-network/signup.html -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190528 Moving to the Cloud- SD-WAN Matters.md b/sources/talk/20190528 Moving to the Cloud- SD-WAN Matters.md deleted file mode 100644 index 8f6f46b6f2..0000000000 --- a/sources/talk/20190528 Moving to the Cloud- SD-WAN Matters.md +++ /dev/null @@ -1,69 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Moving to the Cloud? SD-WAN Matters!) -[#]: via: (https://www.networkworld.com/article/3397921/moving-to-the-cloud-sd-wan-matters.html) -[#]: author: (Rami Rammaha https://www.networkworld.com/author/Rami-Rammaha/) - -Moving to the Cloud? SD-WAN Matters! -====== - -![istock][1] - -This is the first in a two-part blog series that will explore how enterprises can realize the full transformation promise of the cloud by shifting to a business first networking model powered by a business-driven [SD-WAN][2]. The focus for this installment will be on automating secure IPsec connectivity and intelligently steering traffic to cloud providers. - -Over the past several years we’ve seen a major shift in data center strategies where enterprise IT organizations are shifting applications and workloads to cloud, whether private or public. More and more, enterprises are leveraging software as-a-service (SaaS) applications and infrastructure as-a-service (IaaS) cloud services from leading providers like [Amazon AWS][3], [Google Cloud][4], [Microsoft Azure][5] and [Oracle Cloud Infrastructure][6]. This represents a dramatic shift in enterprise data traffic patterns as fewer and fewer applications are hosted within the walls of the traditional corporate data center. - -There are several drivers for the shift to IaaS cloud services and SaaS apps, but business agility tops the list for most enterprises. The traditional IT model for provisioning and deprovisioning applications is rigid and inflexible and is no longer able to keep pace with changing business needs. - -According to [LogicMonitor’s Cloud Vision 2020][7] study, more than 80 percent of enterprise workloads will run in the cloud by 2020 with more than 40 percent running on public cloud platforms. This major shift in the application consumption model is having a huge [impact on organizations and infrastructure][8]. A recent article entitled “[How Amazon Web Services is luring banks to the cloud][9],” published by CNBC, reported that some companies already have completely migrated all of their applications and IT workloads to public cloud infrastructures. An interesting fact is that while many enterprises must comply with stringent regulatory compliance mandates such as PCI-DSS or HIPAA, they still have made the move to the cloud. This tells us two things – the maturity of using public cloud services and the trust these organizations have in using them is at an all-time high. Again, it is all about speed and agility – without compromising performance, security and reliability. - -### **Is there a direct correlation between moving to the cloud and adopting SD-WAN?** - -As the cloud enables businesses to move faster, an SD-WAN architecture where top-down business intent is the driver is critical to ensuring success, especially when branch offices are geographically distributed across the globe. Traditional router-centric WAN architectures were never designed to support today’s cloud consumption model for applications in the most efficient way. With a conventional router-centric WAN approach, access to applications residing in the cloud means traversing unnecessary hops, resulting in wasted bandwidth, additional cost, added latency and potentially higher packet loss. In addition, under the existing, traditional WAN model where management tends to be rigid, complex network changes can be lengthy, whether setting up new branches or troubleshooting performance issues. This leads to inefficiencies and a costly operational model. Therefore, enterprises greatly benefit from taking a business-first WAN approach toward achieving greater agility in addition to realizing substantial CAPEX and OPEX savings. - -A business-driven SD-WAN platform is purpose-built to tackle the challenges inherent to the traditional router-centric model and more aptly support today’s cloud consumption model. This means application policies are defined based on business intent, connecting users securely and directly to applications where ever they reside without unnecessary extra hops or security compromises. For example, if the application is hosted in the cloud and is trusted, a business-driven SD-WAN can automatically connect users to it without backhauling traffic to a POP or HQ data center. Now, in general this traffic is usually going across an internet link which, on its own, may not be secure. However, the right SD-WAN platform will have a unified stateful firewall built-in for local internet breakout allowing only branch-initiated sessions to enter the branch and providing the ability to service chain traffic to a cloud-based security service if necessary, before forwarding it to its final destination. If the application is moved and becomes hosted by another provider or perhaps back to a company’s own data center, traffic must be intelligently redirected, wherever the application is being hosted. Without automation and embedded machine learning, dynamic and intelligent traffic steering is impossible. - -### **A closer look at how the Silver Peak EdgeConnect™ SD-WAN edge platform addresses these challenges: ** - -**Automate traffic steering and connectivity to cloud providers** - -An [EdgeConnect][10] virtual instance is easily spun up in any of the [leading cloud providers][11] through their respective marketplaces. For an SD-WAN to intelligently steer traffic to its destination, it requires insights into both HTTP and HTTPS traffic; it must be able to identify apps on the first packet received in order to steer traffic to the right destination in accordance with business intent. This is critical capability because once a TCP connection is NAT’d with a public IP address, it cannot be switched thus it can’t be re-routed once a connection is established. So, the ability of EdgeConnect to identify, classify and automatically steer traffic based on the first packet – and not the second or tenth packet – to the correct destination will assure application SLAs, minimize wasting expensive bandwidth and deliver the highest quality of experience. - -Another critical capability is automatic performance optimization. Irrespective of which link the traffic ends up traversing based on business intent and the unique requirements of the application, EdgeConnect automatically optimizes application performance without human intervention by correcting for out of order packets using Packet Order Correction (POC) or even under high latency conditions that can be related to distance or other issues. This is done using adaptive Forward Error Correction (FEC) and tunnel bonding where a virtual tunnel is created, resulting in a single logical overlay that traffic can be dynamically moved between the different paths as conditions change with each underlay WAN service. In this [lightboard video][12], Dinesh Fernando, a technical marketing engineer at Silver Peak, explains how EdgeConnect automates tunnel creation between sites and cloud providers, how it simplifies data transfers between multi-clouds, and how it improves application performance. - -If your business is global and increasingly dependent on the cloud, the business-driven EdgeConnect SD-WAN edge platform enables seamless multi-cloud connectivity, turning the network into a business accelerant. EdgeConnect delivers: - - 1. A consistent deployment from the branch to the cloud, extending the reach of the SD-WAN into virtual private cloud environments - 2. Multi-cloud flexibility, making it easier to initiate and distribute resources across multiple cloud providers - 3. Investment protection by confidently migrating on premise IT resources to any combination of the leading public cloud platforms, knowing their cloud-hosted instances will be fully supported by EdgeConnect - - - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3397921/moving-to-the-cloud-sd-wan-matters.html - -作者:[Rami Rammaha][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://www.networkworld.com/author/Rami-Rammaha/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/05/istock-899678028-100797709-large.jpg -[2]: https://www.silver-peak.com/sd-wan/sd-wan-explained -[3]: https://www.silver-peak.com/company/tech-partners/cloud/aws -[4]: https://www.silver-peak.com/company/tech-partners/cloud/google-cloud -[5]: https://www.silver-peak.com/company/tech-partners/cloud/microsoft-azure -[6]: https://www.silver-peak.com/company/tech-partners/cloud/oracle-cloud -[7]: https://www.logicmonitor.com/resource/the-future-of-the-cloud-a-cloud-influencers-survey/?utm_medium=pr&utm_source=businesswire&utm_campaign=cloudsurvey -[8]: http://www.networkworld.com/article/3152024/lan-wan/in-the-age-of-digital-transformation-why-sd-wan-plays-a-key-role-in-the-transition.html -[9]: http://www.cnbc.com/2016/11/30/how-amazon-web-services-is-luring-banks-to-the-cloud.html?__source=yahoo%257cfinance%257cheadline%257cheadline%257cstory&par=yahoo&doc=104135637 -[10]: https://www.silver-peak.com/products/unity-edge-connect -[11]: https://www.silver-peak.com/company/tech-partners?strategic_partner_type=69 -[12]: https://www.silver-peak.com/resource-center/automate-connectivity-to-cloud-networking-with-sd-wan diff --git a/sources/talk/20190529 Satellite-based internet possible by year-end, says SpaceX.md b/sources/talk/20190529 Satellite-based internet possible by year-end, says SpaceX.md deleted file mode 100644 index 383fac66ca..0000000000 --- a/sources/talk/20190529 Satellite-based internet possible by year-end, says SpaceX.md +++ /dev/null @@ -1,63 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Satellite-based internet possible by year-end, says SpaceX) -[#]: via: (https://www.networkworld.com/article/3398940/space-internet-maybe-end-of-year-says-spacex.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -Satellite-based internet possible by year-end, says SpaceX -====== -Amazon, Tesla-associated SpaceX and OneWeb are emerging as just some of the potential suppliers of a new kind of data-friendly satellite internet service that could bring broadband IoT connectivity to most places on Earth. -![Getty Images][1] - -With SpaceX’s successful launch of an initial array of broadband-internet-carrying satellites last week, and Amazon’s surprising posting of numerous satellite engineering-related job openings on its [job board][2] this month, one might well be asking if the next-generation internet space race is finally getting going. (I first wrote about [OneWeb’s satellite internet plans][3] it was concocting with Airbus four years ago.) - -This new batch of satellite-driven internet systems, if they work and are eventually switched on, could provide broadband to most places, including previously internet-barren locations, such as rural areas. That would be good for high-bandwidth, low-latency remote-internet of things (IoT) and increasingly important edge-server connections for verticals like oil and gas and maritime. [Data could even end up getting stored in compliance-friendly outer space, too][4]. Leaky ground-based connections, also, perhaps a thing of the past. - -Of the principal new internet suppliers, SpaceX has gotten farthest along. That’s in part because it has commercial impetus. It needed to create payload for its numerous rocket projects. The Tesla electric-car-associated company (the two firms share materials science) has not only launched its first tranche of 60 satellites for its own internet constellation, called Starlink, but also successfully launched numerous batches (making up the full constellation of 75 satellites) for Iridium’s replacement, an upgraded constellation called Iridium NEXT. - -[The time of 5G is almost here][5] - -Potential competitor OneWeb launched its first six Airbus-built satellites in February. [It has plans for 900 more][6]. SpaceX has been approved for 4,365 more by the FCC, and Project Kuiper, as Amazon’s space internet project is known, wants to place 3,236 satellites in orbit, according to International Telecommunication Union filings [discovered by _GeekWire_][7] earlier this year. [Startup LeoSat, which I wrote about last year, aims to build an internet backbone constellation][8]. Facebook, too, is exploring [space-delivered internet][9]. - -### Why the move to space? - -Laser technical progress, where data is sent in open, free space, rather than via a restrictive, land-based cable or via traditional radio paths, is partly behind this space-internet rush. “Bits travel faster in free space than in glass-fiber cable,” LeoSat explained last year. Additionally, improving microprocessor tech is also part of the mix. - -One important difference from existing older-generation satellite constellations is that this new generation of internet satellites will be located in low Earth orbit (LEO). Initial Starlink satellites will be placed at about 350 miles above Earth, with later launches deployed at 710 miles. - -There’s an advantage to that. Traditional satellites in geostationary orbit, or GSO, have been deployed about 22,000 miles up. That extra distance versus LEO introduces latency and is one reason earlier generations of Internet satellites are plagued by slow round-trip times. Latency didn’t matter when GSO was introduced in 1964, and commercial satellites, traditionally, have been pitched as one-way video links, such as are used by sporting events for broadcast, and not for data. - -And when will we get to experience these new ISPs? “Starlink is targeted to offer service in the Northern U.S. and Canadian latitudes after six launches,” [SpaceX says on its website][10]. Each launch would deliver about 60 satellites. “SpaceX is targeting two to six launches by the end of this year.” - -Global penetration of the “populated world” could be obtained after 24 launches, it thinks. - -Join the Network World communities on [Facebook][11] and [LinkedIn][12] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3398940/space-internet-maybe-end-of-year-says-spacex.html - -作者:[Patrick Nelson][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://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2018/10/network_iot_world-map_us_globe_nodes_global-100777483-large.jpg -[2]: https://www.amazon.jobs/en/teams/projectkuiper -[3]: https://www.itworld.com/article/2938652/space-based-internet-starts-to-get-serious.html -[4]: https://www.networkworld.com/article/3200242/data-should-be-stored-data-in-space-firm-says.html -[5]: https://www.networkworld.com/article/3354477/mobile-world-congress-the-time-of-5g-is-almost-here.html -[6]: https://www.airbus.com/space/telecommunications-satellites/oneweb-satellites-connection-for-people-all-over-the-globe.html -[7]: https://www.geekwire.com/2019/amazon-lists-scores-jobs-bellevue-project-kuiper-broadband-satellite-operation/ -[8]: https://www.networkworld.com/article/3328645/space-data-backbone-gets-us-approval.html -[9]: https://www.networkworld.com/article/3338081/light-based-computers-to-be-5000-times-faster.html -[10]: https://www.starlink.com/ -[11]: https://www.facebook.com/NetworkWorld/ -[12]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190529 Survey finds SD-WANs are hot, but satisfaction with telcos is not.md b/sources/talk/20190529 Survey finds SD-WANs are hot, but satisfaction with telcos is not.md deleted file mode 100644 index 9b65a6c8dd..0000000000 --- a/sources/talk/20190529 Survey finds SD-WANs are hot, but satisfaction with telcos is not.md +++ /dev/null @@ -1,69 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Survey finds SD-WANs are hot, but satisfaction with telcos is not) -[#]: via: (https://www.networkworld.com/article/3398478/survey-finds-sd-wans-are-hot-but-satisfaction-with-telcos-is-not.html) -[#]: author: (Zeus Kerravala https://www.networkworld.com/author/Zeus-Kerravala/) - -Survey finds SD-WANs are hot, but satisfaction with telcos is not -====== -A recent survey of over 400 IT executives by Cato Networks found that legacy telcos might be on the outside looking in for SD-WANs. -![istock][1] - -This week SD-WAN vendor Cato Networks announced the results of its [Telcos and the Future of the WAN in 2019 survey][2]. The study was a mix of companies of all sizes, with 42% being enterprise-class (over 2,500 employees). More than 70% had a network with more than 10 locations, and almost a quarter (24%) had over 100 sites. All of the respondents have a cloud presence, and almost 80% have at least two data centers. The survey had good geographic diversity, with 57% of respondents coming from the U.S. and 24% from Europe. - -Highlights of the survey include the following key findings: - -## **SD-WANs are hot but not a panacea to all networking challenges** - -The survey found that 44% of respondents have already deployed or will deploy an SD-WAN within the next 12 months. This number is up sharply from 25% when Cato ran the survey a year ago. Another 33% are considering SD-WAN but have no immediate plans to deploy. The primary drivers for the evolution of the WAN are improved internet access (46%), increased bandwidth (39%), improved last-mile availability (38%) and reduced WAN costs (37%). It’s good to see cost savings drop to fourth in motivation, since there is so much more to SD-WAN. - -[The time of 5G is almost here][3] - -It’s interesting that the majority of respondents believe SD-WAN alone can’t address all challenges facing the WAN. A whopping 85% stated they would be confronting issues not addressed by SD-WAN alone. This includes secure, local internet breakout, improved visibility, and control over mobile access to cloud apps. This indicates that customers are looking for SD-WAN to be the foundation of the WAN but understand that other technologies need to be deployed as well. - -## **Telco dissatisfaction is high** - -The traditional telco has been a point of frustration for network professionals for years, and the survey spelled that out loud and clear. Prior to being an analyst, I held a number of corporate IT positions and found telcos to be the single most frustrating group of companies to deal with. The problem was, there was no choice. If you need MPLS services, you need a telco. The same can’t be said for SD-WANs, though; businesses have more choices. - -Respondents to the survey ranked telco service as “average.” It’s been well documented that we are now in the customer-experience era and “good enough” service is no longer good enough. Regarding pricing, 54% gave telcos a failing grade. Although price isn’t everything, this will certainly open the door to competitive SD-WAN vendors. Respondents gave the highest marks for overall experience to SaaS providers, followed by cloud computing suppliers. Global telcos scored the lowest of all vendor types. - -A look deeper explains the frustration level. The network is now mission-critical for companies, but 48% stated they are able to reach the support personnel with the right expertise to solve a problem only on a second attempt. No retailer, airline, hotel or other type of company could survive this, but telco customers had no other options for years. - -**[[Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][4] ]** - -Another interesting set of data points is the speed at which telcos address customer needs. Digital businesses compete on speed, but telco process is the antithesis of fast. Moves, adds and changes take at least one business day for half of the respondents. Also, 70% indicated that opening a new location takes 15 days, and 38% stated it requires 45 days or more. - -## **Security is now part of SD-WAN** - -The use of broadband, cloud access and other trends raise the bar on security for SD-WAN, and the survey confirmed that respondents are skeptical that SD-WANs could address these issues. Seventy percent believe SD-WANs can’t address malware/ransomware, and 49% don’t think SD-WAN helps with enforcing company policies on mobile users. Because of this, network professionals are forced to buy additional security tools from other vendors, but that can drive up complexity. SD-WAN vendors that have intrinsic security capabilities can use that as a point of differentiation. - -## **Managed services are critical to the growth of SD-WANs** - -The survey found that 75% of respondents are using some kind of managed service provider, versus only 25% using an appliance vendor. This latter number was 32% last year. I’m not surprised by this shift and expect it to continue. Legacy WANs were inefficient but straightforward to deploy. D-WANs are highly agile and more cost-effective, but complexity has gone through the roof. Network engineers need to factor in cloud connectivity, distributed security, application performance, broadband connectivity and other issues. Managed services can help businesses enjoy the benefits of SD-WAN while masking the complexity. - -Despite the desire to use an MSP, respondents don’t want to give up total control. Eighty percent stated they preferred self-service or co-managed models. This further explains the shift away from telcos, since they typically work with fully managed models. - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3398478/survey-finds-sd-wans-are-hot-but-satisfaction-with-telcos-is-not.html - -作者:[Zeus Kerravala][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://www.networkworld.com/author/Zeus-Kerravala/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2018/02/istock-465661573-100750447-large.jpg -[2]: https://www.catonetworks.com/news/digital-transformation-survey/ -[3]: https://www.networkworld.com/article/3354477/mobile-world-congress-the-time-of-5g-is-almost-here.html -[4]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190601 True Hyperconvergence at Scale- HPE Simplivity With Composable Fabric.md b/sources/talk/20190601 True Hyperconvergence at Scale- HPE Simplivity With Composable Fabric.md deleted file mode 100644 index 97eb611ef8..0000000000 --- a/sources/talk/20190601 True Hyperconvergence at Scale- HPE Simplivity With Composable Fabric.md +++ /dev/null @@ -1,28 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (True Hyperconvergence at Scale: HPE Simplivity With Composable Fabric) -[#]: via: (https://www.networkworld.com/article/3399619/true-hyperconvergence-at-scale-hpe-simplivity-with-composable-fabric.html) -[#]: author: (HPE https://www.networkworld.com/author/Michael-Cooney/) - -True Hyperconvergence at Scale: HPE Simplivity With Composable Fabric -====== - -Many hyperconverged solutions only focus on software-defined storage. However, many networking functions and technologies can be consolidated for simplicity and scale in the data center. This video describes how HPE SimpliVity with Composable Fabric gives organizations the power to run any virtual machine anywhere, anytime. Read more about HPE SimpliVity [here][1]. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3399619/true-hyperconvergence-at-scale-hpe-simplivity-with-composable-fabric.html - -作者:[HPE][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://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://hpe.com/info/simplivity diff --git a/sources/talk/20190602 IoT Roundup- New research on IoT security, Microsoft leans into IoT.md b/sources/talk/20190602 IoT Roundup- New research on IoT security, Microsoft leans into IoT.md deleted file mode 100644 index 6d955c6485..0000000000 --- a/sources/talk/20190602 IoT Roundup- New research on IoT security, Microsoft leans into IoT.md +++ /dev/null @@ -1,71 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (IoT Roundup: New research on IoT security, Microsoft leans into IoT) -[#]: via: (https://www.networkworld.com/article/3398607/iot-roundup-new-research-on-iot-security-microsoft-leans-into-iot.html) -[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) - -IoT Roundup: New research on IoT security, Microsoft leans into IoT -====== -Verizon sets up widely available narrow-band IoT service, while most Americans think IoT manufacturers should ensure their products protect personal information. -As with any technology whose use is expanding at such speed, it can be tough to track exactly what’s going on in the [IoT][1] world – everything from basic usage numbers to customer attitudes to more in-depth slices of the market is constantly changing. Fortunately, the month of May brought several new pieces of research to light, which should help provide at least a partial outline of what’s really happening in IoT. - -### Internet of things polls - -Not all of the news is good. An IPSOS Mori poll performed on behalf of the Internet Society and Consumers International (respectively, an umbrella organization for open development and Internet use and a broad-based consumer advocacy group) found that, despite the skyrocketing numbers of smart devices in circulation around the world, more than half of users in large parts of the western world don’t trust those devices to safeguard their privacy. - -**More on IoT:** - - * [What is the IoT? How the internet of things works][2] - * [What is edge computing and how it’s changing the network][3] - * [Most powerful Internet of Things companies][4] - * [10 Hot IoT startups to watch][5] - * [The 6 ways to make money in IoT][6] - * [What is digital twin technology? [and why it matters]][7] - * [Blockchain, service-centric networking key to IoT success][8] - * [Getting grounded in IoT networking and security][9] - * [Building IoT-ready networks must become a priority][10] - * [What is the Industrial IoT? [And why the stakes are so high]][11] - - - -While almost 70 percent of respondents owned connected devices, 55 percent said they didn’t feel their personal information was adequately protected by manufacturers. A further 28 percent said they had avoided using connected devices – smart home, fitness tracking and similar consumer gadgetry – primarily because they were concerned over privacy issues, and a whopping 85 percent of Americans agreed with the argument that manufacturers had a responsibility to produce devices that protected personal information. - -Those concerns are understandable, according to data from the Ponemon Institute, a tech-research organization. Its survey of corporate risk and security personnel, released in early May, found that there have been few concerted efforts to limit exposure to IoT-based security threats, and that those threats are sharply on the rise when compared to past years, with the percentage of organizations that had experienced a data breach related to unsecured IoT devices rising from 15 percent in fiscal 2017 to 26 percent in fiscal 2019. - -Beyond a lack of organizational wherewithal to address those threats, part of the problem in some verticals is technical. Security vendor Forescout said earlier this month that its research showed 40 percent of all healthcare IT environments had more than 20 different operating systems, and more than 30 percent had more than 100 – hardly an ideal situation for smooth patching and updating. - -To continue reading this article register now - -[Get Free Access][12] - -[Learn More][13] Existing Users [Sign In][12] - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3398607/iot-roundup-new-research-on-iot-security-microsoft-leans-into-iot.html - -作者:[Jon Gold][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://www.networkworld.com/author/Jon-Gold/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3207535/what-is-iot-how-the-internet-of-things-works.html -[2]: https://www.networkworld.com/article/3207535/internet-of-things/what-is-the-iot-how-the-internet-of-things-works.html -[3]: https://www.networkworld.com/article/3224893/internet-of-things/what-is-edge-computing-and-how-it-s-changing-the-network.html -[4]: https://www.networkworld.com/article/2287045/internet-of-things/wireless-153629-10-most-powerful-internet-of-things-companies.html -[5]: https://www.networkworld.com/article/3270961/internet-of-things/10-hot-iot-startups-to-watch.html -[6]: https://www.networkworld.com/article/3279346/internet-of-things/the-6-ways-to-make-money-in-iot.html -[7]: https://www.networkworld.com/article/3280225/internet-of-things/what-is-digital-twin-technology-and-why-it-matters.html -[8]: https://www.networkworld.com/article/3276313/internet-of-things/blockchain-service-centric-networking-key-to-iot-success.html -[9]: https://www.networkworld.com/article/3269736/internet-of-things/getting-grounded-in-iot-networking-and-security.html -[10]: https://www.networkworld.com/article/3276304/internet-of-things/building-iot-ready-networks-must-become-a-priority.html -[11]: https://www.networkworld.com/article/3243928/internet-of-things/what-is-the-industrial-iot-and-why-the-stakes-are-so-high.html -[12]: javascript:// -[13]: /learn-about-insider/ diff --git a/sources/talk/20190603 It-s time for the IoT to -optimize for trust.md b/sources/talk/20190603 It-s time for the IoT to -optimize for trust.md deleted file mode 100644 index cc5aa9db7c..0000000000 --- a/sources/talk/20190603 It-s time for the IoT to -optimize for trust.md +++ /dev/null @@ -1,102 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (It’s time for the IoT to 'optimize for trust') -[#]: via: (https://www.networkworld.com/article/3399817/its-time-for-the-iot-to-optimize-for-trust.html) -[#]: author: (Fredric Paul https://www.networkworld.com/author/Fredric-Paul/) - -It’s time for the IoT to 'optimize for trust' -====== -If we can't trust the internet of things (IoT) to gather accurate data and use it appropriately, IoT adoption and innovation are likely to suffer. -![Bose][1] - -One of the strengths of internet of things (IoT) technology is that it can do so many things well. From smart toothbrushes to predictive maintenance on jetliners, the IoT has more use cases than you can count. The result is that various IoT uses cases require optimization for particular characteristics, from cost to speed to long life, as well as myriad others. - -But in a recent post, "[How the internet of things will change advertising][2]" (which you should definitely read), the always-insightful Stacy Higginbotham tossed in a line that I can’t stop thinking about: “It's crucial that the IoT optimizes for trust." - -**[ Read also: Network World's[corporate guide to addressing IoT security][3] ]** - -### Trust is the IoT's most important attribute - -Higginbotham was talking about optimizing for trust as opposed to clicks, but really, trust is more important than just about any other value in the IoT. It’s more important than bandwidth usage, more important than power usage, more important than cost, more important than reliability, and even more important than security and privacy (though they are obviously related). In fact, trust is the critical factor in almost every aspect of the IoT. - -Don’t believe me? Let’s take a quick look at some recent developments in the field: - -For one thing, IoT devices often don’t take good care of the data they collect from you. Over 90% of data transactions on IoT devices are not fully encrypted, according to a new [study from security company Zscaler][4]. The [problem][5], apparently, is that many companies have large numbers of consumer-grade IoT devices on their networks. In addition, many IoT devices are attached to the companies’ general networks, and if that network is breached, the IoT devices and data may also be compromised. - -In some cases, ownership of IoT data can raise surprisingly serious trust concerns. According to [Kaiser Health News][6], smartphone sleep apps, as well as smart beds and smart mattress pads, gather amazingly personal information: “It knows when you go to sleep. It knows when you toss and turn. It may even be able to tell when you’re having sex.” And while companies such as Sleep Number say they don’t share the data they gather, their written privacy policies clearly state that they _can_. - -### **Lack of trust may lead to new laws** - -In California, meanwhile, "lawmakers are pushing for new privacy rules affecting smart speakers” such as the Amazon Echo. According to the _[LA Times][7]_ , the idea is “to ensure that the devices don’t record private conversations without permission,” requiring a specific opt-in process. Why is this an issue? Because consumers—and their elected representatives—don’t trust that Amazon, or any IoT vendor, will do the right thing with the data it collects from the IoT devices it sells—perhaps because it turns out that thousands of [Amazon employees have been listening in on what Alexa users are][8] saying to their Echo devices. - -The trust issues get even trickier when you consider that Amazon reportedly considered letting Alexa listen to users even without a wake word like “Alexa” or “computer,” and is reportedly working on [wearable devices designed to read human emotions][9] from listening to your voice. - -“The trust has been breached,” said California Assemblyman Jordan Cunningham (R-Templeton) to the _LA Times_. - -As critics of the bill ([AB 1395][10]) point out, the restrictions matter because voice assistants require this data to improve their ability to correctly understand and respond to requests. - -### **Some first steps toward increasing trust** - -Perhaps recognizing that the IoT needs to be optimized for trust so that we are comfortable letting it do its job, Amazon recently introduced a new Alexa voice command: “[Delete what I said today][11].” - -Moves like that, while welcome, will likely not be enough. - -For example, a [new United Nations report][12] suggests that “voice assistants reinforce harmful gender stereotypes” when using female-sounding voices and names like Alexa and Siri. Put simply, “Siri’s ‘female’ obsequiousness—and the servility expressed by so many other digital assistants projected as young women—provides a powerful illustration of gender biases coded into technology products, pervasive in the technology sector and apparent in digital skills education.” I'm not sure IoT vendors are eager—or equipped—to tackle issues like that. - -**More on IoT:** - - * [What is the IoT? How the internet of things works][13] - * [What is edge computing and how it’s changing the network][14] - * [Most powerful Internet of Things companies][15] - * [10 Hot IoT startups to watch][16] - * [The 6 ways to make money in IoT][17] - * [What is digital twin technology? [and why it matters]][18] - * [Blockchain, service-centric networking key to IoT success][19] - * [Getting grounded in IoT networking and security][20] - * [Building IoT-ready networks must become a priority][21] - * [What is the Industrial IoT? [And why the stakes are so high]][22] - - - -Join the Network World communities on [Facebook][23] and [LinkedIn][24] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3399817/its-time-for-the-iot-to-optimize-for-trust.html - -作者:[Fredric Paul][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://www.networkworld.com/author/Fredric-Paul/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2018/09/bose-sleepbuds-2-100771579-large.jpg -[2]: https://mailchi.mp/iotpodcast/stacey-on-iot-how-iot-changes-advertising?e=6bf9beb394 -[3]: https://www.networkworld.com/article/3269165/internet-of-things/a-corporate-guide-to-addressing-iot-security-concerns.html -[4]: https://www.zscaler.com/blogs/research/iot-traffic-enterprise-rising-so-are-threats -[5]: https://www.csoonline.com/article/3397044/over-90-of-data-transactions-on-iot-devices-are-unencrypted.html -[6]: https://khn.org/news/a-wake-up-call-on-data-collecting-smart-beds-and-sleep-apps/ -[7]: https://www.latimes.com/politics/la-pol-ca-alexa-google-home-privacy-rules-california-20190528-story.html -[8]: https://www.usatoday.com/story/tech/2019/04/11/amazon-employees-listening-alexa-customers/3434732002/ -[9]: https://www.bloomberg.com/news/articles/2019-05-23/amazon-is-working-on-a-wearable-device-that-reads-human-emotions -[10]: https://leginfo.legislature.ca.gov/faces/billTextClient.xhtml?bill_id=201920200AB1395 -[11]: https://venturebeat.com/2019/05/29/amazon-launches-alexa-delete-what-i-said-today-voice-command/ -[12]: https://unesdoc.unesco.org/ark:/48223/pf0000367416.page=1 -[13]: https://www.networkworld.com/article/3207535/internet-of-things/what-is-the-iot-how-the-internet-of-things-works.html -[14]: https://www.networkworld.com/article/3224893/internet-of-things/what-is-edge-computing-and-how-it-s-changing-the-network.html -[15]: https://www.networkworld.com/article/2287045/internet-of-things/wireless-153629-10-most-powerful-internet-of-things-companies.html -[16]: https://www.networkworld.com/article/3270961/internet-of-things/10-hot-iot-startups-to-watch.html -[17]: https://www.networkworld.com/article/3279346/internet-of-things/the-6-ways-to-make-money-in-iot.html -[18]: https://www.networkworld.com/article/3280225/internet-of-things/what-is-digital-twin-technology-and-why-it-matters.html -[19]: https://www.networkworld.com/article/3276313/internet-of-things/blockchain-service-centric-networking-key-to-iot-success.html -[20]: https://www.networkworld.com/article/3269736/internet-of-things/getting-grounded-in-iot-networking-and-security.html -[21]: https://www.networkworld.com/article/3276304/internet-of-things/building-iot-ready-networks-must-become-a-priority.html -[22]: https://www.networkworld.com/article/3243928/internet-of-things/what-is-the-industrial-iot-and-why-the-stakes-are-so-high.html -[23]: https://www.facebook.com/NetworkWorld/ -[24]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190604 Data center workloads become more complex despite promises to the contrary.md b/sources/talk/20190604 Data center workloads become more complex despite promises to the contrary.md deleted file mode 100644 index 31d127e77d..0000000000 --- a/sources/talk/20190604 Data center workloads become more complex despite promises to the contrary.md +++ /dev/null @@ -1,64 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Data center workloads become more complex despite promises to the contrary) -[#]: via: (https://www.networkworld.com/article/3400086/data-center-workloads-become-more-complex-despite-promises-to-the-contrary.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Data center workloads become more complex despite promises to the contrary -====== -The data center is shouldering a greater burden than ever, despite promises of ease and the cloud. -![gorodenkoff / Getty Images][1] - -Data centers are becoming more complex and still run the majority of workloads despite the promises of simplicity of deployment through automation and hyperconverged infrastructure (HCI), not to mention how the cloud was supposed to take over workloads. - -That’s the finding of the Uptime Institute's latest [annual global data center survey][2] (registration required). The majority of IT loads still run on enterprise data centers even in the face of cloud adoption, putting pressure on administrators to have to manage workloads across the hybrid infrastructure. - -**[ Learn[how server disaggregation can boost data center efficiency][3] | Get regularly scheduled insights: [Sign up for Network World newsletters][4] ]** - -With workloads like artificial intelligence (AI) and machine language coming to the forefront, that means facilities face greater power and cooling challenges, since AI is extremely processor-intensive. That puts strain on data center administrators and power and cooling vendors alike to keep up with the growth in demand. - -On top of it all, everyone is struggling to get enough staff with the right skills. - -### Outages, staffing problems, lack of public cloud visibility among top concerns - -Among the key findings of Uptime's report: - - * The large, privately owned enterprise data center facility still forms the bedrock of corporate IT and is expected to be running half of all workloads in 2021. - * The staffing problem affecting most of the data center sector has only worsened. Sixty-one percent of respondents said they had difficulty retaining or recruiting staff, up from 55% a year earlier. - * Outages continue to cause significant problems for operators. Just over a third (34%) of all respondents had an outage or severe IT service degradation in the past year, while half (50%) had an outage or severe IT service degradation in the past three years. - * Ten percent of all respondents said their most recent significant outage cost more than $1 million. - * A lack of visibility, transparency, and accountability of public cloud services is a major concern for enterprises that have mission-critical applications. A fifth of operators surveyed said they would be more likely to put workloads in a public cloud if there were more visibility. Half of those using public cloud for mission-critical applications also said they do not have adequate visibility. - * Improvements in data center facility energy efficiency have flattened out and even deteriorated slightly in the past two years. The average PUE for 2019 is 1.67. - * Rack power density is rising after a long period of flat or minor increases, causing many to rethink cooling strategies. - * Power loss was the single biggest cause of outages, accounting for one-third of outages. Sixty percent of respondents said their data center’s outage could have been prevented with better management/processes or configuration. - - - -Traditionally data centers are improving their reliability through "rigorous attention to power, infrastructure, connectivity and on-site IT replication," the Uptime report says. The solution, though, is pricy. Data center operators are getting distributed resiliency through active-active data centers where at least two active data centers replicate data to each other. Uptime found up to 40% of those surveyed were using this method. - -The Uptime survey was conducted in March and April of this year, surveying 1,100 end users in more than 50 countries and dividing them into two groups: the IT managers, owners, and operators of data centers and the suppliers, designers, and consultants that service the industry. - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3400086/data-center-workloads-become-more-complex-despite-promises-to-the-contrary.html - -作者:[Andy Patrizio][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://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/05/cso_cloud_computing_backups_it_engineer_data_center_server_racks_connections_by_gorodenkoff_gettyimages-943065400_3x2_2400x1600-100796535-large.jpg -[2]: https://uptimeinstitute.com/2019-data-center-industry-survey-results -[3]: https://www.networkworld.com/article/3266624/how-server-disaggregation-could-make-cloud-datacenters-more-efficient.html -[4]: https://www.networkworld.com/newsletters/signup.html -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190604 Moving to the Cloud- SD-WAN Matters- Part 2.md b/sources/talk/20190604 Moving to the Cloud- SD-WAN Matters- Part 2.md deleted file mode 100644 index 2f68bd6f59..0000000000 --- a/sources/talk/20190604 Moving to the Cloud- SD-WAN Matters- Part 2.md +++ /dev/null @@ -1,66 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Moving to the Cloud? SD-WAN Matters! Part 2) -[#]: via: (https://www.networkworld.com/article/3398488/moving-to-the-cloud-sd-wan-matters-part-2.html) -[#]: author: (Rami Rammaha https://www.networkworld.com/author/Rami-Rammaha/) - -Moving to the Cloud? SD-WAN Matters! Part 2 -====== - -![istock][1] - -This is the second installment of the blog series exploring how enterprises can realize the full transformation promise of the cloud by shifting to a business first networking model powered by a business-driven [SD-WAN][2]. The first installment explored automating secure IPsec connectivity and intelligently steering traffic to cloud providers. We also framed the direct correlation between moving to the cloud and adopting an SD-WAN. In this blog, we will expand upon several additional challenges that can be addressed with a business-driven SD-WAN when embracing the cloud: - -### Simplifying and automating security zone-based segmentation - -Securing cloud-first branches requires a robust multi-level approach that addresses following considerations: - - * Restricting outside traffic coming into the branch to sessions exclusively initiated by internal users with a built-in stateful firewall, avoiding appliance sprawl and lowering operational costs; this is referred to as the app whitelist model - * Encrypting communications between end points within the SD-WAN fabric and between branch locations and public cloud instances - * Service chaining traffic to a cloud-hosted security service like [Zscaler][3] for Layer 7 inspection and analytics for internet-bound traffic - * Segmenting traffic spanning the branch, WAN and data center/cloud - * Centralizing policy orchestration and automation of zone-based firewall, VLAN and WAN overlays - - - -A traditional device-centric WAN approach for security segmentation requires the time-consuming manual configuration of routers and/or firewalls on a device-by-device and site-by-site basis. This is not only complex and cumbersome, but it simply can’t scale to 100s or 1000s of sites. Anusha Vaidyanathan, director of product management at Silver Peak, explains how to automate end-to-end zone-based segmentation, emphasizing the advantages of a business-driven approach in this [lightboard video][4]. - -### Delivering the Highest Quality of Experience to IT teams - -The goal for enterprise IT is enabling business agility and increasing operational efficiency. The traditional router-centric WAN approach doesn’t provide the best quality of experience for IT as management and on-going network operations are manual and time consuming, device-centric, cumbersome, error-prone and inefficient. - -A business-driven SD-WAN such as the Silver Peak [Unity EdgeConnect™][5] unified SD-WAN edge platform centralizes the orchestration of business-driven policies. EdgeConnect automation, machine learning and open APIs easily integrate with third-party management tools and real-time visibility tools to deliver the highest quality of experience for IT, enabling them to reclaim nights and weekends. Manav Mishra, vice president of product management at Silver Peak, explains the latest Silver Peak innovations in this [lightboard video][6]. - -As enterprises become increasingly dependent on the cloud and embrace a multi-cloud strategy, they must address a number of new challenges: - - * A centralized approach to securely embracing the cloud and the internet - * How to extend the on-premise data center to a public cloud and migrating workloads between private and public cloud, taking application portability into account - * Deliver consistent high application performance and availability to hosted applications whether they reside in the data center, private or public clouds or are delivered as SaaS services - * A proactive way to quickly resolve complex issues that span the data center and cloud as well as multiple WAN transport services by harnessing the power of advanced visibility and analytics tools - - - -The business-driven EdgeConnect SD-WAN edge platform enables enterprise IT organizations to easily and consistently embrace the public cloud. Unified security and performance capabilities with automation deliver the highest quality of experience for both users and IT while lowering overall WAN expenditures. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3398488/moving-to-the-cloud-sd-wan-matters-part-2.html - -作者:[Rami Rammaha][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://www.networkworld.com/author/Rami-Rammaha/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/05/istock-909772962-100797711-large.jpg -[2]: https://www.silver-peak.com/sd-wan/sd-wan-explained -[3]: https://www.silver-peak.com/company/tech-partners/zscaler -[4]: https://www.silver-peak.com/resource-center/how-to-create-sd-wan-security-zones-in-edgeconnect -[5]: https://www.silver-peak.com/products/unity-edge-connect -[6]: https://www.silver-peak.com/resource-center/how-to-optimize-quality-of-experience-for-it-using-sd-wan diff --git a/sources/talk/20190604 Why Emacs.md b/sources/talk/20190604 Why Emacs.md deleted file mode 100644 index 0d9b12ba1a..0000000000 --- a/sources/talk/20190604 Why Emacs.md +++ /dev/null @@ -1,94 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why Emacs) -[#]: via: (https://saurabhkukade.github.io/Why-Emacs/) -[#]: author: (Saurabh Kukade http://saurabhkukade.github.io/) - -Why Emacs -====== -![Image of Emacs][1] - -> “Emacs outshines all other editing software in approximately the same way that the noonday sun does the stars. It is not just bigger and brighter; it simply makes everything else vanish.” - -> -Neal Stephenson, “In the Beginning was the Command Line” - -### Introduction - -This is my first blog post about Emacs. I want to discuss step by step customization of Emacs for beginner. If you’re new to Emacs then you are in the right place, if you’re already familiar with Emacs then that is even better, I assure you that we will get to know many new things in here. - -Before getting into how to customize Emacs and what are the exciting features of Emacs I want to write about “why Emacs”. - -### Why Emacs? - -This was first question crossed my mind when one wise man asked me to try Emacs instead of VIM. Well, I am not writing this article to discuss a battle between two editors VIM and Emacs. That is a another story for another day. But Why Emacs? Well here are some things that justifies that Emacs is powerful and highly customizable. - -### 41 Years! - -Initial release year of Emacs is 1976 that means Emacs is standing and adapting changes from last 41 years. - -41 years of time for a software is huge and that makes Emacs is one of the best Software Engineering product. - -### Lisp (Emacs Lisp) - -If you are lisp programmer (lisper) then I don’t need to explain you. But for those who don’t know Lisp and its dialects like Scheme, Clojure then Lisp (and all dialects of Lips) is powerful programming language and it stands different from other languages because of its unique property of “Homoiconicity”. - -As Emacs is implemented in C and Emacs Lisp (Emacs Lisp is a dialect of the Lisp programming language) it makes Emacs what is because, - - * The simple syntax of Lisp, together with the powerful editing features made possible by that simple syntax, add up to a more convenient programming system than is practical with other languages. Lisp and extensible editors are made for each other. - - * The simplicity of Lisp syntax makes intelligent editing operations easier to implement, while the complexity of other languages discourages their users from implementing similar operations for them. - - - - -### Highly Customizable - -To any programmer, tools gives power and convenience for reading, writing and managing a code. - -Hence, if a tool is programmatic-ally customizable then that makes it even more powerful. - -Emacs has above property and in fact is itself one of best tool known for its flexibility and easy customization. Emacs provides basic commands and key configuration for editing a text. This commands and key-configuration are editable and extensible. - -Beside basic configuration, Emacs is not biased towards any specific language for customization. One can customize Emacs for any programming language or extend easily existing customization. - -Emacs provides the consistent environment for multiple programming languages, email, organizer (via org-mode), a shell/interpreter, note taking, and document writing. - -For customizing you don’t need to learn Emacs-lisp from scratch. You can use existing packages available and that’s it. Installing and managing packages in Emacs is easy, Emacs has in-built package manager for it. - -Customization is very portable, one just need to place a file or directory containing personal customization file(s) in the right place and it’s done for getting personal customization to new place. ## Huge platform Support - -Emacs supports Lisp, Ruby, Python, PHP, Java, Erlang, JavaScript, C, C++, Prolog, Tcl, AWK, PostScript, Clojure, Scala, Perl, Haskell, Elixir all of these languages and more like mysql, pgsql etc. Because of the powerful Lisp core, Emacs is easy to extend to add support for new languages if need to. - -Also one can use the built-in IRC client ERC along with BitlBee to connect to your favorite chat services, or use the Jabber package to hop on any XMPP service. - -### Org-mode - -No matter if you are programmer or not. Org mode is for everyone. Org mode lets you to plan projects and organize schedule. It can be also use for publish notes and documents to different formats, like LaTeX->pdf, html, and markdown. - -In fact, Org-mode is so awesome enough that many non-Emacs users started learn Emacs. - -### Final note - -There are number of reason to argue that Emacs is cool and awesome to use. But I just wanted you to give glimpse of why to try Emacs. In the upcoming post I will be writing step by step information to customize Emacs from scratch to awesome IDE. - -Thank you! - -Please don’t forget to comment your thoughts and suggestions below. - --------------------------------------------------------------------------------- - -via: https://saurabhkukade.github.io/Why-Emacs/ - -作者:[Saurabh Kukade][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: http://saurabhkukade.github.io/ -[b]: https://github.com/lujun9972 -[1]: https://saurabhkukade.github.io/img/emacs.jpeg diff --git a/sources/talk/20190606 Cloud adoption drives the evolution of application delivery controllers.md b/sources/talk/20190606 Cloud adoption drives the evolution of application delivery controllers.md deleted file mode 100644 index d7b22353c4..0000000000 --- a/sources/talk/20190606 Cloud adoption drives the evolution of application delivery controllers.md +++ /dev/null @@ -1,67 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Cloud adoption drives the evolution of application delivery controllers) -[#]: via: (https://www.networkworld.com/article/3400897/cloud-adoption-drives-the-evolution-of-application-delivery-controllers.html) -[#]: author: (Zeus Kerravala https://www.networkworld.com/author/Zeus-Kerravala/) - -Cloud adoption drives the evolution of application delivery controllers -====== -Application delivery controllers (ADCs) are on the precipice of shifting from traditional hardware appliances to software form factors. -![Aramyan / Getty Images / Microsoft][1] - -Migrating to a cloud computing model will obviously have an impact on the infrastructure that’s deployed. This shift has already been seen in the areas of servers, storage, and networking, as those technologies have evolved to a “software-defined” model. And it appears that application delivery controllers (ADCs) are on the precipice of a similar shift. - -In fact, a new ZK Research [study about cloud computing adoption and the impact on ADCs][2] found that, when looking at the deployment model, hardware appliances are the most widely deployed — with 55% having fully deployed or are currently testing and only 15% currently researching hardware. (Note: I am an employee of ZK Research.) - -Juxtapose this with containerized ADCs where only 34% have deployed or are testing but 24% are currently researching and it shows that software in containers will outpace hardware for growth. Not surprisingly, software on bare metal and in virtual machines showed similar although lower, “researching” numbers that support the thesis that the market is undergoing a shift from hardware to software. - -**[ Read also:[How to make hybrid cloud work][3] ]** - -The study, conducted in collaboration with Kemp Technologies, surveyed 203 respondents from the U.K. and U.S. The demographic split was done to understand regional differences. An equal number of mid and large size enterprises were looked at, with 44% being from over 5,000 employees and the other 56% from companies that have 300 to 5,000 people. - -### Incumbency helps but isn’t a fait accompli for future ADC purchases - -The primary tenet of my research has always been that incumbents are threatened when markets transition, and this is something I wanted to investigate in the study. The survey asked whether buyers would consider an alternative as they evolve their applications from legacy (mode 1) to cloud-native (mode 2). The results offer a bit of good news and bad news for the incumbent providers. Only 8% said they would definitely select a new vendor, but 35% said they would not change. That means the other 57% will look at alternatives. This is sensible, as the requirements for cloud ADCs are different than ones that support traditional applications. - -### IT pros want better automation capabilities - -This begs the question as to what features ADC buyers want for a cloud environment versus traditional ones. The survey asked specifically what features would be most appealing in future purchases, and the top response was automation, followed by central management, application analytics, on-demand scaling (which is a form of automation), and visibility. - -The desire to automate was a positive sign for the evolution of buyer mindset. Just a few years ago, the mere mention of automation would have sent IT pros into a panic. The reality is that IT can’t operate effectively without automation, and technology professionals are starting to understand that. - -The reason automation is needed is that manual changes are holding businesses back. The survey asked how the speed of ADC changes impacts the speed at which applications are rolled out, and a whopping 60% said it creates significant or minor delays. In an era of DevOps and continuous innovation, multiple minor delays create a drag on the business and can cause it to fall behind is more agile competitors. - -![][4] - -### ADC upgrades and service provisioning benefit most from automation - -The survey also drilled down on specific ADC tasks to see where automation would have the most impact. Respondents were asked how long certain tasks took, answering in minutes, days, weeks, or months. Shockingly, there wasn’t a single task where the majority said it could be done in minutes. The closest was adding DNS entries for new virtual IP addresses (VIPs) where 46% said they could do that in minutes. - -Upgrading, provisioning new load balancers, and provisioning new VIPs took the longest. Looking ahead, this foreshadows big problems. As the data center gets more disaggregated and distributed, IT will deploy more software-based ADCs in more places. Taking days or weeks or month to perform these functions will cause the organization to fall behind. - -The study clearly shows changes are in the air for the ADC market. For IT pros, I strongly recommend that as the environment shifts to the cloud, it’s prudent to evaluate new vendors. By all means, see what your incumbent vendor has, but look at least at two others that offer software-based solutions. Also, there should be a focus on automating as much as possible, so the primary evaluation criteria for ADCs should be how easy it is to implement automation. - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3400897/cloud-adoption-drives-the-evolution-of-application-delivery-controllers.html - -作者:[Zeus Kerravala][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://www.networkworld.com/author/Zeus-Kerravala/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/05/cw_microsoft_sharepoint_vs_onedrive_clouds_and_hands_by_aramyan_gettyimages-909772962_2400x1600-100796932-large.jpg -[2]: https://kemptechnologies.com/research-papers/adc-market-research-study-zeus-kerravala/?utm_source=zkresearch&utm_medium=referral&utm_campaign=zkresearch&utm_term=zkresearch&utm_content=zkresearch -[3]: https://www.networkworld.com/article/3119362/hybrid-cloud/how-to-make-hybrid-cloud-work.html#tk.nww-fsb -[4]: https://images.idgesg.net/images/article/2019/06/adc-survey-zk-research-100798593-large.jpg -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190606 For enterprise storage, persistent memory is here to stay.md b/sources/talk/20190606 For enterprise storage, persistent memory is here to stay.md deleted file mode 100644 index 3da91bb311..0000000000 --- a/sources/talk/20190606 For enterprise storage, persistent memory is here to stay.md +++ /dev/null @@ -1,118 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (For enterprise storage, persistent memory is here to stay) -[#]: via: (https://www.networkworld.com/article/3398988/for-enterprise-storage-persistent-memory-is-here-to-stay.html) -[#]: author: (John Edwards ) - -For enterprise storage, persistent memory is here to stay -====== -Persistent memory – also known as storage class memory – has tantalized data center operators for many years. A new technology promises the key to success. -![Thinkstock][1] - -It's hard to remember a time when semiconductor vendors haven't promised a fast, cost-effective and reliable persistent memory technology to anxious [data center][2] operators. Now, after many years of waiting and disappointment, technology may have finally caught up with the hype to make persistent memory a practical proposition. - -High-capacity persistent memory, also known as storage class memory ([SCM][3]), is fast and directly addressable like dynamic random-access memory (DRAM), yet is able to retain stored data even after its power has been switched off—intentionally or unintentionally. The technology can be used in data centers to replace cheaper, yet far slower traditional persistent storage components, such as [hard disk drives][4] (HDD) and [solid-state drives][5] (SSD). - -**Learn more about enterprise storage** - - * [Why NVMe over Fabric matters][6] - * [What is hyperconvergence?][7] - * [How NVMe is changing enterprise storage][8] - * [Making the right hyperconvergence choice: HCI hardware or software?][9] - - - -Persistent memory can also be used to replace DRAM itself in some situations without imposing a significant speed penalty. In this role, persistent memory can deliver crucial operational benefits, such as lightning-fast database-server restarts during maintenance, power emergencies and other expected and unanticipated reboot situations. - -Many different types of strategic operational applications and databases, particularly those that require low-latency, high durability and strong data consistency, can benefit from persistent memory. The technology also has the potential to accelerate virtual machine (VM) storage and deliver higher performance to multi-node, distributed-cloud applications. - -In a sense, persistent memory marks a rebirth of core memory. "Computers in the ‘50s to ‘70s used magnetic core memory, which was direct access, non-volatile memory," says Doug Wong, a senior member of [Toshiba Memory America's][10] technical staff. "Magnetic core memory was displaced by SRAM and DRAM, which are both volatile semiconductor memories." - -One of the first persistent memory devices to come to market is [Intel’s Optane DC][11]. Other vendors that have released persistent memory products or are planning to do so include [Samsung][12], Toshiba America Memory and [SK Hynix][13]. - -### Persistent memory: performance + reliability - -With persistent memory, data centers have a unique opportunity to gain faster performance and lower latency without enduring massive technology disruption. "It's faster than regular solid-state NAND flash-type storage, but you're also getting the benefit that it’s persistent," says Greg Schulz, a senior advisory analyst at vendor-independent storage advisory firm [StorageIO.][14] "It's the best of both worlds." - -Yet persistent memory offers adopters much more than speedy, reliable storage. In an ideal IT world, all of the data associated with an application would reside within DRAM to achieve maximum performance. "This is currently not practical due to limited DRAM and the fact that DRAM is volatile—data is lost when power fails," observes Scott Nelson, senior vice president and general manager of Toshiba Memory America's memory business unit. - -Persistent memory transports compatible applications to an "always on" status, providing continuous access to large datasets through increased system memory capacity, says Kristie Mann, [Intel's][15] director of marketing for data center memory and storage. She notes that Optane DC can supply data centers with up to three-times more system memory capacity (as much as 36TBs), system restarts in seconds versus minutes, 36% more virtual machines per node, and up to 8-times better performance on [Apache Spark][16], a widely used open-source distributed general-purpose cluster-computing framework. - -System memory currently represents 60% of total platform costs, Mann says. She observes that Optane DC persistent memory provides significant customer value by delivering 1.2x performance/dollar on key customer workloads. "This value will dramatically change memory/storage economics and accelerate the data-centric era," she predicts. - -### Where will persistent memory infiltrate enterprise storage? - -Persistent memory is likely to first enter the IT mainstream with minimal fanfare, serving as a high-performance caching layer for high performance SSDs. "This could be adopted relatively-quickly," Nelson observes. Yet this intermediary role promises to be merely a stepping-stone to increasingly crucial applications. - -Over the next few years, persistent technology will impact data centers serving enterprises across an array of sectors. "Anywhere time is money," Schulz says. "It could be financial services, but it could also be consumer-facing or sales-facing operations." - -Persistent memory supercharges anything data-related that requires extreme speed at extreme scale, observes Andrew Gooding, vice president of engineering at [Aerospike][17], which delivered the first commercially available open database optimized for use with Intel Optane DC. - -Machine learning is just one of many applications that stand to benefit from persistent memory. Gooding notes that ad tech firms, which rely on machine learning to understand consumers' reactions to online advertising campaigns, should find their work made much easier and more effective by persistent memory. "They’re collecting information as users within an ad campaign browse the web," he says. "If they can read and write all that data quickly, they can then apply machine-learning algorithms and tailor specific ads for users in real time." - -Meanwhile, as automakers become increasingly reliant on data insights, persistent memory promises to help them crunch numbers and refine sophisticated new technologies at breakneck speeds. "In the auto industry, manufacturers face massive data challenges in autonomous vehicles, where 20 exabytes of data needs to be processed in real time, and they're using self-training machine-learning algorithms to help with that," Gooding explains. "There are so many fields where huge amounts of data need to be processed quickly with machine-learning techniques—fraud detection, astronomy... the list goes on." - -Intel, like other persistent memory vendors, expects cloud service providers to be eager adopters, targeting various types of in-memory database services. Google, for example, is applying persistent memory to big data workloads on non-relational databases from vendors such as Aerospike and [Redis Labs][18], Mann says. - -High-performance computing (HPC) is yet another area where persistent memory promises to make a tremendous impact. [CERN][19], the European Organization for Nuclear Research, is using Intel's Optane DC to significantly reduce wait times for scientific computing. "The efficiency of their algorithms depends on ... persistent memory, and CERN considers it a major breakthrough that is necessary to the work they are doing," Mann observes. - -### How to prepare storage infrastructure for persistent memory - -Before jumping onto the persistent memory bandwagon, organizations need to carefully scrutinize their IT infrastructure to determine the precise locations of any existing data bottlenecks. This task will be primary application-dependent, Wong notes. "If there is significant performance degradation due to delays associated with access to data stored in non-volatile storage—SSD or HDD—then an SCM tier will improve performance," he explains. Yet some applications will probably not benefit from persistent memory, such as compute-bound applications where CPU performance is the bottleneck. - -Developers may need to reevaluate fundamental parts of their storage and application architectures, Gooding says. "They will need to know how to program with persistent memory," he notes. "How, for example, to make sure writes are flushed to the actual persistent memory device when necessary, as opposed to just sitting in the CPU cache." - -To leverage all of persistent memory's potential benefits, significant changes may also be required in how code is designed. When moving applications from DRAM and flash to persistent memory, developers will need to consider, for instance, what happens when a program crashes and restarts. "Right now, if they write code that leaks memory, that leaked memory is recovered on restart," Gooding explains. With persistent memory, that isn't necessarily the case. "Developers need to make sure the code is designed to reconstruct a consistent state when a program restarts," he notes. "You may not realize how much your designs rely on the traditional combination of fast volatile DRAM and block storage, so it can be tricky to change your code designs for something completely new like persistent memory." - -Older versions of operating systems may also need to be updated to accommodate the new technology, although newer OSes are gradually becoming persistent memory aware, Schulz says. "In other words, if they detect that persistent memory is available, then they know how to utilize that either as a cache, or some other memory." - -Hypervisors, such as [Hyper-V][20] and [VMware][21], now know how to leverage persistent memory to support productivity, performance and rapid restarts. By utilizing persistent memory along with the latest versions of VMware, a whole system can see an uplift in speed and also maximize the number of VMs to fit on a single host, says Ian McClarty, CEO and president of data center operator [PhoenixNAP Global IT Services][22]. "This is a great use case for companies who want to own less hardware or service providers who want to maximize hardware to virtual machine deployments." - -Many key enterprise applications, particularly databases, are also becoming persistent memory aware. SQL Server and [SAP’s][23] flagship [HANA][24] database management platform have both embraced persistent memory. "The SAP HANA platform is commonly used across multiple industries to process data and transactions, and then run advanced analytics ... to deliver real-time insights," Mann observes. - -In terms of timing, enterprises and IT organizations should begin persistent memory planning immediately, Schulz recommends. "You should be talking with your vendors and understanding their roadmap, their plans, for not only supporting this technology, but also in what mode: as storage, as memory." - -Join the Network World communities on [Facebook][25] and [LinkedIn][26] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3398988/for-enterprise-storage-persistent-memory-is-here-to-stay.html - -作者:[John Edwards][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2017/08/file_folder_storage_sharing_thinkstock_477492571_3x2-100732889-large.jpg -[2]: https://www.networkworld.com/article/3353637/the-data-center-is-being-reimagined-not-disappearing.html -[3]: https://www.networkworld.com/article/3026720/the-next-generation-of-storage-disruption-storage-class-memory.html -[4]: https://www.networkworld.com/article/2159948/hard-disk-drives-vs--solid-state-drives--are-ssds-finally-worth-the-money-.html -[5]: https://www.networkworld.com/article/3326058/what-is-an-ssd.html -[6]: https://www.networkworld.com/article/3273583/why-nvme-over-fabric-matters.html -[7]: https://www.networkworld.com/article/3207567/what-is-hyperconvergence -[8]: https://www.networkworld.com/article/3280991/what-is-nvme-and-how-is-it-changing-enterprise-storage.html -[9]: https://www.networkworld.com/article/3318683/making-the-right-hyperconvergence-choice-hci-hardware-or-software -[10]: https://business.toshiba-memory.com/en-us/top.html -[11]: https://www.intel.com/content/www/us/en/architecture-and-technology/optane-dc-persistent-memory.html -[12]: https://www.samsung.com/semiconductor/ -[13]: https://www.skhynix.com/eng/index.jsp -[14]: https://storageio.com/ -[15]: https://www.intel.com/content/www/us/en/homepage.html -[16]: https://spark.apache.org/ -[17]: https://www.aerospike.com/ -[18]: https://redislabs.com/ -[19]: https://home.cern/ -[20]: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/about/ -[21]: https://www.vmware.com/ -[22]: https://phoenixnap.com/ -[23]: https://www.sap.com/index.html -[24]: https://www.sap.com/products/hana.html -[25]: https://www.facebook.com/NetworkWorld/ -[26]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190606 Self-learning sensor chips won-t need networks.md b/sources/talk/20190606 Self-learning sensor chips won-t need networks.md deleted file mode 100644 index c5abec5426..0000000000 --- a/sources/talk/20190606 Self-learning sensor chips won-t need networks.md +++ /dev/null @@ -1,82 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Self-learning sensor chips won’t need networks) -[#]: via: (https://www.networkworld.com/article/3400659/self-learning-sensor-chips-wont-need-networks.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -Self-learning sensor chips won’t need networks -====== -Scientists working on new, machine-learning networks aim to embed everything needed for artificial intelligence (AI) onto a processor, eliminating the need to transfer data to the cloud or computers. -![Jiraroj Praditcharoenkul / Getty Images][1] - -Tiny, intelligent microelectronics should be used to perform as much sensor processing as possible on-chip rather than wasting resources by sending often un-needed, duplicated raw data to the cloud or computers. So say scientists behind new, machine-learning networks that aim to embed everything needed for artificial intelligence (AI) onto a processor. - -“This opens the door for many new applications, starting from real-time evaluation of sensor data,” says [Fraunhofer Institute for Microelectronic Circuits and Systems][2] on its website. No delays sending unnecessary data onwards, along with speedy processing, means theoretically there is zero latency. - -Plus, on-microprocessor, self-learning means the embedded, or sensor, devices can self-calibrate. They can even be “completely reconfigured to perform a totally different task afterwards,” the institute says. “An embedded system with different tasks is possible.” - -**[ Also read:[What is edge computing?][3] and [How edge networking and IoT will reshape data centers][4] ]** - -Much internet of things (IoT) data sent through networks is redundant and wastes resources: a temperature reading taken every 10 minutes, say, when the ambient temperature hasn’t changed, is one example. In fact, one only needs to know when the temperature has changed, and maybe then only when thresholds have been met. - -### Neural network-on-sensor chip - -The commercial German research organization says it’s developing a specific RISC-V microprocessor with a special hardware accelerator designed for a [brain-copying, artificial neural network (ANN) it has developed][5]. The architecture could ultimately be suitable for the condition-monitoring or predictive sensors of the kind we will likely see more of in the industrial internet of things (IIoT). - -Key to Fraunhofer IMS’s [Artificial Intelligence for Embedded Systems (AIfES)][6] is that the self-learning takes place at chip level rather than in the cloud or on a computer, and that it is independent of “connectivity towards a cloud or a powerful and resource-hungry processing entity.” But it still offers a “full AI mechanism, like independent learning,” - -It’s “decentralized AI,” says Fraunhofer IMS. "It’s not focused towards big-data processing.” - -Indeed, with these kinds of systems, no connection is actually required for the raw data, just for the post-analytical results, if indeed needed. Swarming can even replace that. Swarming lets sensors talk to one another, sharing relevant information without even getting a host network involved. - -“It is possible to build a network from small and adaptive systems that share tasks among themselves,” Fraunhofer IMS says. - -Other benefits in decentralized neural networks include that they can be more secure than the cloud. Because all processing takes place on the microprocessor, “no sensitive data needs to be transferred,” Fraunhofer IMS explains. - -### Other edge computing research - -The Fraunhofer researchers aren’t the only academics who believe entire networks become redundant with neuristor, brain-like AI chips. Binghamton University and Georgia Tech are working together on similar edge-oriented tech. - -“The idea is we want to have these chips that can do all the functioning in the chip, rather than messages back and forth with some sort of large server,” Binghamton said on its website when [I wrote about the university's work last year][7]. - -One of the advantages of no major communications linking: Not only don't you have to worry about internet resilience, but also that energy is saved creating the link. Energy efficiency is an ambition in the sensor world — replacing batteries is time consuming, expensive, and sometimes, in the case of remote locations, extremely difficult. - -Memory or storage for swaths of raw data awaiting transfer to be processed at a data center, or similar, doesn’t have to be provided either — it’s been processed at the source, so it can be discarded. - -**More about edge networking:** - - * [How edge networking and IoT will reshape data centers][4] - * [Edge computing best practices][8] - * [How edge computing can help secure the IoT][9] - - - -Join the Network World communities on [Facebook][10] and [LinkedIn][11] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3400659/self-learning-sensor-chips-wont-need-networks.html - -作者:[Patrick Nelson][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://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/02/industry_4-0_industrial_iot_smart_factory_automation_by_jiraroj_praditcharoenkul_gettyimages-902668940_2400x1600-100788458-large.jpg -[2]: https://www.ims.fraunhofer.de/en.html -[3]: https://www.networkworld.com/article/3224893/internet-of-things/what-is-edge-computing-and-how-it-s-changing-the-network.html -[4]: https://www.networkworld.com/article/3291790/data-center/how-edge-networking-and-iot-will-reshape-data-centers.html -[5]: https://www.ims.fraunhofer.de/en/Business_Units_and_Core_Competencies/Electronic_Assistance_Systems/News/AIfES-Artificial_Intelligence_for_Embedded_Systems.html -[6]: https://www.ims.fraunhofer.de/en/Business_Units_and_Core_Competencies/Electronic_Assistance_Systems/technologies/Artificial-Intelligence-for-Embedded-Systems-AIfES.html -[7]: https://www.networkworld.com/article/3326557/edge-chips-could-render-some-networks-useless.html -[8]: https://www.networkworld.com/article/3331978/lan-wan/edge-computing-best-practices.html -[9]: https://www.networkworld.com/article/3331905/internet-of-things/how-edge-computing-can-help-secure-the-iot.html -[10]: https://www.facebook.com/NetworkWorld/ -[11]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190606 What to do when yesterday-s technology won-t meet today-s support needs.md b/sources/talk/20190606 What to do when yesterday-s technology won-t meet today-s support needs.md deleted file mode 100644 index 622537f2f9..0000000000 --- a/sources/talk/20190606 What to do when yesterday-s technology won-t meet today-s support needs.md +++ /dev/null @@ -1,53 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What to do when yesterday’s technology won’t meet today’s support needs) -[#]: via: (https://www.networkworld.com/article/3399875/what-to-do-when-yesterday-s-technology-won-t-meet-today-s-support-needs.html) -[#]: author: (Anand Rajaram ) - -What to do when yesterday’s technology won’t meet today’s support needs -====== - -![iStock][1] - -You probably already know that end user technology is exploding and are feeling the effects of it in your support organization every day. Remember when IT sanctioned and standardized every hardware and software instance in the workplace? Those days are long gone. Today, it’s the driving force of productivity that dictates what will or won’t be used – and that can be hard on a support organization. - -Whatever users need to do their jobs better, faster, more efficiently is what you are seeing come into the workplace. So naturally, that’s what comes into your service desk too. Support organizations see all kinds of [devices, applications, systems, and equipment][2], and it’s adding a great deal of complexity and demand to keep up with. In fact, four of the top five factors causing support ticket volumes to rise are attributed to new and current technology. - -To keep up with the steady [rise of tickets][3] and stay out in front of this surge, support organizations need to take a good, hard look at the processes and technologies they use. Yesterday’s methods won’t cut it. The landscape is simply changing too fast. Supporting today’s users and getting them back to work fast requires an expanding set of skills and tools. - -So where do you start with a new technology project? Just because a technology is new or hyped doesn’t mean it’s right for your organization. It’s important to understand your project goals and the experience you really want to create and match your technology choices to those goals. But don’t go it alone. Talk to your teams. Get intimately familiar with how your support organization works today. Understand your customers’ needs at a deep level. And bring the right people to the table to cover: - - * Business problem analysis: What existing business issue are stakeholders unhappy with? - * The impact of that problem: How does that issue justify making a change? - * Process automation analysis: What area(s) can technology help automate? - * Other solutions: Have you considered any other options besides technology? - - - -With these questions answered, you’re ready to entertain your technology options. Put together your “must-haves” in a requirements document and reach out to potential suppliers. During the initial information-gathering stage, assess if the supplier understands your goals and how their technology helps you meet them. To narrow the field, compare solutions side by side against your goals. Select the top two or three for more in-depth product demos before moving into product evaluations. By the time you’re ready for implementation, you have empirical, practical knowledge of how the solution will perform against your business goals. - -The key takeaway is this: Technology for technology’s sake is just technology. But technology that drives business value is a solution. If you want a solution that drives results for your organization and your customers, it’s worth following a strategic selection process to match your goals with the best technology for the job. - -For more insight, check out the [LogMeIn Rescue][4] and HDI webinar “[Technology and the Service Desk: Expanding Mission, Expanding Skills”][5]. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3399875/what-to-do-when-yesterday-s-technology-won-t-meet-today-s-support-needs.html - -作者:[Anand Rajaram][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/06/istock-1019006240-100798168-large.jpg -[2]: https://www.logmeinrescue.com/resources/datasheets/infographic-mobile-support-are-your-employees-getting-what-they-need?utm_source=idg%20media&utm_medium=display&utm_campaign=native&sfdc= -[3]: https://www.logmeinrescue.com/resources/analyst-reports/the-importance-of-remote-support-in-a-shift-left-world?utm_source=idg%20media&utm_medium=display&utm_campaign=native&sfdc= -[4]: https://www.logmeinrescue.com/?utm_source=idg%20media&utm_medium=display&utm_campaign=native&sfdc= -[5]: https://www.brighttalk.com/webcast/8855/312289?utm_source=LogMeIn7&utm_medium=brighttalk&utm_campaign=312289 diff --git a/sources/talk/20190611 6 ways to make enterprise IoT cost effective.md b/sources/talk/20190611 6 ways to make enterprise IoT cost effective.md deleted file mode 100644 index 492262c617..0000000000 --- a/sources/talk/20190611 6 ways to make enterprise IoT cost effective.md +++ /dev/null @@ -1,89 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (6 ways to make enterprise IoT cost effective) -[#]: via: (https://www.networkworld.com/article/3401082/6-ways-to-make-enterprise-iot-cost-effective.html) -[#]: author: (Fredric Paul https://www.networkworld.com/author/Fredric-Paul/) - -6 ways to make enterprise IoT cost effective -====== -Rob Mesirow, a principal at PwC’s Connected Solutions unit, offers tips for successfully implementing internet of things (IoT) projects without breaking the bank. -![DavidLeshem / Getty][1] - -There’s little question that the internet of things (IoT) holds enormous potential for the enterprise, in everything from asset tracking to compliance. - -But enterprise uses of IoT technology are still evolving, and it’s not yet entirely clear which use cases and practices currently make economic and business sense. So, I was thrilled to trade emails recently with [Rob Mesirow][2], a principal at [PwC’s Connected Solutions][3] unit, about how to make enterprise IoT implementations as cost effective as possible. - -“The IoT isn’t just about technology (hardware, sensors, software, networks, communications, the cloud, analytics, APIs),” Mesirow said, “though tech is obviously essential. It also includes ensuring cybersecurity, managing data governance, upskilling the workforce and creating a receptive workplace culture, building trust in the IoT, developing interoperability, and creating business partnerships and ecosystems—all part of a foundation that’s vital to a successful IoT implementation.” - -**[ Also read:[Enterprise IoT: Companies want solutions in these 4 areas][4] ]** - -Yes, that sounds complicated—and a lot of work for a still-hard-to-quantify return. Fortunately, though, Mesirow offered up some tips on how companies can make their IoT implementations as cost effective as possible. - -### 1\. Don’t wait for better technology - -Mesirow advised against waiting to implement IoT projects until you can deploy emerging technology such as [5G networks][5]. That makes sense, as long as your implementation doesn’t specifically require capabilities available only in the new technology. - -### 2\. Start with the basics, and scale up as needed - -“Companies need to start with the basics—building one app/task at a time—instead of jumping ahead with enterprise-wide implementations and ecosystems,” Mesirow said. - -“There’s no need to start an IoT initiative by tackling a huge, expensive ecosystem. Instead, begin with one manageable use case, and build up and out from there. The IoT can inexpensively automate many everyday tasks to increase effectiveness, employee productivity, and revenue.” - -After you pick the low-hanging fruit, it’s time to become more ambitious. - -“After getting a few successful pilots established, businesses can then scale up as needed, building on the established foundation of business processes, people experience, and technology," Mesirow said, - -### 3\. Make dumb things smart - -Of course, identifying the ripest low-hanging fruit isn’t always easy. - -“Companies need to focus on making dumb things smart, deploying infrastructure that’s not going to break the bank, and providing enterprise customers the opportunity to experience what data intelligence can do for their business,” Mesirow said. “Once they do that, things will take off.” - -### 4\. Leverage lower-cost networks - -“One key to building an IoT inexpensively is to use low-power, low-cost networks (Low-Power Wide-Area Networks (LPWAN)) to provide IoT services, which reduces costs significantly,” Mesirow said. - -Naturally, he mentioned that PwC has three separate platforms with some 80 products that hang off those platforms, which he said cost “a fraction of traditional IoT offerings, with security and privacy built in.” - -Despite the product pitch, though, Mesirow is right to call out the efficiencies involved in using low-cost, low-power networks instead of more expensive existing cellular. - -### 5\. Balance security vs. cost - -Companies need to plan their IoT network with costs vs. security in mind, Mesirow said. “Open-source networks will be less expensive, but there may be security concerns,” he said. - -That’s true, of course, but there may be security concerns in _any_ network, not just open-source solutions. Still, Mesirow’s overall point remains valid: Enterprises need to carefully consider all the trade-offs they’re making in their IoT efforts. - -### 6\. Account for _all_ the value IoT provides - -Finally, Mesirow pointed out that “much of the cost-effectiveness comes from the _value_ the IoT provides,” and its important to consider the return, not just the investment. - -“For example,” Mesirow said, the IoT “increases productivity by enabling the remote monitoring and control of business operations. It saves on energy costs by automatically turning off lights and HVAC when spaces are vacant, and predictive maintenance alerts lead to fewer machine repairs. And geolocation can lead to personalized marketing to customer smartphones, which can increase sales to nearby stores.” - -**[ Now read this:[5 reasons the IoT needs its own networks][6] ]** - -Join the Network World communities on [Facebook][7] and [LinkedIn][8] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3401082/6-ways-to-make-enterprise-iot-cost-effective.html - -作者:[Fredric Paul][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://www.networkworld.com/author/Fredric-Paul/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/02/money_financial_salary_growth_currency_by-davidleshem-100787975-large.jpg -[2]: https://twitter.com/robmesirow -[3]: https://digital.pwc.com/content/pwc-digital/en/products/connected-solutions.html -[4]: https://www.networkworld.com/article/3396128/the-state-of-enterprise-iot-companies-want-solutions-for-these-4-areas.html -[5]: https://www.networkworld.com/article/3203489/what-is-5g-how-is-it-better-than-4g.html -[6]: https://www.networkworld.com/article/3284506/5-reasons-the-iot-needs-its-own-networks.html -[7]: https://www.facebook.com/NetworkWorld/ -[8]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190611 The carbon footprints of IT shops that train AI models are huge.md b/sources/talk/20190611 The carbon footprints of IT shops that train AI models are huge.md deleted file mode 100644 index b440b8d65b..0000000000 --- a/sources/talk/20190611 The carbon footprints of IT shops that train AI models are huge.md +++ /dev/null @@ -1,68 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The carbon footprints of IT shops that train AI models are huge) -[#]: via: (https://www.networkworld.com/article/3401919/the-carbon-footprints-of-it-shops-that-train-ai-models-are-huge.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -The carbon footprints of IT shops that train AI models are huge -====== -Artificial intelligence (AI) model training can generate five times more carbon dioxide than a car does in a lifetime, researchers at the University of Massachusetts, Amherst find. -![ipopba / Getty Images][1] - -A new research paper from the University of Massachusetts, Amherst looked at the carbon dioxide (CO2) generated over the course of training several common large artificial intelligence (AI) models and found that the process can generate nearly five times the amount as an average American car over its lifetime plus the process of making the car itself. - -The [paper][2] specifically examined the model training process for natural-language processing (NLP), which is how AI handles natural language interactions. The study found that during the training process, more than 626,000 pounds of carbon dioxide is generated. - -This is significant, since AI training is one IT process that has remained firmly on-premises and not moved to the cloud. Very expensive equipment is needed, as is large volumes of data, so the cloud isn’t right work for most AI training, and the report notes this. Plus, IT shops want to keep that kind of IP in house. So, if you are experimenting with AI, that power bill is going to go up. - -**[ Read also:[How to plan a software-defined data-center network][3] ]** - -While the report used carbon dioxide as a measure, that’s still the product of electricity generation. Training involves the use of the most powerful processors, typically Nvidia GPUs, and they are not known for being low-power draws. And as the paper notes, “model training also incurs a substantial cost to the environment due to the energy required to power this hardware for weeks or months at a time.” - -Training is the most processor-intensive portion of AI. It can take days, weeks, or even months to “learn” what the model needs to know. That means power-hungry Nvidia GPUs running at full utilization for the entire time. In this case, how to handle and process natural language questions rather than broken sentences of keywords like your typical Google search. - -The report said training one model with a neural architecture generated 626,155 pounds of CO2. By contrast, one passenger flying round trip between New York and San Francisco would generate 1,984 pounds of CO2, an average American would generate 11,023 pounds in one year, and a car would generate 126,000 pounds over the course of its lifetime. - -### How the researchers calculated the CO2 amounts - -The researchers used four models in the NLP field that have been responsible for the biggest leaps in performance. They are Transformer, ELMo, BERT, and GPT-2. They trained all of the models on a single Nvidia Titan X GPU, with the exception of ELMo which was trained on three Nvidia GTX 1080 Ti GPUs. Each model was trained for a maximum of one day. - -**[[Learn Java from beginning concepts to advanced design patterns in this comprehensive 12-part course!][4] ]** - -They then used the number of training hours listed in the model’s original papers to calculate the total energy consumed over the complete training process. That number was converted into pounds of carbon dioxide equivalent based on the average energy mix in the U.S. - -The big takeaway is that computational costs start out relatively inexpensive, but they mushroom when additional tuning steps were used to increase the model’s final accuracy. A tuning process known as neural architecture search ([NAS][5]) is the worst offender because it does so much processing. NAS is an algorithm that searches for the best neural network architecture. It is seriously advanced AI and requires the most processing time and power. - -The researchers suggest it would be beneficial to directly compare different models to perform a cost-benefit (accuracy) analysis. - -“To address this, when proposing a model that is meant to be re-trained for downstream use, such as re-training on a new domain or fine-tuning on a new task, authors should report training time and computational resources required, as well as model sensitivity to hyperparameters. This will enable direct comparison across models, allowing subsequent consumers of these models to accurately assess whether the required computational resources,” the authors wrote. - -They also say researchers who are cost-constrained should pool resources and avoid the cloud, as cloud compute time is more expensive. In an example, it said a GPU server with eight Nvidia 1080 Ti GPUs and supporting hardware is available for approximately $20,000. To develop the sample models used in their study, that hardware would cost $145,000, plus electricity to run the models, about half the estimated cost to use on-demand cloud GPUs. - -“Unlike money spent on cloud compute, however, that invested in centralized resources would continue to pay off as resources are shared across many projects. A government-funded academic compute cloud would provide equitable access to all researchers,” they wrote. - -Join the Network World communities on [Facebook][6] and [LinkedIn][7] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3401919/the-carbon-footprints-of-it-shops-that-train-ai-models-are-huge.html - -作者:[Andy Patrizio][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://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/05/ai-vendor-relationship-management_artificial-intelligence_hand-on-virtual-screen-100795246-large.jpg -[2]: https://arxiv.org/abs/1906.02243 -[3]: https://www.networkworld.com/article/3284352/data-center/how-to-plan-a-software-defined-data-center-network.html -[4]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fjava -[5]: https://www.oreilly.com/ideas/what-is-neural-architecture-search -[6]: https://www.facebook.com/NetworkWorld/ -[7]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190612 IoT security vs. privacy- Which is a bigger issue.md b/sources/talk/20190612 IoT security vs. privacy- Which is a bigger issue.md deleted file mode 100644 index 2f06f6afc1..0000000000 --- a/sources/talk/20190612 IoT security vs. privacy- Which is a bigger issue.md +++ /dev/null @@ -1,95 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (IoT security vs. privacy: Which is a bigger issue?) -[#]: via: (https://www.networkworld.com/article/3401522/iot-security-vs-privacy-which-is-a-bigger-issue.html) -[#]: author: (Fredric Paul https://www.networkworld.com/author/Fredric-Paul/) - -IoT security vs. privacy: Which is a bigger issue? -====== -When it comes to the internet of things (IoT), security has long been a key concern. But privacy issues could be an even bigger threat. -![Ring][1] - -If you follow the news surrounding the internet of things (IoT), you know that security issues have long been a key concern for IoT consumers, enterprises, and vendors. Those issues are very real, but I’m becoming increasingly convinced that related but fundamentally different _privacy_ vulnerabilities may well be an even bigger threat to the success of the IoT. - -In June alone, we’ve seen a flood of IoT privacy issues inundate the news cycle, and observers are increasingly sounding the alarm that IoT users should be paying attention to what happens to the data collected by IoT devices. - -**[ Also read:[It’s time for the IoT to 'optimize for trust'][2] and [A corporate guide to addressing IoT security][2] ]** - -Predictably, most of the teeth-gnashing has come on the consumer side, but that doesn’t mean enterprises users are immune to the issue. One the one hand, just like consumers, companies are vulnerable to their proprietary information being improperly shared and misused. More immediately, companies may face backlash from their own customers if they are seen as not properly guarding the data they collect via the IoT. Too often, in fact, enterprises shoot themselves in the foot on privacy issues, with practices that range from tone-deaf to exploitative to downright illegal—leading almost [two-thirds (63%) of consumers to describe IoT data collection as “creepy,”][3] while more than half (53%) “distrust connected devices to protect their privacy and handle information in a responsible manner.” - -### Ring becoming the poster child for IoT privacy issues - -As a case in point, let’s look at the case of [Ring, the IoT doorbell company now owned by Amazon][4]. Ring is [reportedly working with police departments to build a video surveillance network in residential neighborhoods][5]. Police in more than 50 cities and towns across the country are apparently offering free or discounted Ring doorbells, and sometimes requiring the recipients to share footage for use in investigations. (While [Ring touts the security benefits][6] of working with law enforcement, it has asked police departments to end the practice of _requiring_ users to hand over footage, as it appears to violate the devices’ terms of service.) - -Many privacy advocates are troubled by this degree of cooperation between police and Ring, but that’s only part of the problem. Last year, for example, [Ring workers in Ukraine reportedly watched customer feeds][7]. Amazingly, though, even that only scratches the surface of the privacy flaps surrounding Ring. - -### Guilty by video? - -According to [Motherboard][8], “Ring is using video captured by its doorbell cameras in Facebook advertisements that ask users to identify and call the cops on a woman whom local police say is a suspected thief.” While the police are apparently appreciative of the “additional eyes that may see this woman and recognize her,” the ad calls the woman a thief even though she has not been charged with a crime, much less convicted! - -Ring may be today’s poster child for IoT privacy issues, but IoT privacy complaints are widespread. In many cases, it comes down to what IoT users—or others nearby—are getting in return for giving up their privacy. According to the [Guardian][9], for example, Google’s Sidewalk Labs smart city project is little more than “surveillance capitalism.” And while car owners may get a discount on auto insurance in return for sharing their driving data, that relationship is hardly set in stone. It may not be long before drivers have to give up their data just to get insurance at all. - -**[[Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][10] ]** - -And as the recent [data breach at the U.S. Customs and Border Protection][11] once again demonstrates, private data is “[a genie without a bottle][12].” No matter what legal or technical protections are put in place, the data may always be revealed or used in unforeseen ways. Heck, when you put it all together, it’s enough to make you wonder [whether doorbells really need to be smart][13] at all? - -**Read more about IoT:** - - * [Google’s biggest, craziest ‘moonshot’ yet][14] - * [What is the IoT? How the internet of things works][15] - * [What is edge computing and how it’s changing the network][16] - * [Most powerful internet of things companies][17] - * [10 Hot IoT startups to watch][18] - * [The 6 ways to make money in IoT][19] - * [What is digital twin technology? [and why it matters]][20] - * [Blockchain, service-centric networking key to IoT success][21] - * [Getting grounded in IoT networking and security][22] - * [Building IoT-ready networks must become a priority][23] - * [What is the Industrial IoT? [And why the stakes are so high]][24] - - - -Join the Network World communities on [Facebook][25] and [LinkedIn][26] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3401522/iot-security-vs-privacy-which-is-a-bigger-issue.html - -作者:[Fredric Paul][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://www.networkworld.com/author/Fredric-Paul/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/04/ringvideodoorbellpro-100794084-large.jpg -[2]: https://www.networkworld.com/article/3269165/internet-of-things/a-corporate-guide-to-addressing-iot-security-concerns.html -[3]: https://www.cpomagazine.com/data-privacy/consumers-still-concerned-about-iot-security-and-privacy-issues/ -[4]: https://www.cnbc.com/2018/02/27/amazon-buys-ring-a-former-shark-tank-reject.html -[5]: https://www.cnet.com/features/amazons-helping-police-build-a-surveillance-network-with-ring-doorbells/ -[6]: https://blog.ring.com/2019/02/14/how-rings-neighbors-creates-safer-more-connected-communities/ -[7]: https://www.theinformation.com/go/b7668a689a -[8]: https://www.vice.com/en_us/article/pajm5z/amazon-home-surveillance-company-ring-law-enforcement-advertisements -[9]: https://www.theguardian.com/cities/2019/jun/06/toronto-smart-city-google-project-privacy-concerns -[10]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr -[11]: https://www.washingtonpost.com/technology/2019/06/10/us-customs-border-protection-says-photos-travelers-into-out-country-were-recently-taken-data-breach/?utm_term=.0f3a38aa40ca -[12]: https://smartbear.com/blog/test-and-monitor/data-scientists-are-sexy-and-7-more-surprises-from/ -[13]: https://slate.com/tag/should-this-thing-be-smart -[14]: https://www.networkworld.com/article/3058036/google-s-biggest-craziest-moonshot-yet.html -[15]: https://www.networkworld.com/article/3207535/internet-of-things/what-is-the-iot-how-the-internet-of-things-works.html -[16]: https://www.networkworld.com/article/3224893/internet-of-things/what-is-edge-computing-and-how-it-s-changing-the-network.html -[17]: https://www.networkworld.com/article/2287045/internet-of-things/wireless-153629-10-most-powerful-internet-of-things-companies.html -[18]: https://www.networkworld.com/article/3270961/internet-of-things/10-hot-iot-startups-to-watch.html -[19]: https://www.networkworld.com/article/3279346/internet-of-things/the-6-ways-to-make-money-in-iot.html -[20]: https://www.networkworld.com/article/3280225/internet-of-things/what-is-digital-twin-technology-and-why-it-matters.html -[21]: https://www.networkworld.com/article/3276313/internet-of-things/blockchain-service-centric-networking-key-to-iot-success.html -[22]: https://www.networkworld.com/article/3269736/internet-of-things/getting-grounded-in-iot-networking-and-security.html -[23]: https://www.networkworld.com/article/3276304/internet-of-things/building-iot-ready-networks-must-become-a-priority.html -[24]: https://www.networkworld.com/article/3243928/internet-of-things/what-is-the-industrial-iot-and-why-the-stakes-are-so-high.html -[25]: https://www.facebook.com/NetworkWorld/ -[26]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190612 Software Defined Perimeter (SDP)- Creating a new network perimeter.md b/sources/talk/20190612 Software Defined Perimeter (SDP)- Creating a new network perimeter.md deleted file mode 100644 index 88a540e875..0000000000 --- a/sources/talk/20190612 Software Defined Perimeter (SDP)- Creating a new network perimeter.md +++ /dev/null @@ -1,121 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Software Defined Perimeter (SDP): Creating a new network perimeter) -[#]: via: (https://www.networkworld.com/article/3402258/software-defined-perimeter-sdp-creating-a-new-network-perimeter.html) -[#]: author: (Matt Conran https://www.networkworld.com/author/Matt-Conran/) - -Software Defined Perimeter (SDP): Creating a new network perimeter -====== -Considering the way networks work today and the change in traffic patterns; both internal and to the cloud, this limits the effect of the fixed perimeter. -![monsitj / Getty Images][1] - -Networks were initially designed to create internal segments that were separated from the external world by using a fixed perimeter. The internal network was deemed trustworthy, whereas the external was considered hostile. However, this is still the foundation for most networking professionals even though a lot has changed since the inception of the design. - -More often than not the fixed perimeter consists of a number of network and security appliances, thereby creating a service chained stack, resulting in appliance sprawl. Typically, the appliances that a user may need to pass to get to the internal LAN may vary. But generally, the stack would consist of global load balancers, external firewall, DDoS appliance, VPN concentrator, internal firewall and eventually LAN segments. - -The perimeter approach based its design on visibility and accessibility. If an entity external to the network can’t see an internal resource, then access cannot be gained. As a result, external entities were blocked from coming in, yet internal entities were permitted to passage out. However, it worked only to a certain degree. Realistically, the fixed network perimeter will always be breachable; it's just a matter of time. Someone with enough skill will eventually get through. - -**[ Related:[MPLS explained – What you need to know about multi-protocol label switching][2]** - -### Environmental changes – the cloud and mobile workforce - -Considering the way networks work today and the change in traffic patterns; both internal and to the cloud, this limits the effect of the fixed perimeter. Nowadays, we have a very fluid network perimeter with many points of entry. - -Imagine a castle with a portcullis that was used to gain access. To gain entry into the portcullis was easy as we just needed to pass one guard. There was only one way in and one way out. But today, in this digital world, we have so many small doors and ways to enter, all of which need to be individually protected. - -This boils down to the introduction of cloud-based application services and changing the location of the perimeter. Therefore, the existing networking equipment used for the perimeter is topologically ill-located. Nowadays, everything that is important is outside the perimeter, such as, remote access workers, SaaS, IaaS and PaaS-based applications. - -Users require access to the resources in various cloud services regardless of where the resources are located, resulting in complex-to-control multi-cloud environments. Objectively, the users do not and should not care where the applications are located. They just require access to the application. Also, the increased use of mobile workforce that demands anytime and anywhere access from a variety of devices has challenged the enterprises to support this dynamic workforce. - -There is also an increasing number of devices, such as, BYOD, on-site contractors, and partners that will continue to grow internal to the network. This ultimately leads to a world of over-connected networks. - -### Over-connected networks - -Over-connected networks result in complex configurations of network appliances. This results in large and complex policies without any context. - -They provide a level of coarse-grained access to a variety of services where the IP address does not correspond to the actual user. Traditional appliances that use static configurations to limit the incoming and outgoing traffic are commonly based on information in the IP packet and the port number. - -Essentially, there is no notion of policy and explanation of why a given source IP address is on the list. This approach fails to take into consideration any notion of trust and dynamically adjust access in relation to the device, users and application request events. - -### Problems with IP addresses - -Back in the early 1990s, RFC 1597 declared three IP ranges reserved for private use: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. If an end host was configured with one of these addresses, it was considered more secure. However, this assumption of trust was shattered with the passage of time and it still haunts us today. - -Network Address Translation (NAT) also changed things to a great extent. NAT allowed internal trusted hosts to communicate directly with the external untrusted hosts. However, since Transmission Control Protocol (TCP) is bidirectional, it allows the data to be injected by the external hosts while connecting back to the internal hosts. - -Also, there is no contextual information regarding the IP addresses as the sole purpose revolved around connectivity. If you have the IP address of someone, you can connect to them. The authentication was handled higher up in the stack. - -Not only do user’s IP addresses change regularly, but there’s also not a one-to-one correspondence between the users and IP addresses. Anyone can communicate from any IP address they please and also insert themselves between you and the trusted resource. - -Have you ever heard of the 20-year old computer that responds to an internet control message protocol (ICMP) request, yet no one knows where it is? But this would not exist on a zero trust network as the network is dark until the administrator turns the lights on with a whitelist policy rule set. This is contrary to the legacy black policy rule set. You can find more information on zero trust in my course: [Zero Trust Networking: The Big Picture][3]. - -Therefore, we can’t just rely on the IP addresses and expect them to do much more other than connect. As a result, we have to move away from the IP addresses and network location as the proxy for access trust. The network location can longer be the driver of network access levels. It is not fully equipped to decide the trust of a device, user or application. - -### Visibility – a major gap - -When we analyze networking and its flaws, visibility is a major gap in today’s hybrid environments. By and large, enterprise networks are complex beasts. More than often networking pros do not have accurate data or insights into who or what is accessing the network resource. - -I.T does not have the visibility in place to detect, for example, insecure devices, unauthorized users and potentially harmful connections that could propagate malware or perform data exfiltration. - -Also, once you know how network elements connect, how do you ensure that they don’t reconnect through a broader definition of connectivity? For this, you need contextual visibility. You need full visibility into the network to see who, what, when, and how they are connecting with the device. - -### What’s the workaround? - -A new approach is needed that enables the application owners to protect the infrastructure located in a public or private cloud and on-premise data center. This new network architecture is known as [software-defined perimeter][4] (SDP). Back in 2013, Cloud Security Alliance (CSA) launched the SDP initiative, a project designed to develop the architecture for creating more robust networks. - -The principles behind SDPs are not entirely new. Organizations within the DoD and Intelligence Communities (IC) have implemented a similar network architecture that is based on authentication and authorization prior to network access. - -Typically, every internal resource is hidden behind an appliance. And a user must authenticate before visibility of the authorized services is made available and access is granted. - -### Applying the zero trust framework - -SDP is an extension to [zero trust][5] which removes the implicit trust from the network. The concept of SDP started with Google’s BeyondCorp, which is the general direction that the industry is heading to right now. - -Google’s BeyondCorp puts forward the idea that the corporate network does not have any meaning. The trust regarding accessing an application is set by a static network perimeter containing a central appliance. This appliance permits the inbound and outbound access based on a very coarse policy. - -However, access to the application should be based on other parameters such as who the user is, the judgment of the security stance of the device, followed by some continuous assessment of the session. Rationally, only then should access be permitted. - -Let’s face it, the assumption that internal traffic can be trusted is flawed and zero trust assumes that all hosts internal to the network are internet facing, thereby hostile. - -### What is software-defined perimeter (SDP)? - -The SDP aims to deploy perimeter functionality for dynamically provisioned perimeters meant for clouds, hybrid environments, and on-premise data center infrastructures. There is often a dynamic tunnel that automatically gets created during the session. That is a one-to-one mapping between the requesting entity and the trusted resource. The important point to note here is that perimeters are formed not solely to obey a fixed location already design by the network team. - -SDP relies on two major pillars and these are the authentication and authorization stages. SDPs require endpoints to authenticate and be authorized first before obtaining network access to the protected entities. Then, encrypted connections are created in real-time between the requesting systems and application infrastructure. - -Authenticating and authorizing the users and their devices before even allowing a single packet to reach the target service, enforces what's known as least privilege at the network layer. Essentially, the concept of least privilege is for an entity to be granted only the minimum privileges that it needs to get its work done. Within a zero trust network, privilege is more dynamic than it would be in traditional networks since it uses many different attributes of activity to determine the trust score. - -### The dark network - -Connectivity is based on a need-to-know model. Under this model, no DNS information, internal IP addresses or visible ports of internal network infrastructure are transmitted. This is the reason why SDP assets are considered as “dark”. As a result, SDP isolates any concerns about the network and application. The applications and users are considered abstract, be it on-premise or in the cloud, which becomes irrelevant to the assigned policy. - -Access is granted directly between the users and their devices to the application and resource, regardless of the underlying network infrastructure. There simply is no concept of inside and outside of the network. This ultimately removes the network location point as a position of advantage and also eliminates the excessive implicit trust that IP addresses offer. - -**This article is published as part of the IDG Contributor Network.[Want to Join?][6]** - -Join the Network World communities on [Facebook][7] and [LinkedIn][8] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3402258/software-defined-perimeter-sdp-creating-a-new-network-perimeter.html - -作者:[Matt Conran][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://www.networkworld.com/author/Matt-Conran/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/03/sdn_software-defined-network_architecture-100791938-large.jpg -[2]: https://www.networkworld.com/article/2297171/sd-wan/network-security-mpls-explained.html -[3]: http://pluralsight.com/courses/zero-trust-networking-big-picture -[4]: https://network-insight.net/2018/09/software-defined-perimeter-zero-trust/ -[5]: https://network-insight.net/2018/10/zero-trust-networking-ztn-want-ghosted/ -[6]: /contributor-network/signup.html -[7]: https://www.facebook.com/NetworkWorld/ -[8]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190613 Data centers should sell spare UPS capacity to the grid.md b/sources/talk/20190613 Data centers should sell spare UPS capacity to the grid.md deleted file mode 100644 index 69b4356661..0000000000 --- a/sources/talk/20190613 Data centers should sell spare UPS capacity to the grid.md +++ /dev/null @@ -1,59 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Data centers should sell spare UPS capacity to the grid) -[#]: via: (https://www.networkworld.com/article/3402039/data-centers-should-sell-spare-ups-capacity-to-the-grid.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -Data centers should sell spare UPS capacity to the grid -====== -Distributed Energy is gaining traction, providing an opportunity for data centers to sell excess power in data center UPS batteries to the grid. -![Getty Images][1] - -The energy storage capacity in uninterruptable power supply (UPS) batteries, languishing often dormant in data centers, could provide new revenue streams for those data centers, says Eaton, a major electrical power management company. - -Excess, grid-generated power, created during times of low demand, should be stored on the now-proliferating lithium-backup power systems strewn worldwide in data centers, Eaton says. Then, using an algorithm tied to grid-demand, electricity should be withdrawn as necessary for grid use. It would then be slid back onto the backup batteries when not needed. - -**[ Read also:[How server disaggregation can boost data center efficiency][2] | Get regularly scheduled insights: [Sign up for Network World newsletters][3] ]** - -The concept is called Distributed Energy and has been gaining traction in part because electrical generation is changing—emerging green power, such as wind and solar, being used now at the grid-level have considerations that differ from the now-retiring, fossil-fuel power generation. You can generate solar only in daylight, yet much demand takes place on dark evenings, for example. - -Coal, gas, and oil deliveries have always been, to a great extent, pre-planned, just-in-time, and used for electrical generation in real time. Nowadays, though, fluctuations between supply, storage, and demand are kicking in. Electricity storage on the grid is required. - -Eaton says that by piggy-backing on existing power banks, electricity distribution could be evened out better. The utilities would deliver power more efficiently, despite the peaks and troughs in demand—with the data center UPS, in effect, acting like a quasi-grid-power storage battery bank, or virtual power plant. - -The objective of this UPS use case, called EnergyAware, is to regulate frequency in the grid. That’s related to the tolerances needed to make the grid work—the cycles per second, or hertz, inherent in electrical current can’t deviate too much. Abnormalities happen if there’s a suddent spike in demand but no power on hand to supply the surge. - -### How the Distributed Energy concept works - -The distributed energy resource (DER), which can be added to any existing lithium-ion battery bank, in any building, allows for the consumption of energy, or the distribution of it, based on a Frequency Regulation grid-demand algorithm. It charges or discharges the backup battery, connected to the grid, thus balancing the grid frequency. - -Often, not much power will need to be removed, just “micro-bursts of energy,” explains Sean James, director of Energy Research at Microsoft, in an Eaton-published promotional video. Microsoft Innovation Center in Virginia has been working with Eaton on the project. Those bursts are enough to get the frequency tolerances back on track, but the UPS still functions as designed. - -Eaton says data centers should start participating in energy markets. That could mean bidding, as a producer of power, to those who need to buy it—the electricity market, also known as the grid. Data centers could conceivably even switch on generators to operate the data halls if the price for its battery-stored power was particularly lucrative at certain times. - -“A data center in the future wouldn’t just be a huge load on the grid,” James says. “In the future, you don’t have a data center or a power plant. It’s something in the middle. A data plant,” he says on the Eaton [website][4]. - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3402039/data-centers-should-sell-spare-ups-capacity-to-the-grid.html - -作者:[Patrick Nelson][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://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2018/10/business_continuity_server-100777720-large.jpg -[2]: https://www.networkworld.com/article/3266624/how-server-disaggregation-could-make-cloud-datacenters-more-efficient.html -[3]: https://www.networkworld.com/newsletters/signup.html -[4]: https://www.eaton.com/us/en-us/products/backup-power-ups-surge-it-power-distribution/backup-power-ups/dual-purpose-ups-technology.html -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190617 5 transferable higher-education skills.md b/sources/talk/20190617 5 transferable higher-education skills.md deleted file mode 100644 index db0f584aaf..0000000000 --- a/sources/talk/20190617 5 transferable higher-education skills.md +++ /dev/null @@ -1,64 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 transferable higher-education skills) -[#]: via: (https://opensource.com/article/19/6/5-transferable-higher-education-skills) -[#]: author: (Stephon Brown https://opensource.com/users/stephb) - -5 transferable higher-education skills -====== -If you're moving from the Ivory Tower to the Matrix, you already have -the foundation for success in the developer role. -![Two hands holding a resume with computer, clock, and desk chair ][1] - -My transition from a higher-education professional into the tech realm was comparable to moving from a pond into an ocean. There was so much to learn, and after learning, there was still so much more to learn! - -Rather than going down the rabbit hole and being overwhelmed by what I did not know, in the last two to three months, I have been able to take comfort in the realization that I was not entirely out of my element as a developer. The skills I acquired during my six years as a university professional gave me the foundation to be successful in the developer role. - -These skills are transferable in any direction you plan to go within or outside tech, and it's valuable to reflect on how they apply to your new position. - -### 1\. Composition and documentation - -Higher education is replete with opportunities to develop skills related to composition and communication. In most cases, clear writing and communication are mandatory requirements for university administrative and teaching positions. Although you may not yet be well-versed in deep technical concepts, learning documentation and writing your progress may be two of the strongest skills you bring as a former higher education administrator. All of those "In response to…" emails will finally come in handy when describing the inner workings of a class or leaving succinct comments for other developers to follow what you have implemented. - -### 2\. Problem-solving and critical thinking - -Whether you've been an adviser who sits with students and painstakingly develops class schedules for graduation or a finance buff who balances government funds, you will not leave critical thinking behind as you transition into a developer role. Although your critical thinking may have seemed specialized for your work, the skill of turning problems into opportunities is not lost when contributing to code. The experience gained while spending long days and nights revising recruitment strategies will be necessary when composing algorithms and creative ways of delivering data. Continue to foster a passion for solving problems, and you will not have any trouble becoming an efficient and skillful developer. - -### 3\. Communication - -Though it may seem to overlap with writing (above), communication spans verbal and written disciplines. When you're interacting with clients and leadership, you may have a leg up over your peers because of your higher-education experience. Being approachable and understanding how to manage interactions are skills that some software practitioners may not have fostered to an impactful level. Although you will experience days of staring at a screen and banging your head against the keyboard, you can rest well in knowing you can describe technical concepts and interact with a wide range of audiences, from clients to peers. - -### 4\. Leadership - -Sitting on that panel; planning that event; leading that workshop. All of those experiences provide you with the grounding to plan and lead smaller projects as a new developer. Leadership is not limited to heading up large and small teams; its essence lies in taking initiative. This can be volunteering to do research on a new feature or do more extensive unit tests for your code. However you use it, your foundation as an educator will allow you to go further in technology development and maintenance. - -### 5\. Research - -You can Google with the best of them. Being able to clearly truncate your query into the idea you are searching for is characteristic of a higher-education professional. Most administrator or educator jobs focus on solving problems in a defined process for qualitative, quantitative, or mixed results; therefore, cultivating your scientific mind is valuable when providing software solutions. Your research skills also open opportunities for branching into data science and machine learning. - -### Bonus: Collaboration - -Being able to reach across various offices and fields for event planning and program implementation fit well within team collaboration—both within your new team and across development teams. This may leak into the project management realm, but being able to plan and divide work between teams and establish accountability will allow you as a new developer to understand the software development lifecycle process a little more intimately because of your past related experience. - -### Summary - -As a developer jumping head-first into technology after years of walking students through the process of navigating higher education, [imposter syndrome][2] has been a constant fear since moving into technology. However, I have been able to take heart in knowing my experience as an educator and an administrator has not gone in vain. If you are like me, be encouraged in knowing that these transferable skills, some of which fall into the soft-skills and other categories, will continue to benefit you as a developer and a professional. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/6/5-transferable-higher-education-skills - -作者:[Stephon Brown][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/stephb -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/resume_career_document_general.png?itok=JEaFL2XI (Two hands holding a resume with computer, clock, and desk chair ) -[2]: https://en.wikipedia.org/wiki/Impostor_syndrome diff --git a/sources/talk/20190618 17 predictions about 5G networks and devices.md b/sources/talk/20190618 17 predictions about 5G networks and devices.md deleted file mode 100644 index d8833f9887..0000000000 --- a/sources/talk/20190618 17 predictions about 5G networks and devices.md +++ /dev/null @@ -1,82 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (17 predictions about 5G networks and devices) -[#]: via: (https://www.networkworld.com/article/3403358/17-predictions-about-5g-networks-and-devices.html) -[#]: author: (Fredric Paul https://www.networkworld.com/author/Fredric-Paul/) - -17 predictions about 5G networks and devices -====== -Not surprisingly, the new Ericsson Mobility Report is bullish on the potential of 5G technology. Here’s a quick look at the most important numbers. -![Vertigo3D / Getty Images][1] - -_“As market after market switches on 5G, we are at a truly momentous point in time. No previous generation of mobile technology has had the potential to drive economic growth to the extent that 5G promises. It goes beyond connecting people to fully realizing the Internet of Things (IoT) and the Fourth Industrial Revolution.”_ —The opening paragraph of the [June 2019 Ericsson Mobility Report][2] - -Almost every significant technology advancement now goes through what [Gartner calls the “hype cycle.”][3] These days, Everyone expects new technologies to be met with gushing optimism and dreamy visions of how it’s going to change the world in the blink of an eye. After a while, we all come to expect the vendors and the press to go overboard with excitement, at least until reality and disappointment set in when things don’t pan out exactly as expected. - -**[ Also read:[The time of 5G is almost here][4] ]** - -Even with all that in mind, though, Ericsson’s whole-hearted embrace of 5G in its Internet Mobility Report is impressive. The optimism is backed up by lots of numbers, but they can be hard to tease out of the 36-document. So, let’s recap some of the most important top-line predictions (with my comments at the end). - -### Worldwide 5G growth projections - - 1. “More than 10 million 5G subscriptions are projected worldwide by the end of 2019.” - 2. “[We] now expect there to be 1.9 billion 5G subscriptions for enhanced mobile broadband by the end of 2024. This will account for over 20 percent of all mobile subscriptions at that time. The peak of LTE subscriptions is projected for 2022, at around 5.3 billion subscriptions, with the number declining slowly thereafter.” - 3. “In 2024, 5G networks will carry 35 percent of mobile data traffic globally.” - 4. “5G can cover up to 65 percent of the world’s population in 2024.” - 5. ”NB-IoT and Cat-M technologies will account for close to 45 percent of cellular IoT connections in 2024.” - 6. “By the end of 2024, nearly 35 percent of cellular IoT connections will be Broadband IoT, with 4G connecting the majority.” But 5G connections will support more advanced use cases. - 7. “Despite challenging 5G timelines, device suppliers are expected to be ready with different band and architecture support in a range of devices during 2019.” - 8. “Spectrum sharing … chipsets are currently in development and are anticipated to be in 5G commercial devices in late 2019." - 9. “[VoLTE][5] is the foundation for enabling voice and communication services on 5G devices. Subscriptions are expected to reach 2.1 billion by the end of 2019. … The number of VoLTE subscriptions is projected to reach 5.9 billion by the end of 2024, accounting for more than 85 percent of combined LTE and 5G subscriptions.” - - - -![][6] - -### Regional 5G projections - - 1. “In North America, … service providers have already launched commercial 5G services, both for fixed wireless access and mobile. … By the end of 2024, we anticipate close to 270 million 5G subscriptions in the region, accounting for more than 60 percent of mobile subscriptions.” - 2. “In Western Europe … The momentum for 5G in the region was highlighted by the first commercial launch in April. By the end of 2024, 5G is expected to account for around 40 percent of mobile subscriptions. - 3. In Central and Eastern Europe, … The first 5G subscriptions are expected in 2019, and will make up 15 percent of subscriptions in 2024.” - 4. “In North East Asia, … the region’s 5G subscription penetration is projected to reach 47 percent [by the end of 2024]. - 5. “[In India,] 5G subscriptions are expected to become available in 2022 and will represent 6 percent of mobile subscriptions at the end of 2024.” - 6. “In the Middle East and North Africa, we anticipate commercial 5G deployments with leading communications service providers during 2019, and significant volumes in 2021. … Around 60 million 5G subscriptions are forecast for the end of 2024, representing 3 percent of total mobile subscriptions.” - 7. “Initial 5G commercial devices are expected in the [South East Asia and Oceania] region during the first half of 2019. By the end of 2024, it is anticipated that almost 12 percent of subscriptions in the region will be for 5G.]” - 8. “In Latin America … the first 5G deployments will be possible in the 3.5GHz band during 2019. Argentina, Brazil, Chile, Colombia, and Mexico are anticipated to be the first countries in the region to deploy 5G, with increased subscription uptake forecast from 2020. By the end of 2024, 5G is set to make up 7 percent of mobile subscriptions.” - - - -### Is 5G really so inevitable? - -Considered individually, these predictions all seem perfectly reasonable. Heck, 10 million 5G subscriptions is only a drop in the global bucket. And rumors are already flying that Apple’s next round of iPhones will include 5G capability. Also, 2024 is still five years in the future, so why wouldn’t the faster connections drive impressive traffic stats? Similarly, North America and North East Asia will experience the fastest 5G penetration. - -But when you look at them all together, these numbers project a sense of 5G inevitability that could well be premature. It will take a _lot_ of spending, by a lot of different parties—carriers, chip makers, equipment vendors, phone manufacturers, and consumers—to make this kind of growth a reality. - -I’m not saying 5G won’t take over the world. I’m just saying that when so many things have to happen in a relatively short time, there are a lot of opportunities for the train to jump the tracks. Don’t be surprised if it takes longer than expected for 5G to turn into the worldwide default standard Ericsson—and everyone else—seems to think it will inevitably become. - -Join the Network World communities on [Facebook][7] and [LinkedIn][8] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3403358/17-predictions-about-5g-networks-and-devices.html - -作者:[Fredric Paul][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://www.networkworld.com/author/Fredric-Paul/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/02/5g_wireless_technology_network_connections_by_credit-vertigo3d_gettyimages-1043302218_3x2-100787550-large.jpg -[2]: https://www.ericsson.com/assets/local/mobility-report/documents/2019/ericsson-mobility-report-june-2019.pdf -[3]: https://www.gartner.com/en/research/methodologies/gartner-hype-cycle -[4]: https://www.networkworld.com/article/3354477/mobile-world-congress-the-time-of-5g-is-almost-here.html -[5]: https://www.gsma.com/futurenetworks/technology/volte/ -[6]: https://images.idgesg.net/images/article/2019/06/ericsson-mobility-report-june-2019-graph-100799481-large.jpg -[7]: https://www.facebook.com/NetworkWorld/ -[8]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190618 Why your workplace arguments aren-t as effective as you-d like.md b/sources/talk/20190618 Why your workplace arguments aren-t as effective as you-d like.md deleted file mode 100644 index 54a0cca26f..0000000000 --- a/sources/talk/20190618 Why your workplace arguments aren-t as effective as you-d like.md +++ /dev/null @@ -1,144 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why your workplace arguments aren't as effective as you'd like) -[#]: via: (https://opensource.com/open-organization/19/6/barriers-productive-arguments) -[#]: author: (Ron McFarland https://opensource.com/users/ron-mcfarland/users/ron-mcfarland) - -Why your workplace arguments aren't as effective as you'd like -====== -Open organizations rely on open conversations. These common barriers to -productive argument often get in the way. -![Arrows pointing different directions][1] - -Transparent, frank, and often contentious arguments are part of life in an open organization. But how can we be sure those conversations are _productive_ —not _destructive_? - -This is the second installment of a two-part series on how to argue and actually achieve something. In the [first article][2], I mentioned what arguments are (and are not), according to author Sinnott-Armstrong in his book _Think Again: How to Reason and Argue._ I also offered some suggestions for making arguments as productive as possible. - -In this article, I'll examine three barriers to productive arguments that Sinnott-Armstrong elaborates in his book: incivility, polarization, and language issues. Finally, I'll explain his suggestions for addressing those barriers. - -### Incivility - -"Incivility" has become a social concern in recent years. Consider this: As a tactic in arguments, incivility _can_ have an effect in certain situations—and that's why it's a common strategy. Sinnott-Armstrong notes that incivility: - - * **Attracts attention:** Incivility draws people's attention in one direction, sometimes to misdirect attention from or outright obscure other issues. It redirects people's attention to shocking statements. Incivility, exaggeration, and extremism can increase the size of an audience. - - * **Energizes:** Sinnott-Armstrong writes that seeing someone being uncivil on a topic of interest can generate energy from a state of powerlessness. - - * **Stimulates memory:** Forgetting shocking statements is difficult; they stick in our memory more easily than statements that are less surprising to us. - - * **Excites the powerless:** The groups most likely to believe and invest in someone being uncivil are those that feel they're powerless and being treated unfairly. - - - - -Unfortunately, incivility as a tactic in arguments has its costs. One such cost is polarization. - -### Polarization - -Sinnott-Armstrong writes about five forms of polarization: - - * **Distance:** If two people's or groups' views are far apart according to some relevant scale, have significant disagreements and little common ground, then they're polarized. - - * **Differences:** If two people or groups have fewer values and beliefs _in common_ than they _don't have in common_ , then they're polarized. - - * **Antagonism:** Groups are more polarized the more they feel hatred, disdain, fear, or other negative emotions toward other people or groups. - - * **Incivility:** Groups tend to be more polarized when they talk more negatively about people of the other groups. - - * **Rigidity:** Groups tend to be more polarized when they treat their values as indisputable and will not compromise. - - * **Gridlock:** Groups tend to be more polarized when they're unable to cooperate and work together toward common goals. - - - - -And I'll add one more form of polarization to Sinnott-Armstrong's list: - - * **Non-disclosure:** Groups tend to be more polarized when one or both of the groups refuses to share valid, verifiable information—or when they distract each other with useless or irrelevant information. One of the ways people polarize is by not talking to each other and withhold information. Similarly, they talk on subjects that distract us from the issue at hand. Some issues are difficult to talk about, but by doing so solutions can be explored. - - - -### Language issues - -Identifying discussion-stoppers like these can help you avoid shutting down a discussion that would otherwise achieve beneficial outcomes. - -Language issues can be argument-stoppers Sinnott-Armstrong says. In particular, he outlines some of the following language-related barriers to productive argument. - - * **Guarding:** Using words like "all" can make a statement unbelievable; words like "sometimes" can make a statement too vague. - - * **Assuring:** Simply stating "trust me, I know what I'm talking about," without offering evidence that this is the case, can impede arguments. - - * **Evaluating:** Offering an evaluation of something—like saying "It is good"―without any supporting reasoning. - - * **Discounting:** This involves anticipating what the another person will say and attempting to weaken it as much as possible by framing an argument in a negative way. (Contrast these two sentences, for example: "Ramona is smart but boring" and "Ramona is boring but smart." The difference is subtle, but you'd probably want to spend less time with Ramona if you heard the first statement about her than if you heard the second.) - - - - -Identifying discussion-stoppers like these can help you avoid shutting down a discussion that would otherwise achieve beneficial outcomes. In addition, Sinnott-Armstrong specifically draws readers' attention to two other language problems that can kill productive debates: vagueness and ambiguity. - - * **Vagueness:** This occurs when a word or sentence is not precise enough and having many ways to interpret its true meaning and intent, which leads to confusion. Consider the sentence "It is big." "It" must be defined if it's not already obvious to everyone in the conversation. And a word like "big" must be clarified through comparison to something that everyone has agreed upon. - - * **Ambiguity:** This occurs when a sentence could have two distinct meanings. For example: "Police killed man with axe." Who was holding the axe, the man or the police? "My neighbor had a friend for dinner." Did your neighbor invite a friend to share a meal—or did she eat her friend? - - - - -### Overcoming barriers - -To help readers avoid these common roadblocks to productive arguments, Sinnott-Armstrong recommends a simple, four-step process for evaluating another person's argument. - - 1. **Observation:** First, observe a stated opinion and its related evidence to determine the precise nature of the claim. This might require you to ask some questions for clarification (you'll remember I employed this technique when arguing with my belligerent uncle, which I described [in the first article of this series][2]). - - 2. **Hypothesis:** Develop some hypothesis about the argument. In this case, the hypothesis should be an inference based on generally acceptable standards (for more on the structure of arguments themselves, also see [the first part of this series][2]). - - 3. **Comparison:** Compare that hypothesis with others and evaluate which is more accurate. More important issues will require you to conduct more comparisons. In other cases, premises are so obvious that no further explanation is required. - - 4. **Conclusion:** From the comparison analysis, reach a conclusion about whether your hypothesis about a competing argument is correct. - - - - -In many cases, the question is not whether a particular claim is _correct_ or _incorrect_ , but whether it is _believable._ So Sinnott-Armstrong also offers a four-step "believability test" for evaluating claims of this type. - - 1. **Expertise:** Does the person presenting the argument have authority in an appropriate field? Being a specialist is one field doesn't necessarily make that person an expert in another. - - 2. **Motive:** Would self-interest or other personal motives compel a person to withhold information or make false statements? To confirm one's statements, it might be wise to seek a totally separate, independent authority for confirmation. - - 3. **Sources:** Are the sources the person offers as evidence of a claim recognized experts? Do those sources have the expertise on the specific issue addressed? - - 4. **Agreement:** Is there agreement among many experts within the same specialty? - - - - -### Let's argue - -If you really want to strengthen your ability to argue, find someone that totally disagrees with you but wants to learn and understand your beliefs. - -When I was a university student, I would usually sit toward the front of the classroom. When I didn't understand something, I would start asking questions for clarification. Everyone else in the class would just sit silently, saying nothing. After class, however, other students would come up to me and thank me for asking those questions—because everyone else in the room was confused, too. - -Clarification is a powerful act—not just in the classroom, but during arguments anywhere. Building an organizational culture in which people feel empowered to ask for clarification is critical for productive arguments (I've [given presentations on this topic][3] before). If members have the courage to clarify premises, and they can do so in an environment where others don't think they're being belligerent, then this might be the key to a successful and productive argument. - -If you really want to strengthen your ability to argue, find someone that totally disagrees with you but wants to learn and understand your beliefs. Then, practice some of Sinnott-Armstrong's suggestions. Arguing productively will enhance [transparency, inclusivity, and collaboration][4] in your organization—leading to a more open culture. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/19/6/barriers-productive-arguments - -作者:[Ron McFarland][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/ron-mcfarland/users/ron-mcfarland -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/directions-arrows.png?itok=EE3lFewZ (Arrows pointing different directions) -[2]: https://opensource.com/open-organization/19/5/productive-arguments -[3]: https://www.slideshare.net/RonMcFarland1/argue-successfully-achieve-something -[4]: https://opensource.com/open-organization/resources/open-org-definition diff --git a/sources/talk/20190619 With Tableau, SaaS king Salesforce becomes a hybrid cloud company.md b/sources/talk/20190619 With Tableau, SaaS king Salesforce becomes a hybrid cloud company.md deleted file mode 100644 index d0d1d24cb6..0000000000 --- a/sources/talk/20190619 With Tableau, SaaS king Salesforce becomes a hybrid cloud company.md +++ /dev/null @@ -1,67 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (With Tableau, SaaS king Salesforce becomes a hybrid cloud company) -[#]: via: (https://www.networkworld.com/article/3403442/with-tableau-saas-king-salesforce-becomes-a-hybrid-cloud-company.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -With Tableau, SaaS king Salesforce becomes a hybrid cloud company -====== -Once dismissive of software, Salesforce acknowledges the inevitability of the hybrid cloud. -![Martyn Williams/IDGNS][1] - -I remember a time when people at Salesforce events would hand out pins that read “Software” inside a red circle with a slash through it. The High Priest of SaaS (a.k.a. CEO Marc Benioff) was so adamant against installed, on-premises software that his keynotes were always comical. - -Now, Salesforce is prepared to [spend $15.7 billion to acquire Tableau Software][2], the leader in on-premises data analytics. - -On the hell-freezes-over scale, this is up there with Microsoft embracing Linux or Apple PR people returning a phone call. Well, we know at least one of those has happened. - -**[ Also read:[Hybrid Cloud: The time for adoption is upon us][3] | Stay in the know: [Subscribe and get daily newsletter updates][4] ]** - -So, why would a company that is so steeped in the cloud, so anti-on-premises software, make such a massive purchase? - -Partly it is because Benioff and company are finally coming to the same conclusion as most everyone else: The hybrid cloud, a mix of on-premises systems and public cloud, is the wave of the future, and pure cloud plays are in the minority. - -The reality is that data is hybrid and does not sit in a single location, and Salesforce is finally acknowledging this, said Tim Crawford, president of Avoa, a strategic CIO advisory firm. - -“I see the acquisition of Tableau by Salesforce as less about getting into the on-prem game as it is a reality of the world we live in. Salesforce needed a solid analytics tool that went well beyond their existing capability. Tableau was that tool,” he said. - -**[[Become a Microsoft Office 365 administrator in record time with this quick start course from PluralSight.][5] ]** - -Salesforce also understands that they need a better understanding of customers and those data insights that drive customer decisions. That data is both on-prem and in the cloud, Crawford noted. It is in Salesforce, other solutions, and the myriad of Excel spreadsheets spread across employee systems. Tableau crosses the hybrid boundaries and brings a straightforward way to visualize data. - -Salesforce had analytics features as part of its SaaS platform, but it was geared around their own platform, whereas everyone uses Tableau and Tableau supports all manner of analytics. - -“There’s a huge overlap between Tableau customers and Salesforce customers,” Crawford said. “The data is everywhere in the enterprise, not just in Salesforce. Salesforce does a great job with its own data, but Tableau does great with data in a lot of places because it’s not tied to one platform. So, it opens up where the data comes from and the insights you get from the data.” - -Crawford said that once the deal is done and Tableau is under some deeper pockets, the organization may be able to innovate faster or do things they were unable to do prior. That hardly indicates Tableau was struggling, though. It pulled in [$1.16 billion in revenue][6] in 2018. - -Crawford also expects Salesforce to push Tableau to open up new possibilities for customer insights by unlocking customer data inside and outside of Salesforce. One challenge for the two companies is to maintain that neutrality so that they don’t lose the ability to use Tableau for non-customer centric activities. - -“It’s a beautiful way to visualize large sets of data that have nothing to do with customer centricity,” he said. - -Join the Network World communities on [Facebook][7] and [LinkedIn][8] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3403442/with-tableau-saas-king-salesforce-becomes-a-hybrid-cloud-company.html - -作者:[Andy Patrizio][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://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://images.techhive.com/images/article/2015/09/150914-salesforce-dreamforce-2-100614575-large.jpg -[2]: https://www.cio.com/article/3402026/how-salesforces-tableau-acquisition-will-impact-it.html -[3]: http://www.networkworld.com/article/2172875/cloud-computing/hybrid-cloud--the-year-of-adoption-is-upon-us.html -[4]: https://www.networkworld.com/newsletters/signup.html -[5]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fadministering-office-365-quick-start -[6]: https://www.geekwire.com/2019/tableau-hits-841m-annual-recurring-revenue-41-transition-subscription-model-continues/ -[7]: https://www.facebook.com/NetworkWorld/ -[8]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190620 Carrier services help expand healthcare, with 5G in the offing.md b/sources/talk/20190620 Carrier services help expand healthcare, with 5G in the offing.md deleted file mode 100644 index 072b172fda..0000000000 --- a/sources/talk/20190620 Carrier services help expand healthcare, with 5G in the offing.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Carrier services help expand healthcare, with 5G in the offing) -[#]: via: (https://www.networkworld.com/article/3403366/carrier-services-help-expand-healthcare-with-5g-in-the-offing.html) -[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) - -Carrier services help expand healthcare, with 5G in the offing -====== -Many telehealth initiatives tap into wireless networking supplied by service providers that may start offering services such as Citizen's Band and 5G to support remote medical care. -![Thinkstock][1] - -There are connectivity options aplenty for most types of [IoT][2] deployment, but the idea of simply handing the networking part of the equation off to a national licensed wireless carrier could be the best one for certain kinds of deployments in the medical field. - -Telehealth systems, for example, are still a relatively new facet of modern medicine, but they’re already among the most important applications that use carrier networks to deliver care. One such system is operated by the University of Mississippi Medical Center, for the treatment and education of diabetes patients. - -**[More on wireless:[The time of 5G is almost here][3]]** - -**[ Now read[20 hot jobs ambitious IT pros should shoot for][4]. ]** - -Greg Hall is the director of IT at UMMC’s center for telehealth. He said that the remote patient monitoring system is relatively simple by design – diabetes patients receive a tablet computer that they can use to input and track their blood sugar levels, alert clinicians to symptoms like nerve pain or foot sores, and even videoconference with their doctors directly. The tablet connects via Verizon, AT&T or CSpire – depending on who’s got the best coverage in a given area – back to UMMC’s servers. - -According to Hall, there are multiple advantages to using carrier connectivity instead of unlicensed (i.e. purpose-built [Wi-Fi][5] or other technology) to connect patients – some of whom live in remote parts of the state – to their caregivers. - -“We weren’t expecting everyone who uses the service to have Wi-Fi,” he said, “and they can take their tablet with them if they’re traveling.” - -The system serves about 250 patients in Mississippi, up from roughly 175 in the 2015 pilot program that got the effort off the ground. Nor is it strictly limited to diabetes care – Hall said that it’s already been extended to patients suffering from chronic obstructive pulmonary disease, asthma and even used for prenatal care, with further expansion in the offing. - -“The goal of our program isn’t just the monitoring piece, but also the education piece, teaching a person to live with their [condition] and thrive,” he said. - -It hasn’t all been smooth sailing. One issue was caused by the natural foliage of the area, as dense areas of pine trees can cause transmission problems, thanks to their needles being a particularly troublesome length and interfering with 2.5GHz wireless signals. But Hall said that the team has been able to install signal boosters or repeaters to overcome that obstacle. - -Neurologist Dr. Allen Gee’s practice in Wyoming attempts to address a similar issue – far-flung patients with medical needs that might not be addressed by the sparse local-care options. From his main office in Cody, he said, he can cover half the state via telepresence, using a purpose-built system that is based on cellular-data connectivity from TCT, Spectrum and AT&T, as well as remote audiovisual equipment and a link to electronic health records stored in distant locations. That allows him to receive patient data, audio/visual information and even imaging diagnostics remotely. Some specialists in the state are able to fly to those remote locations, others are not. - -While Gee’s preference is to meet with patients in person, that’s just not always possible, he said. - -“Medical specialists don’t get paid for windshield time,” he noted. “Being able to transfer information from an EHR facilitates the process of learning about the patient.” - -### 5G is coming** - -** - -According to Alan Stewart-Brown, vice president at infrastructure management vendor Opengear, there’s a lot to like about current carrier networks for medical use – particularly wide coverage and a lack of interference – but there are bigger things to come. - -“We have customers that have equipment in ambulances for instance, where they’re livestreaming patients’ vital signs to consoles that doctors can monitor,” he said. “They’re using carrier 4G for that right now and it works well enough, but there are limitations, namely latency, which you don’t get on [5G][6].” - -Beyond the simple fact of increased throughput and lower latency, widespread 5G deployments could open a wide array of new possibilities for medical technology, mostly involving real-time, very-high-definition video streaming. These include medical VR, remote surgery and the like. - -“The process you use to do things like real-time video – right now on a 4G network, that may or may not have a delay,” said Stewart-Brown. “Once you can get rid of the delay, the possibilities are endless as to what you can use the technology for.” - -### Citizens band - -Ron Malenfant, chief architect for service provider IoT at Cisco, agreed that the future of 5G for medical IoT is bright, but said that the actual applications of the technology have to be carefully thought out. - -“The use cases need to be worked on,” he said. “The innovative [companies] are starting to say ‘OK, what does 5G mean to me’ and starting to plan use cases.” - -One area that the carriers themselves have been eyeing recently is the CBRS band of radio frequencies, which sits around 3.5GHz. It’s what’s referred to as “lightly licensed” spectrum, in that parts of it are used for things like CB radio and other parts are the domain of the U.S. armed forces, and it could be used to build private networks for institutional users like hospitals, instead of deploying small but expensive 4G cells. The idea is that the institutions would be able to lease those frequencies for their specific area from the carrier directly for private LTE/CBRS networks, and, eventually 5G, Malenfant said. - -There’s also the issue, of course, that there are still a huge amount of unknowns around 5G, which isn’t expected to supplant LTE in the U.S. for at least another year or so. The medical field’s stiff regulatory requirements could also prove a stumbling block for the adoption of newer wireless technology. - -Join the Network World communities on [Facebook][7] and [LinkedIn][8] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3403366/carrier-services-help-expand-healthcare-with-5g-in-the-offing.html - -作者:[Jon Gold][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://www.networkworld.com/author/Jon-Gold/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2018/07/stethoscope_mobile_healthcare_ipad_tablet_doctor_patient-100765655-large.jpg -[2]: https://www.networkworld.com/article/3207535/what-is-iot-how-the-internet-of-things-works.html -[3]: https://www.networkworld.com/article/3354477/mobile-world-congress-the-time-of-5g-is-almost-here.html -[4]: https://www.networkworld.com/article/3276025/careers/20-hot-jobs-ambitious-it-pros-should-shoot-for.html -[5]: https://www.networkworld.com/article/3238664/80211-wi-fi-standards-and-speeds-explained.html -[6]: https://www.networkworld.com/article/3203489/what-is-5g-how-is-it-better-than-4g.html -[7]: https://www.facebook.com/NetworkWorld/ -[8]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190620 Cracks appear in Intel-s grip on supercomputing.md b/sources/talk/20190620 Cracks appear in Intel-s grip on supercomputing.md deleted file mode 100644 index 5ff550d3fc..0000000000 --- a/sources/talk/20190620 Cracks appear in Intel-s grip on supercomputing.md +++ /dev/null @@ -1,63 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Cracks appear in Intel’s grip on supercomputing) -[#]: via: (https://www.networkworld.com/article/3403443/cracks-appear-in-intels-grip-on-supercomputing.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Cracks appear in Intel’s grip on supercomputing -====== -New competitors threaten to take Intel’s dominance in the high-performance computing (HPC) world, and we’re not even talking about AMD (yet). -![Randy Wong/LLNL][1] - -It’s June, so it’s that time again for the twice-yearly Top 500 supercomputer list, where bragging rights are established or, in most cases, reaffirmed. The list constantly shifts as new trends appear, and one of them might be a break in Intel’s dominance. - -[Supercomputers in the top 10 list][2] include a lot of IBM Power-based systems, and almost all run Nvidia GPUs. But there’s more going on than that. - -For starters, an ARM supercomputer has shown up, at #156. [Astra][3] at Sandia National Laboratories is an HPE system running Cavium (now Marvell) ThunderX2 processors. It debuted on the list at #204 last November, but thanks to upgrades, it has moved up the list. It won’t be the last ARM server to show up, either. - -**[ Also see:[10 of the world's fastest supercomputers][2] | Get daily insights: [Sign up for Network World newsletters][4] ]** - -Second is the appearance of four Nvidia DGX servers, with the [DGX SuperPOD][5] ranking the highest at #22. [DGX systems][6] are basically compact GPU boxes with a Xeon just to boot the thing. The GPUs do all the heavy lifting. - -AMD hasn’t shown up yet with the Epyc processors, but it will, given Cray is building them for the government. - -This signals a breaking up of the hold Intel has had on the high-performance computing (HPC) market for a long time, said Ashish Nadkarni, group vice president in IDC's worldwide infrastructure practice. “The Intel hold has already been broken up by all the accelerators in the supercomputing space. The more accelerators they use, the less need they have for Xeons. They can go with other processors that do justice to those accelerators,” he told me. - -With so much work in HPC and artificial intelligence (AI) being done by GPUs, the x86 processor becomes just a boot processor in a way. I wasn’t kidding about the DGX box. It’s got one Xeon and eight Tesla GPUs. And the Xeon is an E5, a midrange part. - -**[[Get certified as an Apple Technical Coordinator with this seven-part online course from PluralSight.][7] ]** - -“They don’t need high-end Xeons in servers any more, although there’s a lot of supercomputers that just use CPUs. The fact is there are so many options now,” said Nadkarni. One example of an all-CPU system is [Frontera][8], a Dell-based system at the Texas Advanced Computing Center in Austin. - -The top two computers, Sierra and Summit, both run IBM Power9 RISC processors, as well as Nvidia GPUs. All told, Nvidia is in 125 of the 500 supercomputers, including five of the top 10, the fastest computer in the world, the fastest in Europe (Piz Daint) and the fastest in Japan (ABCI). - -Lenovo was the top hardware provider, beating out Dell, HPE, and IBM combined. That’s because of its large presence in its native China. Nadkari said Lenovo, which acquired the IBM x86 server business in 2014, has benefitted from the IBM installed base, which has continued wanting the same tech from Lenovo under new ownership. - -Join the Network World communities on [Facebook][9] and [LinkedIn][10] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3403443/cracks-appear-in-intels-grip-on-supercomputing.html - -作者:[Andy Patrizio][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://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2018/10/sierra875x500-100778404-large.jpg -[2]: https://www.networkworld.com/article/3236875/embargo-10-of-the-worlds-fastest-supercomputers.html -[3]: https://www.top500.org/system/179565 -[4]: https://www.networkworld.com/newsletters/signup.html -[5]: https://www.top500.org/system/179691 -[6]: https://www.networkworld.com/article/3196088/nvidias-new-volta-based-dgx-1-supercomputer-puts-400-servers-in-a-box.html -[7]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fapple-certified-technical-trainer-10-11 -[8]: https://www.networkworld.com/article/3236875/embargo-10-of-the-worlds-fastest-supercomputers.html#slide7 -[9]: https://www.facebook.com/NetworkWorld/ -[10]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190620 Several deals solidify the hybrid cloud-s status as the cloud of choice.md b/sources/talk/20190620 Several deals solidify the hybrid cloud-s status as the cloud of choice.md deleted file mode 100644 index ade07dcb10..0000000000 --- a/sources/talk/20190620 Several deals solidify the hybrid cloud-s status as the cloud of choice.md +++ /dev/null @@ -1,77 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Several deals solidify the hybrid cloud’s status as the cloud of choice) -[#]: via: (https://www.networkworld.com/article/3403354/several-deals-solidify-the-hybrid-clouds-status-as-the-cloud-of-choice.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Several deals solidify the hybrid cloud’s status as the cloud of choice -====== -On-premises and cloud connections are being built by all the top vendors to bridge legacy and modern systems, creating hybrid cloud environments. -![Getty Images][1] - -The hybrid cloud market is expected to grow from $38.27 billion in 2017 to $97.64 billion by 2023, at a Compound Annual Growth Rate (CAGR) of 17.0% during the forecast period, according to Markets and Markets. - -The research firm said the hybrid cloud is rapidly becoming a leading cloud solution, as it provides various benefits, such as cost, efficiency, agility, mobility, and elasticity. One of the many reasons is the need for interoperability standards between cloud services and existing systems. - -Unless you are a startup company and can be born in the cloud, you have legacy data systems that need to be bridged, which is where the hybrid cloud comes in. - -So, in very short order we’ve seen a bunch of new alliances involving the old and new guard, reiterating that the need for hybrid solutions remains strong. - -**[ Read also:[What hybrid cloud means in practice][2] | Get regularly scheduled insights: [Sign up for Network World newsletters][3] ]** - -### HPE/Google - -In April, the Hewlett Packard Enterprise (HPE) and Google announced a deal where HPE introduced a variety of server solutions for Google Cloud’s Anthos, along with a consumption-based model for the validated HPE on-premises infrastructure that is integrated with Anthos. - -Following up with that, the two just announced a strategic partnership to create a hybrid cloud for containers by combining HPE’s on-premises infrastructure, Cloud Data Services, and GreenLake consumption model with Anthos. This allows for: - - * Bi-directional data mobility for data mobility and consistent data services between on-premises and cloud - * Application workload mobility to move containerized app workloads across on-premises and multi-cloud environments - * Multi-cloud flexibility, offering the choice of HPE Cloud Volumes and Anthos for what works best for the workload - * Unified hybrid management through Anthos, so customers can get a unified and consistent view of their applications and workloads regardless of where they reside - * Charged as a service via HPE GreenLake - - - -### IBM/Cisco - -This is a furthering of an already existing partnership between IBM and Cisco designed to deliver a common and secure developer experience across on-premises and public cloud environments for building modern applications. - -[Cisco said it will support IBM Cloud Private][4], an on-premises container application development platform, on Cisco HyperFlex and HyperFlex Edge hyperconverged infrastructure. This includes support for IBM Cloud Pak for Applications. IBM Cloud Paks deliver enterprise-ready containerized software solutions and developer tools for building apps and then easily moving to any cloud—public or private. - -This architecture delivers a common and secure Kubernetes experience across on-premises (including edge) and public cloud environments. IBM’s Multicloud Manager covers monitoring and management of clusters and container-based applications running from on-premises to the edge, while Cisco’s Virtual Application Centric Infrastructure (ACI) will allow customers to extend their network fabric from on-premises to the IBM Cloud. - -### IBM/Equinix - -Equinix expanded its collaboration with IBM Cloud to bring private and scalable connectivity to global enterprises via Equinix Cloud Exchange Fabric (ECX Fabric). This provides private connectivity to IBM Cloud, including Direct Link Exchange, Direct Link Dedicated and Direct Link Dedicated Hosting, that is secure and scalable. - -ECX Fabric is an on-demand, SDN-enabled interconnection service that allows any business to connect between its own distributed infrastructure and any other company’s distributed infrastructure, including cloud providers. Direct Link provides IBM customers with a connection between their network and IBM Cloud. So ECX Fabric provides IBM customers with a secured and scalable network connection to the IBM Cloud service. - -At the same time, ECX Fabric provides secure connections to other cloud providers, and most customers prefer a multi-vendor approach to avoid vendor lock-in. - -“Each of the partnerships focus on two things: 1) supporting a hybrid-cloud platform for their existing customers by reducing the friction to leveraging each solution and 2) leveraging the unique strength that each company brings. Each of the solutions are unique and would be unlikely to compete directly with other partnerships,” said Tim Crawford, president of Avoa, an IT consultancy. - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3403354/several-deals-solidify-the-hybrid-clouds-status-as-the-cloud-of-choice.html - -作者:[Andy Patrizio][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://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/02/cloud_hand_plus_sign_private-100787051-large.jpg -[2]: https://www.networkworld.com/article/3249495/what-hybrid-cloud-mean-practice -[3]: https://www.networkworld.com/newsletters/signup.html -[4]: https://www.networkworld.com/article/3403363/cisco-connects-with-ibm-in-to-simplify-hybrid-cloud-deployment.html -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190630 Data Still Dominates.md b/sources/talk/20190630 Data Still Dominates.md deleted file mode 100644 index e9a86acf68..0000000000 --- a/sources/talk/20190630 Data Still Dominates.md +++ /dev/null @@ -1,100 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Data Still Dominates) -[#]: via: (https://theartofmachinery.com/2019/06/30/data_still_dominates.html) -[#]: author: (Simon Arneaud https://theartofmachinery.com) - -Data Still Dominates -====== - -Here’s [a quote from Linus Torvalds in 2006][1]: - -> I’m a huge proponent of designing your code around the data, rather than the other way around, and I think it’s one of the reasons git has been fairly successful… I will, in fact, claim that the difference between a bad programmer and a good one is whether he considers his code or his data structures more important. Bad programmers worry about the code. Good programmers worry about data structures and their relationships. - -Which sounds a lot like [Eric Raymond’s “Rule of Representation” from 2003][2]: - -> Fold knowledge into data, so program logic can be stupid and robust. - -Which was just his summary of ideas like [this one from Rob Pike in 1989][3]: - -> Data dominates. If you’ve chosen the right data structures and organized things well, the algorithms will almost always be self-evident. Data structures, not algorithms, are central to programming. - -Which cites [Fred Brooks from 1975][4]: - -> ### Representation is the Essence of Programming -> -> Beyond craftmanship lies invention, and it is here that lean, spare, fast programs are born. Almost always these are the result of strategic breakthrough rather than tactical cleverness. Sometimes the strategic breakthrough will be a new algorithm, such as the Cooley-Tukey Fast Fourier Transform or the substitution of an n log n sort for an n2 set of comparisons. -> -> Much more often, strategic breakthrough will come from redoing the representation of the data or tables. This is where the heart of your program lies. Show me your flowcharts and conceal your tables, and I shall be continued to be mystified. Show me your tables, and I won’t usually need your flowcharts; they’ll be obvious. - -So, smart people have been saying this again and again for nearly half a century: focus on the data first. But sometimes it feels like the most famous piece of smart programming advice that everyone forgets. - -Let me give some real examples. - -### The Highly Scalable System that Couldn’t - -This system was designed from the start to handle CPU-intensive loads with incredible scalability. Nothing was synchronous. Everything was done with callbacks, task queues and worker pools. - -But there were two problems: The first was that the “CPU-intensive load” turned out not to be that CPU-intensive after all — a single task took a few milliseconds at worst. So most of the architecture was doing more harm than good. The second problem was that although it sounded like a highly scalable distributed system, it wasn’t one — it only ran on one machine. Why? Because all communication between asynchronous components was done using files on the local filesystem, which was now the bottleneck for any scaling. The original design didn’t say much about data at all, except to advocate local files in the name of “simplicity”. Most of the document was about all the extra architecture that was “obviously” needed to handle the “CPU-intensiveness” of the load. - -### The Service-Oriented Architecture that was Still Data-Oriented - -This system followed a microservices design, made up of single-purpose apps with REST-style APIs. One component was a database that stored documents (basically responses to standard forms, and other electronic paperwork). Naturally it exposed an API for basic storage and retrieval, but pretty quickly there was a need for more complex search functionality. The designers felt that adding this search functionality to the existing document API would have gone against the principles of microservices design. They could talk about “search” as being a different kind of service from “get/put”, so their architecture shouldn’t couple them together. Besides, the tool they were planning to use for search indexing was separate from the database itself, so creating a new service made sense for implementation, too. - -In the end, a search API was created containing a search index that was essentially a duplicate of the data in the main database. This data was being updated dynamically, so any component that mutated document data through the main database API had to also update the search API. It’s impossible to do this with REST APIs without race conditions, so the two sets of data kept going out of sync every now and then, anyway. - -Despite what the architecture diagram promised, the two APIs were tightly coupled through their data dependencies. Later on it was recognised that the search index should be an implementation detail of a unified document service, and this made the system much more maintainable. “Do one thing” works at the data level, not the verb level. - -### The Fantastically Modular and Configurable Ball of Mud - -This system was a kind of automated deployment pipeline. The original designers wanted to make a tool that was flexible enough to solve deployment problems across the company. It was written as a set of pluggable components, with a configuration file system that not only configured the components, but acted as a [DSL][5] for programming how the components fitted into the pipeline. - -Fast forward a few years and it’s turned into “that program”. There was a long list of known bugs that no one was ever fixing. No one wanted to touch the code out of fear of breaking things. No one used any of the flexibility of the DSL. Everyone who used the program copy-pasted the same known-working configuration that everyone else used. - -What had gone wrong? Although the original design document used words like “modular”, “decoupled”, “extensible” and “configurable” a lot, it never said anything about data. So, data dependencies between components ended up being handled in an ad-hoc way using a globally shared blob of JSON. Over time, components made more and more undocumented assumptions about what was in or not in the JSON blob. Sure, the DSL allowed rearranging components into any order, but most configurations didn’t work. - -### Lessons - -I chose these three examples because they’re easy to explain, not to pick on others. I once tried to build a website, and failed trying to instead build some cringe-worthy XML database that didn’t even solve the data problems I had. Then there’s the project that turned into a broken mockery of half the functionality of `make`, again because I didn’t think about what I really needed. I wrote a post before based on a time I wrote [a castle-in-the-sky OOP class hierarchy that should have been encoded in data instead][6]. - -Update: - -Apparently many people still thought I wrote this to make fun of others. People who’ve actually worked with me will know I’m much more interested in the things I’m fixing than in blaming the people who did most of the work building them, but, okay, here’s what I think of the engineers involved. - -Honestly, the first example obviously happened because the designer was more interested in bringing a science project to work than in solving the problem at hand. Most of us have done that (mea culpa), but it’s really annoying to our colleagues who’ll probably have to help maintain them when we’re bored of them. If this sounds like you, please don’t get offended; please just stop. (I’d still rather work on the single-node distributed system than anything built around my “XML database”.) - -There’s nothing personal in the second example. Sometimes it feels like everyone is talking about how wonderful it is to split up services, but no one is talking about exactly when not to. People are learning the hard way all the time. - -The third example was actually from some of the smartest people I’ve ever had the chance to work with. - -(End update.) - -“Does this talk about the problems created by data?” turns out to be a pretty useful litmus test for good systems design. It’s also pretty handy for detecting false expert advice. The hard, messy systems design problems are data problems, so false experts love to ignore them. They’ll show you a wonderfully beautiful architecture, but without talking about what kind of data it’s appropriate for, and (crucially) what kind of data it isn’t. - -For example, a false expert might tell you that you should use a pub/sub system because pub/sub systems are loosely coupled, and loosely coupled components are more maintainable. That sounds nice and results in pretty diagrams, but it’s backwards thinking. Pub/sub doesn’t _make_ your components loosely coupled; pub/sub _is_ loosely coupled, which may or may not match your data needs. - -On the flip side, a well-designed data-oriented architecture goes a long way. Functional programming, service meshes, RPCs, design patterns, event loops, whatever, all have their merits, but personally I’ve seen tools like [boring old databases][7] be responsible for a lot more successfully shipped software. - --------------------------------------------------------------------------------- - -via: https://theartofmachinery.com/2019/06/30/data_still_dominates.html - -作者:[Simon Arneaud][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://theartofmachinery.com -[b]: https://github.com/lujun9972 -[1]: https://lwn.net/Articles/193245/ -[2]: http://www.catb.org/~esr/writings/taoup/html/ch01s06.html -[3]: http://doc.cat-v.org/bell_labs/pikestyle -[4]: https://archive.org/stream/mythicalmanmonth00fred/mythicalmanmonth00fred_djvu.txt -[5]: https://martinfowler.com/books/dsl.html -[6]: https://theartofmachinery.com/2016/06/21/code_vs_data.html -[7]: https://theartofmachinery.com/2017/10/28/rdbs_considered_useful.html diff --git a/sources/talk/20190702 SD-WAN Buyers Should Think Application Performance as well as Resiliency.md b/sources/talk/20190702 SD-WAN Buyers Should Think Application Performance as well as Resiliency.md deleted file mode 100644 index 3bddd4cdc3..0000000000 --- a/sources/talk/20190702 SD-WAN Buyers Should Think Application Performance as well as Resiliency.md +++ /dev/null @@ -1,49 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (SD-WAN Buyers Should Think Application Performance as well as Resiliency) -[#]: via: (https://www.networkworld.com/article/3406456/sd-wan-buyers-should-think-application-performance-as-well-as-resiliency.html) -[#]: author: (Zeus Kerravala https://www.networkworld.com/author/Zeus-Kerravala/) - -SD-WAN Buyers Should Think Application Performance as well as Resiliency -====== - -![istock][1] - -As an industry analyst, not since the days of WAN Optimization have I seen a technology gain as much interest as I am seeing with [SD-WANs][2] today. Although full deployments are still limited, nearly every network manager, and often many IT leaders I talk to, are interested in it. The reason for this is two-fold – the WAN has grown in importance for cloud-first enterprises and is badly in need of an overhaul. This hasn’t gone unnoticed by the vendor community as there has been an explosion of companies bringing a broad range of SD-WAN offerings to market. The great news for buyers is that there is no shortage of choices. The bad news is there are too many choices and making the right decision difficult. - -One area of differentiation for SD-WAN vendors is how they handle application performance.  I think of the SD-WAN market as being split into two categories – basic and advanced SD-WANs.  A good analogy is to think of the virtualization market.  There are many vendors that offer hypervisors – in fact there are a number of free ones.  So why do companies pay a premium for VMware? It’s because VMware offers many advanced features and capabilities that make its solution do more than just virtualize servers. - -Similarly, basic SD-WAN solutions do a great job of helping to lower costs and to increase application resiliency through path selection capabilities but do nothing to improve application performance. One myth that needs busting is that all SD-WANs make your applications perform better. That’s simply not true as application availability and performance are two different things. It’s possible to have great performance and poor availability or high availability with lackluster performance.  - -Consider the case where a business runs a hybrid WAN and voice and video traffic is sent over the MPLS connection and broadband is used for other traffic. If the MPLS link becomes congested, but doesn’t go down, most SD-WAN solutions will continue to send video and voice over it, which obviously degrades the performance. If multiple broadband connections are used, the chances of congestion related issues are even more likely.  - -This is an important point for IT professionals to understand. The business justification for SD-WAN was initially built around saving money but if application performance suffers, the entire return on investment (ROI) for the project might as well be tossed out the window.  For many companies, the network is the business, so a poor performing network means equally poor performing applications which results lost productivity, lower revenues and possibly brand damage from customer experience issues.  - -I’ve talked to many organizations that had digital initiatives fail because the network wasn’t transformed. For example, a luxury retailer implemented a tablet program for in store personnel to be able to show merchandise to customers. High end retail is almost wholly impulse purchases so the more inventory that can be shown to a customer, the larger the resulting sales. The WAN that was in place was causing the mobile application to perform poorly causing the digital initiative to have a negative effect. Instead of driving sales, the mobile initiative was chasing customers from the store.  The idea was right but the poor performing WAN caused the project to fail. - -SD-WAN decision makers need to look to suppliers that have specific technologies integrated into it that can act when congestion occurs.  A great example of this is the Silver Peak [Unity EdgeConnect™][3] SD-WAN edge platform with [path conditioning][4], [traffic shaping][5] and sub-second link failover. This ensures the best possible quality for all critical applications, even when an underlying link experiences congestion or an outage, even for [voice and video over broadband][6]. This is a foundational component of advanced SD-WAN providers as they offer the same resiliency and cost benefits as a basic SD-WAN but also ensure application performance remains high.  - -The SD-WAN era is here, and organizations should be aggressive with deployments as it will transform the WAN and make it a digital transformation enabler. Decision makers should choose their provider carefully and ensure the vendor also improves application performance.  Without it, the digital initiatives will likely fail and negate any ROI the company was hoping to realize. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3406456/sd-wan-buyers-should-think-application-performance-as-well-as-resiliency.html - -作者:[Zeus Kerravala][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://www.networkworld.com/author/Zeus-Kerravala/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/07/istock-157647179-100800860-large.jpg -[2]: https://www.silver-peak.com/sd-wan/sd-wan-explained -[3]: https://www.silver-peak.com/products/unity-edge-connect -[4]: https://www.silver-peak.com/products/unity-edge-connect/path-conditioning -[5]: https://www.silver-peak.com/products-solutions/unity/traffic-shaping -[6]: https://www.silver-peak.com/sd-wan/voice-video-over-broadband diff --git a/sources/talk/20190703 An eco-friendly internet of disposable things is coming.md b/sources/talk/20190703 An eco-friendly internet of disposable things is coming.md deleted file mode 100644 index 8d1e827aa8..0000000000 --- a/sources/talk/20190703 An eco-friendly internet of disposable things is coming.md +++ /dev/null @@ -1,92 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (An eco-friendly internet of disposable things is coming) -[#]: via: (https://www.networkworld.com/article/3406462/an-eco-friendly-internet-of-disposable-things-is-coming.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -An eco-friendly internet of disposable things is coming -====== -Researchers are creating a non-hazardous, bacteria-powered miniature battery that can be implanted into shipping labels and packaging to monitor temperature and track packages in real time. -![Thinkstock][1] - -Get ready for a future of disposable of internet of things (IoT) devices, one that will mean everything is connected to networks. It will be particularly useful in logistics, being used in single-use plastics in retail packaging and throw-away shippers’ carboard boxes. - -How it will happen? The answer is when non-hazardous, disposable bio-batteries make it possible. And that moment might be approaching. Researchers say they’re closer to commercializing a bacteria-powered miniature battery that they say will propel the IoDT. - -**[ Learn more: [Download a PDF bundle of five essential articles about IoT in the enterprise][2] ]** - -The “internet of disposable things is a new paradigm for the rapid evolution of wireless sensor networks,” says Seokheun Choi, an associate professor at Binghamton University, [in an article on the school’s website][3]. - -“Current IoDTs are mostly powered by expensive and environmentally hazardous batteries,” he says. Those costs can be significant in any kind of large-scale deployment, he says. And furthermore, with exponential growth, the environmental concerns would escalate rapidly. - -The miniaturized battery that Choi’s team has come up with is uniquely charged through power created by bacteria. It doesn’t have metals and acids in it. And it’s designed specifically to provide energy to sensors and radios in single-use IoT devices. Those could be the kinds of sensors ideal for supply-chain logistics where the container is ultimately going to end up in a landfill, creating a hazard. - -Another use case is real-time analysis of packaged food, with sensors monitoring temperature and location, preventing spoilage and providing safer food handling. For example, a farm product could be tracked for on-time delivery, as well as have its temperature measured, all within the packaging, as it moves from packaging facility to consumer. In the event of a food-borne illness outbreak, say, one can quickly find out where the product originated—which apparently is hard to do now. - -Other use cases could be battery-impregnated shipping labels that send real-time data to the internet. Importantly, in both use cases, packaging can be discarded without added environmental concerns. - -### How the bacteria-powered batteries work - -A slow release of nutrients provide the energy to the bacteria-powered batteries, which the researchers say can last up to eight days. “Slow and continuous reactions” convert the microbial nutrients into “long standing power,” they say in [their paper's abstract][4]. - -“Our biobattery is low-cost, disposable, and environmentally-friendly,” Choi says. - -Origami, the Japanese paper-folding skill used to create objects, was an inspiration for a similar microbial-based battery project the group wrote about last year in a paper. This one is liquid-based and not as long lasting. A bacteria-containing liquid was absorbed along the porous creases in folded paper, creating the paper-delivered power source, perhaps to be used in a shipping label. - -“Low-cost microbial fuel cells (MFCs) can be done efficiently by using a paper substrate and origami techniques,” [the group wrote then][5]. - -Scientists, too, envisage electronics now printed on circuit boards (PCBs) and can be toxic on disposal being printed entirely on eco-friendly paper. Product cycles, such as those found now in mobile devices and likely in future IoT devices, are continually getting tighter—thus PCBs are increasingly being disposed. Solutions are needed, experts say. - -Put the battery in the paper, too, is the argument here. And while you’re at it, get the biodegradation of the used-up biobattery to help break-down the organic-matter paper. - -Ultimately, Choi believes that the power-creating bacteria could even be introduced naturally by the environment—right now it’s added on by the scientists. - -**More on IoT:** - - * [What is the IoT? How the internet of things works][6] - * [What is edge computing and how it’s changing the network][7] - * [Most powerful Internet of Things companies][8] - * [10 Hot IoT startups to watch][9] - * [The 6 ways to make money in IoT][10] - * [What is digital twin technology? [and why it matters]][11] - * [Blockchain, service-centric networking key to IoT success][12] - * [Getting grounded in IoT networking and security][2] - * [Building IoT-ready networks must become a priority][13] - * [What is the Industrial IoT? [And why the stakes are so high]][14] - - - -Join the Network World communities on [Facebook][15] and [LinkedIn][16] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3406462/an-eco-friendly-internet-of-disposable-things-is-coming.html - -作者:[Patrick Nelson][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://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://images.techhive.com/images/article/2017/04/green-data-center-intro-100719502-large.jpg -[2]: https://www.networkworld.com/article/3269736/internet-of-things/getting-grounded-in-iot-networking-and-security.html -[3]: https://www.binghamton.edu/news/story/1867/everything-will-connect-to-the-internet-someday-and-this-biobattery-could-h -[4]: https://www.sciencedirect.com/science/article/abs/pii/S0378775319305580 -[5]: https://www.sciencedirect.com/science/article/pii/S0960148117311606 -[6]: https://www.networkworld.com/article/3207535/internet-of-things/what-is-the-iot-how-the-internet-of-things-works.html -[7]: https://www.networkworld.com/article/3224893/internet-of-things/what-is-edge-computing-and-how-it-s-changing-the-network.html -[8]: https://www.networkworld.com/article/2287045/internet-of-things/wireless-153629-10-most-powerful-internet-of-things-companies.html -[9]: https://www.networkworld.com/article/3270961/internet-of-things/10-hot-iot-startups-to-watch.html -[10]: https://www.networkworld.com/article/3279346/internet-of-things/the-6-ways-to-make-money-in-iot.html -[11]: https://www.networkworld.com/article/3280225/internet-of-things/what-is-digital-twin-technology-and-why-it-matters.html -[12]: https://www.networkworld.com/article/3276313/internet-of-things/blockchain-service-centric-networking-key-to-iot-success.html -[13]: https://www.networkworld.com/article/3276304/internet-of-things/building-iot-ready-networks-must-become-a-priority.html -[14]: https://www.networkworld.com/article/3243928/internet-of-things/what-is-the-industrial-iot-and-why-the-stakes-are-so-high.html -[15]: https://www.facebook.com/NetworkWorld/ -[16]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190705 Lessons in Vendor Lock-in- Google and Huawei.md b/sources/talk/20190705 Lessons in Vendor Lock-in- Google and Huawei.md deleted file mode 100644 index fe92b389a9..0000000000 --- a/sources/talk/20190705 Lessons in Vendor Lock-in- Google and Huawei.md +++ /dev/null @@ -1,58 +0,0 @@ -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " -[#]: subject: "Lessons in Vendor Lock-in: Google and Huawei" -[#]: via: "https://www.linuxjournal.com/content/lessons-vendor-lock-google-and-huawei" -[#]: author: "Kyle Rankin https://www.linuxjournal.com/users/kyle-rankin" - -Lessons in Vendor Lock-in: Google and Huawei -====== -![](https://www.linuxjournal.com/sites/default/files/styles/850x500/public/nodeimage/story/bigstock-Us--China-Trade-War-Boxing-F-252887971_1.jpg?itok=oZBwXDrP) - -What happens when you're locked in to a vendor that's too big to fail, but is on the opposite end of a trade war? - -The story of Google no longer giving Huawei access to Android updates is still developing, so by the time you read this, the situation may have changed. At the moment, Google has granted Huawei a 90-day window whereby it will have access to Android OS updates, the Google Play store and other Google-owned Android assets. After that point, due to trade negotiations between the US and China, Huawei no longer will have that access. - -Whether or not this new policy between Google and Huawei is still in place when this article is published, this article isn't about trade policy or politics. Instead, I'm going to examine this as a new lesson in vendor lock-in that I don't think many have considered before: what happens when the vendor you rely on is forced by its government to stop you from being a customer? - -### Too Big to Fail - -Vendor lock-in isn't new, but until the last decade or so, it generally was thought of by engineers as a bad thing. Companies would take advantage the fact that you used one of their products that was legitimately good to use the rest of their products that may or may not be as good as those from their competitors. People felt the pain of being stuck with inferior products and rebelled. - -These days, a lot of engineers have entered the industry in a world where the new giants of lock-in are still growing and have only flexed their lock-in powers a bit. Many engineers shrug off worries about choosing a solution that requires you to use only products from one vendor, in particular if that vendor is a large enough company. There is an assumption that those companies are too big ever to fail, so why would it matter that you rely on them (as many companies in the cloud do) for every aspect of their technology stack? - -Many people who justify lock-in with companies who are too big to fail point to all of the even more important companies who use that vendor who would have even bigger problems should that vendor have a major bug, outage or go out of business. It would take so much effort to use cross-platform technologies, the thinking goes, when the risk of going all-in with a single vendor seems so small. - -Huawei also probably figured (rightly) that Google and Android were too big to fail. Why worry about the risks of being beholden to a single vendor for your OS when that vendor was used by other large companies and would have even bigger problems if the vendor went away? - -### The Power of Updates - -Google held a particularly interesting and subtle bit of lock-in power over Huawei (and any phone manufacturer who uses Android)—the power of software updates. This form of lock-in isn't new. Microsoft famously used the fact that software updates in Microsoft Office cost money (naturally, as it was selling that software) along with the fact that new versions of Office had this tendency to break backward compatibility with older document formats to encourage everyone to upgrade. The common scenario was that the upper-level folks in the office would get brand-new, cutting-edge computers with the latest version of Office on them. They would start saving new documents and sharing them, and everyone else wouldn't be able to open them. It ended up being easier to upgrade everyone's version of Office than to have the bosses remember to save new documents in old formats every time. - -The main difference with Android is that updates are critical not because of compatibility, but for security. Without OS updates, your phone ultimately will become vulnerable to exploits that attackers continue to find in your software. The Android OS that ships on phones is proprietary and therefore requires permission from Google to get those updates. - -Many people still don't think of the Android OS as proprietary software. Although people talk about the FOSS underpinnings in Android, only people who go to the extra effort of getting a pure-FOSS version of Android, like LineageOS, on their phones actually experience it. The version of Android most people tend to use has a bit of FOSS in the center, surrounded by proprietary Google Apps code. - -It's this Google Apps code that gives Google the kind of powerful leverage over a company like Huawei. With traditional Android releases, Google controls access to OS updates including security updates. All of this software is signed with Google's signing keys. This system is built with security in mind—attackers can't easily build their own OS update to install on your phone—but it also has a convenient side effect of giving Google control over the updates. - -What's more, the Google Apps suite isn't just a convenient way to load Gmail or Google Docs, it also includes the tight integration with your Google account and the Google Play store. Without those hooks, you don't have access to the giant library of applications that everyone expects to use on their phones. As anyone with a LineageOS phone that uses F-Droid can attest, while a large number of applications are available in the F-Droid market, you can't expect to see those same apps as on Google Play. Although you can side-load some Google Play apps, many applications, such as Google Maps, behave differently without a Google account. Note that this control isn't unique to Google. Apple uses similar code-signing features with similar restrictions on its own phones and app updates. - -### Conclusion - -Without access to these OS updates, Huawei now will have to decide whether to create its own LineageOS-style Android fork or a whole new phone OS of its own. In either case, it will have to abandon the Google Play Store ecosystem and use F-Droid-style app repositories, or if it goes 100% alone, it will need to create a completely new app ecosystem. If its engineers planned for this situation, then they likely are working on this plan right now; otherwise, they are all presumably scrambling to address an event that "should never happen". Here's hoping that if you find yourself in a similar case of vendor lock-in with an overseas company that's too big to fail, you never get caught in the middle of a trade war. - --------------------------------------------------------------------------------- - -via: https://www.linuxjournal.com/content/lessons-vendor-lock-google-and-huawei - -作者:[Kyle Rankin][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://www.linuxjournal.com/users/kyle-rankin -[b]: https://github.com/lujun9972 diff --git a/sources/talk/20190708 Colocation facilities buck the cloud-data-center trend.md b/sources/talk/20190708 Colocation facilities buck the cloud-data-center trend.md deleted file mode 100644 index add6ef0093..0000000000 --- a/sources/talk/20190708 Colocation facilities buck the cloud-data-center trend.md +++ /dev/null @@ -1,96 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Colocation facilities buck the cloud-data-center trend) -[#]: via: (https://www.networkworld.com/article/3407756/colocation-facilities-buck-the-cloud-data-center-trend.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Colocation facilities buck the cloud-data-center trend -====== -Lower prices and latency plus easy access to multiple cloud providers make colocation facilities an attractive option compared to building on-site data centers. -![gorodenkoff / Getty Images][1] - -[Data center][2] workloads are moving but not only to the cloud. Increasingly, they are shifting to colocation facilities as an alternative to privately owned data centers. - -### What is colocation? - -A colocation facility or colo is a data center in which a business can rent space for servers and other computing hardware that they purchase but that the colo provider manages. - -[Read about IPv6 and cloud-access security brokers][3] - -The colo company provides the building, cooling, power, bandwidth and physical security. Space is leased by the rack, cabinet, cage or room. Many colos started out as managed services and continue  to offer those specialized services. - -Some prominent providers include Equinix, Digital Reality Trust, CenturyLink, and NTT Communications, and there are several Chinese providers that only serve the China market. Unlike the data centers of cloud vendors like Amazon and Microsoft, these colo facilities are generally in large metropolitan areas. - -“Colos have been around a long time, but their initial use case was Web servers,” said Rick Villars, vice president of data centers and cloud research at IDC. “What’s changed now is the ratio of what’s customer-facing is much greater than in 2000, [with the]  expansion of companies needing to have more assets that are network-facing.” - -### Advantages of colos: Cost, cloud interconnect - -Homegrown data centers are often sized correctly, with either too much capacity or too little, said Jim Poole, vice president of business development at Equinix. “Customers come to us all the time and say, ‘Would you buy my data center? Because I only use 25 percent of it,’” he said. - -Poole said the average capital expenditure for a stand-alone enterprise data center that is not a part of the corporate campus is $9 million. Companies are increasingly realizing that it makes sense to buy the racks of hardware but place it in someone else’s secure facility that handles the power and cooling. “It’s the same argument for doing cloud computing but at the physical-infrastructure level,” he said. - -Mike Satter, vice president for OceanTech, a data-center-decommissioning service provider, says enterprises should absolutely outsource data-center construction or go the colo route. Just as there are contractors who specialize in building houses, there are experts who specialize in data-center design, he said. - -He added that with many data-center closures there is subsequent consolidation. “For every decommissioning we do, that same company is adding to another environment somewhere else. With the new hardware out there now, the servers can do the same work in 20 racks as they did in 80 racks five years ago. That means a reduced footprint and energy cost,” he said. - -Often these closures mean moving to a colo. OceanTech recently decommissioned a private data center for a major media outlet he declined to identify that involved shutting down a data center in New Jersey that held 70 racks of gear. The firm was going to move its apps to the cloud but ended up expanding to a colo facility in New York City. - -### Cloud isn't cheaper than private data centers - -Satter said he’s had conversations with companies that planned to go to the cloud but changed their minds when they saw what it would cost if they later decided to move workloads out. Cloud providers can “kill you with guidelines and costs” because your data is in their infrastructure, and they can set fees that make it expensive to move it to another provider, he said. “The cloud not a money saver.” - -That can drive decisions to keep data in-house or in a colo in order to keep tighter possession of their data. “Early on, when people weren’t hip to the game for how much it cost to move to the cloud, you had decision makers with influence say the cloud sounded good. Now they are realizing it costs a lot more dollars to do that vs. doing something on-prem, on your own,” said Satter. - -Guy Churchward, CEO of Datera, developer of software designed storage platforms for enterprises, has noticed a new trend among CIOs making a cloud vs. private decision for apps based on the lifespan of the app. - -“Organizations don’t know how much resource they need to throw at a task. The cloud makes more sense for [short-term apps],” he said. For applications that will be used for five years or more, it makes more sense to place them in company-controlled facilities, he said. That's because with three-to-five-year hardware-refresh cycles, the hardware lasts the entire lifespan of the app, and the hardware and app can be retired at the same time. - -Another force driving the decision of private data center vs. the cloud is machine learning. Churchward said that’s because machine learning is often done using large amounts of highly sensitive data, so customers wanted data kept securely in house. They also wanted a low-latency loop between their ML apps and the data lake from which they draw. - -### Colos connect to mulitple cloud providers - -Another allure of colocation providers is that they can act as a pipeline between enterprises and multiple cloud providers. So rather than directly connecting to AWS, Azure, etc., businesses can connect to a colo, and that colo acts like a giant switch, connecting them to cloud providers through dedicated, high-speed networks. - -Villars notes the typical corporate data center is either inside corporate HQ or someplace remote, like South Dakota where land was cheap. But the trade-off is that network connectivity to remote locations is often slower and more expensive. - -That’s where a data-center colo providers with a large footprints come in, since they have points of presence in major cities. No one would fault a New York City-based firm for putting its data center in upstate New York or even further away. But when Equinix, DTR, and others all have data centers right in New York City, customers might get faster and sometimes cheaper connections plus lower latency. - -Steve Cretney, vice president and CIO for food distributor Colony Brands, is in the midst of migrating the company to the cloud and moving everything he can from his data center to AWS. Rather than connect directly to AWS, Colony’s Wisconsin headquarters is connected to an Equinix data center in Chicago. - -Going with Equinix provides more and cheaper bandwidth to the cloud than buying direct connectivity on his own. “I effectively moved my data center into Chicago. Now I can compete with a better price on data communication and networks,” he said. - -Cretney estimates that by moving Colony’s networking from a smaller, local provider to Chicago, the company is seeing an annual cost savings of 50 percent for network connectivity that includes telecommunications. - -Also, Colony wants to adopt a mult-cloud-provider strategy to avoid vendor lock-in, and he gets that by using Equinix as his network connection. As the company eventually uses Microsoft Azure and Google Cloud and other providers, Equinex can provide flexible and economic interconnections, he said. - -### **Colos reduce the need for enterprise data-center real estate** - -In 2014, 80 percent of data-centers were owned by enterprises, while colos and the early cloud accounted for 20 percent, said Villars. Today that’s a 50-50 split, and by 2022-2023, IDC projects service providers will own 70 percent of the large-data-center space. - -For the past five years, the amount of new data-center construction by enterprises has been falling steadily at  5 to 10 percent per year, said Villars. “They are not building new ones because they are coming to the realization that being an expert at data-center construction is not something a company has.” - -Enterprises across many sectors are looking at their data-center environment and leveraging things like virtual machines and SSD, thereby compressing the size of their data centers and getting more work done within smaller physical footprints. “So at some point they ask if they are spending appropriately for this space. That’s when they look at colo,” said Villars. - -Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3407756/colocation-facilities-buck-the-cloud-data-center-trend.html - -作者:[Andy Patrizio][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://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/05/cso_cloud_computing_backups_it_engineer_data_center_server_racks_connections_by_gorodenkoff_gettyimages-943065400_3x2_2400x1600-100796535-large.jpg -[2]: https://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html -[3]: https://www.networkworld.com/article/3391380/does-your-cloud-access-security-broker-support-ipv6-it-should.html -[4]: https://www.facebook.com/NetworkWorld/ -[5]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190709 Improving IT Operations - Key to Business Success in Digital Transformation.md b/sources/talk/20190709 Improving IT Operations - Key to Business Success in Digital Transformation.md deleted file mode 100644 index 5ce4f7edfe..0000000000 --- a/sources/talk/20190709 Improving IT Operations - Key to Business Success in Digital Transformation.md +++ /dev/null @@ -1,79 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Improving IT Operations – Key to Business Success in Digital Transformation) -[#]: via: (https://www.networkworld.com/article/3407698/improving-it-operations-key-to-business-success-in-digital-transformation.html) -[#]: author: (Rami Rammaha https://www.networkworld.com/author/Rami-Rammaha/) - -Improving IT Operations – Key to Business Success in Digital Transformation -====== - -![Artem Peretiatko][1] - -Forty seven percent of CEOs say they are being “challenged” by their board of directors to show progress in shifting toward a digital business model according to the [Gartner 2018 CIO][2] Agenda Industry Insights Report. By improving IT operations, organizations can progress and even accelerate their digital transformation initiatives efficiently and successfully. The biggest barrier to success is that IT currently spends around 78 percent of their budget and 80 percent of their time just maintaining IT operations, leaving little time and resource left for innovation according to ZK Research[*][3]. - -### **Do you cut the operations budget or invest more in transforming operations? ** - -The Cisco IT Operations Readiness Index 2018 predicted a dramatic change in IT operations as CIOs embrace analytics and automation. The study reported that 88 percent of respondents identify investing in IT operations as key to driving preemptive practices and enhancing customer experience. - -### What does this have to do with the wide area network? - -According to the IT Operations Readiness Index, 73 percent of respondents will collect WAN operational or performance data and 70 percent will analyze WAN data and leverage the results to further automate network operations. However, security is the most data-driven infrastructure today compared to other IT infrastructure functions (i.e. IoT, IP telephony, network infrastructure, data center infrastructure, WAN connectivity, etc.). The big questions are: - - * How do you collect operations data and what data should you collect? - * How do you analyze it? - * How do you then automate IT operations based on the results? - - - -By no means, is this a simple task. IT departments use a combination of data collected internally and by outside vendors to aggregate information used to transform operations and make better business decisions. - -In a recent [survey][4] by Frost & Sullivan, 94 percent of respondents indicated they will deploy a Software-defined Wide Area Network ([SD-WAN][5]) in the next 24 months. SD-WAN addresses the gap that router-centric WAN architectures were not designed to fill. A business-driven SD-WAN, designed from the ground up to support a cloud-first business model, provides significantly more network and application performance visibility, significantly assisting enterprises to realize the transformational promise of a digital business model. In fact, Gartner indicates that 90 percent of WAN edge decisions will be based on SD-WAN by 2023. - -### How an SD-WAN can improve IT operations leading to successful digital transformation - -All SD-WAN solutions are not created alike. One of the key components that organizations need to consider and evaluate is having complete observability across the network and applications through a single pane of glass. Without visibility, IT risks running inefficient operations that will stifle digital transformation initiatives. This real-time visibility must provide: - - * Operational metrics enabling IT/CIO’s to shift from a reactive toward a predictive practice - * A centralized dashboard that allows IT to monitor, in real-time, all aspects of network operations – a dashboard that has flexible knobs to adjust and collect metrics from all WAN edge appliances to accelerate problem resolution - - - -The Silver Peak Unity [EdgeConnect™][6] SD-WAN edge platform provides granular visibility into network and application performance. The EdgeConnect platform ensures the highest quality of experience for both end users and IT. End users enjoy always-consistent, always-available application performance including the highest quality of voice and video, even over broadband. Utilizing the [Unity Orchestrator™][7] comprehensive management dashboard as shown below, IT gains complete observability into the performance attributes of the network and applications in real-time. Customizable widgets provide a wealth of operational data including a health heatmap for every SD-WAN appliance deployed, flow counts, active tunnels, logical topologies, top talkers, alarms, bandwidth consumed by each application and location, application latency and jitter and much more. Furthermore, the platform maintains a week’s worth of data with context allowing IT to playback and see what has transpired at a specific time and location, analogous to a DVR. - -By providing complete observability of the entire WAN, IT spends less time troubleshooting network and application bottlenecks and fielding support/help desk calls day and night, and more time focused on strategic business initiatives. - -![][8] - -This solution brief, “[Simplify SD-WAN Operations with Greater Visibility][9]”, provides additional detail on the capabilities offered in the business-driven EdgeConnect SD-WAN edge platform that enables businesses to accelerate their shift toward a digital business model. - -![][10] - -* ZK Research quote from [Cisco IT Operations Readiness Index 2018][11] - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3407698/improving-it-operations-key-to-business-success-in-digital-transformation.html - -作者:[Rami Rammaha][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://www.networkworld.com/author/Rami-Rammaha/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/07/istock-1096811078_1200x800-100801264-large.jpg -[2]: https://www.gartner.com/smarterwithgartner/is-digital-a-priority-for-your-industry/ -[3]: https://blog.silver-peak.com/improving-it-operations-key-to-business-success-in-digital-transformation#footnote -[4]: https://www.silver-peak.com/sd-wan-edge-survey -[5]: https://www.silver-peak.com/sd-wan -[6]: https://www.silver-peak.com/products/unity-edge-connect -[7]: https://www.silver-peak.com/products/unity-orchestrator -[8]: https://images.idgesg.net/images/article/2019/07/silver-peak-unity-edgeconnect-sdwan-100801265-large.jpg -[9]: https://www.silver-peak.com/resource-center/simplify-sd-wan-operations-greater-visibility -[10]: https://images.idgesg.net/images/article/2019/07/simplify-sd-wan-operations-with-greater-visibility-100801266-large.jpg -[11]: https://s3-us-west-1.amazonaws.com/connectedfutures-prod/wp-content/uploads/2018/11/CF_transforming_IT_operations_report_3-2.pdf diff --git a/sources/talk/20190709 Linux a key player in the edge computing revolution.md b/sources/talk/20190709 Linux a key player in the edge computing revolution.md deleted file mode 100644 index df1dba9344..0000000000 --- a/sources/talk/20190709 Linux a key player in the edge computing revolution.md +++ /dev/null @@ -1,112 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Linux a key player in the edge computing revolution) -[#]: via: (https://www.networkworld.com/article/3407702/linux-a-key-player-in-the-edge-computing-revolution.html) -[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) - -Linux a key player in the edge computing revolution -====== -Edge computing is augmenting the role that Linux plays in our day-to-day lives. A conversation with Jaromir Coufal from Red Hat helps to define what the edge has become. -![Dominic Smith \(CC BY 2.0\)][1] - -In the past few years, [edge computing][2] has been revolutionizing how some very familiar services are provided to individuals like you and me, as well as how services are managed within major industries. Try to get your arms around what edge computing is today, and you might just discover that your arms aren’t nearly as long or as flexible as you’d imagined. And Linux is playing a major role in this ever-expanding edge. - -One reason why edge computing defies easy definition is that it takes many different forms. As Jaromir Coufal, principal product manager at Red Hat, recently pointed out to me, there is no single edge. Instead, there are lots of edges – depending on what compute features are needed. He suggests that we can think of the edge as something of a continuum of capabilities with the problem being resolved determining where along that particular continuum any edge solution will rest. - -**[ Also read: [What is edge computing?][3] and [How edge networking and IoT will reshape data centers][4] ]** - -Some forms of edge computing include consumer electronics that are used and installed in millions of homes, others that serve tens of thousands of small businesses with operating their facilities, and still others that tie large companies to their remote sites. Key to this elusive definition is the idea that edge computing always involves distributing the workload in such a way that the bulk of the computing work is done remotely from the central core of the business and close to the business problem being addressed. - -Done properly, edge computing can provide services that are both faster and more reliable. Applications running on the edge can be more resilient and run considerably faster because their required data resources are local. In addition, data can be processed or analyzed locally, often requiring only periodic transfer of results to central sites. - -While physical security might be lower at the edge, edge devices often implement security features that allow them to detect 1) manipulation of the device, 2) malicious software, and 3) a physical breach and wipe data. - -### Benefits of edge computing - -Some of the benefits of edge computing include: - - * A quick response to intrusion detection, including the ability for a remote device to detach or self-destruct - * The ability to instantly stop communication when needed - * Constrained functionality and fewer generic entry points - * Rugged and reliable problem resistance - * Making the overall computing system harder to attack because computing is distributed - * Less data-in-transit exposure - - - -Some examples of edge computing devices include those that provide: - - * Video surveillance – watching for activity, reporting only if seen - * Controlling autonomous vehicles - * Production monitoring and control - - - -### Edge computing success story: Chick-fil-A - -One impressive example of highly successful edge computing caught me by surprise. It turns out Chick-fil-A uses edge computing devices to help manage its food preparation services. At Chick-fil-A, edge devices: - - 1. Analyze a fryer’s cleaning and cooking - 2. Aggregate data as a failsafe in case internet connectivity is lost - 3. Help with decision-making about cooking – how much and how long to cook - 4. Enhance business operations - 5. Help automate the complex food cooking and holding decisions so that even newbies get things right - 6. Function even when the connection with the central site is down - - - -As Coufal pointed out, Chick-fil-A runs [Kubernetes][5] at the edge in every one of its restaurants. Their key motivators are low-latency, scale of operations, and continuous business. And it seems to be working extremely well. - -[Chick-fil-A’s hypothesis][6] captures it all: By making smarter kitchen equipment, we can collect more data. By applying data to our restaurant, we can build more intelligent systems. By building more intelligent systems, we can better scale our business. - -### Are you edge-ready? - -There’s no quick answer as to whether your organization is “edge ready.” Many factors determine what kind of services can be deployed on the edge and whether and when those services need to communicate with more central devices. Some of these include: - - * Whether your workload can be functionally distributed - * If it’s OK for devices to have infrequent contact with the central services - * If devices can work properly when cut off from their connection back to central services - * Whether the devices can be secured (e.g., trusted not to provide an entry point) - - - -Implementing an edge computing network will likely take a long time from initial planning to implementation. Still, this kind of technology is taking hold and offers some strong advantages. While edge computing initially took hold 15 or more years ago, the last few years have seen renewed interest thanks to tech advances that have enabled new uses. - -Coufal noted that it's been 15 or more years since edge computing concepts and technologies were first introduced, but renewed interest has come about due to tech advances enabling new uses that require this technology. - -**More about edge computing:** - - * [How edge networking and IoT will reshape data centers][4] - * [Edge computing best practices][7] - * [How edge computing can help secure the IoT][8] - - - -Join the Network World communities on [Facebook][9] and [LinkedIn][10] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3407702/linux-a-key-player-in-the-edge-computing-revolution.html - -作者:[Sandra Henry-Stocker][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://www.networkworld.com/author/Sandra-Henry_Stocker/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/07/telecom-100801330-large.jpg -[2]: https://www.networkworld.com/article/3224893/what-is-edge-computing-and-how-it-s-changing-the-network.html -[3]: https://www.networkworld.com/article/3224893/internet-of-things/what-is-edge-computing-and-how-it-s-changing-the-network.html -[4]: https://www.networkworld.com/article/3291790/data-center/how-edge-networking-and-iot-will-reshape-data-centers.html -[5]: https://www.infoworld.com/article/3268073/what-is-kubernetes-container-orchestration-explained.html -[6]: https://medium.com/@cfatechblog/edge-computing-at-chick-fil-a-7d67242675e2 -[7]: https://www.networkworld.com/article/3331978/lan-wan/edge-computing-best-practices.html -[8]: https://www.networkworld.com/article/3331905/internet-of-things/how-edge-computing-can-help-secure-the-iot.html -[9]: https://www.facebook.com/NetworkWorld/ -[10]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190711 Smarter IoT concepts reveal creaking networks.md b/sources/talk/20190711 Smarter IoT concepts reveal creaking networks.md deleted file mode 100644 index 86150bc580..0000000000 --- a/sources/talk/20190711 Smarter IoT concepts reveal creaking networks.md +++ /dev/null @@ -1,79 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Smarter IoT concepts reveal creaking networks) -[#]: via: (https://www.networkworld.com/article/3407852/smarter-iot-concepts-reveal-creaking-networks.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -Smarter IoT concepts reveal creaking networks -====== -Today’s networks don’t meet the needs of emergent internet of things systems. IoT systems need their own modern infrastructure, researchers at the University of Magdeburg say. -![Thinkstock][1] - -The internet of things (IoT) needs its own infrastructure ecosystem — one that doesn't use external clouds at all, researchers at the University of Magdeburg say. - -The computer scientists recently obtained funding from the German government to study how to build a future-generation of revolutionary, emergent IoT systems. They say networks must be fault tolerant, secure, and traverse disparate protocols, which they aren't now. - -**[ Read also: [What is edge computing?][2] and [How edge networking and IoT will reshape data centers][3] ]** - -The researchers say a smarter, unique, and organic infrastructure needs to be developed for the IoT and that simply adapting the IoT to traditional networks won't work. They say services must self-organize and function autonomously and that people must accept the fact that we are using the internet in ways never originally intended.  - -"The internet, as we know it, is based on network architectures of the 70s and 80s, when it was designed for completely different applications,” the researchers say in their [media release][4]. The internet has centralized security, which causes choke points, and and an inherent lack of dynamic controls, which translates to inflexibility in access rights — all of which make it difficult to adapt the IoT to it. - -Device, data, and process management must be integrated into IoT systems, say the group behind the project, called [DoRIoT][5] (Dynamische Laufzeitumgebung für Organisch (dis-)Aggregierende IoT-Prozesse), translated as Dynamic Runtime Environment for Organic dis-Aggregating IoT Processes. - -“In order to close this gap, concepts [will be] developed in the project that transparently realize the access to the data,” says Professor Sebastian Zug of the University of Freiberg, a partner in DoRIoT. “For the application, it should make no difference whether the specific information requirement is answered by a server or an IoT node.” - -### Extreme edge computing - -In other words, servers and nodes, conceptually, should merge. One could argue it’s a form of extreme [edge computing][6], which is when processing and data storage is taken out of traditional, centralized data center environments and placed close to where the resources are required. It reduces latency, among other advantages. - -DoRIoT may take edge computing one step further. Detecting failures ahead of time and seamless migration of devices are wants, too — services can’t fail just because a new kind of device is introduced. - -“The systems [will] benefit from each other, for example, they can share computing power, data and so on,” says Mesut Güneş of Magdeburg’s [Faculty of Computer Science Institute for Intelligent Cooperating Systems][7]. - -“The result is an enormous data pool,” the researchers explain. “Which, in turn, makes it possible to make much more precise statements, for example when predicting climate models, observing traffic flows, or managing large factories in Industry 4.0.” - -[Industry 4.0][8] refers to smart factories that have connected machines autonomously self-managing their own supply chain, production output, and logistics without human intervention. - -Managing risks better than the current internet is one of DoRIoT's goals. The idea is to “guarantee full sovereignty over proprietary data.” To get there, though, one has to eliminate dependency on the cloud and access to data via third parties, they say. - -“This allows companies to be independent of the server infrastructures of external service providers such as Google, Microsoft or Amazon, which are subject to constant changes and even may not be accessible,” they say. - -**More about edge networking** - - * [How edge networking and IoT will reshape data centers][3] - * [Edge computing best practices][9] - * [How edge computing can help secure the IoT][10] - - - -Join the Network World communities on [Facebook][11] and [LinkedIn][12] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3407852/smarter-iot-concepts-reveal-creaking-networks.html - -作者:[Patrick Nelson][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://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2018/02/industry_4-0_industrial_iot_internet_of_things_network_thinkstock_613880008-100749946-large.jpg -[2]: https://www.networkworld.com/article/3224893/internet-of-things/what-is-edge-computing-and-how-it-s-changing-the-network.html -[3]: https://www.networkworld.com/article/3291790/data-center/how-edge-networking-and-iot-will-reshape-data-centers.html -[4]: http://www.ovgu.de/en/University/In+Profile/Key+Profile+Areas/Research/Secure+data+protection+in+the+new+internet+of+things.html -[5]: http://www.doriot.net/ -[6]: https://www.networkworld.com/article/3224893/what-is-edge-computing-and-how-it-s-changing-the-network.html -[7]: http://iks.cs.ovgu.de/iks/en/ICS.html -[8]: https://www.networkworld.com/article/3199671/what-is-industry-4-0.html -[9]: https://www.networkworld.com/article/3331978/lan-wan/edge-computing-best-practices.html -[10]: https://www.networkworld.com/article/3331905/internet-of-things/how-edge-computing-can-help-secure-the-iot.html -[11]: https://www.facebook.com/NetworkWorld/ -[12]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190716 Server hardware makers shift production out of China.md b/sources/talk/20190716 Server hardware makers shift production out of China.md deleted file mode 100644 index be29283977..0000000000 --- a/sources/talk/20190716 Server hardware makers shift production out of China.md +++ /dev/null @@ -1,73 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Server hardware makers shift production out of China) -[#]: via: (https://www.networkworld.com/article/3409784/server-hardware-makers-shift-production-out-of-china.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Server hardware makers shift production out of China -====== -Tariffs on Chinese products and unstable U.S./China relations cause server makers to speed up their move out of China. -![Etereuti \(CC0\)][1] - -The supply chain of vendors that build servers and network communication devices is accelerating its shift of production out of China to Taiwan and North America, along with other nations not subject to the trade war between the U.S. and China. - -Last May, the Trump Administration levied tariffs on a number of imported Chinese goods, computer components among them. The tariffs ranged from 10-25%. Consumers were hit hardest, since they are more price sensitive than IT buyers. PC World said the [average laptop price could rise by $120][2] just for the tariffs. - -But since the tariff was based on the value of the product, that means server hardware prices could skyrocket, since servers cost much more than PCs. - -**[ Read also: [HPE’s CEO lays out his technology vision][3] ]** - -### Companies that are moving production out of China - -The Taiwanese tech publication DigiTimes reported (article now locked behind a paywall) that Mitac Computing Technology, a server ODM, reactivated an old production line at Hsinchu Science Park (HSP) in Taiwan at the end of 2018 and restarted another for motherboard SMT process in March 2019. The company plans to establish one more SMT production line prior to the end of 2019. - -It went on to say Mitac plans to produce all of its high-end U.S.-bound servers in Taiwan and is looking to move 30% of its overall server production lines back to Taiwan in the next three years. - -Wiwynn, a cloud computing server subsidiary of Wistron, is primarily assembling its U.S.-bound servers in Mexico and has also recently established a production site in southern Taiwan per clients' requests. - -Taiwan-based server chassis and assembly player AIC recently expanded the number of its factories in Taiwan to four and has been aggressively forming cooperation with its partners to expand its capacity. Many Taiwan-based component suppliers are also expanding their capacity in Taiwan. - -**[ [Get certified as an Apple Technical Coordinator with this seven-part online course from PluralSight.][4] ]** - -Several ODMs, such as Inventec, Wiwynn, Wistron, and Foxconn, all have plants in Mexico, while Quanta Computer has production lines in the U.S. Wiwynn also plans to open manufacturing facilities in eastern U.S. - -“This is not something that just happened overnight, it’s a process that started a few years ago. The tariffs just accelerated the desire of ODMs to do it,” said Ashish Nadkarni, group vice president for infrastructure systems, platforms and technologies at IDC. “Since [President] Trump has come into office there has been saber rattling about China and a trade war. There has also been a focus on margins.” - -He added that component makers are definitely moving out of China to other parts of Asia, like Korea, the Philippines, and Vietnam. - -### HPE, Dell and Lenovo should remain unaffected - -The big three branded server makers are all largely immunized against the tariffs. HP Enterprise, Dell, and Lenovo all have U.S.-based assemblies and their contract manufacturers are in Taiwan, said Nadkarni. So, their costs should remain unaffected by tariffs. - -The tariffs are not affecting sales as much as revenue for hyperscale whitebox vendors is being stressed. Hyperscale companies such as Amazon Web Services (AWS), Microsoft, Google, etc. have contracts with vendors such as Inspur and Super Micro, and if prices fluctuate, that’s not their problem. The hardware vendor is expected to deliver at the agreed cost. - -So margins, already paper thin, can’t be passed on to the customer, unlike the aforementioned laptop example. - -“It’s not the end customers who are affected by it, it’s the vendors who are affected by it. Certain things they can pass on, like component prices. But if the build value goes up, that’s not the customers problem, that’s the vendor’s problem,” said Nadkarni. - -So while it may cost you more to buy a laptop as this trade fracas goes on, it shouldn’t cost more to buy a server. - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3409784/server-hardware-makers-shift-production-out-of-china.html - -作者:[Andy Patrizio][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://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2018/07/asia_china_flag_grunge-stars_pixabay_etereuti-100763424-large.jpg -[2]: https://www.pcworld.com/article/3403405/trump-tariffs-on-chinese-goods-could-cost-you-120-more-for-notebook-pcs-say-dell-hp-and-cta.html -[3]: https://www.networkworld.com/article/3394879/hpe-s-ceo-lays-out-his-technology-vision.html -[4]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fapple-certified-technical-trainer-10-11 -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190717 How edge computing is driving a new era of CDN.md b/sources/talk/20190717 How edge computing is driving a new era of CDN.md deleted file mode 100644 index 643d3aa713..0000000000 --- a/sources/talk/20190717 How edge computing is driving a new era of CDN.md +++ /dev/null @@ -1,107 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How edge computing is driving a new era of CDN) -[#]: via: (https://www.networkworld.com/article/3409027/how-edge-computing-is-driving-a-new-era-of-cdn.html) -[#]: author: (Matt Conran https://www.networkworld.com/author/Matt-Conran/) - -How edge computing is driving a new era of CDN -====== -A CDN is an edge application and an edge application is a superset of what your CDN is doing. -![geralt \(CC0\)][1] - -We are living in a hyperconnected world where anything can now be pushed to the cloud. The idea of having content located in one place, which could be useful from the management’s perspective, is now redundant. Today, the users and data are omnipresent. - -The customer’s expectations have up-surged because of this evolution. There is now an increased expectation of high-quality service and a decrease in customer’s patience. In the past, one could patiently wait 10 hours to download the content. But this is certainly not the scenario at the present time. Nowadays we have high expectations and high-performance requirements but on the other hand, there are concerns as well. The internet is a weird place, with unpredictable asymmetric patterns, buffer bloat and a list of other [performance-related problems][2] that I wrote about on Network Insight. _[Disclaimer: the author is employed by Network Insight.]_ - -Also, the internet is growing at an accelerated rate. By the year 2020, the internet is expected to reach 1.5 Gigabyte of traffic per day per person. In the coming times, the world of the Internet of Things (IoT) driven by objects will far supersede these data figures as well. For example, a connected airplane will generate around 5 Terabytes of data per day. This spiraling level of volume requires a new approach to data management and forces us to re-think how we delivery applications. - -[RELATED: How Notre Dame is going all in with Amazon’s cloud][3] - -Why? Because all this information cannot be processed by a single cloud or an on-premise location. Latency will always be a problem. For example, in virtual reality (VR) anything over 7 milliseconds will cause motion sickness. When decisions are required to be taken in real-time, you cannot send data to the cloud. You can, however, make use of edge computing and a multi-CDN design. - -### Introducing edge computing and multi-CDN - -The rate of cloud adoption, all-things-video, IoT and edge computing are bringing life back to CDNs and multi-CDN designs. Typically, a multi-CDN is an implementation pattern that includes more than one CDN vendor. The traffic direction is performed by using different metrics, whereby traffic can either be load balanced or failed across the different vendors. - -Edge computing moves actions as close as possible to the source. It is the point where the physical world interacts with the digital world. Logically, the decentralized approach of edge computing will not take over the centralized approach. They will be complementary to each other, so that the application can run at its peak level, depending on its position in the network. - -For example, in IoT, saving battery life is crucial. Let’s assume an IoT device can conduct the transaction in 10ms round trip time (RTT), instead of 100ms RTT. As a result, it can use 10 times less battery. - -### The internet, a performance bottleneck - -The internet is designed on the principle that everyone can talk to everyone, thereby providing universal connectivity whether required or not. There has been a number of design changes with network address translation (NAT) being the biggest. However, essentially the role of the internet has remained the same in terms of connectivity, regardless of location. - -With this type of connectivity model, distance is an important determinant for the application’s performance. Users on the other side of the planet will suffer regardless of buffer sizes or other device optimizations. Long RTT is experienced as packets go back and forth before the actual data transmission. Although caching and traffic redirection is being used but limited success has been achieved so far. - -### The principles of application delivery - -When transmission control protocol (TCP) starts, it thinks it is back in the late 1970s. It assumes that all services are on a local area network (LAN) and there is no packet loss. It then starts to work backward from there. Back when it was designed, we didn't have real-time traffic, such as voice and video that is latency and jitter sensitive. - -Ideally, TCP was designed for the ease of use and reliability, not to boost the performance. You actually need to optimize the TCP stack. And this is why CDNs are very good at performing such tasks. For example, if a connection is received from a mobile phone, a CDN will start with the assumption that there is going to be high jitter and packet loss. This allows them to size the TCP window correctly that accurately match network conditions. - -How do you magnify the performance, what options do you have? In a generic sense, many look to lowering the latency. However, with applications, such as video streaming, latency does not tell you if the video is going to buffer. One can only assume that lower latency will lead to less buffering. In such a scenario, measurement-based on throughput is a far better performance metric since will tell you how fast an object will load. - -We have also to consider the page load times. At the network level, it's the time to first byte (TTFB) and ping. However, these mechanisms don’t tell you much about the user experience as everything fits into one packet. Using ping will not inform you about the bandwidth problems. - -And if a web page goes slower by 25% once packet loss exceeds 5% and you are measuring time to the first byte which is the 4th packet - what exactly can you learn? TTFB is comparable to an internet control message protocol (ICMP) request just one layer up the stack. It's good if something is broken but not if there is underperformance issue. - -When you examine the history of TTFB measuring, you will find that it was deployed due to the lack of Real User Monitoring (RUM) measurements. Previously TTFB was as good in approximating how fast something was going to load, but we don't have to approximate anymore as we can measure it with RUM. RUM is measurements from the end-users. An example could be the metrics generated from a webpage that is being served to an actual user. - -Conclusively, TTFB, ping and page load times are not sophisticated measurements. We should prefer RUM time measurements as much as we can. This provides a more accurate picture of the user experience. This is something which has become critical over the last decade. - -Now we are living in a world of RUM which lets us build our network based on what matters to the business users. All CDNs should aim for RUM measurements. For this, they may need to integrate with traffic management systems that intelligently measure on what the end-user really sees. - -### The need for multi-CDN - -Primarily, the reasons one would opt for a multi-CDN environment are availability and performance. No single CDN can be the fastest to everyone and everywhere in the world. It is impossible due to the internet's connectivity model. However, combining the best of two or even more CDN providers will increase the performance. - -A multi-CDN will give a faster performance and higher availability than what can be achieved with a single CDN. A good design is what runs two availability zones. A better design is what runs two availability zones with a single CDN provider. However, superior design is what runs two availability zones in a multi-CDN environment. - -### Edge applications will be the new norm - -It’s not that long ago that there was a transition from the heavy physical monolithic architecture to the agile cloud. But all that really happened was the transition from the physical appliance to a virtual cloud-based appliance. Maybe now is the time that we should ask, is this the future that we really want? - -One of the main issues in introducing edge applications is the mindset. It is challenging to convince yourself or your peers that the infrastructure you have spent all your time working on and investing in is not the best way forward for your business.  - -Although the cloud has created a big buzz, just because you migrate to the cloud does not mean that your applications will run faster. In fact, all you are really doing is abstracting the physical pieces of the architecture and paying someone else to manage it. The cloud has, however, opened the door for the edge application conversation. We have already taken the first step to the cloud and now it's time to make the second move. - -Basically, when you think about edge applications: its simplicity is a programmable CDN. A CDN is an edge application and an edge application is a superset of what your CDN is doing. Edge applications denote cloud computing at the edge. It is a paradigm to distribute the application closer to the source for lower latency, additional resilience, and simplified infrastructure, where you still have control and privacy. - -From an architectural point of view, an edge application provides more resilience than deploying centralized applications. In today's world of high expectations, resilience is a necessity for the continuity of business. Edge applications allow you to collapse the infrastructure into an architecture that is cheaper, simpler and more attentive to the application. The less in the expanse of infrastructure, the more time you can focus on what really matters to your business - the customer. - -### An example of an edge architecture - -An example of edge architecture is within each PoP, every application has its own isolated JavaScript (JS) environment. JavaScript is great for security isolation and the performance guarantees scale. The JavaScript is a dedicated isolated instance that executes the code at the edge. - -Most likely, each JavaScript has its own virtual machine (VM). The sole operation that the VM is performing is the JavaScript runtime engine and the only thing it is running is the customer's code. One could use Google V8 open-source high-performance JavaScript and WebAssembly engine. - -Let’s face it, if you continue building more PoPs, you will hit the law of diminishing returns. When it comes to application such as mobile, you really are maxed out when throwing PoPs to form a solution. So we need to find another solution. - -In the coming times, we are going to witness a trend where most applications will become global, which means edge applications. It certainly makes little sense to place all the application in one location when your users are everywhere else. - -**This article is published as part of the IDG Contributor Network. [Want to Join?][4]** - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3409027/how-edge-computing-is-driving-a-new-era-of-cdn.html - -作者:[Matt Conran][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://www.networkworld.com/author/Matt-Conran/ -[b]: https://github.com/lujun9972 -[1]: https://images.techhive.com/images/article/2017/02/network-traffic-100707086-large.jpg -[2]: https://network-insight.net/2016/12/buffers-packet-drops/ -[3]: https://www.networkworld.com/article/3014599/cloud-computing/how-notre-dame-is-going-all-in-with-amazon-s-cloud.html#tk.nww-fsb -[4]: https://www.networkworld.com/contributor-network/signup.html -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190717 Public internet should be all software-defined.md b/sources/talk/20190717 Public internet should be all software-defined.md deleted file mode 100644 index 3b834bea66..0000000000 --- a/sources/talk/20190717 Public internet should be all software-defined.md +++ /dev/null @@ -1,73 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Public internet should be all software-defined) -[#]: via: (https://www.networkworld.com/article/3409783/public-internet-should-be-all-software-defined.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -Public internet should be all software-defined -====== -Having a programmable public internet will correct inefficiencies in the current system, engineers at NOIA say. -![Thinkstock][1] - -The public internet should migrate to a programmable backbone-as-a-service architecture, says a team of network engineers behind NOIA, a startup promising to revolutionize global traffic. They say the internet will be more efficient if internet protocols and routing technologies are re-worked and then combined with a traffic-trading blockchain. - -It’s “impossible to use internet for modern applications,” the company says on its website. “Almost all global internet companies struggle to ensure uptime and reliable user experience.” - -That’s because modern techniques aren’t being introduced fully, NOIA says. The engineers say algorithms should be implemented to route traffic and that segment routing technology should be adopted. Plus, blockchain should be instigated to trade internet transit capacity. A “programmable internet solves the web’s inefficiencies,” a representative from NOIA told me. - -**[ Read also: [What is IPv6, and why aren’t we there yet?][2] ]** - -### Deprecate the public internet - -NOIA has started introducing a caching, distributed content delivery application to improve website loading times, but it wants to ultimately deprecate the existing internet completely. - -The company currently has 353 active cache nodes around the world, with a total 27 terabytes of storage for that caching system—NOIA clients contribute spare bandwidth and storage. It’s also testing a network backbone using four providers with European and American locations that it says will be the [development environment for its envisaged software-defined and radical internet replacement][3]. - -### The problem with today's internet - -The “internet is a mesh of tangled up cables,” [NOIA says][4]. “Thousands of physically connected networks” are involved. Any configuration alterations in any of the jumble of networks causes issues with the protocols, it explains. The company is referring to Border Gateway Protocol (BGP), which lets routers discover paths to IP addresses through the disparate network. Because BGP only forwards to a neighboring router, it doesn’t manage the entire route. That introduces “severe variability” or unreliability. - -“It is impossible to guarantee service reliability without using overlay networks. Low-latency, performance-critical applications, and games cannot operate on public Internet,” the company says. - -### How a software-defined internet works - -NOIA's idea is to use [IPv6][5], the latest internet protocol. IPv6 features an expanded packet size and allows custom headers. The company then adds segment routing to create Segment Routing over IPv6 (SRv6). That SRv6 combo adds routing information to each data packet sent—a packet-level programmable network, in other words. - -Segment routing, roughly, is an updated internet protocol that lets routers comprehend routing information in packet headers and then perform the routing. Cisco has been using it, too. - -NOIA’s network then adds the SRv6 amalgamation to distributed ledger technology (blockchain) in order to let ISPs and data centers buy and sell the routes—buyers can choose their routes in the exchange, too. - -In addition to trade, blockchain introduces security. It's worth noting that routings aren’t the only internet technologies that could be disrupted due to blockchain. In April I wrote about [organizations that propose moving data storage transactions over to distributed ledgers][6]. They say that will be more secure than anything seen before. [Ethernet’s lack of inherent security could be corrected by smart contract, trackable verifiable transactions][7], say some. And, of course, supply chain, the automotive vertical, and the selling of sensor data overall may emerge as [use-contenders for secure, blockchain in the internet of things][8]. - -In NOIA’s case, with SRv6 blended with distributed ledgers, the encrypted ledger holds the IP addresses, but it is architecturally decentralized—no one controls it. That’s one element of added security, along with the aforementioned trading, provided by the ledger. - -That trading could handle the question of who’s paying for all this. However, NOIA says current internet hardware will be able to understand the segment routings, so no new equipment investments are needed. - -Join the Network World communities on [Facebook][9] and [LinkedIn][10] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3409783/public-internet-should-be-all-software-defined.html - -作者:[Patrick Nelson][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://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2018/05/dns_browser_http_web_internet_thinkstock-100758191-large.jpg -[2]: https://www.networkworld.com/article/3254575/lan-wan/what-is-ipv6-and-why-aren-t-we-there-yet.html -[3]: https://medium.com/noia/development-update-06-20-07-04-2879f9fce3cb -[4]: https://noia.network/ -[5]: https://www.networkworld.com/article/3254575/what-is-ipv6-and-why-aren-t-we-there-yet.html -[6]: https://www.networkworld.com/article/3390722/how-data-storage-will-shift-to-blockchain.html -[7]: https://www.networkworld.com/article/3356496/how-blockchain-will-manage-networks.html -[8]: https://www.networkworld.com/article/3330937/how-blockchain-will-transform-the-iot.html -[9]: https://www.facebook.com/NetworkWorld/ -[10]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190718 Worst DNS attacks and how to mitigate them.md b/sources/talk/20190718 Worst DNS attacks and how to mitigate them.md deleted file mode 100644 index b490eeeea1..0000000000 --- a/sources/talk/20190718 Worst DNS attacks and how to mitigate them.md +++ /dev/null @@ -1,151 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Worst DNS attacks and how to mitigate them) -[#]: via: (https://www.networkworld.com/article/3409719/worst-dns-attacks-and-how-to-mitigate-them.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -Worst DNS attacks and how to mitigate them -====== -DNS threats, including DNS hijacking, tunneling, phishing, cache poisoning and DDoS attacks, are all on the rise. -![Max Bender \(CC0\)][1] - -The Domain Name System remains under constant attack, and there seems to be no end in sight as threats grow increasingly sophisticated. - -DNS, known as the internet’s phonebook, is part of the global internet infrastructure that translates between familiar names and the numbers computers need to access a website or send an email. While DNS has long been the target of assailants looking to steal all manner of corporate and private information, the threats in the [past year][2] or so indicate a worsening of the situation. - -**More about DNS:** - - * [DNS in the cloud: Why and why not][3] - * [DNS over HTTPS seeks to make internet use more private][4] - * [How to protect your infrastructure from DNS cache poisoning][5] - * [ICANN housecleaning revokes old DNS security key][6] - - - -IDC reports that 82% of companies worldwide have faced a DNS attack over the past year. The research firm recently published its fifth annual [Global DNS Threat Report][7], which is based on a survey IDC conducted on behalf of DNS security vendor EfficientIP of 904 organizations across the world during the first half of 2019. - -According to IDC's research, the average costs associated with a DNS attack rose by 49% compared to a year earlier. In the U.S., the average cost of a DNS attack tops out at more than $1.27 million. Almost half of respondents (48%) report losing more than $500,000 to a DNS attack, and nearly 10% say they lost more than $5 million on each breach. In addition, the majority of U.S. organizations say that it took more than one day to resolve a DNS attack. - -“Worryingly, both in-house and cloud applications were damaged, with growth of over 100% for in-house application downtime, making it now the most prevalent damage suffered,” IDC wrote. "DNS attacks are moving away from pure brute-force to more sophisticated attacks acting from the internal network. This will force organizations to use intelligent mitigation tools to cope with insider threats." - -### Sea Turtle DNS hijacking campaign - -An ongoing DNS hijacking campaign known as Sea Turtle is one example of what's occuring in today's DNS threat landscape. - -This month, [Cisco Talos][8] security researchers said the people behind the Sea Turtle campaign have been busy [revamping their attacks][9] with new infrastructure and going after new victims. - -**[ [Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][10] ]** - -In April, Talos released a [report detailing][11] Sea Turtle and calling it the “first known case of a domain name registry organization that was compromised for cyber espionage operations.” Talos says the ongoing DNS threat campaign is a state-sponsored attack that abuses DNS to harvest credentials to gain access to sensitive networks and systems in a way that victims are unable to detect, which displays unique knowledge on how to manipulate DNS. - -By obtaining control of victims’ DNS, the attackers can change or falsify any data on the Internet and illicitly modify DNS name records to point users to actor-controlled servers; users visiting those sites would never know, Talos reports.  - -The hackers behind Sea Turtle appear to have regrouped after the April report from Talos and are redoubling their efforts with new infrastructure – a move Talos researchers find to be unusual: “While many actors will slow down once they are discovered, this group appears to be unusually brazen, and will be unlikely to be deterred going forward,” Talos [wrote][9] in July. - -“Additionally, we discovered a new DNS hijacking technique that we assess with moderate confidence is connected to the actors behind Sea Turtle. This new technique is similar in that the threat actors compromise the name server records and respond to DNS requests with falsified A records,” Talos stated.  - -“This new technique has only been observed in a few highly targeted operations. We also identified a new wave of victims, including a country code top-level domain (ccTLD) registry, which manages the DNS records for every domain [that] uses that particular country code; that access was used to then compromise additional government entities. Unfortunately, unless there are significant changes made to better secure DNS, these sorts of attacks are going to remain prevalent,” Talos wrote. - -### DNSpionage attack upgrades its tools - -Another newer threat to DNS comes in the form of an attack campaign called [DNSpionage][12].  - -DNSpionage initially used two malicious websites containing job postings to compromise targets via crafted Microsoft Office documents with embedded macros. The malware supported HTTP and DNS communication with the attackers. And the attackers are continuing to develop new assault techniques. - -“The threat actor's ongoing development of DNSpionage malware shows that the attacker continues to find new ways to avoid detection. DNS tunneling is a popular method of exfiltration for some actors, and recent examples of DNSpionage show that we must ensure DNS is monitored as closely as an organization's normal proxy or weblogs,” [Talos wrote][13]. “DNS is essentially the phonebook of the internet, and when it is tampered with, it becomes difficult for anyone to discern whether what they are seeing online is legitimate.” - -The DNSpionage campaign targeted various businesses in the Middle East as well as United Arab Emirates government domains. - -“One of the biggest problems with DNS attacks or the lack of protection from them is complacency,” said Craig Williams, director of Talos outreach. Companies think DNS is stable and that they don’t need to worry about it. “But what we are seeing with attacks like DNSpionage and Sea Turtle are kind of the opposite, because attackers have figured out how to use it to their advantage – how to use it to do damage to credentials in a way, in the case of Sea Turtle, that the victim never even knows it happened. And that’s a real potential problem.” - -If you know, for example, your name server has been compromised, then you can force everyone to change their passwords. But if instead they go after the registrar and the registrar points to the bad guy’s name, you never knew it happened because nothing of yours was touched – that’s why these new threats are so nefarious, Williams said. - -“Once attackers start using it publicly, successfully, other bad guys are going to look at it and say, ‘Hey, why don't I use that to harvest a bunch of credentials from the sites I am interested in,’” Williams said. - -### **The DNS IoT risk** - -Another developing risk would be the proliferation of IoT devices.  The Internet Corporation for Assigned Names and Numbers (ICANN) recently wrote a [paper on the risk that IoT brings to DNS][14].  - -“The IoT is a risk to the DNS because various measurement studies suggest that IoT devices could stress the DNS infrastructure in ways that we have not seen before,” ICANN stated.   “For example, a software update for a popular IP-enabled IoT device that causes the device to use the DNS more frequently (e.g., regularly lookup random domain names to check for network availability) could stress the DNS in individual networks when millions of devices automatically install the update at the same time.” - -While this is a programming error from the perspective of individual devices, it could result in a significant attack vector from the perspective of DNS infrastructure operators. Incidents like this have already occurred on a small scale, but they may occur more frequently in the future due to the growth of heterogeneous IoT devices from manufacturers that equip their IoT devices with controllers that use the DNS, ICANN stated. - -ICANN also suggested that IoT botnets will represent an increased threat to DNS operators. “Larger DDoS attacks, partly because IoT bots are more difficult to eradicate. Current botnet sizes are on the order of hundreds of thousands. The most well-known example is the Mirai botnet, which involved 400K (steady-state) to 600K (peak) infected IoT devices.  The Hajime botnet hovers around 400K infected IoT devices, but has not launched any DDoS attacks yet. With the growth of the IoT, these attacks may grow to involve millions of bots and as a result larger DDoS attacks. - -### **DNS security warnings grow** - -The UK's [National Cyber Security Centre (NCSC)][15] issued a warning this month about ongoing DNS attacks, particularly focusing on DNS hijacking. It cited a number of risks associated with the uptick in DNS hijacking including: - -**Creating malicious DNS records.** A malicious DNS record could be used, for example, to create a phishing website that is present within an organization’s familiar domain. This may be used to phish employees or customers. - -**Obtaining SSL certificates.** Domain-validated SSL certificates are issued based on the creation of DNS records; thus an attacker may obtain valid SSL certificates for a domain name, which could be used to create a phishing website intended to look like an authentic website, for example. - -**Transparent proxying.** One serious risk employed recently involves transparently proxying traffic to intercept data. The attacker modifies an organization’s configured domain zone entries (such as “A” or “CNAME” records) to point traffic to their own IP address, which is infrastructure they manage. - -“An organization may lose total control of their domain and often the attackers will change the domain ownership details making it harder to recover,” the NCSC wrote. - -These new threats, as well as other dangers, led the U.S. government to issue a warning earlier this year about DNS attacks on federal agencies.  - -The Department of Homeland Security’s Cybersecurity and Infrastructure Security Agency (CISA) told all federal agencies to bolt down their DNS in the face of a series of global hacking campaigns. - -CISA said in its [Emergency Directive][16] that it was tracking a series of incidents targeting DNS infrastructure. CISA wrote that it “is aware of multiple executive branch agency domains that were impacted by the tampering campaign and has notified the agencies that maintain them.” - -CISA says that attackers have managed to intercept and redirect web and mail traffic and could target other networked services. The agency said the attacks start with compromising user credentials of an account that can make changes to DNS records.  Then the attacker alters DNS records, like Address, Mail Exchanger, or Name Server records, replacing the legitimate address of the services with an address the attacker controls. - -These actions let the attacker direct user traffic to their own infrastructure for manipulation or inspection before passing it on to the legitimate service, should they choose. This creates a risk that persists beyond the period of traffic redirection, CISA stated.  - -“Because the attacker can set DNS record values, they can also obtain valid encryption certificates for an organization’s domain names. This allows the redirected traffic to be decrypted, exposing any user-submitted data. Since the certificate is valid for the domain, end users receive no error warnings,” CISA stated. - -### **Get on the DNSSEC bandwagon** - -“Enterprises that are potential targets – in particular those that capture or expose user and enterprise data through their applications – should heed this advisory by the NSCS and should pressure their DNS and registrar vendors to make DNSSEC and other domain security best practices easy to implement and standardized,” said Kris Beevers, co-founder and CEO of DNS security vendor [NS1][17]. “They can easily implement DNSSEC signing and other domain security best practices with technologies in the market today. At the very least, they should work with their vendors and security teams to audit their implementations.” - -DNSSEC was in the news earlier this year when in response to increased DNS attacks, ICANN called for an intensified community effort to install stronger DNS security technology.  - -Specifically, ICANN wants full deployment of the Domain Name System Security Extensions ([DNSSEC][18]) across all unsecured domain names. DNSSEC adds a layer of security on top of DNS. Full deployment of DNSSEC ensures end users are connecting to the actual web site or other service corresponding to a particular domain name, ICANN said. “Although this will not solve all the security problems of the Internet, it does protect a critical piece of it – the directory lookup – complementing other technologies such as SSL (https:) that protect the ‘conversation’, and provide a platform for yet-to-be-developed security improvements,” ICANN stated. - -DNSSEC technologies have been around since about 2010 but are not widely deployed, with less than 20% of the world’s DNS registrars having deployed it, according to the regional internet address registry for the Asia-Pacific region ([APNIC][19]). - -DNSSEC adoption has been lagging because it was viewed as optional and can require a tradeoff between security and functionality, said NS1's Beevers. - -### **Traditional DNS threats** - -While DNS hijacking may be the front line attack method, other more traditional threats still exist.  - -The IDC/EfficientIP study found most popular DNS threats have changed compared with last year. Phishing (47%) is now more popular than last year’s favorite, DNS-based malware (39%), followed by DDoS attacks (30%), false positive triggering (26%), and lock-up domain attacks (26%). - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3409719/worst-dns-attacks-and-how-to-mitigate-them.html - -作者:[Michael Cooney][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://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2018/08/anonymous_faceless_hooded_mand_in_scary_halloween_mask_finger_to_lips_danger_threat_stealth_attack_hacker_hush_silence_warning_by_max_bender_cc0_via_unsplash_1200x800-100766358-large.jpg -[2]: https://www.fireeye.com/blog/threat-research/2019/01/global-dns-hijacking-campaign-dns-record-manipulation-at-scale.html -[3]: https://www.networkworld.com/article/3273891/hybrid-cloud/dns-in-the-cloud-why-and-why-not.html -[4]: https://www.networkworld.com/article/3322023/internet/dns-over-https-seeks-to-make-internet-use-more-private.html -[5]: https://www.networkworld.com/article/3298160/internet/how-to-protect-your-infrastructure-from-dns-cache-poisoning.html -[6]: https://www.networkworld.com/article/3331606/security/icann-housecleaning-revokes-old-dns-security-key.html -[7]: https://www.efficientip.com/resources/idc-dns-threat-report-2019/ -[8]: https://www.talosintelligence.com/ -[9]: https://blog.talosintelligence.com/2019/07/sea-turtle-keeps-on-swimming.html -[10]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr -[11]: https://blog.talosintelligence.com/2019/04/seaturtle.html -[12]: https://www.networkworld.com/article/3390666/cisco-dnspionage-attack-adds-new-tools-morphs-tactics.html -[13]: https://blog.talosintelligence.com/2019/04/dnspionage-brings-out-karkoff.html -[14]: https://www.icann.org/en/system/files/files/sac-105-en.pdf -[15]: https://www.ncsc.gov.uk/news/ongoing-dns-hijacking-and-mitigation-advice -[16]: https://cyber.dhs.gov/ed/19-01/ -[17]: https://ns1.com/ -[18]: https://www.icann.org/resources/pages/dnssec-qaa-2014-01-29-en -[19]: https://www.apnic.net/ diff --git a/sources/talk/20190724 Data centers may soon recycle heat into electricity.md b/sources/talk/20190724 Data centers may soon recycle heat into electricity.md deleted file mode 100644 index 92298e1a01..0000000000 --- a/sources/talk/20190724 Data centers may soon recycle heat into electricity.md +++ /dev/null @@ -1,67 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Data centers may soon recycle heat into electricity) -[#]: via: (https://www.networkworld.com/article/3410578/data-centers-may-soon-recycle-heat-into-electricity.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -Data centers may soon recycle heat into electricity -====== -Rice University researchers are developing a system that converts waste heat into light and then that light into electricity, which could help data centers reduce computing costs. -![Gordon Mah Ung / IDG][1] - -Waste heat is the scurge of computing. In fact, much of the cost of powering a computer is from creating unwanted heat. That’s because the inefficiencies in electronic circuits, caused by resistance in the materials, generates that heat. The processors, without computing anything, are essentially converting expensively produced electrical energy into waste energy. - -It’s a fundamental problem, and one that hasn’t been going away. But what if you could convert the unwanted heat back into electricity—recycle the heat back into its original energy form? The data center heat, instead of simply disgorging into the atmosphere to be gotten rid of with dubious eco-effects, could actually run more machines. Plus, your cooling costs would be taken care of—there’s nothing to cool because you’ve already grabbed the hot air. - -**[ Read also: [How server disaggregation can boost data center efficiency][2] | Get regularly scheduled insights: [Sign up for Network World newsletters][3] ]** - -Scientists at Rice Univeristy are trying to make that a reality by developing heat scavenging and conversion solutions. - -Currently, the most efficient way to convert heat into electricity is through the use of traditional turbines. - -Turbines “can give you nearly 50% conversion efficiency,” says Chloe Doiron, a graduate student at Rice University and co-lead on the project, in a [news article][4] on the school’s website. Turbines convert the kinetic energy of moving fluids, like steam or combustion gases, into mechanical energy. The moving steam then shifts blades mounted on a shaft, which turns a generator, thus creating the power. - -Not a bad solution. The problem, though, is “those systems are not easy to implement,” the researchers explain. The issue is that turbines are full of moving parts, and they’re big, noisy, and messy. - -### Thermal emitter better than turbines for converting heat to energy - -A better option would be a solid-state, thermal device that could absorb heat at the source and simply convert it, perhaps straight into attached batteries. - -The researchers say a thermal emitter could absorb heat, jam it into tight, easy-to-capture bandwidth and then emit it as light. Cunningly, they would then simply turn the light into electricity, as we see all the time now in solar systems. - -“Thermal photons are just photons emitted from a hot body,” says Rice University professor Junichiro Kono in the article. “If you look at something hot with an infrared camera, you see it glow. The camera is capturing these thermally excited photons.” Indeed, all heated surfaces, to some extent, send out light as thermal radiation. - -The Rice team wants to use a film of aligned carbon nanotubes to do the job. The test system will be structured as an actual solar panel. That’s because solar panels, too, lose energy through heat, so are a good environment in which to work. The concept applies to other inefficient technologies, too. “Anything else that loses energy through heat [would become] far more efficient,” the researchers say. - -Around 20% of industrial energy consumption is unwanted heat, Doiron says. That's a lot of wasted energy. - -### Other heat conversion solutions - -Other heat scavenging devices are making inroads, too. Now-commercially available thermoelectric technology can convert a temperature difference into power, also with no moving parts. They function by exposing a specially made material to heat. [Electrons flow when one part is cold and one is hot][5]. And the University of Utah is working on [silicon for chips that generates electricity][6] as one of two wafers heat up. - -Join the Network World communities on [Facebook][7] and [LinkedIn][8] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3410578/data-centers-may-soon-recycle-heat-into-electricity.html - -作者:[Patrick Nelson][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://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/07/flir_20190711t191326-100801627-large.jpg -[2]: https://www.networkworld.com/article/3266624/how-server-disaggregation-could-make-cloud-datacenters-more-efficient.html -[3]: https://www.networkworld.com/newsletters/signup.html -[4]: https://news.rice.edu/2019/07/12/rice-device-channels-heat-into-light/ -[5]: https://www.networkworld.com/article/2861438/how-to-convert-waste-data-center-heat-into-electricity.html -[6]: https://unews.utah.edu/beat-the-heat/ -[7]: https://www.facebook.com/NetworkWorld/ -[8]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190724 Reports- As the IoT grows, so do its threats to DNS.md b/sources/talk/20190724 Reports- As the IoT grows, so do its threats to DNS.md deleted file mode 100644 index d9647304b9..0000000000 --- a/sources/talk/20190724 Reports- As the IoT grows, so do its threats to DNS.md +++ /dev/null @@ -1,78 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Reports: As the IoT grows, so do its threats to DNS) -[#]: via: (https://www.networkworld.com/article/3411437/reports-as-the-iot-grows-so-do-its-threats-to-dns.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -Reports: As the IoT grows, so do its threats to DNS -====== -ICANN and IBM's security researchers separately spell out how the growth of the internet of things will increase opportunities for malicious actors to attack the Domain Name System with hyperscale botnets and worm their malware into the cloud. -The internet of things is shaping up to be a more significant threat to the Domain Name System through larger IoT botnets, unintentional adverse effects of IoT-software updates and the continuing development of bot-herding software. - -The Internet Corporation for Assigned Names and Numbers (ICANN) and IBM’s X-Force security researchers have recently issued reports outlining the interplay between DNS and IoT that includes warnings about the pressure IoT botnets will put on the availability of DNS systems. - -**More about DNS:** - - * [DNS in the cloud: Why and why not][1] - * [DNS over HTTPS seeks to make internet use more private][2] - * [How to protect your infrastructure from DNS cache poisoning][3] - * [ICANN housecleaning revokes old DNS security key][4] - - - -ICANN’s Security and Stability Advisory Committee (SSAC) wrote in a [report][5] that “a significant number of IoT devices will likely be IP enabled and will use the DNS to locate the remote services they require to perform their functions. As a result, the DNS will continue to play the same crucial role for the IoT that it has for traditional applications that enable human users to interact with services and content,” ICANN stated. “The  role of  the  DNS  might  become  even  more  crucial  from  a  security  and  stability perspective with IoT devices interacting with people’s physical environment.” - -IoT represents both an opportunity and a risk to the DNS, ICANN stated. “It is an opportunity because the DNS provides functions and data that can help make the IoT more secure, stable, and transparent, which is critical given the IoT's interaction with the physical world. It is a risk because various measurement studies suggest that IoT devices may stress the DNS, for instance, because of complex DDoS attacks carried out by botnets that grow to hundreds of thousands or in the future millions of infected IoT devices within hours,” ICANN stated. - -Unintentional DDoS attacks - -One risk is that the IoT could place new burdens on the DNS. “For example, a software update for a popular IP-enabled IoT device that causes the device to use the DNS more frequently (e.g., regularly lookup random domain names to check for network availability) could stress the DNS in individual networks when millions of devices automatically install the update at the same time,” ICANN stated. - -While this is a programming error from the perspective of individual devices, it could result in a significant attack vector from the perspective of DNS infrastructure operators. Incidents like this have already occurred on a small scale, but they may occur more frequently in the future due to the growth of heterogeneous IoT devices from manufacturers that equip their IoT devices with controllers that use the DNS, ICANN stated. - -Massively larger botnets, threat to clouds - -The report also suggested that the scale of IoT botnets could grow from hundreds of thousands of devices to millions. The best known IoT botnet is Mirai, responsible for DDoS attacks involving 400,000 to 600,000 devices. The Hajime botnet hovers around 400K infected IoT devices but has not launched any DDoS attacks yet. But as the IoT grows, so will the botnets and as a result larger DDoS attacks. - -Cloud-connected IoT devices could endanger cloud resources. “IoT devices connected to cloud architecture could allow Mirai adversaries to gain access to cloud servers. They could infect a server with additional malware dropped by Mirai or expose all IoT devices connected to the server to further compromise,” wrote Charles DeBeck,  a senior cyber threat intelligence strategic analyst with [IBM X-Force Incident Response][6] in a recent report.  - - “As organizations increasingly adopt cloud architecture to scale efficiency and productivity, disruption to a cloud environment could be catastrophic.” - -For enterprises that are rapidly adopting both IoT technology and cloud architecture, insufficient security controls could expose the organization to elevated risk, calling for the security committee to conduct an up-to-date risk assessment, DeBeck stated. - -Attackers continue malware development - -“Since this activity is highly automated, there remains a strong possibility of large-scale infection of IoT devices in the future,” DeBeck stated. “Additionally, threat actors are continuing to expand their targets to include new types of IoT devices and may start looking at industrial IoT devices or connected wearables to increase their footprint and profits.” - -Botnet bad guys are also developing new Mirai variants and IoT botnet malware outside of the Mirai family to target IoT devices, DeBeck stated. - -To continue reading this article register now - -[Get Free Access][7] - -[Learn More][8]   Existing Users [Sign In][7] - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3411437/reports-as-the-iot-grows-so-do-its-threats-to-dns.html - -作者:[Michael Cooney][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://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3273891/hybrid-cloud/dns-in-the-cloud-why-and-why-not.html -[2]: https://www.networkworld.com/article/3322023/internet/dns-over-https-seeks-to-make-internet-use-more-private.html -[3]: https://www.networkworld.com/article/3298160/internet/how-to-protect-your-infrastructure-from-dns-cache-poisoning.html -[4]: https://www.networkworld.com/article/3331606/security/icann-housecleaning-revokes-old-dns-security-key.html -[5]: https://www.icann.org/en/system/files/files/sac-105-en.pdf -[6]: https://securityintelligence.com/posts/i-cant-believe-mirais-tracking-the-infamous-iot-malware-2/?cm_mmc=OSocial_Twitter-_-Security_Security+Brand+and+Outcomes-_-WW_WW-_-SI+TW+blog&cm_mmca1=000034XK&cm_mmca2=10009814&linkId=70790642 -[7]: javascript:// -[8]: https://www.networkworld.com/learn-about-insider/ diff --git a/sources/talk/20190724 When it comes to the IoT, Wi-Fi has the best security.md b/sources/talk/20190724 When it comes to the IoT, Wi-Fi has the best security.md deleted file mode 100644 index 2b5014dfa8..0000000000 --- a/sources/talk/20190724 When it comes to the IoT, Wi-Fi has the best security.md +++ /dev/null @@ -1,88 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (When it comes to the IoT, Wi-Fi has the best security) -[#]: via: (https://www.networkworld.com/article/3410563/when-it-comes-to-the-iot-wi-fi-has-the-best-security.html) -[#]: author: (Fredric Paul https://www.networkworld.com/author/Fredric-Paul/) - -When it comes to the IoT, Wi-Fi has the best security -====== -It’s easy to dismiss good ol’ Wi-Fi’s role in internet of things networking. But Wi-Fi has more security advantages than other IoT networking choices. -![Ralph Gaithe / Soifer / Getty Images][1] - -When it comes to connecting internet of things (IoT) devices, there is a wide variety of networks to choose from, each with its own set of capabilities, advantages and disadvantages, and ideal use cases. Good ol’ Wi-Fi is often seen as a default networking choice, available in many places, but of limited range and not particularly suited for IoT implementations. - -According to [Aerohive Networks][2], however, Wi-Fi is “evolving to help IT address security complexities and challenges associated with IoT devices.” Aerohive sells cloud-managed networking solutions and was [acquired recently by software-defined networking company Extreme Networks for some $272 million][3]. And Aerohive's director of product marketing, Mathew Edwards, told me via email that Wi-Fi brings a number of security advantages compared to other IoT networking choices. - -It’s not a trivial problem. According to Gartner, in just the last three years, [approximately one in five organizations have been subject to an IoT-based attack][4]. And as more and more IoT devices come on line, the attack surface continues to grow quickly. - -**[ Also read: [Extreme targets cloud services, SD-WAN, Wi-Fi 6 with $210M Aerohive grab][3] and [Smart cities offer window into the evolution of enterprise IoT technology][5] ]** - -### What makes Wi-Fi more secure for IoT? - -What exactly are Wi-Fi’s IoT security benefits? Some of it is simply 20 years of technological maturity, Edwards said. - -“Extending beyond the physical boundaries of organizations, Wi-Fi has always had to be on the front foot when it comes to securely onboarding and monitoring a range of corporate, guest, and BYOD devices, and is now prepared with the next round of connectivity complexities with IoT,” he said. - -Specifically, Edwards said, “Wi-Fi has evolved … to increase the visibility, security, and troubleshooting of edge devices by combining edge security with centralized cloud intelligence.” - -Just as important, though, new Wi-Fi capabilities from a variety of vendors are designed to help identify and isolate IoT devices to integrate them into the wider network while limiting the potential risks. The goal is to incorporate IoT device awareness and protection mechanisms to prevent breaches and attacks through vulnerable headless devices. Edwards cited Aerohive’s work to “securely onboard IoT devices with its PPSK (private pre-shared key) technology, an authentication and encryption method providing 802.1X-equivalent role-based access, without the equivalent management complexities.” - -**[ [Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][6] ]** - -### The IoT is already here—and so is Wi-Fi - -Unfortunately, enterprise IoT security is not always a carefully planned and monitored operation. - -“Much like BYOD,” Edwards said, “many organizations are dealing with IoT without them even knowing it.” On the plus side, even as “IoT devices have infiltrated many networks , ... administrators are already leveraging some of the tools to protect against IoT threats without them even realizing it.” - -He noted that customers who have already deployed PPSK to secure guest and BYOD networks can easily extend those capabilities to cover IoT devices such as “smart TVs, projectors, printers, security systems, sensors and more.” - -In addition, Edwards said, “vendors have introduced methods to assign performance and security limits through context-based profiling, which is easily extended to IoT devices once the vendor can utilize signatures to identify an IoT device.” - -Once an IoT device is identified and tagged, Wi-Fi networks can assign it to a particular VLAN, set minimum and maximum data rates, data limits, application access, firewall rules, and other protections. That way, Edwards said, “if the device is lost, stolen, or launches a DDoS attack, the Wi-Fi network can kick it off, restrict it, or quarantine it.” - -### Wi-Fi still isn’t for every IoT deployment - -All that hardly turns Wi-Fi into the perfect IoT network. Relatively high costs and limited range mean it won’t find a place in many large-scale IoT implementations. But Edwards says Wi-Fi’s mature identification and control systems can help enterprises incorporate new IoT-based systems and sensors into their networks with more confidence. - -**More about 802.11ax (Wi-Fi 6)** - - * [Why 802.11ax is the next big thing in wireless][7] - * [FAQ: 802.11ax Wi-Fi][8] - * [Wi-Fi 6 (802.11ax) is coming to a router near you][9] - * [Wi-Fi 6 with OFDMA opens a world of new wireless possibilities][10] - * [802.11ax preview: Access points and routers that support Wi-Fi 6 are on tap][11] - - - -Join the Network World communities on [Facebook][12] and [LinkedIn][13] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3410563/when-it-comes-to-the-iot-wi-fi-has-the-best-security.html - -作者:[Fredric Paul][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://www.networkworld.com/author/Fredric-Paul/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/03/hack-your-own-wi-fi_neon-wi-fi_keyboard_hacker-100791531-large.jpg -[2]: http://www.aerohive.com/ -[3]: https://www.networkworld.com/article/3405440/extreme-targets-cloud-services-sd-wan-wifi-6-with-210m-aerohive-grab.html -[4]: https://www.gartner.com/en/newsroom/press-releases/2018-03-21-gartner-says-worldwide-iot-security-spending-will-reach-1-point-5-billion-in-2018. -[5]: https://www.networkworld.com/article/3409787/smart-cities-offer-window-into-the-evolution-of-enterprise-iot-technology.html -[6]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr -[7]: https://www.networkworld.com/article/3215907/mobile-wireless/why-80211ax-is-the-next-big-thing-in-wi-fi.html -[8]: https://%20https//www.networkworld.com/article/3048196/mobile-wireless/faq-802-11ax-wi-fi.html -[9]: https://www.networkworld.com/article/3311921/mobile-wireless/wi-fi-6-is-coming-to-a-router-near-you.html -[10]: https://www.networkworld.com/article/3332018/wi-fi/wi-fi-6-with-ofdma-opens-a-world-of-new-wireless-possibilities.html -[11]: https://www.networkworld.com/article/3309439/mobile-wireless/80211ax-preview-access-points-and-routers-that-support-the-wi-fi-6-protocol-on-tap.html -[12]: https://www.facebook.com/NetworkWorld/ -[13]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190725 IoT-s role in expanding drone use.md b/sources/talk/20190725 IoT-s role in expanding drone use.md deleted file mode 100644 index a9281dcf40..0000000000 --- a/sources/talk/20190725 IoT-s role in expanding drone use.md +++ /dev/null @@ -1,61 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (IoT’s role in expanding drone use) -[#]: via: (https://www.networkworld.com/article/3410564/iots-role-in-expanding-drone-use.html) -[#]: author: (Fredric Paul https://www.networkworld.com/author/Fredric-Paul/) - -IoT’s role in expanding drone use -====== -Collision avoidance technology that uses internet of things (IoT) connectivity, AI, machine learning, and computer vision could be the key to expanding drone applications. -![Thinkstock][1] - -As faithful readers of [TechWatch][2] (love you, Mom) may know, the rollout of many companies’ ambitious drone delivery services has not gone as quickly as promised. Despite recent signs of progress in Australia and the United States—not to mention [clever ideas for burger deliveries to cars stuck in traffic][3]—drone delivery remains a long way from becoming a viable option in the vast majority of use cases. And the problem affects many areas of drone usage, not just the heavily hyped drone delivery applications. - -According to [Grace McKenzie][4], director of operations and controller at [Iris Automation][5], one key restriction to economically viable drone deliveries is that the “skies are not safe enough for many drone use cases.” - -Speaking at a recent [SF New Tech “Internet of Everything” event in San Francisco][6], McKenzie said fear of collisions with manned aircraft is the big reason why the Federal Aviation Association (FAA) and international regulators typically prohibit drones from flying beyond the line of the sight of the remote pilot. Obviously, she added, that restriction greatly constrains where and how drones can make deliveries and is working to keep the market from growing test and pilot programs into full-scale commercial adoption. - -**[ Read also: [No, drone delivery still isn’t ready for prime time][7] | Get regularly scheduled insights: [Sign up for Network World newsletters][8] ]** - -### Detect and avoid technology is critical - -Iris Automation, not surprisingly, is in the business of creating workable collision avoidance systems for drones in an attempt to solve this issue. Variously called “detect and avoid” or “sense and avoid” technologies, these automated solutions are required for “beyond visual line of sight” (BVLOS) drone operations. There are multiple issues in play. - -As explained on Iris’ website, “Drone pilots are skilled aviators, but even they struggle to see and avoid obstacles and aircraft when operating drones at extended range [and] no pilot on board means low situational awareness. This risk is huge, and the potential conflicts can be extremely dangerous.” - -As “a software company with a hardware problem,” McKenzie said, Iris’ systems use artificial intelligence (AI), machine learning, computer vision, and IoT connectivity to identify and focus on the “small group of pixels that could be a risk.” Working together, those technologies are creating an “exponential curve” in detect-and-avoid technology improvements, she added. The result? Drones that “see better than a human pilot,” she claimed. - -### Bigger market and new use cases for drones - -It’s hardly an academic issue. “Not being able to show adequate mitigation of operational risk means regulators are forced to limit drone uses and applications to closed environments,” the company says. - -Solving this problem would open up a wide range of industrial and commercial applications for drones. Far beyond delivering burritos, McKenzie said that with confidence in drone “sense and avoid” capabilities, drones could be used for all kinds of aerial data gathering, from inspecting hydro-electric dams, power lines, and railways to surveying crops to fighting forest fires and conducting search-and-rescue operations. - -Join the Network World communities on [Facebook][9] and [LinkedIn][10] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3410564/iots-role-in-expanding-drone-use.html - -作者:[Fredric Paul][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://www.networkworld.com/author/Fredric-Paul/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2018/01/drone_delivery_package_future-100745961-large.jpg -[2]: https://www.networkworld.com/blog/techwatch/ -[3]: https://www.networkworld.com/article/3396188/the-traffic-jam-whopper-project-may-be-the-coolestdumbest-iot-idea-ever.html -[4]: https://www.linkedin.com/in/withgracetoo/ -[5]: https://www.irisonboard.com/ -[6]: https://sfnewtech.com/event/iot/ -[7]: https://www.networkworld.com/article/3390677/drone-delivery-not-ready-for-prime-time.html -[8]: https://www.networkworld.com/newsletters/signup.html -[9]: https://www.facebook.com/NetworkWorld/ -[10]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190725 Report- Smart-city IoT isn-t smart enough yet.md b/sources/talk/20190725 Report- Smart-city IoT isn-t smart enough yet.md deleted file mode 100644 index da6d4ee57a..0000000000 --- a/sources/talk/20190725 Report- Smart-city IoT isn-t smart enough yet.md +++ /dev/null @@ -1,73 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Report: Smart-city IoT isn’t smart enough yet) -[#]: via: (https://www.networkworld.com/article/3411561/report-smart-city-iot-isnt-smart-enough-yet.html) -[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) - -Report: Smart-city IoT isn’t smart enough yet -====== -A report from Forrester Research details vulnerabilities affecting smart-city internet of things (IoT) infrastructure and offers some methods of mitigation. -![Aleksandr Durnov / Getty Images][1] - -Security arrangements for smart-city IoT technology around the world are in an alarming state of disrepair, according to a report from Forrester Research that argues serious changes are needed in order to avoid widespread compromises. - -Much of what’s wrong has to do with a lack of understanding on the part of the people in charge of those systems and a failure to follow well-known security best practices, like centralized management, network visibility and limiting attack-surfaces. - -**More on IoT:** - - * [What is the IoT? How the internet of things works][2] - * [What is edge computing and how it’s changing the network][3] - * [Most powerful Internet of Things companies][4] - * [10 Hot IoT startups to watch][5] - * [The 6 ways to make money in IoT][6] - * [What is digital twin technology? [and why it matters]][7] - * [Blockchain, service-centric networking key to IoT success][8] - * [Getting grounded in IoT networking and security][9] - * [Building IoT-ready networks must become a priority][10] - * [What is the Industrial IoT? [And why the stakes are so high]][11] - - - -Those all pose stiff challenges, according to “Making Smart Cities Safe And Secure,” the Forrester report by Merritt Maxim and Salvatore Schiano. The attack surface for a smart city is, by default, enormous, given the volume of Internet-connected hardware involved. Some device, somewhere, is likely to be vulnerable, and with the devices geographically spread out it’s difficult to secure all types of access to them. - -Worse still, some legacy systems can be downright impossible to manage and update in a safe way. Older technology often contains no provision for live updates, and its vulnerabilities can be severe, according to the report. Physical access to some types of devices also remains a serious challenge. The report gives the example of wastewater treatment plants in remote locations in Australia, which were sabotaged by a contractor who accessed the SCADA systems directly. - -In addition to the risk of compromised control systems, the generalized insecurity of smart city IoT makes the vast amounts of data that it generates highly suspect. Improperly configured devices could collect more information than they’re supposed to, including personally identifiable information, which could violate privacy regulations. Also, the data collected is analyzed to glean useful information about such things as parking patterns, water flow and electricity use, and inaccurate or compromised information can badly undercut the value of smart city technology to a given user. - -“Security teams are just gaining maturity in the IT environment with the necessity for data inventory, classification, and flow mapping, together with thorough risk and privacy impact assessments, to drive appropriate protection,” the report says. “In OT environments, they’re even further behind.” - -Yet, despite the fact that IoT planning and implementation doubled between 2017 and 2018, according to Forrester’s data, comparatively little work has been done on the security front. The report lists 13 cyberattacks on smart-city technology between 2014 and 2019 that had serious consequences, including widespread electricity outages, ransomware infections on hospital computers and emergency-service interruptions. - -Still, there are ways forward, according to Forrester. Careful log monitoring can keep administrators abreast of what’s normal and what’s suspicious on their networks. Asset mapping and centralizing control-plane functionality should make it much more difficult for bad actors to insert malicious devices into a smart-city network or take control of less-secure items. And intelligent alerting – the kind that provides contextual information, differentiating between “this system just got rained on and has poor connectivity” and “someone is tampering with this system” – should help cities be more responsive to security threats when they arise. - -Join the Network World communities on [Facebook][12] and [LinkedIn][13] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3411561/report-smart-city-iot-isnt-smart-enough-yet.html - -作者:[Jon Gold][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://www.networkworld.com/author/Jon-Gold/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/02/smart_city_smart_cities_iot_internet_of_things_by_aleksandr_durnov_gettyimages-971455374_2400x1600-100788363-large.jpg -[2]: https://www.networkworld.com/article/3207535/internet-of-things/what-is-the-iot-how-the-internet-of-things-works.html -[3]: https://www.networkworld.com/article/3224893/internet-of-things/what-is-edge-computing-and-how-it-s-changing-the-network.html -[4]: https://www.networkworld.com/article/2287045/internet-of-things/wireless-153629-10-most-powerful-internet-of-things-companies.html -[5]: https://www.networkworld.com/article/3270961/internet-of-things/10-hot-iot-startups-to-watch.html -[6]: https://www.networkworld.com/article/3279346/internet-of-things/the-6-ways-to-make-money-in-iot.html -[7]: https://www.networkworld.com/article/3280225/internet-of-things/what-is-digital-twin-technology-and-why-it-matters.html -[8]: https://www.networkworld.com/article/3276313/internet-of-things/blockchain-service-centric-networking-key-to-iot-success.html -[9]: https://www.networkworld.com/article/3269736/internet-of-things/getting-grounded-in-iot-networking-and-security.html -[10]: https://www.networkworld.com/article/3276304/internet-of-things/building-iot-ready-networks-must-become-a-priority.html -[11]: https://www.networkworld.com/article/3243928/internet-of-things/what-is-the-industrial-iot-and-why-the-stakes-are-so-high.html -[12]: https://www.facebook.com/NetworkWorld/ -[13]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190725 Storage management a weak area for most enterprises.md b/sources/talk/20190725 Storage management a weak area for most enterprises.md deleted file mode 100644 index 859c1caa32..0000000000 --- a/sources/talk/20190725 Storage management a weak area for most enterprises.md +++ /dev/null @@ -1,82 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Storage management a weak area for most enterprises) -[#]: via: (https://www.networkworld.com/article/3411400/storage-management-a-weak-area-for-most-enterprises.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Storage management a weak area for most enterprises -====== -Survey finds companies are adopting technology for such things as AI, machine learning, edge computing and IoT, but still use legacy storage that can't handle those workloads. -![Miakievy / Getty Images][1] - -Stop me if you’ve heard this before: Companies are racing to a new technological paradigm but are using yesterday’s tech to do it. - -I know. Shocking. - -A survey of more than 300 storage professionals by storage vendor NGD Systems found only 11% of the companies they talked to would give themselves an “A” grade for their compute and storage capabilities. - -Why? The chief reason given is that while enterprises are rapidly deploying technologies for edge networks, real-time analytics, machine learning, and internet of things (IoT) projects, they are still using legacy storage solutions that are not designed for such data-intensive workloads. More than half — 54% — said their processing of edge applications is a bottleneck, and they want faster and more intelligent storage solutions. - -**[ Read also: [What is NVMe, and how is it changing enterprise storage][2] ]** - -### NVMe SSD use increases, but doesn't solve all needs - -It’s not all bad news. The study, entitled ["The State of Storage and Edge Computing"][3] and conducted by Dimensional Research, found 60% of storage professionals are using NVMe SSDs to speed up the processing of large data sets being generated at the edge. - -However, this has not solved their needs. As artificial intelligence (AI) and other data-intensive deployments increase, data needs to be moved over increasingly longer distances, which causes network bottlenecks and delays analytic results. And edge computing systems tend to have a smaller footprint than a traditional data center, so they are performance constrained. - -The solution is to process the data where it is ingested, in this case, the edge device. Separate the wheat from the chafe and only send relevant data upstream to a data center to be processed. This is called computational storage, processing data where it is stored rather than moving it around. - -According to the survey, 89% of respondents said they expect real value from computational storage. Conveniently, NGD is a vendor of computational storage systems. So, yes, this is a self-serving finding. This happens a lot. That doesn’t mean they don’t have a valid point, though. Processing the data where it lies is the point of edge computing. - -Among the survey’s findings: - - * 55% use edge computing - * 71% use edge computing for real-time analytics - * 61% said the cost of traditional storage solutions continues to plague their applications - * 57% said faster access to storage would improve their compute abilities - - - -The study also found that [NVMe][2] is being adopted very quickly but is being hampered by price. - - * 86% expect storage’s future to rely on NVMe SSDs - * 60% use NVMe SSDs in their work environments - * 63% said NVMe SSDs helped with superior storage speed - * 67% reported budget and cost as issues preventing the use of NVMe SSDs - - - -That last finding is why so many enterprises are hampered in their work. For whatever reason they are using old storage systems rather than new NVMe systems, and it hurts them. - -### GPUs won't improve workload performance - -One interesting finding: 70% of respondents said they are using GPUs to help improve workload performance, but NGD said those are no good. - -“We were not surprised to find that while more than half of respondents are actively using edge computing, more than 70% are using legacy GPUs, which will not reduce the network bandwidth, power and footprint necessary to analyze mass data-sets in real time,” said Nader Salessi, CEO and founder of NGD Systems, in a statement. - -That’s because GPUs lend themselves well to repetitive tasks and parallel processing jobs, while computational storage is very much a serial processing job, with the task constantly changing. So while some processing jobs will benefit from a GPU, a good number will not and the GPU is essentially wasted. - -Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3411400/storage-management-a-weak-area-for-most-enterprises.html - -作者:[Andy Patrizio][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://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/02/edge_computing_by_miakievy_gettyimages-957694592_2400x1600-100788315-large.jpg -[2]: https://www.networkworld.com/article/3280991/what-is-nvme-and-how-is-it-changing-enterprise-storage.html -[3]: https://ngd.dnastaging.net/brief/NGD_Systems_Storage_Edge_Computing_Survey_Report -[4]: https://www.facebook.com/NetworkWorld/ -[5]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190726 NVMe over Fabrics enterprise storage spec enters final review process.md b/sources/talk/20190726 NVMe over Fabrics enterprise storage spec enters final review process.md deleted file mode 100644 index f14dcd7d67..0000000000 --- a/sources/talk/20190726 NVMe over Fabrics enterprise storage spec enters final review process.md +++ /dev/null @@ -1,71 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (NVMe over Fabrics enterprise storage spec enters final review process) -[#]: via: (https://www.networkworld.com/article/3411958/nvme-over-fabrics-enterprise-storage-spec-enters-final-review-process.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -NVMe over Fabrics enterprise storage spec enters final review process -====== -The NVMe over Fabric (NVMe-oF) architecture is closer to becoming a formal specification. It's expected improve storage network fabric communications and network performance. -![Gremlin / Getty Images][1] - -NVM Express Inc., the developer of the [NVMe][2] spec for enterprise SSDs, announced that its NVMe-oF architecture has entered a final 45-day review, an important step toward release of a formal specification for enterprise SSD makers. - -NVMe-oF stands for [NVMe over Fabrics][3], a mechanism to transfer data between a host computer and a target SSD or system over a network, such as Ethernet, Fibre Channel (FC), or InfiniBand. NVM Express first released the 1.0 spec of NVMe-oF in 2016, so this is long overdue. - -**[ Read also: [NVMe over Fabrics creates data-center storage disruption][3] ]** - -NVMe has become an important advance in enterprise storage because it allows for intra-network data sharing. Before, when PCI Express-based SSDs first started being used in servers, they could not easily share data with another physical server. The SSD was basically for the machine it was in, and moving data around was difficult. - -With NVMe over Fabrics, it’s possible for one machine to directly reach out to another for data and have it transmitted over a variety of high-speed fabrics rather than just Ethernet. - -### How NVMe-oF 1.1 improves storage network fabric communication - -The NVMe-oF 1.1 architecture is designed to improve storage network fabric communications in several ways: - - * Adds TCP transport supports NVMe-oF on current data center TCP/IP network infrastructure. - * Asynchronous discovery events inform hosts of addition or removal of target ports in a fabric-independent manner. - * Fabric I/O Queue Disconnect enables finer-grain I/O resource management. - * End-to-end (command to response) flow control improves concurrency. - - - -### New enterprise features for NVMe 1.4 - -The organization also announced the release of the NVMe 1.4 base specification with new “enterprise features” described as a further maturation of the protocol. The specification provides important benefits, such as improved quality of service (QoS), faster performance, improvements for high-availability deployments, and scalability optimizations for data centers. - -Among the new features: - - * Rebuild Assist simplifies data recovery and migration scenarios. - * Persistent Event Log enables robust drive history for issue triage and debug at scale. - * NVM Sets and IO Determinism allow for better performance, isolation, and QoS. - * Multipathing enhancements or Asymmetric Namespace Access (ANA) enable optimal and redundant paths to namespaces for high availability and full multi-controller scalability. - * Host Memory Buffer feature reduces latency and SSD design complexity, benefiting client SSDs. - - - -The upgraded NVMe 1.4 base specification and the pending over-fabric spec will be demonstrated at the Flash Memory Summit August 6-8, 2019 in Santa Clara, California. - -Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3411958/nvme-over-fabrics-enterprise-storage-spec-enters-final-review-process.html - -作者:[Andy Patrizio][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://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://images.idgesg.net/images/article/2019/02/big_data_storage_businessman_walks_through_futuristic_data_center_by_gremlin_gettyimages-1098116540_2400x1600-100788347-large.jpg -[2]: https://www.networkworld.com/article/3280991/what-is-nvme-and-how-is-it-changing-enterprise-storage.html -[3]: https://www.networkworld.com/article/3394296/nvme-over-fabrics-creates-data-center-storage-disruption.html -[4]: https://www.facebook.com/NetworkWorld/ -[5]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20190729 Do you prefer a live demo to be perfect or broken.md b/sources/talk/20190729 Do you prefer a live demo to be perfect or broken.md deleted file mode 100644 index b4b76aadd6..0000000000 --- a/sources/talk/20190729 Do you prefer a live demo to be perfect or broken.md +++ /dev/null @@ -1,82 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Do you prefer a live demo to be perfect or broken?) -[#]: via: (https://opensource.com/article/19/7/live-demo-perfect-or-broken) -[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeohttps://opensource.com/users/don-watkinshttps://opensource.com/users/jamesf) - -Do you prefer a live demo to be perfect or broken? -====== -Do you learn more from flawless demos or ones the presenter de-bugs in -real-time? Let us know by answering our poll. -![video editing dashboard][1] - -At [DevFest DC][2] in June, [Sara Robinson][3], developer advocate at Google Cloud, gave the most seamless live demo I've ever witnessed. - -Sara live-coded a machine model from scratch using TensorFlow and Keras. Then she trained the model live, deployed it to Google's Cloud AI platform, and used the deployed model to make predictions. - -With the exception of perhaps one small hiccup, the whole thing went smoothly, and I learned a lot as an audience member. - -At that evening's reception, I congratulated Sara on the live demo's success and told her I've never seen a live demo go so well. It turns out that this subject was already on her mind; Sara asked this question on Twitter less than two hours before her live demo: - -> Do you prefer watching a live demo where everything works perfectly or one that breaks and the presenter has to de-bug? -> -> — Sara Robinson (@SRobTweets) [June 14, 2019][4] - -Contrary to my preference for flawless demos, two-thirds of Sara's followers prefer to watch de-bugging. The replies to her poll were equally enlightening: - -> I prefer ones that break once or twice, just so you know it's real. "Break" can be something small like a typo or skipping a step. -> -> — Seth Vargo (@sethvargo) [June 14, 2019][5] - -> Broken demos which are fixed in real time seem to get a better reaction from the audience. This was our experience with the All-Demo Super Session at NEXT SF. Audible gasps followed by applause from the audience when the broken demo was fixed in real-time 🤓 -> -> — Jamie Kinney (@jamiekinney) [June 14, 2019][6] - -This made me reconsider my preference for perfection. When I attend live demos at events, I'm looking for tools that I'm unfamiliar with. I want to learn the basics of those tools, then see real-world applications. I don't expect magic, but I do want to see how the tools intend to work so I can gain and retain some knowledge. - -I've gone to several live demos that break. In my experience, this has caught most presenters off-guard; they seemed unfamiliar with the bugs at hand and, in one case, the error derailed the rest of the presentation. In short, it was like this: - -> Hmm, at least when the live demo fails you know it's not a video 😁 -> But I don't like when the presenter start to struggle, when everything becomes silent, it becomes so awkward (especially when I'm the one presenting) -> -> — Sylvain Nouts Ⓥ (@SylvainNouts) [June 14, 2019][7] - -Reading the replies to Sara's thread made me wonder what I'm really after when attending live demos. Is "perfection" what I seek? Or is it presenters who are more skilled at de-bugging in real-time? Upon reflection, I suspect that it's the latter. - -After all, "perfect" code is a lofty (if impossible) concept. Mistakes will happen, and I don't expect them not to. But I _do_ expect conference presenters to know their tools well enough that when things go sideways during live demos, they won't get so flustered that they can't keep going. - -Overall, this reply to Sara resonates with me the most. I attend live demos as a new coder with the goal to learn, and those that veer too far off-course aren't as effective for me: - -> I don’t necessarily prefer a broken demo, but I do think they show a more realistic view. -> That said, when you are newer to coding if the error takes things too far off the rails it can make it challenging to understand the original concept. -> -> — April Bowler (@A_Bowler2) [June 14, 2019][8] - -I don't expect everyone to attend live demos with the same goals and perspective as me. That's why we want to learn what the open source community thinks. - -_Do you prefer for live demos to be perfect? Or do you gain more from watching presenters de-bug in real-time? Do you attend live demos primarily to learn or for other reasons? Let us know by taking our poll or leaving a comment below._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/7/live-demo-perfect-or-broken - -作者:[Lauren Maffeo][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/lmaffeohttps://opensource.com/users/don-watkinshttps://opensource.com/users/jamesf -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/video_editing_folder_music_wave_play.png?itok=-J9rs-My (video editing dashboard) -[2]: https://www.devfestdc.org/ -[3]: https://twitter.com/SRobTweets -[4]: https://twitter.com/SRobTweets/status/1139619990687162368?ref_src=twsrc%5Etfw -[5]: https://twitter.com/sethvargo/status/1139620990546145281?ref_src=twsrc%5Etfw -[6]: https://twitter.com/jamiekinney/status/1139636109585989632?ref_src=twsrc%5Etfw -[7]: https://twitter.com/SylvainNouts/status/1139637154731237376?ref_src=twsrc%5Etfw -[8]: https://twitter.com/A_Bowler2/status/1139648492953976832?ref_src=twsrc%5Etfw diff --git a/sources/talk/20190729 I Used The Web For A Day On A 50 MB Budget - Smashing Magazine.md b/sources/talk/20190729 I Used The Web For A Day On A 50 MB Budget - Smashing Magazine.md deleted file mode 100644 index b0a7f4a7e0..0000000000 --- a/sources/talk/20190729 I Used The Web For A Day On A 50 MB Budget - Smashing Magazine.md +++ /dev/null @@ -1,538 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (I Used The Web For A Day On A 50 MB Budget — Smashing Magazine) -[#]: via: (https://www.smashingmagazine.com/2019/07/web-on-50mb-budget/) -[#]: author: (Chris Ashton https://www.smashingmagazine.com/author/chrisbashton) - -I Used The Web For A Day On A 50 MB Budget -====== - -Data can be prohibitively expensive, especially in developing countries. Chris Ashton puts himself in the shoes of someone on a tight data budget and offers practical tips for reducing our websites’ data footprint. - -This article is part of a series in which I attempt to use the web under various constraints, representing a given demographic of user. I hope to raise the profile of difficulties faced by real people, which are avoidable if we design and develop in a way that is sympathetic to their needs. - -Last time, I [navigated the web for a day using Internet Explorer 8][7]. This time, I browsed the web for a day on a 50 MB budget. - -### Why 50 MB? - -Many of us are lucky enough to be on mobile plans which allow several gigabytes of data transfer per month. Failing that, we are usually able to connect to home or public WiFi networks that are on fast broadband connections and have effectively unlimited data. - -But there are parts of the world where mobile data is prohibitively expensive, and where there is little or no broadband infrastructure. - -> People often buy data packages of just tens of megabytes at a time, making a gigabyte a relatively large and therefore expensive amount of data to buy. -> — Dan Howdle, consumer telecoms analyst at Cable.co.uk - -Just how expensive are we talking? - -#### The Cost Of Mobile Data - -A 2018 [study by cable.co.uk][8] found that Zimbabwe was the most expensive country in the world for mobile data, where 1 GB cost an average of $75.20, ranging from $12.50 to $138.46. The enormous range in price is due to smaller amounts of data being very expensive, getting proportionally cheaper the bigger the data plan you commit to. You can read the [study methodology][9] for more information. - -Zimbabwe is by no means a one-off. Equatorial Guinea, Saint Helena and the Falkland Islands are next in line, with 1 GB of data costing $65.83, $55.47 and $47.39 respectively. These countries generally have a combination of poor technical infrastructure and low adoption, meaning data is both costly to deliver and doesn’t have the economy of scale to drive costs down. - -Data is expensive in parts of Europe too. A gigabyte of data in Greece will set you back $32.71; in Switzerland, $20.22. For comparison, the same amount of data costs $6.66 in the UK, or $12.37 in the USA. On the other end of the scale, India is the cheapest place in the world for data, at an average cost of $0.26. Kyrgyzstan, Kazakhstan and Ukraine follow at $0.27, $0.49 and $0.51 per GB respectively. - -The speed of mobile networks, too, varies considerably between countries. Perhaps surprisingly, [users experience faster speeds over a mobile network than WiFi][10] in at least 30 countries worldwide, including Australia and France. South Korea has the [fastest mobile download speed][11], averaging 52.4 Mbps, but Iraq has the slowest, averaging 1.6 Mbps download and 0.7 Mbps upload. The USA ranks 40th in the world for mobile download speeds, at around 34 Mbps, and is [at risk of falling further behind][12] as the world moves towards 5G. - -As for mobile network connection type, 84.7% of user connections in the UK are on 4G, compared to 93% in the USA, and 97.5% in South Korea. This compares with less than 50% in Uzbekistan and less than 60% in Algeria, Ecuador, Nepal and Iraq. - -#### The Cost Of Broadband Data - -Meanwhile, a [study of the cost of broadband in 2018][13] shows that a broadband connection in Niger costs $263 ‘per megabit per month’. This metric is a little difficult to comprehend, so here’s an example: if the average cost of broadband packages in a country is $22, and the average download speed offered by the packages is 10 Mbps, then the cost ‘per megabit per month’ would be $2.20. - -It’s an interesting metric, and one that acknowledges that broadband speed is as important a factor as the data cap. A cost of $263 suggests a combination of extremely slow and extremely expensive broadband. For reference, the metric is $1.19 in the UK and $1.26 in the USA. - -What’s perhaps easier to comprehend is the average cost of a broadband package. Note that this study was looking for the cheapest broadband packages on offer, ignoring whether or not these packages had a data cap, so provides a useful ballpark figure rather than the cost of data per se. - -On package cost alone, Mauritania has the most expensive broadband in the world, at an average of $768.16 (a range of $307.26 to $1,368.72). This enormous cost includes building physical lines to the property, since few already exist in Mauritania. At 0.7 Mbps, Mauritania also has one of the slowest broadband networks in the world. - -[Taiwan has the fastest broadband in the world][14], at a mean speed of 85 Mbps. Yemen has the slowest, at 0.38 Mbps. But even countries with good established broadband infrastructure have so-called ‘not-spots’. The United Kingdom is ranked 34th out of 207 countries for broadband speed, but in July 2019 there was [still a school in the UK without broadband][15]. - -The average cost of a broadband package in the UK is $39.58, and in the USA is $67.69. The cheapest average in the world is Ukraine’s, at just $5, although the cheapest broadband deal of them all was found in Kyrgystan ($1.27 — against the country average of $108.22). - -Zimbabwe was the most costly country for mobile data, and the statistics aren’t much better for its broadband, with an average cost of $128.71 and a ‘per megabit per month’ cost of $6.89. - -#### Absolute Cost vs Cost In Real Terms - -All of the costs outlined so far are the absolute costs in USD, based on the exchange rates at the time of the study. These costs have [not been accounted for cost of living][16], meaning that for many countries the cost is actually far higher in real terms. - -I’m going to limit my browsing today to 50 MB, which in Zimbabwe would cost around $3.67 on a mobile data tariff. That may not sound like much, but teachers in Zimbabwe were striking this year because their [salaries had fallen to just $2.50 a day][17]. - -For comparison, $3.67 is around half the [$7.25 minimum wage in the USA][18]. As a Zimbabwean, I’d have to work for around a day and a half to earn the money to buy this 50MB data, compared to just half an hour in the USA. It’s not easy to compare cost of living between countries, but on wages alone the $3.67 cost of 50 MB of data in Zimbabwe would feel like $52 to an American on minimum wage. - -### Setting Up The Experiment - -I launched Chrome and opened the dev tools, where I throttled the network to a slow 3G connection. I wanted to simulate a slow connection like those experienced by users in Uzbekistan, to see what kind of experience websites would give me. I also throttled my CPU to simulate being on a lower end device. - -[![][19]][20]I opted to throttle my network to Slow 3G and my CPU to 6x slowdown. ([Large preview][20]) - -I installed [ModHeader][21] and set the [‘Save-Data’ header][22] to let websites know I want to minimise my data usage. This is also the header set by Chrome for Android’s ‘Lite mode’, which I’ll cover in more detail later. - -I downloaded [TripMode][23]; an application for Mac which gives you control over which apps on your Mac can access the internet. Any other application’s internet access is automatically blocked. - -You can enable/disable individual apps from connecting to the internet with TripMode. I enabled Chrome. ([Large preview][24]) - -How far do I predict my 50 MB budget will take me? With the [average weight of a web page being almost 1.7 MB][25], that suggests I’ve got around 29 pages in my budget, although probably a few more than that if I’m able to stay on the same sites and leverage browser caching. - -Throughout the experiment I will suggest performance tips to speed up the [first contentful paint][26] and perceived loading time of the page. Some of these tips may not affect the amount of data transferred directly, but do generally involve deferring the download of less important resources, which on slow connections may mean the resources are never downloaded and data is saved. - -### The Experiment - -Without any further ado, I loaded google.com, using 402 KB of my budget and spending $0.03 (around 1% of my Zimbabwe budget). - -[![402 KB transferred, 1.1 MB resources, 24 requests][27]][28]402 KB transferred, 1.1 MB resources, 24 requests. ([Large preview][28]) - -All in all, not a bad page size, but I wondered where those 24 network requests were coming from and whether or not the page could be made any lighter. - -#### Google Homepage — DOM - -[![][29]][30]Chrome devtools screenshot of the DOM, where I’ve expanded one inline `style` tag. ([Large preview][30]) - -Looking at the page markup, there are no external stylesheets — all of the CSS is inline. - -##### Performance Tip #1: Inline Critical CSS - -This is good for performance as it saves the browser having to make an additional network request in order to fetch an external stylesheet, so the styles can be parsed and applied immediately for the first contentful paint. There’s a trade-off to be made here, as external stylesheets can be cached but inline ones cannot (unless you [get clever with JavaScript][31]). - -The general advice is for your [critical styles][32] (anything [above-the-fold][33]) to be inline, and for the rest of your styling to be external and loaded asynchronously. Asynchronous loading of CSS can be achieved in [one remarkably clever line of HTML][34]: - -``` - -``` - -The devtools show a prettified version of the DOM. If you want to see what was actually downloaded to the browser, switch to the Sources tab and find the document. - -[![A wall of minified code.][35]][36]Switching to Sources and finding the index shows the ‘raw’ HTML that was delivered to the browser. What a mess! ([Large preview][36]) - -You can see there is a LOT of inline JavaScript here. It’s worth noting that it has been uglified rather than merely minified. - -##### Performance Tip #2: Minify And Uglify Your Assets - -Minification removes unnecessary spaces and characters, but uglification actually ‘mangles’ the code to be shorter. The tell-tale sign is that the code contains short, machine-generated variable names rather than untouched source code. This is good as it means the script is smaller and quicker to download. - -Even so, inline scripts look to be roughly 120 KB of the 210 KB page resource (about half the 60 KB gzipped size). In addition, there are five external JavaScript files amounting to 291 KB of the 402 KB downloaded: - -[![Network tab of DevTools showing the external javascript files][37]][38]Five external JavaScript files in the Network tab of the devtools. ([Large preview][38]) - -This means that JavaScript accounts for about 80 percent of the overall page weight. - -This isn’t useless JavaScript; Google has to have some in order to display suggestions as you type. But I suspect a lot of it is tracking code and advertising setup. - -For comparison, I disabled JavaScript and reloaded the page: - -[![DevTools showing only 5 network requests][39]][40]The disabled JS version of Google search was only 102 KB and had just 5 network requests. ([Large preview][40]) - -The JS-disabled version of Google search is just 102 KB, as opposed to 402 KB. Although Google can’t provide autosuggestions under these conditions, the site is still functional, and I’ve just cut my data usage down to a quarter of what it was. If I really did have to limit my data usage in the long term, one of the first things I’d do is disable JavaScript. [It’s not as bad as it sounds][41]. - -##### Performance Tip #3: Less Is More - -Inlining, uglifying and minifying assets is all well and good, but the best performance comes from not sending down the assets in the first place. - - * Before adding any new features, do you have a [performance budget][42] in place? - * Before adding JavaScript to your site, can your feature be accomplished using plain HTML? (For example, [HTML5 form validation][43]). - * Before pulling a large JavaScript or CSS library into your application, use something like [bundlephobia.com][44] to measure how big it is. Is the convenience worth the weight? Can you accomplish the same thing using vanilla code at a much smaller data size? - - - -#### Analysing The Resource Info - -There’s a lot to unpack here, so let’s get cracking. I’ve only got 50 MB to play with, so I’m going to milk every bit of this page load. Settle in for a short Chrome Devtools tutorial. - -402 KB transferred, but 1.1 MB of resources: what does that actually mean? - -It means 402 KB of content was actually downloaded, but in its compressed form (using a compression algorithm such as [gzip or brotli][45]). The browser then had to do some work to unpack it into something meaningful. The total size of the unpacked data is 1.1 MB. - -This unpacking isn’t free — [there are a few milliseconds of overhead in decompressing the resources][46]. But that’s a negligible overhead compared to sending 1.1MB down the wire. - -##### Performance Tip #4: Compress Text-based Assets - -As a general rule, always compress your assets, using something like gzip. But don’t use compression on your images and other binary files — you should optimize these in advance at source. Compression could actually end up [making them bigger][47]. - -And, if you can, [avoid compressing files that are 1500 bytes or smaller][47]. The smallest TCP packet size is 1500 bytes, so by compressing to, say, 800 bytes, you save nothing, as it’s still transmitted in the same byte packet. Again, the cost is negligible, but wastes some compression CPU time on the server and decompression CPU time on the client. - -Now back to the Network tab in Chrome: let’s dig into those priorities. Notice that resources have priority “Highest” to “Lowest” — these are the browser’s best guess as to what are the more important resources to download. The higher the priority, the sooner the browser will try to download the asset. - -##### Performance Tip #5: Give Resource Hints To The Browser - -The browser will guess at what the highest priority assets are, but you can [provide a resource hint][48] using the `` tag, instructing the browser to download the asset as soon as possible. It’s a good idea to preload fonts, logos and anything else that appears above the fold. - -Let’s talk about caching. I’m going to hold ALT and right-click to change my column headers to unlock some more juicy information. We’re going to check out Cache-Control. - -There are lots of interesting fields tucked away behind ALT. ([Large preview][49]) - -Cache-Control denotes whether or not a resource can be cached, how long it can be cached for, and what rules it should follow around [revalidating][50]. Setting proper cache values is crucial to keeping the data cost of repeat visits down. - -##### Performance Tip #6: Set cache-control Headers On All Cacheable Assets - -Note that the cache-control value begins with a directive of `public` or `private`, followed by an expiration value (e.g. `max-age=31536000`). What does the directive mean, and why the oddly specific `max-age` value? - -[![Screenshot of Google network tab with cache-control column visible][51]][52]A mixture of max-age values and public/private. ([Large preview][52]) - -The value `31536000` is the number of seconds there are in a year, and is the theoretical maximum value allowed by the cache-control specification. It is common to see this value applied to all static assets and effectively means “this resource isn’t going to change”. In practice, [no browser is going to cache for an entire year][53], but it will cache the asset for as long as makes sense. - -To explain the public/private directive, we must explain the two main caches that exist off the server. First, there is the traditional browser cache, where the resource is stored on the user’s machine (the ‘client’). And then there is the CDN cache, which sits between the client and the server; resources are cached at the CDN level to prevent the CDN from requesting the resource from the origin server over and over again. - -A `Cache-Control` directive of `public` allows the resource to be cached in both the client and the CDN. A value of `private` means only the client can cache it; the CDN is not supposed to. This latter value is typically used for pages or assets that exist behind authentication, where it is fine to be cached on the client but we wouldn’t want to leak private information by caching it in the CDN and delivering it to other users. - -[![Screenshot of Google logo cache-control setting: private, max-age=31536000][54]][55]A mixture of max-age values and public/private. ([Large preview][55]) - -One thing that got my attention was that the Google logo has a cache control of “private”. Other images on the page do have a public cache, and I don’t know why the logo would be treated any differently. If you have any ideas, let me know in the comments! - -I refreshed the page and most of the resources were served from cache, apart from the page itself, which as you’ve seen already is `private, max-age=0`, meaning it cannot be cached. This is normal for dynamic web pages where it is important that the user always gets the very latest page when they refresh. - -It was at this point I accidentally clicked on an ‘Explanation’ URL in the devtools, which took me to the [network analysis reference][56], costing me about 5 MB of my budget. Oops. - -### Google Dev Docs - -4.2 MB of this new 5 MB page was down to images; specifically SVGs. The weightiest of these was 186 KB, which isn’t particularly big — there were just so many of them, and they all downloaded at once. - -This is a loooong page. All the images downloaded on page load. ([Large preview][57]) - -That 5 MB page load was 10% of my budget for today. So far I’ve used 5.5 MB, including the no-JavaScript reload of the Google homepage, and spent $0.40. I didn’t even mean to open this page. - -What would have been a better user experience here? - -##### Performance Tip #7: Lazy-load Your Images - -Ordinarily, if I accidentally clicked on a link, I would hit the back button in my browser. I’d have received no benefit whatsoever from downloading those images — what a waste of 4.2 MB! - -Apart from video, where you generally know what you’re getting yourself into, images are by far the biggest culprit to data usage on the web. A [study of the world’s top 500 websites][58] found that images take up to 53% of the average page weight. “This means they have a big impact on page-loading times and subsequently overall performance”. - -Instead of downloading all of the images on page load, it is good practice to lazy-load the images so that only users who are engaged with the page pay the cost of downloading them. Users who choose not to scroll below the fold therefore don’t waste any unnecessary bandwidth downloading images they’ll never see. - -There’s a great [css-tricks.com guide to rolling out lazy-loading for images][59] which offers a good balance between those on good connections, those on poor connections, and those with JavaScript disabled. - -If this page had implemented lazy loading as per the guide above, each of the 38 SVGs would have been represented by a 1 KB placeholder image by default, and only loaded into view on scroll. - -##### Performance Tip #8: Use The Right Format For Your Images - -I thought that Google had missed a trick by not using [WebP][60], which is an image format that is 26% smaller in size compared to PNGs (with no loss in quality) and 25-34% smaller in size compared to JPEGs (and of a comparable quality). I thought I’d have a go at converting SVG to WebP. - -Converting to WebP did bring one of the SVGs down from 186 KB to just 65 KB, but actually, looking at the images side by side, the WebP came out grainy: - -[![Comparison of the two images][61]][62]The SVG (left) is noticeably crisper than the WebP (right). ([Large preview][62]) - -I then tried converting one of the PNGs to WebP, which is supposed to be lossless and should come out smaller. However, the WebP output was *heavier* (127 KB, from 109 KB)! - -[![Comparison of the two images][63]][64]The PNG (left) is a similar quality to the WebP (right) but is smaller at 109 KB compared to 127 KB. ([Large preview][64]) - -This surprised me. WebP isn’t necessarily the silver bullet we think it is, and even Google have neglected to use it on this page. - -So my advice would be: where possible, experiment with different image formats on a per-image basis. The format that keeps the best quality for the smallest size may not be the one you expect. - -Now back to the DOM. I came across this: - -Notice the `async` keyword on the Google analytics script? - -[![Screenshot of performance analysis output of devtools][65]][66]Google analytics has ‘low’ priority. ([Large preview][66]) - -Despite being one of the first things in the head of the document, this was given a low priority, as we’ve explicitly opted out of being a blocking request by using the `async` keyword. - -A blocking request is one that stops the rendering of the page. A ` + + ``` `WebAssembly.Memory(...)` 方法返回一个大小为 64KB 的内存页。函数 `consoleLogString` 根据长度和偏移量从该内存页读取一个字符串。这两个对象作为 `importObject` 的一部分传递给你的 WebAssembly 模块。 @@ -128,19 +122,15 @@ WASM-text 和 WebAssembly 字节码有 1:1 的对应关系,这意味着你可 ![Firefox setting][4] -(Stephan Avenwedde, [CC BY-SA 4.0][5]) - > **注意:** 这样做会使你容易受到 [CVE-2019-11730][6] 安全问题的影响。 -现在,在 Firefox 中打开 `helloworld.html`,按下 **Ctrl**+**K** 打开开发者控制台。 +现在,在 Firefox 中打开 `helloworld.html`,按下 `Ctrl+K` 打开开发者控制台。 ![Debugger output][7] -(Stephan Avenwedde, [CC BY-SA 4.0][5]) - ### 了解更多 -这个 Hello World 的例子只是 MDN 的[了解 WebAssembly 文本格式][8]文档中的教程之一。如果你想了解更多关于 WebAssembly 的知识以及它的工作原理,可以看看这些文档。 +这个 Hello World 的例子只是 MDN 的 [了解 WebAssembly 文本格式][8] 文档中的教程之一。如果你想了解更多关于 WebAssembly 的知识以及它的工作原理,可以看看这些文档。 -------------------------------------------------------------------------------- @@ -149,7 +139,7 @@ via: https://opensource.com/article/21/3/hello-world-webassembly 作者:[Stephan Avenwedde][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/) 荣誉推出 From f1c1b6e98484e50a1bb67936dad4f3542a31218d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 30 Mar 2021 10:00:11 +0800 Subject: [PATCH 500/818] PUB @geekpi https://linux.cn/article-13250-1.html --- .../20210316 How to write -Hello World- in WebAssembly.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210316 How to write -Hello World- in WebAssembly.md (99%) diff --git a/translated/tech/20210316 How to write -Hello World- in WebAssembly.md b/published/20210316 How to write -Hello World- in WebAssembly.md similarity index 99% rename from translated/tech/20210316 How to write -Hello World- in WebAssembly.md rename to published/20210316 How to write -Hello World- in WebAssembly.md index 558734455c..b2e423aeb9 100644 --- a/translated/tech/20210316 How to write -Hello World- in WebAssembly.md +++ b/published/20210316 How to write -Hello World- in WebAssembly.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13250-1.html) 如何在 WebAssembly 中写 “Hello World”? ====== From 9a5a01eee994597e80b59b60dd2afb87ef4b23d3 Mon Sep 17 00:00:00 2001 From: wyxplus <32919297+wyxplus@users.noreply.github.com> Date: Tue, 30 Mar 2021 12:32:20 +0800 Subject: [PATCH 501/818] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...rn how file input and output works in C.md | 285 ----------------- ...rn how file input and output works in C.md | 289 ++++++++++++++++++ 2 files changed, 289 insertions(+), 285 deletions(-) delete mode 100644 sources/tech/20210315 Learn how file input and output works in C.md create mode 100644 translated/tech/20210315 Learn how file input and output works in C.md diff --git a/sources/tech/20210315 Learn how file input and output works in C.md b/sources/tech/20210315 Learn how file input and output works in C.md deleted file mode 100644 index 19d86e4528..0000000000 --- a/sources/tech/20210315 Learn how file input and output works in C.md +++ /dev/null @@ -1,285 +0,0 @@ -[#]: subject: (Learn how file input and output works in C) -[#]: via: (https://opensource.com/article/21/3/file-io-c) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) -[#]: collector: (lujun9972) -[#]: translator: (wyxplus) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Learn how file input and output works in C -====== -Understanding I/O can help you do things faster. -![4 manilla folders, yellow, green, purple, blue][1] - -If you want to learn input and output in C, start by looking at the `stdio.h` include file. As you might guess from the name, that file defines all the standard ("std") input and output ("io") functions. - -The first `stdio.h` function that most people learn is the `printf` function to print formatted output. Or the `puts` function to print a simple string. Those are great functions to print information to the user, but if you want to do more than that, you'll need to explore other functions. - -You can learn about some of these functions and methods by writing a replica of a common Linux command. The `cp` command will copy one file to another. If you look at the `cp` man page, you'll see that `cp` supports a broad set of command-line parameters and options. But in the simplest case, `cp` supports copying one file to another: - - -``` -`cp infile outfile` -``` - -You can write your own version of this `cp` command in C by using only a few basic functions to _read_ and _write_ files. - -### Reading and writing one character at a time - -You can easily do input and output using the `fgetc` and `fputc` functions. These read and write data one character at a time. The usage is defined in `stdio.h` and is quite straightforward: `fgetc` reads (gets) a single character from a file, and `fputc` puts a single character into a file. - - -``` -int [fgetc][2](FILE *stream); -int [fputc][3](int c, FILE *stream); -``` - -Writing the `cp` command requires accessing files. In C, you open a file using the `fopen` function, which takes two arguments: the _name_ of the file and the _mode_ you want to use. The mode is usually `r` to read from a file or `w` to write to a file. The mode supports other options too, but for this tutorial, just focus on reading and writing. - -Copying one file to another then becomes a matter of opening the source and destination files, then _reading one character at a time_ from the first file, then _writing that character_ to the second file. The `fgetc` function returns either the single character read from the input file or the _end of file_ (`EOF`) marker when the file is done. Once you've read `EOF`, you've finished copying and you can close both files. That code looks like this: - - -``` -  do { -    ch = [fgetc][2](infile); -    if (ch != EOF) { -      [fputc][3](ch, outfile); -    } -  } while (ch != EOF); -``` - -You can write your own `cp` program with this loop to read and write one character at a time by using the `fgetc` and `fputc` functions. The `cp.c` source code looks like this: - - -``` -#include <stdio.h> - -int -main(int argc, char **argv) -{ -  FILE *infile; -  FILE *outfile; -  int ch; - -  /* parse the command line */ - -  /* usage: cp infile outfile */ - -  if (argc != 3) { -    [fprintf][4](stderr, "Incorrect usage\n"); -    [fprintf][4](stderr, "Usage: cp infile outfile\n"); -    return 1; -  } - -  /* open the input file */ - -  infile = [fopen][5](argv[1], "r"); -  if (infile == NULL) { -    [fprintf][4](stderr, "Cannot open file for reading: %s\n", argv[1]); -    return 2; -  } - -  /* open the output file */ - -  outfile = [fopen][5](argv[2], "w"); -  if (outfile == NULL) { -    [fprintf][4](stderr, "Cannot open file for writing: %s\n", argv[2]); -    [fclose][6](infile); -    return 3; -  } - -  /* copy one file to the other */ - -  /* use fgetc and fputc */ - -  do { -    ch = [fgetc][2](infile); -    if (ch != EOF) { -      [fputc][3](ch, outfile); -    } -  } while (ch != EOF); - -  /* done */ - -  [fclose][6](infile); -  [fclose][6](outfile); - -  return 0; -} -``` - -And you can compile that `cp.c` file into a full executable using the GNU Compiler Collection (GCC): - - -``` -`$ gcc -Wall -o cp cp.c` -``` - -The `-o cp` option tells the compiler to save the compiled program into the `cp` program file. The `-Wall` option tells the compiler to turn on all warnings. If you don't see any warnings, that means everything worked correctly. - -### Reading and writing blocks of data - -Programming your own `cp` command by reading and writing data one character at a time does the job, but it's not very fast. You might not notice when copying "everyday" files like documents and text files, but you'll really notice the difference when copying large files or when copying files over a network. Working on one character at a time requires significant overhead. - -A better way to write this `cp` command is by reading a chunk of the input into memory (called a _buffer_), then writing that collection of data to the second file. This is much faster because the program can read more of the data at one time, which requires fewer "reads" from the file. - -You can read a file into a variable by using the `fread` function. This function takes several arguments: the array or memory buffer to read data into (`ptr`), the size of the smallest thing you want to read (`size`), how many of those things you want to read (`nmemb`), and the file to read from (`stream`): - - -``` -`size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);` -``` - -The different options provide quite a bit of flexibility for more advanced file input and output, such as reading and writing files with a certain data structure. But in the simple case of _reading data from one file_ and _writing data to another file_, you can use a buffer that is an array of characters. - -And you can write the buffer to another file using the `fwrite` function. This uses a similar set of options to the `fread` function: the array or memory buffer to read data from, the size of the smallest thing you need to write, how many of those things you need to write, and the file to write to. - - -``` -`size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);` -``` - -In the case where the program reads a file into a buffer, then writes that buffer to another file, the array (`ptr`) can be an array of a fixed size. For example, you can use a `char` array called `buffer` that is 200 characters long. - -With that assumption, you need to change the loop in your `cp` program to _read data from a file into a buffer_ then _write that buffer to another file_: - - -``` -  while (![feof][7](infile)) { -    buffer_length = [fread][8](buffer, sizeof(char), 200, infile); -    [fwrite][9](buffer, sizeof(char), buffer_length, outfile); -  } -``` - -Here's the full source code to your updated `cp` program, which now uses a buffer to read and write data: - - -``` -#include <stdio.h> - -int -main(int argc, char **argv) -{ -  FILE *infile; -  FILE *outfile; -  char buffer[200]; -  size_t buffer_length; - -  /* parse the command line */ - -  /* usage: cp infile outfile */ - -  if (argc != 3) { -    [fprintf][4](stderr, "Incorrect usage\n"); -    [fprintf][4](stderr, "Usage: cp infile outfile\n"); -    return 1; -  } - -  /* open the input file */ - -  infile = [fopen][5](argv[1], "r"); -  if (infile == NULL) { -    [fprintf][4](stderr, "Cannot open file for reading: %s\n", argv[1]); -    return 2; -  } - -  /* open the output file */ - -  outfile = [fopen][5](argv[2], "w"); -  if (outfile == NULL) { -    [fprintf][4](stderr, "Cannot open file for writing: %s\n", argv[2]); -    [fclose][6](infile); -    return 3; -  } - -  /* copy one file to the other */ - -  /* use fread and fwrite */ - -  while (![feof][7](infile)) { -    buffer_length = [fread][8](buffer, sizeof(char), 200, infile); -    [fwrite][9](buffer, sizeof(char), buffer_length, outfile); -  } - -  /* done */ - -  [fclose][6](infile); -  [fclose][6](outfile); - -  return 0; -} -``` - -Since you want to compare this program to the other program, save this source code as `cp2.c`. You can compile that updated program using GCC: - - -``` -`$ gcc -Wall -o cp2 cp2.c` -``` - -As before, the `-o cp2` option tells the compiler to save the compiled program into the `cp2` program file. The `-Wall` option tells the compiler to turn on all warnings. If you don't see any warnings, that means everything worked correctly. - -### Yes, it really is faster - -Reading and writing data using buffers is the better way to write this version of the `cp` program. Because it reads chunks of a file into memory at once, the program doesn't need to read data as often. You might not notice a difference in using either method on smaller files, but you'll really see the difference if you need to copy something that's much larger or when copying data on slower media like over a network connection. - -I ran a runtime comparison using the Linux `time` command. This command runs another program, then tells you how long that program took to complete. For my test, I wanted to see the difference in time, so I copied a 628MB CD-ROM image file I had on my system. - -I first copied the image file using the standard Linux `cp` command to see how long that takes. By running the Linux `cp` command first, I also eliminated the possibility that Linux's built-in file-cache system wouldn't give my program a false performance boost. The test with Linux `cp` took much less than one second to run: - - -``` -$ time cp FD13LIVE.iso tmpfile - -real    0m0.040s -user    0m0.001s -sys     0m0.003s -``` - -Copying the same file using my own version of the `cp` command took significantly longer. Reading and writing one character at a time took almost five seconds to copy the file: - - -``` -$ time ./cp FD13LIVE.iso tmpfile - -real    0m4.823s -user    0m4.100s -sys     0m0.571s -``` - -Reading data from an input into a buffer and then writing that buffer to an output file is much faster. Copying the file using this method took less than a second: - - -``` -$ time ./cp2 FD13LIVE.iso tmpfile - -real    0m0.944s -user    0m0.224s -sys     0m0.608s -``` - -My demonstration `cp` program used a buffer that was 200 characters. I'm sure the program would run much faster if I read more of the file into memory at once. But for this comparison, you can already see the huge difference in performance, even with a small, 200 character buffer. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/file-io-c - -作者:[Jim Hall][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/jim-hall -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/file_system.jpg?itok=pzCrX1Kc (4 manilla folders, yellow, green, purple, blue) -[2]: http://www.opengroup.org/onlinepubs/009695399/functions/fgetc.html -[3]: http://www.opengroup.org/onlinepubs/009695399/functions/fputc.html -[4]: http://www.opengroup.org/onlinepubs/009695399/functions/fprintf.html -[5]: http://www.opengroup.org/onlinepubs/009695399/functions/fopen.html -[6]: http://www.opengroup.org/onlinepubs/009695399/functions/fclose.html -[7]: http://www.opengroup.org/onlinepubs/009695399/functions/feof.html -[8]: http://www.opengroup.org/onlinepubs/009695399/functions/fread.html -[9]: http://www.opengroup.org/onlinepubs/009695399/functions/fwrite.html diff --git a/translated/tech/20210315 Learn how file input and output works in C.md b/translated/tech/20210315 Learn how file input and output works in C.md new file mode 100644 index 0000000000..af59907671 --- /dev/null +++ b/translated/tech/20210315 Learn how file input and output works in C.md @@ -0,0 +1,289 @@ +[#]: subject: (Learn how file input and output works in C) +[#]: via: (https://opensource.com/article/21/3/file-io-c) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: (wyxplus) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +学习如何用 C 语言来进行文件输入输出操作 +====== + +理解 I/O 有助于提升你的效率。 + +![4 manilla folders, yellow, green, purple, blue][1] + +如果你打算学习用 C 语言进行输入输出,首先关注 `stdio.h` 包含的文件。你可能从其名字中猜到,该文件定义了所有的标准输入输出函数。 + +大多数人学习的第一个 `stdio.h` 的函数是 `printf` 函数,用于打印格式化输出。或者使用 `puts` 函数来打印一个字符串。这些函数非常有用,可以将信息打印给用户,但是如果你想做更多的事情,则需要了解其他函数。 + +你可以通过编写常见 Linux 命令的副本来了解其中一些功能和方法。`cp` 命令主要用于复制文件。如果你查看 `cp` 的帮助手册,可以看到 `cp` 命令支持非常多的参数和选项。但最简单的功能,就是复制文件: + + +``` +`cp infile outfile` +``` + +你只需使用一些读写文件的基本函数,就可以用 C 语言中来自己实现 `cp` 命令。 + +### 同时读写一个字符 + +你可以使用 `fgetc` 和 `fputc` 函数轻松地进行输入输出。这些函数一次读写一个字符。该用法被定义在 `stdio.h`,并且这也很浅显易懂:`fgetc` 是从文件中读取一个字符,`fputc` 是将一个字符保存到文件中。 + + +``` +int [fgetc][2](FILE *stream); +int [fputc][3](int c, FILE *stream); +``` + +编写 `cp` 命令需要访问文件。在 C 语言中,你使用 `fopen` 函数打开一个文件,该函数带有两个参数:文件名和打开文件的方式。该方式通常是从文件读取 `r` 或向文件写入 `w`。打开文件的方式也有其他选项,但是对于本教程而言,仅关注于读写操作。 + +因此,将一个文件复制到另一个文件就变成了打开源文件和目标文件的问题,接着,不断从第一个文件读取字符,然后将该字符写入第二个文件。`fgetc` 函数返回从输入文件中读取的单个字符,或者返回文件完成后的(`EOF`)标记。一旦遇到 `EOF`,你就完成了复制操作,可以关闭两个文件。该代码如下所示: + + +``` + do { + ch = [fgetc][2](infile); + if (ch != EOF) { + [fputc][3](ch, outfile); + } + } while (ch != EOF); +``` + +你可以使用此循环编写自己的`cp`程序,以使用`fgetc`和`fputc`函数一次读取和写入一个字符。`cp.c` 源代码如下所示: + + +``` +#include <stdio.h> + +int +main(int argc, char **argv) +{ + FILE *infile; + FILE *outfile; + int ch; + + /* parse the command line */ + + /* usage: cp infile outfile */ + + if (argc != 3) { + [fprintf][4](stderr, "Incorrect usage\n"); + [fprintf][4](stderr, "Usage: cp infile outfile\n"); + return 1; + } + + /* open the input file */ + + infile = [fopen][5](argv[1], "r"); + if (infile == NULL) { + [fprintf][4](stderr, "Cannot open file for reading: %s\n", argv[1]); + return 2; + } + + /* open the output file */ + + outfile = [fopen][5](argv[2], "w"); + if (outfile == NULL) { + [fprintf][4](stderr, "Cannot open file for writing: %s\n", argv[2]); + [fclose][6](infile); + return 3; + } + + /* copy one file to the other */ + + /* use fgetc and fputc */ + + do { + ch = [fgetc][2](infile); + if (ch != EOF) { + [fputc][3](ch, outfile); + } + } while (ch != EOF); + + /* done */ + + [fclose][6](infile); + [fclose][6](outfile); + + return 0; +} +``` + +你可以使用 GCC 来将 `cp.c` 文件编译成一个可执行文件: + + +``` +`$ gcc -Wall -o cp cp.c` +``` + +`-o cp` 选项告诉编译器将编译后的程序保存到 `cp` 文件中。` -Wall` 选项告诉编译器提示所有可能的警告,如果你没有看到任何警告,则表示一切正常。 + + + +### 读写数据块 + +通过每次读写一个字符来实现自己的 `cp` 命令可以完成这项工作,但这并不是很快。在复制“日常”文件(例如文档和文本文件)时,你可能不会注意到,但是在复制大型文件或通过网络复制文件时,你才会注意到差异。每次处理一个字符需要大量的开销。 + +实现此 `cp` 命令的一种更好的方法是,将输入的一部分读取到内存中(称为缓存),然后将该数据集合写入第二个文件。因为程序可以一次读取更多的数据,所以减少了文件读取次数,因此速度更快。 + +你可以使用 `fread` 函数将文件读入内存中。这个函数有几个参数:将数据读入的数组或内存缓冲区的指针(`ptr`),要读取的最小对象的大小(`size`),要读取对象的个数(`nmemb`),以及要从输入流(`stream`)读取的文件: + + +``` +`size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);` +``` + +不同的选项为更高级的文件输入和输出(例如,读取和写入具有特定数据结构的文件)提供了很大的灵活性。但是,在从一个文件读取数据并将数据写入另一个文件的简单情况下,可以使用一个由字符数组组成的缓冲区。 + +你可以使用 `fwrite` 函数将缓冲区中数据写入到另一个文件。这使用了与 `fread` 函数有相似的一组选项:要从中读取数据的数组或内存缓冲区的指针,要读取的最小对象的大小,要读取对象的个数以及要写入的文件。 + + +``` +`size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);` +``` + +如果程序将文件读入缓冲区,然后将该缓冲区写入另一个文件,则数组(`ptr`)可以是固定大小的数组。例如,你可以使用长度为 200 个字符的字符数组作为缓冲区。 + +在该假设下,你需要更改 `cp` 程序中的循环,以将数据从文件读取到缓冲区中,然后将该缓冲区写入另一个文件中: + + +``` + while (![feof][7](infile)) { + buffer_length = [fread][8](buffer, sizeof(char), 200, infile); + [fwrite][9](buffer, sizeof(char), buffer_length, outfile); + } +``` + +这是更新后的 `cp` 程序的完整源代码,该程序现在使用缓冲区读取和写入数据: + + +``` +#include <stdio.h> + +int +main(int argc, char **argv) +{ + FILE *infile; + FILE *outfile; + char buffer[200]; + size_t buffer_length; + + /* parse the command line */ + + /* usage: cp infile outfile */ + + if (argc != 3) { + [fprintf][4](stderr, "Incorrect usage\n"); + [fprintf][4](stderr, "Usage: cp infile outfile\n"); + return 1; + } + + /* open the input file */ + + infile = [fopen][5](argv[1], "r"); + if (infile == NULL) { + [fprintf][4](stderr, "Cannot open file for reading: %s\n", argv[1]); + return 2; + } + + /* open the output file */ + + outfile = [fopen][5](argv[2], "w"); + if (outfile == NULL) { + [fprintf][4](stderr, "Cannot open file for writing: %s\n", argv[2]); + [fclose][6](infile); + return 3; + } + + /* copy one file to the other */ + + /* use fread and fwrite */ + + while (![feof][7](infile)) { + buffer_length = [fread][8](buffer, sizeof(char), 200, infile); + [fwrite][9](buffer, sizeof(char), buffer_length, outfile); + } + + /* done */ + + [fclose][6](infile); + [fclose][6](outfile); + + return 0; +} +``` + +由于你想将此程序与其他程序进行比较,因此请将此源代码另存为 `cp2.c`。你可以使用 GCC 编译程序: + + +``` +`$ gcc -Wall -o cp2 cp2.c` +``` + +和之前一样,`-o cp2` 选项告诉编译器将编译后的程序保存到 `cp2` 程序文件中。`-Wall` 选项告诉编译器打开所有警告。如果你没有看到任何警告,则表示一切正常。 + +### 是的,这真的更快了 + +使用缓冲区读取和写入数据是实现此版本 `cp` 程序更好的方法。由于它可以一次将文件的多个数据读取到内存中,因此该程序不需要频繁读取数据。在小文件中,你可能没有注意到使用这两种方案的区别,但是如果你需要复制大文件,或者在较慢的介质(例如通过网络连接)上复制数据时,会发现明显的差距。 + +​ 我使用 Linux `time` 命令进行了比较。此命令运行另一个程序,然后告诉你该程序花费了多长时间。对于我的测试,我希望了解所花费时间的差距,因此我复制了系统上的 628 MB CD-ROM 映像文件。 + +我首先使用标准的 Linux 的 `cp` 命令复制了映像文件,以查看所需多长时间。一开始通过运行 Linux 的 `cp` 命令,同时我还避免使用 Linux 内置的文件缓存系统,使其不会给程序带来误导性能提升的可能性。使用 Linux `cp` 进行的测试,总计花费不到一秒钟的时间: + + +``` +$ time cp FD13LIVE.iso tmpfile + +real 0m0.040s +user 0m0.001s +sys 0m0.003s +``` + +运行我自己实现的 `cp` 命令版本,复制同一文件要花费更长的时间。每次读写一个字符则花了将近五秒钟来复制文件: + + +``` +$ time ./cp FD13LIVE.iso tmpfile + +real 0m4.823s +user 0m4.100s +sys 0m0.571s +``` + +从输入读取数据到缓冲区,然后将该缓冲区写入输出文件则要快得多。使用此方法复制文件花不到一秒钟: + + +``` +$ time ./cp2 FD13LIVE.iso tmpfile + +real 0m0.944s +user 0m0.224s +sys 0m0.608s +``` + +我演示的 `cp` 程序使用了 200 个字符大小的缓冲区。我确信如果一次将更多文件数据读入内存,该程序将运行得更快。但是,通过这种比较,即使只有 200 个字符的缓冲区,你也已经看到了性能上的巨大差异。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/file-io-c + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[wyxplus](https://github.com/wyxplus) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/file_system.jpg?itok=pzCrX1Kc "4 manilla folders, yellow, green, purple, blue" +[2]: http://www.opengroup.org/onlinepubs/009695399/functions/fgetc.html +[3]: http://www.opengroup.org/onlinepubs/009695399/functions/fputc.html +[4]: http://www.opengroup.org/onlinepubs/009695399/functions/fprintf.html +[5]: http://www.opengroup.org/onlinepubs/009695399/functions/fopen.html +[6]: http://www.opengroup.org/onlinepubs/009695399/functions/fclose.html +[7]: http://www.opengroup.org/onlinepubs/009695399/functions/feof.html +[8]: http://www.opengroup.org/onlinepubs/009695399/functions/fread.html +[9]: http://www.opengroup.org/onlinepubs/009695399/functions/fwrite.html From 29bd8d9198b3660e0f3966474c9a24590680c969 Mon Sep 17 00:00:00 2001 From: wyxplus <32919297+wyxplus@users.noreply.github.com> Date: Tue, 30 Mar 2021 12:40:39 +0800 Subject: [PATCH 502/818] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20210326 How to read and write files in C.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210326 How to read and write files in C.md b/sources/tech/20210326 How to read and write files in C.md index 608e3ee463..8fe721461e 100644 --- a/sources/tech/20210326 How to read and write files in C.md +++ b/sources/tech/20210326 How to read and write files in C.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/3/ccc-input-output) [#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wyxplus) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From d4f44aae27f9935a5ce494427ec9a7ecc0207cdd Mon Sep 17 00:00:00 2001 From: "Qian.Sun" <44011673+DCOLIVERSUN@users.noreply.github.com> Date: Tue, 30 Mar 2021 15:24:02 +0800 Subject: [PATCH 503/818] translated by DCOLIVERSUN --- ...ash- A Modern Open-Source Feed Reader With Feedly Support.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md b/sources/tech/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md index 43013b5eb1..c618c66205 100644 --- a/sources/tech/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md +++ b/sources/tech/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md @@ -2,7 +2,7 @@ [#]: via: (https://itsfoss.com/newsflash-feedreader/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (DCOLIVERSUN) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From e4436e6df42a144b73a29b4f15f174f894796fb3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 30 Mar 2021 22:28:18 +0800 Subject: [PATCH 504/818] PRF @wyxplus --- ...rn how file input and output works in C.md | 129 ++++++++---------- 1 file changed, 57 insertions(+), 72 deletions(-) diff --git a/translated/tech/20210315 Learn how file input and output works in C.md b/translated/tech/20210315 Learn how file input and output works in C.md index af59907671..4b047fae52 100644 --- a/translated/tech/20210315 Learn how file input and output works in C.md +++ b/translated/tech/20210315 Learn how file input and output works in C.md @@ -3,59 +3,55 @@ [#]: author: (Jim Hall https://opensource.com/users/jim-hall) [#]: collector: (lujun9972) [#]: translator: (wyxplus) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) 学习如何用 C 语言来进行文件输入输出操作 ====== -理解 I/O 有助于提升你的效率。 +> 理解 I/O 有助于提升你的效率。 -![4 manilla folders, yellow, green, purple, blue][1] +![](https://img.linux.net.cn/data/attachment/album/202103/30/222717gyuegz88ryu8ry7i.jpg) -如果你打算学习用 C 语言进行输入输出,首先关注 `stdio.h` 包含的文件。你可能从其名字中猜到,该文件定义了所有的标准输入输出函数。 +如果你打算学习 C 语言的输入、输出,可以从 `stdio.h` 包含文件开始。正如你从其名字中猜到的,该文件定义了所有的标准(“std”)的输入和输出(“io”)函数。 -大多数人学习的第一个 `stdio.h` 的函数是 `printf` 函数,用于打印格式化输出。或者使用 `puts` 函数来打印一个字符串。这些函数非常有用,可以将信息打印给用户,但是如果你想做更多的事情,则需要了解其他函数。 - -你可以通过编写常见 Linux 命令的副本来了解其中一些功能和方法。`cp` 命令主要用于复制文件。如果你查看 `cp` 的帮助手册,可以看到 `cp` 命令支持非常多的参数和选项。但最简单的功能,就是复制文件: +大多数人学习的第一个 `stdio.h` 的函数是打印格式化输出的 `printf` 函数。或者是用来打印一个字符串的 `puts` 函数。这些函数非常有用,可以将信息打印给用户,但是如果你想做更多的事情,则需要了解其他函数。 +你可以通过编写一个常见 Linux 命令的副本来了解其中一些功能和方法。`cp` 命令主要用于复制文件。如果你查看 `cp` 的帮助手册,可以看到 `cp` 命令支持非常多的参数和选项。但最简单的功能,就是复制文件: ``` -`cp infile outfile` +cp infile outfile ``` -你只需使用一些读写文件的基本函数,就可以用 C 语言中来自己实现 `cp` 命令。 +你只需使用一些读写文件的基本函数,就可以用 C 语言来自己实现 `cp` 命令。 -### 同时读写一个字符 - -你可以使用 `fgetc` 和 `fputc` 函数轻松地进行输入输出。这些函数一次读写一个字符。该用法被定义在 `stdio.h`,并且这也很浅显易懂:`fgetc` 是从文件中读取一个字符,`fputc` 是将一个字符保存到文件中。 +### 一次读写一个字符 +你可以使用 `fgetc` 和 `fputc` 函数轻松地进行输入输出。这些函数一次只读写一个字符。该用法被定义在 `stdio.h`,并且这也很浅显易懂:`fgetc` 是从文件中读取一个字符,`fputc` 是将一个字符保存到文件中。 ``` -int [fgetc][2](FILE *stream); -int [fputc][3](int c, FILE *stream); +int fgetc(FILE *stream); +int fputc(int c, FILE *stream); ``` -编写 `cp` 命令需要访问文件。在 C 语言中,你使用 `fopen` 函数打开一个文件,该函数带有两个参数:文件名和打开文件的方式。该方式通常是从文件读取 `r` 或向文件写入 `w`。打开文件的方式也有其他选项,但是对于本教程而言,仅关注于读写操作。 - -因此,将一个文件复制到另一个文件就变成了打开源文件和目标文件的问题,接着,不断从第一个文件读取字符,然后将该字符写入第二个文件。`fgetc` 函数返回从输入文件中读取的单个字符,或者返回文件完成后的(`EOF`)标记。一旦遇到 `EOF`,你就完成了复制操作,可以关闭两个文件。该代码如下所示: +编写 `cp` 命令需要访问文件。在 C 语言中,你使用 `fopen` 函数打开一个文件,该函数需要两个参数:文件名和打开文件的模式。模式通常是从文件读取(`r`)或向文件写入(`w`)。打开文件的方式也有其他选项,但是对于本教程而言,仅关注于读写操作。 +因此,将一个文件复制到另一个文件就变成了打开源文件和目标文件,接着,不断从第一个文件读取字符,然后将该字符写入第二个文件。`fgetc` 函数返回从输入文件中读取的单个字符,或者当文件完成后返回文件结束标记(`EOF`)。一旦读取到 `EOF`,你就完成了复制操作,就可以关闭两个文件。该代码如下所示: ``` do { - ch = [fgetc][2](infile); + ch = fgetc(infile); if (ch != EOF) { - [fputc][3](ch, outfile); + fputc(ch, outfile); } } while (ch != EOF); ``` -你可以使用此循环编写自己的`cp`程序,以使用`fgetc`和`fputc`函数一次读取和写入一个字符。`cp.c` 源代码如下所示: - +你可以使用此循环编写自己的 `cp` 程序,以使用 `fgetc` 和 `fputc` 函数一次读写一个字符。`cp.c` 源代码如下所示: ``` -#include <stdio.h> +#include int main(int argc, char **argv) @@ -69,25 +65,25 @@ main(int argc, char **argv) /* usage: cp infile outfile */ if (argc != 3) { - [fprintf][4](stderr, "Incorrect usage\n"); - [fprintf][4](stderr, "Usage: cp infile outfile\n"); + fprintf(stderr, "Incorrect usage\n"); + fprintf(stderr, "Usage: cp infile outfile\n"); return 1; } /* open the input file */ - infile = [fopen][5](argv[1], "r"); + infile = fopen(argv[1], "r"); if (infile == NULL) { - [fprintf][4](stderr, "Cannot open file for reading: %s\n", argv[1]); + fprintf(stderr, "Cannot open file for reading: %s\n", argv[1]); return 2; } /* open the output file */ - outfile = [fopen][5](argv[2], "w"); + outfile = fopen(argv[2], "w"); if (outfile == NULL) { - [fprintf][4](stderr, "Cannot open file for writing: %s\n", argv[2]); - [fclose][6](infile); + fprintf(stderr, "Cannot open file for writing: %s\n", argv[2]); + fclose(infile); return 3; } @@ -96,71 +92,64 @@ main(int argc, char **argv) /* use fgetc and fputc */ do { - ch = [fgetc][2](infile); + ch = fgetc(infile); if (ch != EOF) { - [fputc][3](ch, outfile); + fputc(ch, outfile); } } while (ch != EOF); /* done */ - [fclose][6](infile); - [fclose][6](outfile); + fclose(infile); + fclose(outfile); return 0; } ``` -你可以使用 GCC 来将 `cp.c` 文件编译成一个可执行文件: - +你可以使用 `gcc` 来将 `cp.c` 文件编译成一个可执行文件: ``` -`$ gcc -Wall -o cp cp.c` +$ gcc -Wall -o cp cp.c ``` -`-o cp` 选项告诉编译器将编译后的程序保存到 `cp` 文件中。` -Wall` 选项告诉编译器提示所有可能的警告,如果你没有看到任何警告,则表示一切正常。 - - +`-o cp` 选项告诉编译器将编译后的程序保存到 `cp` 文件中。`-Wall` 选项告诉编译器提示所有可能的警告,如果你没有看到任何警告,则表示一切正常。 ### 读写数据块 通过每次读写一个字符来实现自己的 `cp` 命令可以完成这项工作,但这并不是很快。在复制“日常”文件(例如文档和文本文件)时,你可能不会注意到,但是在复制大型文件或通过网络复制文件时,你才会注意到差异。每次处理一个字符需要大量的开销。 -实现此 `cp` 命令的一种更好的方法是,将输入的一部分读取到内存中(称为缓存),然后将该数据集合写入第二个文件。因为程序可以一次读取更多的数据,所以减少了文件读取次数,因此速度更快。 - -你可以使用 `fread` 函数将文件读入内存中。这个函数有几个参数:将数据读入的数组或内存缓冲区的指针(`ptr`),要读取的最小对象的大小(`size`),要读取对象的个数(`nmemb`),以及要从输入流(`stream`)读取的文件: +实现此 `cp` 命令的一种更好的方法是,读取一块的输入数据到内存中(称为缓存),然后将该数据集合写入到第二个文件。这样做的速度要快得多,因为程序可以一次读取更多的数据,这就就减少了从文件中“读取”的次数。 +你可以使用 `fread` 函数将文件读入一个变量中。这个函数有几个参数:将数据读入的数组或内存缓冲区的指针(`ptr`),要读取的最小对象的大小(`size`),要读取对象的个数(`nmemb`),以及要读取的文件(`stream`): ``` -`size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);` +size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream); ``` 不同的选项为更高级的文件输入和输出(例如,读取和写入具有特定数据结构的文件)提供了很大的灵活性。但是,在从一个文件读取数据并将数据写入另一个文件的简单情况下,可以使用一个由字符数组组成的缓冲区。 -你可以使用 `fwrite` 函数将缓冲区中数据写入到另一个文件。这使用了与 `fread` 函数有相似的一组选项:要从中读取数据的数组或内存缓冲区的指针,要读取的最小对象的大小,要读取对象的个数以及要写入的文件。 - +你可以使用 `fwrite` 函数将缓冲区中的数据写入到另一个文件。这使用了与 `fread` 函数有相似的一组选项:要从中读取数据的数组或内存缓冲区的指针,要读取的最小对象的大小,要读取对象的个数以及要写入的文件。 ``` -`size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);` +size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream); ``` 如果程序将文件读入缓冲区,然后将该缓冲区写入另一个文件,则数组(`ptr`)可以是固定大小的数组。例如,你可以使用长度为 200 个字符的字符数组作为缓冲区。 在该假设下,你需要更改 `cp` 程序中的循环,以将数据从文件读取到缓冲区中,然后将该缓冲区写入另一个文件中: - ``` - while (![feof][7](infile)) { - buffer_length = [fread][8](buffer, sizeof(char), 200, infile); - [fwrite][9](buffer, sizeof(char), buffer_length, outfile); + while (!feof(infile)) { + buffer_length = fread(buffer, sizeof(char), 200, infile); + fwrite(buffer, sizeof(char), buffer_length, outfile); } ``` 这是更新后的 `cp` 程序的完整源代码,该程序现在使用缓冲区读取和写入数据: - ``` -#include <stdio.h> +#include int main(int argc, char **argv) @@ -175,25 +164,25 @@ main(int argc, char **argv) /* usage: cp infile outfile */ if (argc != 3) { - [fprintf][4](stderr, "Incorrect usage\n"); - [fprintf][4](stderr, "Usage: cp infile outfile\n"); + fprintf(stderr, "Incorrect usage\n"); + fprintf(stderr, "Usage: cp infile outfile\n"); return 1; } /* open the input file */ - infile = [fopen][5](argv[1], "r"); + infile = fopen(argv[1], "r"); if (infile == NULL) { - [fprintf][4](stderr, "Cannot open file for reading: %s\n", argv[1]); + fprintf(stderr, "Cannot open file for reading: %s\n", argv[1]); return 2; } /* open the output file */ - outfile = [fopen][5](argv[2], "w"); + outfile = fopen(argv[2], "w"); if (outfile == NULL) { - [fprintf][4](stderr, "Cannot open file for writing: %s\n", argv[2]); - [fclose][6](infile); + fprintf(stderr, "Cannot open file for writing: %s\n", argv[2]); + fclose(infile); return 3; } @@ -201,25 +190,24 @@ main(int argc, char **argv) /* use fread and fwrite */ - while (![feof][7](infile)) { - buffer_length = [fread][8](buffer, sizeof(char), 200, infile); - [fwrite][9](buffer, sizeof(char), buffer_length, outfile); + while (!feof(infile)) { + buffer_length = fread(buffer, sizeof(char), 200, infile); + fwrite(buffer, sizeof(char), buffer_length, outfile); } /* done */ - [fclose][6](infile); - [fclose][6](outfile); + fclose(infile); + fclose(outfile); return 0; } ``` -由于你想将此程序与其他程序进行比较,因此请将此源代码另存为 `cp2.c`。你可以使用 GCC 编译程序: - +由于你想将此程序与其他程序进行比较,因此请将此源代码另存为 `cp2.c`。你可以使用 `gcc` 编译程序: ``` -`$ gcc -Wall -o cp2 cp2.c` +$ gcc -Wall -o cp2 cp2.c ``` 和之前一样,`-o cp2` 选项告诉编译器将编译后的程序保存到 `cp2` 程序文件中。`-Wall` 选项告诉编译器打开所有警告。如果你没有看到任何警告,则表示一切正常。 @@ -228,11 +216,10 @@ main(int argc, char **argv) 使用缓冲区读取和写入数据是实现此版本 `cp` 程序更好的方法。由于它可以一次将文件的多个数据读取到内存中,因此该程序不需要频繁读取数据。在小文件中,你可能没有注意到使用这两种方案的区别,但是如果你需要复制大文件,或者在较慢的介质(例如通过网络连接)上复制数据时,会发现明显的差距。 -​ 我使用 Linux `time` 命令进行了比较。此命令运行另一个程序,然后告诉你该程序花费了多长时间。对于我的测试,我希望了解所花费时间的差距,因此我复制了系统上的 628 MB CD-ROM 映像文件。 +我使用 Linux `time` 命令进行了比较。此命令可以运行另一个程序,然后告诉你该程序花费了多长时间。对于我的测试,我希望了解所花费时间的差距,因此我复制了系统上的 628 MB CD-ROM 镜像文件。 我首先使用标准的 Linux 的 `cp` 命令复制了映像文件,以查看所需多长时间。一开始通过运行 Linux 的 `cp` 命令,同时我还避免使用 Linux 内置的文件缓存系统,使其不会给程序带来误导性能提升的可能性。使用 Linux `cp` 进行的测试,总计花费不到一秒钟的时间: - ``` $ time cp FD13LIVE.iso tmpfile @@ -243,7 +230,6 @@ sys 0m0.003s 运行我自己实现的 `cp` 命令版本,复制同一文件要花费更长的时间。每次读写一个字符则花了将近五秒钟来复制文件: - ``` $ time ./cp FD13LIVE.iso tmpfile @@ -254,7 +240,6 @@ sys 0m0.571s 从输入读取数据到缓冲区,然后将该缓冲区写入输出文件则要快得多。使用此方法复制文件花不到一秒钟: - ``` $ time ./cp2 FD13LIVE.iso tmpfile @@ -272,7 +257,7 @@ via: https://opensource.com/article/21/3/file-io-c 作者:[Jim Hall][a] 选题:[lujun9972][b] 译者:[wyxplus](https://github.com/wyxplus) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 635cf813a002e7040e560f5c82883c629a530054 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 30 Mar 2021 22:29:13 +0800 Subject: [PATCH 505/818] PUB @wyxplus https://linux.cn/article-13252-1.html --- .../20210315 Learn how file input and output works in C.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210315 Learn how file input and output works in C.md (99%) diff --git a/translated/tech/20210315 Learn how file input and output works in C.md b/published/20210315 Learn how file input and output works in C.md similarity index 99% rename from translated/tech/20210315 Learn how file input and output works in C.md rename to published/20210315 Learn how file input and output works in C.md index 4b047fae52..39915a214f 100644 --- a/translated/tech/20210315 Learn how file input and output works in C.md +++ b/published/20210315 Learn how file input and output works in C.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (wyxplus) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13252-1.html) 学习如何用 C 语言来进行文件输入输出操作 ====== From 5724892c52dd085d65816a066c34ee79e6f50518 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 30 Mar 2021 23:05:00 +0800 Subject: [PATCH 506/818] PUB @wxy https://linux.cn/article-13253-1.html --- ...lti-threaded Python programs with an open source tool.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20210312 Visualize multi-threaded Python programs with an open source tool.md (98%) diff --git a/translated/tech/20210312 Visualize multi-threaded Python programs with an open source tool.md b/published/20210312 Visualize multi-threaded Python programs with an open source tool.md similarity index 98% rename from translated/tech/20210312 Visualize multi-threaded Python programs with an open source tool.md rename to published/20210312 Visualize multi-threaded Python programs with an open source tool.md index cd04f66233..37601db036 100644 --- a/translated/tech/20210312 Visualize multi-threaded Python programs with an open source tool.md +++ b/published/20210312 Visualize multi-threaded Python programs with an open source tool.md @@ -4,15 +4,15 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13253-1.html) 用一个开源工具实现多线程 Python 程序的可视化 ====== > VizTracer 可以跟踪并发的 Python 程序,以帮助记录、调试和剖析。 -![丰富多彩的声波图][1] +![](https://img.linux.net.cn/data/attachment/album/202103/30/230404xi9pox38ookk8xe2.jpg) 并发是现代编程中必不可少的一部分,因为我们有多个核心,有许多需要协作的任务。然而,当并发程序不按顺序运行时,就很难理解它们。对于工程师来说,在这些程序中发现 bug 和性能问题不像在单线程、单任务程序中那么容易。 From 0141b551bebef6346c0f9e6236d2caeb44070e92 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 30 Mar 2021 23:20:16 +0800 Subject: [PATCH 507/818] PRF --- ...e multi-threaded Python programs with an open source tool.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20210312 Visualize multi-threaded Python programs with an open source tool.md b/published/20210312 Visualize multi-threaded Python programs with an open source tool.md index 37601db036..2a389f5245 100644 --- a/published/20210312 Visualize multi-threaded Python programs with an open source tool.md +++ b/published/20210312 Visualize multi-threaded Python programs with an open source tool.md @@ -20,7 +20,7 @@ VizTracer 是一个追踪和可视化 Python 程序的工具,对日志、调试和剖析很有帮助。尽管它对单线程、单任务程序很好用,但它在并发程序中的实用性是它的独特之处。 -## 尝试一个简单的任务 +### 尝试一个简单的任务 从一个简单的练习任务开始:计算出一个数组中的整数是否是质数并返回一个布尔数组。下面是一个简单的解决方案: From bef6f24b90fc53c50afe4bf5459bff9c22c46232 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 31 Mar 2021 05:21:54 +0800 Subject: [PATCH 508/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210330=20?= =?UTF-8?q?Access=20Python=20package=20index=20JSON=20APIs=20with=20reques?= =?UTF-8?q?ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210330 Access Python package index JSON APIs with requests.md --- ...n package index JSON APIs with requests.md | 230 ++++++++++++++++++ 1 file changed, 230 insertions(+) create mode 100644 sources/tech/20210330 Access Python package index JSON APIs with requests.md diff --git a/sources/tech/20210330 Access Python package index JSON APIs with requests.md b/sources/tech/20210330 Access Python package index JSON APIs with requests.md new file mode 100644 index 0000000000..3150248d58 --- /dev/null +++ b/sources/tech/20210330 Access Python package index JSON APIs with requests.md @@ -0,0 +1,230 @@ +[#]: subject: (Access Python package index JSON APIs with requests) +[#]: via: (https://opensource.com/article/21/3/python-package-index-json-apis-requests) +[#]: author: (Ben Nuttall https://opensource.com/users/bennuttall) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Access Python package index JSON APIs with requests +====== +PyPI's JSON API is a machine-readable source of the same kind of data +you can access while browsing the website. +![Python programming language logo with question marks][1] + +PyPI, the Python package index, provides a JSON API for information about its packages. This is essentially a machine-readable source of the same kind of data you can access while browsing the website. For example, as a human, I can head to the [NumPy][2] project page in my browser, click around, and see which versions there are, what files are available, and things like release dates and which Python versions are supported: + +![NumPy project page][3] + +(Ben Nuttall, [CC BY-SA 4.0][4]) + +But if I want to write a program to access this data, I can use the JSON API instead of having to scrape and parse the HTML on these pages. + +As an aside: On the old PyPI website, when it was hosted at `pypi.python.org`, the NumPy project page was at `pypi.python.org/pypi/numpy`, and accessing the JSON was a simple matter of adding a `/json` on the end, hence `https://pypi.org/pypi/numpy/json`. Now the PyPI website is hosted at `pypi.org`, and NumPy's project page is at `pypi.org/project/numpy`. The new site doesn't include rendering the JSON, but it still runs as it was before. So now, rather than adding `/json` to the URL, you have to remember the URL where they are. + +You can open up the JSON for NumPy in your browser by heading to its URL. Firefox renders it nicely like this: + +![JSON rendered in Firefox][5] + +(Ben Nuttall, [CC BY-SA 4.0][4]) + +You can open `info`, `releases`, and `urls` to inspect the contents within. Or you can load it into a Python shell. Here are a few lines to get started: + + +``` +import requests +url = "" +r = requests.get(url) +data = r.json() +``` + +Once you have the data (calling `.json()` provides a [dictionary][6] of the data), you can inspect it: + +![Inspecting data][7] + +(Ben Nuttall, [CC BY-SA 4.0][4]) + +Open `releases`, and inspect the keys inside it: + +![Inspecting keys in releases][8] + +(Ben Nuttall, [CC BY-SA 4.0][4]) + +This shows that `releases` is a dictionary with version numbers as keys. Pick one (say, the latest one) and inspect that: + +![Inspecting version][9] + +(Ben Nuttall, [CC BY-SA 4.0][4]) + +Each release is a list, and this one contains 24 items. But what is each item? Since it's a list, you can index the first one and take a look: + +![Indexing an item][10] + +(Ben Nuttall, [CC BY-SA 4.0][4]) + +This item is a dictionary containing details about a particular file. So each of the 24 items in the list relates to a file associated with this particular version number, i.e., the 24 files listed at . + +You could write a script that looks for something within the available data. For example, the following loop looks for versions with sdist (source distribution) files that specify a `requires_python` attribute and prints them: + + +``` +for version, files in data['releases'].items(): +    for f in files: +        if f.get('packagetype') == 'sdist' and f.get('requires_python'): +            print(version, f['requires_python']) +``` + +![sdist files with requires_python attribute ][11] + +(Ben Nuttall, [CC BY-SA 4.0][4]) + +### piwheels + +Last year I [implemented a similar API][12] on the piwheels website. [piwheels.org][13] is a Python package index that provides wheels (precompiled binary packages) for the Raspberry Pi architecture. It's essentially a mirror of the package set on PyPI, but with Arm wheels instead of files uploaded to PyPI by package maintainers. + +Since piwheels mimics the URL structure of PyPI, you can change the `pypi.org` part of a project page's URL to `piwheels.org`. It'll show you a similar kind of project page with details about which versions we have built and which files are available. Since I liked how the old site allowed you to add `/json` to the end of the URL, I made ours work that way, so NumPy's project page on PyPI is [pypi.org/project/numpy][14]. On piwheels, it is [piwheels.org/project/numpy][15], and the JSON is at [piwheels.org/project/numpy/json][16]. + +There's no need to duplicate the contents of PyPI's API, so we provide information about what's available on piwheels and include a list of all known releases, some basic information, and a list of files we have: + +![JSON files available in piwheels][17] + +(Ben Nuttall, [CC BY-SA 4.0][4]) + +Similar to the previous PyPI example, you could create a script to analyze the API contents, for example, to show the number of files piwheels has for each version of NumPy: + + +``` +import requests + +url = "" +package = requests.get(url).json() + +for version, info in package['releases'].items(): +    if info['files']: +        print('{}: {} files'.format(version, len(info['files']))) +    else: +        print('{}: No files'.format(version)) +``` + +Also, each file contains some metadata: + +![Metadata in JSON files in piwheels][18] + +(Ben Nuttall, [CC BY-SA 4.0][4]) + +One handy thing is the `apt_dependencies` field, which lists the Apt packages needed to use the library. In the case of this NumPy file, as well as installing NumPy with pip, you'll also need to install `libatlas3-base` and `libgfortran` using Debian's Apt package manager. + +Here is an example script that shows the Apt dependencies for a package: + + +``` +import requests + +def get_install(package, abi): +    url = ' +    r = requests.get(url) +    data = r.json() +    for version, release in sorted(data['releases'].items(), reverse=True): +        for filename, file in release['files'].items(): +            if abi in filename: +                deps = ' '.join(file['apt_dependencies']) +                print("sudo apt install {}".format(deps)) +                print("sudo pip3 install {}=={}".format(package, version)) +                return + +get_install('opencv-python', 'cp37m') +get_install('opencv-python', 'cp35m') +get_install('opencv-python-headless', 'cp37m') +get_install('opencv-python-headless', 'cp35m') +``` + +We also provide a general API endpoint for the list of packages, which includes download stats for each package: + + +``` +import requests + +url = "" +packages = requests.get(url).json() +packages = { +    pkg: (d_month, d_all) +    for pkg, d_month, d_all, *_ in packages +} + +package = 'numpy' +d_month, d_all = packages[package] + +print(package, "has had", d_month, "downloads in the last month") +print(package, "has had", d_all, "downloads in total") +``` + +### pip search + +Since `pip search` is currently disabled due to its XMLRPC interface being overloaded, people have been looking for alternatives. You can use the piwheels JSON API to search for package names instead since the set of packages is the same: + + +``` +#!/usr/bin/python3 +import sys + +import requests + +PIWHEELS_URL = '' + +r = requests.get(PIWHEELS_URL) +packages = {p[0] for p in r.json()} + +def search(term): +    for pkg in packages: +        if term in pkg: +            yield pkg + +if __name__ == '__main__': +    if len(sys.argv) == 2: +        results = search(sys.argv[1].lower()) +        for res in results: +            print(res) +    else: +        print("Usage: pip_search TERM") +``` + +For more information, see the piwheels [JSON API documentation][19]. + +* * * + +_This article originally appeared on Ben Nuttall's [Tooling Tuesday blog][20] and is reused with permission._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/python-package-index-json-apis-requests + +作者:[Ben Nuttall][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/bennuttall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/python_programming_question.png?itok=cOeJW-8r (Python programming language logo with question marks) +[2]: https://pypi.org/project/numpy/ +[3]: https://opensource.com/sites/default/files/uploads/numpy-project-page.png (NumPy project page) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://opensource.com/sites/default/files/uploads/pypi-json-firefox.png (JSON rendered in Firefox) +[6]: https://docs.python.org/3/tutorial/datastructures.html#dictionaries +[7]: https://opensource.com/sites/default/files/uploads/pypi-json-notebook.png (Inspecting data) +[8]: https://opensource.com/sites/default/files/uploads/pypi-json-releases.png (Inspecting keys in releases) +[9]: https://opensource.com/sites/default/files/uploads/pypi-json-inspect.png (Inspecting version) +[10]: https://opensource.com/sites/default/files/uploads/pypi-json-release.png (Indexing an item) +[11]: https://opensource.com/sites/default/files/uploads/pypi-json-requires-python.png (sdist files with requires_python attribute ) +[12]: https://blog.piwheels.org/requires-python-support-new-project-page-layout-and-a-new-json-api/ +[13]: https://www.piwheels.org/ +[14]: https://pypi.org/project/numpy +[15]: https://www.piwheels.org/project/numpy +[16]: https://www.piwheels.org/project/numpy/json +[17]: https://opensource.com/sites/default/files/uploads/piwheels-json.png (JSON files available in piwheels) +[18]: https://opensource.com/sites/default/files/uploads/piwheels-json-numpy.png (Metadata in JSON files in piwheels) +[19]: https://www.piwheels.org/json.html +[20]: https://tooling.bennuttall.com/accessing-python-package-index-json-apis-with-requests/ From 51ed0aa5db94c38af6d6d60eb2135f5f04519984 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 31 Mar 2021 05:23:02 +0800 Subject: [PATCH 509/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210330=20?= =?UTF-8?q?A=20DevOps=20guide=20to=20documentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210330 A DevOps guide to documentation.md --- ...0210330 A DevOps guide to documentation.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 sources/tech/20210330 A DevOps guide to documentation.md diff --git a/sources/tech/20210330 A DevOps guide to documentation.md b/sources/tech/20210330 A DevOps guide to documentation.md new file mode 100644 index 0000000000..4f9defbb3b --- /dev/null +++ b/sources/tech/20210330 A DevOps guide to documentation.md @@ -0,0 +1,93 @@ +[#]: subject: (A DevOps guide to documentation) +[#]: via: (https://opensource.com/article/21/3/devops-documentation) +[#]: author: (Will Kelly https://opensource.com/users/willkelly) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +A DevOps guide to documentation +====== +Bring your documentation writing into the DevOps lifecycle. +![Typewriter with hands][1] + +DevOps is challenging technical documentation norms like at no other time in IT history. From automation to increased delivery velocity to dismantling the waterfall software development lifecycle model, these all spell the need for making dramatic changes to business and the philosophy of technical documentation. + +Here are some ways DevOps is influencing technical documentation. + +### The technical writer's changing role + +The technical writer's role must adapt to DevOps. The good news is that many technical writers are already embedded in development teams, and they may have a leg up by already having collaborative relationships and growing knowledge of the product. + +But you have some pivoting to do if your technical writers are used to working in siloes and relying on drafts written by subject matter experts as the basis for documentation. + +Make the investments to ensure your documentation and other project-related content development efforts gain the tools, structure, and support they require. Start by changing your [technical writer hiring practices][2]. Documentation at the [speed of DevOps][3] requires rethinking your content strategy and breaking down longstanding silos between your DevOps team and the technical writer assigned to support the project. + +DevOps also causes development teams to break away from the rigors of traditional documentation practices. Foremost, documentation's [definition of done][4] must change. Some corporate cultures make the technical writer a passive participant in software development. DevOps makes new demands—as the DevOps cultural transformation goes, so does the technical writer's role. Writers will need (and must adjust to) the transparency DevOps offers. They must integrate into DevOps teams. Depending on how an organization casts the role, bringing the technical writer into the team may present skillset challenges. + +### Documentation standards, methodologies, and specifications + +While DevOps has yet to influence technical documentation itself, the open source community has stepped up to help with application programming interface (API) documentation that's finding use among DevOps teams in enterprises of all sizes. + +Open source specifications and tools for documenting APIs are an exciting area to watch. I'd like to think it is due to the influence of [Google Season of Docs][5], which gives open source software projects access to professional technical writing talent to tackle their most critical documentation projects. + +Open source APIs are available and need to become part of the DevOps documentation discussion. The importance of cloud-native application integration requirements is on the rise. The [OpenAPI specification][6]—an open standard for defining and documenting an API—is a good resource for API documentation in DevOps environments. However, a significant criticism is that the specification can make documentation time-consuming to create and keep current. + +There were brief attempts to create a [Continuous Documentation][7] methodology. There was also a movement to create a [DocOps][8] Framework that came out of CA (now Broadcom). Despite its initial promise, DocOps never caught on as an industry movement. + +The current state of DevOps documentation standards means your DevOps teams (including your technical writer) need to begin creating documentation at the earliest stages of a project. You do this by adding documentation as both an agile story and (just as important) as a management expectation; you enforce it by tying it to annual performance reviews. + +### Documentation tools + +DevOps documentation authoring should occur online in a format or a platform accessible to all team members. MediaWiki, DokuWiki, TikiWiki, and other [open source wikis][9] offer DevOps teams a central repository for authoring and maintaining documentation. + +Let teams choose their wiki just as you let them choose their other continuous integration/continuous development (CI/CD) toolchains. Part of the power of open source wikis is their extensibility. For example, DokuWiki includes a range of extensions you can install to create an authoring platform that meets your DevOps team's authoring requirements. + +If you're ambitious enough to bolster your team's authoring and collaboration capabilities, [Nextcloud][10] (an open source cloud collaboration suite) is an option for putting your DevOps teams online and giving them the tools they need to author documentation. + +### DevOps best practices + +Documentation also plays a role in DevOps transformation. You're going to want to document the best practices that help your organization realize efficiency and process gains from DevOps. This information is too important to communicate only by word of mouth across your DevOps teams. Documentation is a unifying force if your organization has multiple DevOps teams; it promotes standardization of best practices and sets you up to capture and benchmark metrics for code quality. + +Often it's developers who shoulder the work of documenting DevOps practices. Even if their organizations have technical writers, they might work across development teams. Thus, it's important that developers and sysadmins can capture, document, and communicate their best practices. Here are some tips to get that effort going in the right direction: + + * Invest the time upfront to create a standard template for your DevOps best practices. Don't fall into the trap of copying a template you find online. Interview your stakeholders and teams to create a template that meets your team's needs. + * Look for ways to be creative with information gathering, such as recording your team meetings and using chat system logs to serve as a foundation for your documentation. + * Establish a wiki for publishing your best practices. Use a wiki that lets you maintain an audit trail of edits and updates. Such a platform sets your teams up to update and maintain best practices as they change. + + + +It's smart to document dependencies as you build out your CI/CD toolchains. Such an effort pays off when you onboard new team members. It's also a little bit of insurance when a team member forgets something. + +Finally, automation is enticing to DevOps stakeholders and practitioners alike. It's all fun and games until automation breaks. Having documentation for automation run books, admin guides, and other things in place (and up to date) means your staff can get automation working again regardless of when it breaks down. + +### Final thoughts + +DevOps is a net positive for technical documentation. It pulls content development into the DevOps lifecycle and breaks down the siloes between developers and technical writers within the organizational culture. Without the luxury of a technical writer, teams get the tools to accelerate their document authoring's velocity to match the speed of DevOps. + +What is your organization doing to bring documentation into the DevOps lifecycle? Please share your experience in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/devops-documentation + +作者:[Will Kelly][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/willkelly +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/typewriter-hands.jpg?itok=oPugBzgv (Typewriter with hands) +[2]: https://opensource.com/article/19/11/hiring-technical-writers-devops +[3]: https://searchitoperations.techtarget.com/opinion/Make-DevOps-documentation-an-integral-part-of-your-strategy?_ga=2.73253915.980148481.1610758264-908287796.1564772842 +[4]: https://www.agilealliance.org/glossary/definition-of-done +[5]: https://developers.google.com/season-of-docs +[6]: https://swagger.io/specification/ +[7]: https://devops.com/continuous-documentation +[8]: https://www.cmswire.com/cms/information-management/the-importance-of-docops-in-the-new-era-of-business-027489.php +[9]: https://opensource.com/article/20/7/sharepoint-alternative +[10]: https://opensource.com/article/20/7/nextcloud From 9da3bf78cc716bd039ad5c38bdf7ab7e3139e8ce Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 31 Mar 2021 08:43:04 +0800 Subject: [PATCH 510/818] translated --- ... Why you should care about service mesh.md | 70 ------------------- ... Why you should care about service mesh.md | 70 +++++++++++++++++++ 2 files changed, 70 insertions(+), 70 deletions(-) delete mode 100644 sources/tech/20210326 Why you should care about service mesh.md create mode 100644 translated/tech/20210326 Why you should care about service mesh.md diff --git a/sources/tech/20210326 Why you should care about service mesh.md b/sources/tech/20210326 Why you should care about service mesh.md deleted file mode 100644 index 58e9cdd88b..0000000000 --- a/sources/tech/20210326 Why you should care about service mesh.md +++ /dev/null @@ -1,70 +0,0 @@ -[#]: subject: (Why you should care about service mesh) -[#]: via: (https://opensource.com/article/21/3/service-mesh) -[#]: author: (Daniel Oh https://opensource.com/users/daniel-oh) -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Why you should care about service mesh -====== -Service mesh provides benefits for development and operations in -microservices environments. -![Net catching 1s and 0s or data in the clouds][1] - -Many developers wonder why they should care about [service mesh][2]. It's a question I'm asked often in my presentations at developer meetups, conferences, and hands-on workshops about microservices development with cloud-native architecture. My answer is always the same: "As long as you want to simplify your microservices architecture, it should be running on Kubernetes." - -Concerning simplification, you probably also wonder why distributed microservices must be designed so complexly for running on Kubernetes clusters. As this article explains, many developers solve the microservices architecture's complexity with service mesh and gain additional benefits by adopting service mesh in production. - -### What is a service mesh? - -A service mesh is a dedicated infrastructure layer for providing a transparent and code-independent (polyglot) way to eliminate nonfunctional microservices capabilities from the application code. - -![Before and After Service Mesh][3] - -(Daniel Oh, [CC BY-SA 4.0][4]) - -### Why service mesh matters to developers - -When developers deploy microservices to the cloud, they have to address nonfunctional microservices capabilities to avoid cascading failures, regardless of business functionalities. Those capabilities typically can be represented in service discovery, logging, monitoring, resiliency, authentication, elasticity, and tracing. Developers must spend more time adding them to each microservice rather than developing actual business logic, which makes the microservices heavy and complex. - -As organizations accelerate their move to the cloud, the service mesh can increase developer productivity. Instead of making the services responsible for dealing with those complexities and adding more code into each service to deal with cloud-native concerns, the Kubernetes + service mesh platform is responsible for providing those services to any application (existing or new, in any programming language or framework) running on the platform. Then the microservices can be lightweight and focus on their business logic rather than cloud-native complexities. - -### Why service mesh matters to ops - -This doesn't answer why ops teams need to care about the service mesh for operating cloud-native microservices on Kubernetes. It's because the ops teams have to ensure robust security, compliance, and observability for spreading new cloud-native applications across large hybrid and multi clouds on Kubernetes environments. - -The service mesh is composed of a control plane for managing proxies to route traffic and a data plane for injecting sidecars. The sidecars allow the ops teams to do things like adding third-party security tools and tracing traffic in all service communications to avoid security breaches or compliance issues. The service mesh also improves observation capabilities by visualizing tracing metrics on graphical dashboards. - -### How to get started with service mesh - -Service mesh manages cloud-native capabilities more efficiently—for developers and operators and from application development to platform operation. - -You might want to know where to get started adopting service mesh in alignment with your microservices applications and architecture. Luckily, there are many open source service mesh projects. Many cloud service providers also offer service mesh capabilities within their Kubernetes platforms. - -![CNCF Service Mesh Landscape][5] - -(Daniel Oh, [CC BY-SA 4.0][4]) - -You can find links to the most popular service mesh projects and services on the [CNCF Service Mesh Landscape][6] webpage. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/service-mesh - -作者:[Daniel Oh][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/daniel-oh -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_analytics_cloud.png?itok=eE4uIoaB (Net catching 1s and 0s or data in the clouds) -[2]: https://www.redhat.com/en/topics/microservices/what-is-a-service-mesh -[3]: https://opensource.com/sites/default/files/uploads/vm-vs-service-mesh.png (Before and After Service Mesh) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: https://opensource.com/sites/default/files/uploads/service-mesh-providers.png (CNCF Service Mesh Landscape) -[6]: https://landscape.cncf.io/card-mode?category=service-mesh&grouping=category diff --git a/translated/tech/20210326 Why you should care about service mesh.md b/translated/tech/20210326 Why you should care about service mesh.md new file mode 100644 index 0000000000..8c555106ed --- /dev/null +++ b/translated/tech/20210326 Why you should care about service mesh.md @@ -0,0 +1,70 @@ +[#]: subject: (Why you should care about service mesh) +[#]: via: (https://opensource.com/article/21/3/service-mesh) +[#]: author: (Daniel Oh https://opensource.com/users/daniel-oh) +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +为什么你要关心 Service Mesh +====== +在微服务环境中,Service Mesh 为开发和运营提供了好处。 +![Net catching 1s and 0s or data in the clouds][1] + +很多开发者不知道为什么要关心 [Service Mesh][2]。这是我在开发者见面会、会议和实践研讨会上关于云原生架构的微服务开发的演讲中经常被问到的问题。我的回答总是一样的:“只要你想简化你的微服务架构,你就应该在 Kubernetes 上运行。” + +关于简化,你可能也想知道,为什么分布式微服务必须设计得如此复杂才能在 Kubernetes 集群上运行。正如本文所解释的那样,许多开发人员通过 Service Mesh 解决了微服务架构的复杂性,并通过在生产中采用 Service Mesh 获得了额外的好处。 + +### 什么是 Service Mesh? + +Service Mesh 是一个专门的基础设施层,用于提供一个透明的、独立于代码的 (polyglot) 方式,以消除应用代码中的非功能性微服务能力。 + + +![Before and After Service Mesh][3] + +(Daniel Oh, [CC BY-SA 4.0][4]) + +### 为什么 Service Mesh 对开发者很重要 + +当开发人员将微服务部署到云时,无论业务功能如何,他们都必须解决非功能性微服务功能,以避免级联故障。这些功能通常可以体现在服务发现、日志、监控、韧性、认证、弹性和跟踪等方面。开发人员必须花费更多的时间将它们添加到每个微服务中,而不是开发实际的业务逻辑,这使得微服务变得沉重而复杂。 + +随着企业加速向云计算转移,Service Mesh 可以提高开发人员的生产力。Kubernetes 加 Service Mesh 平台不需要让服务负责处理这些复杂的问题,也不需要在每个服务中添加更多的代码来处理云原生的问题,而是负责向运行在该平台上的任何应用(现有的或新的,用任何编程语言或框架)提供这些服务。那么微服务就可以轻量级,专注于其业务逻辑,而不是云原生的复杂性。 + +### 为什么 Service Mesh 对运维很重要 + +这并没有回答为什么运维团队需要关心在 Kubernetes 上运行云原生微服务的 Service Mesh。因为运维团队必须确保在 Kubernetes 环境上的大型混合云和多云上部署新的云原生应用的强大安全性、合规性和可观察性。 + +Service Mesh 由一个用于管理代理路由流量的 control plane 和一个用于注入 Sidecar 的 data plane 组成。Sidecar 允许运维团队做一些比如添加第三方安全工具和追踪所有服务通信中的流量,以避免安全漏洞或合规问题。Service Mesh 还可以通过在图形面板上可视化地跟踪指标来提高观察能力。 + +### 如何开始使用 Service Mesh + +对于开发者和运维人员,以及从应用开发到平台运营来说,Service Mesh 可以更有效地管理云原生功能。 + +你可能想知道从哪里开始采用 Service Mesh 来配合你的微服务应用和架构。幸运的是,有许多开源的 Service Mesh 项目。许多云服务提供商也在他们的 Kubernetes 平台中提供 Service Mesh。 + +![CNCF Service Mesh Landscape][5] + +(Daniel Oh, [CC BY-SA 4.0][4]) + +你可以在 [CNCF Service Mesh Landscape][6] 页面中找到最受欢迎的 Service Mesh 项目和服务的链接。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/service-mesh + +作者:[Daniel Oh][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/daniel-oh +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_analytics_cloud.png?itok=eE4uIoaB (Net catching 1s and 0s or data in the clouds) +[2]: https://www.redhat.com/en/topics/microservices/what-is-a-service-mesh +[3]: https://opensource.com/sites/default/files/uploads/vm-vs-service-mesh.png (Before and After Service Mesh) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://opensource.com/sites/default/files/uploads/service-mesh-providers.png (CNCF Service Mesh Landscape) +[6]: https://landscape.cncf.io/card-mode?category=service-mesh&grouping=category From 70b2e9cc3af378389c4b35aacd87c883412deb5d Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 31 Mar 2021 08:50:29 +0800 Subject: [PATCH 511/818] translating --- sources/tech/20210329 Manipulate data in files with Lua.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210329 Manipulate data in files with Lua.md b/sources/tech/20210329 Manipulate data in files with Lua.md index 5948f49599..7d47bed036 100644 --- a/sources/tech/20210329 Manipulate data in files with Lua.md +++ b/sources/tech/20210329 Manipulate data in files with Lua.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/3/lua-files) [#]: author: (Seth Kenlon https://opensource.com/users/seth) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From f9f77578f6bc2a4803ac4ea0a5cb180de8266331 Mon Sep 17 00:00:00 2001 From: wyxplus <32919297+wyxplus@users.noreply.github.com> Date: Wed, 31 Mar 2021 11:07:33 +0800 Subject: [PATCH 512/818] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...210326 How to read and write files in C.md | 144 ------------------ ...210326 How to read and write files in C.md | 141 +++++++++++++++++ 2 files changed, 141 insertions(+), 144 deletions(-) delete mode 100644 sources/tech/20210326 How to read and write files in C.md create mode 100644 translated/tech/20210326 How to read and write files in C.md diff --git a/sources/tech/20210326 How to read and write files in C.md b/sources/tech/20210326 How to read and write files in C.md deleted file mode 100644 index 8fe721461e..0000000000 --- a/sources/tech/20210326 How to read and write files in C.md +++ /dev/null @@ -1,144 +0,0 @@ -[#]: subject: (How to read and write files in C++) -[#]: via: (https://opensource.com/article/21/3/ccc-input-output) -[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99) -[#]: collector: (lujun9972) -[#]: translator: (wyxplus) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -How to read and write files in C++ -====== -If you know how to use I/O streams in C++, you can (in principle) handle -any kind of I/O device. -![Computer screen with files or windows open][1] - -In C++, reading and writing to files can be done by using I/O streams in conjunction with the stream operators `>>` and `<<`. When reading or writing to files, those operators are applied to an instance of a class representing a file on the hard drive. This stream-based approach has a huge advantage: From a C ++ perspective, it doesn't matter what you are reading or writing to, whether it's a file, a database, the console, or another PC you are connected to over the network. Therefore, knowing how to write files using stream operators can be transferred to other areas. - -### I/O stream classes - -The C++ standard library provides the class [ios_base][2]. This class acts as the base class for all I/O stream-compatible classes, such as [basic_ofstream][3] and [basic_ifstream][4]. This example will use the specialized types for reading/writing characters, `ifstream` and `ofstream`. - - * `ofstream` means _output file stream_, and it can be accessed with the insertion operator, `<<`. - * `ifstream` means _input file stream_, and it can be accessed with the extraction operator, `>>`. - - - -Both types are defined inside the header ``. - -A class that inherits from `ios_base` can be thought of as a data sink when writing to it or as a data source when reading from it, completely detached from the data itself. This object-oriented approach makes concepts such as [separation of concerns][5] and [dependency injection][6] easy to implement. - -### A simple example - -This example program is quite simple: It creates an `ofstream`, writes to it, creates an `ifstream`, and reads from it: - - -``` -#include <iostream> // cout, cin, cerr etc... -#include <fstream> // ifstream, ofstream -#include <string> - -int main() -{ -    std::string sFilename = "MyFile.txt";     - -    /****************************************** -     *                                        * -     *                WRITING                 * -     *                                        * -     ******************************************/ - -    std::ofstream fileSink(sFilename); // Creates an output file stream - -    if (!fileSink) { -        std::cerr << "Canot open " << sFilename << std::endl; -        exit(-1); -    } - -    /* std::endl will automatically append the correct EOL */ -    fileSink << "Hello Open Source World!" << std::endl; - -    /****************************************** -     *                                        * -     *                READING                 * -     *                                        * -     ******************************************/ -    -    std::ifstream fileSource(sFilename); // Creates an input file stream - -    if (!fileSource) { -        std::cerr << "Canot open " << sFilename << std::endl; -        exit(-1); -    } -    else { -        // Intermediate buffer -        std::string buffer; - -        // By default, the >> operator reads word by workd (till whitespace) -        while (fileSource >> buffer) -        { -            std::cout << buffer << std::endl; -        } -    } - -    exit(0); -} -``` - -This code is available on [GitHub][7]. When you compile and execute it, you should get the following output: - -![Console screenshot][8] - -(Stephan Avenwedde, [CC BY-SA 4.0][9]) - -This is a simplified, beginner-friendly example. If you want to use this code in your own application, please note the following: - - * The file streams are automatically closed at the end of the program. If you want to proceed with the execution, you should close them manually by calling the `close()` method. - * These file stream classes inherit (over several levels) from [basic_ios][10], which overloads the `!` operator. This lets you implement a simple check if you can access the stream. On [cppreference.com][11], you can find an overview of when this check will (and won't) succeed, and you can implement further error handling. - * By default, `ifstream` stops at white space and skips it. To read line by line until you reach [EOF][12], use the `getline(...)`-method. - * For reading and writing binary files, pass the `std::ios::binary` flag to the constructor: This prevents [EOL][13] characters from being appended to each line. - - - -### Writing from the systems perspective - -When writing files, the data is written to the system's in-memory write buffer. When the system receives the system call [sync][14], this buffer's contents are written to the hard drive. This mechanism is also the reason you shouldn't remove a USB stick without telling the system. Usually, _sync_ is called on a regular basis by a daemon. If you really want to be on the safe side, you can also call _sync_ manually: - - -``` -#include <unistd.h> // needs to be included - -sync(); -``` - -### Summary - -Reading and writing to files in C++ is not that complicated. Moreover, if you know how to deal with I/O streams, you also know (in principle) how to deal with any kind of I/O device. Libraries for various kinds of I/O devices let you use stream operators for easy access. This is why it is beneficial to know how I/O steams work. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/ccc-input-output - -作者:[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/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open) -[2]: https://en.cppreference.com/w/cpp/io/ios_base -[3]: https://en.cppreference.com/w/cpp/io/basic_ofstream -[4]: https://en.cppreference.com/w/cpp/io/basic_ifstream -[5]: https://en.wikipedia.org/wiki/Separation_of_concerns -[6]: https://en.wikipedia.org/wiki/Dependency_injection -[7]: https://github.com/hANSIc99/cpp_input_output -[8]: https://opensource.com/sites/default/files/uploads/c_console_screenshot.png (Console screenshot) -[9]: https://creativecommons.org/licenses/by-sa/4.0/ -[10]: https://en.cppreference.com/w/cpp/io/basic_ios -[11]: https://en.cppreference.com/w/cpp/io/basic_ios/operator! -[12]: https://en.wikipedia.org/wiki/End-of-file -[13]: https://en.wikipedia.org/wiki/Newline -[14]: https://en.wikipedia.org/wiki/Sync_%28Unix%29 diff --git a/translated/tech/20210326 How to read and write files in C.md b/translated/tech/20210326 How to read and write files in C.md new file mode 100644 index 0000000000..67d7b6c583 --- /dev/null +++ b/translated/tech/20210326 How to read and write files in C.md @@ -0,0 +1,141 @@ +[#]: subject: (How to read and write files in C++) +[#]: via: (https://opensource.com/article/21/3/ccc-input-output) +[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99) +[#]: collector: (lujun9972) +[#]: translator: (wyxplus) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +如何用 C++ 读写文件 +====== + +如果你知道如何在 C++ 中使用输入输出I/O输入输出I/O流,那么你便能够(原则上)处理任何类型的输入输出设备。 + +![Computer screen with files or windows open][1] + +在 C++ 中,可以通过将输入输出流与流运算符 `>>` 和 `<<` 结合使用来进行文件读写。当读写文件的时候,这些运算符将应用于代表硬盘驱动器上文件类的实例上。这种基于流的方法有个巨大的优势:从 C++ 的角度,无论你要读取或写入的内容是文件、数据库、控制台,亦或是你通过网络连接的另外一台电脑,这都无关紧要。因此,知道如何使用流运算符来写入文件能够被利用到其他领域。 + +### 输入输出流类 + +C++ 标准库提供了 [ios_base][2] 类。该类充当所有 I/O 流的基类,例如 [basic_ofstream][3] 和 [basic_ifstream][4]。本例将使用特殊的类型来读写字符,`ifstream` 和 `ofstream`。 + +- `ofstream`:输出文件流,并且其能通过插入运算符 `<<` 来实现。 +- `ifstream`:输入文件流,并且其能通过提取运算符 `>>` 来实现。 + +该两种类型都是在头文件 `` 中所定义。 + +从 `ios_base` 继承的类在写入时可被视为数据接收器,在从其读取时可被视为数据源,与数据本身完全分离。这种面向对象的方法使 [关注点分离][5]separation of concerns[关注点分离][5]separation of concerns 和 [依赖注入][6]dependency injection[依赖注入][6]dependency injection 等概念易于实现。 + +### A simple example 一个简单的例子 + +本例程是非常简单:实例化了一个 `ofstream` 来写入,和实例化一个 `ifstream` 来读取。 + + +``` +#include <iostream> // cout, cin, cerr etc... +#include <fstream> // ifstream, ofstream +#include <string> + +int main() +{ + std::string sFilename = "MyFile.txt"; + + /****************************************** + * * + * WRITING * + * * + ******************************************/ + + std::ofstream fileSink(sFilename); // Creates an output file stream + + if (!fileSink) { + std::cerr << "Canot open " << sFilename << std::endl; + exit(-1); + } + + /* std::endl will automatically append the correct EOL */ + fileSink << "Hello Open Source World!" << std::endl; + + /****************************************** + * * + * READING * + * * + ******************************************/ + + std::ifstream fileSource(sFilename); // Creates an input file stream + + if (!fileSource) { + std::cerr << "Canot open " << sFilename << std::endl; + exit(-1); + } + else { + // Intermediate buffer + std::string buffer; + + // By default, the >> operator reads word by workd (till whitespace) + while (fileSource >> buffer) + { + std::cout << buffer << std::endl; + } + } + + exit(0); +} +``` + +该代码可以在 [GitHub][7] 上查看。当你编译并且执行它时,你应该能获得以下输出: + +![Console screenshot][8] + +(Stephan Avenwedde, [CC BY-SA 4.0][9]) + +这是个简易、适合初学者的例子。如果你想去使用该代码在你自己的应用中,最好遵从以下建议: + + * 文件流在程序结束的时候自动关闭。如果你想继续执行,那么应该通过调用 `close()` 方法手动关闭。 + * 这些文件流类继承自 [basic_ios][10](在多个级别上),并且重载了 `!` 运算符。这使你可以进行简单的检查,是否可以访问该流。在 [cppreference.com][11] 上,你可以找到该检查何时会(或不会)成功的概述,并且可以进一步实现错误处理。 + * 默认情况下,`ifstream` 停在空白处并跳过它。要逐行读取直到到达 [EOF][13] ,请使用 `getline(...)` 方法。 + * 为了读写二进制文件,请将 `std::ios::binary` 标志传递给构造函数:这样可以防止 [EOL][13] 字符附加到每一行。 + +### 从系统角度进行写入 + +写入文件时,数据将写入系统的内存写入缓冲区中。当系统收到系统调用 [sync][14] 时,此缓冲区的内容将被写入硬盘。这也是你在不告知系统的情况下,不要卸下 U 盘的原因。通常,守护进程会定期调用 _sync_。为了安全起见,也可以手动调用 _sync_: + + +``` +#include <unistd.h> // needs to be included + +sync(); +``` + +### 总结 + +在 C++ 中读写文件并不那么复杂。更何况,如果你知道如何处理输入输出流,(原则上)那么你也知道如何处理任何类型的输入输出设备。对于各种输入输出设备的库能让你更容易地使用流运算符。这就是为什么知道输入输出流的流程会对你有所助益的原因。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/ccc-input-output + +作者:[Stephan Avenwedde][a] +选题:[lujun9972][b] +译者:[wyxplus](https://github.com/wyxplus) +校对:[校对者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/browser_screen_windows_files.png?itok=kLTeQUbY "Computer screen with files or windows open" +[2]: https://en.cppreference.com/w/cpp/io/ios_base +[3]: https://en.cppreference.com/w/cpp/io/basic_ofstream +[4]: https://en.cppreference.com/w/cpp/io/basic_ifstream +[5]: https://en.wikipedia.org/wiki/Separation_of_concerns +[6]: https://en.wikipedia.org/wiki/Dependency_injection +[7]: https://github.com/hANSIc99/cpp_input_output +[8]: https://opensource.com/sites/default/files/uploads/c_console_screenshot.png "Console screenshot" +[9]: https://creativecommons.org/licenses/by-sa/4.0/ +[10]: https://en.cppreference.com/w/cpp/io/basic_ios +[11]: https://en.cppreference.com/w/cpp/io/basic_ios/operator! +[12]: https://en.wikipedia.org/wiki/End-of-file +[13]: https://en.wikipedia.org/wiki/Newline +[14]: https://en.wikipedia.org/wiki/Sync_%28Unix%29 From 747f87b340527608592fbdf11fc1380acdf47573 Mon Sep 17 00:00:00 2001 From: wyxplus <32919297+wyxplus@users.noreply.github.com> Date: Wed, 31 Mar 2021 11:09:13 +0800 Subject: [PATCH 513/818] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- translated/tech/20210326 How to read and write files in C.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20210326 How to read and write files in C.md b/translated/tech/20210326 How to read and write files in C.md index 67d7b6c583..72250fde0f 100644 --- a/translated/tech/20210326 How to read and write files in C.md +++ b/translated/tech/20210326 How to read and write files in C.md @@ -10,7 +10,7 @@ 如何用 C++ 读写文件 ====== -如果你知道如何在 C++ 中使用输入输出I/O输入输出I/O流,那么你便能够(原则上)处理任何类型的输入输出设备。 +如果你知道如何在 C++ 中使用输入输出I/O流,那么你便能够(原则上)处理任何类型的输入输出设备。 ![Computer screen with files or windows open][1] From e9935bce9c50c0a721754261c456704ca1a1d8d4 Mon Sep 17 00:00:00 2001 From: wyxplus <32919297+wyxplus@users.noreply.github.com> Date: Wed, 31 Mar 2021 11:12:06 +0800 Subject: [PATCH 514/818] Update 20210326 How to read and write files in C.md --- translated/tech/20210326 How to read and write files in C.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/tech/20210326 How to read and write files in C.md b/translated/tech/20210326 How to read and write files in C.md index 72250fde0f..63b71f7a6a 100644 --- a/translated/tech/20210326 How to read and write files in C.md +++ b/translated/tech/20210326 How to read and write files in C.md @@ -25,9 +25,9 @@ C++ 标准库提供了 [ios_base][2] 类。该类充当所有 I/O 流的基类 该两种类型都是在头文件 `` 中所定义。 -从 `ios_base` 继承的类在写入时可被视为数据接收器,在从其读取时可被视为数据源,与数据本身完全分离。这种面向对象的方法使 [关注点分离][5]separation of concerns[关注点分离][5]separation of concerns 和 [依赖注入][6]dependency injection[依赖注入][6]dependency injection 等概念易于实现。 +从 `ios_base` 继承的类在写入时可被视为数据接收器,在从其读取时可被视为数据源,与数据本身完全分离。这种面向对象的方法使 [关注点分离][5]separation of concerns[依赖注入][6]dependency injection 等概念易于实现。 -### A simple example 一个简单的例子 +### 一个简单的例子 本例程是非常简单:实例化了一个 `ofstream` 来写入,和实例化一个 `ifstream` 来读取。 From 5002dfec06fb82024e1ae8d1fc9636f1cd68730d Mon Sep 17 00:00:00 2001 From: wyxplus <32919297+wyxplus@users.noreply.github.com> Date: Wed, 31 Mar 2021 11:34:06 +0800 Subject: [PATCH 515/818] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0190319 How to set up a homelab from hardware to firewall.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190319 How to set up a homelab from hardware to firewall.md b/sources/tech/20190319 How to set up a homelab from hardware to firewall.md index d8bb34395b..b844354687 100644 --- a/sources/tech/20190319 How to set up a homelab from hardware to firewall.md +++ b/sources/tech/20190319 How to set up a homelab from hardware to firewall.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wyxplus) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 9a3bcbb1fed447f06977757846b17ed952c30c33 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 31 Mar 2021 23:05:30 +0800 Subject: [PATCH 516/818] PRF @geekpi --- ...le high-temperature 3D printers at home.md | 29 +++++++++---------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/translated/tech/20210323 Affordable high-temperature 3D printers at home.md b/translated/tech/20210323 Affordable high-temperature 3D printers at home.md index 3f04f1c553..f3d153ad62 100644 --- a/translated/tech/20210323 Affordable high-temperature 3D printers at home.md +++ b/translated/tech/20210323 Affordable high-temperature 3D printers at home.md @@ -3,50 +3,47 @@ [#]: author: (Joshua Pearce https://opensource.com/users/jmpearce) [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) 在家就能用得起的高温 3D 打印机 ====== -有多实惠?低于 1000 美元。 + +> 有多实惠?低于 1000 美元。 + ![High-temperature 3D-printed mask][1] -3D 打印机从 20 世纪 80 年代就已经出现了,但直到 [RepRap][2] 项目开源后,才得到大众的关注。RepRap 是 self-replicating rapid prototyper (自我复制快速原型机) 的缩写,它是一种基本上可以自己打印的 3D 打印机。[2004 年][3]发布开源计划在后,导致 3D 打印机的成本从几十万美金降到了几百美金。 +3D 打印机从 20 世纪 80 年代就已经出现了,但是由于 [RepRap][2] 项目的出现,它们直到获得开源才受到人们的关注。RepRap 意即自我复制快速原型机self-replicating rapid prototyper,它是一种基本上可以自己打印的 3D 打印机。它的开源计划[2004 年][3] 发布之后,导致 3D 打印机的成本从几十万美金降到了几百美金。 -这些开源的桌面工具一直局限于 ABS 等低性能、低温的热塑性塑料(如乐高积木)。市场上有几款高温打印机,但其高昂的成本(几万到几十万美元)使大多数人无法获得。直到最近,它们才参与了很多竞争,因为它们被一项专利 (US6722872B1) 锁定,该专利于 2021 年 2 月 27 日[到期][4]。 +这些开源的桌面工具一直局限于 ABS 等低性能、低温热塑性塑料(如乐高积木)。市场上有几款高温打印机,但其高昂的成本(几万到几十万美元)使大多数人无法获得。直到最近,它们才参与了很多竞争,因为它们被一项专利 (US6722872B1) 锁定,该专利于 2021 年 2 月 27 日[到期][4]。 随着这个路障的消除,我们即将看到高温、低成本、熔融纤维 3D 打印机的爆发。 价格低到什么程度?低于 1000 美元如何。 -在疫情最严重的时候,我的团队赶紧发布了一个[开源高温 3D 打印机][5]的设计,用于制造可热灭菌的个人防护装备 (PPE)。该项目的想法是让人们能够[用高温材料打印 PPE][6](如口罩),并将它放入家用烤箱进行消毒。我们称我们的设备为 Cerberus,它具有以下特点: +在疫情最严重的时候,我的团队赶紧发布了一个 [开源高温 3D 打印机][5] 的设计,用于制造可高温消毒的个人防护装备(PPE)。该项目的想法是让人们能够 [用高温材料打印 PPE][6](如口罩),并将它放入家用烤箱进行消毒。我们称我们的设备为 Cerberus,它具有以下特点: - 1. 可达到 200℃ 加热床 + 1. 可达到 200℃ 的加热床 2. 可达到 500℃ 的热源 3. 带有 1kW 加热器核心的隔离式加热室。 4. 主电源(交流电源)电压室和床身加热,以便快速启动。 - - 你可以用现成的零件来构建这个项目,其中一些零件你可以打印,价格不到 1000 美元。它可以成功打印聚醚酮酮 (PEKK) 和聚醚酰亚胺(PEI,以商品名 Ultem 出售)。这两种材料都比现在低成本打印机能打印的任何材料强得多。 ![PPE printer][7] -(J.M.Pearce, [GNU Free Documentation License][8]) - 这款高温 3D 打印机的设计是有三个头,但我们发布的时候只有一个头。Cerberus 是以希腊神话中的三头冥界看门狗命名的。通常情况下,我们不会发布只有一个头的打印机,但疫情改变了我们的优先级。[开源社区团结起来][9],帮助解决早期的供应不足,许多桌面 3D 打印机都在产出有用的产品,以帮助保护人们免受 COVID 的侵害。 那另外两个头呢? -其他两个头是为了高温熔融颗粒制造(例如,这个开源的[3D打印机][10]的高温版本)和铺设在金属线中(像在[这个设计][11]中),以建立一个开源的热交换器。Cerberus 打印机的其他功能可能是一个自动喷嘴清洁器和在高温下打印连续纤维的方法。另外,你还可以在转台上安装任何你喜欢的东西来制造高端产品。 +其他两个头是为了高温熔融颗粒制造(例如,这个开源的 [3D打印机][10] 的高温版本)并铺设金属线(像在 [这个设计][11] 中),以建立一个开源的热交换器。Cerberus 打印机的其他功能可能是一个自动喷嘴清洁器和在高温下打印连续纤维的方法。另外,你还可以在转台上安装任何你喜欢的东西来制造高端产品。 +把一个盒子放在 3D 打印机周围,而把电子元件留在外面的 [专利][12] 到期,为高温家用 3D 打印机铺平了道路,这将使这些设备以合理的成本从单纯的玩具变为工业工具。 -把一个盒子放在 3D 打印机周围,而把电子元件留在外面的[专利][12]到期为高温家用 3D 打印机铺平了道路,这将使这些设备以合理的成本从单纯的玩具变为工业工具。 +已经有公司在 RepRap 传统的基础上,将这些低成本系统推向市场(例如,1250 美元的 [Creality3D CR-5 Pro][13] 3D 打印机可以达到 300℃)。Creality 销售最受欢迎的桌面 3D 打印机,并开源了部分设计。 -已经有公司在 RepRap 传统的基础上,将这些低成本系统推向市场(例如,1250 美元的 [Creality3D CR-5 Pro][13] 3D 打印机可以达到 300℃)。Creality 销售最受欢迎的桌面 3D 打印机,并开放了部分设计。 - -然而,要打印超高端工程聚合物,这些打印机需要达到 350℃ 以上。开源计划已经可以帮助桌面 3D 打印机制造商开始与垄断公司竞争,这些公司由于躲在专利背后,已经阻碍了 3D 打印 20 年。预计低成本、高温桌面 3D 打印机的竞争将真正升温! +然而,要打印超高端工程聚合物,这些打印机需要达到 350℃ 以上。开源计划已经可以帮助桌面 3D 打印机制造商开始与垄断公司竞争,这些公司由于躲在专利背后,已经阻碍了 3D 打印 20 年。期待低成本、高温桌面 3D 打印机的竞争将真正升温! -------------------------------------------------------------------------------- @@ -55,7 +52,7 @@ via: https://opensource.com/article/21/3/desktop-3d-printer 作者:[Joshua Pearce][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/) 荣誉推出 From 4aba265effe11a40076b55ce0627ed0dd3a3f326 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 31 Mar 2021 23:06:05 +0800 Subject: [PATCH 517/818] PUB @geekpi https://linux.cn/article-13255-1.html --- ...0210323 Affordable high-temperature 3D printers at home.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210323 Affordable high-temperature 3D printers at home.md (98%) diff --git a/translated/tech/20210323 Affordable high-temperature 3D printers at home.md b/published/20210323 Affordable high-temperature 3D printers at home.md similarity index 98% rename from translated/tech/20210323 Affordable high-temperature 3D printers at home.md rename to published/20210323 Affordable high-temperature 3D printers at home.md index f3d153ad62..fa2b49ee63 100644 --- a/translated/tech/20210323 Affordable high-temperature 3D printers at home.md +++ b/published/20210323 Affordable high-temperature 3D printers at home.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13255-1.html) 在家就能用得起的高温 3D 打印机 ====== From 4fe372b87cef5ac27b4953e4a3c75566cfa1a3cf Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 31 Mar 2021 23:39:49 +0800 Subject: [PATCH 518/818] PUB @wxy https://linux.cn/article-13256-1.html --- ...22 5 everyday sysadmin tasks to automate with Ansible.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20210322 5 everyday sysadmin tasks to automate with Ansible.md (98%) diff --git a/translated/tech/20210322 5 everyday sysadmin tasks to automate with Ansible.md b/published/20210322 5 everyday sysadmin tasks to automate with Ansible.md similarity index 98% rename from translated/tech/20210322 5 everyday sysadmin tasks to automate with Ansible.md rename to published/20210322 5 everyday sysadmin tasks to automate with Ansible.md index 435d0fc1bc..6f12202b57 100644 --- a/translated/tech/20210322 5 everyday sysadmin tasks to automate with Ansible.md +++ b/published/20210322 5 everyday sysadmin tasks to automate with Ansible.md @@ -4,15 +4,15 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13256-1.html) 用 Ansible 自动化系统管理员的 5 个日常任务 ====== > 通过使用 Ansible 自动执行可重复的日常任务,提高工作效率并避免错误。 -![Tips and gears turning][1] +![](https://img.linux.net.cn/data/attachment/album/202103/31/233904oo7q68eo2njfmf8o.jpg) 如果你讨厌执行重复性的任务,那么我有一个提议给你,去学习 [Ansible][2]! From d0b4e72ab7935561166eac66c2d13d6cba5d1d4c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 31 Mar 2021 23:56:52 +0800 Subject: [PATCH 519/818] =?UTF-8?q?=E5=BD=92=E6=A1=A3=20202103?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{ => 202103}/20160921 lawyer The MIT License, Line by Line.md | 0 published/{ => 202103}/20190221 Testing Bash with BATS.md | 0 ...90730 Using Python to explore Google-s Natural Language API.md | 0 ...0200122 9 favorite open source tools for Node.js developers.md | 0 .../20200127 Managing processes on Linux with kill and killall.md | 0 .../20200129 Ansible Playbooks Quick Start Guide with Examples.md | 0 ...ticloud, security integration drive massive SD-WAN adoption.md | 0 .../{ => 202103}/20200410 Get started with Bash programming.md | 0 ...0415 How to automate your cryptocurrency trades with Python.md | 0 .../20200702 6 best practices for managing Git repos.md | 0 .../20200915 Improve your time management with Jupyter.md | 0 .../20201014 Teach a virtual class with Moodle on Linux.md | 0 .../20201215 6 container concepts you need to understand.md | 0 .../20210113 Turn your Raspberry Pi into a HiFi music system.md | 0 ... Change the Look and Feel of Your KDE-Powered Linux Desktop.md | 0 .../20210121 Convert your Windows install into a VM on Linux.md | 0 ...10204 5 Tweaks to Customize the Look of Your Linux Terminal.md | 0 ...04 Get started with distributed tracing using Grafana Tempo.md | 0 .../{ => 202103}/20210216 How to install Linux in 3 steps.md | 0 .../{ => 202103}/20210216 What does being -technical- mean.md | 0 .../20210217 4 tech jobs for people who don-t code.md | 0 .../20210220 Run your favorite Windows applications on Linux.md | 0 ...guide to Python virtual environments with virtualenvwrapper.md | 0 ...uf- Terminal Tool -Friendly Alternative to du and df commands.md | 0 published/{ => 202103}/20210224 Set your path in FreeDOS.md | 0 published/{ => 202103}/20210225 4 new open source licenses.md | 0 .../{ => 202103}/20210226 3 Linux terminals you need to try.md | 0 .../20210228 How to Install the Latest Erlang on Ubuntu Linux.md | 0 .../20210301 4 open source tools for running a Linux server.md | 0 ...Meet SysMonTask- A Windows Task Manager Lookalike for Linux.md | 0 ...ble Linux Terminal for Power Users -Inspired by an FPS Game.md | 0 published/{ => 202103}/20210304 An Introduction to WebAssembly.md | 0 .../20210304 Learn to debug code with the GNU Debugger.md | 0 ...rnote Client on Ubuntu and Debian-based Linux Distributions.md | 0 ...ng things you can do with LibreOffice from the command line.md | 0 ...family calendar with a Raspberry Pi and a low-power display.md | 0 ... How to use Poetry to manage your Python projects on Fedora.md | 0 .../20210309 Learn Python dictionary values with Jupyter.md | 0 ... gImageReader to Extract Text From Images and PDFs on Linux.md | 0 .../{ => 202103}/20210310 How to Update openSUSE Linux System.md | 0 ...0210310 Understanding file names and directories in FreeDOS.md | 0 ...nux Mint Cinnamon vs MATE vs Xfce- Which One Should You Use.md | 0 ...20210311 Set up network parental controls on a Raspberry Pi.md | 0 ...ize multi-threaded Python programs with an open source tool.md | 0 ...0210315 6 things to know about using WebAssembly on Firefox.md | 0 .../20210315 Learn how file input and output works in C.md | 0 .../20210316 How to write -Hello World- in WebAssembly.md | 0 ...is a Nascent Screen Recorder for GNOME With Wayland Support.md | 0 ... Use gdu for a Faster Disk Usage Checking in Linux Terminal.md | 0 .../20210318 Practice using the Linux grep command.md | 0 .../20210319 4 cool new projects to try in Copr for March 2021.md | 0 ... Emulators for Linux (With Extra Features or Amazing Looks).md | 0 ...20210322 5 everyday sysadmin tasks to automate with Ansible.md | 0 .../{ => 202103}/20210322 Why I use exa instead of ls on Linux.md | 0 .../{ => 202103}/20210323 3 new Java tools to try in 2021.md | 0 .../20210323 Affordable high-temperature 3D printers at home.md | 0 56 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 202103}/20160921 lawyer The MIT License, Line by Line.md (100%) rename published/{ => 202103}/20190221 Testing Bash with BATS.md (100%) rename published/{ => 202103}/20190730 Using Python to explore Google-s Natural Language API.md (100%) rename published/{ => 202103}/20200122 9 favorite open source tools for Node.js developers.md (100%) rename published/{ => 202103}/20200127 Managing processes on Linux with kill and killall.md (100%) rename published/{ => 202103}/20200129 Ansible Playbooks Quick Start Guide with Examples.md (100%) rename published/{ => 202103}/20200219 Multicloud, security integration drive massive SD-WAN adoption.md (100%) rename published/{ => 202103}/20200410 Get started with Bash programming.md (100%) rename published/{ => 202103}/20200415 How to automate your cryptocurrency trades with Python.md (100%) rename published/{ => 202103}/20200702 6 best practices for managing Git repos.md (100%) rename published/{ => 202103}/20200915 Improve your time management with Jupyter.md (100%) rename published/{ => 202103}/20201014 Teach a virtual class with Moodle on Linux.md (100%) rename published/{ => 202103}/20201215 6 container concepts you need to understand.md (100%) rename published/{ => 202103}/20210113 Turn your Raspberry Pi into a HiFi music system.md (100%) rename published/{ => 202103}/20210118 KDE Customization Guide- Here are 11 Ways You Can Change the Look and Feel of Your KDE-Powered Linux Desktop.md (100%) rename published/{ => 202103}/20210121 Convert your Windows install into a VM on Linux.md (100%) rename published/{ => 202103}/20210204 5 Tweaks to Customize the Look of Your Linux Terminal.md (100%) rename published/{ => 202103}/20210204 Get started with distributed tracing using Grafana Tempo.md (100%) rename published/{ => 202103}/20210216 How to install Linux in 3 steps.md (100%) rename published/{ => 202103}/20210216 What does being -technical- mean.md (100%) rename published/{ => 202103}/20210217 4 tech jobs for people who don-t code.md (100%) rename published/{ => 202103}/20210220 Run your favorite Windows applications on Linux.md (100%) rename published/{ => 202103}/20210223 A guide to Python virtual environments with virtualenvwrapper.md (100%) rename published/{ => 202103}/20210224 Check Your Disk Usage Using ‘duf- Terminal Tool -Friendly Alternative to du and df commands.md (100%) rename published/{ => 202103}/20210224 Set your path in FreeDOS.md (100%) rename published/{ => 202103}/20210225 4 new open source licenses.md (100%) rename published/{ => 202103}/20210226 3 Linux terminals you need to try.md (100%) rename published/{ => 202103}/20210228 How to Install the Latest Erlang on Ubuntu Linux.md (100%) rename published/{ => 202103}/20210301 4 open source tools for running a Linux server.md (100%) rename published/{ => 202103}/20210302 Meet SysMonTask- A Windows Task Manager Lookalike for Linux.md (100%) rename published/{ => 202103}/20210303 Guake Terminal- A Customizable Linux Terminal for Power Users -Inspired by an FPS Game.md (100%) rename published/{ => 202103}/20210304 An Introduction to WebAssembly.md (100%) rename published/{ => 202103}/20210304 Learn to debug code with the GNU Debugger.md (100%) rename published/{ => 202103}/20210304 You Can Now Install Official Evernote Client on Ubuntu and Debian-based Linux Distributions.md (100%) rename published/{ => 202103}/20210305 5 surprising things you can do with LibreOffice from the command line.md (100%) rename published/{ => 202103}/20210307 Track your family calendar with a Raspberry Pi and a low-power display.md (100%) rename published/{ => 202103}/20210308 How to use Poetry to manage your Python projects on Fedora.md (100%) rename published/{ => 202103}/20210309 Learn Python dictionary values with Jupyter.md (100%) rename published/{ => 202103}/20210309 Use gImageReader to Extract Text From Images and PDFs on Linux.md (100%) rename published/{ => 202103}/20210310 How to Update openSUSE Linux System.md (100%) rename published/{ => 202103}/20210310 Understanding file names and directories in FreeDOS.md (100%) rename published/{ => 202103}/20210311 Linux Mint Cinnamon vs MATE vs Xfce- Which One Should You Use.md (100%) rename published/{ => 202103}/20210311 Set up network parental controls on a Raspberry Pi.md (100%) rename published/{ => 202103}/20210312 Visualize multi-threaded Python programs with an open source tool.md (100%) rename published/{ => 202103}/20210315 6 things to know about using WebAssembly on Firefox.md (100%) rename published/{ => 202103}/20210315 Learn how file input and output works in C.md (100%) rename published/{ => 202103}/20210316 How to write -Hello World- in WebAssembly.md (100%) rename published/{ => 202103}/20210316 Kooha is a Nascent Screen Recorder for GNOME With Wayland Support.md (100%) rename published/{ => 202103}/20210317 Use gdu for a Faster Disk Usage Checking in Linux Terminal.md (100%) rename published/{ => 202103}/20210318 Practice using the Linux grep command.md (100%) rename published/{ => 202103}/20210319 4 cool new projects to try in Copr for March 2021.md (100%) rename published/{ => 202103}/20210319 Top 10 Terminal Emulators for Linux (With Extra Features or Amazing Looks).md (100%) rename published/{ => 202103}/20210322 5 everyday sysadmin tasks to automate with Ansible.md (100%) rename published/{ => 202103}/20210322 Why I use exa instead of ls on Linux.md (100%) rename published/{ => 202103}/20210323 3 new Java tools to try in 2021.md (100%) rename published/{ => 202103}/20210323 Affordable high-temperature 3D printers at home.md (100%) diff --git a/published/20160921 lawyer The MIT License, Line by Line.md b/published/202103/20160921 lawyer The MIT License, Line by Line.md similarity index 100% rename from published/20160921 lawyer The MIT License, Line by Line.md rename to published/202103/20160921 lawyer The MIT License, Line by Line.md diff --git a/published/20190221 Testing Bash with BATS.md b/published/202103/20190221 Testing Bash with BATS.md similarity index 100% rename from published/20190221 Testing Bash with BATS.md rename to published/202103/20190221 Testing Bash with BATS.md diff --git a/published/20190730 Using Python to explore Google-s Natural Language API.md b/published/202103/20190730 Using Python to explore Google-s Natural Language API.md similarity index 100% rename from published/20190730 Using Python to explore Google-s Natural Language API.md rename to published/202103/20190730 Using Python to explore Google-s Natural Language API.md diff --git a/published/20200122 9 favorite open source tools for Node.js developers.md b/published/202103/20200122 9 favorite open source tools for Node.js developers.md similarity index 100% rename from published/20200122 9 favorite open source tools for Node.js developers.md rename to published/202103/20200122 9 favorite open source tools for Node.js developers.md diff --git a/published/20200127 Managing processes on Linux with kill and killall.md b/published/202103/20200127 Managing processes on Linux with kill and killall.md similarity index 100% rename from published/20200127 Managing processes on Linux with kill and killall.md rename to published/202103/20200127 Managing processes on Linux with kill and killall.md diff --git a/published/20200129 Ansible Playbooks Quick Start Guide with Examples.md b/published/202103/20200129 Ansible Playbooks Quick Start Guide with Examples.md similarity index 100% rename from published/20200129 Ansible Playbooks Quick Start Guide with Examples.md rename to published/202103/20200129 Ansible Playbooks Quick Start Guide with Examples.md diff --git a/published/20200219 Multicloud, security integration drive massive SD-WAN adoption.md b/published/202103/20200219 Multicloud, security integration drive massive SD-WAN adoption.md similarity index 100% rename from published/20200219 Multicloud, security integration drive massive SD-WAN adoption.md rename to published/202103/20200219 Multicloud, security integration drive massive SD-WAN adoption.md diff --git a/published/20200410 Get started with Bash programming.md b/published/202103/20200410 Get started with Bash programming.md similarity index 100% rename from published/20200410 Get started with Bash programming.md rename to published/202103/20200410 Get started with Bash programming.md diff --git a/published/20200415 How to automate your cryptocurrency trades with Python.md b/published/202103/20200415 How to automate your cryptocurrency trades with Python.md similarity index 100% rename from published/20200415 How to automate your cryptocurrency trades with Python.md rename to published/202103/20200415 How to automate your cryptocurrency trades with Python.md diff --git a/published/20200702 6 best practices for managing Git repos.md b/published/202103/20200702 6 best practices for managing Git repos.md similarity index 100% rename from published/20200702 6 best practices for managing Git repos.md rename to published/202103/20200702 6 best practices for managing Git repos.md diff --git a/published/20200915 Improve your time management with Jupyter.md b/published/202103/20200915 Improve your time management with Jupyter.md similarity index 100% rename from published/20200915 Improve your time management with Jupyter.md rename to published/202103/20200915 Improve your time management with Jupyter.md diff --git a/published/20201014 Teach a virtual class with Moodle on Linux.md b/published/202103/20201014 Teach a virtual class with Moodle on Linux.md similarity index 100% rename from published/20201014 Teach a virtual class with Moodle on Linux.md rename to published/202103/20201014 Teach a virtual class with Moodle on Linux.md diff --git a/published/20201215 6 container concepts you need to understand.md b/published/202103/20201215 6 container concepts you need to understand.md similarity index 100% rename from published/20201215 6 container concepts you need to understand.md rename to published/202103/20201215 6 container concepts you need to understand.md diff --git a/published/20210113 Turn your Raspberry Pi into a HiFi music system.md b/published/202103/20210113 Turn your Raspberry Pi into a HiFi music system.md similarity index 100% rename from published/20210113 Turn your Raspberry Pi into a HiFi music system.md rename to published/202103/20210113 Turn your Raspberry Pi into a HiFi music system.md diff --git a/published/20210118 KDE Customization Guide- Here are 11 Ways You Can Change the Look and Feel of Your KDE-Powered Linux Desktop.md b/published/202103/20210118 KDE Customization Guide- Here are 11 Ways You Can Change the Look and Feel of Your KDE-Powered Linux Desktop.md similarity index 100% rename from published/20210118 KDE Customization Guide- Here are 11 Ways You Can Change the Look and Feel of Your KDE-Powered Linux Desktop.md rename to published/202103/20210118 KDE Customization Guide- Here are 11 Ways You Can Change the Look and Feel of Your KDE-Powered Linux Desktop.md diff --git a/published/20210121 Convert your Windows install into a VM on Linux.md b/published/202103/20210121 Convert your Windows install into a VM on Linux.md similarity index 100% rename from published/20210121 Convert your Windows install into a VM on Linux.md rename to published/202103/20210121 Convert your Windows install into a VM on Linux.md diff --git a/published/20210204 5 Tweaks to Customize the Look of Your Linux Terminal.md b/published/202103/20210204 5 Tweaks to Customize the Look of Your Linux Terminal.md similarity index 100% rename from published/20210204 5 Tweaks to Customize the Look of Your Linux Terminal.md rename to published/202103/20210204 5 Tweaks to Customize the Look of Your Linux Terminal.md diff --git a/published/20210204 Get started with distributed tracing using Grafana Tempo.md b/published/202103/20210204 Get started with distributed tracing using Grafana Tempo.md similarity index 100% rename from published/20210204 Get started with distributed tracing using Grafana Tempo.md rename to published/202103/20210204 Get started with distributed tracing using Grafana Tempo.md diff --git a/published/20210216 How to install Linux in 3 steps.md b/published/202103/20210216 How to install Linux in 3 steps.md similarity index 100% rename from published/20210216 How to install Linux in 3 steps.md rename to published/202103/20210216 How to install Linux in 3 steps.md diff --git a/published/20210216 What does being -technical- mean.md b/published/202103/20210216 What does being -technical- mean.md similarity index 100% rename from published/20210216 What does being -technical- mean.md rename to published/202103/20210216 What does being -technical- mean.md diff --git a/published/20210217 4 tech jobs for people who don-t code.md b/published/202103/20210217 4 tech jobs for people who don-t code.md similarity index 100% rename from published/20210217 4 tech jobs for people who don-t code.md rename to published/202103/20210217 4 tech jobs for people who don-t code.md diff --git a/published/20210220 Run your favorite Windows applications on Linux.md b/published/202103/20210220 Run your favorite Windows applications on Linux.md similarity index 100% rename from published/20210220 Run your favorite Windows applications on Linux.md rename to published/202103/20210220 Run your favorite Windows applications on Linux.md diff --git a/published/20210223 A guide to Python virtual environments with virtualenvwrapper.md b/published/202103/20210223 A guide to Python virtual environments with virtualenvwrapper.md similarity index 100% rename from published/20210223 A guide to Python virtual environments with virtualenvwrapper.md rename to published/202103/20210223 A guide to Python virtual environments with virtualenvwrapper.md diff --git a/published/20210224 Check Your Disk Usage Using ‘duf- Terminal Tool -Friendly Alternative to du and df commands.md b/published/202103/20210224 Check Your Disk Usage Using ‘duf- Terminal Tool -Friendly Alternative to du and df commands.md similarity index 100% rename from published/20210224 Check Your Disk Usage Using ‘duf- Terminal Tool -Friendly Alternative to du and df commands.md rename to published/202103/20210224 Check Your Disk Usage Using ‘duf- Terminal Tool -Friendly Alternative to du and df commands.md diff --git a/published/20210224 Set your path in FreeDOS.md b/published/202103/20210224 Set your path in FreeDOS.md similarity index 100% rename from published/20210224 Set your path in FreeDOS.md rename to published/202103/20210224 Set your path in FreeDOS.md diff --git a/published/20210225 4 new open source licenses.md b/published/202103/20210225 4 new open source licenses.md similarity index 100% rename from published/20210225 4 new open source licenses.md rename to published/202103/20210225 4 new open source licenses.md diff --git a/published/20210226 3 Linux terminals you need to try.md b/published/202103/20210226 3 Linux terminals you need to try.md similarity index 100% rename from published/20210226 3 Linux terminals you need to try.md rename to published/202103/20210226 3 Linux terminals you need to try.md diff --git a/published/20210228 How to Install the Latest Erlang on Ubuntu Linux.md b/published/202103/20210228 How to Install the Latest Erlang on Ubuntu Linux.md similarity index 100% rename from published/20210228 How to Install the Latest Erlang on Ubuntu Linux.md rename to published/202103/20210228 How to Install the Latest Erlang on Ubuntu Linux.md diff --git a/published/20210301 4 open source tools for running a Linux server.md b/published/202103/20210301 4 open source tools for running a Linux server.md similarity index 100% rename from published/20210301 4 open source tools for running a Linux server.md rename to published/202103/20210301 4 open source tools for running a Linux server.md diff --git a/published/20210302 Meet SysMonTask- A Windows Task Manager Lookalike for Linux.md b/published/202103/20210302 Meet SysMonTask- A Windows Task Manager Lookalike for Linux.md similarity index 100% rename from published/20210302 Meet SysMonTask- A Windows Task Manager Lookalike for Linux.md rename to published/202103/20210302 Meet SysMonTask- A Windows Task Manager Lookalike for Linux.md diff --git a/published/20210303 Guake Terminal- A Customizable Linux Terminal for Power Users -Inspired by an FPS Game.md b/published/202103/20210303 Guake Terminal- A Customizable Linux Terminal for Power Users -Inspired by an FPS Game.md similarity index 100% rename from published/20210303 Guake Terminal- A Customizable Linux Terminal for Power Users -Inspired by an FPS Game.md rename to published/202103/20210303 Guake Terminal- A Customizable Linux Terminal for Power Users -Inspired by an FPS Game.md diff --git a/published/20210304 An Introduction to WebAssembly.md b/published/202103/20210304 An Introduction to WebAssembly.md similarity index 100% rename from published/20210304 An Introduction to WebAssembly.md rename to published/202103/20210304 An Introduction to WebAssembly.md diff --git a/published/20210304 Learn to debug code with the GNU Debugger.md b/published/202103/20210304 Learn to debug code with the GNU Debugger.md similarity index 100% rename from published/20210304 Learn to debug code with the GNU Debugger.md rename to published/202103/20210304 Learn to debug code with the GNU Debugger.md diff --git a/published/20210304 You Can Now Install Official Evernote Client on Ubuntu and Debian-based Linux Distributions.md b/published/202103/20210304 You Can Now Install Official Evernote Client on Ubuntu and Debian-based Linux Distributions.md similarity index 100% rename from published/20210304 You Can Now Install Official Evernote Client on Ubuntu and Debian-based Linux Distributions.md rename to published/202103/20210304 You Can Now Install Official Evernote Client on Ubuntu and Debian-based Linux Distributions.md diff --git a/published/20210305 5 surprising things you can do with LibreOffice from the command line.md b/published/202103/20210305 5 surprising things you can do with LibreOffice from the command line.md similarity index 100% rename from published/20210305 5 surprising things you can do with LibreOffice from the command line.md rename to published/202103/20210305 5 surprising things you can do with LibreOffice from the command line.md diff --git a/published/20210307 Track your family calendar with a Raspberry Pi and a low-power display.md b/published/202103/20210307 Track your family calendar with a Raspberry Pi and a low-power display.md similarity index 100% rename from published/20210307 Track your family calendar with a Raspberry Pi and a low-power display.md rename to published/202103/20210307 Track your family calendar with a Raspberry Pi and a low-power display.md diff --git a/published/20210308 How to use Poetry to manage your Python projects on Fedora.md b/published/202103/20210308 How to use Poetry to manage your Python projects on Fedora.md similarity index 100% rename from published/20210308 How to use Poetry to manage your Python projects on Fedora.md rename to published/202103/20210308 How to use Poetry to manage your Python projects on Fedora.md diff --git a/published/20210309 Learn Python dictionary values with Jupyter.md b/published/202103/20210309 Learn Python dictionary values with Jupyter.md similarity index 100% rename from published/20210309 Learn Python dictionary values with Jupyter.md rename to published/202103/20210309 Learn Python dictionary values with Jupyter.md diff --git a/published/20210309 Use gImageReader to Extract Text From Images and PDFs on Linux.md b/published/202103/20210309 Use gImageReader to Extract Text From Images and PDFs on Linux.md similarity index 100% rename from published/20210309 Use gImageReader to Extract Text From Images and PDFs on Linux.md rename to published/202103/20210309 Use gImageReader to Extract Text From Images and PDFs on Linux.md diff --git a/published/20210310 How to Update openSUSE Linux System.md b/published/202103/20210310 How to Update openSUSE Linux System.md similarity index 100% rename from published/20210310 How to Update openSUSE Linux System.md rename to published/202103/20210310 How to Update openSUSE Linux System.md diff --git a/published/20210310 Understanding file names and directories in FreeDOS.md b/published/202103/20210310 Understanding file names and directories in FreeDOS.md similarity index 100% rename from published/20210310 Understanding file names and directories in FreeDOS.md rename to published/202103/20210310 Understanding file names and directories in FreeDOS.md diff --git a/published/20210311 Linux Mint Cinnamon vs MATE vs Xfce- Which One Should You Use.md b/published/202103/20210311 Linux Mint Cinnamon vs MATE vs Xfce- Which One Should You Use.md similarity index 100% rename from published/20210311 Linux Mint Cinnamon vs MATE vs Xfce- Which One Should You Use.md rename to published/202103/20210311 Linux Mint Cinnamon vs MATE vs Xfce- Which One Should You Use.md diff --git a/published/20210311 Set up network parental controls on a Raspberry Pi.md b/published/202103/20210311 Set up network parental controls on a Raspberry Pi.md similarity index 100% rename from published/20210311 Set up network parental controls on a Raspberry Pi.md rename to published/202103/20210311 Set up network parental controls on a Raspberry Pi.md diff --git a/published/20210312 Visualize multi-threaded Python programs with an open source tool.md b/published/202103/20210312 Visualize multi-threaded Python programs with an open source tool.md similarity index 100% rename from published/20210312 Visualize multi-threaded Python programs with an open source tool.md rename to published/202103/20210312 Visualize multi-threaded Python programs with an open source tool.md diff --git a/published/20210315 6 things to know about using WebAssembly on Firefox.md b/published/202103/20210315 6 things to know about using WebAssembly on Firefox.md similarity index 100% rename from published/20210315 6 things to know about using WebAssembly on Firefox.md rename to published/202103/20210315 6 things to know about using WebAssembly on Firefox.md diff --git a/published/20210315 Learn how file input and output works in C.md b/published/202103/20210315 Learn how file input and output works in C.md similarity index 100% rename from published/20210315 Learn how file input and output works in C.md rename to published/202103/20210315 Learn how file input and output works in C.md diff --git a/published/20210316 How to write -Hello World- in WebAssembly.md b/published/202103/20210316 How to write -Hello World- in WebAssembly.md similarity index 100% rename from published/20210316 How to write -Hello World- in WebAssembly.md rename to published/202103/20210316 How to write -Hello World- in WebAssembly.md diff --git a/published/20210316 Kooha is a Nascent Screen Recorder for GNOME With Wayland Support.md b/published/202103/20210316 Kooha is a Nascent Screen Recorder for GNOME With Wayland Support.md similarity index 100% rename from published/20210316 Kooha is a Nascent Screen Recorder for GNOME With Wayland Support.md rename to published/202103/20210316 Kooha is a Nascent Screen Recorder for GNOME With Wayland Support.md diff --git a/published/20210317 Use gdu for a Faster Disk Usage Checking in Linux Terminal.md b/published/202103/20210317 Use gdu for a Faster Disk Usage Checking in Linux Terminal.md similarity index 100% rename from published/20210317 Use gdu for a Faster Disk Usage Checking in Linux Terminal.md rename to published/202103/20210317 Use gdu for a Faster Disk Usage Checking in Linux Terminal.md diff --git a/published/20210318 Practice using the Linux grep command.md b/published/202103/20210318 Practice using the Linux grep command.md similarity index 100% rename from published/20210318 Practice using the Linux grep command.md rename to published/202103/20210318 Practice using the Linux grep command.md diff --git a/published/20210319 4 cool new projects to try in Copr for March 2021.md b/published/202103/20210319 4 cool new projects to try in Copr for March 2021.md similarity index 100% rename from published/20210319 4 cool new projects to try in Copr for March 2021.md rename to published/202103/20210319 4 cool new projects to try in Copr for March 2021.md diff --git a/published/20210319 Top 10 Terminal Emulators for Linux (With Extra Features or Amazing Looks).md b/published/202103/20210319 Top 10 Terminal Emulators for Linux (With Extra Features or Amazing Looks).md similarity index 100% rename from published/20210319 Top 10 Terminal Emulators for Linux (With Extra Features or Amazing Looks).md rename to published/202103/20210319 Top 10 Terminal Emulators for Linux (With Extra Features or Amazing Looks).md diff --git a/published/20210322 5 everyday sysadmin tasks to automate with Ansible.md b/published/202103/20210322 5 everyday sysadmin tasks to automate with Ansible.md similarity index 100% rename from published/20210322 5 everyday sysadmin tasks to automate with Ansible.md rename to published/202103/20210322 5 everyday sysadmin tasks to automate with Ansible.md diff --git a/published/20210322 Why I use exa instead of ls on Linux.md b/published/202103/20210322 Why I use exa instead of ls on Linux.md similarity index 100% rename from published/20210322 Why I use exa instead of ls on Linux.md rename to published/202103/20210322 Why I use exa instead of ls on Linux.md diff --git a/published/20210323 3 new Java tools to try in 2021.md b/published/202103/20210323 3 new Java tools to try in 2021.md similarity index 100% rename from published/20210323 3 new Java tools to try in 2021.md rename to published/202103/20210323 3 new Java tools to try in 2021.md diff --git a/published/20210323 Affordable high-temperature 3D printers at home.md b/published/202103/20210323 Affordable high-temperature 3D printers at home.md similarity index 100% rename from published/20210323 Affordable high-temperature 3D printers at home.md rename to published/202103/20210323 Affordable high-temperature 3D printers at home.md From 7ae6aa75f3afd6e7dd185bbda7d2c5774acbbc50 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 1 Apr 2021 05:03:27 +0800 Subject: [PATCH 520/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210331=20?= =?UTF-8?q?Playing=20with=20modular=20synthesizers=20and=20VCV=20Rack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210331 Playing with modular synthesizers and VCV Rack.md --- ... with modular synthesizers and VCV Rack.md | 288 ++++++++++++++++++ 1 file changed, 288 insertions(+) create mode 100644 sources/tech/20210331 Playing with modular synthesizers and VCV Rack.md diff --git a/sources/tech/20210331 Playing with modular synthesizers and VCV Rack.md b/sources/tech/20210331 Playing with modular synthesizers and VCV Rack.md new file mode 100644 index 0000000000..8bfe39f95f --- /dev/null +++ b/sources/tech/20210331 Playing with modular synthesizers and VCV Rack.md @@ -0,0 +1,288 @@ +[#]: subject: (Playing with modular synthesizers and VCV Rack) +[#]: via: (https://fedoramagazine.org/vcv-rack-modular-synthesizers/) +[#]: author: (Yann Collette https://fedoramagazine.org/author/ycollet/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Playing with modular synthesizers and VCV Rack +====== + +![][1] + +You know about using Fedora Linux to write code, books, play games, and listen to music. You can also do system simulation, work on electronic circuits, work with embedded systems too via [Fedora Labs][2]. But you can also make music with the VCV Rack software. For that, you can use to [Fedora Jam][3] or work from a standard Fedora Workstation installation with the [LinuxMAO Copr][4] repository enabled. This article describes how to use modular synthesizers controlled by Fedora Linux. + +### Some history + +The origin of the modular synthesizer dates back to the 1950’s and was soon followed in the 60’s by the Moog modular synthesizer. [Wikipedia has a lot more on the history][5]. + +![Moog synthesizer circa 1975][6] + +But, by the way, what is a modular synthesizer ? + +These synthesizers are made of hardware “blocks” or modules with specific functions like oscillators, amplifier, sequencer, and other various functions. The blocks are connected together by wires. You make music with these connected blocks by manipulating knobs. Most of these modular synthesizers came without keyboard. + +![][7] + +Modular synthesizers were very common in the early days of progressive rock (with Emerson Lake and Palmer) and electronic music (Klaus Schulze, for example).  + +After a while people forgot about modular synthesizers because they were cumbersome, hard to tune, hard to fix, and setting a patch (all the wires connecting the modules) was a time consuming task not very easy to perform live. Price was also a problem because systems were mostly sold as a small series of modules, and you needed at least 10 of them to have a decent set-up. + +In the last few years, there has been a rebirth of these synthesizers. Doepfer produces some affordable models and a lot of modules are also available and have open sources schematics and codes (check [Mutable instruments][8] for example). + +But, a few years ago came … [VCV Rack.][9] VCV Rack stands for **V**oltage **C**ontrolled **V**irtual Rack: software-based modular synthesizer lead by Andrew Belt. His first commit on [GitHub][10] was Monday Nov 14 18:34:40 2016.  + +### Getting started with VCV Rack + +#### Installation + +To be able to use VCV Rack, you can either go to the [VCV Rack web site][9] and install a binary for Linux or, you can activate a Copr repository dedicated to music: the [LinuxMAO Copr][4] repository (disclaimer: I am the man behind this Copr repository). As a reminder, Copr is not officially supported by Fedora infrastructure. Use packages at your own risk. + +Enable the repository with: + +``` +sudo dnf copr enable ycollet/linuxmao +``` + +Then install VCV Rack: + +``` +sudo dnf install Rack-v1 +``` + +You can now start VCV Rack from the console of via the Multimedia entry in the start menu: + +``` +$ Rack & +``` + +![][11] + +#### Add some modules + +The first step is now to clean up everything and leave just the **AUDIO-8** module. You can remove modules in various ways: + + * Click on a module and hit the backspace key + * Right click on a module and click “delete” + + + +The **AUDIO-8** module allows you to connect from and to audio devices. Here are the features for this module. + +![][12] + +Now it’s time to produce some noise (for the music, we’ll see that later). + +Right click inside VCV Rack (but outside of a module) and a module search window will appear.  + +![][13] + +Enter “VCO-2” in the search bar and click on the image of the module. This module is now on VCV Rack. + +To move a module: click and drag the module. + +To move a group of modules, hit shit + click + drag a module and all the modules on the right of the dragged modules will move with the selected module. + +![][14] + +Now you need to connect the modules by drawing a wire between the “OUT” connector of **VCO-2** module and the “1” “TO DEVICE” of **AUDIO-8** module. + +Left-click on the “OUT” connector of the **VCO-2** module and while keeping the left-click, drag your mouse to the “1” “TO DEVICE” of the **AUDIO-8** module. Once on this connector, release your left-click.  + +![][15] + +To remove a wire, do a right-click on the connector where the wire is connected. + +To draw a wire from an already connected connector, hold “ctrl+left+click” and draw the wire. For example, you can draw a wire from “OUT” connector of module **VCO-2** to the “2” “TO DEVICE” connector of **AUDIO-8** module. + +#### What are these wires ? + +Wires allow you to control various part of the module. The information handled by these wires are Control Voltages, Gate signals, and Trigger signals. + +**CV** ([Control Voltages][16]): These typically control pitch and range between a minimum value around -1 to -5 volt and a maximum value between 1 and 5 volt. + +What is the **GATE** signal you find on some modules? Imagine a keyboard sending out on/off data to an amplifier module: its voltage is at zero when no key is  pressed and jumps up to max level (5v for example) when a key is pressed; release the key, and the voltage goes back to zero again. A **GATE** signal can be emitted by things other than a keyboard. A clock module, for example, can emit gate signals. + +Finally, what is a **TRIGGER** signal you find on some modules? It’s a square pulse which starts when you press a key and stops after a while. + +In the modular world, **gate** and **trigger** signals are used to trigger drum machines, restart clocks, reset sequencers and so on.  + +#### Connecting everybody + +Let’s control an oscillator with a CV signal. But before that, remove your **VCO-2** module (click on the module and hit backspace). + +Do a right-click on VCV Rack a search for these modules: + + * **VCO-1** (a controllable oscillator) + * **LFO-1** (a low frequency oscillator which will control the frequency of the **VCO-1**) + + + +Now draw wires: + + * between the “SAW” connector of the **LFO-1** module and the “V/OCT” (Voltage per Octave) connector of the **VCO-1** module + * between the “SIN” connector of the **VCO-1** module and the “1” “TO DEVICE” of the **AUDIO-8** module + + + +![][17] + +You can adjust the range of the frequency by turning the FREQ knob of the **LFO-1** module. + +You can also adjust the low frequency of the sequence by turning the FREQ knob of the **VCO-1** module. + +### The Fundamental modules for VCV Rack + +When you install the **Rack-v1**, the **Rack-v1-Fundamental** package is automatically installed. **Rack-v1** only installs the rack system, with input / output modules, but without other basic modules. + +In the Fundamental VCV Rack packages, there are various modules available. + +![][18] + +Some important modules to have in mind: + + * **VCO**: Voltage Controlled Oscillator + * **LFO**: Low Frequency Oscillator + * **VCA**: Voltage Controlled Amplifier + * **SEQ**: Sequencers (to define a sequence of voltage / notes) + * **SCOPE**: an oscilloscope, very useful to debug your connexions + * **ADSR**: a module to generate an envelope for a note. ADSR stands for **A**ttack / **D**ecay / **S**ustain / **R**elease + + + +And there are a lot more functions available. I recommend you watch tutorials related to VCV Rack on YouTube to discover all these functionalities, in particular the Video Channel of [Omri Cohen][19]. + +### What to do next + +Are you limited to the Fundamental modules? No, certainly not! VCV Rack provides some closed sources modules (for which you’ll need to pay) and a lot of other modules which are open source. All the open source modules are packages for Fedora 32 and 33. How many VCV Rack packages are available ? + +``` +sudo dnf search rack-v1 | grep src | wc -l +150 +``` + +And counting.  Each month new packages appear. If you want to install everything at once, run: + +``` +sudo dnf install `dnf search rack-v1 | grep src | sed -e "s/\(^.*\)\.src.*/\1/"` +``` + +Here are some recommended modules to start with. + + * BogAudio (dnf install rack-v1-BogAudio) + * AudibleInstruments (dnf install rack-v1-AudibleInstruments) + * Valley (dnf install rack-v1-Valley) + * Befaco (dnf install rack-v1-Befaco) + * Bidoo (dnf install rack-v1-Bidoo) + * VCV-Recorder (dnf install rack-v1-VCV-Recorder) + + + +### A more complex case + +![][20] + +From Fundamental, use **MIXER**, **AUDIO-8**, **MUTERS**, **SEQ-3**, **VCO-1**, **ADSR**, **VCA**. + +Use: + + * **Plateau** module from Valley package (it’s an enhanced reverb). + * **BassDrum9** from DrumKit package. + * **HolonicSystems-Gaps** from HolonicSystems-Free package. + + + +How it sounds: checkout [this video][21] on my YouTube channel. + +### Managing MIDI + +VCV Rack as a bunch of modules dedicated to MIDI management. + +![][22] + +With these modules and with a tool like the Akai LPD-8: + +![][23] + +You can easily control knob in VCV Rack modules from a real life device. + +Before buying some devices, check it’s Linux compatibility. Normally every “USB Class Compliant” device works out of the box in every Linux distribution. + +The MIDI → Knob mapping is done via the “MIDI-MAP” module. Once you have selected the MIDI driver (first line) and MIDI device (second line), click on “unmapped”. Then, touch a knob you want to control on a module (for example the “FREQ” knob of the VCO-1 Fundamental module). Now, turn the knob of the MIDI device and there you are; the mapping is done. + +### Artistic scopes + +Last topic of this introduction paper: the scopes. + +VCV Rack has several standard (and useful) scopes. The **SCOPE** module from Fundamental for example. + +But it also has some interesting scopes. + +![][24] + +This used 3 **VCO-1** modules from Fundamental and a **fullscope** from wiqid-anomalies. + +The first connector at the top of the scope corresponds to the X input. The one below is the Y input and the other one below controls the color of the graph. + +For the complete documentation of this module, check: + + * the documentation of [wigid-anomalies][25] + * the documentation of the [fullscope][26] module + * the github repository of the [wigid-anomalies][27] module + + + +### For more information + +If you’re looking for help or want to talk to the VCV Rack Community, visit their [Discourse forum][28]. You can get _patches_ (a patch is the file saved by VCV Rack) for VCV Rack on [Patch Storage][29]. + +Check out how vintage synthesizers looks like on [Vintage Synthesizer Museum][30] or [Google’s online exhibition][31]. The documentary “[I Dream of Wires][32]” provides a look at the history of modular synthesizers. Finally, the book _[Developing Virtual Syntehsizers with VCV Rack][33]_ provides more depth. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/vcv-rack-modular-synthesizers/ + +作者:[Yann Collette][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/ycollet/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2021/03/music_synthesizers-816x345.jpg +[2]: https://labs.fedoraproject.org/ +[3]: https://fedoraproject.org/wiki/Fedora_Jam_Audio_Spin +[4]: https://copr.fedorainfracloud.org/coprs/ycollet/linuxmao/ +[5]: https://en.wikipedia.org/wiki/Modular_synthesizer +[6]: https://fedoramagazine.org/wp-content/uploads/2021/03/Moog_Modular_55_img1-1024x561.png +[7]: https://fedoramagazine.org/wp-content/uploads/2021/03/modular_synthesizer_-_jam_syntotek_stockholm_2014-09-09_photo_by_henning_klokkerasen_edit-1.jpg +[8]: https://mutable-instruments.net/ +[9]: https://vcvrack.com/ +[10]: https://github.com/VCVRack/Rack +[11]: https://fedoramagazine.org/wp-content/uploads/2021/03/Screenshot_20210309_215239-1024x498.png +[12]: https://fedoramagazine.org/wp-content/uploads/2021/03/Screenshot_20210309_232052.png +[13]: https://fedoramagazine.org/wp-content/uploads/2021/03/Screenshot_20210310_191531-1024x479.png +[14]: https://fedoramagazine.org/wp-content/uploads/2021/03/Screenshot_20210309_221358.png +[15]: https://fedoramagazine.org/wp-content/uploads/2021/03/Screenshot_20210309_222055.png +[16]: https://en.wikipedia.org/wiki/CV/gate +[17]: https://fedoramagazine.org/wp-content/uploads/2021/03/Screenshot_20210309_223840.png +[18]: https://fedoramagazine.org/wp-content/uploads/2021/03/Fundamental-showcase-1024x540.png +[19]: https://www.youtube.com/channel/UCuWKHSHTHMV_nVSeNH4gYAg +[20]: https://fedoramagazine.org/wp-content/uploads/2021/03/Screenshot_20210309_233506.png +[21]: https://www.youtube.com/watch?v=HhJ_HY2rN5k +[22]: https://fedoramagazine.org/wp-content/uploads/2021/03/Screenshot_20210310_193452-1024x362.png +[23]: https://fedoramagazine.org/wp-content/uploads/2021/03/235492.jpg +[24]: https://fedoramagazine.org/wp-content/uploads/2021/03/Screenshot_20210310_195044.png +[25]: https://library.vcvrack.com/wiqid-anomalies +[26]: https://library.vcvrack.com/wiqid-anomalies/fullscope +[27]: https://github.com/wiqid/anomalies +[28]: https://community.vcvrack.com/ +[29]: https://patchstorage.com/platform/vcv-rack/ +[30]: https://vintagesynthesizermuseum.com/ +[31]: https://artsandculture.google.com/story/7AUBadCIL5Tnow +[32]: http://www.idreamofwires.org/ +[33]: https://www.leonardo-gabrielli.info/vcv-book From 1f9bd1aaf1f0d2bd14e9cb3afd53ce78f7ba7c03 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 1 Apr 2021 05:04:52 +0800 Subject: [PATCH 521/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210401=20?= =?UTF-8?q?Wrong=20Time=20Displayed=20in=20Windows-Linux=20Dual=20Boot=20S?= =?UTF-8?q?etup=3F=20Here=E2=80=99s=20How=20to=20Fix=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md --- ...x Dual Boot Setup- Here-s How to Fix it.md | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 sources/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md diff --git a/sources/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md b/sources/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md new file mode 100644 index 0000000000..d1e626b69a --- /dev/null +++ b/sources/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md @@ -0,0 +1,104 @@ +[#]: subject: (Wrong Time Displayed in Windows-Linux Dual Boot Setup? Here’s How to Fix it) +[#]: via: (https://itsfoss.com/wrong-time-dual-boot/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Wrong Time Displayed in Windows-Linux Dual Boot Setup? Here’s How to Fix it +====== + +If you [dual boot Windows and Ubuntu][1] or any other Linux distribution, you might have noticed a time difference between the two operating systems. + +When you [use Linux][2], it shows the correct time. But when you boot into Windows, it shows the wrong time. Sometimes, it is the opposite and Linux shows the wrong time and Windows has the correct time. + +That’s strange specially because you are connected to the internet and your date and time is set to be used automatically. + +Don’t worry! You are not the only one to face this issue. You can fix it by using the following command in the Linux terminal: + +``` +timedatectl set-local-rtc 1 +``` + +Again, don’t worry. I’ll explain why you encounter a time difference in a dual boot setup. I’ll show you how the above command fixes the wrong time issue in Windows after dual boot. + +### Why Windows and Linux show different time in dual boot? + +A computer has two main clocks: a system clock and a hardware clock. + +A hardware clock which is also called RTC ([real time clock][3]) or CMOS/BIOS clock. This clock is outside the operating system, on your computer’s motherboard. It keeps on running even after your system is powered off. + +The system clock is what you see inside your operating system. + +When your computer is powered on, the hardware clock is read and used to set the system clock. Afterwards, the system clock is used for tracking time. If your operating system makes any changes to system clock, like changing time zone etc, it tries to sync this information to the hardware clock. + +By default, Linux assumes that the time stored in the hardware clock is in UTC, not the local time. On the other hand, Windows thinks that the time stored on the hardware clock is local time. That’s where the trouble starts. + +Let me explain with examples. + +You see I am in Kolkata time zone which is UTC+5:30. After installing when I set the [timezon][4][e][4] [in Ubuntu][4] to the Kolkata time zone, Ubuntu syncs this time information to the hardware clock but with an offset of 5:30 because it has to be in UTC for Linux. + +Let’ say the current time in Kolkata timezone is 15:00 which means that the UTC time is 09:30. + +Now when I turn off the system and boot into Windows, the hardware clock has the UTC time (09:30 in this example). But Windows thinks the hardware clock has stored the local time. And thus it changes the system clock (which should have shown 15:00) to use the UTC time (09:30) as the local time. And hence, Windows shows 09:30 as the time which is 5:30 hours behind the actual time (15:00 in our example). + +![][5] + +Again, if I set the correct time in Windows by toggling the automatic time zone and time buttons, you know what is going to happen? Now it will show the correct time on the system (15:00) and sync this information (notice the “Synchronize your clock” option in the image) to the hardware clock. + +If you boot into Linux, it reads the time from the hardware clock which is in local time (15:00) but since Linux believes it to be the UTC time, it adds an offset of 5:30 to the system clock. Now Linux shows a time of 20:30 which is 5:30 hours ahead of the actual time. + +Now that you understand the root cause of the time difference issues in dual boot, it’s time to see how to fix the issue. + +### Fixing Windows Showing Wrong Time in a Dual Boot Setup With Linux + +There are two ways you can go about handling this issue: + + * Make Windows use UTC time for the hardware clock + * Make Linux use local time for the hardware clock + + + +It is easier to make the changes in Linux and hence I’ll recommend going with the second method. + +Ubuntu and most other Linux distributions use systemd these days and hence you can use timedatectl command to change the settings. + +What you are doing is to tell your Linux system to use the local time for the hardware clock (RTC). You do that with the `set-local-rtc` (set local time for RTC) option: + +``` +timedatectl set-local-rtc 1 +``` + +As you can notice in the image below, the RTC now uses the local time. + +![][6] + +Now if you boot into Windows, it takes the hardware clock to be as local time which is actually correct this time. When you boot into Linux, your Linux system knows that the hardware clock is using local time, not UTC. And hence, it doesn’t try to add the off-set this time. + +This fixes the time difference issue between Linux and Windows in dual boot. + +You see a warning about not using local time for RTC. For desktop setups, it should not cause any issues. At least, I cannot think of one. + +I hope I made things clear for you. If you still have questions, please leave a comment below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/wrong-time-dual-boot/ + +作者:[Abhishek Prakash][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/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ +[2]: https://itsfoss.com/why-use-linux/ +[3]: https://www.computerhope.com/jargon/r/rtc.htm +[4]: https://itsfoss.com/change-timezone-ubuntu/ +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/set-time-windows.jpg?resize=800%2C491&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/set-local-time-for-rtc-ubuntu.png?resize=800%2C490&ssl=1 From 73d1f0aaa06d55943f8380acd0a511f59bb645aa Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 1 Apr 2021 05:05:12 +0800 Subject: [PATCH 522/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210331=20?= =?UTF-8?q?3=20reasons=20I=20use=20the=20Git=20cherry-pick=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210331 3 reasons I use the Git cherry-pick command.md --- ...asons I use the Git cherry-pick command.md | 198 ++++++++++++++++++ 1 file changed, 198 insertions(+) create mode 100644 sources/tech/20210331 3 reasons I use the Git cherry-pick command.md diff --git a/sources/tech/20210331 3 reasons I use the Git cherry-pick command.md b/sources/tech/20210331 3 reasons I use the Git cherry-pick command.md new file mode 100644 index 0000000000..0ce31f8798 --- /dev/null +++ b/sources/tech/20210331 3 reasons I use the Git cherry-pick command.md @@ -0,0 +1,198 @@ +[#]: subject: (3 reasons I use the Git cherry-pick command) +[#]: via: (https://opensource.com/article/21/3/git-cherry-pick) +[#]: author: (Manaswini Das https://opensource.com/users/manaswinidas) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +3 reasons I use the Git cherry-pick command +====== +Cherry-picking solves a lot of problems in Git repositories. Here are +three ways to fix your mistakes with git cherry-pick. +![Measuring and baking a cherry pie recipe][1] + +Finding your way around a version control system can be tricky. It can be massively overwhelming for a newbie, but being well-versed with the terminology and the basics of a version control system like Git is one of the baby steps to start contributing to open source. + +Being familiar with Git can also help you out of sticky situations in your open source journey. Git is powerful and makes you feel in control—there is not a single way in which you cannot revert to a working version. + +Here is an example to help you understand the importance of cherry-picking. Suppose you have made several commits in a branch, but you realize it's the wrong branch! What do you do now? Either you repeat all your changes in the correct branch and make a fresh commit, or you merge the branch into the correct branch. Wait, the former is too tedious, and you may not want to do the latter. So, is there a way? Yes, Git's got you covered. Here is where cherry-picking comes into play. As the term suggests, you can use it to hand-pick a commit from one branch and transfer it into another branch. + +There are various reasons to use cherry-picking. Here are three of them. + +### Avoid redundancy of efforts + +There's no need to redo the same changes in a different branch when you can just copy the same commits to the other branch. Please note that cherry-picking commits will create a fresh commit with a new hash in the other branch, so please don't be confused if you see a different commit hash. + +In case you are wondering what a commit hash is and how it is generated, here is a note to help you: A commit hash is a string generated using the [SHA-1][2] algorithm. The SHA-1 algorithm takes an input and outputs a unique 40-character hash. If you are on a [POSIX][3] system, try running this in your terminal: + + +``` +`$ echo -n "commit" | openssl sha1` +``` + +This outputs a unique 40-character hash, `4015b57a143aec5156fd1444a017a32137a3fd0f`. This hash represents the string `commit`. + +A SHA-1 hash generated by Git when you make a commit represents much more than just a single string. It represents: + + +``` +sha1( +    meta data +        commit message +        committer +        commit date +        author +        authoring date +    Hash of the entire tree object +) +``` + +This explains why you get a unique commit hash for the slightest change you make to your code. Not even a single change goes unnoticed. This is because Git has integrity. + +### Undoing/restoring lost changes + +Cherry-picking can be handy when you want to restore to a working version. When multiple developers are working on the same codebase, it is very likely for changes to get lost and the latest version to move to a stale or non-working version. That's where cherry-picking commits to the working version can be a savior. + +#### How does it work? + +Suppose there are two branches, `feature1` and `feature2`, and you want to apply commits from `feature1` to `feature2`. + +On the `feature1` branch, run a `git log` command, and copy the commit hash that you want to cherry-pick. You can see a series of commits resembling the code sample below. The alphanumeric code following "commit" is the commit hash that you need to copy. You may choose to copy the first six characters (`966cf3` in this example) for the sake of convenience: + + +``` +commit 966cf3d08b09a2da3f2f58c0818baa37184c9778 (HEAD -> master) +Author: manaswinidas <[me@example.com][4]> +Date:   Mon Mar 8 09:20:21 2021 +1300 + +   add instructions +``` + +Then switch to `feature2` and run `git cherry-pick` on the hash you just got from the log: + + +``` +$ git checkout feature2 +$ git cherry-pick 966cf3. +``` + +If the branch doesn't exist, use `git checkout -b feature2` to create it. + +Here's a catch: You may encounter the situation below: + + +``` +$ git cherry-pick 966cf3 +On branch feature2 +You are currently cherry-picking commit 966cf3d. + +nothing to commit, working tree clean +The previous cherry-pick is now empty, possibly due to conflict resolution. +If you wish to commit it anyway, use: + +   git commit --allow-empty + +Otherwise, please use 'git reset' +``` + +Do not panic. Just run `git commit --allow-empty` as suggested: + + +``` +$ git commit --allow-empty +[feature2 afb6fcb] add instructions +Date: Mon Mar 8 09:20:21 2021 +1300 +``` + +This opens your default editor and allows you to edit the commit message. It's acceptable to save the existing message if you have nothing to add. + +There you go; you did your first cherry-pick. As discussed above, if you run a `git log` on branch `feature2`, you will see a different commit hash. Here is an example: + + +``` +commit afb6fcb87083c8f41089cad58deb97a5380cb2c2 (HEAD -> feature2) +Author: manaswinidas <[me@example.com][4]> +Date:   Mon Mar 8 09:20:21 2021 +1300 +   add instructions +``` + +Don't be confused about the different commit hash. That just distinguishes between the commits in `feature1` and `feature2`. + +### Cherry-pick multiple commits + +But what if you want to cherry-pick multiple commits? You can use: + + +``` +`git cherry-pick ... ` +``` + +Please note that you don't have to use the entire commit hash; you can use the first five or six characters. + +Again, this is tedious. What if the commits you want to cherry-pick are a range of continuous commits? This approach is too much work. Don't worry; there's an easier way. + +Assume that you have two branches: + + * `feature1` includes commits you want to copy (from `commitA` (older) to `commitB`). + * `feature2` is the branch you want the commits to be transferred to from `feature1`. + + + +Then: + + 1. Enter `git checkout `. + 2. Get the hashes of `commitA` and `commitB`. + 3. Enter `git checkout `. + 4. Enter `git cherry-pick ^..` (please note that this includes `commitA` and `commitB`). + 5. Should you encounter a merge conflict, [solve it as usual][5] and then type `git cherry-pick --continue` to resume the cherry-pick process. + + + +### Important cherry-pick options + +Here are some useful options from the [Git documentation][6] that you can use with the `cherry-pick` command: + + * `-e`, `--edit`: With this option, `git cherry-pick` lets you edit the commit message prior to committing. + * `-s`, `--signoff`: Add a "Signed-off-by" line at the end of the commit message. See the signoff option in git-commit(1) for more information. + * `-S[]`, `--gpg-sign[=]`: These are GPG-sign commits. The `keyid` argument is optional and defaults to the committer identity; if specified, it must be stuck to the option without a space. + * `--ff`: If the current HEAD is the same as the parent of the cherry-picked commit, then a fast-forward to this commit will be performed. + + + +Here are some other sequencer subcommands (apart from continue): + + * `--quit`: You can forget about the current operation in progress. This can be used to clear the sequencer state after a failed cherry-pick or revert. + * `--abort`: Cancel the operation and return to the presequence state. + + + +Here are some examples of cherry-picking: + + * `git cherry-pick master`: Applies the change introduced by the commit at the tip of the master branch and creates a new commit with this change + * `git cherry-pick master~4 master~2`: Applies the changes introduced by the fifth and third-last commits pointed to by master and creates two new commits with these changes + + + +Feeling overwhelmed? You needn't remember all the commands. You can always type `git cherry-pick --help` in your terminal to look at more options or help. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/git-cherry-pick + +作者:[Manaswini 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://opensource.com/users/manaswinidas +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/pictures/cherry-picking-recipe-baking-cooking.jpg?itok=XVwse6hw (Measuring and baking a cherry pie recipe) +[2]: https://en.wikipedia.org/wiki/SHA-1 +[3]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[4]: mailto:me@example.com +[5]: https://opensource.com/article/20/4/git-merge-conflict +[6]: https://git-scm.com/docs/git-cherry-pick From b6d7f64dae4ae220f630a1d6aa5c2116d4354165 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 1 Apr 2021 05:05:30 +0800 Subject: [PATCH 523/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210331=20?= =?UTF-8?q?Use=20this=20open=20source=20tool=20to=20monitor=20variables=20?= =?UTF-8?q?in=20Python?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210331 Use this open source tool to monitor variables in Python.md --- ...rce tool to monitor variables in Python.md | 180 ++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 sources/tech/20210331 Use this open source tool to monitor variables in Python.md diff --git a/sources/tech/20210331 Use this open source tool to monitor variables in Python.md b/sources/tech/20210331 Use this open source tool to monitor variables in Python.md new file mode 100644 index 0000000000..8193f890e1 --- /dev/null +++ b/sources/tech/20210331 Use this open source tool to monitor variables in Python.md @@ -0,0 +1,180 @@ +[#]: subject: (Use this open source tool to monitor variables in Python) +[#]: via: (https://opensource.com/article/21/4/monitor-debug-python) +[#]: author: (Tian Gao https://opensource.com/users/gaogaotiantian) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Use this open source tool to monitor variables in Python +====== +Watchpoints is a simple but powerful tool to help you with monitoring +variables while debugging Python. +![Looking back with binoculars][1] + +When debugging code, you're often faced with figuring out when a variable changes. Without any advanced tools, you have the option of using print statements to announce the variables when you expect them to change. However, this is a very ineffective way because the variables could change in many places, and constantly printing them to a terminal is noisy, while printing them to a log file becomes unwieldy. + +This is a common issue, but now there is a simple but powerful tool to help you with monitoring variables: [watchpoints][2]. + +The [watchpoint concept is common in C and C++ debuggers][3] to monitor memories, but there's a lack of equivalent tools in Python. `watchpoints` fills in the gap. + +### Installing + +To use it, you must first install it by using `pip`: + + +``` +`$ python3 -m pip install watchpoints` +``` + +### Using watchpoints in Python + +For any variable you'd like to monitor, use the **watch** function on it. + + +``` +from watchpoints import watch + +a = 0 +watch(a) +a = 1 +``` + +As the variable changes, information about its value is printed to **stdout**: + + +``` +====== Watchpoints Triggered ====== + +Call Stack (most recent call last): +  <module> (my_script.py:5): +> a = 1 +a: +0 +-> +1 +``` + +The information includes: + + * The line where the variable was changed. + * The call stack. + * The previous/current value of the variable. + + + +It not only works with the variable itself, but it also works with object changes: + + +``` +from watchpoints import watch + +a = [] +watch(a) +a = {} # Trigger +a["a"] = 2 # Trigger +``` + +The callback is triggered when the variable **a** is reassigned, but also when the object assigned to a is changed. + +What makes it even more interesting is that the monitor is not limited by the scope. You can watch the variable/object anywhere you want, and the callback is triggered no matter what function the program is executing. + + +``` +from watchpoints import watch + +def func(var): +    var["a"] = 1 + +a = {} +watch(a) +func(a) +``` + +For example, this code prints: + + +``` +====== Watchpoints Triggered ====== + +Call Stack (most recent call last): + +  <module> (my_script.py:8): +> func(a) +  func (my_script.py:4): +> var["a"] = 1 +a: +{} +-> +{'a': 1} +``` + +The **watch** function can monitor more than a variable. It can also monitor the attributes and an element of a dictionary or list. + + +``` +from watchpoints import watch + +class MyObj: +    def __init__(self): +        self.a = 0 + +obj = MyObj() +d = {"a": 0} +watch(obj.a, d["a"]) # Yes you can do this +obj.a = 1 # Trigger +d["a"] = 1 # Trigger +``` + +This could help you narrow down to some specific objects that you are interested in. + +If you are not happy about the format of the output, you can customize it. Just define your own callback function: + + +``` +watch(a, callback=my_callback) + +# Or set it globally + +watch.config(callback=my_callback) +``` + +You can even bring up **pdb** when the trigger is hit: + + +``` +`watch.config(pdb=True)` +``` + +This behaves similarly to **breakpoint()**, giving you a debugger-like experience. + +If you don’t want to import the function in every single file, you can make it global by using **install** function: + + +``` +`watch.install() # or watch.install("func_name") and use it as func_name()` +``` + +Personally, I think the coolest thing about watchpoints is its intuitive usage. Are you interested in some data? Just "watch" it, and you'll know when your variable changes. + +### Try watchpoints + +I developed and maintain `watchpoints` on [GitHub][2], and have released it under the licensed under Apache 2.0. Install it and use it, and of course contribution is always welcome. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/monitor-debug-python + +作者:[Tian Gao][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/gaogaotiantian +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/look-binoculars-sight-see-review.png?itok=NOw2cm39 (Looking back with binoculars) +[2]: https://github.com/gaogaotiantian/watchpoints +[3]: https://opensource.com/article/21/3/debug-code-gdb From 840d58b1d4b0c627736cf7a4940fcf70d50841dd Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 1 Apr 2021 05:05:49 +0800 Subject: [PATCH 524/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210331=20?= =?UTF-8?q?A=20tool=20to=20spy=20on=20your=20DNS=20queries:=20dnspeep?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210331 A tool to spy on your DNS queries- dnspeep.md --- ...ool to spy on your DNS queries- dnspeep.md | 160 ++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 sources/tech/20210331 A tool to spy on your DNS queries- dnspeep.md diff --git a/sources/tech/20210331 A tool to spy on your DNS queries- dnspeep.md b/sources/tech/20210331 A tool to spy on your DNS queries- dnspeep.md new file mode 100644 index 0000000000..c91e05dc72 --- /dev/null +++ b/sources/tech/20210331 A tool to spy on your DNS queries- dnspeep.md @@ -0,0 +1,160 @@ +[#]: subject: (A tool to spy on your DNS queries: dnspeep) +[#]: via: (https://jvns.ca/blog/2021/03/31/dnspeep-tool/) +[#]: author: (Julia Evans https://jvns.ca/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +A tool to spy on your DNS queries: dnspeep +====== + +Hello! Over the last few days I made a little tool called [dnspeep][1] that lets you see what DNS queries your computer is making, and what responses it’s getting. It’s about [250 lines of Rust right now][2]. + +I’ll talk about how you can try it, what it’s for, why I made it, and some problems I ran into while writing it. + +### how to try it + +I built some binaries so you can quickly try it out. + +For Linux (x86): + +``` +wget https://github.com/jvns/dnspeep/releases/download/v0.1.0/dnspeep-linux.tar.gz +tar -xf dnspeep-linux.tar.gz +sudo ./dnspeep +``` + +For Mac: + +``` +wget https://github.com/jvns/dnspeep/releases/download/v0.1.0/dnspeep-macos.tar.gz +tar -xf dnspeep-macos.tar.gz +sudo ./dnspeep +``` + +It needs to run as root because it needs access to all the DNS packets your computer is sending. This is the same reason `tcpdump` needs to run as root – it uses `libpcap` which is the same library that tcpdump uses. + +You can also read the source and build it yourself at if you don’t want to just download binaries and run them as root :). + +### what the output looks like + +Here’s what the output looks like. Each line is a DNS query and the response. + +``` +$ sudo dnspeep +query name server IP response +A firefox.com 192.168.1.1 A: 44.235.246.155, A: 44.236.72.93, A: 44.236.48.31 +AAAA firefox.com 192.168.1.1 NOERROR +A bolt.dropbox.com 192.168.1.1 CNAME: bolt.v.dropbox.com, A: 162.125.19.131 +``` + +Those queries are from me going to `neopets.com` in my browser, and the `bolt.dropbox.com` query is because I’m running a Dropbox agent and I guess it phones home behind the scenes from time to time because it needs to sync. + +### why make another DNS tool? + +I made this because I think DNS can seem really mysterious when you don’t know a lot about it! + +Your browser (and other software on your computer) is making DNS queries all the time, and I think it makes it seem a lot more “real” when you can actually see the queries and responses. + +I also wrote this to be used as a debugging tool. I think the question “is this a DNS problem?” is harder to answer than it should be – I get the impression that when trying to check if a problem is caused by DNS people often use trial and error or guess instead of just looking at the DNS responses that their computer is getting. + +### you can see which software is “secretly” using the Internet + +One thing I like about this tool is that it gives me a sense for what programs on my computer are using the Internet! For example, I found out that something on my computer is making requests to `ping.manjaro.org` from time to time for some reason, probably to check I’m connected to the internet. + +A friend of mine actually discovered using this tool that he had some corporate monitoring software installed on his computer from an old job that he’d forgotten to uninstall, so you might even find something you want to remove. + +### tcpdump is confusing if you’re not used to it + +My first instinct when trying to show people the DNS queries their computer is making was to say “well, use tcpdump”! And `tcpdump` does parse DNS packets! + +For example, here’s what a DNS query for `incoming.telemetry.mozilla.org.` looks like: + +``` +11:36:38.973512 wlp3s0 Out IP 192.168.1.181.42281 > 192.168.1.1.53: 56271+ A? incoming.telemetry.mozilla.org. (48) +11:36:38.996060 wlp3s0 In IP 192.168.1.1.53 > 192.168.1.181.42281: 56271 3/0/0 CNAME telemetry-incoming.r53-2.services.mozilla.com., CNAME prod.data-ingestion.prod.dataops.mozgcp.net., A 35.244.247.133 (180) +``` + +This is definitely possible to learn to read, for example let’s break down the query: + +`192.168.1.181.42281 > 192.168.1.1.53: 56271+ A? incoming.telemetry.mozilla.org. (48)` + + * `A?` means it’s a DNS **query** of type A + * `incoming.telemetry.mozilla.org.` is the name being qeried + * `56271` is the DNS query’s ID + * `192.168.1.181.42281` is the source IP/port + * `192.168.1.1.53` is the destination IP/port + * `(48)` is the length of the DNS packet + + + +And in the response breaks down like this: + +`56271 3/0/0 CNAME telemetry-incoming.r53-2.services.mozilla.com., CNAME prod.data-ingestion.prod.dataops.mozgcp.net., A 35.244.247.133 (180)` + + * `3/0/0` is the number of records in the response: 3 answers, 0 authority, 0 additional. I think tcpdump will only ever print out the answer responses though. + * `CNAME telemetry-incoming.r53-2.services.mozilla.com`, `CNAME prod.data-ingestion.prod.dataops.mozgcp.net.`, and `A 35.244.247.133` are the three answers + * `56271` is the responses ID, which matches up with the query’s ID. That’s how you can tell it’s a response to the request in the previous line. + + + +I think what makes this format the most difficult to deal with (as a human who just wants to look at some DNS traffic) though is that you have to manually match up the requests and responses, and they’re not always on adjacent lines. That’s the kind of thing computers are good at! + +So I decided to write a little program (`dnspeep`) which would do this matching up and also remove some of the information I felt was extraneous. + +### problems I ran into while writing it + +When writing this I ran into a few problems. + + * I had to patch the `pcap` crate to make it work properly with Tokio on Mac OS ([this change][3]). This was one of those bugs which took many hours to figure out and 1 line to fix :) + * Different Linux distros seem to have different versions of `libpcap.so`, so I couldn’t easily distribute a binary that dynamically links libpcap (you can see other people having the same problem [here][4]). So I decided to statically compile libpcap into the tool on Linux. I still don’t really know how to do this properly in Rust, but I got it to work by copying the `libpcap.a` file into `target/release/deps` and then just running `cargo build`. + * The `dns_parser` crate I’m using doesn’t support all DNS query types, only the most common ones. I probably need to switch to a different crate for parsing DNS packets but I haven’t found the right one yet. + * Becuase the `pcap` interface just gives you raw bytes (including the Ethernet frame), I needed to [write code to figure out how many bytes to strip from the beginning to get the packet’s IP header][5]. I’m pretty sure there are some cases I’m still missing there. + + + +I also had a hard time naming it because there are SO MANY DNS tools already (dnsspy! dnssnoop! dnssniff! dnswatch!). I basically just looked at every synonym for “spy” and then picked one that seemed fun and did not already have a DNS tool attached to it. + +One thing this program doesn’t do is tell you which process made the DNS query, there’s a tool called [dnssnoop][6] I found that does that. It uses eBPF and it looks cool but I haven’t tried it. + +### there are probably still lots of bugs + +I’ve only tested this briefly on Linux and Mac and I already know of at least one bug (caused by not supporting enough DNS query types), so please report problems you run into! + +The bugs aren’t dangerous though – because the libpcap interface is read-only the worst thing that can happen is that it’ll get some input it doesn’t understand and print out an error or crash. + +### writing small educational tools is fun + +I’ve been having a lot of fun writing small educational DNS tools recently. + +So far I’ve made: + + * (a simple way to make DNS queries) + * (shows you exactly what happens behind the scenes when you make a DNS query) + * this tool (`dnspeep`) + + + +Historically I’ve mostly tried to explain existing tools (like `dig` or `tcpdump`) instead of writing my own tools, but often I find that the output of those tools is confusing, so I’m interested in making more friendly ways to see the same information so that everyone can understand what DNS queries their computer is making instead of just tcpdump wizards :). + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2021/03/31/dnspeep-tool/ + +作者:[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://github.com/jvns/dnspeep +[2]: https://github.com/jvns/dnspeep/blob/f5780dc822df5151f83703f05c767dad830bd3b2/src/main.rs +[3]: https://github.com/ebfull/pcap/pull/168 +[4]: https://github.com/google/gopacket/issues/734 +[5]: https://github.com/jvns/dnspeep/blob/f5780dc822df5151f83703f05c767dad830bd3b2/src/main.rs#L136 +[6]: https://github.com/lilydjwg/dnssnoop From dde51d3ab0ed870c9a42fa4d9493eec891f589b7 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 1 Apr 2021 08:59:39 +0800 Subject: [PATCH 525/818] translated --- ...20210324 Read and write files with Bash.md | 202 ------------------ ...20210324 Read and write files with Bash.md | 200 +++++++++++++++++ 2 files changed, 200 insertions(+), 202 deletions(-) delete mode 100644 sources/tech/20210324 Read and write files with Bash.md create mode 100644 translated/tech/20210324 Read and write files with Bash.md diff --git a/sources/tech/20210324 Read and write files with Bash.md b/sources/tech/20210324 Read and write files with Bash.md deleted file mode 100644 index f454a32d11..0000000000 --- a/sources/tech/20210324 Read and write files with Bash.md +++ /dev/null @@ -1,202 +0,0 @@ -[#]: subject: (Read and write files with Bash) -[#]: via: (https://opensource.com/article/21/3/input-output-bash) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Read and write files with Bash -====== -Learn the different ways Bash reads and writes data and when to use each -method. -![bash logo on green background][1] - -When you're scripting with Bash, sometimes you need to read data from or write data to a file. Sometimes a file may contain configuration options, and other times the file is the data your user is creating with your application. Every language handles this task a little differently, and this article demonstrates how to handle data files with Bash and other [POSIX][2] shells. - -### Install Bash - -If you're on Linux, you probably already have Bash. If not, you can find it in your software repository. - -On macOS, you can use the default terminal, either Bash or [Zsh][3], depending on the macOS version you're running. - -On Windows, there are several ways to experience Bash, including Microsoft's officially supported [Windows Subsystem for Linux][4] (WSL). - -Once you have Bash installed, open your favorite text editor and get ready to code. - -### Reading a file with Bash - -In addition to being [a shell][5], Bash is a scripting language. There are several ways to read data from Bash: You can create a sort of data stream and parse the output, or you can load data into memory. Both are valid methods of ingesting information, but each has pretty specific use cases. - -#### Source a file in Bash - -When you "source" a file in Bash, you cause Bash to read the contents of a file with the expectation that it contains valid data that Bash can fit into its established data model. You won't source data from any old file, but you can use this method to read configuration files and functions. - -For instance, create a file called `example.sh` and enter this into it: - - -``` -#!/bin/sh - -greet opensource.com - -echo "The meaning of life is $var" -``` - -Run the code to see it fail: - - -``` -$ bash ./example.sh -./example.sh: line 3: greet: command not found -The meaning of life is -``` - -Bash doesn't have a command called `greet`, so it could not execute that line, and it has no record of a variable called `var`, so there is no known meaning of life. To fix this problem, create a file called `include.sh`: - - -``` -greet() { -    echo "Hello ${1}" -} - -var=42 -``` - -Revise your `example.sh` script to include a `source` command: - - -``` -#!/bin/sh - -source include.sh - -greet opensource.com - -echo "The meaning of life is $var" -``` - -Run the script to see it work: - - -``` -$ bash ./example.sh -Hello opensource.com -The meaning of life is 42 -``` - -The `greet` command is brought into your shell environment because it is defined in the `include.sh` file, and it even recognizes the argument (`opensource.com` in this example). The variable `var` is set and imported, too. - -#### Parse a file in Bash - -The other way to get data "into" Bash is to parse it as a data stream. There are many ways to do this. You can use `grep` or `cat` or any command that takes data and pipes it to stdout. Alternately, you can use what is built into Bash: the redirect. Redirection on its own isn't very useful, so in this example, I also use the built-in `echo` command to print the results of the redirect: - - -``` -#!/bin/sh - -echo $( < include.sh ) -``` - -Save this as `stream.sh` and run it to see the results: - - -``` -$ bash ./stream.sh -greet() { echo "Hello ${1}" } var=42 -$ -``` - -For each line in the `include.sh` file, Bash prints (or echoes) the line to your terminal. Piping it first to an appropriate parser is a common way to read data with Bash. For instance, assume for a moment that `include.sh` is a configuration file with key and value pairs separated by an equal (`=`) sign. You could obtain values with `awk` or even `cut`: - - -``` -#!/bin/sh - -myVar=`grep var include.sh | cut -d'=' -f2` - -echo $myVar -``` - -Try running the script: - - -``` -$ bash ./stream.sh -42 -``` - -### Writing data to a file with Bash - -Whether you're storing data your user created with your application or just metadata about what the user did in an application (for instance, game saves or recent songs played), there are many good reasons to store data for later use. In Bash, you can save data to files using common shell redirection. - -For instance, to create a new file containing output, use a single redirect token: - - -``` -#!/bin/sh - -TZ=UTC -date > date.txt -``` - -Run the script a few times: - - -``` -$ bash ./date.sh -$ cat date.txt -Tue Feb 23 22:25:06 UTC 2021 -$ bash ./date.sh -$ cat date.txt -Tue Feb 23 22:25:12 UTC 2021 -``` - -To append data, use the double redirect tokens: - - -``` -#!/bin/sh - -TZ=UTC -date >> date.txt -``` - -Run the script a few times: - - -``` -$ bash ./date.sh -$ bash ./date.sh -$ bash ./date.sh -$ cat date.txt -Tue Feb 23 22:25:12 UTC 2021 -Tue Feb 23 22:25:17 UTC 2021 -Tue Feb 23 22:25:19 UTC 2021 -Tue Feb 23 22:25:22 UTC 2021 -``` - -### Bash for easy programming - -Bash excels at being easy to learn because, with just a few basic concepts, you can build complex programs. For the full documentation, refer to the [excellent Bash documentation][6] on GNU.org. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/input-output-bash - -作者:[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/bash_command_line.png?itok=k4z94W2U (bash logo on green background) -[2]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains -[3]: https://opensource.com/article/19/9/getting-started-zsh -[4]: https://opensource.com/article/19/7/ways-get-started-linux#wsl -[5]: https://www.redhat.com/sysadmin/terminals-shells-consoles -[6]: http://gnu.org/software/bash diff --git a/translated/tech/20210324 Read and write files with Bash.md b/translated/tech/20210324 Read and write files with Bash.md new file mode 100644 index 0000000000..2e493db99b --- /dev/null +++ b/translated/tech/20210324 Read and write files with Bash.md @@ -0,0 +1,200 @@ +[#]: subject: (Read and write files with Bash) +[#]: via: (https://opensource.com/article/21/3/input-output-bash) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +用 Bash 读写文件 +====== +学习 Bash 读取和写入数据的不同方式,以及何时使用每种方法。 +![bash logo on green background][1] + +当你使用 Bash 编写脚本时,有时你需要从一个文件中读取数据或向一个文件写入数据。有时文件可能包含配置选项,而另一些时候这个文件是你的用户用你的应用创建的数据。每种语言处理这个任务的方式都有些不同,本文将演示如何使用 Bash 和其他 [POSIX][2] shell 处理数据文件。 + +### 安装 Bash + +如果你在使用 Linux,你可能已经有了 Bash。如果没有,你可以在你的软件仓库里找到它。 + +在 macOS 上,你可以使用默认终端,Bash 或 [Zsh][3],这取决于你运行的 macOS 版本。 + +在 Windows 上,有几种方法可以体验 Bash,包括微软官方支持的 [Windows Subsystem for Linux][4](WSL)。 + +安装 Bash 后,打开你最喜欢的文本编辑器并准备开始。 + +### 使用 Bash 读取文件 + +除了是 [shell][5] 之外,Bash 还是一种脚本语言。有几种方法可以从 Bash 中读取数据。你可以创建一种数据流并解析输出, 或者你可以将数据加载到内存中. 这两种方法都是有效的获取信息的方法,但每种方法都有相当具体的用例。 + +#### 在 Bash 中 source 文件 + +当你在 Bash 中 “source” 一个文件时,你会让 Bash 读取文件的内容,期望它包含有效的数据,Bash 可以将这些数据放入它建立的数据模型中。你不会从任何旧文件中获取数据,但你可以使用这种方法来读取配置文件和函数。 + +例如,创建一个名为 `example.sh` 的文件,并输入以下内容: + + +``` +#!/bin/sh + +greet opensource.com + +echo "The meaning of life is $var" +``` + +运行这段代码,看见失败了: + + +``` +$ bash ./example.sh +./example.sh: line 3: greet: command not found +The meaning of life is +``` + +Bash 没有一个叫 `greet` 的命令,所以无法执行那一行,也没有一个叫 `var` 的变量记录,所以文件没有意义。为了解决这个问题,建立一个名为 `include.sh` 的文件: + + +``` +greet() { +    echo "Hello ${1}" +} + +var=42 +``` + +修改你的 `example.sh` 脚本,加入 `source` 命令: + + +``` +#!/bin/sh + +source include.sh + +greet opensource.com + +echo "The meaning of life is $var" +``` + +运行脚本,看见已经可以了: + + +``` +$ bash ./example.sh +Hello opensource.com +The meaning of life is 42 +``` + +`greet` 命令被带入你的 shell 环境,因为它被定义在 `include.sh` 文件中,它甚至可以识别参数(本例中的 `opensource.com`)。变量 `var` 也被设置和导入。 + +#### 在 Bash 中解析文件 + +另一种让数据“进入” Bash 的方法是将其解析为数据流。有很多方法可以做到这一点. 你可以使用 `grep` 或 `cat` 或任何可以获取数据并管道输出到标准输出的命令。另外,你可以使用 Bash 内置的东西:重定向。重定向本身并不是很有用, 所以在这个例子中, 我也使用内置的 `echo` 命令来打印重定向的结果: + + +``` +#!/bin/sh + +echo $( < include.sh ) +``` + +将其保存为 `stream.sh` 并运行它来查看结果: + + +``` +$ bash ./stream.sh +greet() { echo "Hello ${1}" } var=42 +$ +``` + +对于 `include.sh` 文件中的每一行,Bash 都会将该行打印(或 echo)到你的终端。先用管道把它传送到一个合适的解析器是用 Bash 读取数据的常用方法。例如, 假设 `include.sh` 是一个配置文件, 它的键和值对用一个等号(`=`)分开. 你可以用 `awk` 甚至 `cut` 来获取值: + + +``` +#!/bin/sh + +myVar=`grep var include.sh | cut -d'=' -f2` + +echo $myVar +``` + +试着运行这个脚本: + + +``` +$ bash ./stream.sh +42 +``` + +### 用 Bash 将数据写入文件 + +无论你是要存储用户用你的应用创建的数据,还是仅仅是关于用户在应用中做了什么的元数据(例如,游戏保存或最近播放的歌曲),都有很多很好的理由来存储数据供以后使用。在 Bash 中,你可以使用常见的 shell 重定向将数据保存到文件中。 + +例如, 要创建一个包含输出的新文件, 使用一个重定向符号: + + +``` +#!/bin/sh + +TZ=UTC +date > date.txt +``` + +运行脚本几次: + +``` +$ bash ./date.sh +$ cat date.txt +Tue Feb 23 22:25:06 UTC 2021 +$ bash ./date.sh +$ cat date.txt +Tue Feb 23 22:25:12 UTC 2021 +``` + +要追加数据,使用两个重定向符号: + + +``` +#!/bin/sh + +TZ=UTC +date >> date.txt +``` + +运行脚本几次: + + +``` +$ bash ./date.sh +$ bash ./date.sh +$ bash ./date.sh +$ cat date.txt +Tue Feb 23 22:25:12 UTC 2021 +Tue Feb 23 22:25:17 UTC 2021 +Tue Feb 23 22:25:19 UTC 2021 +Tue Feb 23 22:25:22 UTC 2021 +``` + +### Bash 轻松编程 + +Bash 的优势在于简单易学,因为只需要一些基本的概念,你就可以构建复杂的程序。完整的文档请参考 GNU.org 上的[优秀的 Bash 文档][6]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/input-output-bash + +作者:[Seth Kenlon][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/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bash_command_line.png?itok=k4z94W2U (bash logo on green background) +[2]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[3]: https://opensource.com/article/19/9/getting-started-zsh +[4]: https://opensource.com/article/19/7/ways-get-started-linux#wsl +[5]: https://www.redhat.com/sysadmin/terminals-shells-consoles +[6]: http://gnu.org/software/bash From d3677246f685ea1b76fda43b35b795d08d30edd0 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 1 Apr 2021 09:08:22 +0800 Subject: [PATCH 526/818] translating --- ... Use this open source tool to monitor variables in Python.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210331 Use this open source tool to monitor variables in Python.md b/sources/tech/20210331 Use this open source tool to monitor variables in Python.md index 8193f890e1..08eef2cbc6 100644 --- a/sources/tech/20210331 Use this open source tool to monitor variables in Python.md +++ b/sources/tech/20210331 Use this open source tool to monitor variables in Python.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/4/monitor-debug-python) [#]: author: (Tian Gao https://opensource.com/users/gaogaotiantian) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 9d2a537ff8a36012f414af4a8fc0acc3a2650527 Mon Sep 17 00:00:00 2001 From: "Qian.Sun" Date: Thu, 1 Apr 2021 15:52:01 +0800 Subject: [PATCH 527/818] translation completed NewsFlash translation is completed --- ...-Source Feed Reader With Feedly Support.md | 106 ------------------ ...-Source Feed Reader With Feedly Support.md | 104 +++++++++++++++++ 2 files changed, 104 insertions(+), 106 deletions(-) delete mode 100644 sources/tech/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md create mode 100644 translated/tech/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md diff --git a/sources/tech/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md b/sources/tech/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md deleted file mode 100644 index c618c66205..0000000000 --- a/sources/tech/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md +++ /dev/null @@ -1,106 +0,0 @@ -[#]: subject: (NewsFlash: A Modern Open-Source Feed Reader With Feedly Support) -[#]: via: (https://itsfoss.com/newsflash-feedreader/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) -[#]: collector: (lujun9972) -[#]: translator: (DCOLIVERSUN) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -NewsFlash: A Modern Open-Source Feed Reader With Feedly Support -====== - -Some may choose to believe that RSS readers are dead, but they’re here to stay. Especially when you don’t want the Big tech algorithm to decide what you should read. With a feed reader, you can choose your own reading sources. - -I’ve recently come across a fantastic RSS reader NewsFlash. It also supports adding feeds through web-based feed readers like [Feedly][1] and NewsBlur. That’s a big relief because if you are already such a service, you don’t have to import your feeds manually. - -NewsFlash happens to be the spiritual successor to [FeedReader][2] with the original developer involved as well. - -In case you’re wondering, we’ve already covered a list of [Feed Reader apps for Linux][3] if you’re looking for more options. - -### NewsFlash: A Feed Reader To Complement Web-based RSS Reader Account - -![][4] - -It is important to note that NewsFlash isn’t just tailored for web-based RSS feed accounts, you can choose to use local RSS feeds as well without needing to sync them on multiple devices. - -However, it is specifically helpful if you’re using any of the supported web-based feed readers. - -Here, I’ll be highlighting some of the features that it offers. - -### Features of NewsFlash - -![][5] - - * Desktop Notifications support - * Fast search and filtering - * Supports tagging - * Useful keyboard shortcuts that can be later customized - * Local feeds - * Import/Export OPML files - * Easily discover various RSS Feeds using Feedly’s library without needing to sign up for the service - * Custom Font Support - * Multiple themes supported (including a dark theme) - * Ability to enable/disable the Thumbnails - * Tweak the time for regular sync intervals - * Support for web-based Feed accounts like Feedly, Fever, NewsBlur, feedbin, Miniflux - - - -In addition to the features mentioned, it also opens the reader view when you re-size the window, so that’s a subtle addition. - -![newsflash screenshot 1][6] - -If you want to reset the account, you can easily do that as well – which will delete all your local data as well. And, yes, you can manually clear the cache and set an expiry for user data to exist locally for all the feeds you follow. - -**Recommended Read:** - -![][7] - -#### [6 Best Feed Reader Apps for Linux][3] - -Extensively use RSS feeds to stay updated with your favorite websites? Take a look at the best feed reader applications for Linux. - -### Installing NewsFlash in Linux - -You do not get any official packages available for various Linux distributions but limited to a [Flatpak][8]. - -For Arch users, you can find it available in [AUR][9]. - -Fortunately, the [Flatpak][10] package makes it easy for you to install it on any Linux distro you use. You can refer to our [Flatpak guide][11] for help. - -In either case, you can refer to its [GitLab page][12] and compile it yourself. - -### Closing Thoughts - -I’m currently using it by moving away from web-based services as a local solution on my desktop. You can simply export the OPML file to get the same feeds on any of your mobile feed applications, that’s what I’ve done. - -The user interface is easy to use and provides a modern UX, if not the best. You can find all the essential features available while being a simple-looking RSS reader as well. - -What do you think about NewsFlash? Do you prefer using something else? Feel free to share your thoughts in the comments. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/newsflash-feedreader/ - -作者:[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://feedly.com/ -[2]: https://jangernert.github.io/FeedReader/ -[3]: https://itsfoss.com/feed-reader-apps-linux/ -[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/newsflash.jpg?resize=945%2C648&ssl=1 -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/newsflash-screenshot.jpg?resize=800%2C533&ssl=1 -[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/newsflash-screenshot-1.jpg?resize=800%2C532&ssl=1 -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/04/best-feed-reader-apps-linux.jpg?fit=800%2C450&ssl=1 -[8]: https://flathub.org/apps/details/com.gitlab.newsflash -[9]: https://itsfoss.com/aur-arch-linux/ -[10]: https://itsfoss.com/what-is-flatpak/ -[11]: https://itsfoss.com/flatpak-guide/ -[12]: https://gitlab.com/news-flash/news_flash_gtk diff --git a/translated/tech/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md b/translated/tech/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md new file mode 100644 index 0000000000..50f14af8c3 --- /dev/null +++ b/translated/tech/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md @@ -0,0 +1,104 @@ +[#]: subject: (NewsFlash: A Modern Open-Source Feed Reader With Feedly Support) +[#]: via: (https://itsfoss.com/newsflash-feedreader/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) +[#]: collector: (lujun9972) +[#]: translator: (DCOLIVERSUN) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +NewsFlash: 一款 Feedly 支持的新型开源 Feed 阅读器 +====== + +有些人可能认为 RSS 阅读器已经不再,但它们仍然坚持在这里,特别是当你不希望看到的东西都是来自大型科技企业算法的时候。Feed 阅读器可以帮你自助选择阅读来源。 + +我最近遇到一个很棒的 RSS 阅读器 NewsFlash。它支持通过基于 web 的 Feed 阅读器增加 feed,例如 [Feedly][1] 和 NewsBlur。如果你已经使用这种服务,就不必人工导入 feed,这节省了你的工作。 + +NewsFlash 恰好是 [FeedReadeer][2] 的精神继承者,FeedReader 初创开发人员也参与其中。 + +如果你正在找适用的 RSS 阅读器,我们整理了 [Linux Feed 阅读器][3] 列表供您参考。 + +### NewsFlash: 一款补充基于 web 的 RSS 阅读器账户的 Feed 阅读器 + +![][4] + +请注意,NewsFlash 不仅针对基于 web 的 RSS feed 账户进行修改,而且你可以选择使用本地 RSS feed,不必在多设备间同步。 + +不过,如果你在用支持基于 web 的 feed 阅读器,那么 NewsFlash 特别有用。 + +这里,我将重点介绍 NewsFlash 提供的一些功能。 + +### NewsFlash 功能 + +![][5] + + * 支持桌面通知 + * 快速搜索、过滤 + * 支持标签 + * 便捷、可重定义的键盘快捷键 + * 本地 feed + * OPML 文件导入/导出 + * 无需注册即可在 Feedly 库中轻松找到不同 RSS Feed + * 支持自定义字体 + * 支持多主题(包括深色主题) + * 启动/禁止缩略图 + * 细粒度调整常规同步间隔时间 + * 支持基于 web 的 Feed 账户,例如 Feedly、Fever、NewsBlur、feedbin、Miniflux + +除上述功能外,当你调整窗口大小时,还可以打开阅读器视图,这是一个细腻的补充功能。 + +![newsflash 截图1][6] + +账户重新设置也很容易,不过需要删除所有本地数据。是的,你可以手动清除缓存并设置到期时间,以便所有你想看的 feed 用户数据都存在本地。 + +**推荐阅读:** + +![][7] + +#### [6 款 Linux 最佳 Feed 阅读器][3] + +你是否想用 RSS feed 来订阅你喜欢网站的最新消息?看一看 Linux 最佳 Feed 阅读器吧。 + +### 在 Linux 上安装 NewsFlash + +你无法找到适用于各种 Linux 发行版的官方软件包,只有 [Flatpak][8]。 + +对于 Arch 用户,可以从 [AUR][9] 下载。 + +幸运的是,[Flatpak][10] 软件包可以让你轻松在 Linux 发行版上安装 NewsFlash。具体请参阅我们的 [Flatpak 指南][11]。 + +你可以参考 NewsFlash 的 [GitLab页面][12] 去解决大部分问题。 + +### 结束语 + +我现在用 NewsFlash 作为桌面本地解决方案,不用基于 web 的服务。你可以通过直接导出 OPML 文件在移动 feed 应用上得到相同的 feed。这已经被我验证过了。 + +用户界面易于使用,也提供了数一数二的新版 UX。虽然这个 RSS 阅读器看似简单,但提供了你可以找到的所有重要功能。 + +你怎么看 NewsFlash?你喜欢用其他类似产品吗?欢迎在评论区中分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/newsflash-feedreader/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[DCOLIVERSUN](https://github.com/DCOLIVERSUN) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://feedly.com/ +[2]: https://jangernert.github.io/FeedReader/ +[3]: https://itsfoss.com/feed-reader-apps-linux/ +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/newsflash.jpg?resize=945%2C648&ssl=1 +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/newsflash-screenshot.jpg?resize=800%2C533&ssl=1 +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/newsflash-screenshot-1.jpg?resize=800%2C532&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/04/best-feed-reader-apps-linux.jpg?fit=800%2C450&ssl=1 +[8]: https://flathub.org/apps/details/com.gitlab.newsflash +[9]: https://itsfoss.com/aur-arch-linux/ +[10]: https://itsfoss.com/what-is-flatpak/ +[11]: https://itsfoss.com/flatpak-guide/ +[12]: https://gitlab.com/news-flash/news_flash_gtk From b8eb7a1c601a0cef1f249139094e11d0dab3bfcc Mon Sep 17 00:00:00 2001 From: wyxplus <32919297+wyxplus@users.noreply.github.com> Date: Thu, 1 Apr 2021 17:51:12 +0800 Subject: [PATCH 528/818] translated --- ... up a homelab from hardware to firewall.md | 107 ----------------- ... up a homelab from hardware to firewall.md | 111 ++++++++++++++++++ 2 files changed, 111 insertions(+), 107 deletions(-) delete mode 100644 sources/tech/20190319 How to set up a homelab from hardware to firewall.md create mode 100644 translated/tech/20190319 How to set up a homelab from hardware to firewall.md diff --git a/sources/tech/20190319 How to set up a homelab from hardware to firewall.md b/sources/tech/20190319 How to set up a homelab from hardware to firewall.md deleted file mode 100644 index b844354687..0000000000 --- a/sources/tech/20190319 How to set up a homelab from hardware to firewall.md +++ /dev/null @@ -1,107 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wyxplus) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to set up a homelab from hardware to firewall) -[#]: via: (https://opensource.com/article/19/3/home-lab) -[#]: author: (Michael Zamot https://opensource.com/users/mzamot) - -How to set up a homelab from hardware to firewall -====== - -Take a look at hardware and software options for building your own homelab. - -![][1] - -Do you want to create a homelab? Maybe you want to experiment with different technologies, create development environments, or have your own private cloud. There are many reasons to have a homelab, and this guide aims to make it easier to get started. - -There are three categories to consider when planning a home lab: hardware, software, and maintenance. We'll look at the first two categories here and save maintaining your computer lab for a future article. - -### Hardware - -When thinking about your hardware needs, first consider how you plan to use your lab as well as your budget, noise, space, and power usage. - -If buying new hardware is too expensive, search local universities, ads, and websites like eBay or Craigslist for recycled servers. They are usually inexpensive, and server-grade hardware is built to last many years. You'll need three types of hardware: a virtualization server, storage, and a router/firewall. - -#### Virtualization servers - -A virtualization server allows you to run several virtual machines that share the physical box's resources while maximizing and isolating resources. If you break one virtual machine, you won't have to rebuild the entire server, just the virtual one. If you want to do a test or try something without the risk of breaking your entire system, just spin up a new virtual machine and you're ready to go. - -The two most important factors to consider in a virtualization server are the number and speed of its CPU cores and its memory. If there are not enough resources to share among all the virtual machines, they'll be overallocated and try to steal each other's CPU cycles and memory. - -So, consider a CPU platform with multiple cores. You want to ensure the CPU supports virtualization instructions (VT-x for Intel and AMD-V for AMD). Examples of good consumer-grade processors that can handle virtualization are Intel i5 or i7 and AMD Ryzen. If you are considering server-grade hardware, the Xeon class for Intel and EPYC for AMD are good options. Memory can be expensive, especially the latest DDR4 SDRAM. When estimating memory requirements, factor at least 2GB for the host operating system's memory consumption. - -If your electricity bill or noise is a concern, solutions like Intel's NUC devices provide a small form factor, low power usage, and reduced noise, but at the expense of expandability. - -#### Network-attached storage (NAS) - -If you want a machine loaded with hard drives to store all your personal data, movies, pictures, etc. and provide storage for the virtualization server, network-attached storage (NAS) is what you want. - -In most cases, you won't need a powerful CPU; in fact, many commercial NAS solutions use low-powered ARM CPUs. A motherboard that supports multiple SATA disks is a must. If your motherboard doesn't have enough ports, use a host bus adapter (HBA) SAS controller to add extras. - -Network performance is critical for a NAS, so select a gigabit network interface (or better). - -Memory requirements will differ based on your filesystem. ZFS is one of the most popular filesystems for NAS, and you'll need more memory to use features such as caching or deduplication. Error-correcting code (ECC) memory is your best bet to protect data from corruption (but make sure your motherboard supports it before you buy). Last, but not least, don't forget an uninterruptible power supply (UPS), because losing power can cause data corruption. - -#### Firewall and router - -Have you ever realized that a cheap router/firewall is usually the main thing protecting your home network from the exterior world? These routers rarely receive timely security updates, if they receive any at all. Scared now? Well, [you should be][2]! - -You usually don't need a powerful CPU or a great deal of memory to build your own router/firewall, unless you are handling a huge throughput or want to do CPU-intensive tasks, like a VPN server or traffic filtering. In such cases, you'll need a multicore CPU with AES-NI support. - -You may want to get at least two 1-gigabit or better Ethernet network interface cards (NICs), also, not needed, but recommended, a managed switch to connect your DIY-router to create VLANs to further isolate and secure your network. - -![Home computer lab PfSense][4] - -### Software - -After you've selected your virtualization server, NAS, and firewall/router, the next step is exploring the different operating systems and software to maximize their benefits. While you could use a regular Linux distribution like CentOS, Debian, or Ubuntu, they usually take more time to configure and administer than the following options. - -#### Virtualization software - -**[KVM][5]** (Kernel-based Virtual Machine) lets you turn Linux into a hypervisor so you can run multiple virtual machines in the same box. The best thing is that KVM is part of Linux, and it is the go-to option for many enterprises and home users. If you are comfortable, you can install **[libvirt][6]** and **[virt-manager][7]** to manage your virtualization platform. - -**[Proxmox VE][8]** is a robust, enterprise-grade solution and a full open source virtualization and container platform. It is based on Debian and uses KVM as its hypervisor and LXC for containers. Proxmox offers a powerful web interface, an API, and can scale out to many clustered nodes, which is helpful because you'll never know when you'll run out of capacity in your lab. - -**[oVirt][9] (RHV)** is another enterprise-grade solution that uses KVM as the hypervisor. Just because it's enterprise doesn't mean you can't use it at home. oVirt offers a powerful web interface and an API and can handle hundreds of nodes (if you are running that many servers, I don't want to be your neighbor!). The potential problem with oVirt for a home lab is that it requires a minimum set of nodes: You'll need one external storage, such as a NAS, and at least two additional virtualization nodes (you can run it just on one, but you'll run into problems in maintenance of your environment). - -#### NAS software - -**[FreeNAS][10]** is the most popular open source NAS distribution, and it's based on the rock-solid FreeBSD operating system. One of its most robust features is its use of the ZFS filesystem, which provides data-integrity checking, snapshots, replication, and multiple levels of redundancy (mirroring, striped mirrors, and striping). On top of that, everything is managed from the powerful and easy-to-use web interface. Before installing FreeNAS, check its hardware support, as it is not as wide as Linux-based distributions. - -Another popular alternative is the Linux-based **[OpenMediaVault][11]**. One of its main features is its modularity, with plugins that extend and add features. Among its included features are a web-based administration interface; protocols like CIFS, SFTP, NFS, iSCSI; and volume management, including software RAID, quotas, access control lists (ACLs), and share management. Because it is Linux-based, it has extensive hardware support. - -#### Firewall/router software - -**[pfSense][12]** is an open source, enterprise-grade FreeBSD-based router and firewall distribution. It can be installed directly on a server or even inside a virtual machine (to manage your virtual or physical networks and save space). It has many features and can be expanded using packages. It is managed entirely using the web interface, although it also has command-line access. It has all the features you would expect from a router and firewall, like DHCP and DNS, as well as more advanced features, such as intrusion detection (IDS) and intrusion prevention (IPS) systems. You can create multiple networks listening on different interfaces or using VLANs, and you can create a secure VPN server with a few clicks. pfSense uses pf, a stateful packet filter that was developed for the OpenBSD operating system using a syntax similar to IPFilter. Many companies and organizations use pfSense. - -* * * - -With all this information in mind, it's time for you to get your hands dirty and start building your lab. In a future article, I will get into the third category of running a home lab: using automation to deploy and maintain it. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/3/home-lab - -作者:[Michael Zamot (Red Hat)][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/mzamot -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_keyboard_laptop_development_code_woman.png?itok=vbYz6jjb -[2]: https://opensource.com/article/18/5/how-insecure-your-router -[3]: /file/427426 -[4]: https://opensource.com/sites/default/files/uploads/pfsense2.png (Home computer lab PfSense) -[5]: https://www.linux-kvm.org/page/Main_Page -[6]: https://libvirt.org/ -[7]: https://virt-manager.org/ -[8]: https://www.proxmox.com/en/proxmox-ve -[9]: https://ovirt.org/ -[10]: https://freenas.org/ -[11]: https://www.openmediavault.org/ -[12]: https://www.pfsense.org/ diff --git a/translated/tech/20190319 How to set up a homelab from hardware to firewall.md b/translated/tech/20190319 How to set up a homelab from hardware to firewall.md new file mode 100644 index 0000000000..ce57a8ae7a --- /dev/null +++ b/translated/tech/20190319 How to set up a homelab from hardware to firewall.md @@ -0,0 +1,111 @@ +[#]: collector: (lujun9972) +[#]: translator: (wyxplus) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to set up a homelab from hardware to firewall) +[#]: via: (https://opensource.com/article/19/3/home-lab) +[#]: author: (Michael Zamot https://opensource.com/users/mzamot) + +如何从硬件到防火墙建立一个家庭实验室 +====== + +查看用于构建自己的家庭实验室的硬件和软件方案。 + +![][1] + +你有想过创建一个家庭实验室吗?或许你想尝试不同的技术,构建开发环境、亦或是建立自己的私有云。对于拥有一个家庭实验室有很多理由,本教程旨在使入门变得更容易。 + +规划家庭实验室时,需要考虑三方面:硬件、软件和维护。我们将在这里查看前两方面,并在以后的文章中讲述如何节省维护计算机实验室的时间。 + +### 硬件 + + +在考虑硬件需求时,首先要考虑如何使用实验室以及你的预算,噪声,空间和电源使用情况。 + + +如果购买新硬件过于昂贵,请搜索当地的大学,广告以及诸如 eBay 或 Craigslist 之类的网站,能获取二手服务器的地方。它们通常很便宜,并且服务器级的硬件可以使用很多年。你将需要三类硬件:虚拟化服务器,存储设备和路由器/防火墙。 + +#### 虚拟化服务器 + +一个虚拟化服务器允许你去运行多个共享物理机资源的虚拟机,同时最大化利用和隔离资源。如果你打算销毁一台虚拟机,无需重建整个服务器,因为其仅是一个虚拟机。如果你想进行测试或尝试某些操作而不损坏整个系统,仅需要新建一个虚拟机来运行即可。 + +在虚拟服务器中,需考虑两个最重要的因素是 CPU 的核心数及其运行速度以及内存容量。如果没有足够的资源够全部虚拟机共享,那么它们将被重复分配并试着获取其他虚拟机的 CPU 的周期和内存。 + +因此,考虑一个多核 CPU 的平台。你要确保 CPU 支持虚拟化指令(因特尔的 VT-x 指令集和 AMD 的 AMD-V 指令集)。能够处理虚拟化优质消费级处理器有因特尔的 i5 或 i7 和 AMD 的 Ryzen 处理器。如果你考虑服务器级的硬件,那么因特尔的志强系列和 AMD 的 EPYC 都是不错的选择。内存可能很昂贵,尤其是最近的 DDR4 内存。当我们估计所需多少内存时,请为主机操作系统的内存至少分配 2 GB 的空间。 + +如果你担心电费或噪声,则诸如因特尔 NUC 设备之类的解决方案虽然外形小巧,功耗低,噪音低,但是却以牺牲可扩展性为代价。 + +#### 网络附加存储Network-attached storage(NAS) + +如果希望装有硬盘驱动器的计算机存储你的所有个人数据,电影,图片等,并为虚拟化服务器提供存储,则需要网络附加存储(NAS)。 + +在大多数情况下,你不太可能需要一颗强力的 CPU。实际上,许多商业 NAS 的解决方案使用低功耗的 ARM CPU。主板能支持多个 SATA 硬盘。如果你的主板没有足够的端口,请使用主机总线适配器host bus adapter(HBA)SAS 控制器添加其他功能。 + +网络性能对于 NAS 来说是至关重要的,因此最好选择千兆gigabit网络(或更快网络)。 + +内存需求将根据你的文件系统而有所不同。ZFS 是 NAS 上最受欢迎的文件系统之一,你将需要更多内存才能使用诸如缓存或重复数据删除之类的功能。纠错码Error-correcting code(ECC)的内存是防止数据损坏的最佳选择(但在购买前请确保你的主板支持)。最后但同样重要的,不要忘记使用不间断电源uninterruptible power supply(UPS),因为断电可能会使得数据出错。 + + +#### 防火墙和路由器 + +你是否曾意识到,廉价的路由器/防火墙通常是保护你的家庭网络不受外部环境影响的主要部分?这些路由器很少及时收到安全更新(如果有的话)。现在害怕了吗?好吧,[确实][2]! + +通常,你不需要一颗强大的 CPU 或是大内存来构建你自己的路由器/防火墙,除非你需要高吞吐率或是执行 CPU 密集型任务,像是 VPN 服务器或是流量过滤。在这种情况下,你将需要一个支持 AES-NI 的多核 CPU。 + +你可能想要至少 2 个千兆或更快的以太网卡Ethernet network interface cards(NIC),这不是必需的,但我推荐使用一个管理型交换机来连接你自己的装配的路由器,以创建 VLAN 来进一步隔离和保护你的网络。 + +![Home computer lab PfSense][4] + +### 软件 + +在选择完你的虚拟化服务器、NAS 和防火墙/路由器后,下一步是探索不同的操作系统和软件,以最大程度地发挥其作用。尽管你可以使用 CentOS、Debian或 Ubuntu 之类的常规 Linux 发行版,但是与以下软件相比,它们通常花费更多的时间进行配置和管理。 + +#### 虚拟化软件 + +**[KVM][5]**(基于内核的虚拟机Kernel-based Virtual Machine)使你可以将 Linux 变成虚拟机监控程序,以便可以在同一台机器中运行多个虚拟机。最好的是,KVM 作为 Linux 的一部分,它是许多企业和家庭用户的首选。如果你愿意,可以安装 **[libvirt][6]** 和 **[virt-manager][7]** 来管理你的虚拟化平台。 + + +**[Proxmox VE][8]** 是一个强大的企业级解决方案,并且是一个完整的开源虚拟化和容器平台。它基于 Debian,使用 KVM 作为其虚拟机管理程序,并使用 LXC 作为容器。Proxmox 提供了强大的网页界面,API,并且可以扩展到许多群集节点,这很有用,因为你永远不知道何时实验室容量不足。 + +**[oVirt][9](RHV)** 是另一种使用 KVM 作为虚拟机管理程序的企业级解决方案。不要仅仅因为它是企业,并不意味着你不能在家中使用它。oVirt 提供了强大的网页界面和 API,并且可以处理数百个节点(如果你正在运行那么多服务器,我不想成为你的邻居!)。oVirt 用于家庭实验室的潜在问题是它至少需要一些的节点集:你将需要一个外部存储(例如 NAS)和至少两个其他虚拟化节点(你可以仅在一个上运行它,但是你可能会在维护环境时遇到问题)。 + +#### NAS software 网络附加存储软件 + +**[FreeNAS][10]** 是最受欢迎的开源 NAS 发行版,它基于稳定的 FreeBSD 操作系统。它最强大的功能之一是支持 ZFS 文件系统,该文件系统提供了数据完整性检查、快照、复制和多个级别的冗余(镜像,条带化镜像和条带化)。最重要的是,所有功能都通过功能强大且易于使用的网页界面进行管理。在安装 FreeNAS 之前,请检查硬件是否支持,因为它不如基于 Linux 的发行版那么广泛。 + +另一个流行的替代方法是基于 Linux 的 **[OpenMediaVault][11]**。它的主要功能之一是模块化,带有可扩展和添加特性的插件。它包括的功能包括基于网页管理界面和协议,例如 CIFS,SFTP,NFS,iSCSI。以及卷管理,包括软件 RAID,资源分配,访问控制列表access control lists(ACL)和共享管理。由于它是基于 Linux 的,因此其具有广泛的硬件支持。 + +#### 防火墙/路由器软件 + +**[pfSense][12]** 是基于 FreeBSD 的开源企业级路由器和防火墙发行版。它可以直接安装在服务器上,甚至可以安装在虚拟机中(以管理虚拟或物理网络并节省空间)。它有许多功能,可以使用软件包进行扩展。尽管它也有命令行访问权限,但也可以完全使用网页界面对其进行管理。它具有你所希望路由器和防火墙提供的所有功能,例如 DHCP 和 DNS,以及更高级的功能,例如入侵检测(IDS)和入侵防御(IPS)系统。你可以侦听多个不同接口或使用 VLAN 的网络,并且只需鼠标点击几下即可创建安全的 VPN 服务器。pfSense 使用 pf,这是一种有状态的数据包筛选器,它是使用类似于 IPFilter 的语法为 OpenBSD 操作系统开发的。许多公司和组织都有使用 pfSense。 + +* * * + +考虑到所有的信息,是时候动手开始建立你的实验室了。在之后的文章中,我将介绍运行家庭实验室的第三方面:自动化进行部署和维护。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/3/home-lab + +作者:[Michael Zamot (Red Hat)][a] +选题:[lujun9972][b] +译者:[wyxplus](https://github.com/wyxplus) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mzamot +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_keyboard_laptop_development_code_woman.png?itok=vbYz6jjb +[2]: https://opensource.com/article/18/5/how-insecure-your-router +[3]: /file/427426 +[4]: https://opensource.com/sites/default/files/uploads/pfsense2.png (Home computer lab PfSense) +[5]: https://www.linux-kvm.org/page/Main_Page +[6]: https://libvirt.org/ +[7]: https://virt-manager.org/ +[8]: https://www.proxmox.com/en/proxmox-ve +[9]: https://ovirt.org/ +[10]: https://freenas.org/ +[11]: https://www.openmediavault.org/ +[12]: https://www.pfsense.org/ From b6814ab78a28e67e1697becffe87a5942ade15ce Mon Sep 17 00:00:00 2001 From: wyxplus <32919297+wyxplus@users.noreply.github.com> Date: Thu, 1 Apr 2021 17:52:09 +0800 Subject: [PATCH 529/818] Update 20190319 How to set up a homelab from hardware to firewall.md --- ...0190319 How to set up a homelab from hardware to firewall.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20190319 How to set up a homelab from hardware to firewall.md b/translated/tech/20190319 How to set up a homelab from hardware to firewall.md index ce57a8ae7a..4b3e4de26e 100644 --- a/translated/tech/20190319 How to set up a homelab from hardware to firewall.md +++ b/translated/tech/20190319 How to set up a homelab from hardware to firewall.md @@ -70,7 +70,7 @@ **[oVirt][9](RHV)** 是另一种使用 KVM 作为虚拟机管理程序的企业级解决方案。不要仅仅因为它是企业,并不意味着你不能在家中使用它。oVirt 提供了强大的网页界面和 API,并且可以处理数百个节点(如果你正在运行那么多服务器,我不想成为你的邻居!)。oVirt 用于家庭实验室的潜在问题是它至少需要一些的节点集:你将需要一个外部存储(例如 NAS)和至少两个其他虚拟化节点(你可以仅在一个上运行它,但是你可能会在维护环境时遇到问题)。 -#### NAS software 网络附加存储软件 +#### 网络附加存储软件 **[FreeNAS][10]** 是最受欢迎的开源 NAS 发行版,它基于稳定的 FreeBSD 操作系统。它最强大的功能之一是支持 ZFS 文件系统,该文件系统提供了数据完整性检查、快照、复制和多个级别的冗余(镜像,条带化镜像和条带化)。最重要的是,所有功能都通过功能强大且易于使用的网页界面进行管理。在安装 FreeNAS 之前,请检查硬件是否支持,因为它不如基于 Linux 的发行版那么广泛。 From aac3ef107b97a20c40bf9d03cf3675f37b4420f8 Mon Sep 17 00:00:00 2001 From: wyxplus <32919297+wyxplus@users.noreply.github.com> Date: Thu, 1 Apr 2021 18:25:57 +0800 Subject: [PATCH 530/818] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... 4 open source chat applications you should use right now.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200423 4 open source chat applications you should use right now.md b/sources/tech/20200423 4 open source chat applications you should use right now.md index 25aa100c53..9d7fbb78ca 100644 --- a/sources/tech/20200423 4 open source chat applications you should use right now.md +++ b/sources/tech/20200423 4 open source chat applications you should use right now.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wyxplus) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 9d74485ed606d8c8146e1bd017f44c13b0024c8a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 1 Apr 2021 21:55:55 +0800 Subject: [PATCH 531/818] PRF @DCOLIVERSUN --- ...0318 Reverse Engineering a Docker Image.md | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/translated/tech/20210318 Reverse Engineering a Docker Image.md b/translated/tech/20210318 Reverse Engineering a Docker Image.md index 9ffb64ac2b..4fb8e78d40 100644 --- a/translated/tech/20210318 Reverse Engineering a Docker Image.md +++ b/translated/tech/20210318 Reverse Engineering a Docker Image.md @@ -3,16 +3,18 @@ [#]: author: (Simon Arneaud https://theartofmachinery.com) [#]: collector: (lujun9972) [#]: translator: (DCOLIVERSUN) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) -Docker 镜像逆向工程 +一次 Docker 镜像的逆向工程 ====== -本文介绍的内容开始于一个咨询陷阱:政府组织 A 让政府组织 B 开发一个网络应用程序。政府机构 B 把部分工作外包给某个人。后来,项目的托管和维护被外包给一家私人公司 C。C 公司发现,之前外包的人(过世很久了)已经构建了一个自定义的 Docker 镜像,并使镜像成为系统构建的依赖项,但这个人没有提交原始的 Dockerfile。C 公司有合同义务管理这个 Docker 镜像,可是他们他们没有源代码。C 公司偶尔叫我进去做各种工作,所以处理一些关于这个神秘 Docker 镜像的事情就成了我的工作。 +![](https://img.linux.net.cn/data/attachment/album/202104/01/215523oajrgjo77irb7nun.jpg) -幸运的是,这个 Docker 镜像格式比它应有的样子透明多了。虽然还需要做一些侦查工作,但只要解剖一个镜像文件,就能发现很多东西。例如,这里有一个 [Prettier 代码格式][1]镜像可供快速浏览。 +这要从一次咨询的失误说起:政府组织 A 让政府组织 B 开发一个 Web 应用程序。政府机构 B 把部分工作外包给某个人。后来,项目的托管和维护被外包给一家私人公司 C。C 公司发现,之前外包的人(已经离开很久了)构建了一个自定义的 Docker 镜像,并将其成为系统构建的依赖项,但这个人没有提交原始的 Dockerfile。C 公司有合同义务管理这个 Docker 镜像,可是他们他们没有源代码。C 公司偶尔叫我进去做各种工作,所以处理一些关于这个神秘 Docker 镜像的事情就成了我的工作。 + +幸运的是,Docker 镜像的格式比想象的透明多了。虽然还需要做一些侦查工作,但只要解剖一个镜像文件,就能发现很多东西。例如,这里有一个 [Prettier 代码格式化][1] 的镜像可供快速浏览。 首先,让 Docker 守护进程daemon拉取镜像,然后将镜像提取到文件中: @@ -42,7 +44,7 @@ manifest.json repositories ``` -如你所见,Docker 在命名时经常使用哈希hash。我们看看 `manifest.json`。它在难以阅读的压缩 JSON 中,不过 [`jq` JSON Swiss Army knife][2]可以很好地打印 JSON: +如你所见,Docker 在命名时经常使用哈希hash。我们看看 `manifest.json`。它是以难以阅读的压缩 JSON 写的,不过 [JSON 瑞士军刀 jq][2] 可以很好地打印 JSON: ``` $ jq . manifest.json @@ -61,7 +63,7 @@ $ jq . manifest.json ] ``` -请注意,这三层对应三个 hash 命名的目录。我们以后再看。现在,让我们看看 `Config` 键指向的 JSON 文件。文件名有点长,所有我把第一点放在这里: +请注意,这三个Layer对应三个以哈希命名的目录。我们以后再看。现在,让我们看看 `Config` 键指向的 JSON 文件。它有点长,所以我只在这里转储第一部分: ``` $ jq . 88f38be28f05f38dba94ce0c1328ebe2b963b65848ab96594f8172a9c3b0f25b.json | head -n 20 @@ -87,9 +89,9 @@ $ jq . 88f38be28f05f38dba94ce0c1328ebe2b963b65848ab96594f8172a9c3b0f25b.json | h "Image": "sha256:93e72874b338c1e0734025e1d8ebe259d4f16265dc2840f88c4c754e1c01ba0a", ``` -最重要的是 `history` 列表,它列出了镜像中的每一层。Docker 镜像由这些层堆叠而成。Dockerfile 中几乎每条命令都会变成一个层,描述该命令对镜像所做的更改。如果你执行 `RUN script.sh` 命令,创建 `really_big_file`,然后你用 `RUN rm really_big_file` 命令删除文件,Docker 镜像实际生成两层:一个包含 `really_big_file`,一个包含 `.wh.really_big_file` 记录来删除它。整个镜像文件大小不变。这就是为什么你会经常看到像 `RUN script.sh && rm really_big_file` 这样的 Dockerfile 命令链接在一起——它保障所有更改都合并到一层中。 +最重要的是 `history` 列表,它列出了镜像中的每一层。Docker 镜像由这些层堆叠而成。Dockerfile 中几乎每条命令都会变成一个层,描述该命令对镜像所做的更改。如果你执行 `RUN script.sh` 命令创建了 `really_big_file`,然后用 `RUN rm really_big_file` 命令删除文件,Docker 镜像实际生成两层:一个包含 `really_big_file`,一个包含 `.wh.really_big_file` 记录来删除它。整个镜像文件大小不变。这就是为什么你会经常看到像 `RUN script.sh && rm really_big_file` 这样的 Dockerfile 命令链接在一起——它保障所有更改都合并到一层中。 -以下是 Docker 镜像中记录的所有层。注意,大多数层不改变文件系统镜像,并且 `empty_layer` 标记为 true。以下只有三个层是非空的,与我们之前描述的相符。 +以下是该 Docker 镜像中记录的所有层。注意,大多数层不改变文件系统镜像,并且 `empty_layer` 标记为 `true`。以下只有三个层是非空的,与我们之前描述的相符。 ``` $ jq .history 88f38be28f05f38dba94ce0c1328ebe2b963b65848ab96594f8172a9c3b0f25b.json @@ -162,7 +164,7 @@ m=${NODEJS_VERSION} && npm install -g prettier@${PRETTIER_VERSION} && np ] ``` -太棒了!所有的命令都在 `created_by` 字段中,我们几乎可以用这些命令重建 Dockerfile。但不是完全可以。最上面的 `ADD` 命令实际上没有给我们需要添加的文件。`COPY` 命令也没有全部信息。因为 `FROM` 命令会扩展到继承基础 Docker 镜像的所有层,所以可能会跟丢该命令。 +太棒了!所有的命令都在 `created_by` 字段中,我们几乎可以用这些命令重建 Dockerfile。但不是完全可以。最上面的 `ADD` 命令实际上没有给我们需要添加的文件。`COPY` 命令也没有全部信息。我们还失去了 `FROM` 语句,因为它们扩展成了从基础 Docker 镜像继承的所有层。 我们可以通过查看时间戳timestamp,按 Dockerfile 对层进行分组。大多数层的时间戳相差不到一分钟,代表每一层构建所需的时间。但是前两层是 `2020-04-24`,其余的是 `2020-04-29`。这是因为前两层来自一个基础 Docker 镜像。理想情况下,我们可以找出一个 `FROM` 命令来获得这个镜像,这样我们就有了一个可维护的 Dockerfile。 @@ -215,7 +217,7 @@ $ cat etc/alpine-release 3.11.6 ``` -如果你拉取、解压 `alpine:3.11.6`,你会发现里面有一个非空层,`layer.tar`与 Prettier 镜像基础层中的 `layer.tar` 是一样的。 +如果你拉取、解压 `alpine:3.11.6`,你会发现里面有一个非空层,`layer.tar` 与 Prettier 镜像基础层中的 `layer.tar` 是一样的。 出于兴趣,另外两个非空层是什么?第二层是包含 Prettier 安装包的主层。它有 528 个条目,包含 Prettier、一堆依赖项和证书更新: @@ -264,7 +266,7 @@ $ tar tf 6c37da2ee7de579a0bf5495df32ba3e7807b0a42e2a02779206d165f55f1ba70/layer. work/ ``` -[原始 Dockerfile 在 Prettier 的 git repo 中][4] +[原始 Dockerfile 在 Prettier 的 git 仓库中][4]。 -------------------------------------------------------------------------------- @@ -273,7 +275,7 @@ via: https://theartofmachinery.com/2021/03/18/reverse_engineering_a_docker_image 作者:[Simon Arneaud][a] 选题:[lujun9972][b] 译者:[DCOLIVERSUN](https://github.com/DCOLIVERSUN) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From e7015a1d0d84a986203756be72215e8a2527fdc9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 1 Apr 2021 21:57:25 +0800 Subject: [PATCH 532/818] PUB @DCOLIVERSUN https://linux.cn/article-13258-1.html --- .../20210318 Reverse Engineering a Docker Image.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210318 Reverse Engineering a Docker Image.md (99%) diff --git a/translated/tech/20210318 Reverse Engineering a Docker Image.md b/published/20210318 Reverse Engineering a Docker Image.md similarity index 99% rename from translated/tech/20210318 Reverse Engineering a Docker Image.md rename to published/20210318 Reverse Engineering a Docker Image.md index 4fb8e78d40..0afe15981d 100644 --- a/translated/tech/20210318 Reverse Engineering a Docker Image.md +++ b/published/20210318 Reverse Engineering a Docker Image.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (DCOLIVERSUN) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13258-1.html) 一次 Docker 镜像的逆向工程 ====== From ef62f832aa6e85252f1e5e3cd7580de8eb367be7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 1 Apr 2021 22:37:21 +0800 Subject: [PATCH 533/818] PRF @geekpi --- ...20210324 Read and write files with Bash.md | 44 ++++++++----------- 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/translated/tech/20210324 Read and write files with Bash.md b/translated/tech/20210324 Read and write files with Bash.md index 2e493db99b..647b91d344 100644 --- a/translated/tech/20210324 Read and write files with Bash.md +++ b/translated/tech/20210324 Read and write files with Bash.md @@ -3,14 +3,16 @@ [#]: author: (Seth Kenlon https://opensource.com/users/seth) [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) 用 Bash 读写文件 ====== -学习 Bash 读取和写入数据的不同方式,以及何时使用每种方法。 -![bash logo on green background][1] + +> 学习 Bash 读取和写入数据的不同方式,以及何时使用每种方法。 + +![](https://img.linux.net.cn/data/attachment/album/202104/01/223653bc334ac33e5e4pwe.jpg) 当你使用 Bash 编写脚本时,有时你需要从一个文件中读取数据或向一个文件写入数据。有时文件可能包含配置选项,而另一些时候这个文件是你的用户用你的应用创建的数据。每种语言处理这个任务的方式都有些不同,本文将演示如何使用 Bash 和其他 [POSIX][2] shell 处理数据文件。 @@ -26,15 +28,16 @@ ### 使用 Bash 读取文件 -除了是 [shell][5] 之外,Bash 还是一种脚本语言。有几种方法可以从 Bash 中读取数据。你可以创建一种数据流并解析输出, 或者你可以将数据加载到内存中. 这两种方法都是有效的获取信息的方法,但每种方法都有相当具体的用例。 +除了是 [shell][5] 之外,Bash 还是一种脚本语言。有几种方法可以从 Bash 中读取数据。你可以创建一种数据流并解析输出, 或者你可以将数据加载到内存中。这两种方法都是有效的获取信息的方法,但每种方法都有相当具体的用例。 -#### 在 Bash 中 source 文件 +#### 在 Bash 中援引文件 -当你在 Bash 中 “source” 一个文件时,你会让 Bash 读取文件的内容,期望它包含有效的数据,Bash 可以将这些数据放入它建立的数据模型中。你不会从任何旧文件中获取数据,但你可以使用这种方法来读取配置文件和函数。 +当你在 Bash 中 “援引source” 一个文件时,你会让 Bash 读取文件的内容,期望它包含有效的数据,Bash 可以将这些数据放入它建立的数据模型中。你不会想要从旧文件中援引数据,但你可以使用这种方法来读取配置文件和函数。 + +(LCTT 译注:在 Bash 中,可以通过 `source` 或 `.` 命令来将一个文件读入,这个行为称为 “sourcing”,英文原意为“一次性(试)采购”、“寻找供应商”、“获得”等,考虑到 Bash 的语境和发音,我建议可以翻译为“援引”,或有不当,供大家讨论参考 —— wxy) 例如,创建一个名为 `example.sh` 的文件,并输入以下内容: - ``` #!/bin/sh @@ -45,7 +48,6 @@ echo "The meaning of life is $var" 运行这段代码,看见失败了: - ``` $ bash ./example.sh ./example.sh: line 3: greet: command not found @@ -54,7 +56,6 @@ The meaning of life is Bash 没有一个叫 `greet` 的命令,所以无法执行那一行,也没有一个叫 `var` 的变量记录,所以文件没有意义。为了解决这个问题,建立一个名为 `include.sh` 的文件: - ``` greet() {     echo "Hello ${1}" @@ -63,8 +64,7 @@ greet() { var=42 ``` -修改你的 `example.sh` 脚本,加入 `source` 命令: - +修改你的 `example.sh` 脚本,加入一个 `source` 命令: ``` #!/bin/sh @@ -76,8 +76,7 @@ greet opensource.com echo "The meaning of life is $var" ``` -运行脚本,看见已经可以了: - +运行脚本,可以看到工作了: ``` $ bash ./example.sh @@ -89,8 +88,7 @@ The meaning of life is 42 #### 在 Bash 中解析文件 -另一种让数据“进入” Bash 的方法是将其解析为数据流。有很多方法可以做到这一点. 你可以使用 `grep` 或 `cat` 或任何可以获取数据并管道输出到标准输出的命令。另外,你可以使用 Bash 内置的东西:重定向。重定向本身并不是很有用, 所以在这个例子中, 我也使用内置的 `echo` 命令来打印重定向的结果: - +另一种让数据“进入” Bash 的方法是将其解析为数据流。有很多方法可以做到这一点. 你可以使用 `grep` 或 `cat` 或任何可以获取数据并管道输出到标准输出的命令。另外,你可以使用 Bash 内置的东西:重定向。重定向本身并不是很有用,所以在这个例子中,我也使用内置的 `echo` 命令来打印重定向的结果: ``` #!/bin/sh @@ -100,15 +98,13 @@ echo $( < include.sh ) 将其保存为 `stream.sh` 并运行它来查看结果: - ``` $ bash ./stream.sh greet() { echo "Hello ${1}" } var=42 $ ``` -对于 `include.sh` 文件中的每一行,Bash 都会将该行打印(或 echo)到你的终端。先用管道把它传送到一个合适的解析器是用 Bash 读取数据的常用方法。例如, 假设 `include.sh` 是一个配置文件, 它的键和值对用一个等号(`=`)分开. 你可以用 `awk` 甚至 `cut` 来获取值: - +对于 `include.sh` 文件中的每一行,Bash 都会将该行打印(或 `echo`)到你的终端。先用管道把它传送到一个合适的解析器是用 Bash 读取数据的常用方法。例如, 假设 `include.sh` 是一个配置文件, 它的键和值对用一个等号(`=`)分开. 你可以用 `awk` 甚至 `cut` 来获取值: ``` #!/bin/sh @@ -120,7 +116,6 @@ echo $myVar 试着运行这个脚本: - ``` $ bash ./stream.sh 42 @@ -132,12 +127,11 @@ $ bash ./stream.sh 例如, 要创建一个包含输出的新文件, 使用一个重定向符号: - ``` #!/bin/sh TZ=UTC -date > date.txt +date > date.txt ``` 运行脚本几次: @@ -153,17 +147,15 @@ Tue Feb 23 22:25:12 UTC 2021 要追加数据,使用两个重定向符号: - ``` #!/bin/sh TZ=UTC -date >> date.txt +date >> date.txt ``` 运行脚本几次: - ``` $ bash ./date.sh $ bash ./date.sh @@ -177,7 +169,7 @@ Tue Feb 23 22:25:22 UTC 2021 ### Bash 轻松编程 -Bash 的优势在于简单易学,因为只需要一些基本的概念,你就可以构建复杂的程序。完整的文档请参考 GNU.org 上的[优秀的 Bash 文档][6]。 +Bash 的优势在于简单易学,因为只需要一些基本的概念,你就可以构建复杂的程序。完整的文档请参考 GNU.org 上的 [优秀的 Bash 文档][6]。 -------------------------------------------------------------------------------- @@ -186,7 +178,7 @@ via: https://opensource.com/article/21/3/input-output-bash 作者:[Seth Kenlon][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/) 荣誉推出 From f671e17bf269afb2de5f2a3db391ee729b6f044f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 1 Apr 2021 22:39:16 +0800 Subject: [PATCH 534/818] PUB @geekpi https://linux.cn/article-13259-1.html --- .../20210324 Read and write files with Bash.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210324 Read and write files with Bash.md (98%) diff --git a/translated/tech/20210324 Read and write files with Bash.md b/published/20210324 Read and write files with Bash.md similarity index 98% rename from translated/tech/20210324 Read and write files with Bash.md rename to published/20210324 Read and write files with Bash.md index 647b91d344..d4e0e2b79e 100644 --- a/translated/tech/20210324 Read and write files with Bash.md +++ b/published/20210324 Read and write files with Bash.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13259-1.html) 用 Bash 读写文件 ====== From 07dc939fa2233919ed77e77fe093debe7e2b6ffb Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 2 Apr 2021 05:04:23 +0800 Subject: [PATCH 535/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210401=20?= =?UTF-8?q?Partition=20a=20drive=20on=20Linux=20with=20GNU=20Parted?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210401 Partition a drive on Linux with GNU Parted.md --- ...tition a drive on Linux with GNU Parted.md | 194 ++++++++++++++++++ 1 file changed, 194 insertions(+) create mode 100644 sources/tech/20210401 Partition a drive on Linux with GNU Parted.md diff --git a/sources/tech/20210401 Partition a drive on Linux with GNU Parted.md b/sources/tech/20210401 Partition a drive on Linux with GNU Parted.md new file mode 100644 index 0000000000..64d5afb8f7 --- /dev/null +++ b/sources/tech/20210401 Partition a drive on Linux with GNU Parted.md @@ -0,0 +1,194 @@ +[#]: subject: (Partition a drive on Linux with GNU Parted) +[#]: via: (https://opensource.com/article/21/4/linux-parted-cheat-sheet) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Partition a drive on Linux with GNU Parted +====== +Learn the basics of partitioning a new storage device, then download our +cheat sheet to keep info close at hand. +![Cheat Sheet cover image][1] + +In the 21st century, we tend to take data storage for granted. We have lots of it, it's relatively affordable, and there are many different types of storage available. No matter how much cloud storage space you're given for free, there's nothing quite like having a physical hard drive for your really important (or really big, when you live on a slow network) data. However, few hard drives are sold right off the shelf, ready to use—in an ideal configuration, at least. Whether you're buying a new drive or setting up a system with a different configuration, you need to know how to partition a drive on Linux. + +This article demonstrates GNU Parted, one of the best tools for partitioning drives. If you prefer to use a graphical application instead of a terminal command, read my article on [formatting drives for Linux][2]. + +### Disk labels, partitions, and filesystems + +A hard drive doesn't _technically_ require much software to serve as a storage device. However, using a drive without modern conventions like a partition table and filesystem is difficult, impractical, and unsafe for your data. + +There are three important concepts you need to know about hard drives: + + * A **disk label** or **partition table** is metadata placed at the start of a drive, serving as a clue for the computer reading it about what kind of storage is available and where it's located on the drive. + * A **partition** is a boundary identifying where a filesystem is located. For instance, if you have a 512GB drive, you can have a partition on that device that takes up the entire drive (512GB), or two partitions that each take 256GB each, or three partitions taking up some other variation of sizes, and so on. + * A **filesystem** is a storage scheme agreed upon by a hard drive and a computer. A computer must know how to read a filesystem to piece together all the data stored on the drive, and it must know how to write data back to the filesystem to maintain the data's integrity. + + + +The GNU Parted application manages the first two concepts: disk labels and partitions. Parted has some awareness of filesystems, but it leaves the details of filesystem implementation to other tools like `mkfs`. + +**[Download the [GNU Parted cheat sheet][3]]** + +### Locating the drive + +Before using GNU Parted, you must be certain where your drive is located on your system. First, attach the hard drive you want to format to your system, and then use the `parted` command to see what's attached to your computer: + + +``` +$ parted /dev/sda print devices +/dev/sda (2000GB) +/dev/sdb (1000GB) +/dev/sdc (1940MB) +``` + +The device you most recently attached gets a name later in the alphabet than devices that have been attached longer. In this example, `/dev/sdc` is most likely the drive I just attached. I can confirm that by its size because I know that the USB thumb drive I attached is only 2GB (1940MB is close enough), compared to my workstation's main drives, which are terabytes in size. If you're not sure, then you can get more information about the drive you think is the one you want to partition: + + +``` +$ parted /dev/sdc print +Model: Yoyodyne Tiny Drive 1.0 (scsi)     +Disk /dev/sdc: 1940MB +Sector size (logical/physical): 512B/512B +Partition Table: msdos +Disk Flags: + +Number  Start   End     Size    File system  Name  Flags + 1      1049kB  2048kB  1024kB  BS           Bloat  Hidden + 2      2049kB  1939MB  1937MB  FAT32        MyDrive +``` + +Some drives provide more metadata than others. This one identifies itself as a drive from Yoyodyne, which is exactly the branding on the physical drive. Furthermore, it contains a small hidden partition at the front of the drive with some bloatware followed by a Windows-compatible FAT32 partition. This is definitely the drive I intend to reformat. + +Before continuing, _make sure_ you have identified the correct drive you want to partition. _Repartitioning the wrong drive results in lost data._ For safety, all potentially destructive commands in this article reference the `/dev/sdX` device, which you are unlikely to have on your system. + +### Creating a disk label or partition table + +To create a partition on a drive, the drive must have a disk label. A disk label is also called a _partition table_, so Parted accepts either term. + +To create a disk label, use the `mklabel` or `mktable` subcommand: + + +``` +`$ parted /dev/sdX mklabel gpt` +``` + +This command creates a **gpt** label at the front of the drive located at `/dev/sdX`, erasing any label that may exist. This is a quick process because all that's being replaced is metadata about partitions. + +### Creating a partition + +To create a partition on a drive, use the `mkpart` subcommand, followed by an optional name for your partition, followed by the partition's start and end points. If you only need one partition on your drive, then sizing is easy: start at 1 and end at 100%. Use the `--align opt` option to allow Parted to adjust the position of the partition boundaries for best performance: + + +``` +$ parted /dev/sdX --align opt \ +mkpart example 1 100% +``` + +View your new partition with the `print` subcommand: + + +``` +$ parted /dev/sdX print +Model: Yoyodyne Tiny Drive 1.0 (scsi) +Disk /dev/sdi: 1940MB +Sector size (logical/physical): 512B/512B +Partition Table: gpt +Disk Flags: + +Number  Start   End     Size   + 1      1049kB  1939MB  1938MB +``` + +You don't have to use the whole disk for one partition. The advantage to a partition is that more than one filesystem can exist on a drive without interfering with the other partition(s). When sizing partitions, you can use the `unit` subcommand to set what kind of measurements you want to use. Parted understands sectors, cylinders, heads, bytes, kilobytes, megabytes, gigabytes, terabytes, and percentages. + +You can also specify what filesystem you intend to use a partition for. This doesn't create the filesystem, but it does provide metadata that could be useful to you later. + +Here's a 50-50 split, one for an XFS filesystem and another for an EXT4 filesystem: + + +``` +$ parted /dev/sdX --align opt \ +mkpart xfs 1 50% +$ parted /dev/sdX --align opt \ +mkpart ext4 51% 100% +``` + +### Naming a partition + +In addition to marking what filesystem a partition is for, you can also name each partition. Some file managers and utilities read partition names, which can help you identify drives. For instance, I often have several different drives attached on my media workstation, each belonging to a different project. When creating these drives, I name both the partition and the filesystem so that, no matter how I'm looking at my system, the locations with important data are clearly labeled. + +To name a partition, you must know its number: + + +``` +$ parted /dev/sdX print +[...] +Number  Start   End     Size   File system  Name     Flags + 1      1049kB  990MB   989MB  xfs          example + 2      1009MB  1939MB  930MB  ext4         noname +``` + +To name partition 1: + + +``` +$ parted /dev/sdX name 1 example +$ parted /dev/sdX print +[...] +Number  Start   End     Size   File system  Name     Flags + 1      1049kB  990MB   989MB  xfs          example + 2      1009MB  1939MB  930MB  ext4         noname +``` + +### Create a filesystem + +For your drive to be useful, you must create a filesystem in your new partition. GNU Parted doesn't do that because it's only a partition manager. The Linux command to create a filesystem on a drive is `mkfs`, but there are helpful utilities aliased for you to use to create a specific kind of filesystem. For instance, `mkfs.ext4` creates an EXT4 filesystem, while `mkfs.xfs` creates an XFS filesystem, and so on. + +Your partition is located "in" the drive, so instead of creating a filesystem on `/dev/sdX`, you create your filesystem in `/dev/sdX1` for the first partition, `/dev/sdX2` for the second partition, and so on. + +Here's an example of creating an XFS filesystem: + + +``` +`$ sudo mkfs.xfs -L mydrive /dev/sdX1` +``` + +### Download our cheat sheet + +Parted is a flexible and powerful command. You can issue it commands, as demonstrated in this article, or activate an interactive mode so that you're constantly "connected" to a drive you specify: + + +``` +$ parted /dev/sdX +(parted) print +[...] +Number  Start   End     Size   File system  Name     Flags + 1      1049kB  990MB   989MB  xfs          example + 2      1009MB  1939MB  930MB  ext4         noname + +(parted) name 1 mydrive +(parted) +``` + +If you intend to use Parted often, [download our GNU Parted cheat sheet][3] so that you have all the subcommands you need close at hand. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/linux-parted-cheat-sheet + +作者:[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/coverimage_cheat_sheet.png?itok=lYkNKieP (Cheat Sheet cover image) +[2]: https://opensource.com/article/18/11/partition-format-drive-linux#gui +[3]: https://opensource.com/downloads/parted-cheat-sheet From dc4ed9511aa9a76aa35cf316faf94b4513f7bcfc Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 2 Apr 2021 05:04:36 +0800 Subject: [PATCH 536/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210401=20?= =?UTF-8?q?Find=20what=20changed=20in=20a=20Git=20commit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210401 Find what changed in a Git commit.md --- ...10401 Find what changed in a Git commit.md | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 sources/tech/20210401 Find what changed in a Git commit.md diff --git a/sources/tech/20210401 Find what changed in a Git commit.md b/sources/tech/20210401 Find what changed in a Git commit.md new file mode 100644 index 0000000000..8fc013bedb --- /dev/null +++ b/sources/tech/20210401 Find what changed in a Git commit.md @@ -0,0 +1,136 @@ +[#]: subject: (Find what changed in a Git commit) +[#]: via: (https://opensource.com/article/21/4/git-whatchanged) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Find what changed in a Git commit +====== +Git offers several ways you can quickly see which files changed in a +commit. +![Code going into a computer.][1] + +If you use Git every day, you probably make a lot of commits. If you're using Git every day in a project with other people, it's safe to assume that _everyone_ is making lots of commits. Every day. And this means you're aware of how disorienting a Git log can become, with a seemingly eternal scroll of changes and no sign of what's been changed. + +So how do you find out what file changed in a specific commit? It's easier than you think. + +### Find what file changed in a commit + +To find out which files changed in a given commit, use the `git log --raw` command. It's the fastest and simplest way to get insight into which files a commit affects. The `git log` command is underutilized in general, largely because it has so many formatting options, and many users get overwhelmed by too many choices and, in some cases, unclear documentation. + +The log mechanism in Git is surprisingly flexible, though, and the `--raw` option provides a log of commits in your current branch, plus a list of each file that had changes made to it. + +Here's the output of a standard `git log`: + + +``` +$ git log +commit fbbbe083aed75b24f2c77b1825ecab10def0953c (HEAD -> dev, origin/dev) +Author: tux <[tux@example.com][2]> +Date:   Sun Nov 5 21:40:37 2020 +1300 + +    exit immediately from failed download + +commit 094f9948cd995acfc331a6965032ea0d38e01f03 (origin/master, master) +Author: Tux <[tux@example.com][2]> +Date:   Fri Aug 5 02:05:19 2020 +1200 + +    export makeopts from etc/example.conf + +commit 76b7b46dc53ec13316abb49cc7b37914215acd47 +Author: Tux <[tux@example.com][2]> +Date:   Sun Jul 31 21:45:24 2020 +1200 + +    fix typo in help message +``` + +Even when the author helpfully specifies in the commit message which files changed, the log is fairly terse. + +Here's the output of `git log --raw`: + + +``` +$ git log --raw +commit fbbbe083aed75b24f2c77b1825ecab10def0953c (HEAD -> dev, origin/dev) +Author: tux <[tux@example.com][2]> +Date:   Sun Nov 5 21:40:37 2020 +1300 + +    exit immediately from failed download + +:100755 100755 cbcf1f3 4cac92f M        src/example.lua + +commit 094f9948cd995acfc331a6965032ea0d38e01f03 (origin/master, master) +Author: Tux <[tux@example.com][2]> +Date:   Fri Aug 5 02:05:19 2020 +1200 + +    export makeopts from etc/example.conf +    +:100755 100755 4c815c0 cbcf1f3 M     src/example.lua +:100755 100755 71653e1 8f5d5a6 M     src/example.spec +:100644 100644 9d21a6f e33caba R100  etc/example.conf  etc/example.conf-default + +commit 76b7b46dc53ec13316abb49cc7b37914215acd47 +Author: Tux <[tux@example.com][2]> +Date:   Sun Jul 31 21:45:24 2020 +1200 + +    fix typo in help message + +:100755 100755 e253aaf 4c815c0 M        src/example.lua +``` + +This tells you exactly which file was added to the commit and how the file was changed (`A` for added, `M` for modified, `R` for renamed, and `D` for deleted). + +### Git whatchanged + +The `git whatchanged` command is a legacy command that predates the log function. Its documentation says you're not meant to use it in favor of `git log --raw` and implies it's essentially deprecated. However, I still find it a useful shortcut to (mostly) the same output (although merge commits are excluded), and I anticipate creating an alias for it should it ever be removed. If you don't need to merge commits in your log (and you probably don't, if you're only looking to see files that changed), try `git whatchanged` as an easy mnemonic. + +### View changes + +Not only can you see which files changed, but you can also make `git log` display exactly what changed in the files. Your Git log can produce an inline diff, a line-by-line display of all changes for each file, with the `--patch` option: + + +``` +commit 62a2daf8411eccbec0af69e4736a0fcf0a469ab1 (HEAD -> master) +Author: Tux <[Tux@example.com][3]> +Date:   Wed Mar 10 06:46:58 2021 +1300 + +    commit + +diff --git a/hello.txt b/hello.txt +index 65a56c3..36a0a7d 100644 +\--- a/hello.txt ++++ b/hello.txt +@@ -1,2 +1,2 @@ + Hello +-world ++opensource.com +``` + +In this example, the one-word line "world" was removed from `hello.txt` and the new line "opensource.com" was added. + +These patches can be used with common Unix utilities like [diff and patch][4], should you need to make the same changes manually elsewhere. The patches are also a good way to summarize the important parts of what new information a specific commit introduces. This is an invaluable overview when you've introduced a bug during a sprint. To find the cause of the error faster, you can ignore the parts of a file that didn't change and review just the new code. + +### Simple commands for complex results + +You don't have to understand refs and branches and commit hashes to view what files changed in a commit. Your Git log was designed to report Git activity to you, and if you want to format it in a specific way or extract specific information, it's often a matter of wading through many screens of documentation to put together the right command. Luckily, one of the most common requests about Git history is available with just one or two options: `--raw` and `--patch`. And if you can't remember `--raw`, just think, "Git, what changed?" and type `git whatchanged`. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/git-whatchanged + +作者:[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/code_computer_development_programming.png?itok=4OM29-82 (Code going into a computer.) +[2]: mailto:tux@example.com +[3]: mailto:Tux@example.com +[4]: https://opensource.com/article/18/8/diffs-patches From 4f1400d88208f758748cfc60cc5c7771c681bd24 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 2 Apr 2021 05:04:50 +0800 Subject: [PATCH 537/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210401=20?= =?UTF-8?q?Use=20awk=20to=20calculate=20letter=20frequency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210401 Use awk to calculate letter frequency.md --- ...1 Use awk to calculate letter frequency.md | 286 ++++++++++++++++++ 1 file changed, 286 insertions(+) create mode 100644 sources/tech/20210401 Use awk to calculate letter frequency.md diff --git a/sources/tech/20210401 Use awk to calculate letter frequency.md b/sources/tech/20210401 Use awk to calculate letter frequency.md new file mode 100644 index 0000000000..afc6449ff1 --- /dev/null +++ b/sources/tech/20210401 Use awk to calculate letter frequency.md @@ -0,0 +1,286 @@ +[#]: subject: (Use awk to calculate letter frequency) +[#]: via: (https://opensource.com/article/21/4/gawk-letter-game) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Use awk to calculate letter frequency +====== +Write an awk script to determine the most (and least) common letters in +a set of words. +![Typewriter keys in multicolor][1] + +I recently started writing a game where you build words using letter tiles. To create the game, I needed to know the frequency of letters across regular words in the English language, so I could present a useful set of letter tiles. Letter frequency is discussed in various places, including [on Wikipedia][2], but I wanted to calculate the letter frequency myself. + +Linux provides a list of words in the `/usr/share/dict/words` file, so I already have a list of likely words to use. The `words` file contains lots of words that I want, but a few that I don't. I wanted a list of all words that weren't compound words (no hyphens or spaces) or proper nouns (no uppercase letters). To get that list, I can run the `grep` command to pull out only the lines that consist solely of lowercase letters: + + +``` +`$ grep  '^[a-z]*$' /usr/share/dict/words` +``` + +This regular expression asks `grep` to match patterns that are only lowercase letters. The characters `^` and `$` in the pattern represent the start and end of the line, respectively. The `[a-z]` grouping will match only the lowercase letters **a** to **z**. + +Here's a quick sample of the output: + + +``` +$ grep  '^[a-z]*$' /usr/share/dict/words | head +a +aa +aaa +aah +aahed +aahing +aahs +aal +aalii +aaliis +``` + +And yes, those are all valid words. For example, "aahed" is the past tense exclamation of "aah," as in relaxation. And an "aalii" is a bushy tropical shrub. + +Now I just need to write a `gawk` script to do the work of counting the letters in each word, and then print the relative frequency of each letter it finds. + +### Counting letters + +One way to count letters in `gawk` is to iterate through each character in each input line and count occurrences of each letter **a** to **z**. The `substr` function will return a substring of a given length, such as a single letter, from a larger string. For example, this code example will evaluate each character `c` from the input: + + +``` +{ +    len = length($0); for (i = 1; i <= len; i++) { +        c = substr($0, i, 1); +    } +} +``` + +If I start with a global string `LETTERS` that contains the alphabet, I can use the `index` function to find the location of a single letter in the alphabet. I'll expand the `gawk` code example to evaluate only the letters **a** to **z** in the input: + + +``` +BEGIN { LETTERS = "abcdefghijklmnopqrstuvwxyz" } +  +{ +    len = length($0); for (i = 1; i <= len; i++) { +        c = substr($0, i, 1); +        ltr = index(LETTERS, c); +    } +} +``` + +Note that the index function returns the first occurrence of the letter from the `LETTERS` string, starting with 1 at the first letter, or zero if not found. If I have an array that is 26 elements long, I can use the array to count the occurrences of each letter. I'll add this to my code example to increment (using `++`) the count for each letter as it appears in the input: + + +``` +BEGIN { LETTERS = "abcdefghijklmnopqrstuvwxyz" } +  +{ +    len = length($0); for (i = 1; i <= len; i++) { +        c = substr($0, i, 1); +        ltr = index(LETTERS, c); +  +        if (ltr > 0) { +            ++count[ltr]; +        } +    } +} +``` + +### Printing relative frequency + +After the `gawk` script counts all the letters, I want to print the frequency of each letter it finds. I am not interested in the total number of each letter from the input, but rather the _relative frequency_ of each letter. The relative frequency scales the counts so that the letter with the fewest occurrences (such as the letter **q**) is set to 1, and other letters are relative to that. + +I'll start with the count for the letter **a**, then compare that value to the counts for each of the other letters **b** to **z**: + + +``` +END { +    min = count[1]; for (ltr = 2; ltr <= 26; ltr++) { +        if (count[ltr] < min) { +            min = count[ltr]; +        } +    } +} +``` + +At the end of that loop, the variable `min` contains the minimum count for any letter. I can use that to provide a scale for the counts to print the relative frequency of each letter. For example, if the letter with the lowest occurrence is **q**, then `min` will be equal to the **q** count. + +Then I loop through each letter and print it with its relative frequency. I divide each count by `min` to print the relative frequency, which means the letter with the lowest count will be printed with a relative frequency of 1. If another letter appears twice as often as the lowest count, that letter will have a relative frequency of 2. I'm only interested in integer values here, so 2.1 and 2.9 are the same as 2 for my purposes: + + +``` +END { +    min = count[1]; for (ltr = 2; ltr <= 26; ltr++) { +        if (count[ltr] < min) { +            min = count[ltr]; +        } +    } +  +    for (ltr = 1; ltr <= 26; ltr++) { +        print substr(LETTERS, ltr, 1), int(count[ltr] / min); +    } +} +``` + +### Putting it all together + +Now I have a `gawk` script that can count the relative frequency of letters in its input: + + +``` +#!/usr/bin/gawk -f +  +# only count a-z, ignore A-Z and any other characters +  +BEGIN { LETTERS = "abcdefghijklmnopqrstuvwxyz" } +  +{ +    len = length($0); for (i = 1; i <= len; i++) { +        c = substr($0, i, 1); +        ltr = index(LETTERS, c); +  +        if (ltr > 0) { +            ++count[ltr]; +        } +    } +} +  +# print relative frequency of each letter +    +END { +    min = count[1]; for (ltr = 2; ltr <= 26; ltr++) { +        if (count[ltr] < min) { +            min = count[ltr]; +        } +    } +  +    for (ltr = 1; ltr <= 26; ltr++) { +        print substr(LETTERS, ltr, 1), int(count[ltr] / min); +    } +} +``` + +I'll save that to a file called `letter-freq.awk` so that I can use it more easily from the command line. + +If you prefer, you can also use `chmod +x` to make the file executable on its own. The `#!/usr/bin/gawk -f` on the first line means Linux will run it as a script using the `/usr/bin/gawk` program. And because the `gawk` command line uses `-f` to indicate which file it should use as a script, you need that hanging `-f` so that executing `letter-freq.awk` at the shell will be properly interpreted as running `/usr/bin/gawk -f letter-freq.awk` instead. + +I can test the script with a few simple inputs. For example, if I feed the alphabet into my `gawk` script, each letter should have a relative frequency of 1: + + +``` +$ echo abcdefghijklmnopqrstuvwxyz | gawk -f letter-freq.awk +a 1 +b 1 +c 1 +d 1 +e 1 +f 1 +g 1 +h 1 +i 1 +j 1 +k 1 +l 1 +m 1 +n 1 +o 1 +p 1 +q 1 +r 1 +s 1 +t 1 +u 1 +v 1 +w 1 +x 1 +y 1 +z 1 +``` + +Repeating that example but adding an extra instance of the letter **e** will print the letter **e** with a relative frequency of 2 and every other letter as 1: + + +``` +$ echo abcdeefghijklmnopqrstuvwxyz | gawk -f letter-freq.awk +a 1 +b 1 +c 1 +d 1 +e 2 +f 1 +g 1 +h 1 +i 1 +j 1 +k 1 +l 1 +m 1 +n 1 +o 1 +p 1 +q 1 +r 1 +s 1 +t 1 +u 1 +v 1 +w 1 +x 1 +y 1 +z 1 +``` + +And now I can take the big step! I'll use the `grep` command with the `/usr/share/dict/words` file and identify the letter frequency for all words spelled entirely with lowercase letters: + + +``` +$ grep  '^[a-z]*$' /usr/share/dict/words | gawk -f letter-freq.awk +a 53 +b 12 +c 28 +d 21 +e 72 +f 7 +g 15 +h 17 +i 58 +j 1 +k 5 +l 36 +m 19 +n 47 +o 47 +p 21 +q 1 +r 46 +s 48 +t 44 +u 25 +v 6 +w 4 +x 1 +y 13 +z 2 +``` + +Of all the lowercase words in the `/usr/share/dict/words` file, the letters **j**, **q**, and **x** occur least frequently. The letter **z** is also pretty rare. Not surprisingly, the letter **e** is the most frequently used. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/gawk-letter-game + +作者:[Jim Hall][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/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-docdish-typewriterkeys-3.png?itok=NyBwMdK_ (Typewriter keys in multicolor) +[2]: https://en.wikipedia.org/wiki/Letter_frequency From ece97aaa5d6cb280368dc5092b585c3e7d53dccb Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 2 Apr 2021 08:59:00 +0800 Subject: [PATCH 538/818] translating --- ...10329 Manipulate data in files with Lua.md | 97 ------------------- ...10329 Manipulate data in files with Lua.md | 97 +++++++++++++++++++ 2 files changed, 97 insertions(+), 97 deletions(-) delete mode 100644 sources/tech/20210329 Manipulate data in files with Lua.md create mode 100644 translated/tech/20210329 Manipulate data in files with Lua.md diff --git a/sources/tech/20210329 Manipulate data in files with Lua.md b/sources/tech/20210329 Manipulate data in files with Lua.md deleted file mode 100644 index 7d47bed036..0000000000 --- a/sources/tech/20210329 Manipulate data in files with Lua.md +++ /dev/null @@ -1,97 +0,0 @@ -[#]: subject: (Manipulate data in files with Lua) -[#]: via: (https://opensource.com/article/21/3/lua-files) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Manipulate data in files with Lua -====== -Understand how Lua handles reading and writing data. -![Person standing in front of a giant computer screen with numbers, data][1] - -Some data is ephemeral, stored in RAM, and only significant while an application is running. But some data is meant to be persistent, stored on a hard drive for later use. When you program, whether you're working on a simple script or a complex suite of tools, it's common to need to read and write files. Sometimes a file may contain configuration options, and other times the file is the data that your user is creating with your application. Every language handles this task a little differently, and this article demonstrates how to handle data files with Lua. - -### Installing Lua - -If you're on Linux, you can install Lua from your distribution's software repository. On macOS, you can install Lua from [MacPorts][2] or [Homebrew][3]. On Windows, you can install Lua from [Chocolatey][4]. - -Once you have Lua installed, open your favorite text editor and get ready to code. - -### Reading a file with Lua - -Lua uses the `io` library for data input and output. The following example creates a function called `ingest` to read data from a file and then parses it with the `:read` function. When opening a file in Lua, there are several modes you can enable. Because I just need to read data from this file, I use the `r` (for "read") mode: - - -``` -function ingest(file) -   local f = io.open(file, "r") -   local lines = f:read("*all") -   f:close() -   return(lines) -end - -myfile=ingest("example.txt") -print(myfile) -``` - -In the code, notice that the variable `myfile` is created to trigger the `ingest` function, and therefore, it receives whatever that function returns. The `ingest` function returns the lines (from a variable intuitively called `lines`) of the file. When the contents of the `myfile` variable are printed in the final step, the lines of the file appear in the terminal. - -If the file `example.txt` contains configuration options, then I would write some additional code to parse that data, probably using another Lua library depending on whether the configuration was stored as an INI file or YAML file or some other format. If the data were an SVG graphic, I'd write extra code to parse XML, probably using an SVG library for Lua. In other words, the data your code reads can be manipulated once it's loaded into memory, but all that's required to load it is the `io` library. - -### Writing data to a file with Lua - -Whether you're storing data your user is creating with your application or just metadata about what the user is doing in an application (for instance, game saves or recent songs played), there are many good reasons to store data for later use. In Lua, this is achieved through the `io` library by opening a file, writing data into it, and closing the file: - - -``` -function exgest(file) -   local f = io.open(file, "a") -   io.output(f) -   io.write("hello world\n") -   io.close(f) -end - -exgest("example.txt") -``` - -To read data from the file, I open the file in `r` mode, but this time I use `a` (for "append") to write data to the end of the file. Because I'm writing plain text into a file, I added my own newline character (`\n`). Often, you're not writing raw text into a file, and you'll probably use an additional library to write a specific format instead. For instance, you might use an INI or YAML library to help write configuration files, an XML library to write XML, and so on. - -### File modes - -When opening files in Lua, there are some safeguards and parameters to define how a file should be handled. The default is `r`, which permits you to read data only: - - * **r** for read only - * **w** to overwrite or create a new file if it doesn't already exist - * **r+** to read and overwrite - * **a** to append data to a file or make a new file if it doesn't already exist - * **a+** to read data, append data to a file, or make a new file if it doesn't already exist - - - -There are a few others (`b` for binary formats, for instance), but those are the most common. For the full documentation, refer to the excellent Lua documentation on [Lua.org/manual][5]. - -### Lua and files - -Like other programming languages, Lua has plenty of library support to access a filesystem to read and write data. Because Lua has a consistent and simple syntax, it's easy to perform complex processing on data in files of any format. Try using Lua for your next software project, or as an API for your C or C++ project. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/lua-files - -作者:[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/data_metrics_analytics_desktop_laptop.png?itok=9QXd7AUr (Person standing in front of a giant computer screen with numbers, data) -[2]: https://opensource.com/article/20/11/macports -[3]: https://opensource.com/article/20/6/homebrew-mac -[4]: https://opensource.com/article/20/3/chocolatey -[5]: http://lua.org/manual diff --git a/translated/tech/20210329 Manipulate data in files with Lua.md b/translated/tech/20210329 Manipulate data in files with Lua.md new file mode 100644 index 0000000000..dfbae5c7fb --- /dev/null +++ b/translated/tech/20210329 Manipulate data in files with Lua.md @@ -0,0 +1,97 @@ +[#]: subject: (Manipulate data in files with Lua) +[#]: via: (https://opensource.com/article/21/3/lua-files) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +用 Lua 操作文件中的数据 +====== +了解 Lua 如何处理数据的读写。 +![Person standing in front of a giant computer screen with numbers, data][1] + +有些数据是临时的,存储在 RAM 中,只有在应用运行时才有意义。但有些数据是要持久的,存储在硬盘上供以后使用。当你编程时,无论是简单的脚本还是复杂的工具套件,通常都需要读取和写入文件。有时文件可能包含配置选项,而另一些时候这个文件是你的用户用你的应用创建的数据。每种语言都会以不同的方式处理这项任务,本文将演示如何使用 Lua 处理文件数据。 + +### 安装 Lua + +如果你使用的是 Linux,你可以从你的发行版软件库中安装 Lua。在 macOS 上,你可以从 [MacPorts][2] 或 [Homebrew][3] 安装 Lua。在 Windows 上,你可以从 [Chocolatey][4] 安装 Lua。 + +安装 Lua 后,打开你最喜欢的文本编辑器并准备开始。 + +### 用 Lua 读取文件 + +Lua 使用 `io` 库进行数据输入和输出。下面的例子创建了一个名为 `ingest` 的函数来从文件中读取数据,然后用 `:read` 函数进行解析。在 Lua 中打开一个文件时,有几种模式可以启用。因为我只需要从这个文件中读取数据,所以我使用 `r`(代表”读“)模式: + + +``` +function ingest(file) +   local f = io.open(file, "r") +   local lines = f:read("*all") +   f:close() +   return(lines) +end + +myfile=ingest("example.txt") +print(myfile) +``` + +在这段代码中,注意到变量 `myfile` 是为了触发 `ingest` 函数而创建的,因此,它接收该函数返回的任何内容。`ingest` 函数返回文件的行数(从一个称为 `lines` 的变量中)。当最后一步打印 `myfile` 变量的内容时,文件的行数就会出现在终端中。 + +如果文件 `example.txt` 中包含了配置选项,那么我会写一些额外的代码来解析这些数据,可能会使用另一个 Lua 库,这取决于配置是以 INI 文件还是 YAML 文件或其他格式存储。如果数据是 SVG 图形,我会写额外的代码来解析 XML,可能会使用 Lua 的 SVG 库。换句话说,你的代码读取的数据一旦加载到内存中,就可以进行操作,但是它们都需要加载 `io` 库。 + +### 用 Lua 将数据写入文件 + +无论你是要存储用户用你的应用创建的数据,还是仅仅是关于用户在应用中做了什么的元数据(例如,游戏保存或最近播放的歌曲),都有很多很好的理由来存储数据供以后使用。在 Lua 中,这是通过 `io` 库实现的,打开一个文件,将数据写入其中,然后关闭文件: + + +``` +function exgest(file) +   local f = io.open(file, "a") +   io.output(f) +   io.write("hello world\n") +   io.close(f) +end + +exgest("example.txt") +``` + +为了从文件中读取数据,我以 `r` 模式打开文件,但这次我使用 `a` (用于”追加“)将数据写到文件的末尾。因为我是将纯文本写入文件,所以我添加了自己的换行符(`/n`)。通常情况下,你并不是将原始文本写入文件,你可能会使用一个额外的库来代替写入一个特定的格式。例如,你可能会使用 INI 或 YAML 库来帮助编写配置文件,使用 XML 库来编写 XML,等等。 + +### 文件模式 + +在 Lua 中打开文件时,有一些保护措施和参数来定义如何处理文件。默认值是 `r`,允许你只读数据: + + * **r** 只读 + * **w** 如果文件不存在,覆盖或创建一个新文件。 + * **r+** 读取和覆盖。 + * **a** 追加数据到文件中,或在文件不存在的情况下创建一个新文件。 + * **a+** 读取数据,将数据追加到文件中,或文件不存在的话,创建一个新文件。 + + + +还有一些其他的(例如,`b` 代表二进制格式),但这些是最常见的。关于完整的文档,请参考 [Lua.org/manual][5] 上的优秀 Lua 文档。 + +### Lua 和文件 + +和其他编程语言一样,Lua 有大量的库支持来访问文件系统来读写数据。因为 Lua 有一个一致且简单语法,所以很容易对任何格式的文件数据进行复杂的处理。试着在你的下一个软件项目中使用 Lua,或者作为 C 或 C++ 项目的 API。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/lua-files + +作者:[Seth Kenlon][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/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_metrics_analytics_desktop_laptop.png?itok=9QXd7AUr (Person standing in front of a giant computer screen with numbers, data) +[2]: https://opensource.com/article/20/11/macports +[3]: https://opensource.com/article/20/6/homebrew-mac +[4]: https://opensource.com/article/20/3/chocolatey +[5]: http://lua.org/manual From dc583cbbc6b9d5737f3d8b8748edf8b7abf144f8 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 2 Apr 2021 09:04:42 +0800 Subject: [PATCH 539/818] translating --- ...ed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md b/sources/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md index d1e626b69a..fd32676c3b 100644 --- a/sources/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md +++ b/sources/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md @@ -2,7 +2,7 @@ [#]: via: (https://itsfoss.com/wrong-time-dual-boot/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From e0ed344baac301b67acaa2d36b7c003b0d25a9af Mon Sep 17 00:00:00 2001 From: "Qian.Sun" <44011673+DCOLIVERSUN@users.noreply.github.com> Date: Fri, 2 Apr 2021 13:06:19 +0800 Subject: [PATCH 540/818] translated by DCOLIVERSUN Find what changed in a Git commit is translated by DCOLIVERSUN --- sources/tech/20210401 Find what changed in a Git commit.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210401 Find what changed in a Git commit.md b/sources/tech/20210401 Find what changed in a Git commit.md index 8fc013bedb..19b5308d88 100644 --- a/sources/tech/20210401 Find what changed in a Git commit.md +++ b/sources/tech/20210401 Find what changed in a Git commit.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/4/git-whatchanged) [#]: author: (Seth Kenlon https://opensource.com/users/seth) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (DCOLIVERSUN) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 576bccea7dd3f7e9219d2b6480bced3028925506 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 2 Apr 2021 20:14:56 +0800 Subject: [PATCH 541/818] PRF @geekpi --- ... Why you should care about service mesh.md | 43 +++++++++---------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/translated/tech/20210326 Why you should care about service mesh.md b/translated/tech/20210326 Why you should care about service mesh.md index 8c555106ed..1df3d082cd 100644 --- a/translated/tech/20210326 Why you should care about service mesh.md +++ b/translated/tech/20210326 Why you should care about service mesh.md @@ -3,51 +3,48 @@ [#]: author: (Daniel Oh https://opensource.com/users/daniel-oh) [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) -为什么你要关心 Service Mesh +为什么需要关心服务网格 ====== -在微服务环境中,Service Mesh 为开发和运营提供了好处。 -![Net catching 1s and 0s or data in the clouds][1] -很多开发者不知道为什么要关心 [Service Mesh][2]。这是我在开发者见面会、会议和实践研讨会上关于云原生架构的微服务开发的演讲中经常被问到的问题。我的回答总是一样的:“只要你想简化你的微服务架构,你就应该在 Kubernetes 上运行。” +> 在微服务环境中,服务网格为开发和运营提供了好处。 -关于简化,你可能也想知道,为什么分布式微服务必须设计得如此复杂才能在 Kubernetes 集群上运行。正如本文所解释的那样,许多开发人员通过 Service Mesh 解决了微服务架构的复杂性,并通过在生产中采用 Service Mesh 获得了额外的好处。 +![](https://img.linux.net.cn/data/attachment/album/202104/02/201409os5r13omp5p5bssb.jpg) -### 什么是 Service Mesh? +很多开发者不知道为什么要关心[服务网格][2]Service Mesh。这是我在开发者见面会、会议和实践研讨会上关于云原生架构的微服务开发的演讲中经常被问到的问题。我的回答总是一样的:“只要你想简化你的微服务架构,它就应该运行在 Kubernetes 上。” -Service Mesh 是一个专门的基础设施层,用于提供一个透明的、独立于代码的 (polyglot) 方式,以消除应用代码中的非功能性微服务能力。 +关于简化,你可能也想知道,为什么分布式微服务必须设计得如此复杂才能在 Kubernetes 集群上运行。正如本文所解释的那样,许多开发人员通过服务网格解决了微服务架构的复杂性,并通过在生产中采用服务网格获得了额外的好处。 +### 什么是服务网格? + +服务网格是一个专门的基础设施层,用于提供一个透明的、独立于代码的 (polyglot) 方式,以消除应用代码中的非功能性微服务能力。 ![Before and After Service Mesh][3] -(Daniel Oh, [CC BY-SA 4.0][4]) +### 为什么服务网格对开发者很重要 -### 为什么 Service Mesh 对开发者很重要 +当开发人员将微服务部署到云时,无论业务功能如何,他们都必须解决非功能性微服务功能,以避免级联故障。这些功能通常可以体现在服务发现、日志、监控、韧性resiliency、认证、弹性elasticity和跟踪等方面。开发人员必须花费更多的时间将它们添加到每个微服务中,而不是开发实际的业务逻辑,这使得微服务变得沉重而复杂。 -当开发人员将微服务部署到云时,无论业务功能如何,他们都必须解决非功能性微服务功能,以避免级联故障。这些功能通常可以体现在服务发现、日志、监控、韧性、认证、弹性和跟踪等方面。开发人员必须花费更多的时间将它们添加到每个微服务中,而不是开发实际的业务逻辑,这使得微服务变得沉重而复杂。 +随着企业加速向云计算转移,服务网格 可以提高开发人员的生产力。Kubernetes 加服务网格平台不需要让服务负责处理这些复杂的问题,也不需要在每个服务中添加更多的代码来处理云原生的问题,而是负责向运行在该平台上的任何应用(现有的或新的,用任何编程语言或框架)提供这些服务。那么微服务就可以轻量级,专注于其业务逻辑,而不是云原生的复杂性。 -随着企业加速向云计算转移,Service Mesh 可以提高开发人员的生产力。Kubernetes 加 Service Mesh 平台不需要让服务负责处理这些复杂的问题,也不需要在每个服务中添加更多的代码来处理云原生的问题,而是负责向运行在该平台上的任何应用(现有的或新的,用任何编程语言或框架)提供这些服务。那么微服务就可以轻量级,专注于其业务逻辑,而不是云原生的复杂性。 +### 为什么服务网格对运维很重要 -### 为什么 Service Mesh 对运维很重要 +这并没有回答为什么运维团队需要关心在 Kubernetes 上运行云原生微服务的服务网格。因为运维团队必须确保在 Kubernetes 环境上的大型混合云和多云上部署新的云原生应用的强大安全性、合规性和可观察性。 -这并没有回答为什么运维团队需要关心在 Kubernetes 上运行云原生微服务的 Service Mesh。因为运维团队必须确保在 Kubernetes 环境上的大型混合云和多云上部署新的云原生应用的强大安全性、合规性和可观察性。 +服务网格由一个用于管理代理路由流量的控制平面和一个用于注入边车Sidecar的数据平面组成。边车允许运维团队做一些比如添加第三方安全工具和追踪所有服务通信中的流量,以避免安全漏洞或合规问题。服务网格还可以通过在图形面板上可视化地跟踪指标来提高观察能力。 -Service Mesh 由一个用于管理代理路由流量的 control plane 和一个用于注入 Sidecar 的 data plane 组成。Sidecar 允许运维团队做一些比如添加第三方安全工具和追踪所有服务通信中的流量,以避免安全漏洞或合规问题。Service Mesh 还可以通过在图形面板上可视化地跟踪指标来提高观察能力。 +### 如何开始使用服务网格 -### 如何开始使用 Service Mesh +对于开发者和运维人员,以及从应用开发到平台运维来说,服务网格可以更有效地管理云原生功能。 -对于开发者和运维人员,以及从应用开发到平台运营来说,Service Mesh 可以更有效地管理云原生功能。 - -你可能想知道从哪里开始采用 Service Mesh 来配合你的微服务应用和架构。幸运的是,有许多开源的 Service Mesh 项目。许多云服务提供商也在他们的 Kubernetes 平台中提供 Service Mesh。 +你可能想知道从哪里开始采用服务网格来配合你的微服务应用和架构。幸运的是,有许多开源的服务网格项目。许多云服务提供商也在他们的 Kubernetes 平台中提供 服务网格。 ![CNCF Service Mesh Landscape][5] -(Daniel Oh, [CC BY-SA 4.0][4]) - -你可以在 [CNCF Service Mesh Landscape][6] 页面中找到最受欢迎的 Service Mesh 项目和服务的链接。 +你可以在 [CNCF Service Mesh Landscape][6] 页面中找到最受欢迎的服务网格项目和服务的链接。 -------------------------------------------------------------------------------- @@ -56,7 +53,7 @@ via: https://opensource.com/article/21/3/service-mesh 作者:[Daniel Oh][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/) 荣誉推出 From 41b55625abc59018dcb0059967ea7df07c65e529 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 2 Apr 2021 20:15:28 +0800 Subject: [PATCH 542/818] PUB @geekpi https://linux.cn/article-13261-1.html --- .../20210326 Why you should care about service mesh.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210326 Why you should care about service mesh.md (98%) diff --git a/translated/tech/20210326 Why you should care about service mesh.md b/published/20210326 Why you should care about service mesh.md similarity index 98% rename from translated/tech/20210326 Why you should care about service mesh.md rename to published/20210326 Why you should care about service mesh.md index 1df3d082cd..9e387a2342 100644 --- a/translated/tech/20210326 Why you should care about service mesh.md +++ b/published/20210326 Why you should care about service mesh.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13261-1.html) 为什么需要关心服务网格 ====== From c74669ccba457e2cbafb49a0185060a597fa0d66 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 2 Apr 2021 21:53:58 +0800 Subject: [PATCH 543/818] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wyxplus 翻译的很用心,赞! --- ... up a homelab from hardware to firewall.md | 48 +++++++++---------- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/translated/tech/20190319 How to set up a homelab from hardware to firewall.md b/translated/tech/20190319 How to set up a homelab from hardware to firewall.md index 4b3e4de26e..0668ac435e 100644 --- a/translated/tech/20190319 How to set up a homelab from hardware to firewall.md +++ b/translated/tech/20190319 How to set up a homelab from hardware to firewall.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (wyxplus) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to set up a homelab from hardware to firewall) @@ -10,48 +10,45 @@ 如何从硬件到防火墙建立一个家庭实验室 ====== -查看用于构建自己的家庭实验室的硬件和软件方案。 +> 了解一下用于构建自己的家庭实验室的硬件和软件方案。 -![][1] +![](https://img.linux.net.cn/data/attachment/album/202104/02/215222t2fiqpt17gfpkkii.jpg) -你有想过创建一个家庭实验室吗?或许你想尝试不同的技术,构建开发环境、亦或是建立自己的私有云。对于拥有一个家庭实验室有很多理由,本教程旨在使入门变得更容易。 +你有想过创建一个家庭实验室吗?或许你想尝试不同的技术,构建开发环境、亦或是建立自己的私有云。拥有一个家庭实验室的理由很多,本教程旨在使入门变得更容易。 规划家庭实验室时,需要考虑三方面:硬件、软件和维护。我们将在这里查看前两方面,并在以后的文章中讲述如何节省维护计算机实验室的时间。 ### 硬件 +在考虑硬件需求时,首先要考虑如何使用实验室以及你的预算、噪声、空间和电力使用情况。 -在考虑硬件需求时,首先要考虑如何使用实验室以及你的预算,噪声,空间和电源使用情况。 - - -如果购买新硬件过于昂贵,请搜索当地的大学,广告以及诸如 eBay 或 Craigslist 之类的网站,能获取二手服务器的地方。它们通常很便宜,并且服务器级的硬件可以使用很多年。你将需要三类硬件:虚拟化服务器,存储设备和路由器/防火墙。 +如果购买新硬件过于昂贵,请搜索当地的大学、广告以及诸如 eBay 或 Craigslist 之类的网站,能获取二手服务器的地方。它们通常很便宜,并且服务器级的硬件可以使用很多年。你将需要三类硬件:虚拟化服务器、存储设备和路由器/防火墙。 #### 虚拟化服务器 -一个虚拟化服务器允许你去运行多个共享物理机资源的虚拟机,同时最大化利用和隔离资源。如果你打算销毁一台虚拟机,无需重建整个服务器,因为其仅是一个虚拟机。如果你想进行测试或尝试某些操作而不损坏整个系统,仅需要新建一个虚拟机来运行即可。 +一个虚拟化服务器允许你去运行多个共享物理机资源的虚拟机,同时最大化利用和隔离资源。如果你弄坏了一台虚拟机,无需重建整个服务器,只需虚拟一个好了。如果你想进行测试或尝试某些操作而不损坏整个系统,仅需要新建一个虚拟机来运行即可。 -在虚拟服务器中,需考虑两个最重要的因素是 CPU 的核心数及其运行速度以及内存容量。如果没有足够的资源够全部虚拟机共享,那么它们将被重复分配并试着获取其他虚拟机的 CPU 的周期和内存。 +在虚拟服务器中,需考虑两个最重要的因素是 CPU 的核心数及其运行速度以及内存容量。如果没有足够的资源够全部虚拟机共享,那么它们将被过度分配并试着获取其他虚拟机的 CPU 的周期和内存。 -因此,考虑一个多核 CPU 的平台。你要确保 CPU 支持虚拟化指令(因特尔的 VT-x 指令集和 AMD 的 AMD-V 指令集)。能够处理虚拟化优质消费级处理器有因特尔的 i5 或 i7 和 AMD 的 Ryzen 处理器。如果你考虑服务器级的硬件,那么因特尔的志强系列和 AMD 的 EPYC 都是不错的选择。内存可能很昂贵,尤其是最近的 DDR4 内存。当我们估计所需多少内存时,请为主机操作系统的内存至少分配 2 GB 的空间。 +因此,考虑一个多核 CPU 的平台。你要确保 CPU 支持虚拟化指令(因特尔的 VT-x 指令集和 AMD 的 AMD-V 指令集)。能够处理虚拟化的优质的消费级处理器有因特尔的 i5 或 i7 和 AMD 的 Ryzen 处理器。如果你考虑服务器级的硬件,那么因特尔的志强系列和 AMD 的 EPYC 都是不错的选择。内存可能很昂贵,尤其是最近的 DDR4 内存。当我们估计所需多少内存时,请为主机操作系统的内存至少分配 2 GB 的空间。 -如果你担心电费或噪声,则诸如因特尔 NUC 设备之类的解决方案虽然外形小巧,功耗低,噪音低,但是却以牺牲可扩展性为代价。 +如果你担心电费或噪声,则诸如因特尔 NUC 设备之类的解决方案虽然外形小巧、功耗低、噪音低,但是却以牺牲可扩展性为代价。 -#### 网络附加存储Network-attached storage(NAS) +#### NAS -如果希望装有硬盘驱动器的计算机存储你的所有个人数据,电影,图片等,并为虚拟化服务器提供存储,则需要网络附加存储(NAS)。 +如果希望装有硬盘驱动器的计算机存储你的所有个人数据,电影,图片等,并为虚拟化服务器提供存储,则需要网络附加存储Network-attached storage(NAS)。 -在大多数情况下,你不太可能需要一颗强力的 CPU。实际上,许多商业 NAS 的解决方案使用低功耗的 ARM CPU。主板能支持多个 SATA 硬盘。如果你的主板没有足够的端口,请使用主机总线适配器host bus adapter(HBA)SAS 控制器添加其他功能。 +在大多数情况下,你不太可能需要一颗强力的 CPU。实际上,许多商业 NAS 的解决方案使用低功耗的 ARM CPU。支持多个 SATA 硬盘的主板是必须的。如果你的主板没有足够的端口,请使用主机总线适配器host bus adapter(HBA)SAS 控制器添加额外的端口。 网络性能对于 NAS 来说是至关重要的,因此最好选择千兆gigabit网络(或更快网络)。 -内存需求将根据你的文件系统而有所不同。ZFS 是 NAS 上最受欢迎的文件系统之一,你将需要更多内存才能使用诸如缓存或重复数据删除之类的功能。纠错码Error-correcting code(ECC)的内存是防止数据损坏的最佳选择(但在购买前请确保你的主板支持)。最后但同样重要的,不要忘记使用不间断电源uninterruptible power supply(UPS),因为断电可能会使得数据出错。 - +内存需求根据你的文件系统而有所不同。ZFS 是 NAS 上最受欢迎的文件系统之一,你需要更多内存才能使用诸如缓存或重复数据删除之类的功能。纠错码Error-correcting code(ECC)的内存是防止数据损坏的最佳选择(但在购买前请确保你的主板支持)。最后但同样重要的,不要忘记使用不间断电源uninterruptible power supply(UPS),因为断电可能会使得数据出错。 #### 防火墙和路由器 你是否曾意识到,廉价的路由器/防火墙通常是保护你的家庭网络不受外部环境影响的主要部分?这些路由器很少及时收到安全更新(如果有的话)。现在害怕了吗?好吧,[确实][2]! -通常,你不需要一颗强大的 CPU 或是大内存来构建你自己的路由器/防火墙,除非你需要高吞吐率或是执行 CPU 密集型任务,像是 VPN 服务器或是流量过滤。在这种情况下,你将需要一个支持 AES-NI 的多核 CPU。 +通常,你不需要一颗强大的 CPU 或是大量内存来构建你自己的路由器/防火墙,除非你需要高吞吐率或是执行 CPU 密集型任务,像是虚拟私有网络服务器或是流量过滤。在这种情况下,你将需要一个支持 AES-NI 的多核 CPU。 你可能想要至少 2 个千兆或更快的以太网卡Ethernet network interface cards(NIC),这不是必需的,但我推荐使用一个管理型交换机来连接你自己的装配的路由器,以创建 VLAN 来进一步隔离和保护你的网络。 @@ -63,22 +60,21 @@ #### 虚拟化软件 -**[KVM][5]**(基于内核的虚拟机Kernel-based Virtual Machine)使你可以将 Linux 变成虚拟机监控程序,以便可以在同一台机器中运行多个虚拟机。最好的是,KVM 作为 Linux 的一部分,它是许多企业和家庭用户的首选。如果你愿意,可以安装 **[libvirt][6]** 和 **[virt-manager][7]** 来管理你的虚拟化平台。 +[KVM][5](基于内核的虚拟机Kernel-based Virtual Machine)使你可以将 Linux 变成虚拟机监控程序,以便可以在同一台机器中运行多个虚拟机。最好的是,KVM 作为 Linux 的一部分,它是许多企业和家庭用户的首选。如果你愿意,可以安装 [libvirt][6] 和 [virt-manager][7] 来管理你的虚拟化平台。 +[Proxmox VE][8] 是一个强大的企业级解决方案,并且是一个完全开源的虚拟化和容器平台。它基于 Debian,使用 KVM 作为其虚拟机管理程序,并使用 LXC 作为容器。Proxmox 提供了强大的网页界面、API,并且可以扩展到许多群集节点,这很有用,因为你永远不知道何时实验室容量不足。 -**[Proxmox VE][8]** 是一个强大的企业级解决方案,并且是一个完整的开源虚拟化和容器平台。它基于 Debian,使用 KVM 作为其虚拟机管理程序,并使用 LXC 作为容器。Proxmox 提供了强大的网页界面,API,并且可以扩展到许多群集节点,这很有用,因为你永远不知道何时实验室容量不足。 - -**[oVirt][9](RHV)** 是另一种使用 KVM 作为虚拟机管理程序的企业级解决方案。不要仅仅因为它是企业,并不意味着你不能在家中使用它。oVirt 提供了强大的网页界面和 API,并且可以处理数百个节点(如果你正在运行那么多服务器,我不想成为你的邻居!)。oVirt 用于家庭实验室的潜在问题是它至少需要一些的节点集:你将需要一个外部存储(例如 NAS)和至少两个其他虚拟化节点(你可以仅在一个上运行它,但是你可能会在维护环境时遇到问题)。 +[oVirt][9](RHV)是另一种使用 KVM 作为虚拟机管理程序的企业级解决方案。不要因为它是企业级的,就意味着你不能在家中使用它。oVirt 提供了强大的网页界面和 API,并且可以处理数百个节点(如果你运行那么多服务器,我可不想成为你的邻居!)。oVirt 用于家庭实验室的潜在问题是它需要一套最低限度的节点:你将需要一个外部存储(例如 NAS)和至少两个其他虚拟化节点(你可以只在一个节点上运行,但你会遇到环境维护方面的问题)。 #### 网络附加存储软件 -**[FreeNAS][10]** 是最受欢迎的开源 NAS 发行版,它基于稳定的 FreeBSD 操作系统。它最强大的功能之一是支持 ZFS 文件系统,该文件系统提供了数据完整性检查、快照、复制和多个级别的冗余(镜像,条带化镜像和条带化)。最重要的是,所有功能都通过功能强大且易于使用的网页界面进行管理。在安装 FreeNAS 之前,请检查硬件是否支持,因为它不如基于 Linux 的发行版那么广泛。 +[FreeNAS][10] 是最受欢迎的开源 NAS 发行版,它基于稳定的 FreeBSD 操作系统。它最强大的功能之一是支持 ZFS 文件系统,该文件系统提供了数据完整性检查、快照、复制和多个级别的冗余(镜像、条带化镜像和条带化)。最重要的是,所有功能都通过功能强大且易于使用的网页界面进行管理。在安装 FreeNAS 之前,请检查硬件是否支持,因为它不如基于 Linux 的发行版那么广泛。 -另一个流行的替代方法是基于 Linux 的 **[OpenMediaVault][11]**。它的主要功能之一是模块化,带有可扩展和添加特性的插件。它包括的功能包括基于网页管理界面和协议,例如 CIFS,SFTP,NFS,iSCSI。以及卷管理,包括软件 RAID,资源分配,访问控制列表access control lists(ACL)和共享管理。由于它是基于 Linux 的,因此其具有广泛的硬件支持。 +另一个流行的替代方法是基于 Linux 的 [OpenMediaVault][11]。它的主要功能之一是模块化,带有可扩展和添加特性的插件。它包括的功能包括基于网页管理界面,CIFS、SFTP、NFS、iSCSI 等协议,以及卷管理,包括软件 RAID、资源配额,访问控制列表access control lists(ACL)和共享管理。由于它是基于 Linux 的,因此其具有广泛的硬件支持。 #### 防火墙/路由器软件 -**[pfSense][12]** 是基于 FreeBSD 的开源企业级路由器和防火墙发行版。它可以直接安装在服务器上,甚至可以安装在虚拟机中(以管理虚拟或物理网络并节省空间)。它有许多功能,可以使用软件包进行扩展。尽管它也有命令行访问权限,但也可以完全使用网页界面对其进行管理。它具有你所希望路由器和防火墙提供的所有功能,例如 DHCP 和 DNS,以及更高级的功能,例如入侵检测(IDS)和入侵防御(IPS)系统。你可以侦听多个不同接口或使用 VLAN 的网络,并且只需鼠标点击几下即可创建安全的 VPN 服务器。pfSense 使用 pf,这是一种有状态的数据包筛选器,它是使用类似于 IPFilter 的语法为 OpenBSD 操作系统开发的。许多公司和组织都有使用 pfSense。 +[pfSense][12] 是基于 FreeBSD 的开源企业级路由器和防火墙发行版。它可以直接安装在服务器上,甚至可以安装在虚拟机中(以管理虚拟或物理网络并节省空间)。它有许多功能,可以使用软件包进行扩展。尽管它也有命令行访问权限,但也可以完全使用网页界面对其进行管理。它具有你所希望路由器和防火墙提供的所有功能,例如 DHCP 和 DNS,以及更高级的功能,例如入侵检测(IDS)和入侵防御(IPS)系统。你可以侦听多个不同接口或使用 VLAN 的网络,并且只需鼠标点击几下即可创建安全的 VPN 服务器。pfSense 使用 pf,这是一种有状态的数据包筛选器,它是为 OpenBSD 操作系统开发的,使用类似 IPFilter 的语法。许多公司和组织都有使用 pfSense。 * * * @@ -91,7 +87,7 @@ via: https://opensource.com/article/19/3/home-lab 作者:[Michael Zamot (Red Hat)][a] 选题:[lujun9972][b] 译者:[wyxplus](https://github.com/wyxplus) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From b736455bd858419eec9729ca9fb32d751dc2738a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 2 Apr 2021 21:54:33 +0800 Subject: [PATCH 544/818] PUB @wyxplus https://linux.cn/article-13262-1.html --- ...90319 How to set up a homelab from hardware to firewall.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190319 How to set up a homelab from hardware to firewall.md (99%) diff --git a/translated/tech/20190319 How to set up a homelab from hardware to firewall.md b/published/20190319 How to set up a homelab from hardware to firewall.md similarity index 99% rename from translated/tech/20190319 How to set up a homelab from hardware to firewall.md rename to published/20190319 How to set up a homelab from hardware to firewall.md index 0668ac435e..54c24e7a14 100644 --- a/translated/tech/20190319 How to set up a homelab from hardware to firewall.md +++ b/published/20190319 How to set up a homelab from hardware to firewall.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wyxplus) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13262-1.html) [#]: subject: (How to set up a homelab from hardware to firewall) [#]: via: (https://opensource.com/article/19/3/home-lab) [#]: author: (Michael Zamot https://opensource.com/users/mzamot) From 1652d9e1d47ba0ae5db41fed9e0fadf9c6c1194b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 2 Apr 2021 22:45:30 +0800 Subject: [PATCH 545/818] PRF @wyxplus --- ...210326 How to read and write files in C.md | 45 +++++++++---------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/translated/tech/20210326 How to read and write files in C.md b/translated/tech/20210326 How to read and write files in C.md index 63b71f7a6a..41580cf762 100644 --- a/translated/tech/20210326 How to read and write files in C.md +++ b/translated/tech/20210326 How to read and write files in C.md @@ -3,22 +3,22 @@ [#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99) [#]: collector: (lujun9972) [#]: translator: (wyxplus) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) 如何用 C++ 读写文件 ====== -如果你知道如何在 C++ 中使用输入输出I/O流,那么你便能够(原则上)处理任何类型的输入输出设备。 +> 如果你知道如何在 C++ 中使用输入输出(I/O)流,那么(原则上)你便能够处理任何类型的输入输出设备。 -![Computer screen with files or windows open][1] +![](https://img.linux.net.cn/data/attachment/album/202104/02/224507a2fq6ofotf4ff4rf.jpg) -在 C++ 中,可以通过将输入输出流与流运算符 `>>` 和 `<<` 结合使用来进行文件读写。当读写文件的时候,这些运算符将应用于代表硬盘驱动器上文件类的实例上。这种基于流的方法有个巨大的优势:从 C++ 的角度,无论你要读取或写入的内容是文件、数据库、控制台,亦或是你通过网络连接的另外一台电脑,这都无关紧要。因此,知道如何使用流运算符来写入文件能够被利用到其他领域。 +在 C++ 中,对文件的读写可以通过使用输入输出流与流运算符 `>>` 和 `<<` 来进行。当读写文件的时候,这些运算符被应用于代表硬盘驱动器上文件类的实例上。这种基于流的方法有个巨大的优势:从 C++ 的角度,无论你要读取或写入的内容是文件、数据库、控制台,亦或是你通过网络连接的另外一台电脑,这都无关紧要。因此,知道如何使用流运算符来写入文件能够被转用到其他领域。 ### 输入输出流类 -C++ 标准库提供了 [ios_base][2] 类。该类充当所有 I/O 流的基类,例如 [basic_ofstream][3] 和 [basic_ifstream][4]。本例将使用特殊的类型来读写字符,`ifstream` 和 `ofstream`。 +C++ 标准库提供了 [ios_base][2] 类。该类作为所有 I/O 流的基类,例如 [basic_ofstream][3] 和 [basic_ifstream][4]。本例将使用读/写字符的专用类型 `ifstream` 和 `ofstream`。 - `ofstream`:输出文件流,并且其能通过插入运算符 `<<` 来实现。 - `ifstream`:输入文件流,并且其能通过提取运算符 `>>` 来实现。 @@ -31,11 +31,11 @@ C++ 标准库提供了 [ios_base][2] 类。该类充当所有 I/O 流的基类 本例程是非常简单:实例化了一个 `ofstream` 来写入,和实例化一个 `ifstream` 来读取。 - ``` -#include <iostream> // cout, cin, cerr etc... -#include <fstream> // ifstream, ofstream -#include <string> +#include // cout, cin, cerr etc... +#include // ifstream, ofstream +#include + int main() { @@ -50,12 +50,13 @@ int main() std::ofstream fileSink(sFilename); // Creates an output file stream if (!fileSink) { - std::cerr << "Canot open " << sFilename << std::endl; + std::cerr << "Canot open " << sFilename << std::endl; exit(-1); } /* std::endl will automatically append the correct EOL */ - fileSink << "Hello Open Source World!" << std::endl; + fileSink << "Hello Open Source World!" << std::endl; + /****************************************** * * @@ -66,17 +67,17 @@ int main() std::ifstream fileSource(sFilename); // Creates an input file stream if (!fileSource) { - std::cerr << "Canot open " << sFilename << std::endl; + std::cerr << "Canot open " << sFilename << std::endl; exit(-1); } else { // Intermediate buffer std::string buffer; - // By default, the >> operator reads word by workd (till whitespace) - while (fileSource >> buffer) + // By default, the >> operator reads word by workd (till whitespace) + while (fileSource >> buffer) { - std::cout << buffer << std::endl; + std::cout << buffer << std::endl; } } @@ -88,22 +89,20 @@ int main() ![Console screenshot][8] -(Stephan Avenwedde, [CC BY-SA 4.0][9]) - -这是个简易、适合初学者的例子。如果你想去使用该代码在你自己的应用中,最好遵从以下建议: +这是个简化的、适合初学者的例子。如果你想去使用该代码在你自己的应用中,请注意以下几点: * 文件流在程序结束的时候自动关闭。如果你想继续执行,那么应该通过调用 `close()` 方法手动关闭。 - * 这些文件流类继承自 [basic_ios][10](在多个级别上),并且重载了 `!` 运算符。这使你可以进行简单的检查,是否可以访问该流。在 [cppreference.com][11] 上,你可以找到该检查何时会(或不会)成功的概述,并且可以进一步实现错误处理。 + * 这些文件流类继承自 [basic_ios][10](在多个层次上),并且重载了 `!` 运算符。这使你可以进行简单的检查是否可以访问该流。在 [cppreference.com][11] 上,你可以找到该检查何时会(或不会)成功的概述,并且可以进一步实现错误处理。 * 默认情况下,`ifstream` 停在空白处并跳过它。要逐行读取直到到达 [EOF][13] ,请使用 `getline(...)` 方法。 - * 为了读写二进制文件,请将 `std::ios::binary` 标志传递给构造函数:这样可以防止 [EOL][13] 字符附加到每一行。 + * 为了读写二进制文件,请将 `std::ios::binary` 标志传递给构造函数:这样可以防止 [EOL][13] 字符附加到每一行。 ### 从系统角度进行写入 -写入文件时,数据将写入系统的内存写入缓冲区中。当系统收到系统调用 [sync][14] 时,此缓冲区的内容将被写入硬盘。这也是你在不告知系统的情况下,不要卸下 U 盘的原因。通常,守护进程会定期调用 _sync_。为了安全起见,也可以手动调用 _sync_: +写入文件时,数据将写入系统的内存写入缓冲区中。当系统收到系统调用 [sync][14] 时,此缓冲区的内容将被写入硬盘。这也是你在不告知系统的情况下,不要卸下 U 盘的原因。通常,守护进程会定期调用 `sync`。为了安全起见,也可以手动调用 `sync()`: ``` -#include <unistd.h> // needs to be included +#include // needs to be included sync(); ``` @@ -119,7 +118,7 @@ via: https://opensource.com/article/21/3/ccc-input-output 作者:[Stephan Avenwedde][a] 选题:[lujun9972][b] 译者:[wyxplus](https://github.com/wyxplus) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 1d672d12f5b971f5e85e6227d9dbfbd5fd30f856 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 2 Apr 2021 22:50:41 +0800 Subject: [PATCH 546/818] PUB @wyxplus https://linux.cn/article-13263-1.html --- .../20210326 How to read and write files in C.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210326 How to read and write files in C.md (98%) diff --git a/translated/tech/20210326 How to read and write files in C.md b/published/20210326 How to read and write files in C.md similarity index 98% rename from translated/tech/20210326 How to read and write files in C.md rename to published/20210326 How to read and write files in C.md index 41580cf762..721eda3db0 100644 --- a/translated/tech/20210326 How to read and write files in C.md +++ b/published/20210326 How to read and write files in C.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (wyxplus) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13263-1.html) 如何用 C++ 读写文件 ====== From 3bc5160f78eb62c3bfc979edc7390b2e6476b406 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 3 Apr 2021 00:11:19 +0800 Subject: [PATCH 547/818] PRF @DCOLIVERSUN --- ...-Source Feed Reader With Feedly Support.md | 38 ++++++++----------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/translated/tech/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md b/translated/tech/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md index 50f14af8c3..173ceda45d 100644 --- a/translated/tech/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md +++ b/translated/tech/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md @@ -3,28 +3,30 @@ [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) [#]: collector: (lujun9972) [#]: translator: (DCOLIVERSUN) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) -NewsFlash: 一款 Feedly 支持的新型开源 Feed 阅读器 +NewsFlash: 一款支持 Feedly 的现代开源 Feed 阅读器 ====== -有些人可能认为 RSS 阅读器已经不再,但它们仍然坚持在这里,特别是当你不希望看到的东西都是来自大型科技企业算法的时候。Feed 阅读器可以帮你自助选择阅读来源。 +![](https://img.linux.net.cn/data/attachment/album/202104/03/001037r2udx6u6xqu5sqzu.jpg) -我最近遇到一个很棒的 RSS 阅读器 NewsFlash。它支持通过基于 web 的 Feed 阅读器增加 feed,例如 [Feedly][1] 和 NewsBlur。如果你已经使用这种服务,就不必人工导入 feed,这节省了你的工作。 +有些人可能认为 RSS 阅读器已经不再,但它们仍然坚持在这里,特别是当你不想让大科技算法来决定你应该阅读什么的时候。Feed 阅读器可以帮你自助选择阅读来源。 -NewsFlash 恰好是 [FeedReadeer][2] 的精神继承者,FeedReader 初创开发人员也参与其中。 +我最近遇到一个很棒的 RSS 阅读器 NewsFlash。它支持通过基于网页的 Feed 阅读器增加 feed,例如 [Feedly][1] 和 NewsBlur。这是一个很大的安慰,因为如果你已经使用这种服务,就不必人工导入 feed,这节省了你的工作。 + +NewsFlash 恰好是 [FeedReadeer][2] 的精神继承者,原来的 FeedReader 开发人员也参与其中。 如果你正在找适用的 RSS 阅读器,我们整理了 [Linux Feed 阅读器][3] 列表供您参考。 -### NewsFlash: 一款补充基于 web 的 RSS 阅读器账户的 Feed 阅读器 +### NewsFlash: 一款补充网页 RSS 阅读器账户的 Feed 阅读器 ![][4] -请注意,NewsFlash 不仅针对基于 web 的 RSS feed 账户进行修改,而且你可以选择使用本地 RSS feed,不必在多设备间同步。 +请注意,NewsFlash 并不只是针对基于网页的 RSS feed 账户量身定做的,你也可以选择使用本地 RSS feed,而不必在多设备间同步。 -不过,如果你在用支持基于 web 的 feed 阅读器,那么 NewsFlash 特别有用。 +不过,如果你在用是任何一款支持的基于网页的 feed 阅读器,那么 NewsFlash 特别有用。 这里,我将重点介绍 NewsFlash 提供的一些功能。 @@ -42,22 +44,14 @@ NewsFlash 恰好是 [FeedReadeer][2] 的精神继承者,FeedReader 初创开 * 支持自定义字体 * 支持多主题(包括深色主题) * 启动/禁止缩略图 - * 细粒度调整常规同步间隔时间 - * 支持基于 web 的 Feed 账户,例如 Feedly、Fever、NewsBlur、feedbin、Miniflux + * 细粒度调整定期同步间隔时间 + * 支持基于网页的 Feed 账户,例如 Feedly、Fever、NewsBlur、feedbin、Miniflux 除上述功能外,当你调整窗口大小时,还可以打开阅读器视图,这是一个细腻的补充功能。 ![newsflash 截图1][6] -账户重新设置也很容易,不过需要删除所有本地数据。是的,你可以手动清除缓存并设置到期时间,以便所有你想看的 feed 用户数据都存在本地。 - -**推荐阅读:** - -![][7] - -#### [6 款 Linux 最佳 Feed 阅读器][3] - -你是否想用 RSS feed 来订阅你喜欢网站的最新消息?看一看 Linux 最佳 Feed 阅读器吧。 +账户重新设置也很容易,这将删除所有本地数据。是的,你可以手动清除缓存并设置到期时间,并为你关注的所有 feed 设置一个用户数据存在本地的到期时间。 ### 在 Linux 上安装 NewsFlash @@ -67,11 +61,11 @@ NewsFlash 恰好是 [FeedReadeer][2] 的精神继承者,FeedReader 初创开 幸运的是,[Flatpak][10] 软件包可以让你轻松在 Linux 发行版上安装 NewsFlash。具体请参阅我们的 [Flatpak 指南][11]。 -你可以参考 NewsFlash 的 [GitLab页面][12] 去解决大部分问题。 +你可以参考 NewsFlash 的 [GitLab 页面][12] 去解决大部分问题。 ### 结束语 -我现在用 NewsFlash 作为桌面本地解决方案,不用基于 web 的服务。你可以通过直接导出 OPML 文件在移动 feed 应用上得到相同的 feed。这已经被我验证过了。 +我现在用 NewsFlash 作为桌面本地解决方案,不用基于网页的服务。你可以通过直接导出 OPML 文件在移动 feed 应用上得到相同的 feed。这已经被我验证过了。 用户界面易于使用,也提供了数一数二的新版 UX。虽然这个 RSS 阅读器看似简单,但提供了你可以找到的所有重要功能。 @@ -84,7 +78,7 @@ via: https://itsfoss.com/newsflash-feedreader/ 作者:[Ankush Das][a] 选题:[lujun9972][b] 译者:[DCOLIVERSUN](https://github.com/DCOLIVERSUN) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From abb9edecd2cd19d2eb97f77d7baac0e48e02ed9f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 3 Apr 2021 00:12:02 +0800 Subject: [PATCH 548/818] PUB @DCOLIVERSUN https://linux.cn/article-13264-1.html --- ...h- A Modern Open-Source Feed Reader With Feedly Support.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md (98%) diff --git a/translated/tech/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md b/published/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md similarity index 98% rename from translated/tech/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md rename to published/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md index 173ceda45d..11f3c7231c 100644 --- a/translated/tech/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md +++ b/published/20210330 NewsFlash- A Modern Open-Source Feed Reader With Feedly Support.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (DCOLIVERSUN) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13264-1.html) NewsFlash: 一款支持 Feedly 的现代开源 Feed 阅读器 ====== From f1f43d2b64566eab79d72f758bb8f9ad7618de30 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 3 Apr 2021 05:03:57 +0800 Subject: [PATCH 549/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210402=20?= =?UTF-8?q?A=20practical=20guide=20to=20using=20the=20git=20stash=20comman?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210402 A practical guide to using the git stash command.md --- ...al guide to using the git stash command.md | 240 ++++++++++++++++++ 1 file changed, 240 insertions(+) create mode 100644 sources/tech/20210402 A practical guide to using the git stash command.md diff --git a/sources/tech/20210402 A practical guide to using the git stash command.md b/sources/tech/20210402 A practical guide to using the git stash command.md new file mode 100644 index 0000000000..804a6bac81 --- /dev/null +++ b/sources/tech/20210402 A practical guide to using the git stash command.md @@ -0,0 +1,240 @@ +[#]: subject: (A practical guide to using the git stash command) +[#]: via: (https://opensource.com/article/21/4/git-stash) +[#]: author: (Ramakrishna Pattnaik https://opensource.com/users/rkpattnaik780) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +A practical guide to using the git stash command +====== +Learn how to use the git stash command and when you should use it. +![woman on laptop sitting at the window][1] + +Version control is an inseparable part of software developers' daily lives. It's hard to imagine any team developing software without using a version control tool. It's equally difficult to envision any developer who hasn't worked with (or at least heard of) Git. In the 2018 Stackoverflow Developer Survey, 87.2% of the 74,298 participants [use Git][2] for version control. + +Linus Torvalds created git in 2005 for developing the Linux kernel. This article walks through the `git stash` command and explores some useful options for stashing changes. It assumes you have basic familiarity with [Git concepts][3] and a good understanding of the working tree, staging area, and associated commands. + +### Why is git stash important? + +The first thing to understand is why stashing changes in Git is important. Assume for a moment that Git doesn't have a command to stash changes. Suppose you are working on a repository with two branches, A and B. The A and B branches have diverged from each other for quite some time and have different heads. While working on some files in branch A, your team asks you to fix a bug in branch B. You quickly save your changes to A and try to check out branch B with `git checkout B`. Git immediately aborts the operation and throws the error, "Your local changes to the following files would be overwritten by checkout … Please commit your changes or stash them before you switch branches." + +There are few ways to enable branch switching in this case: + + * Create a commit at that point in branch A, commit and push your changes to fix the bug in B, then check out A again and run `git reset HEAD^` to get your changes back. + * Manually keep the changes in files not tracked by Git. + + + +The second method is a bad idea. The first method, although appearing conventional, is less flexible because the unfinished saved changes are treated as a checkpoint rather than a patch that's still a work in progress. This is exactly the kind of scenario git stash is designed for. + +Git stash saves the uncommitted changes locally, allowing you to make changes, switch branches, and perform other Git operations. You can then reapply the stashed changes when you need them. A stash is locally scoped and is not pushed to the remote by `git push`. + +### How to use git stash + +Here's the sequence to follow when using git stash: + + 1. Save changes to branch A. + 2. Run `git stash`. + 3. Check out branch B. + 4. Fix the bug in branch B. + 5. Commit and (optionally) push to remote. + 6. Check out branch A + 7. Run `git stash pop` to get your stashed changes back. + + + +Git stash stores the changes you made to the working directory locally (inside your project's .git directory; `/.git/refs/stash`, to be precise) and allows you to retrieve the changes when you need them. It's handy when you need to switch between contexts. It allows you to save changes that you might need at a later stage and is the fastest way to get your working directory clean while keeping changes intact. + +### How to create a stash + +The simplest command to stash your changes is `git stash`: + + +``` +$ git stash +Saved working directory and index state WIP on master; d7435644 Feat: configure graphql endpoint +``` + +By default, `git stash` stores (or "stashes") the uncommitted changes (staged and unstaged files) and overlooks untracked and ignored files. Usually, you don't need to stash untracked and ignored files, but sometimes they might interfere with other things you want to do in your codebase. + +You can use additional options to let `git stash` take care of untracked and ignored files: + + * `git stash -u` or `git stash --include-untracked` stash untracked files. + * `git stash -a` or `git stash --all` stash untracked files and ignored files. + + + +To stash specific files, you can use the command `git stash -p` or `git stash –patch`: + + +``` +$ git stash --patch +diff --git a/.gitignore b/.gitignore +index 32174593..8d81be6e 100644 +\--- a/.gitignore ++++ b/.gitignore +@@ -3,6 +3,7 @@ + # dependencies + node_modules/ + /.pnp ++f,fmfm + .pnp.js + + # testing +(1/1) Stash this hunk [y,n,q,a,d,e,?]? +``` + +### Listing your stashes + +You can view your stashes with the command `git stash list`. Stashes are saved in a last-in-first-out (LIFO) approach: + + +``` +$ git stash list +stash@{0}: WIP on master: d7435644 Feat: configure graphql endpoint +``` + +By default, stashes are marked as WIP on top of the branch and commit that you created the stash from. However, this limited amount of information isn't helpful when you have multiple stashes, as it becomes difficult to remember or individually check their contents. To add a description to the stash, you can use the command `git stash save `: + + +``` +$ git stash save "remove semi-colon from schema" +Saved working directory and index state On master: remove semi-colon from schema + +$ git stash list +stash@{0}: On master: remove semi-colon from schema +stash@{1}: WIP on master: d7435644 Feat: configure graphql endpoint +``` + +### Retrieving stashed changes + +You can reapply stashed changes with the commands `git stash apply` and `git stash pop`. Both commands reapply the changes stashed in the latest stash (that is, `stash@{0}`). A `stash` reapplies the changes while `pop` removes the changes from the stash and reapplies them to the working copy. Popping is preferred if you don't need the stashed changes to be reapplied more than once. + +You can choose which stash you want to pop or apply by passing the identifier as the last argument: + + +``` +`$ git stash pop stash@{1}` +``` + +or + + +``` +`$ git stash apply stash@{1}` +``` + +### Cleaning up the stash + +It is good practice to remove stashes that are no longer needed. You must do this manually with the following commands: + + * `git stash clear` empties the stash list by removing all the stashes. + * `git stash drop ` deletes a particular stash from the stash list. + + + +### Checking stash diffs + +The command `git stash show ` allows you to view the diff of a stash: + + +``` +$ git stash show stash@{1} +console/console-init/ui/.graphqlrc.yml        |   4 +- +console/console-init/ui/generated-frontend.ts | 742 +++++++++--------- +console/console-init/ui/package.json          |   2 +- +``` + +To get a more detailed diff, pass the `--patch` or `-p` flag: + + +``` +$ git stash show stash@{0} --patch +diff --git a/console/console-init/ui/package.json b/console/console-init/ui/package.json +index 755912b97..5b5af1bd6 100644 +\--- a/console/console-init/ui/package.json ++++ b/console/console-init/ui/package.json +@@ -1,5 +1,5 @@ + { +\- "name": "my-usepatternfly", +\+ "name": "my-usepatternfly-2", +  "version": "0.1.0", +  "private": true, +  "proxy": "" +diff --git a/console/console-init/ui/src/AppNavHeader.tsx b/console/console-init/ui/src/AppNavHeader.tsx +index a4764d2f3..da72b7e2b 100644 +\--- a/console/console-init/ui/src/AppNavHeader.tsx ++++ b/console/console-init/ui/src/AppNavHeader.tsx +@@ -9,8 +9,8 @@ import { css } from "@patternfly/react-styles"; + +interface IAppNavHeaderProps extends PageHeaderProps { +\- toolbar?: React.ReactNode; +\- avatar?: React.ReactNode; +\+ toolbar?: React.ReactNode; +\+ avatar?: React.ReactNode; +} + +export class AppNavHeader extends React.Component<IAppNavHeaderProps>{ +  render() +``` + +### Checking out to a new branch + +You might come across a situation where the changes in a branch and your stash diverge, causing a conflict when you attempt to reapply the stash. A clean fix for this is to use the command `git stash branch `, which creates a new branch based on the commit the stash was created _from_ and pops the stashed changes to it: + + +``` +$ git stash branch test_2 stash@{0} +Switched to a new branch 'test_2' +On branch test_2 +Changes not staged for commit: +(use "git add <file>..." to update what will be committed) +(use "git restore <file>..." to discard changes in working directory) +modified: .graphqlrc.yml +modified: generated-frontend.ts +modified: package.json +no changes added to commit (use "git add" and/or "git commit -a") +Dropped stash@{0} (fe4bf8f79175b8fbd3df3c4558249834ecb75cd1) +``` + +### Stashing without disturbing the stash reflog + +In rare cases, you might need to create a stash while keeping the stash reference log (reflog) intact. These cases might arise when you need a script to stash as an implementation detail. This is achieved by the `git stash create` command; it creates a stash entry and returns its object name without pushing it to the stash reflog: + + +``` +$ git stash create "sample stash" +63a711cd3c7f8047662007490723e26ae9d4acf9 +``` + +Sometimes, you might decide to push the stash entry created via `git stash create` to the stash reflog: + + +``` +$ git stash store -m "sample stash testing.." "63a711cd3c7f8047662007490723e26ae9d4acf9" +$ git stash list +stash @{0}: sample stash testing.. +``` + +### Conclusion + +I hope you found this article useful and learned something new. If I missed any useful options for using stash, please let me know in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/git-stash + +作者:[Ramakrishna Pattnaik][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/rkpattnaik780 +[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://insights.stackoverflow.com/survey/2018#work-_-version-control +[3]: https://opensource.com/downloads/cheat-sheet-git From 77374b1bcf4ead20076b32519570298527f2206a Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 3 Apr 2021 05:04:11 +0800 Subject: [PATCH 550/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210402=20?= =?UTF-8?q?20=20ways=20to=20be=20more=20productive=20and=20respect=20yours?= =?UTF-8?q?elf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210402 20 ways to be more productive and respect yourself.md --- ...be more productive and respect yourself.md | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 sources/tech/20210402 20 ways to be more productive and respect yourself.md diff --git a/sources/tech/20210402 20 ways to be more productive and respect yourself.md b/sources/tech/20210402 20 ways to be more productive and respect yourself.md new file mode 100644 index 0000000000..58b66e1e88 --- /dev/null +++ b/sources/tech/20210402 20 ways to be more productive and respect yourself.md @@ -0,0 +1,104 @@ +[#]: subject: (20 ways to be more productive and respect yourself) +[#]: via: (https://opensource.com/article/21/4/productivity-roundup) +[#]: author: (Jen Wike Huger https://opensource.com/users/jen-wike) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +20 ways to be more productive and respect yourself +====== +Open source tools and more efficient processes can give you an edge over +your to-do list. +![Kanban-style organization action][1] + +The need to be productive is ingrained in who we are as human beings on some level. We oftentimes have to do yoga and meditate and breathe deeply in order to consciously slow down our minds and bodies, but when we do it helps us focus and be more productive when the time comes. Instead of constantly moving and doing, we should take periods of thoughtful breaks... or veg out in front of the TV or a sunset. And sleep at night! Then, when we're ready again, we can tackle that to-do list. Rinse and repeat. + +Honoring this cycle of moving through active and restful states, our productivity series this year brought to us by author [Kevin Sonney][2] showcases open source tools and more efficient processes while paying attention to healthy practices for incorporating them and respecting the person doing the implementing, you. + +### Tools and technology + +The software, the apps, and the programs... they are the tools we wield when we're ready to sit down and get stuff done. Here are nine open source tools you should know. + + * [Improve your productivity with this lightweight Linux desktop][3] + * [3 plain text note-taking tools][4] + * [How to use KDE's productivity suite, Kontact][5] + * [How Nextcloud is the ultimate open source productivity suite][6] + * [Schedule appointments with an open source alternative to Doodle][7] + * [Use Joplin to find your notes faster][8] + * [Use your Raspberry Pi as a productivity powerhouse][9] + + + +### Processes and practices + +#### Email + +Despite the criticism, is email still a favorite way for you to get stuff done? Improve on this process even more with these tips: + + * [3 email rules to live by in 2021][10] + * [3 steps to achieving Inbox Zero][11] + * [Organize your task list using labels][12] + * [3 tips for automating your email filters][13] + * [3 email mistakes and how to avoid them][14] + + + +#### Calendars + +We often need to work with others and ask important questions to get work done and tasks completed, so scheduling meetings is an important part of being productive. + + * [Gain control of your calendar with this simple strategy][15] + + + +#### Mind games + +Preparing and caring for our mental state while we work is critical to being productive. Kevin shows us how to prioritize, reflect, take care, reduce stress, rest, and focus.   + + * [How I prioritize tasks on my to-do list][16] + * [Tips for incorporating self-care into your daily routine][17] + * [Why keeping a journal improves productivity][18] + * [3 stress-free steps to tackling your task list][19] + * [4 tips for preventing notification fatigue][20] + * [Open source tools and tips for staying focused][21] + * [How I de-clutter my digital workspace][22] + + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/productivity-roundup + +作者:[Jen Wike Huger][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/jen-wike +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/kanban_trello_organize_teams_520.png?itok=ObNjCpxt (Kanban-style organization action) +[2]: https://opensource.com/users/ksonney +[3]: https://opensource.com/article/21/1/elementary-linux +[4]: https://opensource.com/article/21/1/plain-text +[5]: https://opensource.com/article/21/1/kde-kontact +[6]: https://opensource.com/article/21/1/nextcloud-productivity +[7]: https://opensource.com/article/21/1/open-source-scheduler +[8]: https://opensource.com/article/21/1/notes-joplin +[9]: https://opensource.com/article/21/1/raspberry-pi-productivity +[10]: https://opensource.com/article/21/1/email-rules +[11]: https://opensource.com/article/21/1/inbox-zero +[12]: https://opensource.com/article/21/1/labels +[13]: https://opensource.com/article/21/1/email-filter +[14]: https://opensource.com/article/21/1/email-mistakes +[15]: https://opensource.com/article/21/1/calendar-time-boxing +[16]: https://opensource.com/article/21/1/prioritize-tasks +[17]: https://opensource.com/article/21/1/self-care +[18]: https://opensource.com/article/21/1/open-source-journal +[19]: https://opensource.com/article/21/1/break-down-tasks +[20]: https://opensource.com/article/21/1/alert-fatigue +[21]: https://opensource.com/article/21/1/stay-focused +[22]: https://opensource.com/article/21/1/declutter-workspace From 5966c6b33d3df241c30e37cc152decd153bedc1c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 3 Apr 2021 05:04:28 +0800 Subject: [PATCH 551/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210402=20?= =?UTF-8?q?Read=20and=20write=20files=20with=20Groovy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210402 Read and write files with Groovy.md --- ...210402 Read and write files with Groovy.md | 181 ++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 sources/tech/20210402 Read and write files with Groovy.md diff --git a/sources/tech/20210402 Read and write files with Groovy.md b/sources/tech/20210402 Read and write files with Groovy.md new file mode 100644 index 0000000000..091c3c9c40 --- /dev/null +++ b/sources/tech/20210402 Read and write files with Groovy.md @@ -0,0 +1,181 @@ +[#]: subject: (Read and write files with Groovy) +[#]: via: (https://opensource.com/article/21/4/groovy-io) +[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Read and write files with Groovy +====== +Learn how the Groovy programming language handles reading from and +writing to files. +![Woman programming][1] + +Two common tasks that new programmers need to learn are how to read from and write to files stored on a computer. Some examples are when data and configuration files created in one application need to be read by another application, or when a third application needs to write info, warnings, and errors to a log file or to save its results for someone else to use. + +Every language has a few different ways to read from and write to files. This article covers some of these details in the [Groovy programming language][2], which is based on Java but with a different set of priorities that make Groovy feel more like Python. The first thing a new-to-Groovy programmer sees is that it is much less verbose than Java. The next observation is that it is (by default) dynamically typed. The third is that Groovy has closures, which are somewhat like lambdas in Java but provide access to the entire enclosing context (Java lambdas restrict what can be accessed). + +My fellow correspondent Seth Kenlon has written about [Java input and output (I/O)][3]. I'll jump off from his Java code to show you how it's done in Groovy. + +### Install Groovy + +Since Groovy is based on Java, it requires a Java installation. You may be able to find a recent and decent version of Java and Groovy in your Linux distribution's repositories. Or you can install Groovy by following the instructions on [Groovy's download page][4]. A nice alternative for Linux users is [SDKMan][5], which you can use to get multiple versions of Java, Groovy, and many other related tools. For this article, I'm using my distro's OpenJDK11 release and SDKMan's Groovy 3.0.7 release. + +### Read a file with Groovy + +Start by reviewing Seth's Java program for reading files: + + +``` +import java.io.File; +import java.util.Scanner; +import java.io.FileNotFoundException; + +public class Ingest { +  public static void main([String][6][] args) { + +      try { +          [File][7] myFile = new [File][7]("example.txt"); +          Scanner myScanner = new Scanner(myFile); +          while (myScanner.hasNextLine()) { +              [String][6] line = myScanner.nextLine(); +              [System][8].out.println(line); +          } +          myScanner.close(); +      } catch ([FileNotFoundException][9] ex) { +          ex.printStackTrace(); +      } //try +    } //main +} //class +``` + +Now I'll do the same thing in Groovy: + + +``` +def myFile = new [File][7]('example.txt') +def myScanner = new Scanner(myFile) +while (myScanner.hasNextLine()) { +        def line = myScanner.nextLine() +        println(line) +} +myScanner.close() +``` + +Groovy looks like Java but less verbose. The first thing to notice is that all those `import` statements are already done in the background. And since Groovy is partly intended to be a scripting language, by omitting the definition of the surrounding `class` and `public static void main`, Groovy will construct those things in the background. + +The semicolons are also gone. Groovy supports their use but doesn't require them except in cases like when you want to put multiple statements on the same line. Aaaaaaaaand the single quotes—Groovy supports either single or double quotes for delineating strings, which is handy when you need to put double quotes inside a string, like this: + + +``` +`'"I like this Groovy stuff", he muttered to himself.'` +``` + +Note also that `try...catch` is gone. Groovy supports `try...catch` but doesn't require it, and it will give a perfectly good error message and stack trace just like the `ex.printStackTrace()` call does in the Java example. + +Groovy adopted the `def` keyword and inference of type from the right-hand side of a statement long before Java came up with the `var` keyword, and Groovy allows it everywhere. Aside from using `def`, though, the code that does the main work looks quite similar to the Java version. Oh yeah, except that Groovy also has this nice metaprogramming ability built in, which among other things, lets you write `println()` instead of `System.out.println()`. This similarity is way more than skin deep and allows Java programmers to get traction with Groovy very quickly. + +And just like Python programmers are always looking for the pythonic way to do stuff, there is Groovy that looks like Java, and then there is… groovier Groovy. This solves the same problem but uses Groovy's `with` method to make the code more DRY ("don't repeat yourself") and to automate closing the input file: + + +``` +new Scanner(new [File][7]('example.txt')).with { +    while (hasNextLine()) { +      def line = nextLine() +      println(line) +    } +} +``` + +What's between `.with {` and `}` is a closure body. Notice that you don't need to write `myScanner.hasNextLine()` nor `myScanner.nextLine()` as `with` exposes those methods directly to the closure body.  Also the with gets rid of the need to code myScanner.close() and so we don't actually need to declare myScanner at all. + +Run it: + + +``` +$ groovy ingest1.groovy +Caught: java.io.[FileNotFoundException][9]: example.txt (No such file or directory) +java.io.[FileNotFoundException][9]: example.txt (No such file or directory) +        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native [Method][10]) +        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) +        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) +        at ingest1.run(ingest1.groovy:1) +        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native [Method][10]) +        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) +        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) +$ +``` + +Note the "file not found" exception; this is because there isn't a file called `example.txt` yet. Note also that the files are from things like `java.io`. + +So I'll write something into that file… + +### Write data to a file with Groovy + +Combining what I shared previously about, well, being "groovy": + + +``` +new [FileWriter][11]("example.txt", true).with { +        write("Hello world\n") +        flush() +} +``` + +Remember that `true` after the file name means "append to the file," so you can run this a few times: + + +``` +$ groovy exgest.groovy +$ groovy exgest.groovy +$ groovy exgest.groovy +$ groovy exgest.groovy +``` + +Then you can read the results with `ingest1.groovy`: + + +``` +$ groovy ingest1.groovy +Hello world +Hello world +Hello world +Hello world +$ +``` + +The call to `flush()` is used because the `with` / `write` combo didn't do a flush before close. Groovy isn't always shorter! + +### Groovy resources + +The Apache Groovy site has a lot of great [documentation][12]. Another great Groovy resource is [Mr. Haki][13]. And a really great reason to learn Groovy is to learn [Grails][14], which is a wonderfully productive full-stack web framework built on top of excellent components like Hibernate, Spring Boot, and Micronaut. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/groovy-io + +作者:[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/programming-code-keyboard-laptop-music-headphones.png?itok=EQZ2WKzy (Woman programming) +[2]: https://groovy-lang.org/ +[3]: https://opensource.com/article/21/3/io-java +[4]: https://groovy.apache.org/download.html +[5]: https://sdkman.io/ +[6]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string +[7]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+file +[8]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system +[9]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+filenotfoundexception +[10]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+method +[11]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+filewriter +[12]: https://groovy-lang.org/documentation.html +[13]: https://blog.mrhaki.com/ +[14]: https://grails.org/ From 0dca2d4a8066d9f2b85a2ac7c389544412861ca8 Mon Sep 17 00:00:00 2001 From: wyxplus <32919297+wyxplus@users.noreply.github.com> Date: Sun, 4 Apr 2021 00:58:42 +0800 Subject: [PATCH 552/818] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...t applications you should use right now.md | 139 ---------------- ...t applications you should use right now.md | 149 ++++++++++++++++++ 2 files changed, 149 insertions(+), 139 deletions(-) delete mode 100644 sources/tech/20200423 4 open source chat applications you should use right now.md create mode 100644 translated/tech/20200423 4 open source chat applications you should use right now.md diff --git a/sources/tech/20200423 4 open source chat applications you should use right now.md b/sources/tech/20200423 4 open source chat applications you should use right now.md deleted file mode 100644 index 9d7fbb78ca..0000000000 --- a/sources/tech/20200423 4 open source chat applications you should use right now.md +++ /dev/null @@ -1,139 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wyxplus) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (4 open source chat applications you should use right now) -[#]: via: (https://opensource.com/article/20/4/open-source-chat) -[#]: author: (Sudeshna Sur https://opensource.com/users/sudeshna-sur) - -4 open source chat applications you should use right now -====== -Collaborating remotely is an essential capability now, making open -source real-time chat an essential piece of your toolbox. -![Chat bubbles][1] - -The first thing we usually do after waking up in the morning is to check our cellphone to see if there are important messages from our colleagues and friends. Whether or not it's a good idea, this behavior has become part of our daily lifestyle. - -> _"Man is a rational animal. He can think up a reason for anything he wants to believe."_ -> _– Anatole France_ - -No matter the soundness of the reason, we all have a suite of communication tools—email, phone calls, web-conferencing tools, or social networking—we use on a daily basis. Even before COVID-19, working from home already made these communication tools an essential part of our world. And as the pandemic has made working from home the new normal, we're facing unprecedented changes to how we communicate, which makes these tools not merely essential but now required. - -### Why chat? - -When working remotely as a part of a globally distributed team, we must have a collaborative environment. Chat applications play a vital role in helping us stay connected. In contrast to email, chat applications provide fast, real-time communications with colleagues around the globe. - -There are a lot of factors involved in choosing a chat application. To help you pick the right one for you, in this article, I'll explore four open source chat applications and one open source video-communication tool (for when you need to be "face-to-face" with your colleagues), then outline some of the features you should look for in an effective communication application. - -### 4 open source chat apps - -#### Rocket.Chat - -![Rocket.Chat][2] - -[Rocket.Chat][3] is a comprehensive communication platform that classifies channels as public (open to anyone who joins) or private (invitation-only) rooms. You can also send direct messages to people who are logged in; share documents, links, photos, videos, and GIFs; make video calls; and send audio messages without leaving the platform. - -Rocket.Chat is free and open source, but what makes it unique is its self-hosted chat system. You can download it onto your server, whether it's an on-premises server or a virtual private server on a public cloud. - -Rocket.Chat is completely free, and its [source code][4] is available on GitHub. Many open source projects use Rocket.Chat as their official communication platform. It is constantly evolving with new features and improvements. - -The things I like the most about Rocket.Chat are its ability to be customized according to user requirements and that it uses machine learning to do automatic, real-time message translation between users. You can also download Rocket.Chat for your mobile device and use it on the go. - -#### IRC - -![IRC on WeeChat 0.3.5][5] - -[Internet Relay Chat (IRC)][6] is a real-time, text-based form of communication. Although it's one of the oldest forms of electronic communication, it remains popular among many well-known software projects. - -IRC channels are discrete chat rooms. It allows you to have conversations with multiple people in an open channel or chat with someone privately one-on-one. If a channel name starts with a #, you can assume it to be official, whereas chat rooms that begin with ## are unofficial and usually casual. - -[Getting started with IRC][7] is easy. Your IRC handle or nickname is what allows people to find you, so it must be unique. But your choice of IRC client is completely your decision. If you want a more feature-rich application than a standard IRC client, you can connect to IRC with [Riot.im][8]. - -Given its age, why should you still be on IRC? For one reason, it remains the home for many of the free and open source projects we depend on. If you want to participate in open source software and communities, IRC is the option to get started. - -#### Zulip - -![Zulip][9] - -[Zulip][10] is a popular group-chat application that follows the topic-based threading model. In Zulip, you subscribe to streams, just like in IRC channels or Rocket.Chat. But each Zulip stream opens a topic that is unique, which helps you track conversations later, thus making it more organized. - -Like other platforms, it supports emojis, inline images, video, and tweet previews. It also supports LaTeX for sharing math formulas or equations and Markdown and syntax highlighting for sharing code. - -Zulip is cross-platform and offers APIs for building your own integrations. Something I especially like about Zulip is its integration feature with GitHub: if I'm working on an issue, I can use Zulip's marker to link back to the pull request ID. - -Zulip is open source (you can access its [source code][11] on GitHub) and free to use, but it has paid offerings for on-premises support, [LDAP][12] integration, and more storage. - -#### Let's Chat - -![Let's Chat][13] - -[Let's Chat][14] is a self-hosted chat solution for small teams. It runs on Node.js and MongoDB and can be deployed to local servers or hosted services with a few clicks. It's free and open source, with the [source code][15] available on GitHub. - -What differentiates Let's Chat from other open source chat tools is its enterprise features: it supports LDAP and [Kerberos][16] authentication. It also has all the features a new user would want: you can search message history in the archives and tag people with mentions like @username. - -What I like about Let's Chat is that it has private and password-protected rooms, image embeds, GIPHY support, and code pasting. It is constantly evolving and adding more features to its bucket. - -### Bonus: Open source video chat with Jitsi - -![Jitsi][17] - -Sometimes text chat isn't enough, and you need to talk to someone face-to-face. In times like these, when in-person meetings aren't an option, video chat is the best alternative. [Jitsi][18] is a complete, open source, multi-platform, and WebRTC-compliant videoconferencing tool. - -Jitsi began with Jitsi Desktop and has evolved into multiple [projects][19], including Jitsi Meet, Jitsi Videobridge, jibri, and libjitsi, with [source code][20] published for each on GitHub. - -Jitsi is secure and scalable and supports advanced video-routing concepts such as simulcast and bandwidth estimation, as well as typical capabilities like audio, recording, screen-sharing, and dial-in features. You can set a password to secure your video-chat room and protect it against intruders, and it also supports live-streaming over YouTube. You can also build your own Jitsi server and host it on-premises or on a virtual private server, such as a Digital Ocean Droplet. - -What I like most about Jitsi is that it is free and frictionless; anyone can start a meeting in no time by visiting [meet.jit.si][21], and users are good to go with no need for registration or installation. (However, registration gives you calendar integrations.) This low-barrier-to-entry alternative to popular videoconferencing services is helping Jitsi's popularity spread rapidly. - -### Tips for choosing a chat application - -The variety of open source chat applications can make it hard to pick one. The following are some general guidelines for choosing a chat app. - - * Tools that have an interactive interface and simple navigation are ideal. - * It's better to look for a tool that has great features and allows people to use it in various ways. - * Integrations with tools you use can play an important role in your decision. Some tools have great and seamless integrations with GitHub, GitLab, and certain applications, which is a useful feature. - * It's convenient to use tools that have a pathway to hosting on cloud-based services. - * The security of the chat service should be taken into account. The ability to host services on a private server is necessary for many organizations and individuals. - * It's best to select communication tools that have rich privacy settings and allow for both private and public chat rooms. - - - -Since people are more dependent than ever on online services, it is smart to have a backup communication platform available. For example, if a project is using Rocket.Chat, it should also have the option to hop into IRC, if necessary. Since these services are continuously updating, you may find yourself connected to multiple channels, and this is where integration becomes so valuable. - -Of the different open source chat services available, which ones do you like and use? How do these tools help you work remotely? Please share your thoughts in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/open-source-chat - -作者:[Sudeshna Sur][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/sudeshna-sur -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/talk_chat_communication_team.png?itok=CYfZ_gE7 (Chat bubbles) -[2]: https://opensource.com/sites/default/files/uploads/rocketchat.png (Rocket.Chat) -[3]: https://rocket.chat/ -[4]: https://github.com/RocketChat/Rocket.Chat -[5]: https://opensource.com/sites/default/files/uploads/irc.png (IRC on WeeChat 0.3.5) -[6]: https://en.wikipedia.org/wiki/Internet_Relay_Chat -[7]: https://opensource.com/article/16/6/getting-started-irc -[8]: https://opensource.com/article/17/5/introducing-riot-IRC -[9]: https://opensource.com/sites/default/files/uploads/zulip.png (Zulip) -[10]: https://zulipchat.com/ -[11]: https://github.com/zulip/zulip -[12]: https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol -[13]: https://opensource.com/sites/default/files/uploads/lets-chat.png (Let's Chat) -[14]: https://sdelements.github.io/lets-chat/ -[15]: https://github.com/sdelements/lets-chat -[16]: https://en.wikipedia.org/wiki/Kerberos_(protocol) -[17]: https://opensource.com/sites/default/files/uploads/jitsi_0_0.jpg (Jitsi) -[18]: https://jitsi.org/ -[19]: https://jitsi.org/projects/ -[20]: https://github.com/jitsi -[21]: http://meet.jit.si diff --git a/translated/tech/20200423 4 open source chat applications you should use right now.md b/translated/tech/20200423 4 open source chat applications you should use right now.md new file mode 100644 index 0000000000..8f78f0b157 --- /dev/null +++ b/translated/tech/20200423 4 open source chat applications you should use right now.md @@ -0,0 +1,149 @@ +[#]: collector: (lujun9972) +[#]: translator: (wyxplus) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (4 open source chat applications you should use right now) +[#]: via: (https://opensource.com/article/20/4/open-source-chat) +[#]: author: (Sudeshna Sur https://opensource.com/users/sudeshna-sur) + +现如今你应当使用的四款开源聊天应用软件 +====== + +现在,远程协作已作为一项必不可少的能力,让开源实时聊天成为你工具箱中必不可少的一部分吧。 +![Chat bubbles][1] + + +清晨起床后,我们通常要做的第一件事是检查手机,看看是否有同事和朋友发来的重要信息。无论这是否是一个好习惯,但这种行为早已成为我们日常生活的一部分。 + +> 人是理性动物。他总能想出任何自己愿意相信的理由。 +> –阿纳托尔·法朗士 + +无论理由是否合理,我们每天都在使用的一系列的通讯工具,例如电子邮件、电话、网络会议工具或社交网络。甚至在 COVID-19 之前,居家办公就已经使这些通信工具成为我们生活中的重要部分。随着疫情出现,居家办公成为新常态,我们交流方式的方方面面正面临着前所未有的改变,这让这些工具变得不可或缺。 + +### 为什么需要聊天? + +作为全球团队的一部分进行远程工作时,我们必须要有一个相互协作的环境。聊天应用软件在帮助我们保持相互联系中起着至关重要的作用。与电子邮件相比,聊天应用软件可提供与全球各地的同事快速、实时的通信。 + +考虑选择一款聊天应用软件需要考虑很多因素。为了帮助你选择最适合你的应用软件,在本文中,我将探讨四款开源聊天应用软件和一个开源视频通信工具(用于当你需要与同事“面对面”时),然后概述在高效的通讯应用软件中,你应当考虑的一些功能。 + +### 四款开源聊天软件 + +#### Rocket.Chat + +![Rocket.Chat][2] + + +[Rocket.Chat][3] 是一个综合性的通讯平台,其将频道分为公开房间(任何人都可以加入)和私有房间(仅受邀请)。你还可以直接将消息发送给已登录的人员。其能共享文档、链接、照片、视频和动态图GIF,以及进行视频通话,并可以在平台中发送语音信息。 + + + +Rocket.Chat 是免费开源的软件,但是其独特之处在于其可自托管的聊天系统。你可以将其下载到你的服务器上,无论它是本地服务器或是在公有云上的虚拟专用服务器。 + + + +Rocket.Chat 是完全免费,其 [源码][4] 可在 Github 获得。许多开源项目都使用 Rocket.Chat 作为他们官方交流平台。该软件在持续不断的发展且不断更新和改进新功能。 + + +我最喜欢 Rocket.Chat 的地方是其能够根据用户需求来进行自定义操作,并且它使用机器学习来自动化处理,在用户通讯间实时翻译信息。你也可以下载适用于你移动设备的 Rocket.Chat,以便能随时随地使用。 + +#### IRC + +![IRC on WeeChat 0.3.5][5] + +[Internet Relay Chat (IRC)][6] 是一款实时、基于文本格式的通信软件。尽管其是最古老的电子通讯形式之一,但在许多知名的软件项目中仍受欢迎。 + + +IRC 频道是单独的聊天室。它可以让你在一个开放的频道中与多人进行聊天或与某人私下一对一聊天。如果频道名称以 # 开头,则可以假定它是官方的聊天室,然而以 ## 开头的聊天室通常是非官方的聊天室。 + +[使用 IRC][7] 是很容易上手。你的 IRC 昵称可以让人们找到你,因此它必须是唯一的。但是,你可以完全自主地选择 IRC 客户端。如果你需要比标准 IRC 客户端更多功能的应用程序,则可以使用 [Riot.im][8] 连接到 IRC。 + +考虑到它悠久的历史,你为什么还要继续使用 IRC?出于一个原因是,其仍是我们所依赖的许多免费和开源项目的家园。如果你想参于开源软件开发和社区,可以选择用 IRC。 + +#### Zulip + +![Zulip][9] + + +[Zulip][10] 是遵循基于话题时间线模式且十分流行的群聊应用程序。在 Zulip 中,你可以订阅stream,就像在 IRC 频道或 Rocket.Chat 中一样。但是,每个 Zulip 流都会拥有一个唯一的话题topic,该话题可帮助你以后查找对话,因此其更有条理。 + + +与其他平台一样,它支持表情符号、图片、视频和推特预览。它还支持 LaTeX 共享数学公式或等式、Markdown 语法和共享代码的语法高亮。 + + +Zulip 是跨平台、并提供 API 用于编写你自己的程序。我特别喜欢 Zulip 的一点是它与 GitHub 的集成整合功能:如果我正在处理某个问题issue,则可以使用 Zulip 的标记链接拉回pull某个请求 ID。 + +Zulip是开源(你可以在 GitHub 上访问其[源码][11])并且免费使用,但是其已经为本地支持、[LDAP][12] 的集成整合和存储扩展提供了付费服务。 + +#### Let's Chat + +![Let's Chat][13] + +[Let's Chat][14] 是面向小型团队的自托管的聊天解决方案。它使用 Node.js 和 MongoDB 编写运行,只需鼠标点击几下即可将其部署到本地服务器或云服务器。它是免费且开源,可以在 GitHub 上查看其 [源码][15]。 + +Let's Chat 与其他开源聊天工具的不同之处在于其企业功能:它支持 LDAP 和 [Kerberos][16] 身份验证。它还具有新用户想要的所有功能:你可以在历史记录中搜索过往消息,并使用 @username 之类的标签来标记人员。 + +我喜欢 Let's Chat 的地方是它拥有私人、受密码保护的聊天室、发送图片、GIPHY 支持和代码拷贝。它不断更新,并不断增加新功能。 + +### 附加:开源视频聊天软件 Jitsi + +![Jitsi][17] + +有时,文字聊天还不够,你还可能需要与某人面谈。在这种情况下,如果不能选择面对面开会交流,那么视频聊天是最好的选择。[Jitsi][18] 是一个完全开源的,多平台且兼容 WebRTC 的视频会议工具。 + + +Jitsi 从 Jitsi Desktop 开始,已经发展成为许多 [项目][19],包括 Jitsi Meet、Jitsi Videobridge、jibri 和 libjitsi,并且每个项目都在 GitHub 上开放了 [源码][20]。 + +Jitsi 是安全且可扩展的,并支持诸如联播simulcast带宽预估bandwidth estimation之类的高级视频路由的概念,还包括音频、录制、屏幕共享和拨入功能等经典功能。你可以来为你的视频聊天室设置密码以保护其不受干扰,并且它还支持通过 YouTube 进行直播。你还可以搭建自己的 Jitsi 服务器,并将其托管在本地或虚拟专用服务器virtual private server(例如 Digital Ocean Droplet)上。 + +我最喜欢 Jitsi 的是它是免费且低门槛的。任何人都可以通过访问 [meet.jit.si][21] 来立即召开会议,并且用户无需注册或安装即可轻松参加会议。(但是,注册的话能拥有日程安排功能。)这种入门级低门槛的视频会议服务让 Jitsi 迅速普及。 + +### 选择一个聊天应用软件的建议 + +各种各样的开源聊天应用软件可能让你很难抉择。以下是一些选择一款聊天应用软件的一般准则。 + + * 最好具有交互式的界面和简单的导航工具。 + * 最好寻找一种功能强大且能让人们以各种方式使用它的工具。 + * 如果与你所使用的工具有进行集成整合的话,可以重点考虑。一些工具与 GitHub 或 GitLab 以及某些应用程序具有良好的无缝衔接,这将是一个非常有用的功能。 + * 有能托管到云主机的工具将十分方便。 + * 应考虑到聊天服务的安全性。对于许多组织和个人而言,能在个人服务器上进行托管服务是不可或缺的。 + * 最好选择那些具有丰富的隐私设置,并拥有私人聊天室和公共聊天室的通讯工具。 + +由于人们比以往任何时候都更加依赖在线服务,因此拥有备用的通讯平台是明智之举。例如,如果一个项目正在使用 Rocket.Chat,则必要之时,它还应具有跳转到 IRC 的能力。由于这些软件在不断更新,你可能会发现自己已经连接到多个频道,因此集成整合其他应用将变得非常有价值。 + +在各种可用的开源聊天服务中,你喜欢和使用哪些?这些工具又是如何帮助你进行远程办公?请在评论中分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/open-source-chat + +作者:[Sudeshna Sur][a] +选题:[lujun9972][b] +译者:[wyxplus](https://github.com/wyxplus) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/sudeshna-sur +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/talk_chat_communication_team.png?itok=CYfZ_gE7 (Chat bubbles) +[2]: https://opensource.com/sites/default/files/uploads/rocketchat.png (Rocket.Chat) +[3]: https://rocket.chat/ +[4]: https://github.com/RocketChat/Rocket.Chat +[5]: https://opensource.com/sites/default/files/uploads/irc.png (IRC on WeeChat 0.3.5) +[6]: https://en.wikipedia.org/wiki/Internet_Relay_Chat +[7]: https://opensource.com/article/16/6/getting-started-irc +[8]: https://opensource.com/article/17/5/introducing-riot-IRC +[9]: https://opensource.com/sites/default/files/uploads/zulip.png (Zulip) +[10]: https://zulipchat.com/ +[11]: https://github.com/zulip/zulip +[12]: https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol +[13]: https://opensource.com/sites/default/files/uploads/lets-chat.png (Let's Chat) +[14]: https://sdelements.github.io/lets-chat/ +[15]: https://github.com/sdelements/lets-chat +[16]: https://en.wikipedia.org/wiki/Kerberos_(protocol) +[17]: https://opensource.com/sites/default/files/uploads/jitsi_0_0.jpg (Jitsi) +[18]: https://jitsi.org/ +[19]: https://jitsi.org/projects/ +[20]: https://github.com/jitsi +[21]: http://meet.jit.si From 19da1eb6ef600712033d3c1e40753171824f4c72 Mon Sep 17 00:00:00 2001 From: wyxplus <32919297+wyxplus@users.noreply.github.com> Date: Sun, 4 Apr 2021 01:03:26 +0800 Subject: [PATCH 553/818] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tech/20210331 A tool to spy on your DNS queries- dnspeep.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210331 A tool to spy on your DNS queries- dnspeep.md b/sources/tech/20210331 A tool to spy on your DNS queries- dnspeep.md index c91e05dc72..15d1cad2b8 100644 --- a/sources/tech/20210331 A tool to spy on your DNS queries- dnspeep.md +++ b/sources/tech/20210331 A tool to spy on your DNS queries- dnspeep.md @@ -2,7 +2,7 @@ [#]: via: (https://jvns.ca/blog/2021/03/31/dnspeep-tool/) [#]: author: (Julia Evans https://jvns.ca/) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wyxplus) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From b0a7905d79daa17b0ee7289dae566a6539d4ffc1 Mon Sep 17 00:00:00 2001 From: wyxplus <32919297+wyxplus@users.noreply.github.com> Date: Sun, 4 Apr 2021 01:10:43 +0800 Subject: [PATCH 554/818] Update 20210331 A tool to spy on your DNS queries- dnspeep.md --- .../tech/20210331 A tool to spy on your DNS queries- dnspeep.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210331 A tool to spy on your DNS queries- dnspeep.md b/sources/tech/20210331 A tool to spy on your DNS queries- dnspeep.md index 15d1cad2b8..c91e05dc72 100644 --- a/sources/tech/20210331 A tool to spy on your DNS queries- dnspeep.md +++ b/sources/tech/20210331 A tool to spy on your DNS queries- dnspeep.md @@ -2,7 +2,7 @@ [#]: via: (https://jvns.ca/blog/2021/03/31/dnspeep-tool/) [#]: author: (Julia Evans https://jvns.ca/) [#]: collector: (lujun9972) -[#]: translator: (wyxplus) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 3cadc3568621d5f531c6c4be847bd03b49c442eb Mon Sep 17 00:00:00 2001 From: wyxplus <32919297+wyxplus@users.noreply.github.com> Date: Sun, 4 Apr 2021 01:12:15 +0800 Subject: [PATCH 555/818] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tech/20210331 A tool to spy on your DNS queries- dnspeep.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210331 A tool to spy on your DNS queries- dnspeep.md b/sources/tech/20210331 A tool to spy on your DNS queries- dnspeep.md index c91e05dc72..15d1cad2b8 100644 --- a/sources/tech/20210331 A tool to spy on your DNS queries- dnspeep.md +++ b/sources/tech/20210331 A tool to spy on your DNS queries- dnspeep.md @@ -2,7 +2,7 @@ [#]: via: (https://jvns.ca/blog/2021/03/31/dnspeep-tool/) [#]: author: (Julia Evans https://jvns.ca/) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wyxplus) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 9b4561996a45d4a96ee62fc60ccbf58776a290c9 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 4 Apr 2021 05:03:36 +0800 Subject: [PATCH 556/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210404=20?= =?UTF-8?q?Converting=20Multiple=20Markdown=20Files=20into=20HTML=20or=20O?= =?UTF-8?q?ther=20Formats=20in=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md --- ...les into HTML or Other Formats in Linux.md | 160 ++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 sources/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md diff --git a/sources/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md b/sources/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md new file mode 100644 index 0000000000..bbee3f9270 --- /dev/null +++ b/sources/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md @@ -0,0 +1,160 @@ +[#]: subject: (Converting Multiple Markdown Files into HTML or Other Formats in Linux) +[#]: via: (https://itsfoss.com/convert-markdown-files/) +[#]: author: (Bill Dyer https://itsfoss.com/author/bill/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Converting Multiple Markdown Files into HTML or Other Formats in Linux +====== + +Many times, when I use Markdown, I work on one file and when I’m done with it, I convert it to HTML or some other format. Occasionally, I have to create a few files. When I do work with more than one Markdown file, I usually wait until I have finished them before I convert them. + +I use pandoc to convert files, and it’s possible convert all the Markdown files in one shot. + +Markdown can convert its files to .html, but if there’s a chance that I will have to convert to other formats like epub, [pandoc][1] is the tool to use. I prefer to use the command line, so I will cover that first, but you can also do this in [VSCodium][2] without the command line. I’ll cover that too. + +### Converting multiple Markdown files to another format with Pandoc [command line method] + +To get started quickly, Ubuntu, and other Debian distros can type the following commands in the terminal: + +``` +sudo apt-get install pandoc +``` + +In this example, I have four Markdown files in a directory called md_test. + +``` +[email protected]:~/Documents/md_test$ ls -l *.md +-rw-r--r-- 1 bdyer bdyer 3374 Apr 7 2020 file01.md +-rw-r--r-- 1 bdyer bdyer 782 Apr 2 05:23 file02.md +-rw-r--r-- 1 bdyer bdyer 9257 Apr 2 05:21 file03.md +-rw-r--r-- 1 bdyer bdyer 9442 Apr 2 05:21 file04.md +[email protected]:~/Documents/md_test$ +``` + +There are no HTML files yet. Now I’ll use Pandoc to do its magic on the collection of files. To do this, I run a one-line command that: + + * calls pandoc + * reads the .md files and exports them as .html + + + +This is the command: + +``` +for i in *.md ; do echo "$i" && pandoc -s $i -o $i.html ; done +``` + +If you are not aware already, `;` is used for [running multiple commands at once in Linux][3]. + +Here’s what the display looks like once I have executed the command: + +``` +[email protected]:~/Documents/md_test$ for i in *.md ; do echo "$i" && pandoc -s $i -o $i.html ; done +file01.md +file02.md +file03.md +file04.md +[email protected]:~/Documents/md_test$ +``` + +Let me use the `ls` command once more to see if HTML files were created: + +``` +[email protected]:~/Documents/md_test$ ls -l *.html +-rw-r--r-- 1 bdyer bdyer 4291 Apr 2 06:08 file01.md.html +-rw-r--r-- 1 bdyer bdyer 1781 Apr 2 06:08 file02.md.html +-rw-r--r-- 1 bdyer bdyer 10272 Apr 2 06:08 file03.md.html +-rw-r--r-- 1 bdyer bdyer 10502 Apr 2 06:08 file04.md.html +[email protected]:~/Documents/md_test$ +``` + +The conversion was a success, and you have four HTML files ready to go on the Web server. + +Pandoc is quite versatile and you can convert the markdown files to some other supported format by specifying the extension of the output files. You can understand why it is considered among the [best open source tools for writers][4]. + +**Recommended Read:** + +![][5] + +#### [11 Best Markdown Editors for Linux][6] + +A list of best Markdown Editors for Linux distributions that not only look good but are also feature rich. + +### Converting Markdown files to HTML using VSCodium [GUI method] + +Like I’ve said earlier, I normally use the command line, but I don’t always use it for batch conversions, and you don’t have to either. VSCode or [VSCodium][7] can do the job. You just need to add one extension, called: _Markdown-All-in-One_ which will allow you to convert more than one Markdown file in one run. + +There are two ways to install the extension: + + * VSCodium’s terminal + * VSCodium’s plug-in manager + + + +To install the extension through VSCodium’s terminal: + + 1. Click on `Terminal` on the menu bar. The terminal panel will open + 2. Type, or [copy-and-paste, the following command in the terminal][8]: + + + +``` +codium --install-extension yzhang.markdown-all-in-one +``` + +**Note**: If you’re using VSCode instead of VSCodium, replace the word, `codium`, in the above command, with `code` + +![][9] + +The second way to install is through VSCodium’s plug-in, or extension, manager: + + 1. Click on the blocks on the left side of the VSCodium window. A list of extensions will appear. At the top of the list, there will be a search bar. + 2. In the search bar, type: `Markdown All in One`. The extension will be listed at the top of the list. Click on the `Install` button to install it. If it is already installed, a gear icon will appear in place of the install button. + + + +![][10] + +Once the extension is installed, you can open the folder that contains the Markdown files you want to convert. + +Click on the paper icon located on the left side of the VSCodium window. You’ll be given the opportunity to choose your folder. Once a folder is open, you’ll need to open at least one file. You can open as many files as you want, but one is the minimum. + +Once a file is open, bring up the Command Palette by pressing `CTRL+SHIFT+P`. Then, start typing `Markdown`in the search bar that will appear. As you do this, a list of Markdown related commands will appear. One of these will be `Markdown All in One: Print documents to HTML` command. Click on that one. + +![][11] + +You’ll be asked to choose a folder containing the files. This is so an output directory (called `out`) can be made and this is where the HTML files will go. The image below shows that the HTML was made after exporting the Markdown documents. From here, you can open, view, and edit the HTML as you wish. + +![][12] + +By waiting to convert your Markdown files, you can concentrate more on writing. Conversion to HTML can come when you’re ready – and you have two ways to get that done. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/convert-markdown-files/ + +作者:[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://pandoc.org/ +[2]: https://vscodium.com/ +[3]: https://itsfoss.com/run-multiple-commands-linux/ +[4]: https://itsfoss.com/open-source-tools-writers/ +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2016/10/Best-Markdown-Editors-for-Linux.jpg?fit=800%2C450&ssl=1 +[6]: https://itsfoss.com/best-markdown-editors-linux/ +[7]: https://itsfoss.com/vscodium/ +[8]: https://itsfoss.com/copy-paste-linux-terminal/ +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/vscodium_terminal.jpg?resize=800%2C564&ssl=1 +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/vscodium_extension_select.jpg?resize=800%2C564&ssl=1 +[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/vscodium_markdown_function_options.jpg?resize=800%2C564&ssl=1 +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/vscodium_html_filelist_shown.jpg?resize=800%2C564&ssl=1 From 0058457879861ae2e8b47b6ed5304b4169b7cbcf Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 4 Apr 2021 05:03:58 +0800 Subject: [PATCH 557/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210403=20?= =?UTF-8?q?FreeDOS=20commands=20you=20need=20to=20know?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210403 FreeDOS commands you need to know.md --- ...10403 FreeDOS commands you need to know.md | 169 ++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 sources/tech/20210403 FreeDOS commands you need to know.md diff --git a/sources/tech/20210403 FreeDOS commands you need to know.md b/sources/tech/20210403 FreeDOS commands you need to know.md new file mode 100644 index 0000000000..34cb48280e --- /dev/null +++ b/sources/tech/20210403 FreeDOS commands you need to know.md @@ -0,0 +1,169 @@ +[#]: subject: (FreeDOS commands you need to know) +[#]: via: (https://opensource.com/article/21/4/freedos-commands) +[#]: author: (Kevin O'Brien https://opensource.com/users/ahuka) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +FreeDOS commands you need to know +====== +Learn how to make, remove, copy, and do other things with directories +and files in FreeDOS. +![woman on laptop sitting at the window][1] + +[FreeDOS][2], the open source implementation of DOS, provides a lightweight operating system for running legacy applications on modern hardware (or in an emulator) and for updating hardware vendor fails with a Linux-compatible firmware flasher. Getting familiar with FreeDOS is not only a fun throwback to the computing days of the past, it's an investment into gaining useful computing skills. In this article, I'll look at some of the essential commands you need to know to work on a FreeDOS system. + +### Essential directory and file commands + +FreeDOS uses directories to organize files on a hard drive. That means you need to use directory commands to create a structure to store your files and find the files you've stored there. The commands you need to manage your directory structure are relatively few: + + * `MD` (or `MKDIR`) creates a new directory or subdirectory. + * `RD` (or `RMDIR`) removes (or deletes) a directory or subdirectory. + * `CD` (or `CHDIR`) changes from the current working directory to another directory. + * `DELTREE` erases a directory, including any files or subdirectories it contains. + * `DIR` lists the contents of the current working directory. + + + +Because working with directories is central to what FreeDOS does, all of these (except DELTREE) are internal commands contained within COMMAND.COM. Therefore, they are loaded into RAM and ready for use whenever you boot (even from a boot disk). The first three commands have two versions: a two-letter short name and a long name. There is no difference in practice, so I'll use the short form in this article. + +### Make a directory with MD + +FreeDOS's `MD` command creates a new directory or subdirectory. (Actually, since the _root_ is the main directory, all directories are technically subdirectories, so I'll refer to _subdirectories_ in all examples.) An optional argument is the path to the directory you want to create, but if no path is included, the subdirectory is created in the current working subdirectory. + +For example, to create a subdirectory called `letters` in your current location: + + +``` +`C:\HOME\>MD LETTERS` +``` + +This creates the subdirectory `C:\letters`. + +By including a path, you can create a subdirectory anywhere: + + +``` +`C:\>MD C:\HOME\LETTERS\LOVE` +``` + +This has the same result as moving into `C:\HOME\LETTERS` first and then creating a subdirectory there: + + +``` +C:\CD HOME\LETTERS +C:\HOME\LETTERS\>MD LOVE +C:\HOME\LETTERS\>DIR +LOVE +``` + +A path specification cannot exceed 63 characters, including backslashes. + +### Remove a directory with RD + +FreeDOS's `RD` command removes a subdirectory. The subdirectory must be empty. If it contains files or other subdirectories, you get an error message. This has an optional path argument with the same syntax as `MD`. + +You cannot remove your current working subdirectory. To do that, you must `CD` to the parent subdirectory and then remove the undesired subdirectory. + +### Delete files and directories with DELTREE + +The `RD` command can be a little confusing because of safeguards FreeDOS builds into the command. That you cannot delete a subdirectory that has contents, for instance, is a safety measure. `DELTREE` is the solution. + +`DELTREE` deletes an entire subdirectory "tree" (a subdirectory), plus all of the files it contains, plus all of the subdirectories those contain, and all of the files _they_ contain, and so on, all in one easy command. Sometimes it can be a little _too_ easy because it can wipe out so much data so quickly. It ignores file attributes, so you can wipe out hidden, read-only, and system files without knowing it. + +You can even wipe out multiple trees by specifying them in the command. This would wipe out both of these subdirectories in one command: + + +``` +`C:\>DELTREE C:\FOO C:\BAR` +``` + +This is one of those commands where you really ought to think twice before you use it. It has its place, definitely. I can still remember how tedious it was to go into each subdirectory, delete the individual files, check each subdirectory for contents, delete each subdirectory one at a time, then jump up one level and repeat the process. `DELTREE` is a great timesaver when you need it. But I would never use it for ordinary maintenance because one false move can do so much damage. + +### Format a hard drive + +The `FORMAT` command can also be used to prepare a blank hard drive to have files written to it. This formats the `D:` drive: + + +``` +`C:\>FORMAT D:` +``` + +### Copy files + +The `COPY` command, as the name implies, copies files from one place to another. The required arguments are the file to be copied and the path and file to copy it to. Switches include: + + * `/Y` prevents a prompt when a file is being overwritten. + * `/-Y` requires a prompt when a file is being overwritten. + * `/V` verifies the contents of the copy. + + + +This copies the file `MYFILE.TXT` from the working directory on `C:` to the root directory of the `D:` drive and renames it `EXAMPLE.TXT`: + + +``` +`C:\>COPY MYFILE.TXT D:\EXAMPLE.TXT` +``` + +This copies the file `EXAMPLE.TXT` from the working directory on `C:` to the `C:\DOCS\` directory and then verifies the contents of the file to ensure that the copy is complete: + + +``` +`C:\>COPY EXAMPLE.TXT C:\DOCS\EXAMPLE.TXT /V` +``` + +You can also use the `COPY` command to combine and append files. This combines the two files `MYFILE1.TXT` and `MYFILE2.TXT` and places them in a new file called `MYFILE3.TXT`: + + +``` +`C:\>COPY MYFILE1.TXT+MYFILE2.TXT MYFILE3.TXT` +``` + +### Copy directories with XCOPY + +The `XCOPY` command copies entire directories, along with all of their subdirectories and all of the files contained in those subdirectories. Arguments are the files and path to be copied and the destination to copy them to. Important switches are: + + * `/S` copies all files in the current directory and any subdirectory within it. + * `/E` copies subdirectories, even if they are empty. This option must be used with the `/S` option. + * `/V` verifies the copies that were made. + + + +This is a very powerful and useful command, particularly for backing up directories or an entire hard drive. + +This command copies the entire contents of the directory `C:\DOCS`, including all subdirectories and their contents (except empty subdirectories) and places them on drive `D:` in the directory `D:\BACKUP\DOCS\`: + + +``` +`C:\>XCOPY C:\DOCS D:\BACKUP\DOCS\ /S` +``` + +### Using FreeDOS + +FreeDOS is a fun, lightweight, open source operating system. It provides lots of great utilities to enable you to get work done on it, whether you're using it to update the firmware of your motherboard or to give new life to an old computer. Learn the basics of FreeDOS. You might be surprised at how versatile it is. + +* * * + +_Some of the information in this article was previously published in [DOS lesson 8: Format; copy; diskcopy; Xcopy][3]; [DOS lesson 10: Directory commands][4] (both CC BY-SA 4.0); and [How to work with DOS][5]._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/freedos-commands + +作者:[Kevin O'Brien][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/ahuka +[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://www.freedos.org/ +[3]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-8-format-copy-diskcopy-xcopy/ +[4]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-10-directory-commands/ +[5]: https://allaboutdosdirectoires.blogspot.com/ From 720725ebf0d244d2c64b37e0d135307ad3bd5b76 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 4 Apr 2021 05:04:12 +0800 Subject: [PATCH 558/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210403=20?= =?UTF-8?q?What=20problems=20do=20people=20solve=20with=20strace=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210403 What problems do people solve with strace.md --- ...at problems do people solve with strace.md | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 sources/tech/20210403 What problems do people solve with strace.md diff --git a/sources/tech/20210403 What problems do people solve with strace.md b/sources/tech/20210403 What problems do people solve with strace.md new file mode 100644 index 0000000000..1b8080d60a --- /dev/null +++ b/sources/tech/20210403 What problems do people solve with strace.md @@ -0,0 +1,144 @@ +[#]: subject: (What problems do people solve with strace?) +[#]: via: (https://jvns.ca/blog/2021/04/03/what-problems-do-people-solve-with-strace/) +[#]: author: (Julia Evans https://jvns.ca/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +What problems do people solve with strace? +====== + +Yesterday I [asked on Twitter about what problems people are solving with strace][1] and as usual everyone really delivered! I got 200 answers and then spent a bunch of time manually categorizing them into 9 categories of problems. + +All of the problems are about either finding files a program depends on, figuring out why a program is stuck or slow, or finding out why a program is failing. These generally matched up with what I use strace for myself, but there were some things I hadn’t thought of too! + +I’m not going to explain what strace is in this post but I have a [free zine about it][2] and [a talk][3] and [lots of blog posts][4]. + +### problem 1: where’s the config file? + +The #1 most popular problem was “this program has a configuration file and I don’t know where it is”. This is probably my most common use for strace too, because it’s such a simple question. + +This is great because there are a million ways for a program to document where its config file is (in a man page, on its website, in `--help`, etc), but there’s only one way for it to actually open it (with a system call!) + +### problem 2: what other files does this program depend on? + +You can also use strace to find other types of files a program depends on, like: + + * dynamically linked libraries (“why is my program loading the wrong version of this `.so` file?“) like [this ruby problem I debugged in 2014][5] + * where it’s looking for its Ruby gems (Ruby specifically came up a few times!) + * SSL root certificates + * a game’s save files + * a closed-source program’s data files + * [which node_modules files aren’t being used][6] + + + +### problem 3: why is this program hanging? + +You have a program, it’s just sitting there doing nothing, what’s going on? This one is especially easy to answer because a lot of the time you just need to run `strace -p PID` and look at what system call is currently running. You don’t even have to look through hundreds of lines of output! + +The answer is usually ‘waiting for some kind of I/O’. Some possible answers for “why is this stuck” (though there are a lot more!): + + * it’s polling forever on a `select()` + * it’s `wait()`ing for a subprocess to finish + * it’s making a network request to something that isn’t responding + * it’s doing `write()` but it’s blocked because the buffer is full + * it’s doing a `read()` on stdin and it’s waiting for input + + + +Someone also gave a nice example of using strace to debug a stuck `df`: ‘with strace df -h you can find the stuck mount and unmount it”. + +### problem 4: is this program stuck? + +A variation on the previous one: sometimes a program has been running for longer than you expected, and you just want to know if it’s stuck or of it’s still making progress. + +As long as the program makes system calls while it’s running, this is super easy to answer with strace – just strace it and see if it’s making new system calls! + +### problem 5: why is this program slow? + +You can use strace as a sort of coarse profiling tool – `strace -t` will show the timestamp of each system call, so you can look for big gaps and find the culprit. + +Here are 9 short stories from Twitter of people using strace to debug “why is this program slow?”. + + * Back in 2000, a Java-based web site that I helped support was dying under modest load: pages loaded slowly, if at all. We straced the J2EE application server and found that it was reading class files one. byte. at. a. time. Devs weren’t using BufferedReader, classic Java mistake. + * Optimizing app startup times… running strace can be an eye-opening experience, in terms of the amount of unnecessary file system interaction going on (e.g. open/read/close on the same config file over and over again; loading gobs of font files over a slow NFS mount, etc) + * Asked myself why reading from session files in PHP (usually <100 bytes) was incredibly slow. Turned out some `flock`-syscalls took ~60s + * A program was behaving abnormally slow. Used strace to figure out it was re-initializing its internal pseudo-random number generator on every request by reading from /dev/random and exhausting entropy + * Last thing I remember was attaching to a job worker and seeing just how many network calls it was making (which was unexpected). + * Why is this program so slow to start? strace shows it opening/reading the same config file thousands of times. + * Server using 100% CPU time randomly with low actual traffic. Turns out it’s hitting the number of open files limit accepting a socket, and retrying forever after getting EMFILE and not reporting it. + * A workflow was running super slow but no logs, ends up it was trying to do a post request that was taking 30s before timing out and then retrying 5 times… ends up the backend service was overwhelmed but also had no visibility + * using strace to notice that gethostbyname() is taking a long time to return (you can’t see the `gethostbyname` directly but you can see the DNS packets in strace) + + + +### problem 6: hidden permissions errors + +Sometimes a program is failing for a mysterious reason, but the problem is just that there’s some file that it doesn’t have permission to open. In an ideal world programs would report those errors (“Error opening file /dev/whatever: permission denied”), but of course the world is not perfect, so strace can really help with this! + +This is actually the most recent thing I used strace for: I was using an AxiDraw pen plotter and it printed out an inscrutable error message when I tried to start it. I `strace`d it and it turned out that my user just didn’t have permission to open the USB device. + +### problem 7: what command line arguments are being used? + +Sometimes a script is running another program, and you want to know what command line flags it’s passing! + +A couple of examples from Twitter: + + * find what compiler flags are actually being used to build some code + * a command was failing due to having too long a command line + + + +### problem 8: why is this network connection failing? + +Basically the goal here is just to find which domain / IP address the network connection is being made to. You can look at the DNS request to find the domain or the `connect` system call to find the IP. + +In general there are a lot of stories about using strace to debug network issues when `tcpdump` isn’t available for some reason or just because it’s what the person is more familiar with. + +### problem 9: why does this program succeed when run one way and fail when run in another way? + +For example: + + * the same binary works on one machine, fails on another machine + * works when you run it, fails when spawned by a systemd unit file + * works when you run it, fails when you run it as “su - user /some/script” + * works when you run it, fails when run as a cron job + + + +Being able to compare the strace output in both cases is very helpful. Though my first step when debugging “this works as my user and fails when run in a different way on the same computer” would be “look at my environment variables”. + +### what I’m doing with this: slowly building some challenges + +The reason I’m thinking about this is that I’ve been slowly working on some challenges to help people practice using strace and other command line tools. The idea is that you’re given a problem to solve, a terminal, and you’re free to solve it in any way you want. + +So my goal is to use this to build some practice problems that you can solve with strace that reflect the kinds of problems that people actually use it for in real life. + +### that’s all! + +There are probably more problems that can be solved with strace that I haven’t covered here – I’d love to hear what I’ve missed! + +I really loved seeing how many of the same uses came up over and over and over again – at least 20 different people replied saying that they use strace to find config files. And as always I think it’s really delightful how such a simple tool (“trace system calls!”) can be used to solve so many different kinds of problems. + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2021/04/03/what-problems-do-people-solve-with-strace/ + +作者:[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/1378014888405168132 +[2]: https://wizardzines.com/zines/strace +[3]: https://www.youtube.com/watch?v=4pEHfGKB-OE +[4]: https://jvns.ca/categories/strace +[5]: https://jvns.ca/blog/2014/03/10/debugging-shared-library-problems-with-strace/ +[6]: https://indexandmain.com/post/shrink-node-modules-with-refining From 195be1d650b6b0e7296c20678c8517cf7fcc34a9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 5 Apr 2021 08:41:03 +0800 Subject: [PATCH 559/818] APL --- .../tech/20210403 What problems do people solve with strace.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210403 What problems do people solve with strace.md b/sources/tech/20210403 What problems do people solve with strace.md index 1b8080d60a..a1b9c1a02a 100644 --- a/sources/tech/20210403 What problems do people solve with strace.md +++ b/sources/tech/20210403 What problems do people solve with strace.md @@ -2,7 +2,7 @@ [#]: via: (https://jvns.ca/blog/2021/04/03/what-problems-do-people-solve-with-strace/) [#]: author: (Julia Evans https://jvns.ca/) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 54fe7c136af380dca01e925e34c6321d7e3a9b1b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 5 Apr 2021 09:44:24 +0800 Subject: [PATCH 560/818] TSL&PRF --- ...at problems do people solve with strace.md | 144 ------------------ ...at problems do people solve with strace.md | 134 ++++++++++++++++ 2 files changed, 134 insertions(+), 144 deletions(-) delete mode 100644 sources/tech/20210403 What problems do people solve with strace.md create mode 100644 translated/tech/20210403 What problems do people solve with strace.md diff --git a/sources/tech/20210403 What problems do people solve with strace.md b/sources/tech/20210403 What problems do people solve with strace.md deleted file mode 100644 index a1b9c1a02a..0000000000 --- a/sources/tech/20210403 What problems do people solve with strace.md +++ /dev/null @@ -1,144 +0,0 @@ -[#]: subject: (What problems do people solve with strace?) -[#]: via: (https://jvns.ca/blog/2021/04/03/what-problems-do-people-solve-with-strace/) -[#]: author: (Julia Evans https://jvns.ca/) -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -What problems do people solve with strace? -====== - -Yesterday I [asked on Twitter about what problems people are solving with strace][1] and as usual everyone really delivered! I got 200 answers and then spent a bunch of time manually categorizing them into 9 categories of problems. - -All of the problems are about either finding files a program depends on, figuring out why a program is stuck or slow, or finding out why a program is failing. These generally matched up with what I use strace for myself, but there were some things I hadn’t thought of too! - -I’m not going to explain what strace is in this post but I have a [free zine about it][2] and [a talk][3] and [lots of blog posts][4]. - -### problem 1: where’s the config file? - -The #1 most popular problem was “this program has a configuration file and I don’t know where it is”. This is probably my most common use for strace too, because it’s such a simple question. - -This is great because there are a million ways for a program to document where its config file is (in a man page, on its website, in `--help`, etc), but there’s only one way for it to actually open it (with a system call!) - -### problem 2: what other files does this program depend on? - -You can also use strace to find other types of files a program depends on, like: - - * dynamically linked libraries (“why is my program loading the wrong version of this `.so` file?“) like [this ruby problem I debugged in 2014][5] - * where it’s looking for its Ruby gems (Ruby specifically came up a few times!) - * SSL root certificates - * a game’s save files - * a closed-source program’s data files - * [which node_modules files aren’t being used][6] - - - -### problem 3: why is this program hanging? - -You have a program, it’s just sitting there doing nothing, what’s going on? This one is especially easy to answer because a lot of the time you just need to run `strace -p PID` and look at what system call is currently running. You don’t even have to look through hundreds of lines of output! - -The answer is usually ‘waiting for some kind of I/O’. Some possible answers for “why is this stuck” (though there are a lot more!): - - * it’s polling forever on a `select()` - * it’s `wait()`ing for a subprocess to finish - * it’s making a network request to something that isn’t responding - * it’s doing `write()` but it’s blocked because the buffer is full - * it’s doing a `read()` on stdin and it’s waiting for input - - - -Someone also gave a nice example of using strace to debug a stuck `df`: ‘with strace df -h you can find the stuck mount and unmount it”. - -### problem 4: is this program stuck? - -A variation on the previous one: sometimes a program has been running for longer than you expected, and you just want to know if it’s stuck or of it’s still making progress. - -As long as the program makes system calls while it’s running, this is super easy to answer with strace – just strace it and see if it’s making new system calls! - -### problem 5: why is this program slow? - -You can use strace as a sort of coarse profiling tool – `strace -t` will show the timestamp of each system call, so you can look for big gaps and find the culprit. - -Here are 9 short stories from Twitter of people using strace to debug “why is this program slow?”. - - * Back in 2000, a Java-based web site that I helped support was dying under modest load: pages loaded slowly, if at all. We straced the J2EE application server and found that it was reading class files one. byte. at. a. time. Devs weren’t using BufferedReader, classic Java mistake. - * Optimizing app startup times… running strace can be an eye-opening experience, in terms of the amount of unnecessary file system interaction going on (e.g. open/read/close on the same config file over and over again; loading gobs of font files over a slow NFS mount, etc) - * Asked myself why reading from session files in PHP (usually <100 bytes) was incredibly slow. Turned out some `flock`-syscalls took ~60s - * A program was behaving abnormally slow. Used strace to figure out it was re-initializing its internal pseudo-random number generator on every request by reading from /dev/random and exhausting entropy - * Last thing I remember was attaching to a job worker and seeing just how many network calls it was making (which was unexpected). - * Why is this program so slow to start? strace shows it opening/reading the same config file thousands of times. - * Server using 100% CPU time randomly with low actual traffic. Turns out it’s hitting the number of open files limit accepting a socket, and retrying forever after getting EMFILE and not reporting it. - * A workflow was running super slow but no logs, ends up it was trying to do a post request that was taking 30s before timing out and then retrying 5 times… ends up the backend service was overwhelmed but also had no visibility - * using strace to notice that gethostbyname() is taking a long time to return (you can’t see the `gethostbyname` directly but you can see the DNS packets in strace) - - - -### problem 6: hidden permissions errors - -Sometimes a program is failing for a mysterious reason, but the problem is just that there’s some file that it doesn’t have permission to open. In an ideal world programs would report those errors (“Error opening file /dev/whatever: permission denied”), but of course the world is not perfect, so strace can really help with this! - -This is actually the most recent thing I used strace for: I was using an AxiDraw pen plotter and it printed out an inscrutable error message when I tried to start it. I `strace`d it and it turned out that my user just didn’t have permission to open the USB device. - -### problem 7: what command line arguments are being used? - -Sometimes a script is running another program, and you want to know what command line flags it’s passing! - -A couple of examples from Twitter: - - * find what compiler flags are actually being used to build some code - * a command was failing due to having too long a command line - - - -### problem 8: why is this network connection failing? - -Basically the goal here is just to find which domain / IP address the network connection is being made to. You can look at the DNS request to find the domain or the `connect` system call to find the IP. - -In general there are a lot of stories about using strace to debug network issues when `tcpdump` isn’t available for some reason or just because it’s what the person is more familiar with. - -### problem 9: why does this program succeed when run one way and fail when run in another way? - -For example: - - * the same binary works on one machine, fails on another machine - * works when you run it, fails when spawned by a systemd unit file - * works when you run it, fails when you run it as “su - user /some/script” - * works when you run it, fails when run as a cron job - - - -Being able to compare the strace output in both cases is very helpful. Though my first step when debugging “this works as my user and fails when run in a different way on the same computer” would be “look at my environment variables”. - -### what I’m doing with this: slowly building some challenges - -The reason I’m thinking about this is that I’ve been slowly working on some challenges to help people practice using strace and other command line tools. The idea is that you’re given a problem to solve, a terminal, and you’re free to solve it in any way you want. - -So my goal is to use this to build some practice problems that you can solve with strace that reflect the kinds of problems that people actually use it for in real life. - -### that’s all! - -There are probably more problems that can be solved with strace that I haven’t covered here – I’d love to hear what I’ve missed! - -I really loved seeing how many of the same uses came up over and over and over again – at least 20 different people replied saying that they use strace to find config files. And as always I think it’s really delightful how such a simple tool (“trace system calls!”) can be used to solve so many different kinds of problems. - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/2021/04/03/what-problems-do-people-solve-with-strace/ - -作者:[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/1378014888405168132 -[2]: https://wizardzines.com/zines/strace -[3]: https://www.youtube.com/watch?v=4pEHfGKB-OE -[4]: https://jvns.ca/categories/strace -[5]: https://jvns.ca/blog/2014/03/10/debugging-shared-library-problems-with-strace/ -[6]: https://indexandmain.com/post/shrink-node-modules-with-refining diff --git a/translated/tech/20210403 What problems do people solve with strace.md b/translated/tech/20210403 What problems do people solve with strace.md new file mode 100644 index 0000000000..8a40314aab --- /dev/null +++ b/translated/tech/20210403 What problems do people solve with strace.md @@ -0,0 +1,134 @@ +[#]: subject: (What problems do people solve with strace?) +[#]: via: (https://jvns.ca/blog/2021/04/03/what-problems-do-people-solve-with-strace/) +[#]: author: (Julia Evans https://jvns.ca/) +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) + +strace 可以解决什么问题? +====== + +昨天我 [在 Twitter 上询问大家用 strace 解决了什么问题?][1],和往常一样,大家真的是给出了自己的答案! 我收到了大约 200 个答案,然后花了很多时间手动将它们归为 9 类。 + +这些解决的问题都是关于寻找程序依赖的文件、找出程序卡住或慢的原因、或者找出程序失败的原因。这些总体上与我自己使用 `strace` 的内容相吻合,但也有一些我没有想到的东西! + +我不打算在这篇文章里解释什么是 `strace`,但我有一本 [关于它的免费杂志][2] 和 [一个讲座][3] 以及 [很多博文][4]。 + +### 问题 1:配置文件在哪里? + +最受欢迎的问题是“这个程序有一个配置文件,但我不知道它在哪里”。这可能也是我最常使用 `strace` 解决的问题,因为这是个很简单的问题。 + +这很好,因为一个程序有一百万种方法来记录它的配置文件在哪里(在手册页、网站上、`--help`等),但只有一种方法可以让它真正打开它(用系统调用!)。 + +### 问题 2:这个程序还依赖什么文件? + +你也可以使用 `strace` 来查找程序依赖的其他类型的文件,比如: + + * 动态链接库(“为什么我的程序加载了这个错误版本的 `.so` 文件?"),比如 [我在 2014 年调试的这个 ruby 问题][5] + * 它在哪里寻找它的 Ruby gem(Ruby 出现了几次这种情况!) + * SSL 根证书 + * 游戏的存档文件 + * 一个闭源程序的数据文件 + * [哪些 node_modules 文件没有被使用][6] + +### 问题 3:为什么这个程序会挂掉? + +你有一个程序,它只是坐在那里什么都不做,这是怎么回事?这个问题特别容易回答,因为很多时候你只需要运行 `strace -p PID`,看看当前运行的是什么系统调用。你甚至不需要看几百行的输出。 + +答案通常是“正在等待某种 I/O”。“为什么会卡住”的一些可能的答案(虽然还有很多!): + + * 它一直在轮询 `select()` + * 正在 `wait()` 等待一个子进程完成 + * 它在向某个没有响应的东西发出网络请求 + * 正在进行 `write()`,但由于缓冲区已满而被阻止。 + * 它在 stdin 上做 `read()`,等待输入。 + +有人还举了一个很好的例子,用 `strace` 调试一个卡住的 `df` 命令:“用 `strace df -h` 你可以找到卡住的挂载,然后卸载它”。 + +### 问题 4:这个程序卡住了吗? + +这是上一个问题的变种:有时一个程序运行的时间比你预期的要长,你只是想知道它是否卡住了,或者它是否还在继续进行。 + +只要程序在运行过程中进行系统调用,用 `strace` 就可以超简单地回答这个问题:只需 `strace` 它,看看它是否在进行新的系统调用! + +### 问题 5:为什么这个程序很慢? + +你可以使用 `strace` 作为一种粗略的剖析工具:`strace -t` 会显示每次系统调用的时间戳,这样你就可以寻找大的漏洞,找到罪魁祸首。 + +以下是 Twitter 上 9 个人使用 `strace` 调试“为什么这个程序很慢?”的小故事。 + + * 早在 2000 年,我帮助支持的一个基于 Java 的网站在适度的负载下奄奄一息:页面加载缓慢,甚至完全加载不出来。我们对 J2EE 应用服务器进行了测试,发现它每次只读取一个类文件。开发人员没有使用 BufferedReader,这是典型的 Java 错误。 + * 优化应用程序的启动时间……运行 `strace` 可以让人大开眼界,因为有大量不必要的文件系统交互在进行(例如,在同一个配置文件上反复打开/读取/关闭;在一个缓慢的 NFS 挂载上加载大量的字体文件,等等)。 + * 问自己为什么在 PHP 中从会话文件中读取(通常是小于 100 字节)非常慢。结果发现一些 `flock` 系统调用花了大约 60 秒。 + * 一个程序表现得异常缓慢。使用 `strace` 找出它在每次请求时,通过从 `/dev/random` 读取数据并耗尽熵来重新初始化其内部伪随机数发生器。 + * 我记得最近一件事是连接到一个任务处理程序,看到它有多少网络调用(这是意想不到的)。 + * `strace` 显示它打开/读取同一个配置文件数千次。 + * 服务器随机使用 100% 的 CPU 时间,实际流量很低。原来是碰到打开文件数限制,接受一个套接字时,得到 EMFILE 错误而没有报告,然后一直重试。 + * 一个工作流运行超慢,但是没有日志,结果它做一个 POST 请求花了 30 秒而超时,然后重试了 5 次……结果后台服务不堪重负,但是也没有可视性。 + * 使用 `strace` 注意到 `gethostbyname()` 需要很长时间才能返回(你不能直接看到 `gethostbyname`,但你可以看到 `strace` 中的 DNS 数据包) + +### 问题 6:隐藏的权限错误 + +有时候程序因为一个神秘的原因而失败,但问题只是有一些它没有权限打开的文件。在理想的世界里,程序会报告这些错误(“Error opening file /dev/whatever: permission denied”),当然这个世界并不完美,所以 `strace` 真的可以帮助解决这个问题! + +这其实是我最近使用 `strace` 做的事情。我使用了一台 AxiDraw 绘图仪,当我试图启动它时,它打印出了一个难以理解的错误信息。我 `strace` 它,结果发现我的用户没有权限打开 USB 设备。 + +### 问题 7:正在使用什么命令行参数? + +有时候,一个脚本正在运行另一个程序,你想知道它传递的是什么命令行标志! + +几个来自 Twitter 的例子。 + + * 找出实际上是用来编译代码的编译器标志 + * 由于命令行太长,命令失败了 + +### 问题 8:为什么这个网络连接失败? + +基本上,这里的目标是找到网络连接的域名 / IP 地址。你可以通过 DNS 请求来查找域名,或者通过 `connect` 系统调用来查找 IP。 + +一般来说,当 `tcpdump` 因为某些原因不能使用或者只是因为比较熟悉 `strace` 时,就经常会使用 `strace` 调试网络问题。 + +### 问题 9:为什么这个程序以一种方式运行时成功,以另一种方式运行时失败? + +例如: + + * 同样的二进制程序在一台机器上可以运行,在另一台机器上却失败了 + * 可以运行,但被 systemd 单元文件生成时失败 + * 可以运行,但以 `su - user /some/script` 的方式运行时失败 + * 可以运行,作为 cron 作业运行时失败 + +能够比较两种情况下的 `strace` 输出是非常有用的。虽然我在调试“以我的用户身份工作,而在同一台计算机上以不同方式运行时却失败了”时,第一步是“看看我的环境变量”。 + +### 我在做什么:慢慢地建立一些挑战 + +我之所以会想到这个问题,是因为我一直在慢慢地进行一些挑战,以帮助人们练习使用 `strace` 和其他命令行工具。我的想法是,给你一个问题,一个终端,你可以自由地以任何方式解决它。 + +所以我的目标是用它来建立一些你可以用 `strace` 解决的练习题,这些练习题反映了人们在现实生活中实际使用它解决的问题。 + +### 就是这样! + +可能还有更多的问题可以用 `strace` 解决,我在这里还没有讲到,我很乐意听到我错过了什么! + +我真的很喜欢看到很多相同的用法一次又一次地出现:至少有 20 个不同的人回答说他们使用 `strace` 来查找配置文件。而且和以往一样,我觉得这样一个简单的工具(“跟踪系统调用!”)可以用来解决这么多不同类型的问题,真的很令人高兴。 + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2021/04/03/what-problems-do-people-solve-with-strace/ + +作者:[Julia Evans][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://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://twitter.com/b0rk/status/1378014888405168132 +[2]: https://wizardzines.com/zines/strace +[3]: https://www.youtube.com/watch?v=4pEHfGKB-OE +[4]: https://jvns.ca/categories/strace +[5]: https://jvns.ca/blog/2014/03/10/debugging-shared-library-problems-with-strace/ +[6]: https://indexandmain.com/post/shrink-node-modules-with-refining From bcf242f41a7c6453fb3e2a85260f2a2b75df36be Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 5 Apr 2021 09:49:56 +0800 Subject: [PATCH 561/818] PUB @wxy https://linux.cn/article-13267-1.html --- .../20210403 What problems do people solve with strace.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210403 What problems do people solve with strace.md (98%) diff --git a/translated/tech/20210403 What problems do people solve with strace.md b/published/20210403 What problems do people solve with strace.md similarity index 98% rename from translated/tech/20210403 What problems do people solve with strace.md rename to published/20210403 What problems do people solve with strace.md index 8a40314aab..3160de5910 100644 --- a/translated/tech/20210403 What problems do people solve with strace.md +++ b/published/20210403 What problems do people solve with strace.md @@ -4,12 +4,14 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13267-1.html) strace 可以解决什么问题? ====== +![](https://img.linux.net.cn/data/attachment/album/202104/05/094825y66126r56z361rz1.jpg) + 昨天我 [在 Twitter 上询问大家用 strace 解决了什么问题?][1],和往常一样,大家真的是给出了自己的答案! 我收到了大约 200 个答案,然后花了很多时间手动将它们归为 9 类。 这些解决的问题都是关于寻找程序依赖的文件、找出程序卡住或慢的原因、或者找出程序失败的原因。这些总体上与我自己使用 `strace` 的内容相吻合,但也有一些我没有想到的东西! From 4a52ebe4075dce556a54ff4c6a72b22f1850f6a2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 5 Apr 2021 10:24:59 +0800 Subject: [PATCH 562/818] PRF @geekpi --- ...10329 Manipulate data in files with Lua.md | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/translated/tech/20210329 Manipulate data in files with Lua.md b/translated/tech/20210329 Manipulate data in files with Lua.md index dfbae5c7fb..f8b938bf28 100644 --- a/translated/tech/20210329 Manipulate data in files with Lua.md +++ b/translated/tech/20210329 Manipulate data in files with Lua.md @@ -3,14 +3,16 @@ [#]: author: (Seth Kenlon https://opensource.com/users/seth) [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) 用 Lua 操作文件中的数据 ====== -了解 Lua 如何处理数据的读写。 -![Person standing in front of a giant computer screen with numbers, data][1] + +> 了解 Lua 如何处理数据的读写。 + +![](https://img.linux.net.cn/data/attachment/album/202104/05/102424yczwucc3xcuyzkgw.jpg) 有些数据是临时的,存储在 RAM 中,只有在应用运行时才有意义。但有些数据是要持久的,存储在硬盘上供以后使用。当你编程时,无论是简单的脚本还是复杂的工具套件,通常都需要读取和写入文件。有时文件可能包含配置选项,而另一些时候这个文件是你的用户用你的应用创建的数据。每种语言都会以不同的方式处理这项任务,本文将演示如何使用 Lua 处理文件数据。 @@ -22,8 +24,7 @@ ### 用 Lua 读取文件 -Lua 使用 `io` 库进行数据输入和输出。下面的例子创建了一个名为 `ingest` 的函数来从文件中读取数据,然后用 `:read` 函数进行解析。在 Lua 中打开一个文件时,有几种模式可以启用。因为我只需要从这个文件中读取数据,所以我使用 `r`(代表”读“)模式: - +Lua 使用 `io` 库进行数据输入和输出。下面的例子创建了一个名为 `ingest` 的函数来从文件中读取数据,然后用 `:read` 函数进行解析。在 Lua 中打开一个文件时,有几种模式可以启用。因为我只需要从这个文件中读取数据,所以我使用 `r`(代表“读”)模式: ``` function ingest(file) @@ -37,7 +38,7 @@ myfile=ingest("example.txt") print(myfile) ``` -在这段代码中,注意到变量 `myfile` 是为了触发 `ingest` 函数而创建的,因此,它接收该函数返回的任何内容。`ingest` 函数返回文件的行数(从一个称为 `lines` 的变量中)。当最后一步打印 `myfile` 变量的内容时,文件的行数就会出现在终端中。 +在这段代码中,注意到变量 `myfile` 是为了触发 `ingest` 函数而创建的,因此,它接收该函数返回的任何内容。`ingest` 函数返回文件的行数(从一个称为 `lines` 的变量中0。当最后一步打印 `myfile` 变量的内容时,文件的行数就会出现在终端中。 如果文件 `example.txt` 中包含了配置选项,那么我会写一些额外的代码来解析这些数据,可能会使用另一个 Lua 库,这取决于配置是以 INI 文件还是 YAML 文件或其他格式存储。如果数据是 SVG 图形,我会写额外的代码来解析 XML,可能会使用 Lua 的 SVG 库。换句话说,你的代码读取的数据一旦加载到内存中,就可以进行操作,但是它们都需要加载 `io` 库。 @@ -45,7 +46,6 @@ print(myfile) 无论你是要存储用户用你的应用创建的数据,还是仅仅是关于用户在应用中做了什么的元数据(例如,游戏保存或最近播放的歌曲),都有很多很好的理由来存储数据供以后使用。在 Lua 中,这是通过 `io` 库实现的,打开一个文件,将数据写入其中,然后关闭文件: - ``` function exgest(file)    local f = io.open(file, "a") @@ -63,13 +63,11 @@ exgest("example.txt") 在 Lua 中打开文件时,有一些保护措施和参数来定义如何处理文件。默认值是 `r`,允许你只读数据: - * **r** 只读 - * **w** 如果文件不存在,覆盖或创建一个新文件。 - * **r+** 读取和覆盖。 - * **a** 追加数据到文件中,或在文件不存在的情况下创建一个新文件。 - * **a+** 读取数据,将数据追加到文件中,或文件不存在的话,创建一个新文件。 - - + * `r` 只读 + * `w` 如果文件不存在,覆盖或创建一个新文件。 + * `r+` 读取和覆盖。 + * `a` 追加数据到文件中,或在文件不存在的情况下创建一个新文件。 + * `a+` 读取数据,将数据追加到文件中,或文件不存在的话,创建一个新文件。 还有一些其他的(例如,`b` 代表二进制格式),但这些是最常见的。关于完整的文档,请参考 [Lua.org/manual][5] 上的优秀 Lua 文档。 @@ -84,7 +82,7 @@ via: https://opensource.com/article/21/3/lua-files 作者:[Seth Kenlon][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/) 荣誉推出 From bf383c8ba5530759c35826cd57f47765e11114e0 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 5 Apr 2021 10:25:42 +0800 Subject: [PATCH 563/818] PUB @geekpi https://linux.cn/article-13268-1.html --- .../20210329 Manipulate data in files with Lua.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210329 Manipulate data in files with Lua.md (98%) diff --git a/translated/tech/20210329 Manipulate data in files with Lua.md b/published/20210329 Manipulate data in files with Lua.md similarity index 98% rename from translated/tech/20210329 Manipulate data in files with Lua.md rename to published/20210329 Manipulate data in files with Lua.md index f8b938bf28..eb0bf8808b 100644 --- a/translated/tech/20210329 Manipulate data in files with Lua.md +++ b/published/20210329 Manipulate data in files with Lua.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13268-1.html) 用 Lua 操作文件中的数据 ====== From 21bdaca6e31e4905db2ecd06dc3a92b2ac9eb3db Mon Sep 17 00:00:00 2001 From: "Xiaobin.Liu" Date: Mon, 5 Apr 2021 16:14:59 +0800 Subject: [PATCH 564/818] APL --- ...ltiple Markdown Files into HTML or Other Formats in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md b/sources/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md index bbee3f9270..2fb398c106 100644 --- a/sources/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md +++ b/sources/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md @@ -2,7 +2,7 @@ [#]: via: (https://itsfoss.com/convert-markdown-files/) [#]: author: (Bill Dyer https://itsfoss.com/author/bill/) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (lxbwolf) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 20f852eb9e2dcd46fbf9ac8698b300d6ff8c5264 Mon Sep 17 00:00:00 2001 From: "Xiaobin.Liu" Date: Mon, 5 Apr 2021 17:02:51 +0800 Subject: [PATCH 565/818] TSL --- ...les into HTML or Other Formats in Linux.md | 160 ------------------ ...les into HTML or Other Formats in Linux.md | 160 ++++++++++++++++++ 2 files changed, 160 insertions(+), 160 deletions(-) delete mode 100644 sources/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md create mode 100644 translated/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md diff --git a/sources/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md b/sources/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md deleted file mode 100644 index 2fb398c106..0000000000 --- a/sources/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md +++ /dev/null @@ -1,160 +0,0 @@ -[#]: subject: (Converting Multiple Markdown Files into HTML or Other Formats in Linux) -[#]: via: (https://itsfoss.com/convert-markdown-files/) -[#]: author: (Bill Dyer https://itsfoss.com/author/bill/) -[#]: collector: (lujun9972) -[#]: translator: (lxbwolf) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Converting Multiple Markdown Files into HTML or Other Formats in Linux -====== - -Many times, when I use Markdown, I work on one file and when I’m done with it, I convert it to HTML or some other format. Occasionally, I have to create a few files. When I do work with more than one Markdown file, I usually wait until I have finished them before I convert them. - -I use pandoc to convert files, and it’s possible convert all the Markdown files in one shot. - -Markdown can convert its files to .html, but if there’s a chance that I will have to convert to other formats like epub, [pandoc][1] is the tool to use. I prefer to use the command line, so I will cover that first, but you can also do this in [VSCodium][2] without the command line. I’ll cover that too. - -### Converting multiple Markdown files to another format with Pandoc [command line method] - -To get started quickly, Ubuntu, and other Debian distros can type the following commands in the terminal: - -``` -sudo apt-get install pandoc -``` - -In this example, I have four Markdown files in a directory called md_test. - -``` -[email protected]:~/Documents/md_test$ ls -l *.md --rw-r--r-- 1 bdyer bdyer 3374 Apr 7 2020 file01.md --rw-r--r-- 1 bdyer bdyer 782 Apr 2 05:23 file02.md --rw-r--r-- 1 bdyer bdyer 9257 Apr 2 05:21 file03.md --rw-r--r-- 1 bdyer bdyer 9442 Apr 2 05:21 file04.md -[email protected]:~/Documents/md_test$ -``` - -There are no HTML files yet. Now I’ll use Pandoc to do its magic on the collection of files. To do this, I run a one-line command that: - - * calls pandoc - * reads the .md files and exports them as .html - - - -This is the command: - -``` -for i in *.md ; do echo "$i" && pandoc -s $i -o $i.html ; done -``` - -If you are not aware already, `;` is used for [running multiple commands at once in Linux][3]. - -Here’s what the display looks like once I have executed the command: - -``` -[email protected]:~/Documents/md_test$ for i in *.md ; do echo "$i" && pandoc -s $i -o $i.html ; done -file01.md -file02.md -file03.md -file04.md -[email protected]:~/Documents/md_test$ -``` - -Let me use the `ls` command once more to see if HTML files were created: - -``` -[email protected]:~/Documents/md_test$ ls -l *.html --rw-r--r-- 1 bdyer bdyer 4291 Apr 2 06:08 file01.md.html --rw-r--r-- 1 bdyer bdyer 1781 Apr 2 06:08 file02.md.html --rw-r--r-- 1 bdyer bdyer 10272 Apr 2 06:08 file03.md.html --rw-r--r-- 1 bdyer bdyer 10502 Apr 2 06:08 file04.md.html -[email protected]:~/Documents/md_test$ -``` - -The conversion was a success, and you have four HTML files ready to go on the Web server. - -Pandoc is quite versatile and you can convert the markdown files to some other supported format by specifying the extension of the output files. You can understand why it is considered among the [best open source tools for writers][4]. - -**Recommended Read:** - -![][5] - -#### [11 Best Markdown Editors for Linux][6] - -A list of best Markdown Editors for Linux distributions that not only look good but are also feature rich. - -### Converting Markdown files to HTML using VSCodium [GUI method] - -Like I’ve said earlier, I normally use the command line, but I don’t always use it for batch conversions, and you don’t have to either. VSCode or [VSCodium][7] can do the job. You just need to add one extension, called: _Markdown-All-in-One_ which will allow you to convert more than one Markdown file in one run. - -There are two ways to install the extension: - - * VSCodium’s terminal - * VSCodium’s plug-in manager - - - -To install the extension through VSCodium’s terminal: - - 1. Click on `Terminal` on the menu bar. The terminal panel will open - 2. Type, or [copy-and-paste, the following command in the terminal][8]: - - - -``` -codium --install-extension yzhang.markdown-all-in-one -``` - -**Note**: If you’re using VSCode instead of VSCodium, replace the word, `codium`, in the above command, with `code` - -![][9] - -The second way to install is through VSCodium’s plug-in, or extension, manager: - - 1. Click on the blocks on the left side of the VSCodium window. A list of extensions will appear. At the top of the list, there will be a search bar. - 2. In the search bar, type: `Markdown All in One`. The extension will be listed at the top of the list. Click on the `Install` button to install it. If it is already installed, a gear icon will appear in place of the install button. - - - -![][10] - -Once the extension is installed, you can open the folder that contains the Markdown files you want to convert. - -Click on the paper icon located on the left side of the VSCodium window. You’ll be given the opportunity to choose your folder. Once a folder is open, you’ll need to open at least one file. You can open as many files as you want, but one is the minimum. - -Once a file is open, bring up the Command Palette by pressing `CTRL+SHIFT+P`. Then, start typing `Markdown`in the search bar that will appear. As you do this, a list of Markdown related commands will appear. One of these will be `Markdown All in One: Print documents to HTML` command. Click on that one. - -![][11] - -You’ll be asked to choose a folder containing the files. This is so an output directory (called `out`) can be made and this is where the HTML files will go. The image below shows that the HTML was made after exporting the Markdown documents. From here, you can open, view, and edit the HTML as you wish. - -![][12] - -By waiting to convert your Markdown files, you can concentrate more on writing. Conversion to HTML can come when you’re ready – and you have two ways to get that done. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/convert-markdown-files/ - -作者:[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://pandoc.org/ -[2]: https://vscodium.com/ -[3]: https://itsfoss.com/run-multiple-commands-linux/ -[4]: https://itsfoss.com/open-source-tools-writers/ -[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2016/10/Best-Markdown-Editors-for-Linux.jpg?fit=800%2C450&ssl=1 -[6]: https://itsfoss.com/best-markdown-editors-linux/ -[7]: https://itsfoss.com/vscodium/ -[8]: https://itsfoss.com/copy-paste-linux-terminal/ -[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/vscodium_terminal.jpg?resize=800%2C564&ssl=1 -[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/vscodium_extension_select.jpg?resize=800%2C564&ssl=1 -[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/vscodium_markdown_function_options.jpg?resize=800%2C564&ssl=1 -[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/vscodium_html_filelist_shown.jpg?resize=800%2C564&ssl=1 diff --git a/translated/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md b/translated/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md new file mode 100644 index 0000000000..e9aee0c478 --- /dev/null +++ b/translated/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md @@ -0,0 +1,160 @@ +[#]: subject: "Converting Multiple Markdown Files into HTML or Other Formats in Linux" +[#]: via: "https://itsfoss.com/convert-markdown-files/" +[#]: author: "Bill Dyer https://itsfoss.com/author/bill/" +[#]: collector: "lujun9972" +[#]: translator: "lxbwolf" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +在 Linux 中把多个 Markdown 文件转换成 HTML 或其他格式 +====== + +很多时候我与 Markdown 打交道的方式是,先写完一个文件,然后把它转换成 HTML 或其他格式。也有些时候,需要创建一些新的文件。当我要写多个 Markdown 文件时,通常要把他们全部写完之后才转换它们。 + +我用 pandoc 来转换文件,它可以一次性地转换所有 Markdown 文件。 + +Markdown 格式的文件可以转换成 .html 文件,有时候我需要把它转换成其他格式,如 epub,这个时候 [pandoc][1] 就派上了用场。我更喜欢用命令行,因此本文我会首先介绍它,然而你还可以使用 [VSCodium][2] 在非命令行下完成转换。后面我也会介绍它。 + +### 使用 pandoc 把多个 Markdown 文件转换成其他格式(命令行方式) + +你可以在 Ubuntu 及其他 Debian 系发行版本终端输入下面的命令来快速开始: + +``` +sudo apt-get install pandoc +``` + +本例中,在名为 md_test 目录下我有四个 Markdown 文件需要转换。 + +``` +[email protected]:~/Documents/md_test$ ls -l *.md +-rw-r--r-- 1 bdyer bdyer 3374 Apr 7 2020 file01.md +-rw-r--r-- 1 bdyer bdyer 782 Apr 2 05:23 file02.md +-rw-r--r-- 1 bdyer bdyer 9257 Apr 2 05:21 file03.md +-rw-r--r-- 1 bdyer bdyer 9442 Apr 2 05:21 file04.md +[email protected]:~/Documents/md_test$ +``` + +现在还没有 HTML 文件。现在我要对这些文件使用 pandoc。我会运行一行命令来实现: + + * 调用 pandoc + * 读取 .md 文件并导出为 .html + + + +下面是我要运行的命令: + +``` +for i in *.md ; do echo "$i" && pandoc -s $i -o $i.html ; done +``` + +如果你不太理解上面的命令中的 `;`,可以参考[在 Linux 中一次执行多个命令][3]。 + +我执行命令后,运行结果如下: + +``` +[email protected]:~/Documents/md_test$ for i in *.md ; do echo "$i" && pandoc -s $i -o $i.html ; done +file01.md +file02.md +file03.md +file04.md +[email protected]:~/Documents/md_test$ +``` + +让我再使用一次 `ls` 命令来看看是否已经生成了 HTML 文件: + +``` +[email protected]:~/Documents/md_test$ ls -l *.html +-rw-r--r-- 1 bdyer bdyer 4291 Apr 2 06:08 file01.md.html +-rw-r--r-- 1 bdyer bdyer 1781 Apr 2 06:08 file02.md.html +-rw-r--r-- 1 bdyer bdyer 10272 Apr 2 06:08 file03.md.html +-rw-r--r-- 1 bdyer bdyer 10502 Apr 2 06:08 file04.md.html +[email protected]:~/Documents/md_test$ +``` + +转换很成功,现在你已经有了四个 HTML 文件,它们可以用在 Web 服务器上。 + +pandoc 功能相当多,你可以通过指定输出文件的扩展名来把 markdown 文件转换成其他支持的格式。不难理解它为什么会被认为是[最好的写作开源工具][4]。 + +**推荐阅读:** + +![][5] + +#### [Linux 下 11 个最好的 Markdown 编辑器][6] + +列出了 Linux 不同发行版本下好看且功能多样的最好的 Markdown 编辑器。 + +### 使用 VSCodium 把 Markdown 文件转换成 HTML(GUI 方式) + +就像我们前面说的那样,我通常使用命令行,但是对于批量转换,我不会使用命令行,你也不必。VSCode 或 [VSCodium][7] 可以完成批量操作。你只需要安装一个 _Markdown-All-in-One_ 扩展,就可以在一次运行中转换多个 Markdown 文件。 + +有两种方式安装这个扩展: + + * VSCodium 的终端 + * VSCodium 的插件管理器 + + + +通过 VSCodium 的终端安装该扩展: + + 1. 点击菜单栏的 `终端`。会打开终端面板 + 2. 输入,或[复制下面的命令并粘贴到终端][8]: + + + +``` +codium --install-extension yzhang.markdown-all-in-one +``` + +**注意**:如果你使用的 VSCode 而不是 VSCodium,那么请把上面命令中的 `codium` 替换为 `code` + +![][9] + +第二种安装方式是通过 VSCodium 的插件/扩展管理器: + + 1. 点击 VSCodium 窗口左侧的块区域。会出现一个扩展列表,列表最上面有一个搜索框。 + 2. 在搜索框中输入 `Markdown All in One`。在列表最上面会出现该扩展。点击 `安装` 按钮来安装它。如果你已经安装过,在安装按钮的位置会出现一个齿轮图标。 + + + +![][10] + +安装完成后,你可以打开含有需要转换的 Markdown 文件的文件夹。 + +点击 VSCodium 窗口左侧的纸张图标。你可以选择文件夹。打开文件夹后,你需要打开至少一个文件。你也可以打开多个文件,但是最少打开一个。 + +当打开文件后,按下 `CTRL+SHIFT+P` 唤起命令面板。然后,在出现的搜索框中输入 `Markdown`。当你输入时,会出现一列 Markdown 相关的命令。其中有一个是 `Markdown All in One: Print documents to HTML` 命令。点击它: + +![][11] + +你需要选择一个文件夹来存放这些文件。它会自动创建一个 `out` 目录,转换后的 HTML 文件会存放在 `out` 目录下。从下面的图中可以看到,Markdown 文档被转换成了 HTML 文件。在这里,你可以打开、查看、编辑这些 HTML 文件。 + +![][12] + +在等待转换 Markdown 文件时,你可以更多地集中精力在写作上。当你准备好时,你就可以把它们转换成 HTML —— 你可以通过两种方式转换它们。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/convert-markdown-files/ + +作者:[Bill Dyer][a] +选题:[lujun9972][b] +译者:[lxbwolf](https://github.com/lxbwolf) +校对:[校对者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://pandoc.org/ +[2]: https://vscodium.com/ +[3]: https://itsfoss.com/run-multiple-commands-linux/ +[4]: https://itsfoss.com/open-source-tools-writers/ +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2016/10/Best-Markdown-Editors-for-Linux.jpg?fit=800%2C450&ssl=1 +[6]: https://itsfoss.com/best-markdown-editors-linux/ +[7]: https://itsfoss.com/vscodium/ +[8]: https://itsfoss.com/copy-paste-linux-terminal/ +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/vscodium_terminal.jpg?resize=800%2C564&ssl=1 +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/vscodium_extension_select.jpg?resize=800%2C564&ssl=1 +[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/vscodium_markdown_function_options.jpg?resize=800%2C564&ssl=1 +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/vscodium_html_filelist_shown.jpg?resize=800%2C564&ssl=1 From f6c472dd3f5b217acec763d6748c0973c3f29ff4 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 5 Apr 2021 21:37:01 +0800 Subject: [PATCH 566/818] APL --- sources/tech/20210225 How to use the Linux anacron command.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210225 How to use the Linux anacron command.md b/sources/tech/20210225 How to use the Linux anacron command.md index ee3e849111..610254e799 100644 --- a/sources/tech/20210225 How to use the Linux anacron command.md +++ b/sources/tech/20210225 How to use the Linux anacron command.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/2/linux-automation) [#]: author: (Seth Kenlon https://opensource.com/users/seth) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 052bce07e62650c9a6533f2d953b06df0f485413 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 5 Apr 2021 22:43:30 +0800 Subject: [PATCH 567/818] TSL --- ...25 How to use the Linux anacron command.md | 170 ------------------ ...25 How to use the Linux anacron command.md | 160 +++++++++++++++++ 2 files changed, 160 insertions(+), 170 deletions(-) delete mode 100644 sources/tech/20210225 How to use the Linux anacron command.md create mode 100644 translated/tech/20210225 How to use the Linux anacron command.md diff --git a/sources/tech/20210225 How to use the Linux anacron command.md b/sources/tech/20210225 How to use the Linux anacron command.md deleted file mode 100644 index 610254e799..0000000000 --- a/sources/tech/20210225 How to use the Linux anacron command.md +++ /dev/null @@ -1,170 +0,0 @@ -[#]: subject: (How to use the Linux anacron command) -[#]: via: (https://opensource.com/article/21/2/linux-automation) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -How to use the Linux anacron command -====== -Instead of manually performing repetitive tasks, let Linux do them for -you. -![Command line prompt][1] - -In 2021, there are more reasons why people love Linux than ever before. In this series, I'll share 21 different reasons to use Linux. Automation is one of the best reasons to use Linux. - -One of my favorite things about Linux is its willingness to do work for me. Instead of performing repetitive tasks that eat up my time, or are prone to error, or that I'm likely to forget, I schedule Linux to do them for me. - -### Preparing for automation - -The term "automation" can be as intimidating as it is appealing. I find it helps to approach it modularly. - -#### 1\. What do you want to make happen? - -First, know what outcome you want to produce. Are you watermarking images? Removing files from a cluttered directory? Performing a backup of important data? Define the task clearly for yourself so that you know what to aim for. If there's any task you find yourself doing every day, much less more than once a day, then it could be a candidate for automation. - -#### 2\. Learn the applications you need - -Break down big tasks into small components and learn how to produce each result manually but in a repeatable and predictable way. Much of what can be done on Linux can be scripted, but it's important to recognize your current limitations. There's a world of difference between learning how to automate resizing several images so that they can be emailed conveniently vs. using machine learning to generate elaborate artwork for your weekly newsletter. One of these things you can learn in an afternoon and the other could take years. However, we all have to start somewhere, so just start small and always be on the lookout for ways to improve. - -#### 3\. Automate it - -Use an automation tool on Linux to make it happen on a regular basis. This is the step this article covers! - -To automate something, you need a script that automates a task. When testing, it's best to keep things simple, so the task this article automates is the creation of a file called `hello` in the `/tmp` directory: - - -``` -#!/bin/sh - -touch /tmp/hello -``` - -Copy and paste that simple script into a text file and name it `example`. - -### Cron - -The built-in automation solution that every Linux install comes with is the cron system. Linux users tend to refer to cron generically as the method you use to schedule a task (usually called a "cron job"), but there are multiple applications that provide cron's functionality. The most versatile is [cronie][2]; its advantage is that it does _not_ assume that your computer is always on, the way historical cron applications designed for system administrators do. - -Verify which cron system your Linux distribution provides. If it's anything other than cronie, you can probably install cronie from your distro's software repository. If your distribution doesn't have a package for cronie, you can use the old `anacron` package instead. The `anacron` command is included with cronie, so regardless of how you acquire it, you want to ensure that you have the `anacron` command available on your system before continuing. Anacron may require administrative root privileges, depending on your setup. - - -``` -$ which anacron -/usr/sbin/anacron -``` - -Anacron's job is to ensure that your automation jobs are executed on a regular basis. To do this, anacron checks to find out when the last time a job ran and then checks how often you have told it to run jobs. - -Suppose you set anacron to run a script once every five days. Every time you turn your computer on or wake it from sleep, anacron scans its logs to determine whether it needs to run the job. If a job ran five or more days ago, then anacron runs the job. - -### Cron jobs - -Many Linux systems come bundled with a few maintenance jobs for cron to perform. I like to keep my jobs separate from the system jobs, so I create a directory in my home directory. Specifically, there's a hidden folder called `~/.local` ("local" in the sense that it's customized for your user account rather than for your "global" computer system), so I create the subdirectory `etc/cron.daily` to mirror cron's usual home on my system. You must also create a spool directory to keep track of the last time jobs were run. - - -``` -`$ mkdir -p ~/.local/etc/cron.daily ~/.var/spool/anacron` -``` - -You can place any script you want to run regularly into the `~/.local/etc/cron.daily` directory. Copy the `example` script into the directory now, and [mark it executable using the chmod command][3]. - - -``` -$ cp example ~/.local/etc/cron.daily -# chmod +x ~/.local/etc/cron.daily/example -``` - -Next, set up anacron to run whatever scripts are located in the `~/.local/etc/cron.daily` directory. - -### Anacron - -By default, much of the cron system is considered the systems administrator's domain because it's often used for important low-level tasks, like rotating log files and updating certificates. The configuration demonstrated in this article is designed for a regular user setting up personal automation tasks. - -To configure anacron to run your cron jobs, create a configuration file at `/.local/etc/anacrontab`: - - -``` -SHELL=/bin/sh -PATH=/sbin:/bin:/usr/sbin:/usr/bin -1  0  cron.mine    run-parts /home/tux/.local/etc/cron.daily/ -``` - -This file tells anacron to run all executable scripts (`run-parts`) found in `~/.local/etc/cron.daily` every one day (that is, daily), with a zero-minute delay. Sometimes, a few minutes' delay is used so that your computer isn't hit with all the possible tasks right after you log in. These settings are suitable for testing, though. - -The `cron.mine` value is an arbitrary name for the process. I call it `cron.mine` but you could call it `cron.personal` or `penguin` or anything you want. - -Verify your `anacrontab` file's syntax: - - -``` -$ anacron -T -t ~/.local/etc/anacrontab \ --S /home/tux/.var/spool/anacron -``` - -Silence means success. - -### Adding anacron to .profile - -Finally, you must ensure that anacron runs with your local configuration. Because you're running anacron as a regular user and not as the root user, you must direct it to your local configurations —the `anacrontab` file telling anacron what to do, and the spool directory helping anacron keep track of how many days it's been since each job was last executed: - - -``` -anacron -fn -t /home/tux/.local/etc/anacrontab \ --S /home/tux/.var/spool/anacron -``` - -The `-fn` options tell anacron to _ignore_ timestamps, meaning that you're forcing it to run your cron job no matter what. This is exclusively for testing purposes. - -### Testing your cron job - -Now that everything's set up, you can test the job. You can technically test this without rebooting, but it makes the most sense to reboot because that's what this is designed to handle: interrupted and irregular login sessions. Take a moment to reboot your computer, log in, and then look for the test file: - - -``` -$ ls /tmp/hello -/tmp/hello -``` - -Assuming the file exists, your example script has executed successfully. You can now remove the test options from `~/.profile`, leaving this as your final configuration: - - -``` -anacron -t /home/tux/.local/etc/anacrontab \ --S /home/tux/.var/spool/anacron -``` - -### Using anacron - -You have your personal automation infrastructure configured, so you can place any script you want your computer to manage for you into the `~/.local/etc/cron.daily` directory and it will run as scheduled. - -It's up to you how often you want jobs to run. Your example script is executed once a day. Obviously, that depends on whether your computer is powered on and awake on any given day. If you use your computer on Friday but set it aside for the weekend, the script won't run on Saturday and Sunday. However, on Monday the script will execute because anacron will know that at least one day has passed. You can add weekly, fortnightly, or even monthly directories to `~/.local/etc` to schedule a wide variety of intervals. - -To add a new interval: - - 1. Add a directory to `~/.local/etc` (for instance, `cron.weekly`). - 2. Add a line to `~/.local/etc/anacrontab` to run scripts in the new directory. For a weekly interval, the configuration would be: [code]`7 0 cron.mine run-parts /home/tux/.local/etc/cron.weekly/`[/code] (with the `0` value optionally being some number of minutes to politely delay the start of the script). - 3. Place your scripts in the `cron.weekly` directory. - - - -Welcome to the automated lifestyle. It won't feel like it, but you're about to become a lot more productive. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/linux-automation - -作者:[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/command_line_prompt.png?itok=wbGiJ_yg (Command line prompt) -[2]: https://github.com/cronie-crond/cronie -[3]: https://opensource.com/article/19/8/linux-chmod-command diff --git a/translated/tech/20210225 How to use the Linux anacron command.md b/translated/tech/20210225 How to use the Linux anacron command.md new file mode 100644 index 0000000000..32b91271e2 --- /dev/null +++ b/translated/tech/20210225 How to use the Linux anacron command.md @@ -0,0 +1,160 @@ +[#]: subject: (How to use the Linux anacron command) +[#]: via: (https://opensource.com/article/21/2/linux-automation) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +如何使用 Linux anacron 命令 +====== + +> 与其手动执行重复性的任务,不如让 Linux 为你做。 + +![命令行提示][1] + +在 2021 年,人们有更多的理由喜欢 Linux。在这个系列中,我将分享使用 Linux 的 21 个不同理由。自动化是使用 Linux 的最佳理由之一。 + +我最喜欢 Linux 的一个原因是它愿意为我做工作。我不需要执行重复性的任务,这些任务会占用我的时间,或者容易出错,或者我可能会忘记,我安排 Linux 为我做这些工作。 + +### 为自动化做准备 + +“自动化”这个词既让人望而生畏,又让人心动。我发现用模块化的方式来处理它是有帮助的。 + +#### 1、你想实现什么? + +首先,要知道你想产生什么结果。你是要给图片加水印吗?从杂乱的目录中删除文件?执行重要数据的备份?为自己明确定义任务,这样你就知道自己的目标是什么。如果有什么任务你发现自己每天都在做,甚至一天一次以上,那么它可能是自动化的候选者。 + +#### 2、学习你需要的应用 + +将大的任务分解成小的组件,并学习如何手动但以可重复和可预测的方式产生每个结果。在 Linux 上可以做的很多事情都可以用脚本来完成,但重要的是要认识到你当前的局限性。学习如何自动调整几张图片的大小,以便可以方便地通过电子邮件发送,与使用机器学习为你的每周通讯生成精心制作的艺术品之间有天壤之别。其中一件事你可以在一个下午学会,而另一件事可能要花上几年时间。然而,我们都必须从某个地方开始,所以只要从小做起,并时刻注意改进的方法。 + +#### 3、自动化 + +在 Linux 上使用一个自动化工具来定期实现它。这就是本文介绍的步骤! + +要想自动化一些东西,你需要一个脚本来自动化一个任务。在测试时,最好保持简单,所以本文自动化的任务是在 `/tmp` 目录下创建一个名为 `hello` 的文件。 + +``` +#!/bin/sh + +touch /tmp/hello +``` + +将这个简单的脚本复制并粘贴到一个文本文件中,并将其命名为 `example`。 + +### Cron + +每个 Linux 安装都会有的内置自动化解决方案就是 cron 系统。Linux 用户往往把 cron 笼统地称为你用来安排任务的方法(通常称为 “cron 作业”),但有多个应用程序可以提供 cron 的功能。最通用的是 [cronie][2];它的优点是,它不会像历史上为系统管理员设计的 cron 应用程序那样,假设你的计算机总是开着。 + +验证你的 Linux 发行版提供的是哪个 cron 系统。如果不是 cronie,你可以从发行版的软件仓库中安装 cronie。如果你的发行版没有 cronie 的软件包,你可以使用旧的 anacron 软件包来代替。`anacron` 命令是包含在 cronie 中的,所以不管你是如何获得它的,你都要确保在你的系统上有 `anacron` 命令,然后再继续。anacron 可能需要管理员 root 权限,这取决于你的设置。 + +``` +$ which anacron +/usr/sbin/anacron +``` + +anacron 的工作是确保你的自动化作业定期执行。为了做到这一点,anacron 会检查找出最后一次运行作业的时间,然后检查你告诉它运行作业的频率。 + +假设你将 anacron 设置为每五天运行一次脚本。每次你打开电脑或从睡眠中唤醒电脑时,anacron都会扫描其日志以确定是否需要运行作业。如果一个作业在五天或更久之前运行,那么 anacron 就会运行该作业。 + +### Cron 作业 + +许多 Linux 系统都捆绑了一些维护工作,让 cron 来执行。我喜欢把我的工作与系统工作分开,所以我在我的主目录中创建了一个目录。具体来说,有一个叫做 `~/.local` 的隐藏文件夹(“local” 的意思是它是为你的用户账户定制的,而不是为你的“全局”计算机系统定制的),所以我创建了子目录 `etc/cron.daily` 来镜像 cron 在我的系统上通常的家目录。你还必须创建一个 spool 目录来跟踪上次运行作业的时间。 + +``` +$ mkdir -p ~/.local/etc/cron.daily ~/.var/spool/anacron +``` + +你可以把任何你想定期运行的脚本放到 `~/.local/etc/cron.daily` 目录中。现在把 `example` 脚本复制到目录中,然后 [用 chmod 命令使其可执行][3]。 + +``` +$ cp example ~/.local/etc/cron.daily +# chmod +x ~/.local/etc/cron.daily/example +``` + +接下来,设置 anacron 来运行位于 `~/.local/etc/cron.daily` 目录下的任何脚本。 + +### anacron + +默认情况下,cron 系统的大部分内容都被认为是系统管理员的领域,因为它通常用于重要的低层任务,如轮换日志文件和更新证书。本文演示的配置是为普通用户设置个人自动化任务而设计的。 + +要配置 anacron 来运行你的 cron 作业,请在 `/.local/etc/anacrontab` 创建一个配置文件: + +``` +SHELL=/bin/sh +PATH=/sbin:/bin:/usr/sbin:/usr/bin +1  0  cron.mine    run-parts /home/tux/.local/etc/cron.daily/ +``` + +这个文件告诉 anacron 每到新的一天(也就是是每日),延迟 0 分钟,就运行(`run-parts`)所有在 `~/.local/etc/cron.daily` 中找到的可执行脚本。有时,会使用几分钟的延迟,这样你的计算机就不会在你登录后就被所有可能的任务冲击。不过这些设置适合测试。 + +`cron.mine` 值是进程的一个任意名称。我称它为 `cron.mine`,但你也可以称它为 `cron.personal` 或 `penguin` 或任何你想要的名字。 + +验证你的 `anacrontab` 文件的语法: + +``` +$ anacron -T -t ~/.local/etc/anacrontab \ +-S /home/tux/.var/spool/anacron +``` + +沉默意味着成功。 + +### 在 .profile 中添加 anacron + +最后,你必须确保 anacron 以你的本地配置运行。因为你是以普通用户而不是 root 用户的身份运行 anacron,所以你必须将它引导到你的本地配置:告诉 anacron 要做什么的 `anacrontab` 文件,以及帮助 anacron 跟踪每一个作业最后一次执行是多少天的 spool 目录: + +``` +anacron -fn -t /home/tux/.local/etc/anacrontab \ + -S /home/tux/.var/spool/anacron +``` + +`-fn` 选项告诉 anacron *忽略* 时间戳,这意味着你强迫它无论如何都要运行你的 cron 工作。这完全是为了测试的目的。 + +### 测试你的 cron 作业 + +现在一切都设置好了,你可以测试作业了。从技术上讲,你可以在不重启的情况下进行测试,但重启是最有意义的,因为这就是设计用来处理:中断和不规则的登录会话。花点时间重启电脑、登录,然后寻找测试文件: + +``` +$ ls /tmp/hello +/tmp/hello +``` + +假设文件存在,那么你的示例脚本已经成功执行。现在你可以从 `~/.profile` 中删除测试选项,留下这个作为你的最终配置。 + +``` +anacron -t /home/tux/.local/etc/anacrontab \ + -S /home/tux/.var/spool/anacron +``` + +### 使用 anacron + +你已经配置好了你的个人自动化基础设施,所以你可以把任何你想让你的计算机替你管理的脚本放到 `~/.local/etc/cron.daily` 目录下,它就会按计划运行。 + +这取决于你希望作业运行的频率。你的示例脚本是每天执行一次。很明显,这取决于你的计算机在任何一天是否开机和醒着。如果你在周五使用电脑,但把它设置在周末,脚本就不会在周六和周日运行。然而,在周一,脚本会执行,因为 anacron 会知道至少有一天已经过去了。你可以在 `~/.local/etc` 中添加每周、每两周、甚至每月的目录,以安排各种各样的间隔。 + +要添加一个新的时间间隔: + + 1. 在 `~/.local/etc` 中添加一个目录(例如 `cron.weekly`)。 + 2. 在 `~/.local/etc/anacrontab` 中添加一行,以便在新目录下运行脚本。对于每周一次的间隔,其配置如下。`7 0 cron.mine run-parts /home/tux/.local/etc/cron.weekly/`(`0` 的值可以选择一些分钟数,以适当地延迟脚本的启动)。 + 3. 把你的脚本放在 `cron.weekly` 目录下。 + +欢迎来到自动化的生活方式。它不会让人感觉到,但你将会变得更有效率。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/linux-automation + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者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/command_line_prompt.png?itok=wbGiJ_yg (Command line prompt) +[2]: https://github.com/cronie-crond/cronie +[3]: https://opensource.com/article/19/8/linux-chmod-command From d1bac51792d70085105644ecc75963af8da988b8 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 6 Apr 2021 05:03:05 +0800 Subject: [PATCH 568/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210405=20?= =?UTF-8?q?7=20Git=20tips=20for=20managing=20your=20home=20directory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210405 7 Git tips for managing your home directory.md --- ...t tips for managing your home directory.md | 142 ++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 sources/tech/20210405 7 Git tips for managing your home directory.md diff --git a/sources/tech/20210405 7 Git tips for managing your home directory.md b/sources/tech/20210405 7 Git tips for managing your home directory.md new file mode 100644 index 0000000000..1239482260 --- /dev/null +++ b/sources/tech/20210405 7 Git tips for managing your home directory.md @@ -0,0 +1,142 @@ +[#]: subject: (7 Git tips for managing your home directory) +[#]: via: (https://opensource.com/article/21/4/git-home) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +7 Git tips for managing your home directory +====== +Here is how I set up Git to manage my home directory. +![Houses in a row][1] + +I have several computers. I've got a laptop at work, a workstation at home, a Raspberry Pi (or four), a [Pocket CHIP][2], a [Chromebook running various forms of Linux][3], and so on. I used to set up my user environment on each computer by more or less following the same steps, and I often told myself that I enjoyed that each one was slightly unique. For instance, I use [Bash aliases][4] more often at work than at home, and the helper scripts I use at home might not be useful at work. + +Over the years, my expectations across devices began to merge, and I'd forget that a feature I'd built up on my home machine wasn't ported over to my work machine, and so on. I needed a way to standardize my customized toolkit. The answer, to my surprise, was Git. + +Git is version-tracker software. It's famously used by the biggest and smallest open source projects and even by the largest proprietary software companies. But it was designed for source code—not a home directory filled with music and video files, games, photos, and so on. I'd heard of people managing their home directory with Git, but I assumed that it was a fringe experiment done by coders, not real-life users like me. + +Managing my home directory with Git has been an evolving process. I've learned and adapted along the way. Here are the things you might want to keep in mind should you decide to manage your home directory with Git. + +### 1\. Text and binary locations + +![home directory][5] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +When managed by Git, your home directory becomes something of a no-man 's-land for everything but configuration files. That means when you open your home directory, you should see nothing but a list of predictable directories. There shouldn't be any stray photos or LibreOffice documents, and no "I'll put this here for just a minute" files. + +The reason for this is simple: when you manage your home directory with Git, everything in your home directory that's _not_ being committed becomes noise. Every time you do a `git status`, you'll have to scroll past any file that Git isn't tracking, so it's vital that you keep those files in subdirectories (which you add to your `.gitignore` file). + +Many Linux distributions provide a set of default directories: + + * Documents + * Downloads + * Music + * Photos + * Templates + * Videos + + + +You can create more if you need them. For instance, I differentiate between the music I create (Music) and the music I purchase to listen to (Albums). Likewise, my Cinema directory contains movies by other people, while Videos contains video files I need for editing. In other words, my default directory structure has more granularity than the default set provided by most Linux distributions, but I think there's a benefit to that. Without a directory structure that works for you, you'll be more likely to just stash stuff in your home directory, for lack of a better place for it, so think ahead and plan out directories that work for you. You can always add more later, but it's best to start strong. + +### 2\. Setting up your very best .gitignore + +Once you've cleaned up your home directory, you can instantiate it as a Git repository as usual: + + +``` +$ cd +$ git init . +``` + +Your Git repository contains nothing yet, so everything in your home directory is untracked. Your first job is to sift through the list of untracked files and determine what you want to remain untracked. To see untracked files: + + +``` +$ git status +  .AndroidStudio3.2/ +  .FBReader/ +  .ICEauthority +  .Xauthority +  .Xdefaults +  .android/ +  .arduino15/ +  .ash_history +[...] +``` + +Depending on how long you've been using your home directory, this list may be long. The easy ones are the directories you decided on in the first step. By adding these to a hidden file called `.gitignore`, you tell Git to stop listing them as untracked files and never to track them: + + +``` +`$ \ls -lg | grep ^d | awk '{print $8}' >> ~/.gitignore` +``` + +With that done, go through the remaining untracked files shown by `git status` and determine whether any other files warrant exclusion. This process helped me discover several stale old configuration files and directories, which I ended up trashing altogether, but also some that were very specific to one computer. I was fairly strict here because many configuration files do better when they're auto-generated. For instance, I never commit my KDE configuration files because many contain information like recent documents and other elements that don't exist on another machine. + +I track my personalized configuration files, scripts and utilities, profile and Bash configs, and cheat sheets and other snippets of text that I refer to frequently. If the software is mostly responsible for maintaining a file, I ignore it. And when in doubt about a file, I ignore it. You can always un-ignore it later (by removing it from your `.gitignore` file). + +### 3\. Get to know your data + +I'm on KDE, so I use the open source scanner [Filelight][7] to get an overview of my data. Filelight gives you a chart that lets you see the size of each directory. You can navigate through each directory to see what's taking up all the space and then backtrack to investigate elsewhere. It's a fascinating view of your system, and it lets you see your files in a completely new light. + +![Filelight][8] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +Use Filelight or a similar utility to find unexpected caches of data you don't need to commit. For instance, the KDE file indexer (Baloo) generates quite a lot of data specific to its host that I definitely wouldn't want to transport to another computer. + +### 4\. Don't ignore your .gitignore file + +On some projects, I tell Git to ignore my `.gitignore` file because what I want to ignore is sometimes specific to my working directory, and I don't presume other developers on the same project need me to tell them what their `.gitignore` file ought to look like. Because my home directory is for my use only, I do _not_ ignore my home's `.gitignore` file. I commit it along with other important files, so it's inherited across all of my systems. And of course, all of my systems are identical from the home directory's viewpoint: they have the same set of default folders and many of the same hidden configuration files. + +### 5\. Don't fear the binary + +I put my system through weeks and weeks of rigorous testing, convinced that it was _never_ wise to commit binary files to Git. I tried GPG encrypted password files, I tried LibreOffice documents, JPEGs, PNGs, and more. I even had a script that unarchived LibreOffice files before adding them to Git, extracted the XML inside so I could commit just the XML, and then rebuilt the LibreOffice file so that I could work on it within LibreOffice. My theory was that committing XML would render a smaller Git repository than a ZIP file (which is all a LibreOffice document really is). + +To my great surprise, I found that committing a few binary files every now and then did not substantially increase the size of my Git repository. I've worked with Git long enough to know that if I were to commit gigabytes of binary data, my repository would suffer, but the occasional binary file isn't an emergency to avoid at all costs. + +Armed with this new confidence, I add font OTF and TTF files to my standard home repo, my `.face` file for GDM, and other incidental minor binary blobs. Don't overthink it, don't waste time trying to avoid it; just commit it. + +### 6\. Use a private repo + +Don't commit your home directory to a public Git repository, even if the host offers private accounts. If you're like me, you have SSH keys and GPG keychains and GPG-encrypted files that ought not end up on anybody's server but my own. + +I [run a local Git server][9] on a Raspberry Pi (it's easier than you think), so I can update any computer any time I'm home. I'm a remote worker, so that's usually good enough, but I can also reach the computer when traveling over my [VPN][10]. + +### 7\. Remember to push + +The thing about Git is that it only pushes changes to your server when you tell it to. If you're a longtime Git user, this process is probably natural to you. For new users who might be accustomed to the automatic synchronization in Nextcloud or Syncthing, this may take some getting used to. + +### Git at home + +Managing my common files with Git hasn't just made life more convenient across devices. Knowing that I have a full history for all my configurations and utility scripts encourages me to try out new ideas because it's always easy to roll back my changes if they turn out to be _bad_ ideas. Git has rescued me from an ill-advised umask setting in `.bashrc`, a poorly executed late-night addition to my package management script, and an it-seemed-like-a-cool-idea-at-the-time change of my [rxvt][11] color scheme—and probably a few other mistakes in my past. Try Git in your home because a home that commits together merges together. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/git-home + +作者:[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/house_home_colors_live_building.jpg?itok=HLpsIfIL (Houses in a row) +[2]: https://opensource.com/article/17/2/pocketchip-or-pi +[3]: https://opensource.com/article/21/2/chromebook-linux +[4]: https://opensource.com/article/17/5/introduction-alias-command-line-tool +[5]: https://opensource.com/sites/default/files/uploads/home-git.jpg (home directory) +[6]: https://creativecommons.org/licenses/by-sa/4.0/ +[7]: https://utils.kde.org/projects/filelight +[8]: https://opensource.com/sites/default/files/uploads/filelight.jpg (Filelight) +[9]: https://opensource.com/life/16/8/how-construct-your-own-git-server-part-6 +[10]: https://www.redhat.com/sysadmin/run-your-own-vpn-libreswan +[11]: https://opensource.com/article/19/10/why-use-rxvt-terminal From b0c4455aaa36e9c3f7158ec94f17ea39f5d19ae7 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 6 Apr 2021 05:03:26 +0800 Subject: [PATCH 569/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210405=20?= =?UTF-8?q?How=20different=20programming=20languages=20do=20the=20same=20t?= =?UTF-8?q?hing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210405 How different programming languages do the same thing.md --- ...programming languages do the same thing.md | 156 ++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 sources/tech/20210405 How different programming languages do the same thing.md diff --git a/sources/tech/20210405 How different programming languages do the same thing.md b/sources/tech/20210405 How different programming languages do the same thing.md new file mode 100644 index 0000000000..2220c2d410 --- /dev/null +++ b/sources/tech/20210405 How different programming languages do the same thing.md @@ -0,0 +1,156 @@ +[#]: subject: (How different programming languages do the same thing) +[#]: via: (https://opensource.com/article/21/4/compare-programming-languages) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +How different programming languages do the same thing +====== +Compare 13 different programming languages by writing a simple game. +![Developing code.][1] + +Whenever I start learning a new programming language, I focus on defining variables, writing a statement, and evaluating expressions. Once I have a general understanding of those concepts, I can usually figure out the rest on my own. Most programming languages have some similarities, so once you know one programming language, learning the next one is a matter of figuring out the unique details and recognizing the differences. + +To help me practice a new programming language, I like to write a few test programs. One sample program I often write is a simple "guess the number" game, where the computer picks a number between one and 100 and asks me to guess it. The program loops until I guess correctly. This is a very simple program, as you can see using pseudocode like this: + + 1. The computer picks a random number between 1 and 100 + 2. Loop until I guess the random number + 1. The computer reads my guess + 2. It tells me if my guess is too low or too high + + + +Recently, Opensource.com ran an article series that wrote this program in different languages. This was an interesting opportunity to compare how to do the same thing in each language. I also found that most programming languages do things similarly, so learning the next programming language is mostly about learning its differences. + +C is an early general-purpose programming language, created in 1972 at Bell Labs by Dennis Ritchie. C proved popular and quickly became a standard programming language on Unix systems. Because of its popularity, many other programming languages adopted a similar programming syntax. That's why learning C++, Rust, Java, Groovy, JavaScript, awk, or Lua is easier if you already know how to program in C. + +For example, look at how these different programming languages implement the major steps in the "guess the number" game. I'll skip some of the surrounding code, such as assigning temporary variables, to focus on how the basics are similar or different. + +### The computer picks a random number between one and 100 + +You can see a lot of similarities here. Most of the programming languages generate a random number with a function like `rand()` that you can put into a range on your own. Other languages use a special function where you can specify the range for the random value. + +C | Using the Linux `getrandom` system call: +`getrandom(&randval, sizeof(int), GRND_NONBLOCK); number = randval % maxval + 1;` + +Using the standard C library: +`number = rand() % 100 + 1;` +---|--- +C++ | `int number = rand() % 100+1;` +Rust | `let random = rng.gen_range(1..101);` +Java | `private static final int NUMBER = r.nextInt(100) + 1;` +Groovy | `int randomNumber = (new Random()).nextInt(100) + 1` +JavaScript | `const randomNumber = Math.floor(Math.random() * 100) + 1` +awk | `randomNumber = int(rand() * 100) + 1` +Lua | `number = math.random(1,100)` + +### Loop until I guess the random number + +Loops are usually done with a flow-control block such as `while` or `do-while`. The JavaScript implementation doesn't use a loop and instead updates the HTML page "live" until the user guesses the correct number. Awk supports loops, but it doesn't make sense to loop to read input because awk is based around data pipelines, so it reads input from a file instead of directly from the user.  + +C | `do { … } while (guess != number); ` +---|--- +C++ | `do { …  } while ( number != guess ); ` +Rust | `for line in std::io::stdin().lock().lines() { … break; } ` +Java | `while ( guess != NUMBER ) { … } ` +Groovy | `while ( … ) { … break; } ` +Lua | ` while ( player.guess ~= number ) do … end` + +### The computer reads my guess + +Different programming languages handle input differently. So there's some variation here. For example, JavaScript reads values directly from an HTML form, and awk reads data from its data pipeline. + +C | `scanf("%d", &guess); ` +---|--- +C++ | `cin >> guess; ` +Rust | `let parsed = line.ok().as_deref().map(str::parse::); if let Some(Ok(guess)) = parsed { … } ` +Java | `guess = player.nextInt(); ` +Groovy | `response = reader.readLine() int guess = response as Integer ` +JavaScript | `let myGuess = guess.value ` +awk | `guess = int($0) ` +Lua | `player.answer = io.read() player.guess = tonumber(player.answer) ` + +### Tell me if my guess is too low or too high + +Comparisons are fairly consistent across these C-like programming languages, usually through an `if` statement. There's some variation in how each programming language prints output, but the print statement remains recognizable across each sample. + +C | `    if (guess < number) {       puts("Too low");     }     else if (guess > number) {       puts("Too high");     } …   puts("That's right!");``  ` +---|--- +C++ | `  if ( guess > number) { cout << "Too high.\n" << endl; }   else if ( guess < number ) { cout << "Too low.\n" << endl; }   else {     cout << "That's right!\n" << endl;     exit(0);   }``  ` +Rust | `                _ if guess < random => println!("Too low"),                 _ if guess > random => println!("Too high"),                 _ => {                     println!("That's right");                     break;                 } ` +Java | `            if ( guess > NUMBER ) {                 System.out.println("Too high");             } else if ( guess < NUMBER ) {                 System.out.println("Too low");             } else {                 System.out.println("That's right!");                 System.exit(0);             } ` +Groovy | `                  if (guess < randomNumber)                       print 'too low, try again: '                   else if (guess > randomNumber)                       print 'too high, try again: '                   else {                       println "that's right"                       break                   } ` +JavaScript | `      if (myGuess === randomNumber) {         feedback.textContent = "You got it right!"       } else if (myGuess > randomNumber) {         feedback.textContent = "Your guess was " + myGuess + ". That's too high. Try Again!"       } else if (myGuess < randomNumber) {        feedback.textContent = "Your guess was " + myGuess + ". That's too low. Try Again!"      } ` +awk | `            if (guess < randomNumber) {                 printf "too low, try again:"             } else if (guess > randomNumber) {                 printf "too high, try again:"             } else {                 printf "that's right\n"                 exit             } ` +Lua | `  if ( player.guess > number ) then     print("Too high")   elseif ( player.guess < number) then     print("Too low")   else     print("That's right!")     os.exit()   end ` + +### What about non-C-based languages? + +Programming languages that are not based on C can be quite different and require learning specific syntax to do each step. Racket derives from Lisp and Scheme, so it uses Lisp's prefix notation and lots of parentheses. Python uses whitespace rather than brackets to indicate blocks like loops. Elixir is a functional programming language with its own syntax. Bash is based on the Bourne shell from Unix systems, which itself borrows from Algol68—and supports additional shorthand notation such as `&&` as a variation of "and." Fortran was created when code was entered using punched cards, so it relies on an 80-column layout where some columns are significant. + +As an example of how these other programming languages can differ, I'll compare just the "if" statement that sees if one value is less than or greater than another and prints an appropriate message to the user. + +Racket | `  (cond [(> number guess) (displayln "Too low") (inquire-user number)]         [(< number guess) (displayln "Too high") (inquire-user number)]         [else (displayln "Correct!")])) ` +---|--- +Python | `    if guess < random:         print("Too low")     elif guess > random:         print("Too high")     else:         print("That's right!") ` +Elixir | `    cond do       guess < num ->         IO.puts "Too low!"         guess_loop(num)       guess > num ->         IO.puts "Too high!"         guess_loop(num)       true ->         IO.puts "That's right!"     end ` +Bash | `        [ "0$guess" -lt $number ] && echo "Too low"         [ "0$guess" -gt $number ] && echo "Too high" ` +Fortran | `      IF (GUESS.LT.NUMBER) THEN          PRINT *, 'TOO LOW'       ELSE IF (GUESS.GT.NUMBER) THEN          PRINT *, 'TOO HIGH'       ENDIF ` + +### Read more + +This "guess the number" game is a great introductory program when learning a new programming language because it exercises several common programming concepts in a pretty straightforward way. By implementing this simple game in different programming languages, you can demonstrate some core concepts and compare each language's details. + +Learn how to write the "guess the number" game in C and C-like languages: + + * [C][2], by Jim Hall + * [C++][3], by Seth Kenlon + * [Rust][4], by Moshe Zadka + * [Java][5], by Seth Kenlon + * [Groovy][6], by Chris Hermansen + * [JavaScript][7], by Mandy Kendall + * [awk][8], by Chris Hermansen + * [Lua][9], by Seth Kenlon + + + +And in non-C-based languages: + + * [Racket][10], by Cristiano L. Fontana + * [Python][11], by Moshe Zadka + * [Elixir][12], by Moshe Zadka + * [Bash][13], by Jim Hall + * [Fortran][14], by Jim Hall + + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/compare-programming-languages + +作者:[Jim Hall][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/jim-hall +[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]: https://opensource.com/article/21/1/learn-c +[3]: https://opensource.com/article/20/12/learn-c-game +[4]: https://opensource.com/article/20/12/learn-rust +[5]: https://opensource.com/article/20/12/learn-java +[6]: https://opensource.com/article/20/12/groovy +[7]: https://opensource.com/article/21/1/learn-javascript +[8]: https://opensource.com/article/21/1/learn-awk +[9]: https://opensource.com/article/20/12/lua-guess-number-game +[10]: https://opensource.com/article/21/1/racket-guess-number +[11]: https://opensource.com/article/20/12/learn-python +[12]: https://opensource.com/article/20/12/elixir +[13]: https://opensource.com/article/20/12/learn-bash +[14]: https://opensource.com/article/21/1/fortran From f5afb29f0891a13569f56cc89608839e8cfb4804 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 6 Apr 2021 05:03:38 +0800 Subject: [PATCH 570/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210405=20?= =?UTF-8?q?What=20motivates=20open=20source=20software=20contributors=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210405 What motivates open source software contributors.md --- ...vates open source software contributors.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 sources/tech/20210405 What motivates open source software contributors.md diff --git a/sources/tech/20210405 What motivates open source software contributors.md b/sources/tech/20210405 What motivates open source software contributors.md new file mode 100644 index 0000000000..c8f8dd148c --- /dev/null +++ b/sources/tech/20210405 What motivates open source software contributors.md @@ -0,0 +1,93 @@ +[#]: subject: (What motivates open source software contributors?) +[#]: via: (https://opensource.com/article/21/4/motivates-open-source-contributors) +[#]: author: (Igor Steinmacher https://opensource.com/users/igorsteinmacher) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +What motivates open source software contributors? +====== +New study finds people's reasons for contributing have changed since the +early 2000s. +![Practicing empathy][1] + +The reasons people contribute to free and open source (FOSS) projects has been a topic of much interest. However, the research on this topic dates back 10 or more years, and much has changed in the world since then. This article shares seven insights from a recent research study that revisited old motivation studies and asked open source contributors what motivates them today. + +These insights can be used by open source community managers who want to grow a community, organizations that want to understand how community members behave, or anyone working with others in open source. Understanding what motivates today's contributors helps us make impactful decisions. + +### A brief history of open source motivation research + +We need to look into the origins of open source and the free software movement to understand why studying what motivates contributors is so fascinating. When the free software movement started, it was in defiance of corporations using copyright and license terms to restrict user and developer freedoms. The free software movement is a story of rebellion. It was difficult for many to understand how high-quality software emerged from a movement of people who "scratched their own itch" or "volunteered" their skills. At the core of the free software movement was a collaborative way for creating software that became interesting to companies as well. The emergence of open source was a philosophical shift to make this collaboration method available and acceptable to businesses. + +The state of the art of research into motivation in open source is a [publication from 2012][2] that summarizes research studies from more than a decade prior. Gordon Haff reviewed this topic in [_Why do we contribute to open source software?_][3] and Ruth Suehle in _[Drive and motivation: Daniel Pink webcast recap][4]_. + +Over the last 10 years, much has changed in open source. With corporations' increasing interest in open source and having paid employees working on open source projects, it was high time to revisit motivation in open source. + +### Contributors' changing motivations + +In our scientific study, _[The shifting sands of motivation: Revisiting what drives contributors in open source][5]_, we investigated why people join FOSS projects and why they continue contributing. One of our goals was to study how contributors' motivations have changed since the 2000s. A second goal was to take the research to the next level and investigate how people's motivations change as they continue contributing. The research is based on a questionnaire answered by almost 300 FOSS contributors in late 2020. + +### Seven key findings + +Some of the study's results include: + + 1. **Intrinsic motivations play a key role.** The large majority of people contribute to FOSS because of fun (91%), altruism (85%), and kinship (80%). Moreover, when analyzing differences in motivations to join and continue, the study found that ideology, own-use, or education-related programs can be an impetus to join FOSS, but individuals continue for intrinsic reasons (fun, altruism, reputation, and kinship). + + 2. **Reputation and career motivate more than payment**. Many contributors seek reputation (68%) and career (67%), while payment was referenced by less than 30% of the participants. Compared to earlier studies, reputation is now considered more important. + + 3. **Social aspects have gained considerable importance since the 2000s.** Enjoying helping others (89%) and kinship (80%) rose in the rankings compared to surveys from the early 2000s. + + 4. **Motivation changes as people gain tenure.** A clear outcome of the paper is that current contributors often have a different motivation from what led them to join. Of the 281 respondents, 155 (55%) did not report the same motivation for joining and continuing to contribute. + +The figure below shows individuals' shifts in motivation from when they joined to what leads them to keep contributing. The size of the boxes on the left represents the number of contributors with that motivation to start contributing to FOSS, and on the right, the motivation to continue contributing. The width of the connections is proportional to the number of contributors who shifted from one motivation to the other.  + +![Motivations for contributing to FOSS][6] + +(Source: [Gerosa, et al.][7]) + + 5. **Scratching one's own itch is a doorway.** Own-use ("scratch own itch") has decreased in importance since the early days. The contributors who joined FOSS for own-use-related reasons often shifted to altruism, learning, fun, and reciprocity. You can see this in the figure above. + + 6. **Experience and age explain different motivations**. Experienced developers have higher rates of reporting altruism (5.6x), pay (5.2x), and ideology (4.6x) than novices, who report career (10x), learning (5.5x), and fun (2.5x) as greater motivations to contribute. Looking at individual shifts in motivation, there was a considerable increase (120%) in altruism for experienced respondents and a slight decrease (-16%) for novices. A few young respondents joined FOSS because of career, but many of them shifted towards altruism (100% increase). + + 7. **Coders and non-coders report different motivations.** The odds of a coder reporting fun is 4x higher than non-coders, who are more likely (2.5x) to report ideology as a motivator. + + + + +### Motivating contributors based on their contributor journey + +Knowing how new and long-time contributors differ in motivation helps us discover how to support them better.  + +For example, to attract and retain new contributors, who might become the future workforce, projects could invest in promoting career, fun, kinship, and learning, which are particularly relevant for young contributors. + +Because over time altruism becomes more important to contributors, FOSS projects aiming to retain experienced contributors, who tend to be core members or maintainers, could invest in strategies and tools showing how their work benefits the community and society (altruism) and improve social interactions. + +Also in response to the increased rank of altruism, hosting platforms could offer social features to pair those needing help with those willing to help, highlight when a contributor helps someone, and make it easier to show appreciation to others (similar to stars given to projects). + +These are some of our ideas after reviewing the study's findings. We hope that sharing our insights helps others with different backgrounds and experiences come up with more ideas for using this data to motivate new and seasoned contributors. Please share your ideas in the comments below. + +The research paper's authors are Marco A. Gerosa (Northern Arizona University), Igor Wiese (Universidade Tecnologica Federal do Paraná), Bianca Trinkenreich (Northern Arizona University), Georg Link (Bitergia), Gregorio Robles (Universidad Rey Juan Carlos), Christoph Treude (University of Adelaide), Igor Steinmacher (Universidade Tecnologica Federal do Paraná), and Anita Sarma (Oregon State University). The full [study report][7] is available, as well as the [anonymized data and artifacts][8] related to the research. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/motivates-open-source-contributors + +作者:[Igor Steinmacher][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/igorsteinmacher +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/practicing-empathy.jpg?itok=-A7fj6NF (Practicing empathy) +[2]: https://www.semanticscholar.org/paper/Carrots-and-Rainbows%3A-Motivation-and-Social-in-Open-Krogh-Haefliger/52ec46a827ba5d6aeb38aaeb24b0780189c16856?p2df +[3]: https://opensource.com/article/19/11/why-contribute-open-source-software +[4]: https://opensource.com/business/11/6/today-drive-webcast-daniel-pink +[5]: https://arxiv.org/abs/2101.10291 +[6]: https://opensource.com/sites/default/files/pictures/sankey_motivations.png (Motivations for contributing to FOSS) +[7]: https://arxiv.org/pdf/2101.10291.pdf +[8]: https://zenodo.org/record/4453904#.YFtFRa9KhaR From 33a4c96768f0b5b5c0ef06162bb640b91ec74db4 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 6 Apr 2021 08:23:58 +0800 Subject: [PATCH 571/818] Rename sources/tech/20210405 What motivates open source software contributors.md to sources/talk/20210405 What motivates open source software contributors.md --- .../20210405 What motivates open source software contributors.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20210405 What motivates open source software contributors.md (100%) diff --git a/sources/tech/20210405 What motivates open source software contributors.md b/sources/talk/20210405 What motivates open source software contributors.md similarity index 100% rename from sources/tech/20210405 What motivates open source software contributors.md rename to sources/talk/20210405 What motivates open source software contributors.md From c93bfe30660c4790f9a723e17698f9de04c710ef Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 6 Apr 2021 08:42:17 +0800 Subject: [PATCH 572/818] PRF @wxy --- ...25 How to use the Linux anacron command.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/translated/tech/20210225 How to use the Linux anacron command.md b/translated/tech/20210225 How to use the Linux anacron command.md index 32b91271e2..524ee98eba 100644 --- a/translated/tech/20210225 How to use the Linux anacron command.md +++ b/translated/tech/20210225 How to use the Linux anacron command.md @@ -3,7 +3,7 @@ [#]: author: (Seth Kenlon https://opensource.com/users/seth) [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) @@ -12,11 +12,11 @@ > 与其手动执行重复性的任务,不如让 Linux 为你做。 -![命令行提示][1] +![](https://img.linux.net.cn/data/attachment/album/202104/06/084133bphrxxeolhoyqr0o.jpg) 在 2021 年,人们有更多的理由喜欢 Linux。在这个系列中,我将分享使用 Linux 的 21 个不同理由。自动化是使用 Linux 的最佳理由之一。 -我最喜欢 Linux 的一个原因是它愿意为我做工作。我不需要执行重复性的任务,这些任务会占用我的时间,或者容易出错,或者我可能会忘记,我安排 Linux 为我做这些工作。 +我最喜欢 Linux 的一个原因是它愿意为我做工作。我不想执行重复性的任务,这些任务会占用我的时间,或者容易出错,或者我可能会忘记,我安排 Linux 为我做这些工作。 ### 为自动化做准备 @@ -24,11 +24,11 @@ #### 1、你想实现什么? -首先,要知道你想产生什么结果。你是要给图片加水印吗?从杂乱的目录中删除文件?执行重要数据的备份?为自己明确定义任务,这样你就知道自己的目标是什么。如果有什么任务你发现自己每天都在做,甚至一天一次以上,那么它可能是自动化的候选者。 +首先,要知道你想产生什么结果。你是要给图片加水印吗?从杂乱的目录中删除文件?执行重要数据的备份?为自己明确定义任务,这样你就知道自己的目标是什么。如果有什么任务是你发现自己每天都在做的,甚至一天一次以上,那么它可能是自动化的候选者。 #### 2、学习你需要的应用 -将大的任务分解成小的组件,并学习如何手动但以可重复和可预测的方式产生每个结果。在 Linux 上可以做的很多事情都可以用脚本来完成,但重要的是要认识到你当前的局限性。学习如何自动调整几张图片的大小,以便可以方便地通过电子邮件发送,与使用机器学习为你的每周通讯生成精心制作的艺术品之间有天壤之别。其中一件事你可以在一个下午学会,而另一件事可能要花上几年时间。然而,我们都必须从某个地方开始,所以只要从小做起,并时刻注意改进的方法。 +将大的任务分解成小的组件,并学习如何手动但以可重复和可预测的方式产生每个结果。在 Linux 上可以做的很多事情都可以用脚本来完成,但重要的是要认识到你当前的局限性。学习如何自动调整几张图片的大小,以便可以方便地通过电子邮件发送,与使用机器学习为你的每周通讯生成精心制作的艺术品之间有天壤之别。有的事你可以在一个下午学会,而另一件事可能要花上几年时间。然而,我们都必须从某个地方开始,所以只要从小做起,并时刻注意改进的方法。 #### 3、自动化 @@ -46,7 +46,7 @@ touch /tmp/hello ### Cron -每个 Linux 安装都会有的内置自动化解决方案就是 cron 系统。Linux 用户往往把 cron 笼统地称为你用来安排任务的方法(通常称为 “cron 作业”),但有多个应用程序可以提供 cron 的功能。最通用的是 [cronie][2];它的优点是,它不会像历史上为系统管理员设计的 cron 应用程序那样,假设你的计算机总是开着。 +每个安装好的 Linux 系统都会有的内置自动化解决方案就是 cron 系统。Linux 用户往往把 cron 笼统地称为你用来安排任务的方法(通常称为 “cron 作业”),但有多个应用程序可以提供 cron 的功能。最通用的是 [cronie][2];它的优点是,它不会像历史上为系统管理员设计的 cron 应用程序那样,假设你的计算机总是开着。 验证你的 Linux 发行版提供的是哪个 cron 系统。如果不是 cronie,你可以从发行版的软件仓库中安装 cronie。如果你的发行版没有 cronie 的软件包,你可以使用旧的 anacron 软件包来代替。`anacron` 命令是包含在 cronie 中的,所以不管你是如何获得它的,你都要确保在你的系统上有 `anacron` 命令,然后再继续。anacron 可能需要管理员 root 权限,这取决于你的设置。 @@ -61,7 +61,7 @@ anacron 的工作是确保你的自动化作业定期执行。为了做到这一 ### Cron 作业 -许多 Linux 系统都捆绑了一些维护工作,让 cron 来执行。我喜欢把我的工作与系统工作分开,所以我在我的主目录中创建了一个目录。具体来说,有一个叫做 `~/.local` 的隐藏文件夹(“local” 的意思是它是为你的用户账户定制的,而不是为你的“全局”计算机系统定制的),所以我创建了子目录 `etc/cron.daily` 来镜像 cron 在我的系统上通常的家目录。你还必须创建一个 spool 目录来跟踪上次运行作业的时间。 +许多 Linux 系统都捆绑了一些维护工作,让 cron 来执行。我喜欢把我的工作与系统工作分开,所以我在我的主目录中创建了一个目录。具体来说,有一个叫做 `~/.local` 的隐藏文件夹(“local” 的意思是它是为你的用户账户定制的,而不是为你的“全局”计算机系统定制的),所以我创建了子目录 `etc/cron.daily` 来作为 cron 在我的系统上的家目录。你还必须创建一个 spool 目录来跟踪上次运行作业的时间。 ``` $ mkdir -p ~/.local/etc/cron.daily ~/.var/spool/anacron @@ -78,7 +78,7 @@ $ cp example ~/.local/etc/cron.daily ### anacron -默认情况下,cron 系统的大部分内容都被认为是系统管理员的领域,因为它通常用于重要的低层任务,如轮换日志文件和更新证书。本文演示的配置是为普通用户设置个人自动化任务而设计的。 +默认情况下,cron 系统的大部分内容都被认为是系统管理员的领域,因为它通常用于重要的底层任务,如轮换日志文件和更新证书。本文演示的配置是为普通用户设置个人自动化任务而设计的。 要配置 anacron 来运行你的 cron 作业,请在 `/.local/etc/anacrontab` 创建一个配置文件: @@ -88,7 +88,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin 1  0  cron.mine    run-parts /home/tux/.local/etc/cron.daily/ ``` -这个文件告诉 anacron 每到新的一天(也就是是每日),延迟 0 分钟,就运行(`run-parts`)所有在 `~/.local/etc/cron.daily` 中找到的可执行脚本。有时,会使用几分钟的延迟,这样你的计算机就不会在你登录后就被所有可能的任务冲击。不过这些设置适合测试。 +这个文件告诉 anacron 每到新的一天(也就是每日),延迟 0 分钟后,就运行(`run-parts`)所有在 `~/.local/etc/cron.daily` 中找到的可执行脚本。有时,会使用几分钟的延迟,这样你的计算机就不会在你登录后就被所有可能的任务冲击。不过这个设置适合测试。 `cron.mine` 值是进程的一个任意名称。我称它为 `cron.mine`,但你也可以称它为 `cron.personal` 或 `penguin` 或任何你想要的名字。 @@ -96,7 +96,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin ``` $ anacron -T -t ~/.local/etc/anacrontab \ --S /home/tux/.var/spool/anacron + -S /home/tux/.var/spool/anacron ``` 沉默意味着成功。 @@ -110,11 +110,11 @@ anacron -fn -t /home/tux/.local/etc/anacrontab \ -S /home/tux/.var/spool/anacron ``` -`-fn` 选项告诉 anacron *忽略* 时间戳,这意味着你强迫它无论如何都要运行你的 cron 工作。这完全是为了测试的目的。 +`-fn` 选项告诉 anacron *忽略* 时间戳,这意味着你强迫它无论如何都要运行你的 cron 作业。这完全是为了测试的目的。 ### 测试你的 cron 作业 -现在一切都设置好了,你可以测试作业了。从技术上讲,你可以在不重启的情况下进行测试,但重启是最有意义的,因为这就是设计用来处理:中断和不规则的登录会话。花点时间重启电脑、登录,然后寻找测试文件: +现在一切都设置好了,你可以测试作业了。从技术上讲,你可以在不重启的情况下进行测试,但重启是最有意义的,因为这就是设计用来处理中断和不规则的登录会话的。花点时间重启电脑、登录,然后寻找测试文件: ``` $ ls /tmp/hello @@ -132,7 +132,7 @@ anacron -t /home/tux/.local/etc/anacrontab \ 你已经配置好了你的个人自动化基础设施,所以你可以把任何你想让你的计算机替你管理的脚本放到 `~/.local/etc/cron.daily` 目录下,它就会按计划运行。 -这取决于你希望作业运行的频率。你的示例脚本是每天执行一次。很明显,这取决于你的计算机在任何一天是否开机和醒着。如果你在周五使用电脑,但把它设置在周末,脚本就不会在周六和周日运行。然而,在周一,脚本会执行,因为 anacron 会知道至少有一天已经过去了。你可以在 `~/.local/etc` 中添加每周、每两周、甚至每月的目录,以安排各种各样的间隔。 +这取决于你希望作业运行的频率。示例脚本是每天执行一次。很明显,这取决于你的计算机在任何一天是否开机和醒着。如果你在周五使用电脑,但把它设置在周末,脚本就不会在周六和周日运行。然而,在周一,脚本会执行,因为 anacron 会知道至少有一天已经过去了。你可以在 `~/.local/etc` 中添加每周、每两周、甚至每月的目录,以安排各种各样的间隔。 要添加一个新的时间间隔: @@ -149,7 +149,7 @@ via: https://opensource.com/article/21/2/linux-automation 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 2ca864dd4486a73a6f492f71f60b3a5488e0ab3f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 6 Apr 2021 08:42:54 +0800 Subject: [PATCH 573/818] PUB @wxy https://linux.cn/article-13270-1.html --- .../20210225 How to use the Linux anacron command.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210225 How to use the Linux anacron command.md (99%) diff --git a/translated/tech/20210225 How to use the Linux anacron command.md b/published/20210225 How to use the Linux anacron command.md similarity index 99% rename from translated/tech/20210225 How to use the Linux anacron command.md rename to published/20210225 How to use the Linux anacron command.md index 524ee98eba..ea7e31d4fe 100644 --- a/translated/tech/20210225 How to use the Linux anacron command.md +++ b/published/20210225 How to use the Linux anacron command.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13270-1.html) 如何使用 Linux anacron 命令 ====== From aae72bd28df14c4cd572b238990e2e2842962fb3 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 6 Apr 2021 08:48:29 +0800 Subject: [PATCH 574/818] translated --- ...rce tool to monitor variables in Python.md | 180 ------------------ ...rce tool to monitor variables in Python.md | 179 +++++++++++++++++ 2 files changed, 179 insertions(+), 180 deletions(-) delete mode 100644 sources/tech/20210331 Use this open source tool to monitor variables in Python.md create mode 100644 translated/tech/20210331 Use this open source tool to monitor variables in Python.md diff --git a/sources/tech/20210331 Use this open source tool to monitor variables in Python.md b/sources/tech/20210331 Use this open source tool to monitor variables in Python.md deleted file mode 100644 index 08eef2cbc6..0000000000 --- a/sources/tech/20210331 Use this open source tool to monitor variables in Python.md +++ /dev/null @@ -1,180 +0,0 @@ -[#]: subject: (Use this open source tool to monitor variables in Python) -[#]: via: (https://opensource.com/article/21/4/monitor-debug-python) -[#]: author: (Tian Gao https://opensource.com/users/gaogaotiantian) -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Use this open source tool to monitor variables in Python -====== -Watchpoints is a simple but powerful tool to help you with monitoring -variables while debugging Python. -![Looking back with binoculars][1] - -When debugging code, you're often faced with figuring out when a variable changes. Without any advanced tools, you have the option of using print statements to announce the variables when you expect them to change. However, this is a very ineffective way because the variables could change in many places, and constantly printing them to a terminal is noisy, while printing them to a log file becomes unwieldy. - -This is a common issue, but now there is a simple but powerful tool to help you with monitoring variables: [watchpoints][2]. - -The [watchpoint concept is common in C and C++ debuggers][3] to monitor memories, but there's a lack of equivalent tools in Python. `watchpoints` fills in the gap. - -### Installing - -To use it, you must first install it by using `pip`: - - -``` -`$ python3 -m pip install watchpoints` -``` - -### Using watchpoints in Python - -For any variable you'd like to monitor, use the **watch** function on it. - - -``` -from watchpoints import watch - -a = 0 -watch(a) -a = 1 -``` - -As the variable changes, information about its value is printed to **stdout**: - - -``` -====== Watchpoints Triggered ====== - -Call Stack (most recent call last): -  <module> (my_script.py:5): -> a = 1 -a: -0 --> -1 -``` - -The information includes: - - * The line where the variable was changed. - * The call stack. - * The previous/current value of the variable. - - - -It not only works with the variable itself, but it also works with object changes: - - -``` -from watchpoints import watch - -a = [] -watch(a) -a = {} # Trigger -a["a"] = 2 # Trigger -``` - -The callback is triggered when the variable **a** is reassigned, but also when the object assigned to a is changed. - -What makes it even more interesting is that the monitor is not limited by the scope. You can watch the variable/object anywhere you want, and the callback is triggered no matter what function the program is executing. - - -``` -from watchpoints import watch - -def func(var): -    var["a"] = 1 - -a = {} -watch(a) -func(a) -``` - -For example, this code prints: - - -``` -====== Watchpoints Triggered ====== - -Call Stack (most recent call last): - -  <module> (my_script.py:8): -> func(a) -  func (my_script.py:4): -> var["a"] = 1 -a: -{} --> -{'a': 1} -``` - -The **watch** function can monitor more than a variable. It can also monitor the attributes and an element of a dictionary or list. - - -``` -from watchpoints import watch - -class MyObj: -    def __init__(self): -        self.a = 0 - -obj = MyObj() -d = {"a": 0} -watch(obj.a, d["a"]) # Yes you can do this -obj.a = 1 # Trigger -d["a"] = 1 # Trigger -``` - -This could help you narrow down to some specific objects that you are interested in. - -If you are not happy about the format of the output, you can customize it. Just define your own callback function: - - -``` -watch(a, callback=my_callback) - -# Or set it globally - -watch.config(callback=my_callback) -``` - -You can even bring up **pdb** when the trigger is hit: - - -``` -`watch.config(pdb=True)` -``` - -This behaves similarly to **breakpoint()**, giving you a debugger-like experience. - -If you don’t want to import the function in every single file, you can make it global by using **install** function: - - -``` -`watch.install() # or watch.install("func_name") and use it as func_name()` -``` - -Personally, I think the coolest thing about watchpoints is its intuitive usage. Are you interested in some data? Just "watch" it, and you'll know when your variable changes. - -### Try watchpoints - -I developed and maintain `watchpoints` on [GitHub][2], and have released it under the licensed under Apache 2.0. Install it and use it, and of course contribution is always welcome. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/monitor-debug-python - -作者:[Tian Gao][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/gaogaotiantian -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/look-binoculars-sight-see-review.png?itok=NOw2cm39 (Looking back with binoculars) -[2]: https://github.com/gaogaotiantian/watchpoints -[3]: https://opensource.com/article/21/3/debug-code-gdb diff --git a/translated/tech/20210331 Use this open source tool to monitor variables in Python.md b/translated/tech/20210331 Use this open source tool to monitor variables in Python.md new file mode 100644 index 0000000000..a2be6f4c97 --- /dev/null +++ b/translated/tech/20210331 Use this open source tool to monitor variables in Python.md @@ -0,0 +1,179 @@ +[#]: subject: (Use this open source tool to monitor variables in Python) +[#]: via: (https://opensource.com/article/21/4/monitor-debug-python) +[#]: author: (Tian Gao https://opensource.com/users/gaogaotiantian) +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +使用这个开源工具来监控 Python 中的变量 +====== +Watchpoints 是一个简单但功能强大的工具,可以帮助你在调试 Python 时监控变量。 +![Looking back with binoculars][1] + +在调试代码时,你经常面临着要弄清楚一个变量何时发生变化。如果没有任何高级工具,那么可以选择使用打印语句在期望它们更改时输出变量。然而,这是一种非常低效的方法,因为变量可能在很多地方发生变化,并且不断地将其打印到终端上会产生很大的干扰,而将它们打印到日志文件中则变得很麻烦。 + +这是一个常见的问题,但现在有一个简单而强大的工具可以帮助你监控变量:[watchpoints][2]。 + +[watchpoint 的概念在 C 和 C++ 调试器中很常见][3],用于监控内存,但在 Python 中缺乏相应的工具。`watchpoints` 填补了这个空白。 + +### 安装 + +要使用它,你必须先用 `pip` 安装它: + + +``` +`$ python3 -m pip install watchpoints` +``` + +### 在Python中使用 watchpoints + +对于任何一个你想监控的变量,使用 **watch** 函数对其进行监控。 + + +``` +from watchpoints import watch + +a = 0 +watch(a) +a = 1 +``` + +当变量发生变化时,它的值就会被打印到**标准输出**: + + +``` +====== Watchpoints Triggered ====== + +Call Stack (most recent call last): +  <module> (my_script.py:5): +> a = 1 +a: +0 +-> +1 +``` + +信息包括: + + * 变量被改变的行。 + * 调用栈。 + * 变量的先前值/当前值。 + + + +它不仅适用于变量本身,也适用于对象的变化: + + +``` +from watchpoints import watch + +a = [] +watch(a) +a = {} # Trigger +a["a"] = 2 # Trigger +``` + +当变量 **a** 被重新分配时,回调会被触发,同时当分配给 a 的对象发生变化时也会被触发。 + +更有趣的是,监控不受作用域的限制。你可以在任何地方观察变量/对象,而且无论程序在执行什么函数,回调都会被触发。 + + +``` +from watchpoints import watch + +def func(var): +    var["a"] = 1 + +a = {} +watch(a) +func(a) +``` + +例如,这段代码打印: + + +``` +====== Watchpoints Triggered ====== + +Call Stack (most recent call last): + +  <module> (my_script.py:8): +> func(a) +  func (my_script.py:4): +> var["a"] = 1 +a: +{} +-> +{'a': 1} +``` + +**watch** 函数不仅可以监视一个变量,它也可以监视一个字典或列表的属性和元素。 + + +``` +from watchpoints import watch + +class MyObj: +    def __init__(self): +        self.a = 0 + +obj = MyObj() +d = {"a": 0} +watch(obj.a, d["a"]) # Yes you can do this +obj.a = 1 # Trigger +d["a"] = 1 # Trigger +``` + +这可以帮助你缩小到一些你感兴趣的特定对象。 + +如果你对输出格式不满意,你可以自定义它。只需定义你自己的回调函数: + + +``` +watch(a, callback=my_callback) + +# 或者全局设置 + +watch.config(callback=my_callback) +``` + +当触发时,你甚至可以使用 **pdb**: + + +``` +`watch.config(pdb=True)` +``` + +这与 **breakpoint()** 的行为类似,会给你带来类似调试器的体验。 + +如果你不想在每个文件中都导入这个函数,你可以通过 **install** 函数使其成为全局: + + +``` +`watch.install() # or watch.install("func_name") and use it as func_name()` +``` + +我个人认为,watchpoints 最酷的地方就是使用直观。你对一些数据感兴趣吗?只要”观察“它,你就会知道你的变量何时发生变化。 + +### 尝试 watchpoints + +我在 [GitHub][2] 上开发维护了 `watchpoints`,并在 Apache 2.0 许可下发布了它。安装并使用它,当然也欢迎大家做出贡献。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/monitor-debug-python + +作者:[Tian Gao][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/gaogaotiantian +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/look-binoculars-sight-see-review.png?itok=NOw2cm39 (Looking back with binoculars) +[2]: https://github.com/gaogaotiantian/watchpoints +[3]: https://opensource.com/article/21/3/debug-code-gdb From 2997efc2ac1dd1e2d90ad8f07c2075adcd0ed21b Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 6 Apr 2021 08:59:23 +0800 Subject: [PATCH 575/818] translating --- ... Why I love using the IPython shell and Jupyter notebooks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210329 Why I love using the IPython shell and Jupyter notebooks.md b/sources/tech/20210329 Why I love using the IPython shell and Jupyter notebooks.md index 8696ee5e4d..50f09539f1 100644 --- a/sources/tech/20210329 Why I love using the IPython shell and Jupyter notebooks.md +++ b/sources/tech/20210329 Why I love using the IPython shell and Jupyter notebooks.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/3/ipython-shell-jupyter-notebooks) [#]: author: (Ben Nuttall https://opensource.com/users/bennuttall) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From c07412758f6ec232e599653b3eb8b1c0562cd1dd Mon Sep 17 00:00:00 2001 From: Max27149 <47019171+max27149@users.noreply.github.com> Date: Tue, 6 Apr 2021 10:21:54 +0800 Subject: [PATCH 576/818] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20210222 5 benefits of choosing Linux.md | 51 ++++++++++--------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/sources/tech/20210222 5 benefits of choosing Linux.md b/sources/tech/20210222 5 benefits of choosing Linux.md index 6ac46979d5..591c6c1518 100644 --- a/sources/tech/20210222 5 benefits of choosing Linux.md +++ b/sources/tech/20210222 5 benefits of choosing Linux.md @@ -7,56 +7,57 @@ [#]: via: (https://opensource.com/article/21/2/linux-choice) [#]: author: (Seth Kenlon https://opensource.com/users/seth) -5 benefits of choosing Linux -====== -One of the great things about Linux is choice, and choice inspires users -to freely share ideas and solutions. How will Linux inspire you to -contribute to this community? +# 选择 Linux 的5大好处 + +--- + +Linux 的一大优点是多样化选择,选择激发了用户之间自由分享想法和解决方案。Linux 将如何激发你为这个社区做出贡献呢? + ![Hand putting a Linux file folder into a drawer][1] -In 2021, there are more reasons why people love Linux than ever before. In this series, I'll share 21 different reasons to use Linux. This article discusses the benefit of choice Linux brings.  +到了2021年,人​​们比以往任何时候都更有理由喜欢 Linux。在本系列中,我将分享21个使用 Linux 的理由。本文讨论选择 Linux 带来的好处。 -_Choice_ is one of the most misunderstood features of Linux. It starts with how many Linuxes there are to choose from. Distrowatch.org reports hundreds of available and active Linux distributions. Many of these distributions, of course, are hobby projects or extremely specific to some obscure requirement. Because it's open source, in fact, anyone can "re-spin" or "remix" an existing distribution of Linux, give it a new name, maybe a new default wallpaper, and call it their own. And while that may seem trivial, I see it as an indication of something very special. +_选择_ 是 Linux 中被误解最深的特性之一。这种误解从可被选择的 Linux 发行版数量就开始了。Distrowatch.org 报告了数百种可用的和活跃的 Linux 发行版。当然,在这些发行版当中,许多都是业余爱好项目或者对于某些晦涩需求的特别版。因为它是开源的,所以实际上,任何人都可以“重新设计”或“重新混搭”现有的Linux发行版,赋予一个新名称,提供一个新的默认墙纸,然后称其为自己的作品。尽管这些修改似乎微不足道,但我认为这显示了 Linux 的一些特别之处。 -### Inspiration +### 灵感 -Linux, it seems, inspires people, from the very moment they learn about it, to make it their own. +Linux 似乎一直在启迪着人们,从了解它的那一刻起,到创造出自己的版本。 -There are dozens of companies spending millions of dollars to generate inspiration from their product. Commercials for technology overwhelmingly try to convince you that as long as you buy some product, you'll feel more connected to the people you care about, more creative, and more alive. Shot in 4k video with soft focus and played to the beat of cheerful and uplifting music, these advertisements are attempts to convince people to not only purchase but then also to support and advertise that company's product. +有数十家公司花费数百万美元来从他们自己的产品中获取灵感。商业技术广告试着强硬地说服你,只要你购买某种产品,你就会与所关心的人建立更多的联系,更具创造力,更加充满活力。这些广告以柔和的焦点拍摄4k视频,并使用愉悦而振奋的背景音乐,试图说服人们不仅购买而且还要支持和宣传该公司的产品。 -Of course, Linux has essentially no marketing budget because Linux is a diverse collection of individuals, a body _discorporate_. Yet when people discover it, they are seemingly inspired to build their own version of it. +当然,Linux 基本没有营销预算,因为 Linux 是个形形色色的大集合,*没有固定实体*。然而,当人们发现它的存在时候,他们似乎就被启发着去构建属于自己的版本。 -It's difficult to quantify amounts of inspiration, but there's obvious value to it, or else companies wouldn't spend money in an attempt to create it. +量化灵感的数量是件难事,但是它显然很有价值,要不然那些公司不会花钱来尝试创造灵感。 -### Innovation +### 革新 -Inspiration, however difficult it is to put a price tag on it, is valuable because of what it produces. Many Linux users have been inspired to create custom solutions to odd problems. Many of the problems we each solve seem trivial to most other people. Maybe you monitor moisture levels of your tomato plant's soil with a [Seeed micro-controller][2], or you have a script to search through an index of Python packages because you keep forgetting the names of libraries you import every day, or you've automated cleaning out your Downloads folder because dragging icons to the Trash is too much work. Whatever problem you've solved for yourself on Linux, it's a feature of the platform that you're inspired by the open technology you're running to make it work better for yourself. +灵感,无论给它标价有多难,它都因它的生产创造而有价值。许多 Linux 用户受启发来为各种奇怪问题定制解决方案。大多数由我们各自解决的问题,对于其他大部分人而言,似乎微不足道:也许你使用 [Seeed微控制器][2] 来监控番茄植株土壤的水分含量;或者你使用脚本来搜索 Python 软件包的索引,因为你会忘记每天导入的库的名称;或者设置了自动清理下载文件夹,因为将文件图标拖进回收站这个活儿干太多了。不管你在使用 Linux 的过程中,为自己解决过什么问题,都是这个平台包含的特性之一,你被这个正在运行中的开放的技术所启发,使其更好地服务于你自己。 -### Staying out of the way +### 开放策略 -Of course, neither inspiration nor innovation are exclusive properties of Linux. Other platforms do authentically produce inspiration in us, and we do innovate in small and huge ways. Computing has largely leveled most playing fields, and anything you can do on one OS, you can likely find a way to do on another. +诚然,不论是灵感,还是创新,都不能算 Linux 独有的属性。其他平台也确实让我们激发灵感,我们也以或大或小大的方式进行创新。运算能力已在很大程度上拉平了操作系统的竞争领域,你在一个操作系统上可以完成的任何事,在另一个操作系统上或许都能找到对应的方法来完成。 -What many users find, however, is that the Linux operating system maintains a firm policy of staying out of your way when you have the idea of trying something that possibly nobody else has thought to try yet. This doesn't and cannot happen, by design, on a proprietary operating system because there's just no way to get into certain areas of the system because they don't happen to be open source. There are arbitrary blockades. You tend not to bump up against invisible walls when you're doing exactly what the OS expects you to do, but when you have it in mind to do something that makes sense only to you, your environment may fail to adapt. +但是,许多用户发现,Linux 操作系统保留了坚定的开放策略,即当你尝试可能无人想到过的尝试时,Linux 不会阻挡你。这在闭源操作系统上不会发生,而且不可能发生,因为无法进入系统层级的某些区域,因为它们本身就是被设计为不开放源码的。有任意的封锁。当你完全按照操作系统的期望进行操作时,你不会碰到那些看不见的墙,但是当你明知要执行的操作只对你自己有意义的时候,你的系统环境可能变得无从适应。 -### Small choices and why they matter +### 小小的选择,大大的意义 -Not all innovations are big or important, but collectively they make a big difference. The crazy ideas that millions of users have had are evident today in every part of Linux. They're in the ways that the KDE and GNOME desktops work, they're in [31 different text editors][3] each of them loved by someone, and countless plugins for browsers and media applications, in file systems and extended attributes, and in the millions of lines of the Linux kernel. And if just one of these features gives you an extra hour each day to spend with your family or friends or hobby, then it's by definition, to use an over-used phrase, "life-changing." +并非所有创新都是大的或重要的,但总的来说,它们带来的变化并不小。如今,数百万用户的那些疯狂想法在 Linux 的各个部分中愈发显现。它们存在于 KDE 或 GNOME 桌面的工作方式中,存在于 [31种不同的文本编辑器][3] 中——每一种都有人喜爱,存在于不计其数的浏览器插件和多媒体应用程序中,存在于文件系统和扩展属性中,以及数以百万计的 Linux 内核代码中。而且,如果上述功能中的哪怕仅其中一项,能让你每天额外节省下一小时时间,陪家人、朋友或用在自己的业余爱好上,那么按照定义,套用一句老话就是,“改变生活”。 -### Connecting with a community +### 在社区中交流 -An important part of open source is the sharing of work. Sharing code is the obvious, prevalent transaction of open source software, but I think there's a lot more to the act of sharing than just making a commit to Gitlab. When people share their ideas with one another, with no ulterior motive aside from potentially getting useful code contributions in return, we all recognize it as a gift. It feels very different from when you purchase software from a company, and it's even different from when a company shares open source code they've produced. The reality of open source is that it's made by humans for humans. There's a connection created when knowledge and inspiration are given freely. It's not something that a marketing campaign can replicate, and I think that we recognize that. +开源行动的重要组成部分之一是共享工作。共享代码是开源软件中显而易见的、普遍流行的事务,但我认为,分享,可不仅仅是在 Gitlab 做一次提交那么简单。当人们彼此分享着自己的奇思妙想,除了获得有用的代码贡献作为回报外,再无其他动机,我们一致认为这是一种馈赠。这与你花钱从某公司购买软件时的感觉非常不同,甚至与得到某公司对外分享他们自己生产的开源代码时的感觉也有很大不同。开源的实质是,由全人类创造,服务于全人类。当知识和灵感可以被自由地分享时,人与人之间就建立了连接,这是市场营销学无法复制的东西,我认为我们都认同这一点。 -### Choice +### 选择 -Linux isn't the only platform with a lot of choices. You can find several solutions to the same problem regardless of your OS, especially when you delve into open source software. However, the level of choice evident on Linux is indicative of what drives Linux forward: The invitation to collaborate. Some things created on Linux fade quickly away, others stay on your home computer for years doing whatever small mundane task you've automated, and others are so successful that they get borrowed by other platforms and become commonplace. It doesn't matter. Whatever you create on Linux, don't hesitate to add it to the cacophony of choice. You never know who it might inspire. +Linux 并不是唯一拥有很多选择的平台。无论使用哪种操作系统,你都可以找到针对同一问题的多种解决方案,尤其是在深入研究开源软件的时候。但是,Linux 明显的决策水准指示了推动 Linux 前进的因素:诚邀协作。在 Linux 上,有些创造会很快消失,有些会在你家用电脑中保留数年——即便只是执行一些不起眼的自动化任务,然而有一些则非常成功,以至于被其他系统平台借鉴并变得司空见惯。没关系,无论你在 Linux 上创作出什么,都请毫不犹豫地把它加入千奇百怪的选择之中,你永远都不知道它可能会激发到谁的灵感。 --------------------------------------------------------------------------------- +--- via: https://opensource.com/article/21/2/linux-choice 作者:[Seth Kenlon][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[max27149](https://github.com/max27149) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 909a475e3f414f8200639296c0ef3fd61447449e Mon Sep 17 00:00:00 2001 From: Max27149 <47019171+max27149@users.noreply.github.com> Date: Tue, 6 Apr 2021 10:24:41 +0800 Subject: [PATCH 577/818] Update 20210222 5 benefits of choosing Linux.md --- sources/tech/20210222 5 benefits of choosing Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210222 5 benefits of choosing Linux.md b/sources/tech/20210222 5 benefits of choosing Linux.md index 591c6c1518..d2ec4ab807 100644 --- a/sources/tech/20210222 5 benefits of choosing Linux.md +++ b/sources/tech/20210222 5 benefits of choosing Linux.md @@ -7,7 +7,7 @@ [#]: via: (https://opensource.com/article/21/2/linux-choice) [#]: author: (Seth Kenlon https://opensource.com/users/seth) -# 选择 Linux 的5大好处 +选择 Linux 的5大好处 --- From 05e28794b69848569f6cff12acff6324dda535c1 Mon Sep 17 00:00:00 2001 From: Max27149 <47019171+max27149@users.noreply.github.com> Date: Tue, 6 Apr 2021 10:29:56 +0800 Subject: [PATCH 578/818] Update 20210222 5 benefits of choosing Linux.md --- sources/tech/20210222 5 benefits of choosing Linux.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sources/tech/20210222 5 benefits of choosing Linux.md b/sources/tech/20210222 5 benefits of choosing Linux.md index d2ec4ab807..f56e7b4566 100644 --- a/sources/tech/20210222 5 benefits of choosing Linux.md +++ b/sources/tech/20210222 5 benefits of choosing Linux.md @@ -7,9 +7,7 @@ [#]: via: (https://opensource.com/article/21/2/linux-choice) [#]: author: (Seth Kenlon https://opensource.com/users/seth) -选择 Linux 的5大好处 - ---- +# 选择 Linux 的5大好处 Linux 的一大优点是多样化选择,选择激发了用户之间自由分享想法和解决方案。Linux 将如何激发你为这个社区做出贡献呢? From 195c9d9b7ede2bb18c25a63be915be792dc02faf Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 6 Apr 2021 10:35:34 +0800 Subject: [PATCH 579/818] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wyxplus 这篇用心了~ --- ...t applications you should use right now.md | 57 ++++++++----------- 1 file changed, 23 insertions(+), 34 deletions(-) diff --git a/translated/tech/20200423 4 open source chat applications you should use right now.md b/translated/tech/20200423 4 open source chat applications you should use right now.md index 8f78f0b157..1c848343a4 100644 --- a/translated/tech/20200423 4 open source chat applications you should use right now.md +++ b/translated/tech/20200423 4 open source chat applications you should use right now.md @@ -1,23 +1,23 @@ [#]: collector: (lujun9972) [#]: translator: (wyxplus) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (4 open source chat applications you should use right now) [#]: via: (https://opensource.com/article/20/4/open-source-chat) [#]: author: (Sudeshna Sur https://opensource.com/users/sudeshna-sur) -现如今你应当使用的四款开源聊天应用软件 +值得现在就去尝试的四款开源聊天应用软件 ====== -现在,远程协作已作为一项必不可少的能力,让开源实时聊天成为你工具箱中必不可少的一部分吧。 -![Chat bubbles][1] +> 现在,远程协作已作为一项必不可少的能力,让开源实时聊天成为你工具箱中必不可少的一部分吧。 +![](https://img.linux.net.cn/data/attachment/album/202104/06/103454xundd858446u08r0.jpg) 清晨起床后,我们通常要做的第一件事是检查手机,看看是否有同事和朋友发来的重要信息。无论这是否是一个好习惯,但这种行为早已成为我们日常生活的一部分。 -> 人是理性动物。他总能想出任何自己愿意相信的理由。 -> –阿纳托尔·法朗士 +> 人是理性动物。他可以为任何他想相信的事情想出一个理由。 +> – 阿纳托尔·法朗士 无论理由是否合理,我们每天都在使用的一系列的通讯工具,例如电子邮件、电话、网络会议工具或社交网络。甚至在 COVID-19 之前,居家办公就已经使这些通信工具成为我们生活中的重要部分。随着疫情出现,居家办公成为新常态,我们交流方式的方方面面正面临着前所未有的改变,这让这些工具变得不可或缺。 @@ -25,7 +25,7 @@ 作为全球团队的一部分进行远程工作时,我们必须要有一个相互协作的环境。聊天应用软件在帮助我们保持相互联系中起着至关重要的作用。与电子邮件相比,聊天应用软件可提供与全球各地的同事快速、实时的通信。 -考虑选择一款聊天应用软件需要考虑很多因素。为了帮助你选择最适合你的应用软件,在本文中,我将探讨四款开源聊天应用软件和一个开源视频通信工具(用于当你需要与同事“面对面”时),然后概述在高效的通讯应用软件中,你应当考虑的一些功能。 +选择一款聊天应用软件需要考虑很多因素。为了帮助你选择最适合你的应用软件,在本文中,我将探讨四款开源聊天应用软件,和一个当你需要与同事“面对面”时的开源视频通信工具,然后概述在高效的通讯应用软件中,你应当考虑的一些功能。 ### 四款开源聊天软件 @@ -33,64 +33,53 @@ ![Rocket.Chat][2] - [Rocket.Chat][3] 是一个综合性的通讯平台,其将频道分为公开房间(任何人都可以加入)和私有房间(仅受邀请)。你还可以直接将消息发送给已登录的人员。其能共享文档、链接、照片、视频和动态图GIF,以及进行视频通话,并可以在平台中发送语音信息。 - - -Rocket.Chat 是免费开源的软件,但是其独特之处在于其可自托管的聊天系统。你可以将其下载到你的服务器上,无论它是本地服务器或是在公有云上的虚拟专用服务器。 - - +Rocket.Chat 是自由开源软件,但是其独特之处在于其可自托管的聊天系统。你可以将其下载到你的服务器上,无论它是本地服务器或是在公有云上的虚拟专用服务器。 Rocket.Chat 是完全免费,其 [源码][4] 可在 Github 获得。许多开源项目都使用 Rocket.Chat 作为他们官方交流平台。该软件在持续不断的发展且不断更新和改进新功能。 - -我最喜欢 Rocket.Chat 的地方是其能够根据用户需求来进行自定义操作,并且它使用机器学习来自动化处理,在用户通讯间实时翻译信息。你也可以下载适用于你移动设备的 Rocket.Chat,以便能随时随地使用。 +我最喜欢 Rocket.Chat 的地方是其能够根据用户需求来进行自定义操作,并且它使用机器学习在用户通讯间进行自动的、实时消息翻译。你也可以下载适用于你移动设备的 Rocket.Chat,以便能随时随地使用。 #### IRC ![IRC on WeeChat 0.3.5][5] -[Internet Relay Chat (IRC)][6] 是一款实时、基于文本格式的通信软件。尽管其是最古老的电子通讯形式之一,但在许多知名的软件项目中仍受欢迎。 +IRC([互联网中继聊天][6]Internet Relay Chat)是一款实时、基于文本格式的通信软件。尽管其是最古老的电子通讯形式之一,但在许多知名的软件项目中仍受欢迎。 +IRC 频道是单独的聊天室。它可以让你在一个开放的频道中与多人进行聊天或与某人私下一对一聊天。如果频道名称以 `#` 开头,则可以假定它是官方的聊天室,而以 `##` 开头的聊天室通常是非官方的聊天室。 -IRC 频道是单独的聊天室。它可以让你在一个开放的频道中与多人进行聊天或与某人私下一对一聊天。如果频道名称以 # 开头,则可以假定它是官方的聊天室,然而以 ## 开头的聊天室通常是非官方的聊天室。 +[上手 IRC][7] 很容易。你的 IRC 昵称可以让人们找到你,因此它必须是唯一的。但是,你可以完全自主地选择 IRC 客户端。如果你需要比标准 IRC 客户端更多功能的应用程序,则可以使用 [Riot.im][8] 连接到 IRC。 -[使用 IRC][7] 是很容易上手。你的 IRC 昵称可以让人们找到你,因此它必须是唯一的。但是,你可以完全自主地选择 IRC 客户端。如果你需要比标准 IRC 客户端更多功能的应用程序,则可以使用 [Riot.im][8] 连接到 IRC。 - -考虑到它悠久的历史,你为什么还要继续使用 IRC?出于一个原因是,其仍是我们所依赖的许多免费和开源项目的家园。如果你想参于开源软件开发和社区,可以选择用 IRC。 +考虑到它悠久的历史,你为什么还要继续使用 IRC?出于一个原因是,其仍是我们所依赖的许多自由及开源项目的家园。如果你想参于开源软件开发和社区,可以选择用 IRC。 #### Zulip ![Zulip][9] +[Zulip][10] 是十分流行的群聊应用程序,它遵循基于话题线索的模式。在 Zulip 中,你可以订阅stream,就像在 IRC 频道或 Rocket.Chat 中一样。但是,每个 Zulip 流都会拥有一个唯一的话题topic,该话题可帮助你以后查找对话,因此其更有条理。 -[Zulip][10] 是遵循基于话题时间线模式且十分流行的群聊应用程序。在 Zulip 中,你可以订阅stream,就像在 IRC 频道或 Rocket.Chat 中一样。但是,每个 Zulip 流都会拥有一个唯一的话题topic,该话题可帮助你以后查找对话,因此其更有条理。 +与其他平台一样,它支持表情符号、内嵌图片、视频和推特预览。它还支持 LaTeX 来分享数学公式或方程式、支持 Markdown 和语法高亮来分享代码。 +Zulip 是跨平台的,并提供 API 用于编写你自己的程序。我特别喜欢 Zulip 的一点是它与 GitHub 的集成整合功能:如果我正在处理某个议题issue,则可以使用 Zulip 的标记回链某个拉取请求pull request ID。 -与其他平台一样,它支持表情符号、图片、视频和推特预览。它还支持 LaTeX 共享数学公式或等式、Markdown 语法和共享代码的语法高亮。 - - -Zulip 是跨平台、并提供 API 用于编写你自己的程序。我特别喜欢 Zulip 的一点是它与 GitHub 的集成整合功能:如果我正在处理某个问题issue,则可以使用 Zulip 的标记链接拉回pull某个请求 ID。 - -Zulip是开源(你可以在 GitHub 上访问其[源码][11])并且免费使用,但是其已经为本地支持、[LDAP][12] 的集成整合和存储扩展提供了付费服务。 +Zulip 是开源的(你可以在 GitHub 上访问其 [源码][11])并且免费使用,但它有提供预置支持、[LDAP][12] 集成和更多存储类型的付费产品。 #### Let's Chat ![Let's Chat][13] -[Let's Chat][14] 是面向小型团队的自托管的聊天解决方案。它使用 Node.js 和 MongoDB 编写运行,只需鼠标点击几下即可将其部署到本地服务器或云服务器。它是免费且开源,可以在 GitHub 上查看其 [源码][15]。 +[Let's Chat][14] 是一个面向小型团队的自托管的聊天解决方案。它使用 Node.js 和 MongoDB 编写运行,只需鼠标点击几下即可将其部署到本地服务器或云服务器。它是自由开源软件,可以在 GitHub 上查看其 [源码][15]。 Let's Chat 与其他开源聊天工具的不同之处在于其企业功能:它支持 LDAP 和 [Kerberos][16] 身份验证。它还具有新用户想要的所有功能:你可以在历史记录中搜索过往消息,并使用 @username 之类的标签来标记人员。 -我喜欢 Let's Chat 的地方是它拥有私人、受密码保护的聊天室、发送图片、GIPHY 支持和代码拷贝。它不断更新,并不断增加新功能。 +我喜欢 Let's Chat 的地方是它拥有私人的受密码保护的聊天室、发送图片、支持 GIPHY 和代码粘贴。它不断更新,不断增加新功能。 ### 附加:开源视频聊天软件 Jitsi ![Jitsi][17] -有时,文字聊天还不够,你还可能需要与某人面谈。在这种情况下,如果不能选择面对面开会交流,那么视频聊天是最好的选择。[Jitsi][18] 是一个完全开源的,多平台且兼容 WebRTC 的视频会议工具。 - +有时,文字聊天还不够,你还可能需要与某人面谈。在这种情况下,如果不能选择面对面开会交流,那么视频聊天是最好的选择。[Jitsi][18] 是一个完全开源的、支持多平台且兼容 WebRTC 的视频会议工具。 Jitsi 从 Jitsi Desktop 开始,已经发展成为许多 [项目][19],包括 Jitsi Meet、Jitsi Videobridge、jibri 和 libjitsi,并且每个项目都在 GitHub 上开放了 [源码][20]。 @@ -106,10 +95,10 @@ Jitsi 是安全且可扩展的,并支持诸如联播simulcast Date: Tue, 6 Apr 2021 10:36:38 +0800 Subject: [PATCH 580/818] PUB @wyxplus https://linux.cn/article-13271-1.html --- ... open source chat applications you should use right now.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200423 4 open source chat applications you should use right now.md (99%) diff --git a/translated/tech/20200423 4 open source chat applications you should use right now.md b/published/20200423 4 open source chat applications you should use right now.md similarity index 99% rename from translated/tech/20200423 4 open source chat applications you should use right now.md rename to published/20200423 4 open source chat applications you should use right now.md index 1c848343a4..5c445b9586 100644 --- a/translated/tech/20200423 4 open source chat applications you should use right now.md +++ b/published/20200423 4 open source chat applications you should use right now.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wyxplus) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13271-1.html) [#]: subject: (4 open source chat applications you should use right now) [#]: via: (https://opensource.com/article/20/4/open-source-chat) [#]: author: (Sudeshna Sur https://opensource.com/users/sudeshna-sur) From df95bca16e6fc2142c67801b914362122c91617e Mon Sep 17 00:00:00 2001 From: max27149 <1478026873@qq.com> Date: Tue, 6 Apr 2021 13:08:49 +0800 Subject: [PATCH 581/818] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tech/20210222 5 benefits of choosing Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20210222 5 benefits of choosing Linux.md (100%) diff --git a/sources/tech/20210222 5 benefits of choosing Linux.md b/translated/tech/20210222 5 benefits of choosing Linux.md similarity index 100% rename from sources/tech/20210222 5 benefits of choosing Linux.md rename to translated/tech/20210222 5 benefits of choosing Linux.md From e122d661d3884ff2578a62ad558c914034c57c07 Mon Sep 17 00:00:00 2001 From: Max27149 <47019171+max27149@users.noreply.github.com> Date: Tue, 6 Apr 2021 18:27:57 +0800 Subject: [PATCH 582/818] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E7=94=B3=E9=A2=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20210218 Not an engineer- Find out where you belong.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/talk/20210218 Not an engineer- Find out where you belong.md b/sources/talk/20210218 Not an engineer- Find out where you belong.md index 0a6589a01b..4bce68f512 100644 --- a/sources/talk/20210218 Not an engineer- Find out where you belong.md +++ b/sources/talk/20210218 Not an engineer- Find out where you belong.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (max27149) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -85,7 +85,7 @@ via: https://opensource.com/article/21/2/advice-non-technical 作者:[Dawn Parzych][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[max27149](https://github.com/max27149) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 0386b1c29059be7c01852c27b654e5619d5aea34 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 7 Apr 2021 05:02:51 +0800 Subject: [PATCH 583/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210405=20?= =?UTF-8?q?Scaling=20Microservices=20on=20Kubernetes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210405 Scaling Microservices on Kubernetes.md --- ...405 Scaling Microservices on Kubernetes.md | 179 ++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 sources/tech/20210405 Scaling Microservices on Kubernetes.md diff --git a/sources/tech/20210405 Scaling Microservices on Kubernetes.md b/sources/tech/20210405 Scaling Microservices on Kubernetes.md new file mode 100644 index 0000000000..26fa6a2334 --- /dev/null +++ b/sources/tech/20210405 Scaling Microservices on Kubernetes.md @@ -0,0 +1,179 @@ +[#]: subject: (Scaling Microservices on Kubernetes) +[#]: via: (https://www.linux.com/news/scaling-microservices-on-kubernetes/) +[#]: author: (Dan Brown https://training.linuxfoundation.org/announcements/scaling-microservices-on-kubernetes/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Scaling Microservices on Kubernetes +====== + +_By Ashley Davis_ + +_*This article was originally published at [TheNewStack][1]_ + +Applications built on microservices can be scaled in multiple ways. We can scale them to support development by larger development teams and we can also scale them up for better performance. Our application can then have a higher capacity and can handle a larger workload. + +Using microservices gives us granular control over the performance of our application. We can easily measure the performance of our microservices to find the ones that are performing poorly, are overworked, or are overloaded at times of peak demand. Figure 1 shows how we might use the [Kubernetes dashboard][2] to understand CPU and memory usage for our microservices. + + + +_Figure 1: Viewing CPU and memory usage for microservices in the Kubernetes dashboard_ + +If we were using a monolith, however, we would have limited control over performance. We could vertically scale the monolith, but that’s basically it. + +Horizontally scaling a monolith is much more difficult; and we simply can’t independently scale any of the “parts” of a monolith. This isn’t ideal, because it might only be a small part of the monolith that causes the performance problem. Yet, we would have to vertically scale the entire monolith to fix it. Vertically scaling a large monolith can be an expensive proposition. + +Instead, with microservices, we have numerous options for scaling. For instance, we can independently fine-tune the performance of small parts of our system to eliminate bottlenecks and achieve the right mix of performance outcomes. + +There are also many advanced ways we could tackle performance issues, but in this post, we’ll overview a handful of relatively simple techniques for scaling our microservices using [Kubernetes][3]: + + 1. Vertically scaling the entire cluster + 2. Horizontally scaling the entire cluster + 3. Horizontally scaling individual microservices + 4. Elastically scaling the entire cluster + 5. Elastically scaling individual microservices + + + +Scaling often requires risky configuration changes to our cluster. For this reason, you shouldn’t try to make any of these changes directly to a production cluster that your customers or staff are depending on. + +Instead, I would suggest that you create a new cluster and use **blue-green deployment**, or a similar deployment strategy, to buffer your users from risky changes to your infrastructure. + +### **Vertically Scaling the Cluster** + +As we grow our application, we might come to a point where our cluster generally doesn’t have enough compute, memory or storage to run our application. As we add new microservices (or replicate existing microservices for redundancy), we will eventually max out the nodes in our cluster. (We can monitor this through our cloud vendor or the Kubernetes dashboard.) + +At this point, we must increase the total amount of resources available to our cluster. When scaling microservices on a [Kubernetes cluster][4], we can just as easily make use of either vertical or horizontal scaling. Figure 2 shows what vertical scaling looks like for Kubernetes. + + + +_Figure 2: Vertically scaling your cluster by increasing the size of the virtual machines (VMs)_ + +We scale up our cluster by increasing the size of the virtual machines (VMs) in the node pool. In this example, we increased the size of three small-sized VMs so that we now have three large-sized VMs. We haven’t changed the number of VMs; we’ve just increased their size — scaling our VMs vertically. + +Listing 1 is an extract from Terraform code that provisions a cluster on Azure; we change the vm_size field from Standard_B2ms to Standard_B4ms. This upgrades the size of each VM in our Kubernetes node pool. Instead of two CPUs, we now have four (one for each VM). As part of this change, memory and hard-drive for the VM also increase. If you are deploying to AWS or GCP, you can use this technique to vertically scale, but those cloud platforms offer different options for varying VM sizes. + +We still only have a single VM in our cluster, but we have increased our VM’s size. In this example, scaling our cluster is as simple as a code change. This is the power of infrastructure-as-code, the technique where we store our infrastructure configuration as code and make changes to our infrastructure by committing code changes that trigger our continuous delivery (CD) pipeline + + + +_Listing 1: Vertically scaling the cluster with Terraform (an extract)_ + +### Horizontally Scaling the Cluster + +In addition to vertically scaling our cluster, we can also scale it horizontally. Our VMs can remain the same size, but we simply add more VMs. + +By adding more VMs to our cluster, we spread the load of our application across more computers. Figure 3 illustrates how we can take our cluster from three VMs up to six. The size of each VM remains the same, but we gain more computing power by having more VMs. + + + +_Figure 3: Horizontally scaling your cluster by increasing the number of VMs_ + +Listing 2 shows an extract of Terraform code to add more VMs to our node pool. Back in listing 1, we had node_count set to 1, but here we have changed it to 6. Note that we reverted the vm_size field to the smaller size of Standard_B2ms. In this example, we increase the number of VMs, but not their size; although there is nothing stopping us from increasing both the number and the size of our VMs. + +Generally, though, we might prefer horizontal scaling because it is less expensive than vertical scaling. That’s because using many smaller VMs is cheaper than using fewer but bigger and higher-priced VMs. + + + +_Listing 2: Horizontal scaling the cluster with Terraform (an extract)_ + +### Horizontally Scaling an Individual Microservice + +Assuming our cluster is scaled to an adequate size to host all the microservices with good performance, what do we do when individual microservices become overloaded? (This can be monitored in the Kubernetes dashboard.) + +Whenever a microservice becomes a performance bottleneck, we can horizontally scale it to distribute its load over multiple instances. This is shown in figure 4. + + + +_Figure 4: Horizontally scaling a microservice by replicating it_ + +We are effectively giving more compute, memory and storage to this particular microservice so that it can handle a bigger workload. + +Again, we can use code to make this change. We can do this by setting the replicas field in the specification for our Kubernetes deployment or pod as shown in listing 3. + + + +_Listing 3: Horizontally scaling a microservice with Terraform (an extract)_ + +Not only can we scale individual microservices for performance, we can also horizontally scale our microservices for redundancy, creating a more fault-tolerant application. By having multiple instances, there are others available to pick up the load whenever any single instance fails. This allows the failed instance of a microservice to restart and begin working again. + +### Elastic Scaling for the Cluster + +Moving into more advanced territory, we can now think about elastic scaling. This is a technique where we automatically and dynamically scale our cluster to meet varying levels of demand. + +Whenever a demand is low, [Kubernetes][5] can automatically deallocate resources that aren’t needed. During high-demand periods, new resources are allocated to meet the increased workload. This generates substantial cost savings because, at any given moment, we only pay for the resources necessary to handle our application’s workload at that time. + +We can use elastic scaling at the cluster level to automatically grow our clusters that are nearing their resource limits. Yet again, when using Terraform, this is just a code change. Listing 4 shows how we can enable the Kubernetes autoscaler and set the minimum and maximum size of our node pool. + +Elastic scaling for the cluster works by default, but there are also many ways we can customize it. Search for “auto_scaler_profile” in [the Terraform documentation][6] to learn more. + + + +_Listing 4: Enabling elastic scaling for the cluster with Terraform (an extract)_ + +### Elastic Scaling for an Individual Microservice + +We can also enable elastic scaling at the level of an individual microservice. + +Listing 5 is a sample of Terraform code that gives microservices a “burstable” capability. The number of replicas for the microservice is expanded and contracted dynamically to meet the varying workload for the microservice (bursts of activity). + +The scaling works by default, but can be customized to use other metrics. See the [Terraform documentation][7] to learn more. To learn more about pod auto-scaling in Kubernetes, [see the Kubernetes docs][8]. + + + +_Listing 5: Enabling elastic scaling for a microservice with Terraform_ + +### About the Book: Bootstrapping Microservices + +You can learn about building applications with microservices with [Bootstrapping Microservices][9]. + +Bootstrapping Microservices is a practical and project-based guide to building applications with microservices. It will take you all the way from building one single microservice all the way up to running a microservices application in production on [Kubernetes][10], ending up with an automated continuous delivery pipeline and using _infrastructure-as-code_ to push updates into production. + +### Other Kubernetes Resources + +This post is an extract from _Bootstrapping Microservices_ and has been a short overview of the ways we can scale microservices when running them on Kubernetes. + +We specify the configuration for our infrastructure using Terraform. Creating and updating our infrastructure through code in this way is known as **intrastructure-as-code**, as a technique that turns working with infrastructure into a coding task and paved the way for the DevOps revolution. + +To learn more about [Kubernetes][11], please see [the Kubernetes documentation][12] and the free [Introduction to Kubernetes][13] training course. + +To learn more about working with Kubernetes using Terraform, please see [the Terraform documentation][14]. + +**About the Author, Ashley Davis** + +Ashley is a software craftsman, entrepreneur, and author with over 20 years of experience in software development, from coding to managing teams, then to founding companies. He is the CTO of Sortal, a product that automatically sorts digital assets through the magic of machine learning. + +The post [Scaling Microservices on Kubernetes][15] appeared first on [Linux Foundation – Training][16]. + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/scaling-microservices-on-kubernetes/ + +作者:[Dan Brown][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://training.linuxfoundation.org/announcements/scaling-microservices-on-kubernetes/ +[b]: https://github.com/lujun9972 +[1]: https://thenewstack.io/scaling-microservices-on-kubernetes/ +[2]: https://coding-bootcamps.com/blog/kubernetes-evolution-from-virtual-servers-and-kubernetes-architecture.html +[3]: https://learn.coding-bootcamps.com/p/complete-live-training-for-mastering-devops-and-all-of-its-tools +[4]: https://blockchain.dcwebmakers.com/blog/advance-topics-for-deploying-and-managing-kubernetes-containers.html +[5]: http://myhsts.org/tutorial-review-of-17-essential-topics-for-mastering-kubernetes.php +[6]: https://www.terraform.io/docs/providers/azurerm/r/kubernetes_cluster.html +[7]: http://www.terraform.io/docs/providers/kubernetes/r/horizontal_pod_autoscaler.html +[8]: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ +[9]: https://www.manning.com/books/bootstrapping-microservices-with-docker-kubernetes-and-terraform +[10]: https://coding-bootcamps.com/blog/build-containerized-applications-with-golang-on-kubernetes.html +[11]: https://learn.coding-bootcamps.com/p/live-training-class-for-mastering-kubernetes-containers-and-cloud-native +[12]: https://kubernetes.io/docs/home/ +[13]: https://training.linuxfoundation.org/training/introduction-to-kubernetes/ +[14]: https://registry.terraform.io/providers/hashicorp/kubernetes/latest +[15]: https://training.linuxfoundation.org/announcements/scaling-microservices-on-kubernetes/ +[16]: https://training.linuxfoundation.org/ From b990dba93120d9f64af835b4ec20cf8f5ae4c8d8 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 7 Apr 2021 05:03:07 +0800 Subject: [PATCH 584/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210407=20?= =?UTF-8?q?Show=20CPU=20Details=20Beautifully=20in=20Linux=20Terminal=20Wi?= =?UTF-8?q?th=20CPUFetch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md --- ...tifully in Linux Terminal With CPUFetch.md | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 sources/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md diff --git a/sources/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md b/sources/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md new file mode 100644 index 0000000000..84413537f4 --- /dev/null +++ b/sources/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md @@ -0,0 +1,105 @@ +[#]: subject: (Show CPU Details Beautifully in Linux Terminal With CPUFetch) +[#]: via: (https://itsfoss.com/cpufetch/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Show CPU Details Beautifully in Linux Terminal With CPUFetch +====== + +There are [ways to check CPU information on Linux][1]. Probably the most common is the `lscpu` command that gives you plenty of information about all the CPU cores on your system. + +![lscpu command output][2] + +You may find CPU information there without installing any additional packages. That works of course. However, I recently stumbled upon a new tool that displays the CPU details in Linux in a beautiful manner. + +The ASCII art of the processor manufacturer makes it look cool. + +![][3] + +This looks beautiful, isn’t it? This is similar to [Neoftech or Screenfetch tools that show the system information in beautiful ASCII art in Linux][4]. Similar to those tools, you can use CPUFetch if you are showcasing your desktop screenshot. + +The tool outputs the ASCII art of the processor manufacturer, its name, microarchitecture, frequency, cores, threads, peak performance, cache sizes, [Advanced Vector Extensions][5], and more. + +You can use custom colors apart from a few themes it provides. This gives you additional degree of freedom when you are ricing your desktop and want to color match all the elements on your Linux setup. + +### Installing CPUFetch on Linux + +Unfortunately, CPUFetch is rather new, and it is not included in your distribution’s repository. It doesn’t even provide ready to use DEB/RPM binaries, PPAs, Snap or Flatpak packages. + +Arch Linux users can [find][6] it in [AUR][7] but for others, the only way forward here is to [build from source code][8]. + +Don’t worry. Installation as well as removal is not that complicated. Let me show you the steps. + +I am using Ubuntu and you would [need to install Git on Ubuntu first][9]. Some other distributions come preinstalled with it, if not use your distribution’s package manager to install it. + +Now, clone the Git repository wherever you want. Home directory is fine as well. + +``` +git clone https://github.com/Dr-Noob/cpufetch +``` + +Switch to the directory you just cloned: + +``` +cd cpufetch +``` + +You’ll see a make file here. Use it to compile the code. + +``` +make +``` + +![CPUFetch Installation][10] + +Now you’ll see a new executable file named `cpufetch`. You run this executable to display the CPU information in the terminal. + +``` +./cpufetch +``` + +This is what it showed for my system. AMD logo looks a lot cooler in ASCII, don’t you think? + +![][11] + +How do you remove Cpufetch? It’s pretty simple. When you compiled the code, it produced just one file and that too in the same directory as the rest of the code. + +So, to remove CPUFetch from your system, simply remove its entire folder. You know how to [remove a directory in Linux terminal][12], don’t you? Come out of the cpufetch directory and use the rm command: + +``` +rm -rf cpufetch +``` + +That was simple, thankfully because removing software installed from source code could be really tricky at times. + +Back to cpufetch. I think it’s a utility for those who like to show off their desktop screenshots in various Linux group. Since we have Neofetch for the distribution and CPUFetch for CPU, I wonder if we could have a GPU fetch with ASCII art of Nvidia as well :) + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/cpufetch/ + +作者:[Abhishek Prakash][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/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://linuxhandbook.com/check-cpu-info-linux/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/lscpu-command-output.png?resize=800%2C415&ssl=1 +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/cpufetch-1.png?resize=800%2C307&ssl=1 +[4]: https://itsfoss.com/display-linux-logo-in-ascii/ +[5]: https://software.intel.com/content/www/us/en/develop/articles/introduction-to-intel-advanced-vector-extensions.html +[6]: https://aur.archlinux.org/packages/cpufetch-git +[7]: https://itsfoss.com/aur-arch-linux/ +[8]: https://itsfoss.com/install-software-from-source-code/ +[9]: https://itsfoss.com/install-git-ubuntu/ +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/cpufetch-installation.png?resize=800%2C410&ssl=1 +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/cpufetch-for-itsfoss.png?resize=800%2C335&ssl=1 +[12]: https://linuxhandbook.com/remove-files-directories/ From 0f0a027e67fa59f9a7c7294b6f99ee097d12c5e0 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 7 Apr 2021 05:03:24 +0800 Subject: [PATCH 585/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210406=20?= =?UTF-8?q?Experiment=20on=20your=20code=20freely=20with=20Git=20worktree?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210406 Experiment on your code freely with Git worktree.md --- ...t on your code freely with Git worktree.md | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 sources/tech/20210406 Experiment on your code freely with Git worktree.md diff --git a/sources/tech/20210406 Experiment on your code freely with Git worktree.md b/sources/tech/20210406 Experiment on your code freely with Git worktree.md new file mode 100644 index 0000000000..57f7d57f6b --- /dev/null +++ b/sources/tech/20210406 Experiment on your code freely with Git worktree.md @@ -0,0 +1,144 @@ +[#]: subject: (Experiment on your code freely with Git worktree) +[#]: via: (https://opensource.com/article/21/4/git-worktree) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Experiment on your code freely with Git worktree +====== +Get freedom to try things out alongside the security of having a new, +linked clone of your repository if your experiment goes wrong. +![Science lab with beakers][1] + +Git is designed in part to enable experimentation. Once you know that your work is safely being tracked and safe states exist for you to fall back upon if something goes horribly wrong, you're not afraid to try new ideas. Part of the price of innovation, though, is that you're likely to make a mess along the way. Files get renamed, moved, removed, changed, and cut into pieces. New files are introduced. Temporary files that you don't intend to track take up residence in your working directory. + +In short, your workspace becomes a house of cards, balancing precariously between _"it's almost working!"_ and _"oh no, what have I done?"_. So what happens when you need to get your repository back to a known state for an afternoon so that you can get some _real_ work done? The classic commands git branch and [git stash][2] come immediately to mind, but neither is designed to deal, one way or another, with untracked files, and changed file paths and other major shifts can make it confusing to just stash your work away for later. The answer is Git worktree. + +### What is a Git worktree + +A Git worktree is a linked copy of your Git repository, allowing you to have multiple branches checked out at a time. A worktree has a separate path from your main working copy, but it can be in a different state and on a different branch. The advantage of a new worktree in Git is that you can make a change unrelated to your current task, commit the change, and then merge it at a later date, all without disturbing your current work environment. + +The canonical example, straight from the `git-worktree` man page, is that you're working on an exciting new feature for a project when your project manager tells you there's an urgent fix required. The problem is that your working repository (your "worktree") is in disarray because you're developing a major new feature. You don't want to "sneak" the fix into your current sprint, and you don't feel comfortable stashing changes to create a new branch for the fix. Instead, you decide to create a fresh worktree so that you can make the fix there: + + +``` +$ git branch | tee +* dev +trunk +$ git worktree add -b hotfix ~/code/hotfix trunk +Preparing ../hotfix (identifier hotfix) +HEAD is now at 62a2daf commit +``` + +In your `code` directory, you now have a new directory called `hotfix`, which is a Git worktree linked to your main project repository, with its `HEAD` parked at the branch called `trunk`. You can now treat this worktree as if it were your main workspace. You can change directory into it, make the urgent fix, commit it, and eventually remove the worktree: + + +``` +$ cd ~/code/hotfix +$ sed -i 's/teh/the/' hello.txt +$ git commit --all --message 'urgent hot fix' +``` + +Once you've finished your urgent work, you can return to your previous task. You're in control of when your hotfix gets integrated into the main project. For instance, you can push the change directly from its worktree to the project's remote repo: + + +``` +$ git push origin HEAD +$ cd ~/code/myproject +``` + +Or you can archive the worktree as a TAR or ZIP file: + + +``` +$ cd ~/code/myproject +$ git archive --format tar --output hotfix.tar master +``` + +Or you can fetch the changes locally from the separate worktree: + + +``` +$ git worktree list +/home/seth/code/myproject  15fca84 [dev] +/home/seth/code/hotfix     09e585d [master] +``` + +From there, you can merge your changes using whatever strategy works best for you and your team. + +### Listing active worktrees + +You can get a list of the worktrees and see what branch each has checked out using the `git worktree list` command: + + +``` +$ git worktree list +/home/seth/code/myproject  15fca84 [dev] +/home/seth/code/hotfix     09e585d [master] +``` + +You can use this from within either worktree. Worktrees are always linked (unless you manually move them, breaking Git's ability to locate a worktree, and therefore severing the link). + +### Moving a worktree + +Git tracks the locations and states of a worktree in your project's `.git` directory: + + +``` +$ cat ~/code/myproject/.git/worktrees/hotfix/gitdir +/home/seth/code/hotfix/.git +``` + +If you need to relocate a worktree, you must do that using `git worktree move`; otherwise, when Git tries to update the worktree's status, it fails: + + +``` +$ mkdir ~/Temp +$ git worktree move hotfix ~/Temp +$ git worktree list +/home/seth/code/myproject  15fca84 [dev] +/home/seth/Temp/hotfix     09e585d [master] +``` + +### Removing a worktree + +When you're finished with your work, you can remove it with the `remove` subcommand: + + +``` +$ git worktree remove hotfix +$ git worktree list +/home/seth/code/myproject  15fca84 [dev] +``` + +To ensure your `.git` directory is clean, use the `prune` subcommand after removing a worktree: + + +``` +`$ git worktree remove prune` +``` + +### When to use worktrees + +As with many options, whether it's tabs or bookmarks or automatic backups, it's up to you to keep track of the data you generate, or it could get overwhelming. Don't use worktrees so often that you end up with 20 copies of your repo, each in a slightly different state. I find it best to create a worktree, do the task that requires it, commit the work, and then remove the tree. Keep it simple and focused. + +The important thing is that worktrees provide improved flexibility for how you manage a Git repository. Use them when you need them, and never again scramble to preserve your working state just to check something on another branch. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/git-worktree + +作者:[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/science_experiment_beaker_lab.png?itok=plKWRhlU (Science lab with beakers) +[2]: https://opensource.com/article/21/4/git-stash From 43f413537a624a76c5b5ac699c3cbd78b4b76977 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 7 Apr 2021 05:03:37 +0800 Subject: [PATCH 586/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210406=20?= =?UTF-8?q?Teach=20anyone=20how=20to=20code=20with=20Hedy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210406 Teach anyone how to code with Hedy.md --- ...0406 Teach anyone how to code with Hedy.md | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 sources/tech/20210406 Teach anyone how to code with Hedy.md diff --git a/sources/tech/20210406 Teach anyone how to code with Hedy.md b/sources/tech/20210406 Teach anyone how to code with Hedy.md new file mode 100644 index 0000000000..1e2122fc50 --- /dev/null +++ b/sources/tech/20210406 Teach anyone how to code with Hedy.md @@ -0,0 +1,82 @@ +[#]: subject: (Teach anyone how to code with Hedy) +[#]: via: (https://opensource.com/article/21/4/hedy-teach-code) +[#]: author: (Joshua Allen Holm https://opensource.com/users/holmja) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Teach anyone how to code with Hedy +====== +Hedy is a new programming language designed specifically for teaching +people to code. +![Teacher or learner?][1] + +Learning to code involves learning both the programming logic and the syntax of a specific programming language. When I took my first programming class in college, the language taught was C++. The first code example, the basic "Hello World" program, looked like the example below. + + +``` +#include <iostream> + +int main() { +    std::cout << "Hello World!"; +    return 0; +} +``` + +The instructor would not explain most of the code until several lessons later. The expectation was that we would just type in the code and eventually learn why things were required and how they worked. + +The complex syntax of C++ (and other, similar languages) is why Python is often suggested as an easier language for teaching programming. Here is the same example in Python: + + +``` +`print("Hello World!")` +``` + +While the basic "Hello World" example in Python is much simpler, it still has complex and precise syntax rules. The `print` function requires parentheses and quotes around the string. This can still confuse those who have no experience with programming. Python has fewer "I'll explain later" syntax issues than C++, but it still has them. + +[Hedy][2], a new language designed specifically for teaching coding, addresses the issue of syntax complexity by building multiple levels of complexity into the language. Instead of providing the full features of the language right away, Hedy takes a gradual approach and slowly becomes more complex as students work through Hedy's levels. As the levels progress, the language gains new features and eventually becomes more Python-like. There are currently seven levels available, but more are planned. + +At level 1, a Hedy program cannot do anything except print a statement (which does not require quotes or parentheses), ask a question, and echo back an answer. Level 1 has no variables, no loops, and minimal structure. Echo works almost like a variable but only for the last user input. This allows students to become comfortable with basic concepts without having to learn everything all at once. + +This is a level 1 Hedy "Hello World" program: + + +``` +`print Hello World` +``` + +Level 2 introduces variables, but because the `print` function does not use quotes, there can be some interesting outcomes. If the variable used to store a person's name is `name`, it is impossible to print the output "Your name is [name]" because both the first use of name, which is intended to be a string, and the second use, which is a variable, are both interpreted as a variable. If `name` is set to `John Doe`, the output of `print Your name is name.` would be "Your John Doe is John Doe." As odd as this sounds, it is a good way for to introduce the concept of variables, which just happens to be a feature added in Level 3. + +Level 3 requires quotation marks around strings, which makes variables function like they do in Python. It is now possible to output strings combined with variables to make complex statements without worrying about conflicts between variable names and words in a string. This level does away with the `echo` function, which does seem like something that might frustrate some learners. They should be using variables, which is better code, but it could be confusing if an `ask`/`echo` block of code becomes invalid syntax. + +Level 4 adds basic `if`/`else` functionality. Students can move from simple ask/answer code to complex interactions. For example, a prompt that asks, "What is your favorite color?" can accept different replies depending on what the user enters. If they enter green, the reply can be "Green! That's also my favorite color." If they enter anything else, the reply could be different. The `if`/`else` block is a basic programming concept, which Hedy introduces without having to worry about complex syntax or overly precise formatting. + +Level 5 has a `repeat` function, which adds a basic loop to the features available. This loop can only repeat the same command multiple times, so it is not as powerful as loops in Python, but it lets the students get used to the general concept of repeating commands. It's one more programming concept introduced without bogging things down with needless complexity. The students can grasp the basics of the concept before moving on to more powerful, complex versions of the same thing. + +At level 6, Hedy can now do basic math calculations. Addition, subtraction, multiplication, and division are supported, but more advanced math features are not. It is not possible to use exponents, modulo, or anything else that Python and other languages handle. As yet, no higher level of Hedy adds more complex math. + +Level 7 brings in Python-style indenting, which means `repeat` can work with multiple lines of code. Students worked with code line by line up to this point, but now they can work with blocks of code. This Hedy level still falls way short of what a non-teaching programming language can do, but it can teach students a lot. + +The easiest way to get started with Hedy is to access the [lessons][3] on the Hedy website, which is currently available in Dutch, English, French, German, Portuguese, and Spanish. This makes the learning process accessible to anyone with a web browser. It is also possible to download Hedy from [GitHub][4] and run the interpreter from the command line or run a local copy of the Hedy website with its interactive lessons. The web-based version is more approachable, but both the web and command-line versions support running Hedy programs targeted at its various levels of complexity. + +Hedy will never compete with Python, C++, or other languages as the language of choice for coding for real-world projects, but it is an excellent way to teach coding. The programs students write as part of the learning process are real and possibly even complex. Hedy can foster learning and creativity without confusing students with too much information too soon in the learning process. Like math classes, which start with counting, adding, etc., long before getting to calculus (a process that takes years), programming does not have to start with "I'll explain later" for programming language syntax issues that must be followed precisely to produce even the most basic program in the language. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/hedy-teach-code + +作者:[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/5538035618_4e19c9787c_o.png?itok=naiD1z1S (Teacher or learner?) +[2]: https://www.hedycode.com/ +[3]: https://www.hedycode.com/hedy?lang=en +[4]: https://github.com/felienne/hedy From 5c1492dabe9f145f6cacb7d152aa017137d0cefb Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 7 Apr 2021 05:03:51 +0800 Subject: [PATCH 587/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210406=20?= =?UTF-8?q?Use=20Apache=20Superset=20for=20open=20source=20business=20inte?= =?UTF-8?q?lligence=20reporting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210406 Use Apache Superset for open source business intelligence reporting.md --- ... source business intelligence reporting.md | 145 ++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 sources/tech/20210406 Use Apache Superset for open source business intelligence reporting.md diff --git a/sources/tech/20210406 Use Apache Superset for open source business intelligence reporting.md b/sources/tech/20210406 Use Apache Superset for open source business intelligence reporting.md new file mode 100644 index 0000000000..48ee2a41fa --- /dev/null +++ b/sources/tech/20210406 Use Apache Superset for open source business intelligence reporting.md @@ -0,0 +1,145 @@ +[#]: subject: (Use Apache Superset for open source business intelligence reporting) +[#]: via: (https://opensource.com/article/21/4/business-intelligence-open-source) +[#]: author: (Maxime Beauchemin https://opensource.com/users/mistercrunch) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Use Apache Superset for open source business intelligence reporting +====== +Since its creation in 2015 at an Airbnb hackathon, Apache Superset has +matured into a leading open source BI solution. +![metrics and data shown on a computer screen][1] + +They say software is eating the world, but it's equally clear that open source is taking over software. + +Simply put, open source is a superior approach for building and distributing software because it provides important guarantees around how software can be discovered, tried, operated, collaborated on, and packaged. For those reasons, it is not surprising that it has taken over most of the modern data stack: Infrastructure, databases, orchestration, data processing, AI/ML, and beyond. + +Looking back, the main reason why I originally created both [Apache Airflow][2] and [Apache Superset][3] while I was at Airbnb from 2014-17 is that the vendors in the data space were failing to: + + * Keep up with the pace of innovation in the data ecosystem + * Give power to users who wanted to satisfy their more advanced use cases + + + +As is often the case with open source, the capacity to integrate and extend was always at the core of how we approached the architecture of those two projects. + +### Headaches with Tableau + +More specifically, for Superset, the main driver to start the project at the time was the fact that Tableau (which was, at the time, our main data visualization tool) couldn't connect natively to [Apache Druid][4] and [Trino][5]/[Presto][6]. These were our data engines of choice that provided the properties and guarantees that we needed to satisfy our data use cases. + +With Tableau's "Live Mode" misbehaving in intricate ways at the time (I won't get into this!), we were steered towards using Tableau Extracts. Extracts crumbled under the data volumes we had at Airbnb, creating a whole lot of challenges around non-additive metrics (think distinct user counts) and forcing us to intricately pre-compute multiple "grouping sets," which broke down some of the Tableau paradigms and confused users. Secondarily, we had a limited number of licenses for Tableau and generally had an order of magnitude more employees that wanted/needed access to our internal than our contract allowed. That's without mentioning the fact that for a cloud-native company, Tableau's Windows-centric approach at the time didn't work well for the team. + +Some of the above premises have since changed, but the power of open source and the core principles on which it's built have only grown. In this blog post, I will explain why the future of business intelligence is open source. + +## Benefits of open source + +If I could only use a single word to describe why the time is right for organizations to adopt open source BI, the word would be _freedom_. Flowing from the principle of freedom comes a few more concrete superpowers for an organization: + + * The power to customize, extend and integrate + * The power of the community + * Avoid vendor lock-in + + + +### Extend, customize, and integrate + +Airbnb wanted to integrate in-house tools like Dataportal and Minerva with a dashboarding tool to enable data democratization within their organization. Because Superset is open source and Airbnb actively contributes to the project, they could supercharge Superset with in-house components with relative ease. + +On the visualization side, organizations like Nielsen create new visualizations and deploy them in their Superset environments. They're going a step further by empowering their engineers to contribute to Superset's customizability and extensibility. The Superset platform is now flexible enough so that anyone can build their [own custom visualization plugins][7], a benefit that is unmatched in the marketplace. + +Many report using the rich [REST API that ships with Superset][8] within the wider community, allowing them full programmatic control over all aspects of the platform. Given that pretty much everything that users can do in Superset can be done through the API, the sky is the limit for automating processes in and around Superset. + +Around the topic of integration, members from the Superset community have added support for over 30 databases ([and growing!][9]) by submitting code and documentation contributions. Because the core contributors bet on the right open source components ([SQLAlchemy][10] and Python [DB-API 2.0][11]), the Superset community both gives and receives to/from the broader Python community. + +### The power of the community + +Open source communities are composed of a diverse group of people who come together over a similar set of needs. This group is empowered to contribute to the common good. Vendors, on the other hand, tend to focus on their most important customers. Open source is a fundamentally different model that's much more collaborative and frictionless. As a result of this fundamentally de-centralized model, communities are very resilient to changes that vendor-led products struggle with. As contributors and organizations come and go, the community lives on! + +At the core of the community are the active contributors that typically operate as a dynamic meritocracy. Network effects attract attention and talent, and communities welcome and offer guidance to newcomers because their goals are aligned. With the rise of platforms like Gitlab and Github, software is pretty unique in that engineers and developers from around the world seem to be able to come together and work collaboratively with minimal overhead. Those dynamics are fairly well understood and accepted as a disruptive paradigm shift in how people collaborate to build modern software. + +![Growth in Monthly Unique Contributors][12] + +Growth in Monthly Unique Contributors + +Beyond the software at the core of the project, dynamic communities contribute in all sorts of ways that provide even more value. Here are some examples: + + * Rich and up-to-date documentation + * Example use cases and testimonials, often in the form of blog posts + * Bug reports and bug fixes, contributing to stability and quality + * Ever-growing online knowledge bases and FAQs + * How-to videos and conference talks + * Real-time support networks of enthusiasts and experts in forums and on [chat platforms][13] + * Dynamic mailing lists where core contributors propose and debate over complex issues + * Feedback loops, ways to suggest features and influence roadmaps + + + +### Avoid lock-in + +Recently, [Atlassian acquired the proprietary BI platform Chart.io][14], started to downsize the Chart.io team, and announced their intention to shut down the platform. Their customers now have to scramble and find a new home for their analytics assets that they now have to rebuild. + +![Chart.io Shutting Down][15] + +Chart.io Shutting Down + +This isn't a new phenomenon. Given how mature and dynamic the BI market is, consolidation has been accelerating over the past few years: + + * Tableau was acquired by Salesforce + * Looker was acquired by Google Cloud + * Periscope was acquired by Sisense + * Zoomdata was acquired by Logi Analytics + + + +While consolidation is likely to continue, these concerns don't arise when your BI platform is open source. If you're self-hosting, you are essentially immune to vendor lock-in. If you choose to partner with a commercial open source software (COSS), you should have an array of options from alternative vendors to hiring expertise in the marketplace, all the way to taking ownership and operating the software on your own. + +For example, if you were using Apache Airflow service to take care of your Airflow needs, and your cloud provider decided to shut down the service, you'd be left with a set of viable options: + + * Select and migrate to another service provider in the space, such as Apache Airflow specialist [Astronomer][16]. + * Hire or consult Airflow talent that can help you take control. The community has fostered a large number of professionals who know and love Airflow and can help your organization. + * Learn and act. That is, take control and tap into the community's amazing resources to run the software on your own (Docker, Helm, k8s operator, and so on.) + + + +Even at [Preset][17], where we offer a cloud-hosted version of Superset, we don't fork the Superset code and instead run the same Superset that's available to everyone. In the Preset cloud, you can freely import and export data sources, charts, and dashboards. This is not unique to Preset. Many vendors understand that "no lock-in!" is integral to their value proposition and are incentivized to provide clear guarantees around this. + +## Open source for your data + +Open source is disruptive in the best of ways, providing freedom, and a set of guarantees that really matter when it comes to adopting software. These guarantees fully apply when it comes to business intelligence. In terms of business intelligence, Apache Superset has matured to a level where it's a compelling choice over any proprietary solution. Since its creation in 2015 at an Airbnb hackathon, the project has come a very long way indeed. Try it yourself to discover a combination of features and guarantees unique to open source BI. To learn more, visit and [join our growing community][18]. + +In this article, I review some of the top open source business intelligence (BI) and reporting... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/business-intelligence-open-source + +作者:[Maxime Beauchemin][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/mistercrunch +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_data_dashboard_system_computer_analytics.png?itok=oxAeIEI- (metrics and data shown on a computer screen) +[2]: https://airflow.apache.org/ +[3]: https://superset.apache.org/ +[4]: https://druid.apache.org/ +[5]: https://trino.io/ +[6]: https://prestodb.io/ +[7]: https://preset.io/blog/2020-07-02-hello-world/ +[8]: https://superset.apache.org/docs/rest-api/ +[9]: https://superset.apache.org/docs/databases/installing-database-drivers +[10]: https://www.sqlalchemy.org/ +[11]: https://www.python.org/dev/peps/pep-0249/ +[12]: https://opensource.com/sites/default/files/uniquecontributors.png +[13]: https://opensource.com/article/20/7/mattermost +[14]: https://www.atlassian.com/blog/announcements/atlassian-acquires-chartio +[15]: https://opensource.com/sites/default/files/chartio.jpg +[16]: https://www.astronomer.io/ +[17]: https://preset.io/ +[18]: https://superset.apache.org/community/ From 3c792b993d185babb1a465e466751b1ca9badbd6 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 7 Apr 2021 08:40:42 +0800 Subject: [PATCH 588/818] translating --- ...x Dual Boot Setup- Here-s How to Fix it.md | 104 ------------------ ...x Dual Boot Setup- Here-s How to Fix it.md | 104 ++++++++++++++++++ 2 files changed, 104 insertions(+), 104 deletions(-) delete mode 100644 sources/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md create mode 100644 translated/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md diff --git a/sources/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md b/sources/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md deleted file mode 100644 index fd32676c3b..0000000000 --- a/sources/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md +++ /dev/null @@ -1,104 +0,0 @@ -[#]: subject: (Wrong Time Displayed in Windows-Linux Dual Boot Setup? Here’s How to Fix it) -[#]: via: (https://itsfoss.com/wrong-time-dual-boot/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Wrong Time Displayed in Windows-Linux Dual Boot Setup? Here’s How to Fix it -====== - -If you [dual boot Windows and Ubuntu][1] or any other Linux distribution, you might have noticed a time difference between the two operating systems. - -When you [use Linux][2], it shows the correct time. But when you boot into Windows, it shows the wrong time. Sometimes, it is the opposite and Linux shows the wrong time and Windows has the correct time. - -That’s strange specially because you are connected to the internet and your date and time is set to be used automatically. - -Don’t worry! You are not the only one to face this issue. You can fix it by using the following command in the Linux terminal: - -``` -timedatectl set-local-rtc 1 -``` - -Again, don’t worry. I’ll explain why you encounter a time difference in a dual boot setup. I’ll show you how the above command fixes the wrong time issue in Windows after dual boot. - -### Why Windows and Linux show different time in dual boot? - -A computer has two main clocks: a system clock and a hardware clock. - -A hardware clock which is also called RTC ([real time clock][3]) or CMOS/BIOS clock. This clock is outside the operating system, on your computer’s motherboard. It keeps on running even after your system is powered off. - -The system clock is what you see inside your operating system. - -When your computer is powered on, the hardware clock is read and used to set the system clock. Afterwards, the system clock is used for tracking time. If your operating system makes any changes to system clock, like changing time zone etc, it tries to sync this information to the hardware clock. - -By default, Linux assumes that the time stored in the hardware clock is in UTC, not the local time. On the other hand, Windows thinks that the time stored on the hardware clock is local time. That’s where the trouble starts. - -Let me explain with examples. - -You see I am in Kolkata time zone which is UTC+5:30. After installing when I set the [timezon][4][e][4] [in Ubuntu][4] to the Kolkata time zone, Ubuntu syncs this time information to the hardware clock but with an offset of 5:30 because it has to be in UTC for Linux. - -Let’ say the current time in Kolkata timezone is 15:00 which means that the UTC time is 09:30. - -Now when I turn off the system and boot into Windows, the hardware clock has the UTC time (09:30 in this example). But Windows thinks the hardware clock has stored the local time. And thus it changes the system clock (which should have shown 15:00) to use the UTC time (09:30) as the local time. And hence, Windows shows 09:30 as the time which is 5:30 hours behind the actual time (15:00 in our example). - -![][5] - -Again, if I set the correct time in Windows by toggling the automatic time zone and time buttons, you know what is going to happen? Now it will show the correct time on the system (15:00) and sync this information (notice the “Synchronize your clock” option in the image) to the hardware clock. - -If you boot into Linux, it reads the time from the hardware clock which is in local time (15:00) but since Linux believes it to be the UTC time, it adds an offset of 5:30 to the system clock. Now Linux shows a time of 20:30 which is 5:30 hours ahead of the actual time. - -Now that you understand the root cause of the time difference issues in dual boot, it’s time to see how to fix the issue. - -### Fixing Windows Showing Wrong Time in a Dual Boot Setup With Linux - -There are two ways you can go about handling this issue: - - * Make Windows use UTC time for the hardware clock - * Make Linux use local time for the hardware clock - - - -It is easier to make the changes in Linux and hence I’ll recommend going with the second method. - -Ubuntu and most other Linux distributions use systemd these days and hence you can use timedatectl command to change the settings. - -What you are doing is to tell your Linux system to use the local time for the hardware clock (RTC). You do that with the `set-local-rtc` (set local time for RTC) option: - -``` -timedatectl set-local-rtc 1 -``` - -As you can notice in the image below, the RTC now uses the local time. - -![][6] - -Now if you boot into Windows, it takes the hardware clock to be as local time which is actually correct this time. When you boot into Linux, your Linux system knows that the hardware clock is using local time, not UTC. And hence, it doesn’t try to add the off-set this time. - -This fixes the time difference issue between Linux and Windows in dual boot. - -You see a warning about not using local time for RTC. For desktop setups, it should not cause any issues. At least, I cannot think of one. - -I hope I made things clear for you. If you still have questions, please leave a comment below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/wrong-time-dual-boot/ - -作者:[Abhishek Prakash][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/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ -[2]: https://itsfoss.com/why-use-linux/ -[3]: https://www.computerhope.com/jargon/r/rtc.htm -[4]: https://itsfoss.com/change-timezone-ubuntu/ -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/set-time-windows.jpg?resize=800%2C491&ssl=1 -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/set-local-time-for-rtc-ubuntu.png?resize=800%2C490&ssl=1 diff --git a/translated/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md b/translated/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md new file mode 100644 index 0000000000..ec01d190c1 --- /dev/null +++ b/translated/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md @@ -0,0 +1,104 @@ +[#]: subject: (Wrong Time Displayed in Windows-Linux Dual Boot Setup? Here’s How to Fix it) +[#]: via: (https://itsfoss.com/wrong-time-dual-boot/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Windows-Linux 双启动设置中显示时间错误?如何解决这个问题 +====== + +如果你[双启动 Windows 和 Ubuntu][1] 或任何其他 Linux 发行版,你可能会注意到两个操作系统之间的时间差异。 + +当你[使用 Linux][2] 时,它会显示正确的时间。但当你进入 Windows 时,它显示的时间是错误的。有时,情况正好相反,Linux 显示的是错误的时间,而 Windows 的时间是正确的。 + +特别奇怪的是,因为你已连接到互联网,并且已将日期和时间设置为自动使用。 + +别担心!你并不是唯一一个遇到这种问题的人。你可以在 Linux 终端上使用以下命令来解决这个问题: + +``` +timedatectl set-local-rtc 1 +``` + +同样,不要担心。我会解释为什么你在双启动设置中会遇到时间差。我会向你展示上面的命令是如何修复 Windows 双启动后的时间错误问题的。 + +### 为什么 Windows 和 Linux 在双启动时显示不同的时间? + +一台电脑有两个主要时钟:系统时钟和硬件时钟。 + +硬件时钟也叫 RTC([实时时钟][3])或 CMOS/BIOS 时钟。这个时钟在操作系统之外,在电脑的主板上。即使在你的系统关机后,它也会继续运行。 + +系统时钟是你在操作系统内看到的。 + +当计算机开机时,硬件时钟被读取并用于设置系统时钟。之后,系统时钟被用于跟踪时间。如果你的操作系统对系统时钟做了任何改变,比如改变时区等,它就会尝试将这些信息同步到硬件时钟上。 + +默认情况下,Linux 认为硬件时钟中存储的时间是 UTC,而不是本地时间。另一方面,Windows 认为硬件时钟上存储的时间是本地时间。这就是问题的开始。 + +让我用例子来解释一下。 + +你看我在加尔各答 UTC+5:30 时区。安装后,当我把 [Ubuntu 中的时区][4]]设置为加尔各答时区时,Ubuntu 会把这个时间信息同步到硬件时钟上,但会有 5:30 的偏移,因为对于 Linux 来说它必须是 UTC。 + +假设加尔各答时区的当前时间是 15:00,这意味着 UTC 时间是 09:30。 + +现在当我关闭系统并启动到 Windows 时,硬件时钟有 UTC 时间(本例中为 09:30)。但是 Windows 认为硬件时钟已经存储了本地时间。因此,它改变了系统时钟(应该显示为 15:00),而使用 UTC 时间(09:30)作为本地时间。因此,Windows 显示时间为 09:30,这比实际时间(我们的例子中为 15:00)早了 5:30。 + +![][5] + +同样,如果我在 Windows 中通过自动时区和时间按钮来设置正确的时间,你知道会发生什么吗?现在它将在系统上显示正确的时间(15:00),并将此信息(注意图片中的”同步你的时钟“选项)同步到硬件时钟。 + +如果你启动到 Linux,它会从硬件时钟读取时间,而硬件时钟是当地时间(15:00),但由于 Linux 认为它是 UTC 时间,所以它在系统时钟上增加了 5:30 的偏移。现在 Linux 显示的时间是 20:30,比实际时间超出晚了 5:30。 + +现在你了解了双启动中时差问题的根本原因,是时候看看如何解决这个问题了。 + +### 修复 Windows 在 Linux 双启动设置中显示错误时间的问题 + +有两种方法可以处理这个问题: + + * 让 Windows 将硬件时钟作为 UTC 时间 + * 让 Linux 将硬件时钟作为本地时间 + + + +在 Linux 中进行修改是比较容易的,因此我推荐使用第二种方法。 + +现在 Ubuntu 和大多数其他 Linux 发行版都使用 systemd,因此你可以使用 timedatectl 命令来更改设置。 + +你要做的是告诉你的 Linux 系统将硬件时钟(RTC)作为本地时间。你可以通过 `set-local-rtc` (为 RTC 设置本地时间)选项来实现: + +``` +timedatectl set-local-rtc 1 +``` + +如下图所示,RTC 现在使用本地时间。 + +![][6] + +现在如果你启动 Windows,它把硬件时钟当作本地时间,而这个时间实际上是正确的。当你在 Linux 中启动时,你的 Linux 系统知道硬件时钟使用的是本地时间,而不是 UTC。因此,它不会尝试添加这个时间的偏移。 + +这就解决了 Linux 和 Windows 双启动时的时差问题。 + +你会看到一个关于 RTC 不使用本地时间的警告。对于桌面设置,它不应该引起任何问题。至少,我想不出有什么问题。 + +希望我把事情给你讲清楚了。如果你还有问题,请在下面留言。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/wrong-time-dual-boot/ + +作者:[Abhishek Prakash][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://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ +[2]: https://itsfoss.com/why-use-linux/ +[3]: https://www.computerhope.com/jargon/r/rtc.htm +[4]: https://itsfoss.com/change-timezone-ubuntu/ +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/set-time-windows.jpg?resize=800%2C491&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/set-local-time-for-rtc-ubuntu.png?resize=800%2C490&ssl=1 From 15eafd167783d33b74d8d5b00fb8aee7e11e6e6d Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 7 Apr 2021 08:51:11 +0800 Subject: [PATCH 589/818] translating --- ...5 Plausible- Privacy-Focused Google Analytics Alternative.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md b/sources/tech/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md index fdd765447f..51938e2449 100644 --- a/sources/tech/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md +++ b/sources/tech/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md @@ -2,7 +2,7 @@ [#]: via: (https://itsfoss.com/plausible/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 4c2803a96d2c454125e8f14be75863fee935d4bf Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 7 Apr 2021 09:55:39 +0800 Subject: [PATCH 590/818] PRF @lxbwolf --- ...les into HTML or Other Formats in Linux.md | 40 ++++++------------- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/translated/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md b/translated/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md index e9aee0c478..997468b2fc 100644 --- a/translated/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md +++ b/translated/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md @@ -3,16 +3,18 @@ [#]: author: "Bill Dyer https://itsfoss.com/author/bill/" [#]: collector: "lujun9972" [#]: translator: "lxbwolf" -[#]: reviewer: " " +[#]: reviewer: "wxy" [#]: publisher: " " [#]: url: " " 在 Linux 中把多个 Markdown 文件转换成 HTML 或其他格式 ====== +![](https://img.linux.net.cn/data/attachment/album/202104/07/095441bztj6cz68j89568u.jpg) + 很多时候我与 Markdown 打交道的方式是,先写完一个文件,然后把它转换成 HTML 或其他格式。也有些时候,需要创建一些新的文件。当我要写多个 Markdown 文件时,通常要把他们全部写完之后才转换它们。 -我用 pandoc 来转换文件,它可以一次性地转换所有 Markdown 文件。 +我用 `pandoc` 来转换文件,它可以一次性地转换所有 Markdown 文件。 Markdown 格式的文件可以转换成 .html 文件,有时候我需要把它转换成其他格式,如 epub,这个时候 [pandoc][1] 就派上了用场。我更喜欢用命令行,因此本文我会首先介绍它,然而你还可以使用 [VSCodium][2] 在非命令行下完成转换。后面我也会介绍它。 @@ -24,7 +26,7 @@ Markdown 格式的文件可以转换成 .html 文件,有时候我需要把它 sudo apt-get install pandoc ``` -本例中,在名为 md_test 目录下我有四个 Markdown 文件需要转换。 +本例中,在名为 `md_test` 目录下我有四个 Markdown 文件需要转换。 ``` [email protected]:~/Documents/md_test$ ls -l *.md @@ -35,20 +37,18 @@ sudo apt-get install pandoc [email protected]:~/Documents/md_test$ ``` -现在还没有 HTML 文件。现在我要对这些文件使用 pandoc。我会运行一行命令来实现: +现在还没有 HTML 文件。现在我要对这些文件使用 `pandoc`。我会运行一行命令来实现: - * 调用 pandoc + * 调用 `pandoc` * 读取 .md 文件并导出为 .html - - 下面是我要运行的命令: ``` for i in *.md ; do echo "$i" && pandoc -s $i -o $i.html ; done ``` -如果你不太理解上面的命令中的 `;`,可以参考[在 Linux 中一次执行多个命令][3]。 +如果你不太理解上面的命令中的 `;`,可以参考 [在 Linux 中一次执行多个命令][3]。 我执行命令后,运行结果如下: @@ -74,34 +74,22 @@ file04.md 转换很成功,现在你已经有了四个 HTML 文件,它们可以用在 Web 服务器上。 -pandoc 功能相当多,你可以通过指定输出文件的扩展名来把 markdown 文件转换成其他支持的格式。不难理解它为什么会被认为是[最好的写作开源工具][4]。 - -**推荐阅读:** - -![][5] - -#### [Linux 下 11 个最好的 Markdown 编辑器][6] - -列出了 Linux 不同发行版本下好看且功能多样的最好的 Markdown 编辑器。 +pandoc 功能相当多,你可以通过指定输出文件的扩展名来把 Markdown 文件转换成其他支持的格式。不难理解它为什么会被认为是[最好的写作开源工具][4]。 ### 使用 VSCodium 把 Markdown 文件转换成 HTML(GUI 方式) -就像我们前面说的那样,我通常使用命令行,但是对于批量转换,我不会使用命令行,你也不必。VSCode 或 [VSCodium][7] 可以完成批量操作。你只需要安装一个 _Markdown-All-in-One_ 扩展,就可以在一次运行中转换多个 Markdown 文件。 +就像我们前面说的那样,我通常使用命令行,但是对于批量转换,我不会使用命令行,你也不必。VSCode 或 [VSCodium][7] 可以完成批量操作。你只需要安装一个 Markdown-All-in-One 扩展,就可以在一次运行中转换多个 Markdown 文件。 有两种方式安装这个扩展: * VSCodium 的终端 * VSCodium 的插件管理器 - - 通过 VSCodium 的终端安装该扩展: 1. 点击菜单栏的 `终端`。会打开终端面板 2. 输入,或[复制下面的命令并粘贴到终端][8]: - - ``` codium --install-extension yzhang.markdown-all-in-one ``` @@ -113,9 +101,7 @@ codium --install-extension yzhang.markdown-all-in-one 第二种安装方式是通过 VSCodium 的插件/扩展管理器: 1. 点击 VSCodium 窗口左侧的块区域。会出现一个扩展列表,列表最上面有一个搜索框。 - 2. 在搜索框中输入 `Markdown All in One`。在列表最上面会出现该扩展。点击 `安装` 按钮来安装它。如果你已经安装过,在安装按钮的位置会出现一个齿轮图标。 - - + 2. 在搜索框中输入 “Markdown All in One”。在列表最上面会出现该扩展。点击 “安装” 按钮来安装它。如果你已经安装过,在安装按钮的位置会出现一个齿轮图标。 ![][10] @@ -123,7 +109,7 @@ codium --install-extension yzhang.markdown-all-in-one 点击 VSCodium 窗口左侧的纸张图标。你可以选择文件夹。打开文件夹后,你需要打开至少一个文件。你也可以打开多个文件,但是最少打开一个。 -当打开文件后,按下 `CTRL+SHIFT+P` 唤起命令面板。然后,在出现的搜索框中输入 `Markdown`。当你输入时,会出现一列 Markdown 相关的命令。其中有一个是 `Markdown All in One: Print documents to HTML` 命令。点击它: +当打开文件后,按下 `CTRL+SHIFT+P` 唤起命令面板。然后,在出现的搜索框中输入 `Markdown`。当你输入时,会出现一列 Markdown 相关的命令。其中有一个是 `Markdown All in One: Print documents to HTML` 命令。点击它: ![][11] @@ -140,7 +126,7 @@ via: https://itsfoss.com/convert-markdown-files/ 作者:[Bill Dyer][a] 选题:[lujun9972][b] 译者:[lxbwolf](https://github.com/lxbwolf) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 08a2b418714ce0a9720ad31faa09a5435ec41272 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 7 Apr 2021 09:56:10 +0800 Subject: [PATCH 591/818] PUB @lxbwolf https://linux.cn/article-13274-1.html --- ...iple Markdown Files into HTML or Other Formats in Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md (98%) diff --git a/translated/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md b/published/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md similarity index 98% rename from translated/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md rename to published/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md index 997468b2fc..fea402d238 100644 --- a/translated/tech/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md +++ b/published/20210404 Converting Multiple Markdown Files into HTML or Other Formats in Linux.md @@ -4,8 +4,8 @@ [#]: collector: "lujun9972" [#]: translator: "lxbwolf" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-13274-1.html" 在 Linux 中把多个 Markdown 文件转换成 HTML 或其他格式 ====== From ebf8df169e90c8ed98ae255131ac433ec693246d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 7 Apr 2021 22:06:00 +0800 Subject: [PATCH 592/818] APL --- sources/tech/20210303 5 signs you might be a Rust programmer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210303 5 signs you might be a Rust programmer.md b/sources/tech/20210303 5 signs you might be a Rust programmer.md index 8c73cc5220..e2ae42e8a5 100644 --- a/sources/tech/20210303 5 signs you might be a Rust programmer.md +++ b/sources/tech/20210303 5 signs you might be a Rust programmer.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/3/rust-programmer) [#]: author: (Mike Bursell https://opensource.com/users/mikecamel) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 536c7c1ec32d981776d8fba92080c1d3f32011f9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 7 Apr 2021 23:13:37 +0800 Subject: [PATCH 593/818] TSL --- ... 5 signs you might be a Rust programmer.md | 71 ------------------ ... 5 signs you might be a Rust programmer.md | 73 +++++++++++++++++++ 2 files changed, 73 insertions(+), 71 deletions(-) delete mode 100644 sources/tech/20210303 5 signs you might be a Rust programmer.md create mode 100644 translated/tech/20210303 5 signs you might be a Rust programmer.md diff --git a/sources/tech/20210303 5 signs you might be a Rust programmer.md b/sources/tech/20210303 5 signs you might be a Rust programmer.md deleted file mode 100644 index e2ae42e8a5..0000000000 --- a/sources/tech/20210303 5 signs you might be a Rust programmer.md +++ /dev/null @@ -1,71 +0,0 @@ -[#]: subject: (5 signs you might be a Rust programmer) -[#]: via: (https://opensource.com/article/21/3/rust-programmer) -[#]: author: (Mike Bursell https://opensource.com/users/mikecamel) -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -5 signs you might be a Rust programmer -====== -During my journey to learning Rust, I've noticed a few common behaviors -of fellow Rustaceans. -![name tag that says hello my name is open source][1] - -I'm a fairly recent [convert to Rust][2], which I started to learn around the end of April 2020. But, like many converts, I'm an enthusiastic evangelist. I'm also not a very good Rustacean, truth be told, in that my coding style isn't great, and I don't write particularly idiomatic Rust. I suspect this is partly because I never really finished learning Rust before diving in and writing quite a lot of code (some of which is coming back to haunt me) and partly because I'm just not that good a programmer. - -But I love Rust, and so should you. It's friendly—well, more friendly than C or C++; it's ready for low-level systems tasks—more so than Python, it's well-structured—more than Perl; and, best of all, it's completely open source from the design level up—much more than Java, for instance. - -Despite my lack of expertise, I noticed a few things that I suspect are common to many Rust enthusiasts and programmers. If you say "yes" to the following five signs (the first of which was sparked by some exciting recent news), you, too, might be a Rust programmer. - -### 1\. The word "foundation" excites you - -For Rust programmers, the word "foundation" will no longer be associated first and foremost with Isaac Asimov but with the newly formed [Rust Foundation][3]. Microsoft, Huawei, Google, AWS, and Mozilla are providing the directors (and presumably most of the initial funding) for the Foundation, which will look after all aspects of the language, "heralding Rust's arrival as an enterprise production-ready technology," [according to interim executive director][4] Ashley Williams. (On a side note, it's great to see a woman heading up such a major industry initiative.) - -The Foundation seems committed to safeguarding the philosophy of Rust and ensuring that everybody has the opportunity to get involved. Rust is, in many ways, a poster-child example of an open source project. Not that it's perfect (neither the language nor the community), but in that there seem to be sufficient enthusiasts who are dedicated to preserving the high-involvement, low-bar approach to community, which I think of as core to much of open source. I strongly welcome the move, which I think can only help promote Rust's adoption and maturity over the coming years and months. - -### 2\. You get frustrated by newsfeed references to Rust (the game) - -There's another computer-related thing out there that goes by the name "Rust," and it's a "multi-player only survival video game." It's newer than Rust the language (having been announced in 2013 and released in 2018), but I was once searching for Rust-related swag and made the mistake of searching for the game by that name. The interwebs being what they are, this meant that my news feed is now infected with this alternative Rust beast, and I now get random updates from their fandom and PR folks. This is low-key annoying, but I'm pretty sure I'm not alone in the Rust (language) community. I strongly suggest that if you _do_ want to find out more about this upstart in the computing world, you use a privacy-improving (I refuse to say "privacy-preserving") [open source browser][5] to do your research. - -### 3\. The word "unsafe" makes you recoil in horror - -Rust (the language, again) does a _really_ good job of helping you do the Right Thing™, certainly in terms of memory safety, which is a major concern within C and C++ (not because it's impossible but because it's really hard to get right consistently). Dave Herman wrote a post in 2016 on why safety is such a positive attribute of the Rust language: [_Safety is Rust's fireflower_][6]. Safety (memory, type safety) may not be glamourous, but it's something you become used to—and grateful for—as you write more Rust, particularly if you're involved in any systems programming, which is where Rust often excels. - -Now, Rust doesn't _stop_ you from doing the Wrong Thing™, but it does make you make a conscious decision when you wish to go outside the bounds of safety by making you use the `unsafe` keyword. This is good not only for you, as it will (hopefully) make you think really, really carefully about what you're putting in any code block that uses it; it is also good for anyone reading your code. It's a trigger-word that makes any half-sane Rustacean shiver at least slightly, sit upright in their chair, and think, "hmm, what's going on here? I need to pay special attention." If you're lucky, the person reading your code may be able to think of ways of rewriting it such that it _does_ make use of Rust's safety features or at least reduces the amount of unsafe code that gets committed and released. - -### 4\. You wonder why there's no emoji for `?;` or `{:?}` or `::<>` - -Everybody loves (to hate) the turbofish (`::<>`) but there are other semantic constructs that you see regularly in Rust code. In particular, `{:?}` (for string formatting) and `?;` (`?` is a way of propagating errors up the calling stack, and `;` ends the line/block, so you often see them together). They're so common in Rust code that you just learn to parse them as you go, and they're also so useful that I sometimes wonder why they've not made it into normal conversation, at least as emojis. There are probably others, too. What would be your suggestions? - -### 5\. Clippy is your friend (and not an animated paperclip) - -Clippy, the Microsoft animated paperclip, was a "feature" that Office users learned very quickly to hate and has become the starting point for many [memes][7]. On the other hand, `cargo clippy` is one of those [amazing Cargo commands][8] that should become part of every Rust programmer's toolkit. Clippy is a language linter and helps improve your code to make it cleaner, tidier, more legible, more idiomatic, and generally less embarrassing when you share it with your colleagues or the rest of the world. Cargo has arguably rehabilitated the name "Clippy," and although it's not something I'd choose to name one of my kids, I don't feel a sense of unease whenever I come across the term on the web anymore. - -* * * - -_This article was originally published on [Alice, Eve, and Bob][9] and is reprinted with the author's permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/rust-programmer - -作者:[Mike Bursell][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/mikecamel -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/EDU_OSDC_IntroOS_520x292_FINAL.png?itok=woiZamgj (name tag that says hello my name is open source) -[2]: https://opensource.com/article/20/6/why-rust -[3]: https://foundation.rust-lang.org/ -[4]: https://foundation.rust-lang.org/posts/2021-02-08-hello-world/ -[5]: https://opensource.com/article/19/7/open-source-browsers -[6]: https://www.thefeedbackloop.xyz/safety-is-rusts-fireflower/ -[7]: https://knowyourmeme.com/memes/clippy -[8]: https://opensource.com/article/20/11/commands-rusts-cargo -[9]: https://aliceevebob.com/2021/02/09/5-signs-that-you-may-be-a-rust-programmer/ diff --git a/translated/tech/20210303 5 signs you might be a Rust programmer.md b/translated/tech/20210303 5 signs you might be a Rust programmer.md new file mode 100644 index 0000000000..582bac6d3e --- /dev/null +++ b/translated/tech/20210303 5 signs you might be a Rust programmer.md @@ -0,0 +1,73 @@ +[#]: subject: (5 signs you might be a Rust programmer) +[#]: via: (https://opensource.com/article/21/3/rust-programmer) +[#]: author: (Mike Bursell https://opensource.com/users/mikecamel) +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +你可能是 Rust 程序员的五个迹象 +====== + +> 在我学习 Rust 的过程中,我注意到了 Rust 一族的一些常见行为。 + +![name tag that says hello my name is open source][1] + +我是最近才 [皈依 Rust][2] 的,我大约在 2020 年 4 月底开始学习。但是,像许多皈依者一样,我还是一个热情的布道者。说实话,我也不是一个很好的 Rust 人,因为我的编码风格不是很好,我写的也不是特别符合 Rust 习惯。我猜想这一方面是因为我在写大量代码之前还没有没有真正学完 Rust(其中一些代码又困扰了我),另一方面是因为我并不是那么优秀的程序员。 + +但我喜欢 Rust,你也应该喜欢。它很友好,比 C 或 C++ 更友好;它为低级系统任务做好了准备,这比 Python 做的更好;而且结构良好,这要超过 Perl;而且,最重要的是,它从设计层面开始,它就是完全开源的,这要比 Java 那些语言好得多。 + +尽管我缺乏专业知识,但我注意到了一些我认为是许多 Rust 爱好者和程序员的共同点。如果你对以下五个迹象说“是”(其中第一个迹象是由最近的一些令人兴奋的新闻引发的),那么你也可能是一个 Rust 程序员。 + +### 1、“基金会”一词会使你兴奋 + +对于 Rust 程序员来说,“基金会”一词将不再与艾萨克·阿西莫夫Isaac Asimov关联在一起,而是与新成立的 [Rust 基金会][3] 关联。微软、华为、谷歌、AWS 和Mozilla 正在为该基金会提供了董事(大概也是大部分初始资金),该基金会将负责该语言的各个方面,“预示着 Rust 成为企业生产级技术的到来”,[根据临时执行董事][4] Ashley Williams 说。(顺便说一句,很高兴看到一位女士领导这样一项重大的行业计划。) + +该基金会似乎致力于维护 Rust 的理念,并确保每个人都有参与的机会。在许多方面,Rust 都是开源项目的典型示例。并不是说它是完美的(无论是语言还是社区),而是因为似乎有足够的爱好者致力于维护高参与度、低门槛的社区方法,我认为这是许多开源项目的核心。我强烈欢迎此举,我认为此举只会帮助促进 Rust 在未来数年和数月内的采用和成熟。 + +### 2、你会因为新闻源中提到 Rust 游戏而感到沮丧 + +还有一款和电脑有关的东西,也叫做“Rust”,它是一款“只限多玩家的生存电子游戏”。它比 Rust 这个语言更新一些(2013 年宣布,2018 年发布),但我曾经在搜索 Rust 相关的内容时,犯了一个错误,这个名字搜索了游戏。互联网络就是这样的,这意味着我的新闻源现在被这个另类的 Rust 野兽感染了,我现在会从它的影迷和公关人员那里随机得到一些更新消息。这是个低调的烦恼,但我很确定在 Rust(语言)社区中并不是就我一个人这样。我强烈建议,如果你确实想了解更多关于这个计算世界的后起之秀的信息,你可以使用一个提高隐私(我拒绝说 "保护隐私")的 [开源浏览器][5] 来进行研究。 + +### 3、“不安全”这个词会让你感到恐惧。 + +Rust(语言,再次强调)在帮助你做**正确的事情**™方面做得非常好,当然,在内存安全方面,这是 C 和 C++ 内部的主要关注点(不是因为不可能做到,而是因为真的很难持续正确)。Dave Herman 在 2016 年写了一篇文章,讲述了为什么安全是 Rust 语言的一个积极属性:《[Safety is Rust's fireflower][6]》。安全性(内存、类型安全)可能并不赏心悦目,但随着你写的 Rust 越多,你就会习惯并感激它,尤其是当你参与任何系统编程时,这也是 Rust 经常擅长的地方。 + +现在,Rust 并不能阻止你做**错误的事情**™,但它确实通过让你使用 `unsafe` 关键字,让你在希望超出安全范围的时候做出一个明智的决定。这不仅对你有好处,因为它(希望)会让你非常、非常仔细地思考你在任何使用它的代码块中放入了什么;它对任何阅读你的代码的人也有好处,这是一个触发词,它能让任何不太清醒的 Rust 人至少微微打起精神,在椅子上坐直,然后想:“嗯,这里发生了什么?我需要特别注意。”如果幸运的话,读你代码的人也许能想到重写它的方法,使它利用到 Rust 的安全特性,或者至少减少了提交和发布的不安全代码的数量。 + +### 4、你想知道为什么没有 `?;`、`{:?}` 、`::<>` 这样的表情符号 + +人们喜欢(或讨厌)涡轮鱼(`::<>`),但在 Rust 代码中你经常还会看到其他的语义结构。特别是 `{:?}` (用于字符串格式化)和 `?;`(`?` 是向调用栈传播错误的一种方式,`;` 则是行/块的结束符,所以你经常会看到它们在一起)。它们在 Rust 代码中很常见,你只需边走边学,边走边解析,而且它们也很有用,我有时会想,为什么它们没有被纳入到正常对话中,至少作为表情符号。可能还有其他的。你有什么建议? + +### 5、Clippy 是你的朋友(而不是一个动画回形针) + +微软的动画回形针 Clippy 可能是 Office 用户很快就觉得讨厌的“功能”,并成为许多 [模因][7] 的起点。另一方面,`cargo clippy` 是那些 [很棒的 Cargo 命令][8] 之一,应该成为每个 Rust 程序员工具箱的一部分。Clippy 是一个语言整洁器,它可以帮助改进你的代码,使它更干净、更整洁、更易读、更惯用,让你与同事或其他人分享 Rust 代码时,不会感到尴尬。Cargo 可以说是让 “Clippy” 这个名字恢复了声誉,虽然我不会选择给我的孩子起这个名字,但现在每当我在网络上遇到这个词的时候,我不会再有一种不安的感觉。 + +* * * + +这篇文章最初发表在 [Alice, Eve, and Bob] [9]上,经作者许可转载。 + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/rust-programmer + +作者:[Mike Bursell][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mikecamel +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/EDU_OSDC_IntroOS_520x292_FINAL.png?itok=woiZamgj (name tag that says hello my name is open source) +[2]: https://opensource.com/article/20/6/why-rust +[3]: https://foundation.rust-lang.org/ +[4]: https://foundation.rust-lang.org/posts/2021-02-08-hello-world/ +[5]: https://opensource.com/article/19/7/open-source-browsers +[6]: https://www.thefeedbackloop.xyz/safety-is-rusts-fireflower/ +[7]: https://knowyourmeme.com/memes/clippy +[8]: https://opensource.com/article/20/11/commands-rusts-cargo +[9]: https://aliceevebob.com/2021/02/09/5-signs-that-you-may-be-a-rust-programmer/ From 3e37c87ac294737cde9601f7da38a912980e0c1d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 8 Apr 2021 05:02:31 +0800 Subject: [PATCH 594/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210407=20?= =?UTF-8?q?Using=20network=20bound=20disk=20encryption=20with=20Stratis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210407 Using network bound disk encryption with Stratis.md --- ...work bound disk encryption with Stratis.md | 288 ++++++++++++++++++ 1 file changed, 288 insertions(+) create mode 100644 sources/tech/20210407 Using network bound disk encryption with Stratis.md diff --git a/sources/tech/20210407 Using network bound disk encryption with Stratis.md b/sources/tech/20210407 Using network bound disk encryption with Stratis.md new file mode 100644 index 0000000000..becf63e533 --- /dev/null +++ b/sources/tech/20210407 Using network bound disk encryption with Stratis.md @@ -0,0 +1,288 @@ +[#]: subject: (Using network bound disk encryption with Stratis) +[#]: via: (https://fedoramagazine.org/network-bound-disk-encryption-with-stratis/) +[#]: author: (briansmith https://fedoramagazine.org/author/briansmith/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Using network bound disk encryption with Stratis +====== + +![][1] + +Photo by [iMattSmart][2] on [Unsplash][3] + +In an environment with many encrypted disks, unlocking them all is a difficult task. Network bound disk encryption (NBDE) helps automate the process of unlocking Stratis volumes. This is a critical requirement in large environments. Stratis version 2.1 added support for encryption, which was introduced in the article “[Getting started with Stratis encryption][4].” Stratis version 2.3 recently introduced support for Network Bound Disk Encryption (NBDE) when using encrypted Stratis pools, which is the topic of this article. + +The [Stratis website][5] describes Stratis as an “_easy to use local storage management for Linux_.” The  short video [“Managing Storage With Stratis”][6] gives a quick demonstration of the basics. The video was recorded on a Red Hat Enterprise Linux 8 system, however, the concepts shown in the video also apply to Stratis in Fedora Linux. + +### Prerequisites + +This article assumes you are familiar with Stratis, and also Stratis pool encryption. If you aren’t familiar with these topics, refer to this [article][4] and the [Stratis overview video][6] previously mentioned. + +NBDE requires Stratis 2.3 or later. The examples in this article use a pre-release version of Fedora Linux 34. The Fedora Linux 34 final release will include Stratis 2.3. + +### Overview of network bound disk encryption (NBDE) + +One of the main challenges of encrypting storage is having a secure method to unlock the storage again after a system reboot. In large environments, typing in the encryption passphrase manually doesn’t scale well. NBDE addresses this and allows for encrypted storage to be unlocked in an automated manner. + +At a high level, NBDE requires a Tang server in the environment. Client systems (using Clevis Pin) can automatically decrypt storage as long as they can establish a network connection to the Tang server. If there is no network connectivity to the Tang server, the storage would have to be decrypted manually. + +The idea behind this is that the Tang server would only be available on an internal network, thus if the encrypted device is lost or stolen, it would no longer have access to the internal network to connect to the Tang server, therefore would not be automatically decrypted. + +For more information on Tang and Clevis, see the man pages (man tang, man clevis) , the [Tang GitHub page][7], and the [Clevis GitHub page][8]. + +### Setting up the Tang server + +This example uses another Fedora Linux system as the Tang server with a hostname of tang-server. Start by installing the tang package: + +``` +dnf install tang +``` + +Then enable and start the tangd.socket with systemctl: + +``` +systemctl enable tangd.socket --now +``` + +Tang uses TCP port 80, so you also need to open that in the firewall: + +``` +firewall-cmd --add-port=80/tcp --permanent +firewall-cmd --add-port=80/tcp +``` + +Finally, run _tang-show-keys_ to display the output signing key thumbprint. You’ll need this later. + +``` +# tang-show-keys +l3fZGUCmnvKQF_OA6VZF9jf8z2s +``` + +### Creating the encrypted Stratis Pool + +The previous article on Stratis encryption goes over how to setup an encrypted Stratis pool in detail, so this article won’t cover that in depth. + +The first step is capturing a key that will be used to decrypt the Stratis pool. Even when using NBDE, you need to set this, as it can be used to manually unlock the pool in the event that the NBDE server is unreachable. Capture the pool1 key with the following command: + +``` +# stratis key set --capture-key pool1key +Enter key data followed by the return key: +``` + +Then I’ll create an encrypted Stratis pool (using the pool1key just created) named pool1 using the _/dev/vdb_ device: + +``` +# stratis pool create --key-desc pool1key pool1 /dev/vdb +``` + +Next, create a filesystem in this Stratis pool named filesystem1, create a mount point, mount the filesystem, and create a testfile in it: + +``` +# stratis filesystem create pool1 filesystem1 +# mkdir /filesystem1 +# mount /dev/stratis/pool1/filesystem1 /filesystem1 +# cd /filesystem1 +# echo "this is a test file" > testfile +``` + +### Binding the Stratis pool to the Tang server + +At this point, we have the encrypted Stratis pool created, and also have a filesystem created in the pool. The next step is to bind your Stratis pool to the Tang server that you just setup. Do this with the _stratis pool bind nbde_ command. + +When you make the Tang binding, you need to pass several parameters to the command: + + * the pool name (in this example, pool1) + * the key descriptor name (in this example, pool1key) + * the Tang server name (in this example, ) + + + +Recall that on the Tang server, you previously ran _tang-show-keys_ which showed the Tang output signing key thumbprint is _l3fZGUCmnvKQF_OA6VZF9jf8z2s_. In addition to the previous parameters, you either need to pass this thumbprint with the parameter _–thumbprint l3fZGUCmnvKQF_OA6VZF9jf8z2s_, or skip the verification of the thumbprint with the _–trust-url_ parameter. **** + +It is more secure to use the _–thumbprint_ parameter. For example: + +``` +# stratis pool bind nbde pool1 pool1key http://tang-server --thumbprint l3fZGUCmnvKQF_OA6VZF9jf8z2s +``` + +### Unlocking the Stratis Pool with NBDE + +Next reboot the host, and validate that you can unlock the Stratis pool with NBDE, without requiring the use of the key passphrase. After rebooting the host, the pool is no longer available: + +``` +# stratis pool list +Name Total Physical Properties +``` + +To unlock the pool using NBDE, run the following command: + +``` +# stratis pool unlock clevis +``` + +Note that you did not need to use the key passphrase. This command could be automated to run during the system boot up. + +At this point, the pool is now available: + +``` +# stratis pool list +Name Total Physical Properties +pool1 4.98 GiB / 583.65 MiB / 4.41 GiB ~Ca, Cr +``` + +You can mount the filesystem and access the file that was previously created: + +``` +# mount /dev/stratis/pool1/filesystem1 /filesystem1/ +# cat /filesystem1/testfile +this is a test file +``` + +### Rotating Tang server keys + +Best practices recommend that you periodically rotate the Tang server keys and update the Stratis client servers to use the new Tang keys. + +To generate new Tang keys, start by logging in to your Tang server and look at the current status of the /var/db/tang directory. Then, run the _tang-show-keys_ command: + +``` +# ls -al /var/db/tang +total 8 +drwx------. 1 tang tang 124 Mar 15 15:51 . +drwxr-xr-x. 1 root root 16 Mar 15 15:48 .. +-rw-r--r--. 1 tang tang 361 Mar 15 15:51 hbjJEDXy8G8wynMPqiq8F47nJwo.jwk +-rw-r--r--. 1 tang tang 367 Mar 15 15:51 l3fZGUCmnvKQF_OA6VZF9jf8z2s.jwk +# tang-show-keys +l3fZGUCmnvKQF_OA6VZF9jf8z2s +``` + +To generate new keys, run tangd-keygen and point it to the /var/db/tang directory: + +``` +# /usr/libexec/tangd-keygen /var/db/tang +``` + +If you look at the /var/db/tang directory again, you will see two new files: + +``` +# ls -al /var/db/tang +total 16 +drwx------. 1 tang tang 248 Mar 22 10:41 . +drwxr-xr-x. 1 root root 16 Mar 15 15:48 .. +-rw-r--r--. 1 tang tang 361 Mar 15 15:51 hbjJEDXy8G8wynMPqiq8F47nJwo.jwk +-rw-r--r--. 1 root root 354 Mar 22 10:41 iyG5HcF01zaPjaGY6L_3WaslJ_E.jwk +-rw-r--r--. 1 root root 349 Mar 22 10:41 jHxerkqARY1Ww_H_8YjQVZ5OHao.jwk +-rw-r--r--. 1 tang tang 367 Mar 15 15:51 l3fZGUCmnvKQF_OA6VZF9jf8z2s.jwk +``` + +And if you run _tang-show-keys_, it will show the keys being advertised by Tang: + +``` +# tang-show-keys +l3fZGUCmnvKQF_OA6VZF9jf8z2s +iyG5HcF01zaPjaGY6L_3WaslJ_E +``` + +You can prevent the old key (starting with l3fZ) from being advertised by renaming the two original files to be hidden files, starting with a period. With this method, the old key will no longer be advertised, however it will still be usable by any existing clients that haven’t been updated to use the new key. Once all clients have been updated to use the new key, these old key files can be deleted. + +``` +# cd /var/db/tang +# mv hbjJEDXy8G8wynMPqiq8F47nJwo.jwk .hbjJEDXy8G8wynMPqiq8F47nJwo.jwk +# mv l3fZGUCmnvKQF_OA6VZF9jf8z2s.jwk .l3fZGUCmnvKQF_OA6VZF9jf8z2s.jwk +``` + +At this point, if you run _tang-show-keys_ again, only the new key is being advertised by Tang: + +``` +# tang-show-keys +iyG5HcF01zaPjaGY6L_3WaslJ_E +``` + +Next, switch over to your Stratis system and update it to use the new Tang key. Stratis supports doing this while the filesystem(s) are online. + +First, unbind the pool: + +``` +# stratis pool unbind pool1 +``` + +Next, set the key with the original passphrase used when the encrypted pool was created: + +``` +# stratis key set --capture-key pool1key +Enter key data followed by the return key: +``` + +Finally, bind the pool to the Tang server with the updated key thumbprint: + +``` +# stratis pool bind nbde pool1 pool1key http://tang-server --thumbprint iyG5HcF01zaPjaGY6L_3WaslJ_E +``` + +The Stratis system is now configured to use the updated Tang key. Once any other client systems using the old Tang key have been updated, the two original key files that were renamed to hidden files in the /var/db/tang directory on the Tang server can be backed up and deleted. + +### What if the Tang server is unavailable? + +Next, shutdown the Tang server to simulate it being unavailable, then reboot the Stratis system. + +Again, after the reboot, the Stratis pool is not available: + +``` +# stratis pool list +Name Total Physical Properties +``` + +If you try to unlock it with NBDE, this fails because the Tang server is unavailable: + +``` +# stratis pool unlock clevis +Execution failed: +An iterative command generated one or more errors: The operation 'unlock' on a resource of type pool failed. The following errors occurred: +Partial action "unlock" failed for pool with UUID 4d62f840f2bb4ec9ab53a44b49da3f48: Cryptsetup error: Failed with error: Error: Command failed: cmd: "clevis" "luks" "unlock" "-d" "/dev/vdb" "-n" "stratis-1-private-42142fedcb4c47cea2e2b873c08fcf63-crypt", exit reason: 1 stdout: stderr: /dev/vdb could not be opened. +``` + +At this point, without the Tang server being reachable, the only option to unlock the pool is to use the original key passphrase: + +``` +# stratis key set --capture-key pool1key +Enter key data followed by the return key: +``` + +You can then unlock the pool using the key: + +``` +# stratis pool unlock keyring +``` + +Next, verify the pool was successfully unlocked: + +``` +# stratis pool list +Name Total Physical Properties +pool1 4.98 GiB / 583.65 MiB / 4.41 GiB ~Ca, Cr +``` + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/network-bound-disk-encryption-with-stratis/ + +作者:[briansmith][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/briansmith/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2021/03/stratis-nbde-816x345.jpg +[2]: https://unsplash.com/@imattsmart?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/lock?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://fedoramagazine.org/getting-started-with-stratis-encryption/ +[5]: https://stratis-storage.github.io/ +[6]: https://www.youtube.com/watch?v=CJu3kmY-f5o +[7]: https://github.com/latchset/tang +[8]: https://github.com/latchset/clevis From 96e79ddf86de4c1dd701058a92a2a78ecd8e3152 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 8 Apr 2021 05:03:13 +0800 Subject: [PATCH 595/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210407=20?= =?UTF-8?q?Why=20I=20love=20using=20bspwm=20for=20my=20Linux=20window=20ma?= =?UTF-8?q?nager?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210407 Why I love using bspwm for my Linux window manager.md --- ...using bspwm for my Linux window manager.md | 114 ++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 sources/tech/20210407 Why I love using bspwm for my Linux window manager.md diff --git a/sources/tech/20210407 Why I love using bspwm for my Linux window manager.md b/sources/tech/20210407 Why I love using bspwm for my Linux window manager.md new file mode 100644 index 0000000000..c3285f24f2 --- /dev/null +++ b/sources/tech/20210407 Why I love using bspwm for my Linux window manager.md @@ -0,0 +1,114 @@ +[#]: subject: (Why I love using bspwm for my Linux window manager) +[#]: via: (https://opensource.com/article/21/4/bspwm-linux) +[#]: author: (Stephen Adams https://opensource.com/users/stevehnh) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Why I love using bspwm for my Linux window manager +====== +Install, configure, and start using the bspwm window manager on Fedora +Linux. +![Tall building with windows][1] + +Some folks like to rearrange furniture. Other folks like to try new shoes or redecorate their bedroom on the regular. Me? I try out Linux desktops. + +After drooling over some of the incredible desktop environments I've seen online, I got curious about one window manager in particular: [bspwm][2]. + +![bspwm desktop][3] + +(Stephen Adams, [CC BY-SA 4.0][4]) + +I've been a fan of the [i3][5] window manager for quite a while, and I enjoy the way everything is laid out and the ease of getting started. But something about bspwm called to me. There are a few reasons I decided to try it out: + + * It is _only_ a window manager. + * It is managed by a few easy-to-configure scripts. + * It supports gaps between windows by default. + + + +The first reason—that it is simply a window manager—is probably the top thing to point out. Like i3, there are no graphical bells and whistles applied by default. You can certainly customize it to your heart's content, but _you_ will be putting in all the work to make it look like you want. That's part of its appeal to me. + +Although it is available on many distributions, my examples use Fedora Linux. + +### Install bspwm + +Bspwm is packaged in most common distributions, so you can install it with your system's package manager. This command also installs [sxkhd][6], a daemon for the X Window System "that reacts to input events by executing commands," and [dmenu][7], a generic X Window menu: + + +``` +`dnf install bspwm sxkhd dmenu` +``` + +Since bspwm is _just_ a window manager, there aren't any built-in shortcuts or keyboard commands. This is where it stands in contrast to something like i3. sxkhd makes it easier to get going. So, go ahead and configure sxkhd before you fire up the window manager for the first time: + + +``` +systemctl start sxkhd +systemctl enable sxkhd +``` + +This enables sxkhd at login, but you also need a configuration with some basic functionality ready to go: + + +``` +`curl https://raw.githubusercontent.com/baskerville/bspwm/master/examples/sxhkdrc --output ~/.config/sxkhd/sxkhdrc` +``` + +It's worth taking a look at this file before you get much further, as some commands that the scripts call may not exist on your system. A good example is the `super + Return` shortcut that calls `urxvt`. Change this to your preferred terminal, especially if you do not have urxvt installed: + + +``` +# +# wm independent hotkeys +# +    +# terminal emulator +super + Return +        urxvt +    +# program launcher +super + @space +        dmenu_run +``` + +If you are using GDM, LightDM, or another display manager, just choose bspwm before logging in. + +### Configure bspwm + +Once you are logged in, you'll see a whole lot of nothing on the screen. That's not a sense of emptiness you feel. It's possibility! You are now ready to start fiddling with all the parts of a desktop environment that you have taken for granted all these years. Building from scratch is not easy, but it's very rewarding once you get the hang of it. + +The most difficult thing about any window manager is getting a handle on the shortcuts. You're going to be slow to start, but in a short time, you'll be flying around your system using your keyboard alone and looking like an ultimate hacker to your friends and family. + +You can tailor the system as much as you want by editing `~/.config/bspwm/bspwmrc` to add apps at launch, set up your desktops and monitors, and set rules for how your windows should behave. There are a few examples set by default to get you going. Keyboard shortcuts are all managed by the **sxkhdrc** file. + +There are plenty more open source projects to install to really get things looking nice—like [Feh][8] for desktop backgrounds, [Polybar][9] for that all-important status bar, [Rofi][10] to really help your app launcher pop, and [Compton][11] to give you the shadows and transparency to get things nice and shiny. + +Happy hacking! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/bspwm-linux + +作者:[Stephen Adams][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/stevehnh +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/windows_building_sky_scale.jpg?itok=mH6CAX29 (Tall building with windows) +[2]: https://github.com/baskerville/bspwm +[3]: https://opensource.com/sites/default/files/uploads/bspwm-desktop.png (bspwm desktop) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://i3wm.org/ +[6]: https://github.com/baskerville/sxhkd +[7]: https://linux.die.net/man/1/dmenu +[8]: https://github.com/derf/feh +[9]: https://github.com/polybar/polybar +[10]: https://github.com/davatorium/rofi +[11]: https://github.com/chjj/compton From 461e49c19897e663358126f7e571539cd52a16ff Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 8 Apr 2021 05:03:25 +0800 Subject: [PATCH 596/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210407=20?= =?UTF-8?q?What=20is=20Git=20cherry-picking=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210407 What is Git cherry-picking.md --- .../20210407 What is Git cherry-picking.md | 200 ++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 sources/tech/20210407 What is Git cherry-picking.md diff --git a/sources/tech/20210407 What is Git cherry-picking.md b/sources/tech/20210407 What is Git cherry-picking.md new file mode 100644 index 0000000000..99e809440b --- /dev/null +++ b/sources/tech/20210407 What is Git cherry-picking.md @@ -0,0 +1,200 @@ +[#]: subject: (What is Git cherry-picking?) +[#]: via: (https://opensource.com/article/21/4/cherry-picking-git) +[#]: author: (Rajeev Bera https://opensource.com/users/acompiler) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +What is Git cherry-picking? +====== +Learn the what, why, and how of the git cherry-pick command. +![Measuring and baking a cherry pie recipe][1] + +Whenever you're working with a group of programmers on a project, whether small or large, handling changes between multiple Git branches can become difficult. Sometimes, instead of combining an entire Git branch into a different one, you want to select and move a couple of specific commits. This procedure is known as "cherry-picking." + +This article will cover the what, why, and how of cherry-picking. + +So let's start. + +### What is cherry-pick? + +With the `cherry-pick` command, Git lets you incorporate selected individual commits from any branch into your current [Git HEAD][2] branch. + +When performing a `git merge` or `git rebase`, all the commits from a branch are combined. The `cherry-pick` command allows you to select individual commits for integration. + +### Benefits of cherry-pick + +The following situation might make it easier to comprehend the way cherry-picking functions. + +Imagine you are implementing new features for your upcoming weekly sprint. When your code is ready, you will push it into the remote branch, ready for testing. + +However, the customer is not delighted with all of the modifications and requests that you present only certain ones. Because the client hasn't approved all changes for the next launch, `git rebase` wouldn't create the desired results. Why? Because `git rebase` or `git merge` will incorporate every adjustment from the last sprint. + +Cherry-picking is the answer! Because it focuses only on the changes added in the commit, cherry-picking brings in only the approved changes without adding other commits. + +There are several other reasons to use cherry-picking: + + * It is essential for bug fixing because bugs are set in the development branch using their commits. + * You can avoid unnecessary battles by using `git cherry-pick` instead of other options that apply changes in the specified commits, e.g., `git diff`. + * It is a useful tool if a full branch unite is impossible because of incompatible versions in the various Git branches. + + + +### Using the cherry-pick command + +In the `cherry-pick` command's simplest form, you can just use the [SHA][3] identifier for the commit you want to integrate into your current HEAD branch. + +To get the commit hash, you can use the `git log` command: + + +``` +`$ git log --oneline` +``` + +Once you know the commit hash, you can use the `cherry-pick` command. + +The syntax is: + + +``` +`$ git cherry-pick ` +``` + +For example: + + +``` +`$ git cherry-pick 65be1e5` +``` + +This will dedicate the specified change to your currently checked-out branch. + +If you'd like to make further modifications, you can also instruct Git to add commit changes to your working copy. + +The syntax is: + + +``` +`$ git cherry-pick --no-commit` +``` + +For example: + + +``` +`$ git cherry-pick 65be1e5 --no-commit` +``` + +If you would like to select more than one commit simultaneously, add their commit hashes separated by a space: + + +``` +`$ git cherry-pick hash1 hash3` +``` + +When cherry-picking commits, you can't use the `git pull` command because it fetches _and_ automatically merges commits from one repository into another. The `cherry-pick` command is a tool you use to specifically not do that; instead, use `git fetch`, which fetches commits but does not apply them. There's no doubt that `git pull` is convenient, but it's imprecise. + +### Try it yourself + +To try the process, launch a terminal and generate a sample project: + + +``` +$ mkdir fruit.git +$ cd fruit.git +$ git init . +``` + +Create some data and commit it: + + +``` +$ echo "Kiwifruit" > fruit.txt +$ git add fruit.txt +$ git commit -m 'First commit' +``` + +Now, represent a remote developer by creating a fork of your project: + + +``` +$ mkdir ~/fruit.fork +$ cd !$ +$ echo "Strawberry" >> fruit.txt +$ git add fruit.txt +$ git commit -m 'Added a fruit" +``` + +That's a valid commit. Now, create a bad commit to represent something you wouldn't want to merge into your project: + + +``` +$ echo "Rhubarb" >> fruit.txt +$ git add fruit.txt +$ git commit -m 'Added a vegetable that tastes like a fruit" +``` + +Return to your authoritative repo and fetch the commits from your imaginary developer: + + +``` +$ cd ~/fruit.git +$ git remote add dev ~/fruit.fork +$ git fetch dev +remote: Counting objects: 6, done. +remote: Compressing objects: 100% (2/2), done. +remote: Total 6 (delta 0), reused 0 (delta 0) +Unpacking objects: 100% (6/6), done... + +[/code] [code] + +$ git log –oneline dev/master +e858ab2 Added a vegetable that tastes like a fruit +0664292 Added a fruit +b56e0f8 First commit +``` + +You've fetched the commits from your imaginary developer, but you haven't merged them into your repository yet. You want to accept the second commit but not the third, so use `cherry-pick`: + + +``` +`$ git cherry-pick 0664292` +``` + +The second commit is now in your repository: + + +``` +$ cat fruit.txt +Kiwifruit +Strawberry +``` + +Push your changes to your remote server, and you're done! + +### Reasons to avoid cherry-picking + +Cherry-picking is usually discouraged in the developer community. The primary reason is that it creates duplicate commits, but you also lose the ability to track your commit history. + +If you're cherry-picking a lot of commits out of order, those commits will be recorded in your branch, and it might lead to undesirable results in your Git branch. + +Cherry-picking is a powerful command that might cause problems if it's used without a proper understanding of what might occur. However, it may save your life (or at least your day job) when you mess up and make commits to the wrong branches. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/cherry-picking-git + +作者:[Rajeev Bera][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/acompiler +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/pictures/cherry-picking-recipe-baking-cooking.jpg?itok=XVwse6hw (Measuring and baking a cherry pie recipe) +[2]: https://acompiler.com/git-head/ +[3]: https://en.wikipedia.org/wiki/Secure_Hash_Algorithms From b88994792dcb966ebef5a431398cc792a7b3d22d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 8 Apr 2021 05:03:40 +0800 Subject: [PATCH 597/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210407=20?= =?UTF-8?q?Get=20started=20with=20batch=20files=20in=20FreeDOS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210407 Get started with batch files in FreeDOS.md --- ...Get started with batch files in FreeDOS.md | 225 ++++++++++++++++++ 1 file changed, 225 insertions(+) create mode 100644 sources/tech/20210407 Get started with batch files in FreeDOS.md diff --git a/sources/tech/20210407 Get started with batch files in FreeDOS.md b/sources/tech/20210407 Get started with batch files in FreeDOS.md new file mode 100644 index 0000000000..35773d3a1c --- /dev/null +++ b/sources/tech/20210407 Get started with batch files in FreeDOS.md @@ -0,0 +1,225 @@ +[#]: subject: (Get started with batch files in FreeDOS) +[#]: via: (https://opensource.com/article/21/3/batch-files-freedos) +[#]: author: (Kevin O'Brien https://opensource.com/users/ahuka) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Get started with batch files in FreeDOS +====== +Batch files are a great way to write your own simple programs and +automate tasks that normally require lots of typing. +![Computer screen with files or windows open][1] + +On Linux, it's common to create _shell scripts_ to automate repetitive tasks. Similarly, on [FreeDOS][2], the open source implementation of old DOS operating systems, you can create a _batch file_ containing several FreeDOS commands. Then you can run your batch file to execute each command in order. + +You create a batch file by using an ASCII text editor, such as the FreeDOS Edit application. Once you create a batch file, you save it with a file name and the extension `.bat`. The file name should be unique. If you use a FreeDOS command name as your own file name, the FreeDOS command probably will execute instead of your batch file. + +Virtually all internal and external FreeDOS commands can be used in a batch file. When you create a batch file, you are essentially writing a program. FreeDOS batch files may not have the power of a structured programming language, but they can be very handy for quick but repetitive tasks. + +### Commenting your code + +The No. 1 good habit for any programmer to learn is to put comments in a program to explain what the code is doing. This is a very good thing to do, but you need to be careful not to fool the operating system into executing your comments. The way to avoid this is to place `REM` (short for "remark") at the beginning of a comment line. + +FreeDOS ignores lines starting with `REM`. But anyone who looks at the source code (the text you've written in your batch file) can read your comments and understand what it's doing. This is also a way to temporarily disable a command without deleting it. Just open your batch file for editing, place `REM` at the beginning of the line you want to disable, and save it. When you want to re-enable that command, just open the file for editing and remove `REM`. This technique is sometimes referred to as "commenting out" a command. + +### Get set up + +Before you start writing your own batch files, I suggest creating a temporary directory in FreeDOS. This can be a safe space for you to play around with batch files without accidentally deleting, moving, or renaming important system files or directories. On FreeDOS, you [create a directory][3] with the `MD` command: + + +``` +C:\>MD TEMP +C:\>CD TEMP +C:\TEMP> +``` + +The `ECHO` FreeDOS command controls what is shown on the screen when you run a batch file. For instance, here is a simple one-line batch file: + + +``` +`ECHO Hello world` +``` + +If you create this file and run it, you will see the sentence displayed on the screen. The quickest way to do this is from the command line: Use the `COPY` command to take the input from your keyboard (`CON`) and place it into the file `TEST1.BAT`. Then press **Ctrl**+**Z** to stop the copy process, and press Return or Enter on your keyboard to return to a prompt. + +Try creating this file as `TEST1.BAT` in your temporary directory, and then run it: + + +``` +C:\TEMP>COPY CON TEST1.BAT +CON => TEST1.BAT +ECHO Hello world +^Z + +C:\TEMP>TEST1 +Hello world +``` + +This can be useful when you want to display a piece of text. For instance, you might see a message on your screen telling you to wait while a program finishes its task, or in a networked environment, you might see a login message. + +What if you want to display a blank line? You might think that the `ECHO` command all by itself would do the trick, but the `ECHO` command alone asks FreeDOS to respond whether `ECHO` is on or off: + + +``` +C:\TEMP>ECHO +ECHO is on +``` + +The way to get a blank line is to use a `+` sign immediately after `ECHO`: + + +``` +C:\TEMP>ECHO+ + +C:\TEMP> +``` + +### Batch file variables + +A variable is a holding place for information you need your batch file to remember temporarily. This is a vital function of programming because you don't always know what data you want your batch file to use. Here's a simple example to demonstrate. + +Create `TEST3.BAT`: + + +``` +@MD BACKUPS +COPY %1 BACKUPS\%1 +``` + +Variables are signified by the use of the percentage symbol followed by a number, so this batch file creates a `BACKUPS` subdirectory in your current directory and then copies a variable `%1` into a `BACKUPS` folder. What is this variable? That's up to you to decide when you run the batch file: + + +``` +C:\TEMP>TEST3 TEMP1.BAT +TEST1.BAT => BACKUPS\TEST1.BAT +``` + +Your batch file has copied `TEST1.BAT` into a subdirectory called `BACKUPS` because you identified that file as an argument when running your batch file. Your batch file substituted `TEST1.BAT` for `%1`. + +Variables are positional. The variable `%1` is the first argument you provide to your command, while `%2` is the second, and so on. Suppose you create a batch file to list the contents of a directory: + + +``` +`DIR %1` +``` + +Try running it: + + +``` +C:\TEMP>TEST4.BAT C:\HOME +ARTICLES +BIN +CHEATSHEETS +GAMES +DND +``` + +That works as expected. But this fails: + + +``` +C:\TEMP>TEST4.BAT C:\HOME C:\DOCS +ARTICLES +BIN +CHEATSHEETS +GAMES +DND +``` + +If you try that, you get the listing of the first argument (`C:\HOME`) but not of the second (`C:\DOCS`). This is because your batch file is only looking for one variable (`%1`), and besides, the `DIR` command can take only one directory. + +Also, you don't really need to specify a batch file's extension when you run it—unless you are unlucky enough to pick a name for the batch file that matches one of the FreeDOS external commands or something similar. When FreeDOS executes commands, it goes in the following order: + + 1. Internal commands + 2. External commands with the *.COM extension + 3. External commands with the *.EXE extension + 4. Batch files + + + +### Multiple arguments + +OK, now rewrite the `TEST4.BAT` file to use a command that takes two arguments so that you can see how this works. First, create a simple text file called `FILE1.TXT` using the `EDIT` application. Put a sentence of some kind inside (e.g., "Hello world"), and save the file in your `TEMP` working directory. + +Next, use `EDIT` to change your `TEST4.BAT` file: + + +``` +COPY %1 %2   +DIR +``` + +Save it, then execute the command: + + +``` +`C:\TEMP\>TEST4 FILE1.TXT FILE2.TXT` +``` + +Upon running your batch file, you see a directory listing of your `TEMP` directory. Among the files listed, you have `FILE1.TXT` and `FILE2.TXT`, which were created by your batch file. + +### Nested batch files + +Another feature of batch files is that they can be "nested," meaning that one batch file can be called and run inside another batch file. To see how this works, start with a simple pair of batch files. + +The first file is called `NBATCH1.BAT`: + + +``` +@ECHO OFF +ECHO Hello +CALL NBATCH2.BAT   +ECHO world +``` + +The first line (`@ECHO OFF`) quietly tells the batch file to show only the output of the commands (not the commands themselves) when you run it. You probably noticed in previous examples that there was a lot of feedback about what the batch file was doing; in this case, you're permitting your batch file to display only the results. + +The second batch file is called NBATCH2.BAT: + + +``` +`echo from FreeDOS` +``` + +Create both of these files using `EDIT`, and save them in your TEMP subdirectory. Run `NBATCH1.BAT` to see what happens: + + +``` +C:\TEMP\>NBATCH1.BAT   +Hello +from FreeDOS +world +``` + +Your second batch file was executed from within the first by the `CALL` command, which provided the string "from FreeDOS" in the middle of your "Hello world" message. + +### FreeDOS scripting + +Batch files are a great way to write your own simple programs and automate tasks that normally require lots of typing. The more you use FreeDOS, the more familiar you'll become with its commands, and once you know the commands, it's just a matter of listing them in a batch file to make your FreeDOS system make your life easier. Give it a try! + +* * * + +_Some of the information in this article was previously published in [DOS lesson 15: Introduction to batch files][4] and [DOS lesson 17: Batch file variables; nested batch files][5] (both CC BY-SA 4.0)._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/batch-files-freedos + +作者:[Kevin O'Brien][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/ahuka +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open) +[2]: https://www.freedos.org/ +[3]: https://opensource.com/article/21/2/freedos-commands-you-need-know +[4]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-15-introduction-to-batch-files/ +[5]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-17-batch-file-variables-nested-batch-files/ From ae2d18b6f7ad9b33949febdf1e59563e14ae4730 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 8 Apr 2021 08:45:45 +0800 Subject: [PATCH 598/818] translated --- ...the IPython shell and Jupyter notebooks.md | 190 ----------------- ...the IPython shell and Jupyter notebooks.md | 191 ++++++++++++++++++ 2 files changed, 191 insertions(+), 190 deletions(-) delete mode 100644 sources/tech/20210329 Why I love using the IPython shell and Jupyter notebooks.md create mode 100644 translated/tech/20210329 Why I love using the IPython shell and Jupyter notebooks.md diff --git a/sources/tech/20210329 Why I love using the IPython shell and Jupyter notebooks.md b/sources/tech/20210329 Why I love using the IPython shell and Jupyter notebooks.md deleted file mode 100644 index 50f09539f1..0000000000 --- a/sources/tech/20210329 Why I love using the IPython shell and Jupyter notebooks.md +++ /dev/null @@ -1,190 +0,0 @@ -[#]: subject: (Why I love using the IPython shell and Jupyter notebooks) -[#]: via: (https://opensource.com/article/21/3/ipython-shell-jupyter-notebooks) -[#]: author: (Ben Nuttall https://opensource.com/users/bennuttall) -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Why I love using the IPython shell and Jupyter notebooks -====== -Jupyter notebooks take the IPython shell to the next level. -![Computer laptop in space][1] - -The Jupyter project started out as IPython and the IPython Notebook. It was originally a Python-specific interactive shell and notebook environment, which later branched out to become language-agnostic, supporting Julia, Python, and R—and potentially anything else. - -![Jupyter][2] - -(Ben Nuttall, [CC BY-SA 4.0][3]) - -IPython is a Python shell—similar to what you get when you type `python` or `python3` at the command line—but it's more clever and more helpful. If you've ever typed a multi-line command into the Python shell and wanted to repeat it, you'll understand the frustration of having to scroll through your history one line at a time. With IPython, you can scroll back through whole blocks at a time while still being able to navigate line-by-line and edit parts of those blocks. - -![iPython][4] - -(Ben Nuttall, [CC BY-SA 4.0][3]) - -It has autocompletion and provides context-aware suggestions: - -![iPython offers suggestions][5] - -(Ben Nuttall, [CC BY-SA 4.0][3]) - -It pretty-prints by default: - -![iPython pretty prints][6] - -(Ben Nuttall, [CC BY-SA 4.0][3]) - -It even allows you to run shell commands: - -![IPython shell commands][7] - -(Ben Nuttall, [CC BY-SA 4.0][3]) - -It also provides helpful features like adding `?` to an object as a shortcut for running `help()` without breaking your flow: - -![IPython help][8] - -(Ben Nuttall, [CC BY-SA 4.0][3]) - -If you're using a virtual environment (see my post on [virtualenvwrapper][9], install it with pip in the environment): - - -``` -`pip install ipython` -``` - -To install it system-wide, you can use apt on Debian, Ubuntu, or Raspberry Pi: - - -``` -`sudo apt install ipython3` -``` - -or with pip: - - -``` -`sudo pip3 install ipython` -``` - -### Jupyter notebooks - -Jupyter notebooks take the IPython shell to the next level. First of all, they're browser-based, not terminal-based. To get started, install `jupyter`. - -If you're using a virtual environment, install it with pip in the environment: - - -``` -`pip install jupyter` -``` - -To install it system-wide, you can use apt on Debian, Ubuntu, or Raspberry Pi: - - -``` -`sudo apt install jupyter-notebook` -``` - -or with pip: - - -``` -`sudo pip3 install jupyter` -``` - -Launch the notebook with: - - -``` -`jupyter notebook` -``` - -This will open in your browser: - -![Jupyter Notebook][10] - -(Ben Nuttall, [CC BY-SA 4.0][3]) - -You can create a new Python 3 notebook using the **New** dropdown: - -![Python 3 in Jupyter Notebook][11] - -(Ben Nuttall, [CC BY-SA 4.0][3]) - -Now you can write and execute commands in the `In[ ]` fields. Use **Enter** for a newline within the block and **Shift+Enter** to execute: - -![Executing commands in Jupyter][12] - -(Ben Nuttall, [CC BY-SA 4.0][3]) - -You can edit and rerun blocks. You can reorder them, delete them, copy/paste, and so on. You can run blocks in any order—but be aware that any variables created will be in scope according to the time of execution, rather than the order they appear within the notebook. You can restart and clear output or restart and run all blocks from within the **Kernel** menu. - -Using the `print` function will output every time. But if you only have a single statement that's not assigned or your last statement is unassigned, it will be output anyway: - -![Jupyter output][13] - -(Ben Nuttall, [CC BY-SA 4.0][3]) - -You can even refer to `In` and `Out` as indexable objects: - -![Jupyter output][14] - -(Ben Nuttall, [CC BY-SA 4.0][3]) - -All the IPython features are available and are often presented a little nicer, too: - -![Jupyter supports IPython features][15] - -(Ben Nuttall, [CC BY-SA 4.0][3]) - -You can even do inline plots using [Matplotlib][16]: - -![Graphing in Jupyter Notebook][17] - -(Ben Nuttall, [CC BY-SA 4.0][3]) - -Finally, you can save your notebooks and include them in Git repositories, and if you push to GitHub, they will render as completed notebooks—outputs, graphs, and all (as in [this example][18]): - -![Saving Notebook to GitHub][19] - -(Ben Nuttall, [CC BY-SA 4.0][3]) - -* * * - -_This article originally appeared on Ben Nuttall's [Tooling Tuesday blog][20] and is reused with permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/ipython-shell-jupyter-notebooks - -作者:[Ben Nuttall][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/bennuttall -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_space_graphic_cosmic.png?itok=wu493YbB (Computer laptop in space) -[2]: https://opensource.com/sites/default/files/uploads/jupyterpreview.png (Jupyter) -[3]: https://creativecommons.org/licenses/by-sa/4.0/ -[4]: https://opensource.com/sites/default/files/uploads/ipython-loop.png (iPython) -[5]: https://opensource.com/sites/default/files/uploads/ipython-suggest.png (iPython offers suggestions) -[6]: https://opensource.com/sites/default/files/uploads/ipython-pprint.png (iPython pretty prints) -[7]: https://opensource.com/sites/default/files/uploads/ipython-ls.png (IPython shell commands) -[8]: https://opensource.com/sites/default/files/uploads/ipython-help.png (IPython help) -[9]: https://opensource.com/article/21/2/python-virtualenvwrapper -[10]: https://opensource.com/sites/default/files/uploads/jupyter-notebook-1.png (Jupyter Notebook) -[11]: https://opensource.com/sites/default/files/uploads/jupyter-python-notebook.png (Python 3 in Jupyter Notebook) -[12]: https://opensource.com/sites/default/files/uploads/jupyter-loop.png (Executing commands in Jupyter) -[13]: https://opensource.com/sites/default/files/uploads/jupyter-cells.png (Jupyter output) -[14]: https://opensource.com/sites/default/files/uploads/jupyter-cells-2.png (Jupyter output) -[15]: https://opensource.com/sites/default/files/uploads/jupyter-help.png (Jupyter supports IPython features) -[16]: https://matplotlib.org/ -[17]: https://opensource.com/sites/default/files/uploads/jupyter-graph.png (Graphing in Jupyter Notebook) -[18]: https://github.com/piwheels/stats/blob/master/2020.ipynb -[19]: https://opensource.com/sites/default/files/uploads/savenotebooks.png (Saving Notebook to GitHub) -[20]: https://tooling.bennuttall.com/the-ipython-shell-and-jupyter-notebooks/ diff --git a/translated/tech/20210329 Why I love using the IPython shell and Jupyter notebooks.md b/translated/tech/20210329 Why I love using the IPython shell and Jupyter notebooks.md new file mode 100644 index 0000000000..4a4b4cbbd6 --- /dev/null +++ b/translated/tech/20210329 Why I love using the IPython shell and Jupyter notebooks.md @@ -0,0 +1,191 @@ +[#]: subject: (Why I love using the IPython shell and Jupyter notebooks) +[#]: via: (https://opensource.com/article/21/3/ipython-shell-jupyter-notebooks) +[#]: author: (Ben Nuttall https://opensource.com/users/bennuttall) +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +为什么我喜欢使用 IPython shell 和 Jupyter Notebook +====== +Jupyter Notebook 将IPython shell 提升到一个新的高度。 +![Computer laptop in space][1] + +Jupyter 项目最初是以 IPython 和 IPython Notebook 的形式出现的。它最初是一个专门针对 Python 的交互式 shell 和笔记本环境,后来扩展为不分语言的环境,支持 Julia、Python 和 R,以及其他任何语言。 + +![Jupyter][2] + +(Ben Nuttall, [CC BY-SA 4.0][3]) + +IPython 是一个 Python shell,类似于你在命令行输入 `python` 或者 `python3` 时看到的,但它更聪明,更有用。如果你曾经在 Python shell 中输入过多行命令,并且想重复它,你就会理解每次都要一行一行地滚动浏览历史记录的挫败感。有了 IPython,你可以一次滚动浏览整个块,同时还可以逐行浏览和编辑这些块的部分内容。 + +![iPython][4] + +(Ben Nuttall, [CC BY-SA 4.0][3]) + +它具有自动补全,并提供上下文感知的建议: + +![iPython offers suggestions][5] + +(Ben Nuttall, [CC BY-SA 4.0][3]) + +它默认漂亮输出: + +![iPython pretty prints][6] + +(Ben Nuttall, [CC BY-SA 4.0][3]) + +它甚至允许你运行 shell 命令: + +![IPython shell commands][7] + +(Ben Nuttall, [CC BY-SA 4.0][3]) + +它还提供了一些有用的功能,比如将 `?` 添加到对象中,作为运行 `help()` 的快捷方式,而不会破坏你的流程: + +![IPython help][8] + +(Ben Nuttall, [CC BY-SA 4.0][3]) + +如果你使用的是虚拟环境(参见我关于 [virtualenvwrapper][9] 的帖子),在环境中用 pip 安装: + + +``` +`pip install ipython` +``` + +要在全系统范围内安装,你可以在 Debian、Ubuntu 或树莓派上使用apt: + + +``` +`sudo apt install ipython3` +``` + +或使用 pip: + + +``` +`sudo pip3 install ipython` +``` + +### Jupyter Notebook + +Jupyter Notebook 将 IPython shell 提升到了一个新的高度。首先,它们是基于浏览器的,而不是基于终端的。要开始使用,请安装 `jupyter`。 + +如果你使用的是虚拟环境,请在环境中使用 pip 进行安装: + + +``` +`pip install jupyter` +``` + +要在全系统范围内安装,你可以在 Debian、Ubuntu 或树莓派上使用 apt: + + +``` +`sudo apt install jupyter-notebook` +``` + +或使用 pip: + + +``` +`sudo pip3 install jupyter` +``` + +启动 Notebook: + + +``` +`jupyter notebook` +``` + +这将在你的浏览器中打开: + +![Jupyter Notebook][10] + +(Ben Nuttall, [CC BY-SA 4.0][3]) + +你可以使用 **New** 下拉菜单创建一个新的 Python 3 Notebook: + +![Python 3 in Jupyter Notebook][11] + +(Ben Nuttall, [CC BY-SA 4.0][3]) + +现在你可以在 `In[ ]` 字段中编写和执行命令。使用**回车**在代码块中换行,使用 **Shift+回车**来执行: + +![Executing commands in Jupyter][12] + +(Ben Nuttall, [CC BY-SA 4.0][3]) + +你可以编辑和重新运行代码块,你可以重新排序、删除,复制/粘贴,等等。你可以以任何顺序运行代码块,但是要注意的是,任何创建的变量的作用域都将根据执行的时间而不是它们在 Notebook 中出现的顺序。你可以在 **Kernel** 菜单中重启并清除输出或重启并运行所有的代码块。 + +使用 `print` 函数每次都会输出。但是如果你有一条没有分配的语句,或者最后一条语句没有分配,那么它总是会输出: + +![Jupyter output][13] + +(Ben Nuttall, [CC BY-SA 4.0][3]) + +你甚至可以把 `In `和 `Out` 作为可索引对象: + +![Jupyter output][14] + +(Ben Nuttall, [CC BY-SA 4.0][3]) + +All the IPython features are available and are often presented a little nicer, too: +所有的 IPython 功能都可以使用,而且通常也会表现得更漂亮一些: + +![Jupyter supports IPython features][15] + +(Ben Nuttall, [CC BY-SA 4.0][3]) + +你甚至可以使用 [Matplotlib][16] 进行内联绘图: + +![Graphing in Jupyter Notebook][17] + +(Ben Nuttall, [CC BY-SA 4.0][3]) + +最后,你可以保存您的笔记本,并将其包含在 Git 仓库中,如果你将其推送到 GitHub,它们将作为已完成的 Notebook 被渲染:输出、图形和所有一切(如 [本例][18]): + +![Saving Notebook to GitHub][19] + +(Ben Nuttall, [CC BY-SA 4.0][3]) + +* * * + +_本文原载于 Ben Nuttall 的 [Tooling Tuesday 博客][20],经许可后重用。_ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/ipython-shell-jupyter-notebooks + +作者:[Ben Nuttall][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/bennuttall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_space_graphic_cosmic.png?itok=wu493YbB (Computer laptop in space) +[2]: https://opensource.com/sites/default/files/uploads/jupyterpreview.png (Jupyter) +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://opensource.com/sites/default/files/uploads/ipython-loop.png (iPython) +[5]: https://opensource.com/sites/default/files/uploads/ipython-suggest.png (iPython offers suggestions) +[6]: https://opensource.com/sites/default/files/uploads/ipython-pprint.png (iPython pretty prints) +[7]: https://opensource.com/sites/default/files/uploads/ipython-ls.png (IPython shell commands) +[8]: https://opensource.com/sites/default/files/uploads/ipython-help.png (IPython help) +[9]: https://opensource.com/article/21/2/python-virtualenvwrapper +[10]: https://opensource.com/sites/default/files/uploads/jupyter-notebook-1.png (Jupyter Notebook) +[11]: https://opensource.com/sites/default/files/uploads/jupyter-python-notebook.png (Python 3 in Jupyter Notebook) +[12]: https://opensource.com/sites/default/files/uploads/jupyter-loop.png (Executing commands in Jupyter) +[13]: https://opensource.com/sites/default/files/uploads/jupyter-cells.png (Jupyter output) +[14]: https://opensource.com/sites/default/files/uploads/jupyter-cells-2.png (Jupyter output) +[15]: https://opensource.com/sites/default/files/uploads/jupyter-help.png (Jupyter supports IPython features) +[16]: https://matplotlib.org/ +[17]: https://opensource.com/sites/default/files/uploads/jupyter-graph.png (Graphing in Jupyter Notebook) +[18]: https://github.com/piwheels/stats/blob/master/2020.ipynb +[19]: https://opensource.com/sites/default/files/uploads/savenotebooks.png (Saving Notebook to GitHub) +[20]: https://tooling.bennuttall.com/the-ipython-shell-and-jupyter-notebooks/ From 95f295798d533e26663df3c2656d8c4b8386917e Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 8 Apr 2021 08:57:45 +0800 Subject: [PATCH 599/818] translating --- ...w CPU Details Beautifully in Linux Terminal With CPUFetch.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md b/sources/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md index 84413537f4..1c151112e0 100644 --- a/sources/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md +++ b/sources/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md @@ -2,7 +2,7 @@ [#]: via: (https://itsfoss.com/cpufetch/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 01a5d2cb5313bcd3e90c5aace0afee83a5da40b6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 8 Apr 2021 10:21:27 +0800 Subject: [PATCH 600/818] PRF @geekpi --- ...x Dual Boot Setup- Here-s How to Fix it.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/translated/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md b/translated/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md index ec01d190c1..77641d233a 100644 --- a/translated/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md +++ b/translated/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md @@ -3,16 +3,18 @@ [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) -Windows-Linux 双启动设置中显示时间错误?如何解决这个问题 +如何解决 Windows-Linux 双启动设置中显示时间错误的问题 ====== -如果你[双启动 Windows 和 Ubuntu][1] 或任何其他 Linux 发行版,你可能会注意到两个操作系统之间的时间差异。 +![](https://img.linux.net.cn/data/attachment/album/202104/08/102102xaup3iofozn2uvbf.jpg) -当你[使用 Linux][2] 时,它会显示正确的时间。但当你进入 Windows 时,它显示的时间是错误的。有时,情况正好相反,Linux 显示的是错误的时间,而 Windows 的时间是正确的。 +如果你 [双启动 Windows 和 Ubuntu][1] 或任何其他 Linux 发行版,你可能会注意到两个操作系统之间的时间差异。 + +当你 [使用 Linux][2] 时,它会显示正确的时间。但当你进入 Windows 时,它显示的时间是错误的。有时,情况正好相反,Linux 显示的是错误的时间,而 Windows 的时间是正确的。 特别奇怪的是,因为你已连接到互联网,并且已将日期和时间设置为自动使用。 @@ -38,7 +40,7 @@ timedatectl set-local-rtc 1 让我用例子来解释一下。 -你看我在加尔各答 UTC+5:30 时区。安装后,当我把 [Ubuntu 中的时区][4]]设置为加尔各答时区时,Ubuntu 会把这个时间信息同步到硬件时钟上,但会有 5:30 的偏移,因为对于 Linux 来说它必须是 UTC。 +你看我在加尔各答 UTC+5:30 时区。安装后,当我把 [Ubuntu 中的时区][4] 设置为加尔各答时区时,Ubuntu 会把这个时间信息同步到硬件时钟上,但会有 5:30 的偏移,因为对于 Linux 来说它必须是 UTC。 假设加尔各答时区的当前时间是 15:00,这意味着 UTC 时间是 09:30。 @@ -46,7 +48,7 @@ timedatectl set-local-rtc 1 ![][5] -同样,如果我在 Windows 中通过自动时区和时间按钮来设置正确的时间,你知道会发生什么吗?现在它将在系统上显示正确的时间(15:00),并将此信息(注意图片中的”同步你的时钟“选项)同步到硬件时钟。 +同样,如果我在 Windows 中通过自动时区和时间按钮来设置正确的时间,你知道会发生什么吗?现在它将在系统上显示正确的时间(15:00),并将此信息(注意图片中的“同步你的时钟”选项)同步到硬件时钟。 如果你启动到 Linux,它会从硬件时钟读取时间,而硬件时钟是当地时间(15:00),但由于 Linux 认为它是 UTC 时间,所以它在系统时钟上增加了 5:30 的偏移。现在 Linux 显示的时间是 20:30,比实际时间超出晚了 5:30。 @@ -59,11 +61,9 @@ timedatectl set-local-rtc 1 * 让 Windows 将硬件时钟作为 UTC 时间 * 让 Linux 将硬件时钟作为本地时间 - - 在 Linux 中进行修改是比较容易的,因此我推荐使用第二种方法。 -现在 Ubuntu 和大多数其他 Linux 发行版都使用 systemd,因此你可以使用 timedatectl 命令来更改设置。 +现在 Ubuntu 和大多数其他 Linux 发行版都使用 systemd,因此你可以使用 `timedatectl` 命令来更改设置。 你要做的是告诉你的 Linux 系统将硬件时钟(RTC)作为本地时间。你可以通过 `set-local-rtc` (为 RTC 设置本地时间)选项来实现: @@ -90,7 +90,7 @@ via: https://itsfoss.com/wrong-time-dual-boot/ 作者:[Abhishek Prakash][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/) 荣誉推出 From e2e4701675065589884d32fe229742f7c715bb27 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 8 Apr 2021 10:24:24 +0800 Subject: [PATCH 601/818] PUB @geekpi https://linux.cn/article-13276-1.html --- ... in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md (98%) diff --git a/translated/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md b/published/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md similarity index 98% rename from translated/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md rename to published/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md index 77641d233a..625e7d9362 100644 --- a/translated/tech/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md +++ b/published/20210401 Wrong Time Displayed in Windows-Linux Dual Boot Setup- Here-s How to Fix it.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13276-1.html) 如何解决 Windows-Linux 双启动设置中显示时间错误的问题 ====== From 69b6af15c80ffe3525e8499f57896a46a1967e10 Mon Sep 17 00:00:00 2001 From: max27149 <1478026873@qq.com> Date: Thu, 8 Apr 2021 11:09:31 +0800 Subject: [PATCH 602/818] =?UTF-8?q?=E5=9B=9E=E6=BB=9A=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20210218 Not an engineer- Find out where you belong.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/talk/20210218 Not an engineer- Find out where you belong.md b/sources/talk/20210218 Not an engineer- Find out where you belong.md index 4bce68f512..0a6589a01b 100644 --- a/sources/talk/20210218 Not an engineer- Find out where you belong.md +++ b/sources/talk/20210218 Not an engineer- Find out where you belong.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (max27149) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -85,7 +85,7 @@ via: https://opensource.com/article/21/2/advice-non-technical 作者:[Dawn Parzych][a] 选题:[lujun9972][b] -译者:[max27149](https://github.com/max27149) +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 366f1e7c34003bf7d5fec9f39436124e67e73930 Mon Sep 17 00:00:00 2001 From: max27149 <1478026873@qq.com> Date: Thu, 8 Apr 2021 11:15:49 +0800 Subject: [PATCH 603/818] =?UTF-8?q?=E7=94=B3=E9=A2=86=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20210218 Not an engineer- Find out where you belong.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/talk/20210218 Not an engineer- Find out where you belong.md b/sources/talk/20210218 Not an engineer- Find out where you belong.md index 0a6589a01b..fee015d8b3 100644 --- a/sources/talk/20210218 Not an engineer- Find out where you belong.md +++ b/sources/talk/20210218 Not an engineer- Find out where you belong.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (max27149) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -85,7 +85,7 @@ via: https://opensource.com/article/21/2/advice-non-technical 作者:[Dawn Parzych][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[max27149](https://github.com/imax27149) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From c5e9029b2afba4a1e2144e69f10c5d46e6a1eb28 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 8 Apr 2021 12:52:58 +0800 Subject: [PATCH 604/818] PRF @geekpi --- ...the IPython shell and Jupyter notebooks.md | 98 ++++++------------- 1 file changed, 32 insertions(+), 66 deletions(-) diff --git a/translated/tech/20210329 Why I love using the IPython shell and Jupyter notebooks.md b/translated/tech/20210329 Why I love using the IPython shell and Jupyter notebooks.md index 4a4b4cbbd6..56b05f8082 100644 --- a/translated/tech/20210329 Why I love using the IPython shell and Jupyter notebooks.md +++ b/translated/tech/20210329 Why I love using the IPython shell and Jupyter notebooks.md @@ -3,158 +3,124 @@ [#]: author: (Ben Nuttall https://opensource.com/users/bennuttall) [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) -为什么我喜欢使用 IPython shell 和 Jupyter Notebook +为什么我喜欢使用 IPython shell 和 Jupyter 笔记本 ====== -Jupyter Notebook 将IPython shell 提升到一个新的高度。 -![Computer laptop in space][1] -Jupyter 项目最初是以 IPython 和 IPython Notebook 的形式出现的。它最初是一个专门针对 Python 的交互式 shell 和笔记本环境,后来扩展为不分语言的环境,支持 Julia、Python 和 R,以及其他任何语言。 +> Jupyter 笔记本将 IPython shell 提升到一个新的高度。 + +![](https://img.linux.net.cn/data/attachment/album/202104/08/125206uvglkoqzukhfk3uv.jpg) + +Jupyter 项目最初是以 IPython 和 IPython 笔记本的形式出现的。它最初是一个专门针对 Python 的交互式 shell 和笔记本环境,后来扩展为不分语言的环境,支持 Julia、Python 和 R 以及其他任何语言。 ![Jupyter][2] -(Ben Nuttall, [CC BY-SA 4.0][3]) - -IPython 是一个 Python shell,类似于你在命令行输入 `python` 或者 `python3` 时看到的,但它更聪明,更有用。如果你曾经在 Python shell 中输入过多行命令,并且想重复它,你就会理解每次都要一行一行地滚动浏览历史记录的挫败感。有了 IPython,你可以一次滚动浏览整个块,同时还可以逐行浏览和编辑这些块的部分内容。 +IPython 是一个 Python shell,类似于你在命令行输入 `python` 或者 `python3` 时看到的,但它更聪明、更有用。如果你曾经在 Python shell 中输入过多行命令,并且想重复它,你就会理解每次都要一行一行地滚动浏览历史记录的挫败感。有了 IPython,你可以一次滚动浏览整个块,同时还可以逐行浏览和编辑这些块的部分内容。 ![iPython][4] -(Ben Nuttall, [CC BY-SA 4.0][3]) - 它具有自动补全,并提供上下文感知的建议: ![iPython offers suggestions][5] -(Ben Nuttall, [CC BY-SA 4.0][3]) - -它默认漂亮输出: +它默认会整理输出: ![iPython pretty prints][6] -(Ben Nuttall, [CC BY-SA 4.0][3]) - 它甚至允许你运行 shell 命令: ![IPython shell commands][7] -(Ben Nuttall, [CC BY-SA 4.0][3]) - 它还提供了一些有用的功能,比如将 `?` 添加到对象中,作为运行 `help()` 的快捷方式,而不会破坏你的流程: ![IPython help][8] -(Ben Nuttall, [CC BY-SA 4.0][3]) - -如果你使用的是虚拟环境(参见我关于 [virtualenvwrapper][9] 的帖子),在环境中用 pip 安装: - +如果你使用的是虚拟环境(参见我关于 [virtualenvwrapper][9] 的帖子),可以在环境中用 `pip` 安装: ``` -`pip install ipython` +pip install ipython ``` -要在全系统范围内安装,你可以在 Debian、Ubuntu 或树莓派上使用apt: - +要在全系统范围内安装,你可以在 Debian、Ubuntu 或树莓派上使用 `apt`: ``` -`sudo apt install ipython3` +sudo apt install ipython3 ``` -或使用 pip: - +或使用 `pip`: ``` -`sudo pip3 install ipython` +sudo pip3 install ipython ``` -### Jupyter Notebook +### Jupyter 笔记本 -Jupyter Notebook 将 IPython shell 提升到了一个新的高度。首先,它们是基于浏览器的,而不是基于终端的。要开始使用,请安装 `jupyter`。 - -如果你使用的是虚拟环境,请在环境中使用 pip 进行安装: +Jupyter 笔记本将 IPython shell 提升到了一个新的高度。首先,它们是基于浏览器的,而不是基于终端的。要开始使用,请安装 `jupyter`。 +如果你使用的是虚拟环境,请在环境中使用 `pip` 进行安装: ``` -`pip install jupyter` +pip install jupyter ``` -要在全系统范围内安装,你可以在 Debian、Ubuntu 或树莓派上使用 apt: - +要在全系统范围内安装,你可以在 Debian、Ubuntu 或树莓派上使用 `apt`: ``` -`sudo apt install jupyter-notebook` +sudo apt install jupyter-notebook ``` -或使用 pip: - +或使用 `pip`: ``` -`sudo pip3 install jupyter` +sudo pip3 install jupyter ``` -启动 Notebook: - +启动笔记本: ``` -`jupyter notebook` +jupyter notebook ``` 这将在你的浏览器中打开: ![Jupyter Notebook][10] -(Ben Nuttall, [CC BY-SA 4.0][3]) - -你可以使用 **New** 下拉菜单创建一个新的 Python 3 Notebook: +你可以使用 “New” 下拉菜单创建一个新的 Python 3 笔记本: ![Python 3 in Jupyter Notebook][11] -(Ben Nuttall, [CC BY-SA 4.0][3]) - -现在你可以在 `In[ ]` 字段中编写和执行命令。使用**回车**在代码块中换行,使用 **Shift+回车**来执行: +现在你可以在 `In[ ]` 字段中编写和执行命令。使用 `Enter` 在代码块中换行,使用 `Shift+Enter` 来执行: ![Executing commands in Jupyter][12] -(Ben Nuttall, [CC BY-SA 4.0][3]) - -你可以编辑和重新运行代码块,你可以重新排序、删除,复制/粘贴,等等。你可以以任何顺序运行代码块,但是要注意的是,任何创建的变量的作用域都将根据执行的时间而不是它们在 Notebook 中出现的顺序。你可以在 **Kernel** 菜单中重启并清除输出或重启并运行所有的代码块。 +你可以编辑和重新运行代码块,你可以重新排序、删除,复制/粘贴,等等。你可以以任何顺序运行代码块,但是要注意的是,任何创建的变量的作用域都将根据执行的时间而不是它们在笔记本中出现的顺序。你可以在 “Kernel” 菜单中重启并清除输出或重启并运行所有的代码块。 使用 `print` 函数每次都会输出。但是如果你有一条没有分配的语句,或者最后一条语句没有分配,那么它总是会输出: ![Jupyter output][13] -(Ben Nuttall, [CC BY-SA 4.0][3]) - -你甚至可以把 `In `和 `Out` 作为可索引对象: +你甚至可以把 `In` 和 `Out` 作为可索引对象: ![Jupyter output][14] -(Ben Nuttall, [CC BY-SA 4.0][3]) - -All the IPython features are available and are often presented a little nicer, too: 所有的 IPython 功能都可以使用,而且通常也会表现得更漂亮一些: ![Jupyter supports IPython features][15] -(Ben Nuttall, [CC BY-SA 4.0][3]) - 你甚至可以使用 [Matplotlib][16] 进行内联绘图: ![Graphing in Jupyter Notebook][17] -(Ben Nuttall, [CC BY-SA 4.0][3]) - -最后,你可以保存您的笔记本,并将其包含在 Git 仓库中,如果你将其推送到 GitHub,它们将作为已完成的 Notebook 被渲染:输出、图形和所有一切(如 [本例][18]): +最后,你可以保存你的笔记本,并将其包含在 Git 仓库中,如果你将其推送到 GitHub,它们将作为已完成的笔记本被渲染:输出、图形和所有一切(如 [本例][18]): ![Saving Notebook to GitHub][19] -(Ben Nuttall, [CC BY-SA 4.0][3]) - * * * -_本文原载于 Ben Nuttall 的 [Tooling Tuesday 博客][20],经许可后重用。_ +本文原载于 Ben Nuttall 的 [Tooling Tuesday 博客][20],经许可后重用。 -------------------------------------------------------------------------------- @@ -163,7 +129,7 @@ via: https://opensource.com/article/21/3/ipython-shell-jupyter-notebooks 作者:[Ben Nuttall][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/) 荣誉推出 From 92c0391f238b13553f1620dd7746800274738322 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 8 Apr 2021 12:54:04 +0800 Subject: [PATCH 605/818] PUB @geekpi https://linux.cn/article-13277-1.html --- ...hy I love using the IPython shell and Jupyter notebooks.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210329 Why I love using the IPython shell and Jupyter notebooks.md (98%) diff --git a/translated/tech/20210329 Why I love using the IPython shell and Jupyter notebooks.md b/published/20210329 Why I love using the IPython shell and Jupyter notebooks.md similarity index 98% rename from translated/tech/20210329 Why I love using the IPython shell and Jupyter notebooks.md rename to published/20210329 Why I love using the IPython shell and Jupyter notebooks.md index 56b05f8082..269735322f 100644 --- a/translated/tech/20210329 Why I love using the IPython shell and Jupyter notebooks.md +++ b/published/20210329 Why I love using the IPython shell and Jupyter notebooks.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13277-1.html) 为什么我喜欢使用 IPython shell 和 Jupyter 笔记本 ====== From 8b4bc1043f9c823e7032d774aaf3b6cc697c4fcd Mon Sep 17 00:00:00 2001 From: max27149 <1478026873@qq.com> Date: Thu, 8 Apr 2021 14:07:04 +0800 Subject: [PATCH 606/818] =?UTF-8?q?=E5=8E=9F=E6=96=87=E7=94=B3=E9=A2=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../talk/20210218 Not an engineer- Find out where you belong.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20210218 Not an engineer- Find out where you belong.md b/sources/talk/20210218 Not an engineer- Find out where you belong.md index fee015d8b3..4bce68f512 100644 --- a/sources/talk/20210218 Not an engineer- Find out where you belong.md +++ b/sources/talk/20210218 Not an engineer- Find out where you belong.md @@ -85,7 +85,7 @@ via: https://opensource.com/article/21/2/advice-non-technical 作者:[Dawn Parzych][a] 选题:[lujun9972][b] -译者:[max27149](https://github.com/imax27149) +译者:[max27149](https://github.com/max27149) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 08eb0b0d40c9dddcaaa7d35b493654e5636a12d2 Mon Sep 17 00:00:00 2001 From: "Qian.Sun" Date: Thu, 8 Apr 2021 21:28:11 +0800 Subject: [PATCH 607/818] translation completed Find what changed in a Git commit translation is completed --- ...10401 Find what changed in a Git commit.md | 136 ------------------ ...10401 Find what changed in a Git commit.md | 136 ++++++++++++++++++ 2 files changed, 136 insertions(+), 136 deletions(-) delete mode 100644 sources/tech/20210401 Find what changed in a Git commit.md create mode 100644 translated/tech/20210401 Find what changed in a Git commit.md diff --git a/sources/tech/20210401 Find what changed in a Git commit.md b/sources/tech/20210401 Find what changed in a Git commit.md deleted file mode 100644 index 19b5308d88..0000000000 --- a/sources/tech/20210401 Find what changed in a Git commit.md +++ /dev/null @@ -1,136 +0,0 @@ -[#]: subject: (Find what changed in a Git commit) -[#]: via: (https://opensource.com/article/21/4/git-whatchanged) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: (DCOLIVERSUN) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Find what changed in a Git commit -====== -Git offers several ways you can quickly see which files changed in a -commit. -![Code going into a computer.][1] - -If you use Git every day, you probably make a lot of commits. If you're using Git every day in a project with other people, it's safe to assume that _everyone_ is making lots of commits. Every day. And this means you're aware of how disorienting a Git log can become, with a seemingly eternal scroll of changes and no sign of what's been changed. - -So how do you find out what file changed in a specific commit? It's easier than you think. - -### Find what file changed in a commit - -To find out which files changed in a given commit, use the `git log --raw` command. It's the fastest and simplest way to get insight into which files a commit affects. The `git log` command is underutilized in general, largely because it has so many formatting options, and many users get overwhelmed by too many choices and, in some cases, unclear documentation. - -The log mechanism in Git is surprisingly flexible, though, and the `--raw` option provides a log of commits in your current branch, plus a list of each file that had changes made to it. - -Here's the output of a standard `git log`: - - -``` -$ git log -commit fbbbe083aed75b24f2c77b1825ecab10def0953c (HEAD -> dev, origin/dev) -Author: tux <[tux@example.com][2]> -Date:   Sun Nov 5 21:40:37 2020 +1300 - -    exit immediately from failed download - -commit 094f9948cd995acfc331a6965032ea0d38e01f03 (origin/master, master) -Author: Tux <[tux@example.com][2]> -Date:   Fri Aug 5 02:05:19 2020 +1200 - -    export makeopts from etc/example.conf - -commit 76b7b46dc53ec13316abb49cc7b37914215acd47 -Author: Tux <[tux@example.com][2]> -Date:   Sun Jul 31 21:45:24 2020 +1200 - -    fix typo in help message -``` - -Even when the author helpfully specifies in the commit message which files changed, the log is fairly terse. - -Here's the output of `git log --raw`: - - -``` -$ git log --raw -commit fbbbe083aed75b24f2c77b1825ecab10def0953c (HEAD -> dev, origin/dev) -Author: tux <[tux@example.com][2]> -Date:   Sun Nov 5 21:40:37 2020 +1300 - -    exit immediately from failed download - -:100755 100755 cbcf1f3 4cac92f M        src/example.lua - -commit 094f9948cd995acfc331a6965032ea0d38e01f03 (origin/master, master) -Author: Tux <[tux@example.com][2]> -Date:   Fri Aug 5 02:05:19 2020 +1200 - -    export makeopts from etc/example.conf -    -:100755 100755 4c815c0 cbcf1f3 M     src/example.lua -:100755 100755 71653e1 8f5d5a6 M     src/example.spec -:100644 100644 9d21a6f e33caba R100  etc/example.conf  etc/example.conf-default - -commit 76b7b46dc53ec13316abb49cc7b37914215acd47 -Author: Tux <[tux@example.com][2]> -Date:   Sun Jul 31 21:45:24 2020 +1200 - -    fix typo in help message - -:100755 100755 e253aaf 4c815c0 M        src/example.lua -``` - -This tells you exactly which file was added to the commit and how the file was changed (`A` for added, `M` for modified, `R` for renamed, and `D` for deleted). - -### Git whatchanged - -The `git whatchanged` command is a legacy command that predates the log function. Its documentation says you're not meant to use it in favor of `git log --raw` and implies it's essentially deprecated. However, I still find it a useful shortcut to (mostly) the same output (although merge commits are excluded), and I anticipate creating an alias for it should it ever be removed. If you don't need to merge commits in your log (and you probably don't, if you're only looking to see files that changed), try `git whatchanged` as an easy mnemonic. - -### View changes - -Not only can you see which files changed, but you can also make `git log` display exactly what changed in the files. Your Git log can produce an inline diff, a line-by-line display of all changes for each file, with the `--patch` option: - - -``` -commit 62a2daf8411eccbec0af69e4736a0fcf0a469ab1 (HEAD -> master) -Author: Tux <[Tux@example.com][3]> -Date:   Wed Mar 10 06:46:58 2021 +1300 - -    commit - -diff --git a/hello.txt b/hello.txt -index 65a56c3..36a0a7d 100644 -\--- a/hello.txt -+++ b/hello.txt -@@ -1,2 +1,2 @@ - Hello --world -+opensource.com -``` - -In this example, the one-word line "world" was removed from `hello.txt` and the new line "opensource.com" was added. - -These patches can be used with common Unix utilities like [diff and patch][4], should you need to make the same changes manually elsewhere. The patches are also a good way to summarize the important parts of what new information a specific commit introduces. This is an invaluable overview when you've introduced a bug during a sprint. To find the cause of the error faster, you can ignore the parts of a file that didn't change and review just the new code. - -### Simple commands for complex results - -You don't have to understand refs and branches and commit hashes to view what files changed in a commit. Your Git log was designed to report Git activity to you, and if you want to format it in a specific way or extract specific information, it's often a matter of wading through many screens of documentation to put together the right command. Luckily, one of the most common requests about Git history is available with just one or two options: `--raw` and `--patch`. And if you can't remember `--raw`, just think, "Git, what changed?" and type `git whatchanged`. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/git-whatchanged - -作者:[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/code_computer_development_programming.png?itok=4OM29-82 (Code going into a computer.) -[2]: mailto:tux@example.com -[3]: mailto:Tux@example.com -[4]: https://opensource.com/article/18/8/diffs-patches diff --git a/translated/tech/20210401 Find what changed in a Git commit.md b/translated/tech/20210401 Find what changed in a Git commit.md new file mode 100644 index 0000000000..f95ac5cb4b --- /dev/null +++ b/translated/tech/20210401 Find what changed in a Git commit.md @@ -0,0 +1,136 @@ +[#]: subject: (Find what changed in a Git commit) +[#]: via: (https://opensource.com/article/21/4/git-whatchanged) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: (DCOLIVERSUN) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +查看 Git 提交中发生了什么变化 +====== +Git 提供了几种方式可以帮你快速查看提交中哪些文件被改变。 +![运行在电脑中的代码][1] + +如果你每天使用 Git,应该会提交不少改动。如果你每天和其他人在一个项目中使用 Git,假设 _每个人_ 每天的提交都是安全的,你会意识到 Git 日志会变得多么混乱,看似不停地滚动变化,却没有任何改变的迹象。 + +那么,你该怎样查看指定提交中文件发生哪些变化?这比你想的容易。 + +### 查看提交中文件发生的变化 + +为了发现指定提交中哪些文件发生变化,可以使用 `git log --raw` 命令。这是发现提交影响哪些文件的最快速、最方便的方法。`git log` 命令不常用,主要是因为它有太多的格式选项,许多用户在面对很多选择以及在一些情况下不明所以的文档时,会望而却步。 + +然而,Git 的日志机制非常灵活,`--raw` 选项提供了当前分支中的提交日志,以及更改的文件列表。 + +以下是标准的 `git log` 输出: + + +``` +$ git log +commit fbbbe083aed75b24f2c77b1825ecab10def0953c (HEAD -> dev, origin/dev) +Author: tux <[tux@example.com][2]> +Date:   Sun Nov 5 21:40:37 2020 +1300 + +    exit immediately from failed download + +commit 094f9948cd995acfc331a6965032ea0d38e01f03 (origin/master, master) +Author: Tux <[tux@example.com][2]> +Date:   Fri Aug 5 02:05:19 2020 +1200 + +    export makeopts from etc/example.conf + +commit 76b7b46dc53ec13316abb49cc7b37914215acd47 +Author: Tux <[tux@example.com][2]> +Date:   Sun Jul 31 21:45:24 2020 +1200 + +    fix typo in help message +``` + +即使作者在提交消息中指定了哪些文件发生变化,日志也相当简洁。 + +以下是 `git log --raw` 输出: + + +``` +$ git log --raw +commit fbbbe083aed75b24f2c77b1825ecab10def0953c (HEAD -> dev, origin/dev) +Author: tux <[tux@example.com][2]> +Date:   Sun Nov 5 21:40:37 2020 +1300 + +    exit immediately from failed download + +:100755 100755 cbcf1f3 4cac92f M        src/example.lua + +commit 094f9948cd995acfc331a6965032ea0d38e01f03 (origin/master, master) +Author: Tux <[tux@example.com][2]> +Date:   Fri Aug 5 02:05:19 2020 +1200 + +    export makeopts from etc/example.conf +    +:100755 100755 4c815c0 cbcf1f3 M     src/example.lua +:100755 100755 71653e1 8f5d5a6 M     src/example.spec +:100644 100644 9d21a6f e33caba R100  etc/example.conf  etc/example.conf-default + +commit 76b7b46dc53ec13316abb49cc7b37914215acd47 +Author: Tux <[tux@example.com][2]> +Date:   Sun Jul 31 21:45:24 2020 +1200 + +    fix typo in help message + +:100755 100755 e253aaf 4c815c0 M        src/example.lua +``` + +这会准确告诉你哪个文件被添加到提交中,哪些文件发生改变(`A` 是添加,`M` 是修改,`R` 是重命名,`D` 是删除)。 + +### Git whatchanged + +`git whatchanged` 命令是日志功能之前的遗留命令。文档说用户不应该用该命令支持 `git log --raw`,并且暗示它本质上已经被否决了。除了合并提交,我仍然发现它的输出与 `git log --raw` 的输出大部分相同,它是一个有用的快捷方式。如果它被删除的话,我期望为他创建一个别名。如果你只想查看已更改的文件,不需要在日志中合并提交,可以尝试 `git whatchanged` 作为简单的助记符。 + +### 查看变化 + +你不仅可以看到哪些文件发生更改,还可以使用 `git log` 显示文件中发生了哪些变化。你的 Git 日志可以生成一个内联比较,用 `--patch` 选项可以逐行显示每个文件的所有更改: + + +``` +commit 62a2daf8411eccbec0af69e4736a0fcf0a469ab1 (HEAD -> master) +Author: Tux <[Tux@example.com][3]> +Date:   Wed Mar 10 06:46:58 2021 +1300 + +    commit + +diff --git a/hello.txt b/hello.txt +index 65a56c3..36a0a7d 100644 +\--- a/hello.txt ++++ b/hello.txt +@@ -1,2 +1,2 @@ + Hello +-world ++opensource.com +``` + +在这个例子中,"world" 这行字从 `hello.txt` 中删掉,"opensource.com" 这行字则添加进去。 + +如果你需要在其他地方手动进行相同的修改,这些补丁patch可以与常见的 Unix 命令一起使用,例如 [diff 与 patch][4]。补丁也是一个好方法,可以总结指定提交中引入新信息的重要部分内容。当你在冲刺阶段引入一个 bug 时,你会发现这里的内容就是非常有价值的概述。为了更快地找到错误的原因,你可以忽略文件中没有更改的部分,只检查新代码。 + + +### 得到复杂结果的简单命令 + +你不必理解引用、分支和提交哈希,就可以查看提交中更改了哪些文件。你的 Git 日志旨在向你报告 Git 活动,如果你想以特定方式格式化它或者提取特定的信息,通常需要费力地浏览许多文档来组合出正确的命令。幸运的是,Git 历史上最常用的请求之一只有一两个选项:`--raw` 与 `--patch`。如果你不记得 `--raw`,就想想“Git,改变什么了?”,然后输入 `git whatchanged`。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/git-whatchanged + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[DCOLIVERSUN](https://github.com/DCOLIVERSUN) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_development_programming.png?itok=4OM29-82 (Code going into a computer.) +[2]: mailto:tux@example.com +[3]: mailto:Tux@example.com +[4]: https://opensource.com/article/18/8/diffs-patches From a18038b3ca62efaab68b17d5a12f21df61d1e391 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 8 Apr 2021 21:30:08 +0800 Subject: [PATCH 608/818] APL --- ...20210406 Experiment on your code freely with Git worktree.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210406 Experiment on your code freely with Git worktree.md b/sources/tech/20210406 Experiment on your code freely with Git worktree.md index 57f7d57f6b..b4ef73f024 100644 --- a/sources/tech/20210406 Experiment on your code freely with Git worktree.md +++ b/sources/tech/20210406 Experiment on your code freely with Git worktree.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/4/git-worktree) [#]: author: (Seth Kenlon https://opensource.com/users/seth) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 3f31ea578401ee930f7ded8087a889abb37253bd Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 8 Apr 2021 22:43:36 +0800 Subject: [PATCH 609/818] TSL&PRF --- ...t on your code freely with Git worktree.md | 144 ------------------ ...t on your code freely with Git worktree.md | 135 ++++++++++++++++ 2 files changed, 135 insertions(+), 144 deletions(-) delete mode 100644 sources/tech/20210406 Experiment on your code freely with Git worktree.md create mode 100644 translated/tech/20210406 Experiment on your code freely with Git worktree.md diff --git a/sources/tech/20210406 Experiment on your code freely with Git worktree.md b/sources/tech/20210406 Experiment on your code freely with Git worktree.md deleted file mode 100644 index b4ef73f024..0000000000 --- a/sources/tech/20210406 Experiment on your code freely with Git worktree.md +++ /dev/null @@ -1,144 +0,0 @@ -[#]: subject: (Experiment on your code freely with Git worktree) -[#]: via: (https://opensource.com/article/21/4/git-worktree) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Experiment on your code freely with Git worktree -====== -Get freedom to try things out alongside the security of having a new, -linked clone of your repository if your experiment goes wrong. -![Science lab with beakers][1] - -Git is designed in part to enable experimentation. Once you know that your work is safely being tracked and safe states exist for you to fall back upon if something goes horribly wrong, you're not afraid to try new ideas. Part of the price of innovation, though, is that you're likely to make a mess along the way. Files get renamed, moved, removed, changed, and cut into pieces. New files are introduced. Temporary files that you don't intend to track take up residence in your working directory. - -In short, your workspace becomes a house of cards, balancing precariously between _"it's almost working!"_ and _"oh no, what have I done?"_. So what happens when you need to get your repository back to a known state for an afternoon so that you can get some _real_ work done? The classic commands git branch and [git stash][2] come immediately to mind, but neither is designed to deal, one way or another, with untracked files, and changed file paths and other major shifts can make it confusing to just stash your work away for later. The answer is Git worktree. - -### What is a Git worktree - -A Git worktree is a linked copy of your Git repository, allowing you to have multiple branches checked out at a time. A worktree has a separate path from your main working copy, but it can be in a different state and on a different branch. The advantage of a new worktree in Git is that you can make a change unrelated to your current task, commit the change, and then merge it at a later date, all without disturbing your current work environment. - -The canonical example, straight from the `git-worktree` man page, is that you're working on an exciting new feature for a project when your project manager tells you there's an urgent fix required. The problem is that your working repository (your "worktree") is in disarray because you're developing a major new feature. You don't want to "sneak" the fix into your current sprint, and you don't feel comfortable stashing changes to create a new branch for the fix. Instead, you decide to create a fresh worktree so that you can make the fix there: - - -``` -$ git branch | tee -* dev -trunk -$ git worktree add -b hotfix ~/code/hotfix trunk -Preparing ../hotfix (identifier hotfix) -HEAD is now at 62a2daf commit -``` - -In your `code` directory, you now have a new directory called `hotfix`, which is a Git worktree linked to your main project repository, with its `HEAD` parked at the branch called `trunk`. You can now treat this worktree as if it were your main workspace. You can change directory into it, make the urgent fix, commit it, and eventually remove the worktree: - - -``` -$ cd ~/code/hotfix -$ sed -i 's/teh/the/' hello.txt -$ git commit --all --message 'urgent hot fix' -``` - -Once you've finished your urgent work, you can return to your previous task. You're in control of when your hotfix gets integrated into the main project. For instance, you can push the change directly from its worktree to the project's remote repo: - - -``` -$ git push origin HEAD -$ cd ~/code/myproject -``` - -Or you can archive the worktree as a TAR or ZIP file: - - -``` -$ cd ~/code/myproject -$ git archive --format tar --output hotfix.tar master -``` - -Or you can fetch the changes locally from the separate worktree: - - -``` -$ git worktree list -/home/seth/code/myproject  15fca84 [dev] -/home/seth/code/hotfix     09e585d [master] -``` - -From there, you can merge your changes using whatever strategy works best for you and your team. - -### Listing active worktrees - -You can get a list of the worktrees and see what branch each has checked out using the `git worktree list` command: - - -``` -$ git worktree list -/home/seth/code/myproject  15fca84 [dev] -/home/seth/code/hotfix     09e585d [master] -``` - -You can use this from within either worktree. Worktrees are always linked (unless you manually move them, breaking Git's ability to locate a worktree, and therefore severing the link). - -### Moving a worktree - -Git tracks the locations and states of a worktree in your project's `.git` directory: - - -``` -$ cat ~/code/myproject/.git/worktrees/hotfix/gitdir -/home/seth/code/hotfix/.git -``` - -If you need to relocate a worktree, you must do that using `git worktree move`; otherwise, when Git tries to update the worktree's status, it fails: - - -``` -$ mkdir ~/Temp -$ git worktree move hotfix ~/Temp -$ git worktree list -/home/seth/code/myproject  15fca84 [dev] -/home/seth/Temp/hotfix     09e585d [master] -``` - -### Removing a worktree - -When you're finished with your work, you can remove it with the `remove` subcommand: - - -``` -$ git worktree remove hotfix -$ git worktree list -/home/seth/code/myproject  15fca84 [dev] -``` - -To ensure your `.git` directory is clean, use the `prune` subcommand after removing a worktree: - - -``` -`$ git worktree remove prune` -``` - -### When to use worktrees - -As with many options, whether it's tabs or bookmarks or automatic backups, it's up to you to keep track of the data you generate, or it could get overwhelming. Don't use worktrees so often that you end up with 20 copies of your repo, each in a slightly different state. I find it best to create a worktree, do the task that requires it, commit the work, and then remove the tree. Keep it simple and focused. - -The important thing is that worktrees provide improved flexibility for how you manage a Git repository. Use them when you need them, and never again scramble to preserve your working state just to check something on another branch. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/git-worktree - -作者:[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/science_experiment_beaker_lab.png?itok=plKWRhlU (Science lab with beakers) -[2]: https://opensource.com/article/21/4/git-stash diff --git a/translated/tech/20210406 Experiment on your code freely with Git worktree.md b/translated/tech/20210406 Experiment on your code freely with Git worktree.md new file mode 100644 index 0000000000..ffffba7845 --- /dev/null +++ b/translated/tech/20210406 Experiment on your code freely with Git worktree.md @@ -0,0 +1,135 @@ +[#]: subject: (Experiment on your code freely with Git worktree) +[#]: via: (https://opensource.com/article/21/4/git-worktree) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) + +使用 Git 工作树对你的代码进行自由实验 +====== + +> 获得自由尝试的权利,同时在你的实验出错时可以安全地拥有一个新的、链接的克隆存储库。 + +![带烧杯的科学实验室][1] + +Git 的设计部分是为了进行实验。如果你知道你的工作会被安全地跟踪,并且在出现严重错误时有安全状态存在,你就不会害怕尝试新的想法。不过,创新的部分代价是,你很可能会在过程中弄得一团糟。文件会被重新命名、移动、删除、更改、切割成碎片;新的文件被引入;你不打算跟踪的临时文件会在你的工作目录中占据一席之地等等。 + +简而言之,你的工作空间变成了纸牌屋,在“快好了!”和“哦,不,我做了什么?”之间岌岌可危地平衡着。那么,当你需要把仓库恢复到下午的一个已知状态,以便完成一些真正的工作时,该怎么办?我立刻想到了 `git branch` 和 [git stash][2] 这两个经典命令,但这两个命令都不是用来处理未被跟踪的文件的,而且文件路径的改变和其他重大的转变也会让人困惑,它们只能把工作藏(`stash`)起来以备后用。解决这个需求的答案是 Git 工作树。 + +### 什么是 Git 工作树 + +Git 工作树是 Git 仓库的一个链接副本,允许你同时签出多个分支。工作树与主工作副本的路径是分开的,它可以处于不同的状态和不同的分支上。在 Git 中新建工作树的好处是,你可以在不干扰当前工作环境的情况下,做出与当前任务无关的修改,提交修改,然后在以后再合并。 + +直接从 `git-worktree` 手册中找到了一个典型的例子:当你正在为一个项目做一个令人兴奋的新功能时,你的项目经理告诉你有一个紧急的修复工作。问题是你的工作仓库(你的“工作树”)处于混乱状态,因为你正在开发一个重要的新功能。你不想在当前的冲刺中“偷偷地”进行修复,而且你也不愿意把变更藏(`stash`)起来,为修复创建一个新的分支。相反,你决定创建一个新的工作树,这样你就可以在那里进行修复: + +``` +$ git branch | tee +* dev +trunk +$ git worktree add -b hotfix ~/code/hotfix trunk +Preparing ../hotfix (identifier hotfix) +HEAD is now at 62a2daf commit +``` + +在你的 `code` 目录中,你现在有一个新的目录叫做 `hotfix`,它是一个与你的主项目仓库相连的 Git 工作树,它的 `HEAD` 停在叫做 `trunk` 的分支上。现在你可以把这个工作树当作你的主工作区来对待。你可以把目录切换到它里面,进行紧急修复、提交、并最终删除这个工作树: + +``` +$ cd ~/code/hotfix +$ sed -i 's/teh/the/' hello.txt +$ git commit --all --message 'urgent hot fix' +``` + +一旦你完成了你的紧急工作,你就可以回到你之前的任务。你可以控制你的热修复何时被集成到主项目中。例如,你可以直接将变更从其工作树推送到项目的远程存储库中: + +``` +$ git push origin HEAD +$ cd ~/code/myproject +``` + +或者你可以将工作树存档为 TAR 或 ZIP 文件: + +``` +$ cd ~/code/myproject +$ git archive --format tar --output hotfix.tar master +``` + +或者你可以从单独的工作树中获取本地的变化: + +``` +$ git worktree list +/home/seth/code/myproject  15fca84 [dev] +/home/seth/code/hotfix     09e585d [master] +``` + +从那里,你可以使用任何最适合你和你的团队的策略合并你的变化。 + +### 列出活动工作树 + +你可以使用 `git worktree list` 命令获得工作树的列表,并查看每个工作树签出的分支: + +``` +$ git worktree list +/home/seth/code/myproject  15fca84 [dev] +/home/seth/code/hotfix     09e585d [master] +``` + +你可以在任何一个工作树中使用这个功能。工作树始终是链接的(除非你手动移动它们,破坏 Git 定位工作树的能力,从而切断链接)。 + +### 移动工作树 + +Git 会跟踪项目 `.git` 目录下工作树的位置和状态: + +``` +$ cat ~/code/myproject/.git/worktrees/hotfix/gitdir +/home/seth/code/hotfix/.git +``` + +如果你需要重定位一个工作树,必须使用 `git worktree move`;否则,当 Git 试图更新工作树的状态时,就会失败: + +``` +$ mkdir ~/Temp +$ git worktree move hotfix ~/Temp +$ git worktree list +/home/seth/code/myproject  15fca84 [dev] +/home/seth/Temp/hotfix     09e585d [master] +``` + +### 移除工作树 + +当你完成你的工作时,你可以用 `remove` 子命令删除它: + +``` +$ git worktree remove hotfix +$ git worktree list +/home/seth/code/myproject  15fca84 [dev] +``` + +为了确保你的 `.git` 目录是干净的,在删除工作树后使用 `prune` 子命令: + +``` +$ git worktree remove prune +``` + +### 何时使用工作树 + +与许多选项一样,无论是标签还是书签还是自动备份,都要靠你来跟踪你产生的数据,否则可能会变得不堪重负。不要经常使用工作树,要不你最终会有 20 份存储库的副本,每份副本的状态都略有不同。我发现最好是创建一个工作树,做需要它的任务,提交工作,然后删除树。保持简单和专注。 + +重要的是,工作树为你管理 Git 存储库的方式提供了更好的灵活性。在需要的时候使用它们,再也不用为了检查另一个分支上的内容而争先恐后地保存工作状态了。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/git-worktree + +作者:[Seth Kenlon][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/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/science_experiment_beaker_lab.png?itok=plKWRhlU (Science lab with beakers) +[2]: https://opensource.com/article/21/4/git-stash From 116544e71597ab8ad6a1818c29f1ca14404786b8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 8 Apr 2021 23:16:39 +0800 Subject: [PATCH 610/818] PRF @geekpi --- ...rce tool to monitor variables in Python.md | 72 ++++++++----------- 1 file changed, 31 insertions(+), 41 deletions(-) diff --git a/translated/tech/20210331 Use this open source tool to monitor variables in Python.md b/translated/tech/20210331 Use this open source tool to monitor variables in Python.md index a2be6f4c97..e4affaa8e8 100644 --- a/translated/tech/20210331 Use this open source tool to monitor variables in Python.md +++ b/translated/tech/20210331 Use this open source tool to monitor variables in Python.md @@ -3,34 +3,34 @@ [#]: author: (Tian Gao https://opensource.com/users/gaogaotiantian) [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) 使用这个开源工具来监控 Python 中的变量 ====== -Watchpoints 是一个简单但功能强大的工具,可以帮助你在调试 Python 时监控变量。 -![Looking back with binoculars][1] + +> Watchpoints 是一个简单但功能强大的工具,可以帮助你在调试 Python 时监控变量。 + +![](https://img.linux.net.cn/data/attachment/album/202104/08/231614imw8zqfncz5qwwow.jpg) 在调试代码时,你经常面临着要弄清楚一个变量何时发生变化。如果没有任何高级工具,那么可以选择使用打印语句在期望它们更改时输出变量。然而,这是一种非常低效的方法,因为变量可能在很多地方发生变化,并且不断地将其打印到终端上会产生很大的干扰,而将它们打印到日志文件中则变得很麻烦。 这是一个常见的问题,但现在有一个简单而强大的工具可以帮助你监控变量:[watchpoints][2]。 -[watchpoint 的概念在 C 和 C++ 调试器中很常见][3],用于监控内存,但在 Python 中缺乏相应的工具。`watchpoints` 填补了这个空白。 +[“监视点”的概念在 C 和 C++ 调试器中很常见][3],用于监控内存,但在 Python 中缺乏相应的工具。`watchpoints` 填补了这个空白。 ### 安装 要使用它,你必须先用 `pip` 安装它: - ``` -`$ python3 -m pip install watchpoints` +$ python3 -m pip install watchpoints ``` ### 在Python中使用 watchpoints -对于任何一个你想监控的变量,使用 **watch** 函数对其进行监控。 - +对于任何一个你想监控的变量,使用 `watch` 函数对其进行监控。 ``` from watchpoints import watch @@ -42,16 +42,15 @@ a = 1 当变量发生变化时,它的值就会被打印到**标准输出**: - ``` ====== Watchpoints Triggered ====== Call Stack (most recent call last): -  <module> (my_script.py:5): -> a = 1 + (my_script.py:5): +> a = 1 a: 0 --> +-> 1 ``` @@ -61,25 +60,21 @@ a: * 调用栈。 * 变量的先前值/当前值。 - - 它不仅适用于变量本身,也适用于对象的变化: - ``` from watchpoints import watch a = [] watch(a) -a = {} # Trigger -a["a"] = 2 # Trigger +a = {} # 触发 +a["a"] = 2 # 触发 ``` -当变量 **a** 被重新分配时,回调会被触发,同时当分配给 a 的对象发生变化时也会被触发。 +当变量 `a` 被重新分配时,回调会被触发,同时当分配给 `a` 的对象发生变化时也会被触发。 更有趣的是,监控不受作用域的限制。你可以在任何地方观察变量/对象,而且无论程序在执行什么函数,回调都会被触发。 - ``` from watchpoints import watch @@ -91,26 +86,24 @@ watch(a) func(a) ``` -例如,这段代码打印: - +例如,这段代码打印出: ``` ====== Watchpoints Triggered ====== Call Stack (most recent call last): -  <module> (my_script.py:8): -> func(a) -  func (my_script.py:4): -> var["a"] = 1 + (my_script.py:8): +> func(a) + func (my_script.py:4): +> var["a"] = 1 a: {} --> +-> {'a': 1} ``` -**watch** 函数不仅可以监视一个变量,它也可以监视一个字典或列表的属性和元素。 - +`watch` 函数不仅可以监视一个变量,它也可以监视一个字典或列表的属性和元素。 ``` from watchpoints import watch @@ -121,16 +114,15 @@ class MyObj: obj = MyObj() d = {"a": 0} -watch(obj.a, d["a"]) # Yes you can do this -obj.a = 1 # Trigger -d["a"] = 1 # Trigger +watch(obj.a, d["a"]) # 是的,你可以这样做 +obj.a = 1 # 触发 +d["a"] = 1 # 触发 ``` 这可以帮助你缩小到一些你感兴趣的特定对象。 如果你对输出格式不满意,你可以自定义它。只需定义你自己的回调函数: - ``` watch(a, callback=my_callback) @@ -139,23 +131,21 @@ watch(a, callback=my_callback) watch.config(callback=my_callback) ``` -当触发时,你甚至可以使用 **pdb**: - +当触发时,你甚至可以使用 `pdb`: ``` -`watch.config(pdb=True)` +watch.config(pdb=True) ``` -这与 **breakpoint()** 的行为类似,会给你带来类似调试器的体验。 - -如果你不想在每个文件中都导入这个函数,你可以通过 **install** 函数使其成为全局: +这与 `breakpoint()` 的行为类似,会给你带来类似调试器的体验。 +如果你不想在每个文件中都导入这个函数,你可以通过 `install` 函数使其成为全局: ``` -`watch.install() # or watch.install("func_name") and use it as func_name()` +watch.install() # 或 watch.install("func_name") ,然后以 func_name() 方式使用 ``` -我个人认为,watchpoints 最酷的地方就是使用直观。你对一些数据感兴趣吗?只要”观察“它,你就会知道你的变量何时发生变化。 +我个人认为,`watchpoints` 最酷的地方就是使用直观。你对一些数据感兴趣吗?只要“观察”它,你就会知道你的变量何时发生变化。 ### 尝试 watchpoints @@ -168,7 +158,7 @@ via: https://opensource.com/article/21/4/monitor-debug-python 作者:[Tian Gao][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/) 荣誉推出 From 1fd8fda8494553032a227c629970c80bbeaad4b4 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 8 Apr 2021 23:17:20 +0800 Subject: [PATCH 611/818] PUB @geekpi https://linux.cn/article-13279-1.html --- ...se this open source tool to monitor variables in Python.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210331 Use this open source tool to monitor variables in Python.md (98%) diff --git a/translated/tech/20210331 Use this open source tool to monitor variables in Python.md b/published/20210331 Use this open source tool to monitor variables in Python.md similarity index 98% rename from translated/tech/20210331 Use this open source tool to monitor variables in Python.md rename to published/20210331 Use this open source tool to monitor variables in Python.md index e4affaa8e8..6349b1fe3c 100644 --- a/translated/tech/20210331 Use this open source tool to monitor variables in Python.md +++ b/published/20210331 Use this open source tool to monitor variables in Python.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13279-1.html) 使用这个开源工具来监控 Python 中的变量 ====== From 44040439a858f419894c270b363480a35bede0cc Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 8 Apr 2021 23:32:58 +0800 Subject: [PATCH 612/818] PRF @wxy --- ... 5 signs you might be a Rust programmer.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/translated/tech/20210303 5 signs you might be a Rust programmer.md b/translated/tech/20210303 5 signs you might be a Rust programmer.md index 582bac6d3e..835b05c6e9 100644 --- a/translated/tech/20210303 5 signs you might be a Rust programmer.md +++ b/translated/tech/20210303 5 signs you might be a Rust programmer.md @@ -3,7 +3,7 @@ [#]: author: (Mike Bursell https://opensource.com/users/mikecamel) [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) @@ -12,37 +12,37 @@ > 在我学习 Rust 的过程中,我注意到了 Rust 一族的一些常见行为。 -![name tag that says hello my name is open source][1] +![](https://img.linux.net.cn/data/attachment/album/202104/08/233233asbjasbfuiuosiha.jpg) -我是最近才 [皈依 Rust][2] 的,我大约在 2020 年 4 月底开始学习。但是,像许多皈依者一样,我还是一个热情的布道者。说实话,我也不是一个很好的 Rust 人,因为我的编码风格不是很好,我写的也不是特别符合 Rust 习惯。我猜想这一方面是因为我在写大量代码之前还没有没有真正学完 Rust(其中一些代码又困扰了我),另一方面是因为我并不是那么优秀的程序员。 +我是最近才 [皈依 Rust][2] 的,我大约在是 2020 年 4 月底开始学习的。但是,像许多皈依者一样,我还是一个热情的布道者。说实话,我也不是一个很好的 Rust 人,因为我的编码风格不是很好,我写的也不是特别符合 Rust 习惯。我猜想这一方面是因为我在写大量代码之前还没有没有真正学完 Rust(其中一些代码又困扰了我),另一方面是因为我并不是那么优秀的程序员。 -但我喜欢 Rust,你也应该喜欢。它很友好,比 C 或 C++ 更友好;它为低级系统任务做好了准备,这比 Python 做的更好;而且结构良好,这要超过 Perl;而且,最重要的是,它从设计层面开始,它就是完全开源的,这要比 Java 那些语言好得多。 +但我喜欢 Rust,你也应该喜欢吧。它很友好,比 C 或 C++ 更友好;它为低级系统任务做好了准备,这比 Python 做的更好;而且结构良好,这要超过 Perl;而且,最重要的是,从设计层面开始,它就是完全开源的,这要比 Java 那些语言好得多。 -尽管我缺乏专业知识,但我注意到了一些我认为是许多 Rust 爱好者和程序员的共同点。如果你对以下五个迹象说“是”(其中第一个迹象是由最近的一些令人兴奋的新闻引发的),那么你也可能是一个 Rust 程序员。 +尽管我缺乏专业知识,但我注意到了一些我认为是许多 Rust 爱好者和程序员的共同点。如果你对以下五个迹象点头(其中第一个迹象是由最近的一些令人兴奋的新闻引发的),那么你也可能是一个 Rust 程序员。 ### 1、“基金会”一词会使你兴奋 -对于 Rust 程序员来说,“基金会”一词将不再与艾萨克·阿西莫夫Isaac Asimov关联在一起,而是与新成立的 [Rust 基金会][3] 关联。微软、华为、谷歌、AWS 和Mozilla 正在为该基金会提供了董事(大概也是大部分初始资金),该基金会将负责该语言的各个方面,“预示着 Rust 成为企业生产级技术的到来”,[根据临时执行董事][4] Ashley Williams 说。(顺便说一句,很高兴看到一位女士领导这样一项重大的行业计划。) +对于 Rust 程序员来说,“基金会”一词将不再与艾萨克·阿西莫夫Isaac Asimov关联在一起,而是与新成立的 [Rust 基金会][3] 关联。微软、华为、谷歌、AWS 和Mozilla 为该基金会提供了董事(大概也提供了大部分初始资金),该基金会将负责该语言的各个方面,“预示着 Rust 成为企业生产级技术的到来”,[根据临时执行董事][4] Ashley Williams 说。(顺便说一句,很高兴看到一位女士领导这样一项重大的行业计划。) -该基金会似乎致力于维护 Rust 的理念,并确保每个人都有参与的机会。在许多方面,Rust 都是开源项目的典型示例。并不是说它是完美的(无论是语言还是社区),而是因为似乎有足够的爱好者致力于维护高参与度、低门槛的社区方法,我认为这是许多开源项目的核心。我强烈欢迎此举,我认为此举只会帮助促进 Rust 在未来数年和数月内的采用和成熟。 +该基金会似乎致力于维护 Rust 的理念,并确保每个人都有参与的机会。在许多方面,Rust 都是开源项目的典型示例。并不是说它是完美的(无论是语言还是社区),而是因为似乎有足够的爱好者致力于维护高参与度、低门槛的社区方式,我认为这是许多开源项目的核心。我强烈欢迎此举,我认为这只会帮助促进 Rust 在未来数年和数月内的采用和成熟。 ### 2、你会因为新闻源中提到 Rust 游戏而感到沮丧 -还有一款和电脑有关的东西,也叫做“Rust”,它是一款“只限多玩家的生存电子游戏”。它比 Rust 这个语言更新一些(2013 年宣布,2018 年发布),但我曾经在搜索 Rust 相关的内容时,犯了一个错误,这个名字搜索了游戏。互联网络就是这样的,这意味着我的新闻源现在被这个另类的 Rust 野兽感染了,我现在会从它的影迷和公关人员那里随机得到一些更新消息。这是个低调的烦恼,但我很确定在 Rust(语言)社区中并不是就我一个人这样。我强烈建议,如果你确实想了解更多关于这个计算世界的后起之秀的信息,你可以使用一个提高隐私(我拒绝说 "保护隐私")的 [开源浏览器][5] 来进行研究。 +还有一款和电脑有关的东西,也叫做“Rust”,它是一款“只限多玩家生存类的电子游戏”。它比 Rust 这个语言更新一些(2013 年宣布,2018 年发布),但我曾经在搜索 Rust 相关的内容时,犯了一个错误,用这个名字搜索了游戏。互联网络就是这样的,这意味着我的新闻源现在被这个另类的 Rust 野兽感染了,我现在会从它的影迷和公关人员那里随机得到一些更新消息。这是个低调的烦恼,但我很确定在 Rust(语言)社区中并不是就我一个人这样。我强烈建议,如果你确实想了解更多关于这个计算世界的后起之秀的信息,你可以使用一个提高隐私(我拒绝说 "保护隐私")的 [开源浏览器][5] 来进行研究。 ### 3、“不安全”这个词会让你感到恐惧。 -Rust(语言,再次强调)在帮助你做**正确的事情**™方面做得非常好,当然,在内存安全方面,这是 C 和 C++ 内部的主要关注点(不是因为不可能做到,而是因为真的很难持续正确)。Dave Herman 在 2016 年写了一篇文章,讲述了为什么安全是 Rust 语言的一个积极属性:《[Safety is Rust's fireflower][6]》。安全性(内存、类型安全)可能并不赏心悦目,但随着你写的 Rust 越多,你就会习惯并感激它,尤其是当你参与任何系统编程时,这也是 Rust 经常擅长的地方。 +Rust(语言,再次强调)在帮助你做**正确的事情**™方面做得非常好,当然,在内存安全方面,这是 C 和 C++ 内部的主要关注点(不是因为不可能做到,而是因为真的很难持续正确)。Dave Herman 在 2016 年写了一篇文章《[Safety is Rust's fireflower][6]》,讲述了为什么安全是 Rust 语言的一个积极属性。安全性(内存、类型安全)可能并不赏心悦目,但随着你写的 Rust 越多,你就会习惯并感激它,尤其是当你参与任何系统编程时,这也是 Rust 经常擅长的地方。 -现在,Rust 并不能阻止你做**错误的事情**™,但它确实通过让你使用 `unsafe` 关键字,让你在希望超出安全范围的时候做出一个明智的决定。这不仅对你有好处,因为它(希望)会让你非常、非常仔细地思考你在任何使用它的代码块中放入了什么;它对任何阅读你的代码的人也有好处,这是一个触发词,它能让任何不太清醒的 Rust 人至少微微打起精神,在椅子上坐直,然后想:“嗯,这里发生了什么?我需要特别注意。”如果幸运的话,读你代码的人也许能想到重写它的方法,使它利用到 Rust 的安全特性,或者至少减少了提交和发布的不安全代码的数量。 +现在,Rust 并不能阻止你做**错误的事情**™,但它确实通过让你使用 `unsafe` 关键字,让你在希望超出安全边界的时候做出一个明智的决定。这不仅对你有好处,因为它(希望)会让你非常、非常仔细地思考你在任何使用它的代码块中放入了什么;它对任何阅读你的代码的人也有好处,这是一个触发词,它能让任何不太清醒的 Rust 人至少可以稍微打起精神,在椅子上坐直,然后想:“嗯,这里发生了什么?我需要特别注意。”如果幸运的话,读你代码的人也许能想到重写它的方法,使它利用到 Rust 的安全特性,或者至少减少提交和发布的不安全代码的数量。 ### 4、你想知道为什么没有 `?;`、`{:?}` 、`::<>` 这样的表情符号 -人们喜欢(或讨厌)涡轮鱼(`::<>`),但在 Rust 代码中你经常还会看到其他的语义结构。特别是 `{:?}` (用于字符串格式化)和 `?;`(`?` 是向调用栈传播错误的一种方式,`;` 则是行/块的结束符,所以你经常会看到它们在一起)。它们在 Rust 代码中很常见,你只需边走边学,边走边解析,而且它们也很有用,我有时会想,为什么它们没有被纳入到正常对话中,至少作为表情符号。可能还有其他的。你有什么建议? +人们喜欢(或讨厌)涡轮鱼(`::<>`),但在 Rust 代码中你经常还会看到其他的语义结构。特别是 `{:?}` (用于字符串格式化)和 `?;`(`?` 是向调用栈传播错误的一种方式,`;` 则是行/块的结束符,所以你经常会看到它们在一起)。它们在 Rust 代码中很常见,你只需边走边学,边走边解析,而且它们也很有用,我有时会想,为什么它们没有被纳入到正常对话中,至少可以作为表情符号。可能还有其他的。你有什么建议? ### 5、Clippy 是你的朋友(而不是一个动画回形针) -微软的动画回形针 Clippy 可能是 Office 用户很快就觉得讨厌的“功能”,并成为许多 [模因][7] 的起点。另一方面,`cargo clippy` 是那些 [很棒的 Cargo 命令][8] 之一,应该成为每个 Rust 程序员工具箱的一部分。Clippy 是一个语言整洁器,它可以帮助改进你的代码,使它更干净、更整洁、更易读、更惯用,让你与同事或其他人分享 Rust 代码时,不会感到尴尬。Cargo 可以说是让 “Clippy” 这个名字恢复了声誉,虽然我不会选择给我的孩子起这个名字,但现在每当我在网络上遇到这个词的时候,我不会再有一种不安的感觉。 +微软的动画回形针 Clippy 可能是 Office 用户很快就觉得讨厌的“功能”,并成为许多 [模因][7] 的起点。另一方面,`cargo clippy` 是那些 [很棒的 Cargo 命令][8] 之一,应该成为每个 Rust 程序员工具箱的一部分。Clippy 是一个语言整洁器Linter,它可以帮助改进你的代码,使它更干净、更整洁、更易读、更惯用,让你与同事或其他人分享 Rust 代码时,不会感到尴尬。Cargo 可以说是让 “Clippy” 这个名字恢复了声誉,虽然我不会选择给我的孩子起这个名字,但现在每当我在网络上遇到这个词的时候,我不会再有一种不安的感觉。 * * * @@ -56,7 +56,7 @@ via: https://opensource.com/article/21/3/rust-programmer 作者:[Mike Bursell][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From bfa85a6877e8a2a29c15a942a37315d9c51646ef Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 8 Apr 2021 23:33:35 +0800 Subject: [PATCH 613/818] PUB @wxy https://linux.cn/article-13280-1.html --- .../20210303 5 signs you might be a Rust programmer.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210303 5 signs you might be a Rust programmer.md (99%) diff --git a/translated/tech/20210303 5 signs you might be a Rust programmer.md b/published/20210303 5 signs you might be a Rust programmer.md similarity index 99% rename from translated/tech/20210303 5 signs you might be a Rust programmer.md rename to published/20210303 5 signs you might be a Rust programmer.md index 835b05c6e9..a2e2de6079 100644 --- a/translated/tech/20210303 5 signs you might be a Rust programmer.md +++ b/published/20210303 5 signs you might be a Rust programmer.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13280-1.html) 你可能是 Rust 程序员的五个迹象 ====== From 210dcdd4e5740662b0a654517ab20b38e94fb26f Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 9 Apr 2021 05:02:38 +0800 Subject: [PATCH 614/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210408=20?= =?UTF-8?q?5=20commands=20to=20level-up=20your=20Git=20game?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210408 5 commands to level-up your Git game.md --- ...08 5 commands to level-up your Git game.md | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 sources/tech/20210408 5 commands to level-up your Git game.md diff --git a/sources/tech/20210408 5 commands to level-up your Git game.md b/sources/tech/20210408 5 commands to level-up your Git game.md new file mode 100644 index 0000000000..50c6eb383b --- /dev/null +++ b/sources/tech/20210408 5 commands to level-up your Git game.md @@ -0,0 +1,67 @@ +[#]: subject: (5 commands to level-up your Git game) +[#]: via: (https://opensource.com/article/21/4/git-commands) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +5 commands to level-up your Git game +====== +Get more use out of Git by adding these commands to your repertoire. +![Business woman on laptop sitting in front of window][1] + +If you use Git regularly, you might be aware that it has several reputations. It's probably the most popular version-control solution and is used by some of the [biggest software projects][2] around to [keep track of changes][3] to files. It provides a [robust interface][4] to review and incorporate experimental changes into existing documents. It's well-known for its flexibility, thanks to [Git hooks][5]. And partly because of its great power, it has earned its reputation for being complex. + +You don't have to use all of Git's many features, but if you're looking to delve deeper into Git's subcommands, here are some that you might find useful. + +### 1\. Finding out what changed + +If you're familiar with Git's basics (`fetch`, `add`, `commit`, `push`, `log`, and so on) but you want to learn more, Git subcommands that query are a great, safe place to start. Querying your Git repository (your _work tree_) doesn't make any changes; it's only a reporting mechanism. You're not risking the integrity of your Git checkout; you're only asking Git about its status and history. + +The [git whatchanged][6] command (almost a mnemonic itself) is an easy way to see what changed in a commit. A remarkably user-friendly command, it squashes the best features of `show` and `diff-tree` and `log` into one easy-to-remember command. + +### 2\. Managing changes with git stash + +The more you use Git, the more you use Git. That is, once you've become comfortable with the power of Git, the more often you use its powerful features. Sometimes, you may find yourself in the middle of working with a batch of files when you realize some other task is more urgent. With [git stash][7], you can gather up all the pieces of your work in progress and stash them away for safekeeping. With your workspace decluttered, you can turn your attention to some other task and then reapply stashed files to your work tree later to resume work. + +### 3\. Making a linked copy with git worktree + +When `git stash` isn't enough, Git also provides the powerful [git worktree][8] command. With it, you can create a new but _linked_ clone of your repository, forming a new branch and setting `HEAD` to whatever commit you want to base your new work on. In this linked clone, you can work on a task unrelated to what your primary clone is focused on. It's a good way to keep your work in progress safe from unintended changes. When you're finished with your new work tree, you can push your new branch to a remote, bundle the changes into an archive for later, or just fetch the changes from your other tree. Whatever you decide, your workspaces are kept separate, and the changes in one don't have to affect changes in the other until you are ready to merge. + +### 4\. Selecting merges with git cherry-pick + +It may seem counterintuitive, but the better at Git you get, the more merge conflicts you're likely to encounter. That's because merge conflicts aren't necessarily signs of errors but signs of activity. Getting comfortable with merge conflicts and how to resolve them is an important step in learning Git. The usual methods work well, but sometimes you need greater flexibility in how you merge, and for that, there's [git cherry-pick][9]. Cherry-picking merges allows you to be selective in what parts of commits you merge, so you never have to reject a merge request based on a trivial incongruity. + +### 5\. Managing $HOME with Git + +Managing your home directory with Git has never been easier, and thanks to Git's ability to be selective in what it manages, it's a realistic option for keeping your computers in sync. To work well, though, you must do it judiciously. To get started, read my tips on [managing $HOME with Git][10]. + +### Getting better at Git + +Git is a powerful version-control system, and the more comfortable you become with it, the easier it becomes to use it for complex tasks. Try some new Git commands today, and share your favorites in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/git-commands + +作者:[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/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating) +[2]: https://opensource.com/article/19/10/how-gnome-uses-git +[3]: https://opensource.com/article/18/2/how-clone-modify-add-delete-git-files +[4]: https://opensource.com/article/18/5/git-branching +[5]: https://opensource.com/life/16/8/how-construct-your-own-git-server-part-6 +[6]: https://opensource.com/article/21/3/git-whatchanged +[7]: https://opensource.com/article/21/3/git-stash +[8]: https://opensource.com/article/21/3/git-worktree +[9]: https://opensource.com/article/21/3/reasons-use-cherry-picking +[10]: https://opensource.com/article/21/3/git-your-home From 88135459a69c66d2aa7d2f1032040c25f4447b97 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 9 Apr 2021 05:02:52 +0800 Subject: [PATCH 615/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210408=20?= =?UTF-8?q?Protect=20external=20storage=20with=20this=20Linux=20encryption?= =?UTF-8?q?=20system?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210408 Protect external storage with this Linux encryption system.md --- ...orage with this Linux encryption system.md | 174 ++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 sources/tech/20210408 Protect external storage with this Linux encryption system.md diff --git a/sources/tech/20210408 Protect external storage with this Linux encryption system.md b/sources/tech/20210408 Protect external storage with this Linux encryption system.md new file mode 100644 index 0000000000..6c3725e1bc --- /dev/null +++ b/sources/tech/20210408 Protect external storage with this Linux encryption system.md @@ -0,0 +1,174 @@ +[#]: subject: (Protect external storage with this Linux encryption system) +[#]: via: (https://opensource.com/article/21/3/encryption-luks) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Protect external storage with this Linux encryption system +====== +Use Linux Unified Key Setup to encrypt your thumb drives, external hard +drives, and other storage from prying eyes. +![A keyboard with privacy written on it.][1] + +Many people consider hard drives secure because they physically own them. It's difficult to read the data on a hard drive that you don't have, and many people think that protecting their computer with a passphrase makes the data on the drive unreadable. + +This isn't always the case, partly because, in some cases, a passphrase serves only to unlock a user session. In other words, you can power on a computer, but because you don't have its passphrase, you can't get to the desktop, and so you have no way to open files to look at them. + +The problem, as many a computer technician understands, is that hard drives can be extracted from computers, and some drives are already external by design (USB thumb drives, for instance), so they can be attached to any computer for full access to the data on them. You don't have to physically separate a drive from its computer host for this trick to work, either. Computers can be [booted from a portable boot drive][2], which separates a drive from its host operating system and turns it into, virtually, an external drive available for reading. + +The answer is to place the data on a drive into a digital vault that can't be opened without information that only you have access to. + +Linux Unified Key Setup ([LUKS][3]) is a disk-encryption system. It provides a generic key store (and associated metadata and recovery aids) in a dedicated area on a disk with the ability to use multiple passphrases (or key files) to unlock a stored key. It's designed to be flexible and can even store metadata externally so that it can be integrated with other tools. The result is full-drive encryption, so you can store all of your data confident that it's safe—even if your drive is separated, either physically or through software, from your computer. + +### Encrypting during installation + +The easiest way to implement full-drive encryption is to select the option during installation. Most modern Linux distributions offer this as an option, so it's usually a trivial process. + +![Encrypt during installation][4] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +This establishes everything you need: an encrypted drive requiring a passphrase before your system can boot. If the drive is extracted from your computer or accessed from another operating system running on your computer, the drive must be decrypted by LUKS before it can be mounted. + +### Encrypting external drives + +It's not common to separate an internal hard drive from its computer, but external drives are designed to travel. As technology gets smaller and smaller, it's easier to put a portable drive on your keychain and carry it around with you every day. The obvious danger, however, is that these are also pretty easy to misplace. I've found abandoned drives in the USB ports of hotel lobby computers, business center printers, classrooms, and even a laundromat. Most of these didn't include personal information, but it's an easy mistake to make. + +You can mitigate against misplacing important data by encrypting your external drives. + +LUKS and its frontend `cryptsetup` provide a way to do this on Linux. As Linux does during installation, you can encrypt the entire drive so that it requires a passphrase to mount it. + +### How to encrypt an external drive with LUKS + +First, you need an empty external drive (or a drive with contents you're willing to erase). This process overwrites all the data on a drive, so if you have data that you want to keep on the drive, _back it up first_. + +#### 1\. Find your drive + +I used a small USB thumb drive. To protect you from accidentally erasing data, the drive referenced in this article is located at the imaginary location `/dev/sdX`. Attach your drive and find its location: + + +``` +$ lsblk +sda    8:0    0 111.8G  0 disk +sda1   8:1    0 111.8G  0 part / +sdb    8:112  1  57.6G  0 disk +sdb1   8:113  1  57.6G  0 part /mydrive +sdX    8:128  1   1.8G  0 disk +sdX1   8:129  1   1.8G  0 part +``` + +I know that my demo drive is located at `/dev/sdX` because I recognize its size (1.8GB), and it's also the last drive I attached (with `sda` being the first, `sdb` the second, `sdc` the third, and so on). The `/dev/sdX1` designator means the drive has 1 partition. + +If you're unsure, remove your drive, look at the output of `lsblk`, and then attach your drive and look at `lsblk` again. + +Make sure you identify the correct drive because encrypting it overwrites _everything on it_. My drive is not empty, but it contains copies of documents I have copies of elsewhere, so losing this data isn't significant to me. + +#### 2\. Clear the drive + +To proceed, destroy the drive's partition table by overwriting the drive's head with zeros: + + +``` +`$ sudo dd if=/dev/zero of=/dev/sdX count=4096` +``` + +This step isn't strictly necessary, but I like to start with a clean slate. + +#### 3\. Format your drive for LUKS + +The `cryptsetup` command is a frontend for managing LUKS volumes. The `luksFormat` subcommand creates a sort of LUKS vault that's password-protected and can house a secured filesystem. + +When you create a LUKS partition, you're warned about overwriting data and then prompted to create a passphrase for your drive: + + +``` +$ sudo cryptsetup luksFormat /dev/sdX +WARNING! +======== +This will overwrite data on /dev/sdX irrevocably. + +Are you sure? (Type uppercase yes): YES +Enter passphrase: +Verify passphrase: +``` + +#### 4\. Open the LUKS volume + +Now you have a fully encrypted vault on your drive. Prying eyes, including your own right now, are kept out of this LUKS partition. So to use it, you must open it with your passphrase. Open the LUKS vault with `cryptsetup open` along with the device location (`/dev/sdX`, in my example) and an arbitrary name for your opened vault: + + +``` +`$ cryptsetup open /dev/sdX vaultdrive` +``` + +I use `vaultdrive` in this example, but you can name your vault anything you want, and you can give it a different name every time you open it. + +LUKS volumes are opened in a special device location called `/dev/mapper`. You can list the files there to check that your vault was added: + + +``` +$ ls /dev/mapper +control  vaultdrive +``` + +You can close a LUKS volume at any time using the `close` subcommand: + + +``` +`$ cryptsetup close vaultdrive` +``` + +This removes the volume from `/dev/mapper`. + +#### 5\. Create a filesystem + +Now that you have your LUKS volume decrypted and open, you must create a filesystem there to store data in it. In my example, I use XFS, but you can use ext4 or JFS or any filesystem you want: + + +``` +`$ sudo mkfs.xfs -f -L myvault /dev/mapper/vaultdrive` +``` + +### Mount and unmount a LUKS volume + +You can mount a LUKS volume from a terminal with the `mount` command. Assume you have a directory called `/mnt/hd` and want to mount your LUKS volume there: + + +``` +$ sudo cryptsetup open /dev/sdX vaultdrive +$ sudo mount /dev/mapper/vaultdrive /mnt/hd +``` + +LUKS also integrates into popular Linux desktops. For instance, when I attach an encrypted drive to my workstation running KDE or my laptop running GNOME, my file manager prompts me for a passphrase before it mounts the drive. + +![LUKS requesting passcode to mount drive][6] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +### Encryption is protection + +Linux makes encryption easier than ever. It's so easy, in fact, that it's nearly unnoticeable. The next time you [format an external drive for Linux][7], consider using LUKS first. It integrates seamlessly with your Linux desktop and protects your important data from accidental exposure. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/encryption-luks + +作者:[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/privacy_keyboard_security.jpg?itok=vZ9jFdK_ (A keyboard with privacy written on it.) +[2]: https://opensource.com/article/19/6/linux-distros-to-try +[3]: https://gitlab.com/cryptsetup/cryptsetup/blob/master/README.md +[4]: https://opensource.com/sites/default/files/uploads/centos8-install-encrypt.jpg (Encrypt during installation) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: https://opensource.com/sites/default/files/uploads/luks-mount-gui.png (LUKS requesting passcode to mount drive) +[7]: https://opensource.com/article/18/11/partition-format-drive-linux From cf7daa4ccf474e9ae0e871ced87e36744dc7ecf0 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 9 Apr 2021 08:44:04 +0800 Subject: [PATCH 616/818] translated --- ...cy-Focused Google Analytics Alternative.md | 92 ------------------- ...cy-Focused Google Analytics Alternative.md | 92 +++++++++++++++++++ 2 files changed, 92 insertions(+), 92 deletions(-) delete mode 100644 sources/tech/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md create mode 100644 translated/tech/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md diff --git a/sources/tech/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md b/sources/tech/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md deleted file mode 100644 index 51938e2449..0000000000 --- a/sources/tech/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md +++ /dev/null @@ -1,92 +0,0 @@ -[#]: subject: (Plausible: Privacy-Focused Google Analytics Alternative) -[#]: via: (https://itsfoss.com/plausible/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Plausible: Privacy-Focused Google Analytics Alternative -====== - -[Plausible][1] is a simple, privacy-friendly analytics tool. It helps you analyze the number of unique visitors, pageviews, bounce rate and visit duration. - -If you have a website you would probably understand those terms. As a website owner, it helps you know if your site is getting more visitors over the time, from where the traffic is coming and if you have some knowledge on these things, you can work on improving your website for more visits. - -When it comes to website analytics, the one service that rules this domain is the Google’s free tool Google Analytics. Just like Google is the de-facto search engine, Google Analytics is the de-facto analytics tool. But you don’t have to live with it specially if you cannot trust Big tech with your and your site visitor’s data. - -Plausible gives you the freedom from Google Analytics and I am going to discuss this open source project in this article. - -Please mind that some technical terms in the article could be unknown to you if you have never managed a website or bothered about analytics. - -### Plausible for privacy friendly website analytics - -The script used by Plausible for analytics is extremely lightweight with less than 1 KB in size. - -The focus is on preserving the privacy so you get valuable and actionable stats without compromising on the privacy of your visitors. Plausible is one of the rare few analytics tool that doesn’t require cookie banner or GDP consent because it is already [GDPR-compliant][2] on privacy front. That’s super cool. - -In terms of features, it doesn’t have the same level of granularity and details of Google Analytics. Plausible banks on simplicity. It shows a graph of your traffic stats for past 30 days. You may also switch to real time view. - -![][3] - -You can also see where your traffic is coming from and which pages on your website gets the most visits. The sources can also show UTM campaigns. - -![][4] - -You also have the option to enable GeoIP to get some insights about the geographical location of your website visitors. You can also check how many visitors use desktop or mobile device to visit your website. There is also an option for operating system and as you can see, [Linux Handbook][5] gets 48% of its visitors from Windows devices. Pretty strange, right? - -![][6] - -Clearly, the data provided is nowhere close to what Google Analytics can do, but that’s intentional. Plausible intends to provide you simple matrix. - -### Using Plausible: Opt for paid managed hosting or self-host it on your server - -There are two ways you can start using Plausible. Sign up for their official managed hosting. You’ll have to pay for the service and this eventually helps the development of the Plausible project. They do have 30-days trial period and it doesn’t even require any payment information from your side. - -The pricing starts at $6 per month for 10k monthly pageviews. Pricing increases with the number of pageviews. You can calculate the pricing on Plausible website. - -[Plausible Pricing][7] - -You can try it for 30 days and see if you would like to pay to Plausible developers for the service and own your data. - -If you think the pricing is not affordable, you can take the advantage of the fact that Plausible is open source and deploy it yourself. If you are interested, read our [in-depth guide on self-hosting a Plausible instance with Docker][8]. - -At It’s FOSS, we self-host Plausible. Our Plausible instance has three of our websites added. - -![Plausble dashboard for It’s FOSS websites][9] - -If you maintain the website of an open source project and would like to use Plausible, you can contact us through our [High on Cloud project][10]. With High on Cloud, we help small businesses host and use open source software on their servers. - -### Conclusion - -If you are not super obsessed with data and just want a quick glance on how your website is performing, Plausible is a decent choice. I like it because it is lightweight and privacy compliant. That’s the main reason why I use it on Linux Handbook, our [ethical web portal for teaching Linux server related stuff][11]. - -Overall, I am pretty content with Plausible and recommend it to other website owners. - -Do you run or manage a website as well? What tool do you use for the analytics or do you not care about that at all? - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/plausible/ - -作者:[Abhishek Prakash][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/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://plausible.io/ -[2]: https://gdpr.eu/compliance/ -[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/03/plausible-graph-lhb.png?resize=800%2C395&ssl=1 -[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/03/plausible-stats-lhb-2.png?resize=800%2C333&ssl=1 -[5]: https://linuxhandbook.com/ -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/plausible-geo-ip-stats.png?resize=800%2C331&ssl=1 -[7]: https://plausible.io/#pricing -[8]: https://linuxhandbook.com/plausible-deployment-guide/ -[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/plausible-analytics-for-itsfoss.png?resize=800%2C231&ssl=1 -[10]: https://highoncloud.com/ -[11]: https://linuxhandbook.com/about/#ethical-web-portal diff --git a/translated/tech/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md b/translated/tech/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md new file mode 100644 index 0000000000..a08e2eac7c --- /dev/null +++ b/translated/tech/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md @@ -0,0 +1,92 @@ +[#]: subject: (Plausible: Privacy-Focused Google Analytics Alternative) +[#]: via: (https://itsfoss.com/plausible/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Plausible:关注隐私的 Google Analytics 替代方案 +====== + +[Plausible][1]是一款简单的、对隐私友好的分析工具。它可以帮助你分析独立访客数量、页面浏览量、跳出率和访问时间。 + +如果你有一个网站,你可能会理解这些术语。作为一个网站所有者,它可以帮助你知道你的网站是否随着时间的推移获得更多的访问者,流量来自哪里,如果你对这些事情有一定的了解,你可以努力改进你的网站,以获得更多的访问量。 + +说到网站分析,统治这个领域的一个服务就是谷歌的免费工具 Google Analytics。就像 Google 是事实上的搜索引擎一样,Google Analytics 是事实上的分析工具。但你不必再忍受它,尤其是当你无法信任大科技公司使用你和你的网站访问者的数据的时候。 + +Plausible 让你摆脱 Google Analytics 的束缚,我将在本文中讨论这个开源项目。 + +请注意,如果你从来没有管理过网站或对分析感兴趣,文章中的一些技术术语可能对你来说是未知的。 + +### Plausible 是隐私友好的网站分析工具 + +Plausible 使用的分析脚本是非常轻量级的,大小不到 1KB。 + +其重点在于保护隐私,因此你可以在不影响访客隐私的情况下获得有价值且可操作的统计数据。Plausible 是为数不多的不需要 cookie 横幅或 GDP 同意的分析工具之一,因为它在隐私方面已经符合 [GDPR 标准][2]。这是超级酷的。 + +在功能上,它没有 Google Analytics 那样的粒度和细节。Plausible 靠的是简单。它显示的是你过去 30 天的流量统计图。你也可以切换到实时试图。 + +![][3] + +你还可以看到你的流量来自哪里,以及你网站上的哪些页面访问量最大。来源也可以显示 UTM 活动。 + +![][4] + +你还可以选择启用 GeoIP 来了解网站访问者的地理位置。你还可以检查有多少访问者使用桌面或移动设备访问你的网站。还有一个操作系统的选项,正如你所看到的,[Linux Handbook][5] 有 48% 的访问者来自 Windows 设备。很奇怪,对吧? + +![][6] + +显然,提供的数据与 Google Analytics 的数据相差甚远,但这是有意为之。Plausible 打算为你提供简单的矩阵。 + +### 使用 Plausible:选择付费托管或在你的服务器上自行托管 + +有两种方式可以让你开始使用 Plausible。注册他们的官方托管服务。你必须为这项服务付费,这最终会帮助 Plausible 项目的发展。它们有 30 天的试用期,甚至不需要你这边提供任何支付信息。 + +定价从每月 1 万页浏览量 6 美元开始。价格会随着页面浏览量的增加而增加。你可以在 Plausible 网站上计算价格。 + +[Plausible Pricing][7] + +你可以试用 30 天,看看你是否愿意向 Plausible 开发者支付服务费用,并拥有你的数据。 + +如果你觉得定价不合理,你可以利用 Plausible 是开源的优势,自己部署。如果你有兴趣,请阅读我们的[使用 Docker 自助托管 Plausible 实例的深度指南][8]。 + +在 It's FOSS,我们自行托管 Plausible。我们的 Plausible 实例添加了我们的三个网站。 + +![Plausble dashboard for It’s FOSS websites][9] + +如果你维护一个开源项目的网站,并且想使用 Plausible,你可以通过我们的 [High on Cloud 项目][10]联系我们。通过 High on Cloud,我们帮助小企业在其服务器上托管和使用开源软件。 + +### 总结 + +如果你不是超级痴迷于数据,只是想快速了解网站的表现,Plausible 是一个不错的选择。我喜欢它,因为它是轻量级的,而且遵守隐私。这也是我在 Linux Handbook,我们[教授 Linux 服务器相关的门户网站][11]上使用它的主要原因。 + +总的来说,我对 Plausible 相当满意,并向其他网站所有者推荐它。 + +你也经营或管理一个网站吗?你是用什么工具来做分析,还是根本不关心这个? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/plausible/ + +作者:[Abhishek Prakash][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://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://plausible.io/ +[2]: https://gdpr.eu/compliance/ +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/03/plausible-graph-lhb.png?resize=800%2C395&ssl=1 +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/03/plausible-stats-lhb-2.png?resize=800%2C333&ssl=1 +[5]: https://linuxhandbook.com/ +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/plausible-geo-ip-stats.png?resize=800%2C331&ssl=1 +[7]: https://plausible.io/#pricing +[8]: https://linuxhandbook.com/plausible-deployment-guide/ +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/plausible-analytics-for-itsfoss.png?resize=800%2C231&ssl=1 +[10]: https://highoncloud.com/ +[11]: https://linuxhandbook.com/about/#ethical-web-portal From 7959c5565dd6e4f0fbb7fcf107b58795c4ce1591 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 9 Apr 2021 08:49:31 +0800 Subject: [PATCH 617/818] translating --- sources/tech/20210407 What is Git cherry-picking.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210407 What is Git cherry-picking.md b/sources/tech/20210407 What is Git cherry-picking.md index 99e809440b..eede7de952 100644 --- a/sources/tech/20210407 What is Git cherry-picking.md +++ b/sources/tech/20210407 What is Git cherry-picking.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/4/cherry-picking-git) [#]: author: (Rajeev Bera https://opensource.com/users/acompiler) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 09721a3d806122e6cbf5c5f20466076b0f2409b6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 9 Apr 2021 19:53:45 +0800 Subject: [PATCH 618/818] APL --- ...20210402 A practical guide to using the git stash command.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210402 A practical guide to using the git stash command.md b/sources/tech/20210402 A practical guide to using the git stash command.md index 804a6bac81..f50b107c41 100644 --- a/sources/tech/20210402 A practical guide to using the git stash command.md +++ b/sources/tech/20210402 A practical guide to using the git stash command.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/4/git-stash) [#]: author: (Ramakrishna Pattnaik https://opensource.com/users/rkpattnaik780) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 1ac1c5307fd6a7498d277663c0ccb38a01fedee9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 9 Apr 2021 21:52:31 +0800 Subject: [PATCH 619/818] TSL --- ...al guide to using the git stash command.md | 240 ------------------ ...al guide to using the git stash command.md | 223 ++++++++++++++++ 2 files changed, 223 insertions(+), 240 deletions(-) delete mode 100644 sources/tech/20210402 A practical guide to using the git stash command.md create mode 100644 translated/tech/20210402 A practical guide to using the git stash command.md diff --git a/sources/tech/20210402 A practical guide to using the git stash command.md b/sources/tech/20210402 A practical guide to using the git stash command.md deleted file mode 100644 index f50b107c41..0000000000 --- a/sources/tech/20210402 A practical guide to using the git stash command.md +++ /dev/null @@ -1,240 +0,0 @@ -[#]: subject: (A practical guide to using the git stash command) -[#]: via: (https://opensource.com/article/21/4/git-stash) -[#]: author: (Ramakrishna Pattnaik https://opensource.com/users/rkpattnaik780) -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -A practical guide to using the git stash command -====== -Learn how to use the git stash command and when you should use it. -![woman on laptop sitting at the window][1] - -Version control is an inseparable part of software developers' daily lives. It's hard to imagine any team developing software without using a version control tool. It's equally difficult to envision any developer who hasn't worked with (or at least heard of) Git. In the 2018 Stackoverflow Developer Survey, 87.2% of the 74,298 participants [use Git][2] for version control. - -Linus Torvalds created git in 2005 for developing the Linux kernel. This article walks through the `git stash` command and explores some useful options for stashing changes. It assumes you have basic familiarity with [Git concepts][3] and a good understanding of the working tree, staging area, and associated commands. - -### Why is git stash important? - -The first thing to understand is why stashing changes in Git is important. Assume for a moment that Git doesn't have a command to stash changes. Suppose you are working on a repository with two branches, A and B. The A and B branches have diverged from each other for quite some time and have different heads. While working on some files in branch A, your team asks you to fix a bug in branch B. You quickly save your changes to A and try to check out branch B with `git checkout B`. Git immediately aborts the operation and throws the error, "Your local changes to the following files would be overwritten by checkout … Please commit your changes or stash them before you switch branches." - -There are few ways to enable branch switching in this case: - - * Create a commit at that point in branch A, commit and push your changes to fix the bug in B, then check out A again and run `git reset HEAD^` to get your changes back. - * Manually keep the changes in files not tracked by Git. - - - -The second method is a bad idea. The first method, although appearing conventional, is less flexible because the unfinished saved changes are treated as a checkpoint rather than a patch that's still a work in progress. This is exactly the kind of scenario git stash is designed for. - -Git stash saves the uncommitted changes locally, allowing you to make changes, switch branches, and perform other Git operations. You can then reapply the stashed changes when you need them. A stash is locally scoped and is not pushed to the remote by `git push`. - -### How to use git stash - -Here's the sequence to follow when using git stash: - - 1. Save changes to branch A. - 2. Run `git stash`. - 3. Check out branch B. - 4. Fix the bug in branch B. - 5. Commit and (optionally) push to remote. - 6. Check out branch A - 7. Run `git stash pop` to get your stashed changes back. - - - -Git stash stores the changes you made to the working directory locally (inside your project's .git directory; `/.git/refs/stash`, to be precise) and allows you to retrieve the changes when you need them. It's handy when you need to switch between contexts. It allows you to save changes that you might need at a later stage and is the fastest way to get your working directory clean while keeping changes intact. - -### How to create a stash - -The simplest command to stash your changes is `git stash`: - - -``` -$ git stash -Saved working directory and index state WIP on master; d7435644 Feat: configure graphql endpoint -``` - -By default, `git stash` stores (or "stashes") the uncommitted changes (staged and unstaged files) and overlooks untracked and ignored files. Usually, you don't need to stash untracked and ignored files, but sometimes they might interfere with other things you want to do in your codebase. - -You can use additional options to let `git stash` take care of untracked and ignored files: - - * `git stash -u` or `git stash --include-untracked` stash untracked files. - * `git stash -a` or `git stash --all` stash untracked files and ignored files. - - - -To stash specific files, you can use the command `git stash -p` or `git stash –patch`: - - -``` -$ git stash --patch -diff --git a/.gitignore b/.gitignore -index 32174593..8d81be6e 100644 -\--- a/.gitignore -+++ b/.gitignore -@@ -3,6 +3,7 @@ - # dependencies - node_modules/ - /.pnp -+f,fmfm - .pnp.js - - # testing -(1/1) Stash this hunk [y,n,q,a,d,e,?]? -``` - -### Listing your stashes - -You can view your stashes with the command `git stash list`. Stashes are saved in a last-in-first-out (LIFO) approach: - - -``` -$ git stash list -stash@{0}: WIP on master: d7435644 Feat: configure graphql endpoint -``` - -By default, stashes are marked as WIP on top of the branch and commit that you created the stash from. However, this limited amount of information isn't helpful when you have multiple stashes, as it becomes difficult to remember or individually check their contents. To add a description to the stash, you can use the command `git stash save `: - - -``` -$ git stash save "remove semi-colon from schema" -Saved working directory and index state On master: remove semi-colon from schema - -$ git stash list -stash@{0}: On master: remove semi-colon from schema -stash@{1}: WIP on master: d7435644 Feat: configure graphql endpoint -``` - -### Retrieving stashed changes - -You can reapply stashed changes with the commands `git stash apply` and `git stash pop`. Both commands reapply the changes stashed in the latest stash (that is, `stash@{0}`). A `stash` reapplies the changes while `pop` removes the changes from the stash and reapplies them to the working copy. Popping is preferred if you don't need the stashed changes to be reapplied more than once. - -You can choose which stash you want to pop or apply by passing the identifier as the last argument: - - -``` -`$ git stash pop stash@{1}` -``` - -or - - -``` -`$ git stash apply stash@{1}` -``` - -### Cleaning up the stash - -It is good practice to remove stashes that are no longer needed. You must do this manually with the following commands: - - * `git stash clear` empties the stash list by removing all the stashes. - * `git stash drop ` deletes a particular stash from the stash list. - - - -### Checking stash diffs - -The command `git stash show ` allows you to view the diff of a stash: - - -``` -$ git stash show stash@{1} -console/console-init/ui/.graphqlrc.yml        |   4 +- -console/console-init/ui/generated-frontend.ts | 742 +++++++++--------- -console/console-init/ui/package.json          |   2 +- -``` - -To get a more detailed diff, pass the `--patch` or `-p` flag: - - -``` -$ git stash show stash@{0} --patch -diff --git a/console/console-init/ui/package.json b/console/console-init/ui/package.json -index 755912b97..5b5af1bd6 100644 -\--- a/console/console-init/ui/package.json -+++ b/console/console-init/ui/package.json -@@ -1,5 +1,5 @@ - { -\- "name": "my-usepatternfly", -\+ "name": "my-usepatternfly-2", -  "version": "0.1.0", -  "private": true, -  "proxy": "" -diff --git a/console/console-init/ui/src/AppNavHeader.tsx b/console/console-init/ui/src/AppNavHeader.tsx -index a4764d2f3..da72b7e2b 100644 -\--- a/console/console-init/ui/src/AppNavHeader.tsx -+++ b/console/console-init/ui/src/AppNavHeader.tsx -@@ -9,8 +9,8 @@ import { css } from "@patternfly/react-styles"; - -interface IAppNavHeaderProps extends PageHeaderProps { -\- toolbar?: React.ReactNode; -\- avatar?: React.ReactNode; -\+ toolbar?: React.ReactNode; -\+ avatar?: React.ReactNode; -} - -export class AppNavHeader extends React.Component<IAppNavHeaderProps>{ -  render() -``` - -### Checking out to a new branch - -You might come across a situation where the changes in a branch and your stash diverge, causing a conflict when you attempt to reapply the stash. A clean fix for this is to use the command `git stash branch `, which creates a new branch based on the commit the stash was created _from_ and pops the stashed changes to it: - - -``` -$ git stash branch test_2 stash@{0} -Switched to a new branch 'test_2' -On branch test_2 -Changes not staged for commit: -(use "git add <file>..." to update what will be committed) -(use "git restore <file>..." to discard changes in working directory) -modified: .graphqlrc.yml -modified: generated-frontend.ts -modified: package.json -no changes added to commit (use "git add" and/or "git commit -a") -Dropped stash@{0} (fe4bf8f79175b8fbd3df3c4558249834ecb75cd1) -``` - -### Stashing without disturbing the stash reflog - -In rare cases, you might need to create a stash while keeping the stash reference log (reflog) intact. These cases might arise when you need a script to stash as an implementation detail. This is achieved by the `git stash create` command; it creates a stash entry and returns its object name without pushing it to the stash reflog: - - -``` -$ git stash create "sample stash" -63a711cd3c7f8047662007490723e26ae9d4acf9 -``` - -Sometimes, you might decide to push the stash entry created via `git stash create` to the stash reflog: - - -``` -$ git stash store -m "sample stash testing.." "63a711cd3c7f8047662007490723e26ae9d4acf9" -$ git stash list -stash @{0}: sample stash testing.. -``` - -### Conclusion - -I hope you found this article useful and learned something new. If I missed any useful options for using stash, please let me know in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/git-stash - -作者:[Ramakrishna Pattnaik][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/rkpattnaik780 -[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://insights.stackoverflow.com/survey/2018#work-_-version-control -[3]: https://opensource.com/downloads/cheat-sheet-git diff --git a/translated/tech/20210402 A practical guide to using the git stash command.md b/translated/tech/20210402 A practical guide to using the git stash command.md new file mode 100644 index 0000000000..ddd8a761dd --- /dev/null +++ b/translated/tech/20210402 A practical guide to using the git stash command.md @@ -0,0 +1,223 @@ +[#]: subject: (A practical guide to using the git stash command) +[#]: via: (https://opensource.com/article/21/4/git-stash) +[#]: author: (Ramakrishna Pattnaik https://opensource.com/users/rkpattnaik780) +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +git stash 命令实用指南 +====== + +> 学习如何使用 `git stash` 命令,以及何时应该使用它。 + +![女人在笔记本上坐在窗口][1] + +版本控制是软件开发人员日常生活中不可分割的一部分。很难想象有哪个团队在开发软件时不使用版本控制工具。同样也很难想象有哪个开发者没有使用过(或没有听说过)Git。在 2018 年 Stackoverflow 开发者调查中,74298 名参与者中 87.2% 的人 [使用 Git][2] 进行版本控制。 + +Linus Torvalds 在 2005 年创建了 Git 用于开发 Linux 内核。本文将介绍 `git stash` 命令,并探讨一些有用的暂存修改的选项。本文假定你对 [Git 概念][3] 有基本的了解,并对工作树、暂存区和相关命令有良好的理解。 + +### 为什么 git stash 很重要? + +首先要明白为什么在 Git 中暂存变更很重要。假设 Git 没有暂存变更的命令。当你正在一个有两个分支(A 和 B)的仓库上工作时,这两个分支已经分叉了一段时间,并且有不同的头。当你正在处理 A 分支的一些文件时,你的团队要求你修复 B 分支的一个错误。你迅速将你的修改保存到 A 分支,并尝试用 `git checkout B` 来签出 B 分支。Git 立即中止了这个操作,并抛出错误:“你对以下文件的本地修改会被该签出覆盖……请在切换分支之前提交你的修改或将它们暂存起来。” + +在这种情况下,有几种方法可以启用分支切换: + + * 在分支 A 中创建一个提交,提交并推送你的修改,以修复 B 中的错误,然后再次签出 A,并运行 `git reset HEAD^` 来恢复你的修改。 + * 手动保留不被 Git 跟踪的文件中的改动。 + +第二种方法是个馊主意。第一种方法虽然看起来很传统,但却不太灵活,因为保存未完成工作的修改会被当作一个检查点,而不是一个仍在进行中的补丁。这正是设计 `git stash` 的场景。 + +`git stash` 将未提交的改动保存在本地,让你可以进行修改、切换分支以及其他 Git 操作。然后,当你需要的时候,你可以重新应用这些存储的改动。暂存是本地范围的,不会被 `git push` 推送到远程。 + +### 如何使用git stash + +下面是使用 `git stash` 时要遵循的顺序: + + 1. 将修改保存到分支 A。 + 2. 运行 `git stash`。 + 3. 签出分支 B。 + 4. 修正 B 分支的错误。 + 5. 提交并(可选)推送到远程。 + 6. 查看分支 A + 7. 运行 `git stash pop` 来取回你的暂存的改动。 + +`git stash` 将你对工作目录的修改存储在本地(在你的项目的 `.git` 目录内,准确的说是 `/.git/refs/stash`),并允许你在需要时检索这些修改。当你需要在不同的上下文之间切换时,它很方便。它允许你保存以后可能需要的更改,是让你的工作目录干净同时保持更改完整的最快方法。 + +### 如何创建一个暂存 + +暂存你的变化的最简单的命令是 `git stash`: + +``` +$ git stash +Saved working directory and index state WIP on master; d7435644 Feat: configure graphql endpoint +``` + +默认情况下,`git stash` 存储(或“暂存”)未提交的更改(已暂存和未暂存的文件),并忽略未跟踪和忽略的文件。通常情况下,你不需要暂存未跟踪和忽略的文件,但有时它们可能会干扰你在代码库中要做的其他事情。 + +你可以使用附加选项让 `git stash` 来处理未跟踪和忽略的文件: + + * `git stash -u` 或 `git stash --includ-untracked` 储存未追踪的文件。 + * `git stash -a` 或 `git stash --all` 储存未跟踪的文件和忽略的文件。 + +要存储特定的文件,你可以使用 `git stash -p` 或 `git stash -patch` 命令: + +``` +$ git stash --patch +diff --git a/.gitignore b/.gitignore +index 32174593..8d81be6e 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -3,6 +3,7 @@ + # dependencies + node_modules/ + /.pnp ++f,fmfm + .pnp.js + + # testing +(1/1) Stash this hunk [y,n,q,a,d,e,?]? +``` + +### 列出你的暂存 + +你可以用 `git stash list` 命令查看你的暂存。暂存是后进先出(LIFO)方式保存的: + +``` +$ git stash list +stash@{0}: WIP on master: d7435644 Feat: configure graphql endpoint +``` + +默认情况下,暂存会显示在你创建它的分支和提交的顶部,被标记为 `WIP`。然而,当你有多个暂存时,这种有限的信息量并没有帮助,因为很难记住或单独检查它们的内容。要为暂存添加描述,可以使用命令 `git stash save `: + +``` +$ git stash save "remove semi-colon from schema" +Saved working directory and index state On master: remove semi-colon from schema + +$ git stash list +stash@{0}: On master: remove semi-colon from schema +stash@{1}: WIP on master: d7435644 Feat: configure graphql endpoint +``` + +### 检索暂存起来的变化 + +你可以用 `git stash apply` 和 `git stash pop` 这两个命令来重新应用暂存的变更。这两个命令都会重新应用最新的暂存(即 `stash@{0}`)中的改动。`apply` 会重新应用变更;而 `pop` 则会将暂存的变更重新应用到工作副本中,并从暂存中删除。如果你不需要再次重新应用被暂存的更改,则首选 `pop`。 + +你可以通过传递标识符作为最后一个参数来选择你想要弹出或应用的储藏: + +``` +$ git stash pop stash@{1} +``` + +或 + +``` +$ git stash apply stash@{1} +``` + +### 清理暂存 + +删除不再需要的暂存是好的习惯。你必须用以下命令手动完成: + + * `git stash clear` 通过删除所有的暂存库来清空该列表。 + * `git stash drop ` 从暂存列表中删除一个特定的暂存。 + +### 检查暂存的差异 + +命令 `git stash show ` 允许你查看一个暂存的差异: + +``` +$ git stash show stash@{1} +console/console-init/ui/.graphqlrc.yml        |   4 +- +console/console-init/ui/generated-frontend.ts | 742 +++++++++--------- +console/console-init/ui/package.json          |   2 +- +``` + +要获得更详细的差异,需要传递 `--patch` 或 `-p` 标志: + +``` +$ git stash show stash@{0} --patch +diff --git a/console/console-init/ui/package.json b/console/console-init/ui/package.json +index 755912b97..5b5af1bd6 100644 +--- a/console/console-init/ui/package.json ++++ b/console/console-init/ui/package.json +@@ -1,5 +1,5 @@ + { +- "name": "my-usepatternfly", ++ "name": "my-usepatternfly-2", +  "version": "0.1.0", +  "private": true, +  "proxy": "http://localhost:4000" +diff --git a/console/console-init/ui/src/AppNavHeader.tsx b/console/console-init/ui/src/AppNavHeader.tsx +index a4764d2f3..da72b7e2b 100644 +--- a/console/console-init/ui/src/AppNavHeader.tsx ++++ b/console/console-init/ui/src/AppNavHeader.tsx +@@ -9,8 +9,8 @@ import { css } from "@patternfly/react-styles"; + +interface IAppNavHeaderProps extends PageHeaderProps { +- toolbar?: React.ReactNode; +- avatar?: React.ReactNode; ++ toolbar?: React.ReactNode; ++ avatar?: React.ReactNode; +} + +export class AppNavHeader extends React.Component<IAppNavHeaderProps>{ +  render() +``` + +### 签出到新的分支 + +你可能会遇到这样的情况:一个分支和你的暂存中的变更有分歧,当你试图重新应用暂存时,会造成冲突。一个简单的解决方法是使用 `git stash branch ` 命令,它将根据创建暂存时的提交创建一个新分支,并将暂存中的修改弹出: + +``` +$ git stash branch test_2 stash@{0} +Switched to a new branch 'test_2' +On branch test_2 +Changes not staged for commit: +(use "git add ..." to update what will be committed) +(use "git restore ..." to discard changes in working directory) +modified: .graphqlrc.yml +modified: generated-frontend.ts +modified: package.json +no changes added to commit (use "git add" and/or "git commit -a") +Dropped stash@{0} (fe4bf8f79175b8fbd3df3c4558249834ecb75cd1) +``` + +### 在不打扰暂存参考日志的情况下进行暂存 + +在极少数情况下,你可能需要创建一个暂存,同时保持暂存参考日志(`reflog`)的完整性。这些情况可能出现在你需要一个脚本作为一个实现细节来暂存的时候。这可以通过 `git stash create` 命令来实现;它创建了一个暂存条目,并返回它的对象名,而不将其推送到暂存参考日志中: + +``` +$ git stash create "sample stash" +63a711cd3c7f8047662007490723e26ae9d4acf9 +``` + +有时,你可能会决定将通过 `git stash create` 创建的暂存条目推送到暂存参考日志: + +``` +$ git stash store -m "sample stash testing.." "63a711cd3c7f8047662007490723e26ae9d4acf9" +$ git stash list +stash @{0}: sample stash testing.. +``` + +### 结论 + +我希望你觉得这篇文章很有用,并学到了新的东西。如果我遗漏了任何有用的使用暂存的选项,请在评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/git-stash + +作者:[Ramakrishna Pattnaik][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/rkpattnaik780 +[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://insights.stackoverflow.com/survey/2018#work-_-version-control +[3]: https://opensource.com/downloads/cheat-sheet-git From befda05005b66ff37842faf7f0564fe349a54372 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 10 Apr 2021 05:02:34 +0800 Subject: [PATCH 620/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210410=20?= =?UTF-8?q?How=20to=20Install=20Steam=20on=20Fedora=20[Beginner=E2=80=99s?= =?UTF-8?q?=20Tip]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md --- ...Install Steam on Fedora -Beginner-s Tip.md | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 sources/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md diff --git a/sources/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md b/sources/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md new file mode 100644 index 0000000000..3315f1c000 --- /dev/null +++ b/sources/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md @@ -0,0 +1,117 @@ +[#]: subject: (How to Install Steam on Fedora [Beginner’s Tip]) +[#]: via: (https://itsfoss.com/install-steam-fedora/) +[#]: author: (John Paul https://itsfoss.com/author/john/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +How to Install Steam on Fedora [Beginner’s Tip] +====== + +Steam is the best thing that could happen to Linux gamers. Thanks to Steam, you can play hundreds and thousands of games on Linux. + +If you are not already aware of it, Steam is the most popular PC gaming platform. In 2013, it became available for Linux. [Steam’s latest Proton project][1] allows you to play games created for Windows platform on Linux. This enhanced Linux gaming library many folds. + +![][2] + +Steam provides a desktop client and you can use it to download or purchase games from the Steam store, install the game and play it. + +We have discussed [installing Steam on Ubuntu][3] in the past. In this beginner’s tutorial, I am going to show you the steps for installing Steam on Fedora Linux. + +### Installing Steam on Fedora + +To get Steam on Fedora, you’ll have to use RMPFusion repository. [RPMFusion][4] is a series of third-party repos that contain software that Fedora chooses not to ship with their operating system. They offer both free (open source) and non-free (closed source) repos. Since Steam is in the non-free repo, you will only install that one. + +I shall go over both the terminal and graphical installation methods. + +#### Method 1: Install Steam via terminal + +This is the easiest method because it requires the fewest steps. Just enter the following command to enable the free repo: + +``` +sudo dnf install https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm +``` + +You will be asked to enter your password. You will then be asked to verify that you want to install these repos. Once you approve it, the installation of the repo will be completed. + +To install Steam, simply enter the following command: + +``` +sudo dnf install steam +``` + +![Install Steam via command line][5] + +Enter your password and press “Y” to accept. Once installed, open Steam and play some games. + +#### Method 2: Install Steam via GUI + +You can [enable the third-party repository on Fedora][6] from the Software Center. Open the Software Center application and click on the hamburger menu: + +![][7] + +In the Software Repositories window, you will see a section at the top that says “Third Party Repositories”. Click the Install button. Enter your password when you are prompted and you are done. + +![][8] + +Once you have installed RPM Fusion repository for Steam, update your system’s software cache (if needed) and search for Steam in the software center. + +![Steam in GNOME Software Center][9] + +Once that installation is complete, open up the GNOME Software Center and search for Steam. Once you locate the Steam page, click install. Enter your password when asked and you’re done. + +After installing Steam, start the application, enter your Steam account details or register for it and enjoy your games. + +### Using Steam as Flatpak + +Steam is also available as a Flatpak. Flatpak is installed by default on Fedora. Before we can install Steam using that method, we have to install the Flathub repo. + +![Install Flathub][10] + +First, open the [Flatpak site][11] in your browser. Now, click the blue button marked “Flathub repository file”. The browser will ask you if you want to open the file in GNOME Software Center. Click okay. Once GNOME Software Center open, click the install button. You will be prompted to enter your password. + +If you get an error when you try to install the Flathub repo, run this command in the terminal: + +``` +flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo +``` + +With the Flathub repo installed, all you need to do is search for Steam in the GNOME Software Center. Once you find it, install it, and you are ready to go. + +![Fedora Repo Select][12] + +The Flathub version of Steam has several add-ons you can install, as well. These include a DOS compatibility tool and a couple of tools for [Vulkan][13] and Proton. + +![][14] + +I think this should help you with Steam on Fedora. Enjoy your games :) + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-steam-fedora/ + +作者:[John Paul][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/john/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/steam-play-proton/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/05/Steam-Store.jpg?resize=800%2C382&ssl=1 +[3]: https://itsfoss.com/install-steam-ubuntu-linux/ +[4]: https://rpmfusion.org/ +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/install-steam-fedora.png?resize=800%2C588&ssl=1 +[6]: https://itsfoss.com/fedora-third-party-repos/ +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/software-meni.png?resize=800%2C672&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/fedora-third-party-repo-gui.png?resize=746%2C800&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/gnome-store-steam.jpg?resize=800%2C434&ssl=1 +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/flatpak-install-button.jpg?resize=800%2C434&ssl=1 +[11]: https://www.flatpak.org/setup/Fedora/ +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/fedora-repo-select.jpg?resize=800%2C434&ssl=1 +[13]: https://developer.nvidia.com/vulkan +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/steam-flatpak-addons.jpg?resize=800%2C434&ssl=1 From 82560e5d7d87262f2ac46afe0402ea2006b9838e Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 10 Apr 2021 05:02:53 +0800 Subject: [PATCH 621/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210409=20?= =?UTF-8?q?Stream=20event=20data=20with=20this=20open=20source=20tool?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210409 Stream event data with this open source tool.md --- ...m event data with this open source tool.md | 274 ++++++++++++++++++ 1 file changed, 274 insertions(+) create mode 100644 sources/tech/20210409 Stream event data with this open source tool.md diff --git a/sources/tech/20210409 Stream event data with this open source tool.md b/sources/tech/20210409 Stream event data with this open source tool.md new file mode 100644 index 0000000000..62f8222089 --- /dev/null +++ b/sources/tech/20210409 Stream event data with this open source tool.md @@ -0,0 +1,274 @@ +[#]: subject: (Stream event data with this open source tool) +[#]: via: (https://opensource.com/article/21/4/event-streaming-rudderstack) +[#]: author: (Amey Varangaonkar https://opensource.com/users/ameypv) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Stream event data with this open source tool +====== +Route real-time events from web, mobile, and server-side app sources to +help build your customer data lake on your data warehouse. +![Net catching 1s and 0s or data in the clouds][1] + +In my [previous article][2], I introduced [RudderStack][3], an open source, warehouse-first customer data pipeline. In this article, I demonstrate how easy Rudderstack makes it to set up and use event streams. + +An event stream is a pipeline between a source you define and a destination of your choice. Rudderstack provides you with SDKs and plugins to help you ingest event data from your website, mobile apps, and server-side sources — including JavaScript, Gatsby, Android, iOS, Unity, ReactNative, Node.js, and many more. Similarly, Rudderstack's **Event Stream** module features over 80 destination and warehouse integrations, including Firebase, Google Analytics, Salesforce, Zendesk, Snowflake, BigQuery, RedShift, and more, making it easy to send event data to downstream tools that can use it as well as build a customer data lake on a data warehouse for analytical use cases. + +This tutorial shows how to track and route events using RudderStack. + +### How to set up an event stream + +Before you get started, make sure you understand these terms used in this tutorial: + + * **Source**: A source refers to a tool or a platform from which RudderStack ingests your event data. Your website, mobile app, or your back-end server are common examples of sources. + * **Destination**: A destination refers to a tool that receives your event data from RudderStack. These destination tools can then use this data for your activation use cases. Tools like Google Analytics, Salesforce, and HubSpot are common examples of destinations. + + + +The steps for setting up an event stream in RudderStack open source are: + + 1. Instrumenting an event stream source + 2. Configuring a warehouse destination + 3. Configuring a tool destination + 4. Sending events to verify the event stream + + + +### Step 1: Instrument an event stream source + +To set up an event stream source in RudderStack: + + 1. Log into your [RudderStack dashboard][4]. If you don't have a RudderStack account, please sign up. You can use the RudderStack open source control plane to [set up your event streams][5]. + +RudderStack's hosted control plane is an option to manage your event stream configurations. It is completely free, requires no setup, and has some more advanced features than the open source control plane. + + 2. Once you've logged into RudderStack, you should see the following dashboard: + +![RudderStack dashboard][6] + +(Gavin Johnson, [CC BY-SA 4.0][7]) + +**Note:** Make sure to save the **Data Plane URL**. It is required in your RudderStack JavaScript SDK snippet to track events from your website. + + 3. To instrument the source, click **Add Source**. Optionally, you can also select the **Directory** option on the left navigation bar, and select **Event Streams** under **Sources**. This tutorial will set up a simple **JavaScript** source that allows you to track events from your website. + +![RudderStack event streams dashboard][8] + +(Gavin Johnson, [CC BY-SA 4.0][7]) + + 4. Assign a name to your source, and click **Next**. + +![RudderStack Source Name][9] + +(Gavin Johnson, [CC BY-SA 4.0][7]) + + 5. That's it! Your event source is now configured. + +![RudderStack source write key][10] + +(Gavin Johnson, [CC BY-SA 4.0][7]) + +**Note:** Save the source **Write Key**. Your RudderStack JavaScript SDK snippet requires it to track events from your website. + + + + +Now you need to install the RudderStack JavaScript SDK on your website. To do this, you need to place either the minified or non-minified version of the snippet with your **Data Plane URL** and source **Write Key** in your website's `` section. Consult the docs for information on how to [install and use the RudderStack JavaScript SDK][11]. + +### Step 2: Configure a warehouse destination + +**Important**: Before you configure your data warehouse as a destination in RudderStack, you need to set up a new project in your warehouse and create a RudderStack user role with the relevant permissions. The docs provide [detailed, step-by-step instructions][12] on how to do this for the warehouse of your choice. + +This tutorial sets up a Google BigQuery warehouse destination. You don't have to configure a warehouse destination, but I recommend it. The docs provide [instructions on setting up][13] a Google BigQuery project and a service account with the required permissions. + +Then configure BigQuery as a warehouse destination in RudderStack by following these steps: + + 1. On the left navigation bar, click on **Directory**, and then click on **Google BigQuery** from the list of destinations: + +![RudderStack destination options][14] + +(Gavin Johnson, [CC BY-SA 4.0][7]) + + 2. Assign a name to your destination, and click on **Next**. + + + + +![RudderStack naming the destination][15] + +(Gavin Johnson, [CC BY-SA 4.0][7]) + + 3. Choose which source you want to use to send the events to your destination. Select the source that you created in the previous section. Then, click on **Next**. + + + +![RudderStack selecting data source][16] + +(Gavin Johnson, [CC BY-SA 4.0][7]) + + 4. Specify the required connection credentials. For this destination, enter the **BigQuery Project ID** and the **staging bucket name**; information on [how to get this information][17] is in the docs. + + + +![RudderStack connection credentials][18] + +(Gavin Johnson, [CC BY-SA 4.0][7]) + + 5. Copy the contents of the private JSON file you created, as [the docs][19] explain. + + + +That's it! You have configured your BigQuery warehouse as a destination in RudderStack. Once you start sending events from your source (a website in this case), RudderStack will automatically route them into your BigQuery and build your identity graph there as well. + +### Step 3: Configure a tool destination + +Once you've added a source, follow these steps to configure a destination in the RudderStack dashboard: + + 1. To add a new destination, click on the **Add Destination** button as shown: + +![RudderStack adding the destination][20] + +(Gavin Johnson, [CC BY-SA 4.0][7]) + +**Note:** If you have configured a destination before, use the **Connect Destinations** option to connect it to any source. + + 2. RudderStack supports over 80 destinations to which you can send your event data. Choose your preferred destination platform from the list. This example configures **Google Analytics** as a destination. + + + + +![RudderStack selecting destination platform][21] + +(Gavin Johnson, [CC BY-SA 4.0][7]) + + 3. Add a name to your destination, and click **Next**. + + + +![RudderStack naming the destination][22] + +(Gavin Johnson, [CC BY-SA 4.0][7]) + + 4. Next, choose the preferred source. If you're following along with this tutorial, choose the source you configured above. + + + +![RudderStack choosing source][23] + +(Gavin Johnson, [CC BY-SA 4.0][7]) + + 5. In this step, you must add the relevant **Connection Settings**. Enter the **Tracking ID** for this destination (Google Analytics). You can also configure other optional settings per your requirements. Once you've added the required settings, click **Next**. + +![RudderStack connection settings][24] + +(Gavin Johnson, [CC BY-SA 4.0][7]) + +**Note**: RudderStack also gives you the option of transforming the events before sending them to your destination. Read more about [user transformations][25] in RudderStack in the docs. + + 6. That's it! The destination is now configured. You should now see it connected to your source. + + + + +![RudderStack connection configured][26] + +(Gavin Johnson, [CC BY-SA 4.0][7]) + +### Step 4: Send test events to verify the event stream + +This tutorial set up a JavaScript source to track events from your website. Once you have placed the JavaScript code snippet in your website's `` section, RudderStack will automatically track and collect user events from the website in real time. + +However, to quickly test if your event stream is set up correctly, you can send some test events. To do so, follow these steps: + +**Note**: Before you get started, you will need to clone the [rudder-server][27] repo and have a RudderStack server installed in your environment. Follow [this tutorial][28] to set up a RudderStack server. + + 1. Make sure you have set up a source and destination by following the steps in the previous sections and have your **Data Plane URL** and source **Write Key** available. + + 2. Start the RudderStack server. + + 3. The **rudder-server** repo includes a shell script that generates test events. Get the source **Write Key** from step 2, and run the following command: + + +``` +`./scripts/generate-event /v1/batch` +``` + + + + +![RudderStack event testing code][29] + +(Gavin Johnson, [CC BY-SA 4.0][7]) + + 4. To check if the test events are delivered, go to your Google Analytics dashboard, navigate to **Realtime** under Reports, and click **Events**. + +**Note**: Make sure you check the events associated with the same Tracking ID you provided while instrumenting the destination. + + + + +You should now be able to see the test event received in Google Analytics and BigQuery. + +![RudderStack event test][30] + +(Gavin Johnson, [CC BY-SA 4.0][7]) + +If you come across any issues while setting up or configuring RudderStack open source, join our [Slack][31] and start a conversation in our #open-source channel. We will be happy to help. + +If you want to try RudderStack but don't want to host your own, sign up for our free, hosted offering, [RudderStack Cloud Free][32]. Explore our open source repos on [GitHub][33], subscribe to [our blog][34], and follow us on our socials: [Twitter][35], [LinkedIn][36], [dev.to][37], [Medium][38], and [YouTube][39]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/event-streaming-rudderstack + +作者:[Amey Varangaonkar][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/ameypv +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_analytics_cloud.png?itok=eE4uIoaB (Net catching 1s and 0s or data in the clouds) +[2]: https://opensource.com/article/21/3/rudderstack-customer-data-platform +[3]: https://rudderstack.com/ +[4]: https://app.rudderstack.com/ +[5]: https://docs.rudderstack.com/how-to-guides/rudderstack-config-generator +[6]: https://opensource.com/sites/default/files/uploads/rudderstack_dashboard.png (RudderStack dashboard) +[7]: https://creativecommons.org/licenses/by-sa/4.0/ +[8]: https://opensource.com/sites/default/files/uploads/rudderstack_eventstreamsdash.png (RudderStack event streams dashboard) +[9]: https://opensource.com/sites/default/files/uploads/rudderstack_namesource.png (RudderStack Source Name) +[10]: https://opensource.com/sites/default/files/uploads/rudderstack_writekey.png (RudderStack Source Name) +[11]: https://docs.rudderstack.com/rudderstack-sdk-integration-guides/rudderstack-javascript-sdk +[12]: https://docs.rudderstack.com/data-warehouse-integrations +[13]: https://docs.rudderstack.com/data-warehouse-integrations/google-bigquery +[14]: https://opensource.com/sites/default/files/uploads/rudderstack_destinations.png (RudderStack destination options) +[15]: https://opensource.com/sites/default/files/uploads/rudderstack_namedestination.png (RudderStack naming the destination) +[16]: https://opensource.com/sites/default/files/uploads/rudderstack_adddestination.png (RudderStack selecting data source) +[17]: https://docs.rudderstack.com/data-warehouse-integrations/google-bigquery#setting-up-google-bigquery +[18]: https://opensource.com/sites/default/files/uploads/rudderstack_connectioncredentials.png (RudderStack connection credentials) +[19]: https://docs.rudderstack.com/data-warehouse-integrations/google-bigquery#setting-up-the-service-account-for-rudderstack +[20]: https://opensource.com/sites/default/files/uploads/rudderstack_addnewdestination.png (RudderStack adding the destination) +[21]: https://opensource.com/sites/default/files/uploads/rudderstack_googleanalyticsdestination.png (RudderStack selecting destination platform) +[22]: https://opensource.com/sites/default/files/uploads/rudderstack_namenewdestination.png (RudderStack naming the destination) +[23]: https://opensource.com/sites/default/files/uploads/rudderstack_choosepreferredsource.png (RudderStack choosing source) +[24]: https://opensource.com/sites/default/files/uploads/rudderstack_connectionsettings.png (RudderStack connection settings) +[25]: https://docs.rudderstack.com/adding-a-new-user-transformation-in-rudderstack +[26]: https://opensource.com/sites/default/files/uploads/rudderstack_destinationconfigured.png (RudderStack connection configured) +[27]: https://github.com/rudderlabs/rudder-server +[28]: https://docs.rudderstack.com/installing-and-setting-up-rudderstack/docker +[29]: https://opensource.com/sites/default/files/uploads/rudderstack_testevents.jpg (RudderStack event testing code) +[30]: https://opensource.com/sites/default/files/uploads/rudderstack_testeventoutput.png (RudderStack event test) +[31]: https://resources.rudderstack.com/join-rudderstack-slack +[32]: https://app.rudderlabs.com/signup?type=freetrial +[33]: https://github.com/rudderlabs +[34]: https://rudderstack.com/blog/ +[35]: https://twitter.com/RudderStack +[36]: https://www.linkedin.com/company/rudderlabs/ +[37]: https://dev.to/rudderstack +[38]: https://rudderstack.medium.com/ +[39]: https://www.youtube.com/channel/UCgV-B77bV_-LOmKYHw8jvBw From 5afef8cda2171681d44fec71439e1e4dbd2a9d10 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 10 Apr 2021 05:03:05 +0800 Subject: [PATCH 622/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210409=20?= =?UTF-8?q?4=20ways=20open=20source=20gives=20you=20a=20competitive=20edge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210409 4 ways open source gives you a competitive edge.md --- ...pen source gives you a competitive edge.md | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 sources/tech/20210409 4 ways open source gives you a competitive edge.md diff --git a/sources/tech/20210409 4 ways open source gives you a competitive edge.md b/sources/tech/20210409 4 ways open source gives you a competitive edge.md new file mode 100644 index 0000000000..56bb2cb7db --- /dev/null +++ b/sources/tech/20210409 4 ways open source gives you a competitive edge.md @@ -0,0 +1,83 @@ +[#]: subject: (4 ways open source gives you a competitive edge) +[#]: via: (https://opensource.com/article/21/4/open-source-competitive-advantage) +[#]: author: (Jason Blais https://opensource.com/users/jasonblais) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +4 ways open source gives you a competitive edge +====== +Using open source technology can help organizations drive better +business outcomes. +![Open ethernet cords.][1] + +Building a tech stack is a major decision for every organization. While picking the right tools will set your team up for success, picking the wrong solutions or platforms can have devastating effects on productivity and profitability. To succeed in today's fast-paced world, organizations must make smart investments in digital solutions that enable them to move faster and increase operational agility. + +This is precisely why more and more organizations of all sizes and across all industries are embracing open source solutions. According to a recent [McKinsey][2] report, open source adoption is the biggest differentiator for top-performing organizations. + +Here are four reasons why adopting open source technology can help organizations drive competitive advantage and experience better business outcomes. + +### 1\. Extensibility and flexibility + +Suffice it to say the world of technology moves quickly. For example, Kubernetes didn't exist before 2014, but today, it's impressively ubiquitous. According to the CNCF's [2020 Cloud Native Survey][3], 91% of teams are using Kubernetes in some form. + +One of the main reasons organizations are investing in open source is because it enables them to operate with agility and rapidly integrate new technologies into their stack. That's compared to the more traditional approach, where teams would take quarters or even years to vet, implement, and adopt software—making it impossible for them to pivot with any sense of urgency. + +Since open source solutions offer complete access to source code, teams can easily connect the software to the other tools they use every day. + +Simply put, open source enables development teams to build the perfect tool for what is at hand instead of being forced to change how they work to fit into how inflexible proprietary tools are designed. + +### 2\. Security and high-trust collaboration + +In the age of high-profile data breaches, organizations need highly secure tools that enable them to keep sensitive data secure. + +When vulnerabilities exist in proprietary solutions, they're often undiscovered until it's too late. Unfortunately for the teams using these platforms, the lack of visibility into source code means they're essentially outsourcing security to the specific vendor and hoping for the best. + +Another main driver of open source adoption is that open source tools enable organizations to take control over their own security. For example, open source projects—particularly those with large communities—tend to receive more responsible vulnerability disclosures because everyone using the product can thoroughly inspect the source code. + +Since the source code is freely available, such disclosures often come with detailed proposed solutions for fixing bugs. This enables dev teams to remedy issues faster, continuously strengthening the software. + +In the age of remote work, it's more important than ever for distributed teams to collaborate while knowing that sensitive data stays protected. Since open source solutions allow organizations to audit security while maintaining complete control over their data, they can facilitate the high-trust collaboration needed to thrive in remote environments. + +### 3\. Freedom from vendor lock-in + +According to a [recent study][4], 68% of CIOs are concerned about vendor lock-in. They should be. When you're locked into a piece of technology, you're forced to live with someone else's conclusions instead of making your own. + +Proprietary solutions often make it [challenging to take data with you][5] when an organization switches vendors. On the other hand, open source tools offer the freedom and flexibility needed to avoid vendor lock-in and take data wherever an organization wants to go. + +### 4\. Top talent and community + +As more and more companies [embrace remote work][6], the war for talent is becoming even more competitive. + +In the world of software development, landing top talent starts with giving engineers access to modern tools that enable them to reach their full potential at work. Since developers increasingly [prefer open source solutions][7] to proprietary counterparts, organizations should strongly consider open source alternatives to their commercial solutions to attract the best developers on the market. + +In addition to making it easier to hire and retain top talent, open source platforms also enable companies to tap into a community of contributors for advice on how to walk through problems and get the most out of the platform. Plus, members of the community also [contribute to open source projects directly][8]. + +### Open source offers freedom + +Open source software is increasingly popular among enterprise teams—[for good reason][9]. It gives teams the flexibility needed to build the perfect tool for the job while enabling them to maintain a highly secure environment. At the same time, an open source approach allows teams to maintain control of their future, rather than being locked into one vendor's roadmap. And it also gives companies access to talented engineers and members of the open source community. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/open-source-competitive-advantage + +作者:[Jason Blais][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/jasonblais +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/openwires_fromRHT_520_0612LL.png?itok=PqZi55Ab (Open ethernet cords.) +[2]: https://www.mckinsey.com/industries/technology-media-and-telecommunications/our-insights/developer-velocity-how-software-excellence-fuels-business-performance# +[3]: https://www.cncf.io/blog/2020/11/17/cloud-native-survey-2020-containers-in-production-jump-300-from-our-first-survey/ +[4]: https://solutionsreview.com/cloud-platforms/flexera-68-percent-of-cios-worry-about-vendor-lock-in-with-public-cloud/ +[5]: https://www.computerworld.com/article/3428679/mattermost-makes-case-for-open-source-as-team-messaging-market-booms.html +[6]: https://mattermost.com/blog/tips-for-working-remotely/ +[7]: https://opensource.com/article/20/6/open-source-developers-survey +[8]: https://mattermost.com/blog/100-most-popular-mattermost-features-invented-and-contributed-by-our-amazing-open-source-community/ +[9]: https://mattermost.com/open-source-advantage/ From 83a04a1909c32ff65289ece46b8e6c2809527fd1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 10 Apr 2021 11:07:50 +0800 Subject: [PATCH 623/818] PRF @geekpi --- ...cy-Focused Google Analytics Alternative.md | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/translated/tech/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md b/translated/tech/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md index a08e2eac7c..5dac71e10e 100644 --- a/translated/tech/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md +++ b/translated/tech/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md @@ -3,22 +3,24 @@ [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) -Plausible:关注隐私的 Google Analytics 替代方案 +Plausible:注重隐私的 Google Analytics 替代方案 ====== +![](https://img.linux.net.cn/data/attachment/album/202104/10/110720jc8hckngaqr6wch1.jpg) + [Plausible][1]是一款简单的、对隐私友好的分析工具。它可以帮助你分析独立访客数量、页面浏览量、跳出率和访问时间。 -如果你有一个网站,你可能会理解这些术语。作为一个网站所有者,它可以帮助你知道你的网站是否随着时间的推移获得更多的访问者,流量来自哪里,如果你对这些事情有一定的了解,你可以努力改进你的网站,以获得更多的访问量。 +如果你有一个网站,你可能会理解这些术语。作为一个网站所有者,它可以帮助你了解你的网站是否随着时间的推移获得更多的访问者,流量来自哪里,如果你对这些事情有一定的了解,你可以努力改进你的网站,以获得更多的访问量。 说到网站分析,统治这个领域的一个服务就是谷歌的免费工具 Google Analytics。就像 Google 是事实上的搜索引擎一样,Google Analytics 是事实上的分析工具。但你不必再忍受它,尤其是当你无法信任大科技公司使用你和你的网站访问者的数据的时候。 Plausible 让你摆脱 Google Analytics 的束缚,我将在本文中讨论这个开源项目。 -请注意,如果你从来没有管理过网站或对分析感兴趣,文章中的一些技术术语可能对你来说是未知的。 +请注意,如果你从来没有管理过网站或对分析感兴趣,文章中的一些技术术语可能对你来说是陌生的。 ### Plausible 是隐私友好的网站分析工具 @@ -26,7 +28,7 @@ Plausible 使用的分析脚本是非常轻量级的,大小不到 1KB。 其重点在于保护隐私,因此你可以在不影响访客隐私的情况下获得有价值且可操作的统计数据。Plausible 是为数不多的不需要 cookie 横幅或 GDP 同意的分析工具之一,因为它在隐私方面已经符合 [GDPR 标准][2]。这是超级酷的。 -在功能上,它没有 Google Analytics 那样的粒度和细节。Plausible 靠的是简单。它显示的是你过去 30 天的流量统计图。你也可以切换到实时试图。 +在功能上,它没有 Google Analytics 那样的粒度和细节。Plausible 靠的是简单。它显示的是你过去 30 天的流量统计图。你也可以切换到实时视图。 ![][3] @@ -38,11 +40,11 @@ Plausible 使用的分析脚本是非常轻量级的,大小不到 1KB。 ![][6] -显然,提供的数据与 Google Analytics 的数据相差甚远,但这是有意为之。Plausible 打算为你提供简单的矩阵。 +显然,提供的数据与 Google Analytics 的数据相差甚远,但这是有意为之。Plausible 意图是为你提供简单的模式。 ### 使用 Plausible:选择付费托管或在你的服务器上自行托管 -有两种方式可以让你开始使用 Plausible。注册他们的官方托管服务。你必须为这项服务付费,这最终会帮助 Plausible 项目的发展。它们有 30 天的试用期,甚至不需要你这边提供任何支付信息。 +使用 Plausible 有两种方式:注册他们的官方托管服务。你必须为这项服务付费,这最终会帮助 Plausible 项目的发展。它们有 30 天的试用期,甚至不需要你这边提供任何支付信息。 定价从每月 1 万页浏览量 6 美元开始。价格会随着页面浏览量的增加而增加。你可以在 Plausible 网站上计算价格。 @@ -50,17 +52,17 @@ Plausible 使用的分析脚本是非常轻量级的,大小不到 1KB。 你可以试用 30 天,看看你是否愿意向 Plausible 开发者支付服务费用,并拥有你的数据。 -如果你觉得定价不合理,你可以利用 Plausible 是开源的优势,自己部署。如果你有兴趣,请阅读我们的[使用 Docker 自助托管 Plausible 实例的深度指南][8]。 +如果你觉得定价不合理,你可以利用 Plausible 是开源的优势,自己部署。如果你有兴趣,请阅读我们的 [使用 Docker 自助托管 Plausible 实例的深度指南][8]。 -在 It's FOSS,我们自行托管 Plausible。我们的 Plausible 实例添加了我们的三个网站。 +我们自行托管 Plausible。我们的 Plausible 实例添加了我们的三个网站。 ![Plausble dashboard for It’s FOSS websites][9] -如果你维护一个开源项目的网站,并且想使用 Plausible,你可以通过我们的 [High on Cloud 项目][10]联系我们。通过 High on Cloud,我们帮助小企业在其服务器上托管和使用开源软件。 +如果你维护一个开源项目的网站,并且想使用 Plausible,你可以通过我们的 [High on Cloud 项目][10] 联系我们。通过 High on Cloud,我们帮助小企业在其服务器上托管和使用开源软件。 ### 总结 -如果你不是超级痴迷于数据,只是想快速了解网站的表现,Plausible 是一个不错的选择。我喜欢它,因为它是轻量级的,而且遵守隐私。这也是我在 Linux Handbook,我们[教授 Linux 服务器相关的门户网站][11]上使用它的主要原因。 +如果你不是超级痴迷于数据,只是想快速了解网站的表现,Plausible 是一个不错的选择。我喜欢它,因为它是轻量级的,而且遵守隐私。这也是我在 Linux Handbook,我们 [教授 Linux 服务器相关的门户网站][11] 上使用它的主要原因。 总的来说,我对 Plausible 相当满意,并向其他网站所有者推荐它。 @@ -73,7 +75,7 @@ via: https://itsfoss.com/plausible/ 作者:[Abhishek Prakash][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/) 荣誉推出 From 3d5c291fb50f83a79eb6e54d51ef298e0713dc81 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 10 Apr 2021 11:08:34 +0800 Subject: [PATCH 624/818] PUB @geekpi https://linux.cn/article-13283-1.html --- ...Plausible- Privacy-Focused Google Analytics Alternative.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md (98%) diff --git a/translated/tech/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md b/published/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md similarity index 98% rename from translated/tech/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md rename to published/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md index 5dac71e10e..aa8ad197f2 100644 --- a/translated/tech/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md +++ b/published/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13283-1.html) Plausible:注重隐私的 Google Analytics 替代方案 ====== From 735df18ed81c57cca236adab17f763b43eb8f6d0 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 10 Apr 2021 11:11:04 +0800 Subject: [PATCH 625/818] PRF --- ...5 Plausible- Privacy-Focused Google Analytics Alternative.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md b/published/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md index aa8ad197f2..7b97f5144e 100644 --- a/published/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md +++ b/published/20210325 Plausible- Privacy-Focused Google Analytics Alternative.md @@ -48,7 +48,7 @@ Plausible 使用的分析脚本是非常轻量级的,大小不到 1KB。 定价从每月 1 万页浏览量 6 美元开始。价格会随着页面浏览量的增加而增加。你可以在 Plausible 网站上计算价格。 -[Plausible Pricing][7] +- [Plausible 价格][7] 你可以试用 30 天,看看你是否愿意向 Plausible 开发者支付服务费用,并拥有你的数据。 From a7256192bd129de6c6b5de7b5c0f806a43f13416 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 10 Apr 2021 13:13:49 +0800 Subject: [PATCH 626/818] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @max27149 翻译的不错 --- .../20210222 5 benefits of choosing Linux.md | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/translated/tech/20210222 5 benefits of choosing Linux.md b/translated/tech/20210222 5 benefits of choosing Linux.md index f56e7b4566..dc3f911df9 100644 --- a/translated/tech/20210222 5 benefits of choosing Linux.md +++ b/translated/tech/20210222 5 benefits of choosing Linux.md @@ -1,53 +1,54 @@ [#]: collector: (lujun9972) [#]: translator: (max27149) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (5 benefits of choosing Linux) [#]: via: (https://opensource.com/article/21/2/linux-choice) [#]: author: (Seth Kenlon https://opensource.com/users/seth) -# 选择 Linux 的5大好处 +选择 Linux 的五大好处 +====== -Linux 的一大优点是多样化选择,选择激发了用户之间自由分享想法和解决方案。Linux 将如何激发你为这个社区做出贡献呢? +> Linux 的一大优点是多样化选择,选择激发了用户之间自由分享想法和解决方案。Linux 将如何激发你为这个社区做出贡献呢? -![Hand putting a Linux file folder into a drawer][1] +![](https://img.linux.net.cn/data/attachment/album/202104/10/131305ei6yyuyujui9fkkr.jpg) -到了2021年,人​​们比以往任何时候都更有理由喜欢 Linux。在本系列中,我将分享21个使用 Linux 的理由。本文讨论选择 Linux 带来的好处。 +到了 2021 年,人​​们比以往任何时候都更有理由喜欢 Linux。在本系列中,我将分享 21 个使用 Linux 的理由。本文讨论选择 Linux 带来的好处。 -_选择_ 是 Linux 中被误解最深的特性之一。这种误解从可被选择的 Linux 发行版数量就开始了。Distrowatch.org 报告了数百种可用的和活跃的 Linux 发行版。当然,在这些发行版当中,许多都是业余爱好项目或者对于某些晦涩需求的特别版。因为它是开源的,所以实际上,任何人都可以“重新设计”或“重新混搭”现有的Linux发行版,赋予一个新名称,提供一个新的默认墙纸,然后称其为自己的作品。尽管这些修改似乎微不足道,但我认为这显示了 Linux 的一些特别之处。 +_选择_ 是 Linux 中被误解最深的特性之一。这种误解从可被选择的 Linux 发行版数量就开始了。Distrowatch.org 报告了数百种可用的和活跃的 Linux 发行版。当然,在这些发行版当中,许多都是业余爱好项目或者针对某些晦涩需求的特别版。因为是开源的,所以实际上,任何人都可以“重新设计”或“重新混搭”现有的 Linux 发行版,赋予一个新名称,提供一个新的默认墙纸,然后称其为自己的作品。尽管这些修改似乎微不足道,但我认为这显示了 Linux 的一些特别之处。 ### 灵感 Linux 似乎一直在启迪着人们,从了解它的那一刻起,到创造出自己的版本。 -有数十家公司花费数百万美元来从他们自己的产品中获取灵感。商业技术广告试着强硬地说服你,只要你购买某种产品,你就会与所关心的人建立更多的联系,更具创造力,更加充满活力。这些广告以柔和的焦点拍摄4k视频,并使用愉悦而振奋的背景音乐,试图说服人们不仅购买而且还要支持和宣传该公司的产品。 +有数十家公司花费数百万美元来从他们自己的产品中获取灵感。商业技术广告试着强硬地说服你,只要你购买某种产品,你就会与所关心的人建立更多的联系,更具创造力、更加充满活力。这些广告用 4k 视频拍摄,焦点柔和,并在欢快振奋的音乐节奏下播放,试图说服人们不仅购买而且还要支持和宣传该公司的产品。 当然,Linux 基本没有营销预算,因为 Linux 是个形形色色的大集合,*没有固定实体*。然而,当人们发现它的存在时候,他们似乎就被启发着去构建属于自己的版本。 -量化灵感的数量是件难事,但是它显然很有价值,要不然那些公司不会花钱来尝试创造灵感。 +灵感的数量很难量化,但是它显然很有价值,要不然那些公司不会花钱来尝试创造灵感。 ### 革新 -灵感,无论给它标价有多难,它都因它的生产创造而有价值。许多 Linux 用户受启发来为各种奇怪问题定制解决方案。大多数由我们各自解决的问题,对于其他大部分人而言,似乎微不足道:也许你使用 [Seeed微控制器][2] 来监控番茄植株土壤的水分含量;或者你使用脚本来搜索 Python 软件包的索引,因为你会忘记每天导入的库的名称;或者设置了自动清理下载文件夹,因为将文件图标拖进回收站这个活儿干太多了。不管你在使用 Linux 的过程中,为自己解决过什么问题,都是这个平台包含的特性之一,你被这个正在运行中的开放的技术所启发,使其更好地服务于你自己。 +灵感,无论给它标价有多难,它都因它的生产创造而有价值。许多 Linux 用户受启发来为各种奇怪问题定制解决方案。我们解决的大多数问题,对于其他大部分人而言,似乎微不足道:也许你使用 [Seeed 微控制器][2] 来监控番茄植株土壤的水分含量;或者你使用脚本来搜索 Python 软件包的索引,因为你总是会忘记每天导入的库的名称;或者设置了自动清理下载文件夹,因为将文件图标拖进回收站这个活儿干太多了。不管你在使用 Linux 的过程中,为自己解决过什么问题,都是这个平台包含的特性之一,你被这个正在运行中的开放的技术所启发,使其更好地服务于你自己。 ### 开放策略 -诚然,不论是灵感,还是创新,都不能算 Linux 独有的属性。其他平台也确实让我们激发灵感,我们也以或大或小大的方式进行创新。运算能力已在很大程度上拉平了操作系统的竞争领域,你在一个操作系统上可以完成的任何事,在另一个操作系统上或许都能找到对应的方法来完成。 +诚然,不论是灵感,还是创新,都不能算 Linux 独有的属性。其他平台也确实让我们激发灵感,我们也以或大或小的方式进行创新。运算能力已在很大程度上拉平了操作系统的竞争领域,你在一个操作系统上可以完成的任何事,在另一个操作系统上或许都能找到对应的方法来完成。 -但是,许多用户发现,Linux 操作系统保留了坚定的开放策略,即当你尝试可能无人想到过的尝试时,Linux 不会阻挡你。这在闭源操作系统上不会发生,而且不可能发生,因为无法进入系统层级的某些区域,因为它们本身就是被设计为不开放源码的。有任意的封锁。当你完全按照操作系统的期望进行操作时,你不会碰到那些看不见的墙,但是当你明知要执行的操作只对你自己有意义的时候,你的系统环境可能变得无从适应。 +但是,许多用户发现,Linux 操作系统保留了坚定的开放策略,当你尝试可能无人想到过的尝试时,Linux 不会阻挡你。这种情况不会也不可能发生在专有的操作系统上,因为无法进入系统层级的某些区域,因为它们本身就是被设计为不开放源码的。有各种独断的封锁。当你完全按照操作系统的期望进行操作时,你不会碰到那些看不见的墙,但是当你心里想着要做一些只对你有意义的事情的时候,你的系统环境可能变得无从适应。 ### 小小的选择,大大的意义 -并非所有创新都是大的或重要的,但总的来说,它们带来的变化并不小。如今,数百万用户的那些疯狂想法在 Linux 的各个部分中愈发显现。它们存在于 KDE 或 GNOME 桌面的工作方式中,存在于 [31种不同的文本编辑器][3] 中——每一种都有人喜爱,存在于不计其数的浏览器插件和多媒体应用程序中,存在于文件系统和扩展属性中,以及数以百万计的 Linux 内核代码中。而且,如果上述功能中的哪怕仅其中一项,能让你每天额外节省下一小时时间,陪家人、朋友或用在自己的业余爱好上,那么按照定义,套用一句老话就是,“改变生活”。 +并非所有创新都是大的或重要的,但总的来说,它们带来的变化并不小。如今,数百万用户的那些疯狂想法在 Linux 的各个部分中愈发显现。它们存在于 KDE 或 GNOME 桌面的工作方式中,存在于 [31 种不同的文本编辑器][3] 中 —— 每一种都有人喜爱,存在于不计其数的浏览器插件和多媒体应用程序中,存在于文件系统和扩展属性中,以及数以百万行计的 Linux 内核代码中。而且,如果上述功能中的哪怕仅其中一项,能让你每天额外节省下一小时时间,陪家人、朋友或用在自己的业余爱好上,那么按照定义,套用一句老话就是,“改变生活”。 ### 在社区中交流 -开源行动的重要组成部分之一是共享工作。共享代码是开源软件中显而易见的、普遍流行的事务,但我认为,分享,可不仅仅是在 Gitlab 做一次提交那么简单。当人们彼此分享着自己的奇思妙想,除了获得有用的代码贡献作为回报外,再无其他动机,我们一致认为这是一种馈赠。这与你花钱从某公司购买软件时的感觉非常不同,甚至与得到某公司对外分享他们自己生产的开源代码时的感觉也有很大不同。开源的实质是,由全人类创造,服务于全人类。当知识和灵感可以被自由地分享时,人与人之间就建立了连接,这是市场营销学无法复制的东西,我认为我们都认同这一点。 +开源的重要组成部分之一是共享工作。共享代码是开源软件中显而易见的、普遍流行的事务,但我认为,分享,可不仅仅是在 Gitlab 做一次提交那么简单。当人们彼此分享着自己的奇思妙想,除了获得有用的代码贡献作为回报外,再无其他动机,我们都认为这是一种馈赠。这与你花钱从某公司购买软件时的感觉非常不同,甚至与得到某公司对外分享他们自己生产的开源代码时的感觉也有很大不同。开源的实质是,由全人类创造,服务于全人类。当知识和灵感可以被自由地分享时,人与人之间就建立了连接,这是市场营销活动无法复制的东西,我认为我们都认同这一点。 ### 选择 -Linux 并不是唯一拥有很多选择的平台。无论使用哪种操作系统,你都可以找到针对同一问题的多种解决方案,尤其是在深入研究开源软件的时候。但是,Linux 明显的决策水准指示了推动 Linux 前进的因素:诚邀协作。在 Linux 上,有些创造会很快消失,有些会在你家用电脑中保留数年——即便只是执行一些不起眼的自动化任务,然而有一些则非常成功,以至于被其他系统平台借鉴并变得司空见惯。没关系,无论你在 Linux 上创作出什么,都请毫不犹豫地把它加入千奇百怪的选择之中,你永远都不知道它可能会激发到谁的灵感。 +Linux 并不是唯一拥有很多选择的平台。无论使用哪种操作系统,你都可以找到针对同一问题的多种解决方案,尤其是在深入研究开源软件的时候。但是,Linux 明显的选择水准指示了推动 Linux 前进的因素:诚邀协作。在 Linux 上,有些创造会很快消失,有些会在你家用电脑中保留数年 —— 即便只是执行一些不起眼的自动化任务,然而有一些则非常成功,以至于被其他系统平台借鉴并变得司空见惯。没关系,无论你在 Linux 上创作出什么,都请毫不犹豫地把它加入千奇百怪的选择之中,你永远都不知道它可能会激发到谁的灵感。 --- @@ -56,7 +57,7 @@ via: https://opensource.com/article/21/2/linux-choice 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[max27149](https://github.com/max27149) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 3843c073923f9ec5dfc3a63d2196a39053af797c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 10 Apr 2021 13:16:21 +0800 Subject: [PATCH 627/818] PUB @max27149 https://linux.cn/article-13284-1.html --- .../20210222 5 benefits of choosing Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210222 5 benefits of choosing Linux.md (98%) diff --git a/translated/tech/20210222 5 benefits of choosing Linux.md b/published/20210222 5 benefits of choosing Linux.md similarity index 98% rename from translated/tech/20210222 5 benefits of choosing Linux.md rename to published/20210222 5 benefits of choosing Linux.md index dc3f911df9..df05f65e43 100644 --- a/translated/tech/20210222 5 benefits of choosing Linux.md +++ b/published/20210222 5 benefits of choosing Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (max27149) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13284-1.html) [#]: subject: (5 benefits of choosing Linux) [#]: via: (https://opensource.com/article/21/2/linux-choice) [#]: author: (Seth Kenlon https://opensource.com/users/seth) From 5dae1480fff01769c314cd469655a2be57d70ba4 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 11 Apr 2021 05:03:33 +0800 Subject: [PATCH 628/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210411=20?= =?UTF-8?q?GNOME=E2=80=99s=20Very=20Own=20=E2=80=9CGNOME=20OS=E2=80=9D=20i?= =?UTF-8?q?s=20Not=20a=20Linux=20Distro=20for=20Everyone=20[Review]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md --- ...Not a Linux Distro for Everyone -Review.md | 133 ++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 sources/tech/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md diff --git a/sources/tech/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md b/sources/tech/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md new file mode 100644 index 0000000000..cfe341cedd --- /dev/null +++ b/sources/tech/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md @@ -0,0 +1,133 @@ +[#]: subject: (GNOME’s Very Own “GNOME OS” is Not a Linux Distro for Everyone [Review]) +[#]: via: (https://itsfoss.com/gnome-os/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +GNOME’s Very Own “GNOME OS” is Not a Linux Distro for Everyone [Review] +====== + +Whenever a major release for GNOME arrives, it is always tempting to try it out as soon as possible. But, to get your hands on it first to test it, you had to mostly rely on [Fedora Rawhide][1] (development branch). + +However, a development branch isn’t always hassle-free. So, it wasn’t the most convenient solution to try the latest GNOME. Now, by testing, I don’t mean just for users but also being able to test design changes for the developers as well. + +So, GNOME OS recently came to the rescue to ease the process of testing. But, what exactly is it and how to get it installed? Let us take a look. + +### What is GNOME OS? + +GNOME OS is not a separate full-fledged Linux distribution. In fact, it isn’t based on anything at all. It’s an incomplete reference system just to make GNOME desktop work. **It is just a bootable VM (Virtual Machine) image tailored for debugging and testing features before it hits any distribution’s repository.** + +One of the GNOME blogs mention it as: + +> GNOME OS aims to better facilitate development of GNOME by providing a working system for development, design, and user testing purposes. + +If you’re curious, you may want to check out a [blog post][2] on Planet GNOME to know more about GNOME OS. + +### If it’s not a full-fledged Linux distribution then what is it used for? + +![][3] + +It is interesting to note that a new GNOME OS image can be created for every new commit made, so it should make the testing process efficient and help you test/find issues early in the development cycle. + +Not to forget, designers no longer have to build the software themselves to test the GNOME Shell or any other core modules. It saves them time and the whole GNOME development cycle. + +Of course, not just limited to developers and technical testers, it also lets journalists to get their hands on the latest and greatest to cover a story about GNOME’s next release or how it’s being shaped. + +The media and the GNOME team also gets a good opportunity to prepare visual materials to promote the release in both video/picture format thanks to GNOME OS. + +### How to install GNOME OS? + +To easily install GNOME OS, you will need to install GNOME Boxes application first. + +#### Installing GNOME Boxes + +‘**Boxes**‘ is a simple virtualization software that does not offer any advanced options but lets you easily install an operating system image to test quickly. It is targeted specially for desktop end-users, so it is easy to use as well. + +To install it on any Linux distribution, you can utilize the [Flatpak][4] package from [Flathub][5]. In case you don’t know about a Flatpak, you might want to read our guide on [installing and using Flatpak in Linux][6]. + +You may also directly install it from the terminal on any Ubuntu-based distro by typing this: + +``` +sudo apt install gnome-boxes +``` + +Once you get Boxes installed, it is fairly easy to install GNOME OS from here. + +#### Install GNOME OS + +After you have Boxes installed, you need to launch the program. Next, click on the “**+**” sign that you see in the upper-left corner of the window and then click on “**Operating System Download**” as shown in the image below. + +![][7] + +This option lets you directly download the image file and then you can proceed to install it. + +All you need to do is search for “GNOME” and you should find the Nightly build available. This will ensure that you are trying the latest and greatest GNOME version in development. + +Alternatively, you can head to the [GNOME OS Nightly website][8] and download the system image and choose the “**Operating System Image File**” in the Boxes app to select the ISO as shown in the screenshot above to proceed installing it. + +![][9] + +Considering you didn’t download the image separately. When you click on it, the download should start and a progress bar will appear: + +![][10] + +Once it is done, it will ask you to customize the configuration if needed and let you create the VM as shown below: + +![][11] + +You can customize the resource allocation depending on your available system resources, but you should be good to go with the default settings. + +Click on “**Create**” and it will directly start GNOME OS installation: + +![][12] + +Select the existing version and proceed. Next, you will have to select the disk (keep it as is) and then agree to erasing all your files and apps (it won’t delete anything from your local computer). + +![][13] + +Now, it will simply reformat and install it. And, you’re done. It will prompt you to restart it and when you do, you will find GNOME OS installed. + +It will simply boot up as any Linux distro would and will ask you to set up a few things, including the username and a password. And, you’re good to explore! + +If you are curious what it looks like, it’s basically the latest GNOME desktop environment. I used GNOME OS to make an overview video of GNOME 40 before the official release. + +### Closing Thoughts + +GNOME OS is definitely something useful for developers, designers, and the media. It makes it easy to test the latest development version of GNOME without investing a lot of time. + +I could test [GNOME 40][14] quickly just because of this. Of course, you will have to keep in mind that this isn’t a fully functional OS that you should install on a physical device. There are plans to make one available to run on a physical machine, but as it stands now, it is only tailored for virtual machines, especially using GNOME Boxes. + +GNOME Boxes does not offer any advanced options, so it becomes quite easy to set it up and use it. You might want to tweak the resources if the experience is too slow, but it was a good experience overall in my case. + +Have you tried GNOME OS yet? Feel free to let me know your thoughts in the comments down below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/gnome-os/ + +作者:[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://fedoraproject.org/wiki/Releases/Rawhide +[2]: https://blogs.gnome.org/alatiera/2020/10/07/what-is-gnome-os/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/GNOME-OS-distro-review.png?resize=800%2C450&ssl=1 +[4]: https://itsfoss.com/what-is-flatpak/ +[5]: https://flathub.org/apps/details/org.gnome.Boxes +[6]: https://itsfoss.com/flatpak-guide/ +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/gnome-os-search.jpg?resize=800%2C729&ssl=1 +[8]: https://os.gnome.org/ +[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/gnome-os-boxes.jpg?resize=800%2C694&ssl=1 +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/gnome-os-download.jpg?resize=798%2C360&ssl=1 +[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/gnome-boxes-vm-setup.png?resize=800%2C301&ssl=1 +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/gnome-nightly-install.jpg?resize=800%2C636&ssl=1 +[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/gnome-os-installation.jpg?resize=800%2C619&ssl=1 +[14]: https://news.itsfoss.com/gnome-40-release/ From 15012eed7c0c047c69dd2cdb6ab3e82900820ff1 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 11 Apr 2021 05:03:52 +0800 Subject: [PATCH 629/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210410=20?= =?UTF-8?q?5=20signs=20you're=20a=20groff=20programmer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210410 5 signs you-re a groff programmer.md --- ...10410 5 signs you-re a groff programmer.md | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 sources/tech/20210410 5 signs you-re a groff programmer.md diff --git a/sources/tech/20210410 5 signs you-re a groff programmer.md b/sources/tech/20210410 5 signs you-re a groff programmer.md new file mode 100644 index 0000000000..6708800e7e --- /dev/null +++ b/sources/tech/20210410 5 signs you-re a groff programmer.md @@ -0,0 +1,77 @@ +[#]: subject: (5 signs you're a groff programmer) +[#]: via: (https://opensource.com/article/21/4/groff-programmer) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +5 signs you're a groff programmer +====== +Learning groff, an old-school text processor, is like learning to ride a +bicycle. +![Typewriter in the grass][1] + +I first discovered Unix systems in the early 1990s, when I was an undergraduate at university. I liked it so much that I replaced the MS-DOS system on my home computer with the Linux operating system. + +One thing that Linux didn't have in the early to mid-1990s was a word processor. A standard office application on other desktop operating systems, a word processor lets you edit text easily. I often used a word processor on DOS to write my papers for class. I wouldn't find a Linux-native word processor until the late 1990s. Until then, word processing was one of the rare reasons I maintained dual-boot on my first computer, so I could occasionally boot back into DOS to write papers. + +Then I discovered that Linux provided kind of a word processor. GNU troff, better known as [groff][2], is a modern implementation of a classic text processing system called troff, short for "typesetter roff," which is an improved version of the nroff system. And nroff was meant to be a new implementation of the original roff (which stood for "run off," as in to "run off" a document). + +With text processing, you edit text in a plain text editor, and you add formatting through macros or other processing commands. You then process that text file through a text-processing system such as groff to generate formatted output suitable for a printer. Another well-known text processing system is LaTeX, but groff was simple enough for my needs. + +With a little practice, I found I could write my class papers just as easily in groff as I could using a word processor on Linux. While I don't use groff to write documents today, I still remember the macros and commands to generate printed documents with it. And if you're the same and you learned how to write with groff all those years ago, you probably recognize these five signs that you're a groff writer. + +### 1\. You have a favorite macro set + +You format a document in groff by writing plain text interspersed with macros. A macro in groff is a short command that starts with a single period at the beginning of a line. For example: if you want to insert a few lines into your output, the `.sp 2` macro command adds two blank lines. groff supports other basic macros for all kinds of formatting. + +To make formatting a document easier for the writer, groff also provides different _macro sets_, collections of macros that let you format documents your own way. The first macro set I learned was the `-me` macro set. Really, the macro set is called the `e` macro set, and you specify the `e` macro set when you process a file using the `-me` option. + +groff includes other macro sets, too. For example, the `-man` macro set used to be the standard macro set to format the built-in _manual_ pages on Unix systems, and the `-ms` macro set is often used to format certain other technical documents. If you learned to write with groff, you probably have a favorite macro set. + +### 2\. You want to focus on your content, not the formatting + +One great feature of writing with groff is that you can focus on your _content_ and not worry too much about what it looks like. That is a handy feature for technical writers. groff is a great "distraction-free" environment for professional writers. At least, as long as you don't mind delivering your output in any of the formats that groff supports with the `-T` command-line option, including PDF, PostScript, HTML, and plain text. You can't generate a LibreOffice ODT file or Word DOC file directly from groff. + +Once you get comfortable writing in groff, the macros start to _disappear_. The formatting macros become part of the background, and you focus purely on the text in front of you. I've done enough writing in groff that I don't even see the macros anymore. Maybe it's like writing programming code, and your mind just switches gears, so you think like a computer and see the code as a set of instructions. For me, writing in groff is like that; I just see my text, and my mind interprets the macros automatically into formatting. + +### 3\. You like the old-school feel + +Sure, it might be _easier_ to write your documents with a more typical word processor like LibreOffice Writer or even Google Docs or Microsoft Word. And for certain kinds of documents, a desktop word processor is the right fit. But if you want the "old-school" feel, it's hard to beat writing in groff. + +I'll admit that I do most of my writing with LibreOffice Writer, which does an outstanding job. But when I get that itch to do it "old-school," I'll open an editor and write my document using groff. + +### 4\. You like that you can use it anywhere + +groff (and its cousins) are a standard package on almost any Unix system. And with groff, the macros don't change. For example, the `-me` macros should be the same from system to system. So once you've learned to use the macros on one system, you can use them on the next system. + +And because groff documents are just plain text, you can use any editor you like to edit your documents for groff. I like to use GNU Emacs to edit my groff documents, but you can use GNOME Gedit, Vim, or your [favorite text editor][3]. Most editors include some kind of "mode" that will highlight the groff macros in a different color from the rest of your text to help you spot errors before processing the file. + +### 5\. You wrote this article in -me + +When I decided to write this article, I thought the best way would be to use groff directly. I wanted to demonstrate how flexible groff was in preparing documents. So even though you're reading this on a website, the article was originally written using groff. + +I hope this has interested you in learning how to use groff to write documents. If you'd like to use more advanced functions in the `-me` macro set, refer to Eric Allman's _Writing papers with groff using -me_, which you should find on your system as **meintro.me** in groff's documentation. It's a great reference document that explains other ways to format papers using the `-me` macros. + +I've also included a copy of the original draft of my article that uses the `-me` macros. Save the file to your system as **five-signs-groff.me**, and run it through groff to view it. The `-T` option sets the output type, such as `-Tps` to generate PostScript output or `-Thtml` to create an HTML file. For example: + +groff -me -Thtml five-signs-groff.me > five-signs-groff.html + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/groff-programmer + +作者:[Jim Hall][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/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/doc-dish-lead.png?itok=h3fCkVmU (Typewriter in the grass) +[2]: https://en.wikipedia.org/wiki/Groff_(software) +[3]: https://opensource.com/article/21/2/open-source-text-editors From a6513e5d11108074e607c413babb577ccb41ffcf Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 11 Apr 2021 09:34:50 +0800 Subject: [PATCH 630/818] PRF @DCOLIVERSUN --- ...10401 Find what changed in a Git commit.md | 92 +++++++++---------- 1 file changed, 45 insertions(+), 47 deletions(-) diff --git a/translated/tech/20210401 Find what changed in a Git commit.md b/translated/tech/20210401 Find what changed in a Git commit.md index f95ac5cb4b..82d093b12e 100644 --- a/translated/tech/20210401 Find what changed in a Git commit.md +++ b/translated/tech/20210401 Find what changed in a Git commit.md @@ -3,119 +3,117 @@ [#]: author: (Seth Kenlon https://opensource.com/users/seth) [#]: collector: (lujun9972) [#]: translator: (DCOLIVERSUN) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) 查看 Git 提交中发生了什么变化 ====== -Git 提供了几种方式可以帮你快速查看提交中哪些文件被改变。 -![运行在电脑中的代码][1] -如果你每天使用 Git,应该会提交不少改动。如果你每天和其他人在一个项目中使用 Git,假设 _每个人_ 每天的提交都是安全的,你会意识到 Git 日志会变得多么混乱,看似不停地滚动变化,却没有任何改变的迹象。 +> Git 提供了几种方式可以帮你快速查看提交中哪些文件被改变。 + +![](https://img.linux.net.cn/data/attachment/album/202104/11/093421yuololouo66woulu.jpg) + +如果你每天使用 Git,应该会提交不少改动。如果你每天和其他人在一个项目中使用 Git,假设 _每个人_ 每天的提交都是安全的,你会意识到 Git 日志会变得多么混乱,似乎永恒地滚动着变化,却没有任何迹象表明修改了什么。 那么,你该怎样查看指定提交中文件发生哪些变化?这比你想的容易。 ### 查看提交中文件发生的变化 -为了发现指定提交中哪些文件发生变化,可以使用 `git log --raw` 命令。这是发现提交影响哪些文件的最快速、最方便的方法。`git log` 命令不常用,主要是因为它有太多的格式选项,许多用户在面对很多选择以及在一些情况下不明所以的文档时,会望而却步。 +要想知道指定提交中哪些文件发生变化,可以使用 `git log --raw` 命令。这是发现一个提交影响了哪些文件的最快速、最方便的方法。`git log` 命令一般都没有被充分利用,主要是因为它有太多的格式化选项,许多用户在面对很多选择以及在一些情况下不明所以的文档时,会望而却步。 然而,Git 的日志机制非常灵活,`--raw` 选项提供了当前分支中的提交日志,以及更改的文件列表。 以下是标准的 `git log` 输出: - ``` $ git log -commit fbbbe083aed75b24f2c77b1825ecab10def0953c (HEAD -> dev, origin/dev) -Author: tux <[tux@example.com][2]> -Date:   Sun Nov 5 21:40:37 2020 +1300 +commit fbbbe083aed75b24f2c77b1825ecab10def0953c (HEAD -> dev, origin/dev) +Author: tux +Date: Sun Nov 5 21:40:37 2020 +1300 -    exit immediately from failed download + exit immediately from failed download commit 094f9948cd995acfc331a6965032ea0d38e01f03 (origin/master, master) -Author: Tux <[tux@example.com][2]> -Date:   Fri Aug 5 02:05:19 2020 +1200 +Author: Tux +Date: Fri Aug 5 02:05:19 2020 +1200 -    export makeopts from etc/example.conf + export makeopts from etc/example.conf commit 76b7b46dc53ec13316abb49cc7b37914215acd47 -Author: Tux <[tux@example.com][2]> -Date:   Sun Jul 31 21:45:24 2020 +1200 +Author: Tux +Date: Sun Jul 31 21:45:24 2020 +1200 -    fix typo in help message + fix typo in help message ``` 即使作者在提交消息中指定了哪些文件发生变化,日志也相当简洁。 以下是 `git log --raw` 输出: - ``` $ git log --raw -commit fbbbe083aed75b24f2c77b1825ecab10def0953c (HEAD -> dev, origin/dev) -Author: tux <[tux@example.com][2]> -Date:   Sun Nov 5 21:40:37 2020 +1300 +commit fbbbe083aed75b24f2c77b1825ecab10def0953c (HEAD -> dev, origin/dev) +Author: tux +Date: Sun Nov 5 21:40:37 2020 +1300 -    exit immediately from failed download + exit immediately from failed download -:100755 100755 cbcf1f3 4cac92f M        src/example.lua +:100755 100755 cbcf1f3 4cac92f M src/example.lua commit 094f9948cd995acfc331a6965032ea0d38e01f03 (origin/master, master) -Author: Tux <[tux@example.com][2]> -Date:   Fri Aug 5 02:05:19 2020 +1200 +Author: Tux +Date: Fri Aug 5 02:05:19 2020 +1200 -    export makeopts from etc/example.conf -    -:100755 100755 4c815c0 cbcf1f3 M     src/example.lua -:100755 100755 71653e1 8f5d5a6 M     src/example.spec -:100644 100644 9d21a6f e33caba R100  etc/example.conf  etc/example.conf-default + export makeopts from etc/example.conf + +:100755 100755 4c815c0 cbcf1f3 M src/example.lua +:100755 100755 71653e1 8f5d5a6 M src/example.spec +:100644 100644 9d21a6f e33caba R100 etc/example.conf etc/example.conf-default commit 76b7b46dc53ec13316abb49cc7b37914215acd47 -Author: Tux <[tux@example.com][2]> -Date:   Sun Jul 31 21:45:24 2020 +1200 +Author: Tux +Date: Sun Jul 31 21:45:24 2020 +1200 -    fix typo in help message + fix typo in help message -:100755 100755 e253aaf 4c815c0 M        src/example.lua +:100755 100755 e253aaf 4c815c0 M src/example.lua ``` 这会准确告诉你哪个文件被添加到提交中,哪些文件发生改变(`A` 是添加,`M` 是修改,`R` 是重命名,`D` 是删除)。 ### Git whatchanged -`git whatchanged` 命令是日志功能之前的遗留命令。文档说用户不应该用该命令支持 `git log --raw`,并且暗示它本质上已经被否决了。除了合并提交,我仍然发现它的输出与 `git log --raw` 的输出大部分相同,它是一个有用的快捷方式。如果它被删除的话,我期望为他创建一个别名。如果你只想查看已更改的文件,不需要在日志中合并提交,可以尝试 `git whatchanged` 作为简单的助记符。 +`git whatchanged` 命令是一个遗留命令,它的前身是日志功能。文档说用户不应该用该命令替代 `git log --raw`,并且暗示它实质上已经被废弃了。不过,我还是觉得它是一个很有用的捷径,可以得到同样的输出结果(尽管合并提交的内容不包括在内),如果它被删除的话,我打算为它创建一个别名。如果你只想查看已更改的文件,不想在日志中看到合并提交,可以尝试 `git whatchanged` 作为简单的助记符。 ### 查看变化 -你不仅可以看到哪些文件发生更改,还可以使用 `git log` 显示文件中发生了哪些变化。你的 Git 日志可以生成一个内联比较,用 `--patch` 选项可以逐行显示每个文件的所有更改: - +你不仅可以看到哪些文件发生更改,还可以使用 `git log` 显示文件中发生了哪些变化。你的 Git 日志可以生成一个内联差异,用 `--patch` 选项可以逐行显示每个文件的所有更改: ``` -commit 62a2daf8411eccbec0af69e4736a0fcf0a469ab1 (HEAD -> master) -Author: Tux <[Tux@example.com][3]> -Date:   Wed Mar 10 06:46:58 2021 +1300 +commit 62a2daf8411eccbec0af69e4736a0fcf0a469ab1 (HEAD -> master) +Author: Tux +Date: Wed Mar 10 06:46:58 2021 +1300 -    commit + commit diff --git a/hello.txt b/hello.txt index 65a56c3..36a0a7d 100644 -\--- a/hello.txt +--- a/hello.txt +++ b/hello.txt @@ -1,2 +1,2 @@ - Hello + Hello -world +opensource.com ``` -在这个例子中,"world" 这行字从 `hello.txt` 中删掉,"opensource.com" 这行字则添加进去。 +在这个例子中,“world” 这行字从 `hello.txt` 中删掉,“opensource.com” 这行字则添加进去。 如果你需要在其他地方手动进行相同的修改,这些补丁patch可以与常见的 Unix 命令一起使用,例如 [diff 与 patch][4]。补丁也是一个好方法,可以总结指定提交中引入新信息的重要部分内容。当你在冲刺阶段引入一个 bug 时,你会发现这里的内容就是非常有价值的概述。为了更快地找到错误的原因,你可以忽略文件中没有更改的部分,只检查新代码。 +### 用简单命令得到复杂的结果 -### 得到复杂结果的简单命令 - -你不必理解引用、分支和提交哈希,就可以查看提交中更改了哪些文件。你的 Git 日志旨在向你报告 Git 活动,如果你想以特定方式格式化它或者提取特定的信息,通常需要费力地浏览许多文档来组合出正确的命令。幸运的是,Git 历史上最常用的请求之一只有一两个选项:`--raw` 与 `--patch`。如果你不记得 `--raw`,就想想“Git,改变什么了?”,然后输入 `git whatchanged`。 +你不必理解引用、分支和提交哈希,就可以查看提交中更改了哪些文件。你的 Git 日志旨在向你报告 Git 的活动,如果你想以特定方式格式化它或者提取特定的信息,通常需要费力地浏览许多文档来组合出正确的命令。幸运的是,关于 Git 历史记录最常用的请求之一只需要一两个选项:`--raw` 与 `--patch`。如果你不记得 `--raw`,就想想“Git,什么改变了?”,然后输入 `git whatchanged`。 -------------------------------------------------------------------------------- @@ -124,7 +122,7 @@ via: https://opensource.com/article/21/4/git-whatchanged 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[DCOLIVERSUN](https://github.com/DCOLIVERSUN) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From e53d5a6d388c3676c75c51bdb125fc54f2991c52 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 11 Apr 2021 09:35:49 +0800 Subject: [PATCH 631/818] PUB @DCOLIVERSUN https://linux.cn/article-13286-1.html --- .../20210401 Find what changed in a Git commit.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210401 Find what changed in a Git commit.md (98%) diff --git a/translated/tech/20210401 Find what changed in a Git commit.md b/published/20210401 Find what changed in a Git commit.md similarity index 98% rename from translated/tech/20210401 Find what changed in a Git commit.md rename to published/20210401 Find what changed in a Git commit.md index 82d093b12e..47202013ef 100644 --- a/translated/tech/20210401 Find what changed in a Git commit.md +++ b/published/20210401 Find what changed in a Git commit.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (DCOLIVERSUN) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13286-1.html) 查看 Git 提交中发生了什么变化 ====== From e9f799e579a3eebf7b4e3ac4514bf3a71c99d8d7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 11 Apr 2021 09:48:58 +0800 Subject: [PATCH 632/818] APL --- ...Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md b/sources/tech/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md index cfe341cedd..57a5352e8f 100644 --- a/sources/tech/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md +++ b/sources/tech/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md @@ -2,7 +2,7 @@ [#]: via: (https://itsfoss.com/gnome-os/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 84b674b2a70217da80d2e096ce323351c4abfb4b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 11 Apr 2021 10:32:59 +0800 Subject: [PATCH 633/818] TSL&PRF --- ...Not a Linux Distro for Everyone -Review.md | 133 ----------------- ...Not a Linux Distro for Everyone -Review.md | 135 ++++++++++++++++++ 2 files changed, 135 insertions(+), 133 deletions(-) delete mode 100644 sources/tech/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md create mode 100644 translated/tech/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md diff --git a/sources/tech/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md b/sources/tech/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md deleted file mode 100644 index 57a5352e8f..0000000000 --- a/sources/tech/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md +++ /dev/null @@ -1,133 +0,0 @@ -[#]: subject: (GNOME’s Very Own “GNOME OS” is Not a Linux Distro for Everyone [Review]) -[#]: via: (https://itsfoss.com/gnome-os/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -GNOME’s Very Own “GNOME OS” is Not a Linux Distro for Everyone [Review] -====== - -Whenever a major release for GNOME arrives, it is always tempting to try it out as soon as possible. But, to get your hands on it first to test it, you had to mostly rely on [Fedora Rawhide][1] (development branch). - -However, a development branch isn’t always hassle-free. So, it wasn’t the most convenient solution to try the latest GNOME. Now, by testing, I don’t mean just for users but also being able to test design changes for the developers as well. - -So, GNOME OS recently came to the rescue to ease the process of testing. But, what exactly is it and how to get it installed? Let us take a look. - -### What is GNOME OS? - -GNOME OS is not a separate full-fledged Linux distribution. In fact, it isn’t based on anything at all. It’s an incomplete reference system just to make GNOME desktop work. **It is just a bootable VM (Virtual Machine) image tailored for debugging and testing features before it hits any distribution’s repository.** - -One of the GNOME blogs mention it as: - -> GNOME OS aims to better facilitate development of GNOME by providing a working system for development, design, and user testing purposes. - -If you’re curious, you may want to check out a [blog post][2] on Planet GNOME to know more about GNOME OS. - -### If it’s not a full-fledged Linux distribution then what is it used for? - -![][3] - -It is interesting to note that a new GNOME OS image can be created for every new commit made, so it should make the testing process efficient and help you test/find issues early in the development cycle. - -Not to forget, designers no longer have to build the software themselves to test the GNOME Shell or any other core modules. It saves them time and the whole GNOME development cycle. - -Of course, not just limited to developers and technical testers, it also lets journalists to get their hands on the latest and greatest to cover a story about GNOME’s next release or how it’s being shaped. - -The media and the GNOME team also gets a good opportunity to prepare visual materials to promote the release in both video/picture format thanks to GNOME OS. - -### How to install GNOME OS? - -To easily install GNOME OS, you will need to install GNOME Boxes application first. - -#### Installing GNOME Boxes - -‘**Boxes**‘ is a simple virtualization software that does not offer any advanced options but lets you easily install an operating system image to test quickly. It is targeted specially for desktop end-users, so it is easy to use as well. - -To install it on any Linux distribution, you can utilize the [Flatpak][4] package from [Flathub][5]. In case you don’t know about a Flatpak, you might want to read our guide on [installing and using Flatpak in Linux][6]. - -You may also directly install it from the terminal on any Ubuntu-based distro by typing this: - -``` -sudo apt install gnome-boxes -``` - -Once you get Boxes installed, it is fairly easy to install GNOME OS from here. - -#### Install GNOME OS - -After you have Boxes installed, you need to launch the program. Next, click on the “**+**” sign that you see in the upper-left corner of the window and then click on “**Operating System Download**” as shown in the image below. - -![][7] - -This option lets you directly download the image file and then you can proceed to install it. - -All you need to do is search for “GNOME” and you should find the Nightly build available. This will ensure that you are trying the latest and greatest GNOME version in development. - -Alternatively, you can head to the [GNOME OS Nightly website][8] and download the system image and choose the “**Operating System Image File**” in the Boxes app to select the ISO as shown in the screenshot above to proceed installing it. - -![][9] - -Considering you didn’t download the image separately. When you click on it, the download should start and a progress bar will appear: - -![][10] - -Once it is done, it will ask you to customize the configuration if needed and let you create the VM as shown below: - -![][11] - -You can customize the resource allocation depending on your available system resources, but you should be good to go with the default settings. - -Click on “**Create**” and it will directly start GNOME OS installation: - -![][12] - -Select the existing version and proceed. Next, you will have to select the disk (keep it as is) and then agree to erasing all your files and apps (it won’t delete anything from your local computer). - -![][13] - -Now, it will simply reformat and install it. And, you’re done. It will prompt you to restart it and when you do, you will find GNOME OS installed. - -It will simply boot up as any Linux distro would and will ask you to set up a few things, including the username and a password. And, you’re good to explore! - -If you are curious what it looks like, it’s basically the latest GNOME desktop environment. I used GNOME OS to make an overview video of GNOME 40 before the official release. - -### Closing Thoughts - -GNOME OS is definitely something useful for developers, designers, and the media. It makes it easy to test the latest development version of GNOME without investing a lot of time. - -I could test [GNOME 40][14] quickly just because of this. Of course, you will have to keep in mind that this isn’t a fully functional OS that you should install on a physical device. There are plans to make one available to run on a physical machine, but as it stands now, it is only tailored for virtual machines, especially using GNOME Boxes. - -GNOME Boxes does not offer any advanced options, so it becomes quite easy to set it up and use it. You might want to tweak the resources if the experience is too slow, but it was a good experience overall in my case. - -Have you tried GNOME OS yet? Feel free to let me know your thoughts in the comments down below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/gnome-os/ - -作者:[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://fedoraproject.org/wiki/Releases/Rawhide -[2]: https://blogs.gnome.org/alatiera/2020/10/07/what-is-gnome-os/ -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/GNOME-OS-distro-review.png?resize=800%2C450&ssl=1 -[4]: https://itsfoss.com/what-is-flatpak/ -[5]: https://flathub.org/apps/details/org.gnome.Boxes -[6]: https://itsfoss.com/flatpak-guide/ -[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/gnome-os-search.jpg?resize=800%2C729&ssl=1 -[8]: https://os.gnome.org/ -[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/gnome-os-boxes.jpg?resize=800%2C694&ssl=1 -[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/gnome-os-download.jpg?resize=798%2C360&ssl=1 -[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/gnome-boxes-vm-setup.png?resize=800%2C301&ssl=1 -[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/gnome-nightly-install.jpg?resize=800%2C636&ssl=1 -[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/gnome-os-installation.jpg?resize=800%2C619&ssl=1 -[14]: https://news.itsfoss.com/gnome-40-release/ diff --git a/translated/tech/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md b/translated/tech/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md new file mode 100644 index 0000000000..bc1e438b16 --- /dev/null +++ b/translated/tech/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md @@ -0,0 +1,135 @@ +[#]: subject: (GNOME’s Very Own “GNOME OS” is Not a Linux Distro for Everyone [Review]) +[#]: via: (https://itsfoss.com/gnome-os/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) + +GNOME OS:一个并不是适合所有人的 Linux 发行版 +====== + +![](https://img.linux.net.cn/data/attachment/album/202104/11/103205t34lcaa3t0a3xjjw.jpg) + +每当 GNOME 的一个重要版本到来时,总是很想尽快试用它。但是,要想第一时间进行测试,主要还是得依靠 [Fedora Rawhide][1] 开发分支。 + +然而,开发分支并不总是让人放心的,所以,用来尝试最新的 GNOME 并不是最方便的解决方案。这里,我所说的测试,并不仅仅是指用户的测试,同时也能够用于开发者对设计变更进行测试。 + +所以,最近来了个大救星 GNOME OS,让测试的过程变得轻松起来。但是,它到底是什么,怎么安装呢?让我们一起来看看吧。 + +### 什么是 GNOME OS? + +GNOME OS 并不是一个独立完整的 Linux 发行版。事实上,它根本不基于任何东西。它是一个不完整的参考系统,只是为了让 GNOME 桌面工作。它仅仅是一个可启动的虚拟机镜像,在 GNOME 进入任何发行版的仓库之前,为调试和测试功能而量身定做的。 + +在 GNOME 的博客中,有一篇提到了它: + +> GNOME OS 旨在通过提供一个用于开发、设计和用户测试的工作系统,来更好地促进 GNOME 的开发。 + +如果你好奇的话,你可以看看 GNOME 星球上的一篇 [博客文章][2] 来了解关于 GNOME OS 的更多信息。 + +### 如果它不是一个成熟的 Linux 发行版,那么它是用来干什么的? + +![][3] + +值得注意的是,每一次新的提交都可以创建一个新的 GNOME OS 镜像,所以它应该会使测试过程变得高效,并帮助你在开发周期的早期测试并发现问题。 + +不要忘了,设计者不再需要自己构建软件来测试 GNOME Shell 或任何其他核心模块。这为他们节省了时间和整个 GNOME 开发周期。 + +当然,不仅限于开发者和技术测试人员,它还可以让记者们拿到最新的和最棒的东西,来报道 GNOME 下一个版本或它是如何成型的。 + +媒体和 GNOME 团队也得到了一个很好的机会,借助于 GNOME OS,他们可以准备视频、图片两种形式的视觉资料来宣传此次发布。 + +### 如何安装 GNOME OS? + +要轻松安装 GNOME OS,你需要先安装 GNOME Boxes 应用程序。 + +#### 安装 GNOME Boxes + +Boxes 是一款简单的虚拟化软件,它不提供任何高级选项,但可以让你轻松安装操作系统镜像来快速测试。它是专门针对桌面终端用户的,所以使用起来也很方便。 + +要在任何 Linux 发行版上安装它,你可以利用 [Flathub][5] 的 [Flatpak][4] 包。如果你不知道 Flatpak,你可能需要阅读我们的《[在 Linux 中安装和使用 Flatpak][6]》指南。 + +你也可以在任何基于 Ubuntu 的发行版上直接在终端上输入以下内容进行安装: + +``` +sudo apt install gnome-boxes +``` + +一旦你安装了 Boxes,从这里安装 GNOME OS 就相当容易了。 + +#### 安装 GNOME OS + +安装好 Boxes 后,你需要启动程序。接下来,点击窗口左上角的 “+” 标志,然后点击 “操作系统下载”,如下图所示。 + +![][7] + +这个选项可以让你直接下载镜像文件,然后就可以继续安装它。 + +你所需要做的就是搜索 “GNOME”,然后你应该会找到可用的每夜构建版。这可以确保你正在尝试最新和最优秀的 GNOME 开发版本。 + +另外,你也可以前往 [GNOME OS 每夜构建网站][8] 下载系统镜像,然后在 Boxes 应用中选择 “运行系统镜像文件” 选择该 ISO,如上图截图所示,继续安装。 + +![][9] + +考虑到你没有单独下载镜像。当你点击后,应该会开始下载,并且会出现一个进度条。 + +![][10] + +完成后,如果需要,它会要求你自定义配置,让你创建虚拟机,如下图所示。 + +![][11] + +你可以根据你可用的系统资源来定制资源分配,但应该可以使用默认设置。 + +点击 “创建”,就会直接开始 GNOME OS 的安装。 + +![][12] + +选择“使用现有的版本”,然后继续。接下来,你必须选择磁盘(保持原样),然后同意擦除你所有的文件和应用程序(它不会删除本地计算机上的任何东西)。 + +![][13] + +现在,它将简单地重新格式化并安装它。然后就完成了。它会提示你重启,重启后,你会发现 GNOME OS 已经安装好了。 + +它会像其他 Linux 发行版一样简单地启动,并要求你设置一些东西,包括用户名和密码。然后,你就可以开始探索了。 + +如果你想知道它的样子,它基本上就是最新的 GNOME 桌面环境。在 GNOME 40 正式发布之前,我用 GNOME OS 做了一个 GNOME 40 的概述视频。 + +### 结束语 + +GNOME OS 绝对是对开发者、设计师和媒体有用的东西。它可以让你轻松地测试最新的 GNOME 开发版本,而无需投入大量的时间。 + +我可以很快地测试 [GNOME 40][14],就是因为这个。当然,你要记住,这并不是一个可以在物理设备上安装的完整功能的操作系统。他们有计划让它可以在物理机器上运行,但就目前而言,它只是为虚拟机量身定做的,尤其是使用 GNOME Boxes。 + +GNOME Boxes 并没有提供任何高级选项,所以设置和使用它变得相当容易。如果体验太慢的话,你可能要调整一下资源,但在我的情况下,总体来说是一个不错的体验。 + +你试过 GNOME OS 了吗?欢迎在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/gnome-os/ + +作者:[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://fedoraproject.org/wiki/Releases/Rawhide +[2]: https://blogs.gnome.org/alatiera/2020/10/07/what-is-gnome-os/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/GNOME-OS-distro-review.png?resize=800%2C450&ssl=1 +[4]: https://itsfoss.com/what-is-flatpak/ +[5]: https://flathub.org/apps/details/org.gnome.Boxes +[6]: https://itsfoss.com/flatpak-guide/ +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/gnome-os-search.jpg?resize=800%2C729&ssl=1 +[8]: https://os.gnome.org/ +[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/gnome-os-boxes.jpg?resize=800%2C694&ssl=1 +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/gnome-os-download.jpg?resize=798%2C360&ssl=1 +[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/gnome-boxes-vm-setup.png?resize=800%2C301&ssl=1 +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/gnome-nightly-install.jpg?resize=800%2C636&ssl=1 +[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/gnome-os-installation.jpg?resize=800%2C619&ssl=1 +[14]: https://news.itsfoss.com/gnome-40-release/ From ae142200fca6b21d9e3c66f023d0bf629ac3760f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 11 Apr 2021 10:34:58 +0800 Subject: [PATCH 634/818] PUB @wxy https://linux.cn/article-13287-1.html --- ...n -GNOME OS- is Not a Linux Distro for Everyone -Review.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md (99%) diff --git a/translated/tech/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md b/published/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md similarity index 99% rename from translated/tech/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md rename to published/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md index bc1e438b16..0e251d8829 100644 --- a/translated/tech/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md +++ b/published/20210411 GNOME-s Very Own -GNOME OS- is Not a Linux Distro for Everyone -Review.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13287-1.html) GNOME OS:一个并不是适合所有人的 Linux 发行版 ====== From 0daec50e9c07212042ada7e1d4fd3d7d1a235652 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Sun, 11 Apr 2021 20:32:15 +0800 Subject: [PATCH 635/818] Translating --- ...10330 Access Python package index JSON APIs with requests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210330 Access Python package index JSON APIs with requests.md b/sources/tech/20210330 Access Python package index JSON APIs with requests.md index 3150248d58..7f4a9f9df2 100644 --- a/sources/tech/20210330 Access Python package index JSON APIs with requests.md +++ b/sources/tech/20210330 Access Python package index JSON APIs with requests.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/3/python-package-index-json-apis-requests) [#]: author: (Ben Nuttall https://opensource.com/users/bennuttall) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (MjSeven) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 26438904800ceed409348843f23661e6b6bb494b Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 12 Apr 2021 05:02:54 +0800 Subject: [PATCH 636/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210411=20?= =?UTF-8?q?Why=20Crate.io=20has=20returned=20to=20its=20pure=20open=20sour?= =?UTF-8?q?ce=20roots?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210411 Why Crate.io has returned to its pure open source roots.md --- ... returned to its pure open source roots.md | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 sources/tech/20210411 Why Crate.io has returned to its pure open source roots.md diff --git a/sources/tech/20210411 Why Crate.io has returned to its pure open source roots.md b/sources/tech/20210411 Why Crate.io has returned to its pure open source roots.md new file mode 100644 index 0000000000..2de53527f4 --- /dev/null +++ b/sources/tech/20210411 Why Crate.io has returned to its pure open source roots.md @@ -0,0 +1,49 @@ +[#]: subject: (Why Crate.io has returned to its pure open source roots) +[#]: via: (https://opensource.com/article/21/4/crate-open-source) +[#]: author: (Bernd Dorn https://opensource.com/users/bernd-dorn) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Why Crate.io has returned to its pure open source roots +====== +CrateDB's renewed commitment to open source aligns with both our best +ideals and what's best for our business. +![Open source stars.][1] + +The headline benefits of open source are widely known and well-articulated. Open source technologies provide enterprise-level scalability, performance, security, and reliability. Trust is there, and it's deserved. But what's less celebrated, other than by die-hard open source adherents, are the inner workings of the everyday community contributions building those macro benefits at the atomic level. For those offering open source technologies, it is the community's constant user-driven testing and hardening that forges those technologies into robust and proven solutions. Those contributions don't show up on the balance sheet, but they can be absolutely formative to an enterprise's health and success. + +In 2013, I co-founded [Crate.io][2] with open source ideals and my belief in the power of the community. As a startup intent on bringing the simplicity and strength of open source to the realm of advanced SQL databases that could handle the growing volume of Internet of Things (IoT) and Industrial IoT data, we rooted our CrateDB database in 100% open source component technologies. And we were sure to play our role as active contributors to those technologies and nurtured our own community of CrateDB developers. + +In 2017, Crate began exploring an open core business model, and soon after, I took a few years away from the company. In 2019, Crate began to offer a CrateDB Free Edition with a strict three-node limit and stopped building and distributing packages for CrateDB Community Edition (the open source code could still be downloaded). This move focused the company more heavily on a paid open core enterprise edition that added some proprietary features. From a sales perspective, the idea was to spur community users to convert to paying customers. However, this strategy ended up being a fundamental misunderstanding of the user base. The result was a marked decline in user engagement and the strength of our valuable community while failing to convert much of anyone. + +When I returned to Crate towards the end of 2020 as CTO, I made it my priority to bring back a commitment to pure open source. This sparked a rich conversation between competing viewpoints within our organization. The key to winning over my more revenue-minded colleagues was to explain that community users are completely different in nature from our enterprise customers and offer our business a different kind of support. Furthermore, forcing them away does nothing positive. Our open source community user base contributes crucial influence and experience that improves our technologies very effectively. Their support is invaluable and irreplaceable. Without them, CrateDB isn't nearly as compelling or as enterprise-ready a product. + +Ultimately, it was our investors that weighed in and championed Crate's once and future commitment to pure open source. Our investors even helped us abandon considerations towards other licensing models such as the Business Source License by favoring the [Apache License 2.0][3] we now utilize, pressing for the fully open source permissions it offers. + +Our recent [4.5 release][4] of CrateDB completes this full circle to our open source roots. I couldn't be prouder to say that our business is rededicated to building our community and openly welcomes all contributors as we work hand-in-hand to push CrateDB toward its full potential as a distributed SQL database for machine data. + +I also need to mention the recent decision by [Elastic to discontinue its longstanding commitment to open source][5], as it offers a stark juxtaposition to ours. CrateDB has used open source Elasticsearch from the very beginning. But more than that, open source Elasticsearch was a formative inspiration to Crate's founders, especially me. Our drive to serve as contributing citizens in that community was born out of our work operating some of Europe's largest Elasticsearch deployments. That team and I later created Crate with Elasticsearch as our clearest example of why upholding open source ideals results in powerful technologies. + +Our renewed commitment to open source elegantly aligns with both our best ideals and what's best for our business. The activity of a robust and inclusive open source community is the vital pulse of our product. It's our hope to provide an example of what dedication to pure open source can truly accomplish. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/crate-open-source + +作者:[Bernd Dorn][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/bernd-dorn +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_520x292_opensourcestars.png?itok=hnrMETFh (Open source stars.) +[2]: https://crate.io/ +[3]: https://www.apache.org/licenses/LICENSE-2.0 +[4]: https://crate.io/products/cratedb/ +[5]: https://www.elastic.co/blog/licensing-change From ec8c4bde4e31a23ab082f1c55389fa14fd100870 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 12 Apr 2021 08:40:16 +0800 Subject: [PATCH 637/818] translated --- ...tifully in Linux Terminal With CPUFetch.md | 105 ------------------ ...tifully in Linux Terminal With CPUFetch.md | 105 ++++++++++++++++++ 2 files changed, 105 insertions(+), 105 deletions(-) delete mode 100644 sources/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md create mode 100644 translated/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md diff --git a/sources/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md b/sources/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md deleted file mode 100644 index 1c151112e0..0000000000 --- a/sources/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md +++ /dev/null @@ -1,105 +0,0 @@ -[#]: subject: (Show CPU Details Beautifully in Linux Terminal With CPUFetch) -[#]: via: (https://itsfoss.com/cpufetch/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Show CPU Details Beautifully in Linux Terminal With CPUFetch -====== - -There are [ways to check CPU information on Linux][1]. Probably the most common is the `lscpu` command that gives you plenty of information about all the CPU cores on your system. - -![lscpu command output][2] - -You may find CPU information there without installing any additional packages. That works of course. However, I recently stumbled upon a new tool that displays the CPU details in Linux in a beautiful manner. - -The ASCII art of the processor manufacturer makes it look cool. - -![][3] - -This looks beautiful, isn’t it? This is similar to [Neoftech or Screenfetch tools that show the system information in beautiful ASCII art in Linux][4]. Similar to those tools, you can use CPUFetch if you are showcasing your desktop screenshot. - -The tool outputs the ASCII art of the processor manufacturer, its name, microarchitecture, frequency, cores, threads, peak performance, cache sizes, [Advanced Vector Extensions][5], and more. - -You can use custom colors apart from a few themes it provides. This gives you additional degree of freedom when you are ricing your desktop and want to color match all the elements on your Linux setup. - -### Installing CPUFetch on Linux - -Unfortunately, CPUFetch is rather new, and it is not included in your distribution’s repository. It doesn’t even provide ready to use DEB/RPM binaries, PPAs, Snap or Flatpak packages. - -Arch Linux users can [find][6] it in [AUR][7] but for others, the only way forward here is to [build from source code][8]. - -Don’t worry. Installation as well as removal is not that complicated. Let me show you the steps. - -I am using Ubuntu and you would [need to install Git on Ubuntu first][9]. Some other distributions come preinstalled with it, if not use your distribution’s package manager to install it. - -Now, clone the Git repository wherever you want. Home directory is fine as well. - -``` -git clone https://github.com/Dr-Noob/cpufetch -``` - -Switch to the directory you just cloned: - -``` -cd cpufetch -``` - -You’ll see a make file here. Use it to compile the code. - -``` -make -``` - -![CPUFetch Installation][10] - -Now you’ll see a new executable file named `cpufetch`. You run this executable to display the CPU information in the terminal. - -``` -./cpufetch -``` - -This is what it showed for my system. AMD logo looks a lot cooler in ASCII, don’t you think? - -![][11] - -How do you remove Cpufetch? It’s pretty simple. When you compiled the code, it produced just one file and that too in the same directory as the rest of the code. - -So, to remove CPUFetch from your system, simply remove its entire folder. You know how to [remove a directory in Linux terminal][12], don’t you? Come out of the cpufetch directory and use the rm command: - -``` -rm -rf cpufetch -``` - -That was simple, thankfully because removing software installed from source code could be really tricky at times. - -Back to cpufetch. I think it’s a utility for those who like to show off their desktop screenshots in various Linux group. Since we have Neofetch for the distribution and CPUFetch for CPU, I wonder if we could have a GPU fetch with ASCII art of Nvidia as well :) - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/cpufetch/ - -作者:[Abhishek Prakash][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/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://linuxhandbook.com/check-cpu-info-linux/ -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/lscpu-command-output.png?resize=800%2C415&ssl=1 -[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/cpufetch-1.png?resize=800%2C307&ssl=1 -[4]: https://itsfoss.com/display-linux-logo-in-ascii/ -[5]: https://software.intel.com/content/www/us/en/develop/articles/introduction-to-intel-advanced-vector-extensions.html -[6]: https://aur.archlinux.org/packages/cpufetch-git -[7]: https://itsfoss.com/aur-arch-linux/ -[8]: https://itsfoss.com/install-software-from-source-code/ -[9]: https://itsfoss.com/install-git-ubuntu/ -[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/cpufetch-installation.png?resize=800%2C410&ssl=1 -[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/cpufetch-for-itsfoss.png?resize=800%2C335&ssl=1 -[12]: https://linuxhandbook.com/remove-files-directories/ diff --git a/translated/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md b/translated/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md new file mode 100644 index 0000000000..c6ca93d622 --- /dev/null +++ b/translated/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md @@ -0,0 +1,105 @@ +[#]: subject: (Show CPU Details Beautifully in Linux Terminal With CPUFetch) +[#]: via: (https://itsfoss.com/cpufetch/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +使用 CPUFetch 在 Linux 终端中漂亮地显示 CPU 细节 +====== + +Linux 上有[检查 CPU 信息的方法][1]。最常见的可能是 `lscpu` 命令,它可以提供大量的系统上所有 CPU 核心的信息。 + +![lscpu command output][2] + +你可以在那里找到 CPU 信息,而无需安装任何额外的包。当然这是可行的。然而,我最近偶然发现了一个新的工具,它以一种漂亮的方式显示 Linux 中的 CPU 细节。 + +处理器制造商的 ASCII 艺术使它看起来很酷。 + +![][3] + +这看起来很美,不是吗?这类似于 [Neoftech 或者 Screenfetch,在 Linux 中用漂亮的 ASCII 艺术来展示系统信息][4]。与这些工具类似,如果你要展示你的桌面截图,可以使用 CPUFetch。 + +该工具可以输出处理器制造商的 ASCII 艺术,它的名称、微架构、频率、核心、线程、峰值性能、缓存大小、[高级向量扩展][5]等等。 + +除了它提供的一些主题外,你还可以使用自定义颜色。当你在整理桌面,并希望对 Linux 设置中的所有元素进行颜色匹配时,这给了你更多的自由度。 + +### 在 Linux 上安装 CPUFetch + +不幸的是,CPUFetch 是一个相当新的软件,而且它并不包含在你的发行版的软件库中,甚至没有提供现成的 DEB/RPM 二进制文件、PPA、Snap 或 Flatpak 包。 + +Arch Linux 用户可以在 [AUR][7] 中[找到][6]它,但对于其他人来说,唯一的出路是[从源代码构建][8]。 + +不要担心。安装以及删除并不是那么复杂。让我来告诉你步骤。 + +我使用的是 Ubuntu,你会[需要先在 Ubuntu 上安装 Git][9]。一些发行版会预装 Git,如果没有,请使用你的发行版的包管理器来安装。 + +现在,把 Git 仓库克隆到你想要的地方。家目录也可以。 + +``` +git clone https://github.com/Dr-Noob/cpufetch +``` + +切换到你刚才克隆的目录: + +``` +cd cpufetch +``` + +你会在这里看到一个 make 文件。用它来编译代码。 + +``` +make +``` + +![CPUFetch Installation][10] + +现在你会看到一个新的可执行文件,名为 `cpufetch`。你运行这个可执行文件来显示终端的 CPU 信息。 + +``` +./cpufetch +``` + +这是我系统的显示。AMD 的 logo 用 ASCII 码看起来更酷,你不觉得吗? + +![][11] + +如何删除 Cpufetch?这很简单。当你编译代码时,它只产生了一个文件,而且也和其他代码在同一个目录下。 + +所以,要想从系统中删除 CPUFetch,只需删除它的整个文件夹即可。你知道[在 Linux 终端中删除一个目录][12]的方法吧?从 cpufetch 目录中出来,然后使用 rm 命令。 + +``` +rm -rf cpufetch +``` + +这很简单,值得庆幸的是,因为从源代码中删除安装的软件有时真的很棘手。 + +说回 cpufetch。我想这是一个实用工具,适合那些喜欢在各种 Linux 群里炫耀自己桌面截图的人。既然发行版有了 Neofetch,CPU 有了 CPUFetch,不知道能不能也来个 Nvidia ASCII 艺术的 GPUfetch。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/cpufetch/ + +作者:[Abhishek Prakash][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://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://linuxhandbook.com/check-cpu-info-linux/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/lscpu-command-output.png?resize=800%2C415&ssl=1 +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/cpufetch-1.png?resize=800%2C307&ssl=1 +[4]: https://itsfoss.com/display-linux-logo-in-ascii/ +[5]: https://software.intel.com/content/www/us/en/develop/articles/introduction-to-intel-advanced-vector-extensions.html +[6]: https://aur.archlinux.org/packages/cpufetch-git +[7]: https://itsfoss.com/aur-arch-linux/ +[8]: https://itsfoss.com/install-software-from-source-code/ +[9]: https://itsfoss.com/install-git-ubuntu/ +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/cpufetch-installation.png?resize=800%2C410&ssl=1 +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/cpufetch-for-itsfoss.png?resize=800%2C335&ssl=1 +[12]: https://linuxhandbook.com/remove-files-directories/ From 1e70c9b4c3652d1df6f59576bd77eb16266b112c Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 12 Apr 2021 08:48:23 +0800 Subject: [PATCH 638/818] translating --- .../20210410 How to Install Steam on Fedora -Beginner-s Tip.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md b/sources/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md index 3315f1c000..7a36c9f9db 100644 --- a/sources/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md +++ b/sources/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md @@ -2,7 +2,7 @@ [#]: via: (https://itsfoss.com/install-steam-fedora/) [#]: author: (John Paul https://itsfoss.com/author/john/) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 53609a52ccd1d3c93a05e24c3497a4cc762adc28 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 12 Apr 2021 09:38:40 +0800 Subject: [PATCH 639/818] PRF @geekpi --- ...tifully in Linux Terminal With CPUFetch.md | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/translated/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md b/translated/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md index c6ca93d622..6a9b533ba9 100644 --- a/translated/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md +++ b/translated/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md @@ -3,14 +3,16 @@ [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) 使用 CPUFetch 在 Linux 终端中漂亮地显示 CPU 细节 ====== -Linux 上有[检查 CPU 信息的方法][1]。最常见的可能是 `lscpu` 命令,它可以提供大量的系统上所有 CPU 核心的信息。 +![](https://img.linux.net.cn/data/attachment/album/202104/12/093818iie270mi8am6ttk7.jpg) + +Linux 上有 [检查 CPU 信息的方法][1]。最常见的可能是 `lscpu` 命令,它可以提供大量的系统上所有 CPU 核心的信息。 ![lscpu command output][2] @@ -22,19 +24,19 @@ Linux 上有[检查 CPU 信息的方法][1]。最常见的可能是 `lscpu` 命 这看起来很美,不是吗?这类似于 [Neoftech 或者 Screenfetch,在 Linux 中用漂亮的 ASCII 艺术来展示系统信息][4]。与这些工具类似,如果你要展示你的桌面截图,可以使用 CPUFetch。 -该工具可以输出处理器制造商的 ASCII 艺术,它的名称、微架构、频率、核心、线程、峰值性能、缓存大小、[高级向量扩展][5]等等。 +该工具可以输出处理器制造商的 ASCII 艺术,它的名称、微架构、频率、核心、线程、峰值性能、缓存大小、[高级向量扩展][5] 等等。 -除了它提供的一些主题外,你还可以使用自定义颜色。当你在整理桌面,并希望对 Linux 设置中的所有元素进行颜色匹配时,这给了你更多的自由度。 +除了它提供的一些主题外,你还可以使用自定义颜色。当你在整理桌面,并希望对 Linux 环境中的所有元素进行颜色匹配时,这给了你更多的自由度。 ### 在 Linux 上安装 CPUFetch 不幸的是,CPUFetch 是一个相当新的软件,而且它并不包含在你的发行版的软件库中,甚至没有提供现成的 DEB/RPM 二进制文件、PPA、Snap 或 Flatpak 包。 -Arch Linux 用户可以在 [AUR][7] 中[找到][6]它,但对于其他人来说,唯一的出路是[从源代码构建][8]。 +Arch Linux 用户可以在 [AUR][7] 中 [找到][6] 它,但对于其他人来说,唯一的出路是 [从源代码构建][8]。 不要担心。安装以及删除并不是那么复杂。让我来告诉你步骤。 -我使用的是 Ubuntu,你会[需要先在 Ubuntu 上安装 Git][9]。一些发行版会预装 Git,如果没有,请使用你的发行版的包管理器来安装。 +我使用的是 Ubuntu,你会 [需要先在 Ubuntu 上安装 Git][9]。一些发行版会预装 Git,如果没有,请使用你的发行版的包管理器来安装。 现在,把 Git 仓库克隆到你想要的地方。家目录也可以。 @@ -48,7 +50,7 @@ git clone https://github.com/Dr-Noob/cpufetch cd cpufetch ``` -你会在这里看到一个 make 文件。用它来编译代码。 +你会在这里看到一个 Makefile 文件。用它来编译代码。 ``` make @@ -62,13 +64,13 @@ make ./cpufetch ``` -这是我系统的显示。AMD 的 logo 用 ASCII 码看起来更酷,你不觉得吗? +这是我系统的显示。AMD 的徽标用 ASCII 码看起来更酷,你不觉得吗? ![][11] -如何删除 Cpufetch?这很简单。当你编译代码时,它只产生了一个文件,而且也和其他代码在同一个目录下。 +如何删除 CPUFetch?这很简单。当你编译代码时,它只产生了一个文件,而且也和其他代码在同一个目录下。 -所以,要想从系统中删除 CPUFetch,只需删除它的整个文件夹即可。你知道[在 Linux 终端中删除一个目录][12]的方法吧?从 cpufetch 目录中出来,然后使用 rm 命令。 +所以,要想从系统中删除 CPUFetch,只需删除它的整个文件夹即可。你知道 [在 Linux 终端中删除一个目录][12] 的方法吧?从 `cpufetch` 目录中出来,然后使用 `rm` 命令。 ``` rm -rf cpufetch @@ -76,7 +78,7 @@ rm -rf cpufetch 这很简单,值得庆幸的是,因为从源代码中删除安装的软件有时真的很棘手。 -说回 cpufetch。我想这是一个实用工具,适合那些喜欢在各种 Linux 群里炫耀自己桌面截图的人。既然发行版有了 Neofetch,CPU 有了 CPUFetch,不知道能不能也来个 Nvidia ASCII 艺术的 GPUfetch。 +说回 CPUFetch。我想这是一个实用工具,适合那些喜欢在各种 Linux 群里炫耀自己桌面截图的人。既然发行版有了 Neofetch,CPU 有了 CPUFetch,不知道能不能也来个 Nvidia ASCII 艺术的 GPUfetch? -------------------------------------------------------------------------------- @@ -85,7 +87,7 @@ via: https://itsfoss.com/cpufetch/ 作者:[Abhishek Prakash][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/) 荣誉推出 From f0dfecbbd3ff8d591662f5f60799d811836c7f8d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 12 Apr 2021 09:41:20 +0800 Subject: [PATCH 640/818] PUB @geekpi https://linux.cn/article-13289-1.html --- ...CPU Details Beautifully in Linux Terminal With CPUFetch.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md (98%) diff --git a/translated/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md b/published/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md similarity index 98% rename from translated/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md rename to published/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md index 6a9b533ba9..e366481a6f 100644 --- a/translated/tech/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md +++ b/published/20210407 Show CPU Details Beautifully in Linux Terminal With CPUFetch.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13289-1.html) 使用 CPUFetch 在 Linux 终端中漂亮地显示 CPU 细节 ====== From 86b860fa0474bf4863577a8f5031174a2ba77674 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 12 Apr 2021 09:56:20 +0800 Subject: [PATCH 641/818] APL --- sources/tech/20210406 Teach anyone how to code with Hedy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210406 Teach anyone how to code with Hedy.md b/sources/tech/20210406 Teach anyone how to code with Hedy.md index 1e2122fc50..5b352ad67a 100644 --- a/sources/tech/20210406 Teach anyone how to code with Hedy.md +++ b/sources/tech/20210406 Teach anyone how to code with Hedy.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/4/hedy-teach-code) [#]: author: (Joshua Allen Holm https://opensource.com/users/holmja) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From a349e3641f4fbb4f13e43627fba41d1f5f933029 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 12 Apr 2021 11:12:42 +0800 Subject: [PATCH 642/818] TSL&PRF --- ...0406 Teach anyone how to code with Hedy.md | 82 ------------------- ...0406 Teach anyone how to code with Hedy.md | 80 ++++++++++++++++++ 2 files changed, 80 insertions(+), 82 deletions(-) delete mode 100644 sources/tech/20210406 Teach anyone how to code with Hedy.md create mode 100644 translated/tech/20210406 Teach anyone how to code with Hedy.md diff --git a/sources/tech/20210406 Teach anyone how to code with Hedy.md b/sources/tech/20210406 Teach anyone how to code with Hedy.md deleted file mode 100644 index 5b352ad67a..0000000000 --- a/sources/tech/20210406 Teach anyone how to code with Hedy.md +++ /dev/null @@ -1,82 +0,0 @@ -[#]: subject: (Teach anyone how to code with Hedy) -[#]: via: (https://opensource.com/article/21/4/hedy-teach-code) -[#]: author: (Joshua Allen Holm https://opensource.com/users/holmja) -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Teach anyone how to code with Hedy -====== -Hedy is a new programming language designed specifically for teaching -people to code. -![Teacher or learner?][1] - -Learning to code involves learning both the programming logic and the syntax of a specific programming language. When I took my first programming class in college, the language taught was C++. The first code example, the basic "Hello World" program, looked like the example below. - - -``` -#include <iostream> - -int main() { -    std::cout << "Hello World!"; -    return 0; -} -``` - -The instructor would not explain most of the code until several lessons later. The expectation was that we would just type in the code and eventually learn why things were required and how they worked. - -The complex syntax of C++ (and other, similar languages) is why Python is often suggested as an easier language for teaching programming. Here is the same example in Python: - - -``` -`print("Hello World!")` -``` - -While the basic "Hello World" example in Python is much simpler, it still has complex and precise syntax rules. The `print` function requires parentheses and quotes around the string. This can still confuse those who have no experience with programming. Python has fewer "I'll explain later" syntax issues than C++, but it still has them. - -[Hedy][2], a new language designed specifically for teaching coding, addresses the issue of syntax complexity by building multiple levels of complexity into the language. Instead of providing the full features of the language right away, Hedy takes a gradual approach and slowly becomes more complex as students work through Hedy's levels. As the levels progress, the language gains new features and eventually becomes more Python-like. There are currently seven levels available, but more are planned. - -At level 1, a Hedy program cannot do anything except print a statement (which does not require quotes or parentheses), ask a question, and echo back an answer. Level 1 has no variables, no loops, and minimal structure. Echo works almost like a variable but only for the last user input. This allows students to become comfortable with basic concepts without having to learn everything all at once. - -This is a level 1 Hedy "Hello World" program: - - -``` -`print Hello World` -``` - -Level 2 introduces variables, but because the `print` function does not use quotes, there can be some interesting outcomes. If the variable used to store a person's name is `name`, it is impossible to print the output "Your name is [name]" because both the first use of name, which is intended to be a string, and the second use, which is a variable, are both interpreted as a variable. If `name` is set to `John Doe`, the output of `print Your name is name.` would be "Your John Doe is John Doe." As odd as this sounds, it is a good way for to introduce the concept of variables, which just happens to be a feature added in Level 3. - -Level 3 requires quotation marks around strings, which makes variables function like they do in Python. It is now possible to output strings combined with variables to make complex statements without worrying about conflicts between variable names and words in a string. This level does away with the `echo` function, which does seem like something that might frustrate some learners. They should be using variables, which is better code, but it could be confusing if an `ask`/`echo` block of code becomes invalid syntax. - -Level 4 adds basic `if`/`else` functionality. Students can move from simple ask/answer code to complex interactions. For example, a prompt that asks, "What is your favorite color?" can accept different replies depending on what the user enters. If they enter green, the reply can be "Green! That's also my favorite color." If they enter anything else, the reply could be different. The `if`/`else` block is a basic programming concept, which Hedy introduces without having to worry about complex syntax or overly precise formatting. - -Level 5 has a `repeat` function, which adds a basic loop to the features available. This loop can only repeat the same command multiple times, so it is not as powerful as loops in Python, but it lets the students get used to the general concept of repeating commands. It's one more programming concept introduced without bogging things down with needless complexity. The students can grasp the basics of the concept before moving on to more powerful, complex versions of the same thing. - -At level 6, Hedy can now do basic math calculations. Addition, subtraction, multiplication, and division are supported, but more advanced math features are not. It is not possible to use exponents, modulo, or anything else that Python and other languages handle. As yet, no higher level of Hedy adds more complex math. - -Level 7 brings in Python-style indenting, which means `repeat` can work with multiple lines of code. Students worked with code line by line up to this point, but now they can work with blocks of code. This Hedy level still falls way short of what a non-teaching programming language can do, but it can teach students a lot. - -The easiest way to get started with Hedy is to access the [lessons][3] on the Hedy website, which is currently available in Dutch, English, French, German, Portuguese, and Spanish. This makes the learning process accessible to anyone with a web browser. It is also possible to download Hedy from [GitHub][4] and run the interpreter from the command line or run a local copy of the Hedy website with its interactive lessons. The web-based version is more approachable, but both the web and command-line versions support running Hedy programs targeted at its various levels of complexity. - -Hedy will never compete with Python, C++, or other languages as the language of choice for coding for real-world projects, but it is an excellent way to teach coding. The programs students write as part of the learning process are real and possibly even complex. Hedy can foster learning and creativity without confusing students with too much information too soon in the learning process. Like math classes, which start with counting, adding, etc., long before getting to calculus (a process that takes years), programming does not have to start with "I'll explain later" for programming language syntax issues that must be followed precisely to produce even the most basic program in the language. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/hedy-teach-code - -作者:[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/5538035618_4e19c9787c_o.png?itok=naiD1z1S (Teacher or learner?) -[2]: https://www.hedycode.com/ -[3]: https://www.hedycode.com/hedy?lang=en -[4]: https://github.com/felienne/hedy diff --git a/translated/tech/20210406 Teach anyone how to code with Hedy.md b/translated/tech/20210406 Teach anyone how to code with Hedy.md new file mode 100644 index 0000000000..656fa1d30a --- /dev/null +++ b/translated/tech/20210406 Teach anyone how to code with Hedy.md @@ -0,0 +1,80 @@ +[#]: subject: (Teach anyone how to code with Hedy) +[#]: via: (https://opensource.com/article/21/4/hedy-teach-code) +[#]: author: (Joshua Allen Holm https://opensource.com/users/holmja) +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) + +用 Hedy 教人编程 +====== + +> Hedy 是一种专门为教人编程而设计的新型编程语言。 + +!["教师还是学习者?"][1] + +学习编程既要学习编程逻辑,又要学习特定编程语言的语法。我在大学上第一堂编程课的时候,教的语言是 C++。第一个代码例子是基本的 “Hello World” 程序,就像下面的例子。 + +``` +#include + +int main() { + std::cout << "Hello World!"; + return 0; +} +``` + +老师直到几节课后才会解释大部分的代码。我们的期望是,我们只需输入代码,并最终了解为什么需要这些东西以及它们如何工作。 + +C++(以及其他类似的语言)的复杂语法是为什么 Python 经常被建议作为一种更容易的编程教学语言。下面是 Python 中的同一个例子: + +``` +print("Hello World!") +``` + +虽然 Python 中的 “Hello World” 基础例子要简单得多,但它仍然有复杂而精确的语法规则。`print` 函数需要在字符串周围加括号和引号。这对于没有编程经验的人来说,还是会感到困惑。Python 比 C++ 少了 “我以后再解释” 的语法问题,但还是有一些。 + +[Hedy][2] 是一种专门为编码教学而设计的新语言,它通过在语言中将复杂性分成多个关卡来解决语法复杂性的问题。Hedy 没有马上提供语言的全部功能,而是采取循序渐进的方式,随着学生在 Hedy 的学习的通关,慢慢变得更加复杂。随着关卡的进展,该语言获得了新的功能,最终变得更像 Python。目前有七个关卡,但更多的关卡正在计划中。 + +在第 1 关,Hedy 程序除了打印(`print`)一条语句(不需要引号或括号),提出(`ask`)一个问题,并回传(`echo`)一个答案外,不能做任何事情。第 1 关没有变量,没有循环,结构极精简。回传的工作原理几乎和变量一样,但只针对用户的最后一个输入。这可以让学生对基本概念感到舒适,而不必一下子学习所有的东西。 + +这是一个第 1 关的 Hedy “Hello World” 程序: + +``` +print Hello World +``` + +第 2 关引入了变量,但由于 `print` 函数没有使用引号,可能会出现一些有趣的结果。如果用来存储一个人的名字的变量是 `name`,那么就不可能打印输出 `Your name is [name]`,因为 `name` 的第一次使用(本意是字符串)和第二次使用(是变量)都被解释为变量。如果将 `name` 设置为(`is`) `John Doe`,那么 `print Your name is name.` 的输出就会是 `Your John Doe is John Doe`。虽然这听起来很奇怪,但这是一个引入变量概念的好方法,这恰好是第 3 关中增加的一个功能。 + +第 3 关要求在字符串周围加引号,这使得变量的功能就像在 Python 中一样。现在可以输出与变量相结合的字符串,做出复杂的语句,而不用担心变量名和字符串中的单词之间的冲突。这个级别取消了 “回传”(`echo`)函数,这看起来确实是一个可能会让一些学习者感到沮丧的东西。他们应该使用变量,这是更好的代码,但如果一个 `ask`/`echo` 代码块变成无效语法,可能会让人感到困惑。 + +第 4 关增加了基本的 `if`/`else` 功能。学生可以从简单的问/答代码转向复杂的交互。例如,一个问“你最喜欢的颜色是什么?”的提示可以根据用户输入的内容接受不同的回复。如果他们输入绿色,回答可以是“绿色!这也是我最喜欢的颜色。”如果他们输入其他的东西,回复可以是不同的。`if`/`else` 块是一个基本的编程概念,Hedy 引入了这个概念,而不必担心复杂的语法或过于精确的格式。 + +第 5 关有一个 `repeat` 函数,在现有的功能上增加了一个基本的循环。这个循环只能多次重复同一个命令,所以它没有 Python 中的循环那么强大,但它让学生习惯了重复命令的一般概念。这是多介绍了一个编程概念,而不会用无谓的复杂来拖累。学生们可以先掌握概念的基础知识,然后再继续学习同一事物的更强大、更复杂的版本。 + +在第 6 关,Hedy 现在可以进行基本的数学计算。加法、减法、乘法和除法都支持,但更高级的数学功能不支持。不能使用指数、模数或其他任何 Python 和其他语言能处理的东西。目前,Hedy 还没有更高关卡的产品增加更复杂的数学功能。 + +第 7 关引入了 Python 风格的缩进,这意味着 `repeat` 可以处理多行代码。学生在这之前都是逐行处理代码,但现在他们可以处理代码块。这个 Hedy 关卡与非教学型编程语言能做的事情相比还是有很大的差距,但它可以教会学生很多东西。 + +开始学习 Hedy 最简单的方法是访问 Hedy 网站上的 [课程][3],目前有荷兰语、英语、法语、德语、葡萄牙语和西班牙语。这样一来,任何有网页浏览器的人都可以进入学习过程。也可以从 [GitHub][4] 下载 Hedy,并从命令行运行解释器,或者运行 Hedy 网站的本地副本及其交互式课程。基于网页的版本更容易使用,但网页版本和命令行版本都支持运行针对不同复杂程度的 Hedy 程序。 + +Hedy 永远不会与 Python、C++ 或其他语言竞争,成为现实世界项目编码的首选语言,但它是编码教学的绝佳方式。作为学习过程的一部分,学生编写的程序是真实的,甚至可能是复杂的。Hedy 可以促进学生的学习和创造力,而不会让学生在学习过程中过早地被过多的信息所迷惑。就像数学课一样,在进入微积分之前很久要从学习计数、相加等开始(这个过程需要数年时间),编程也不必一开始就对编程语言的语法问题“我稍后再解释”、精确地遵循这些语法问题,才能产生哪怕是最基本的语言程序。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/hedy-teach-code + +作者:[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/5538035618_4e19c9787c_o.png?itok=naiD1z1S (Teacher or learner?) +[2]: https://www.hedycode.com/ +[3]: https://www.hedycode.com/hedy?lang=en +[4]: https://github.com/felienne/hedy From 8590152e899269ffcf1cc6f3da52f74a4d2ee9fd Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 12 Apr 2021 11:19:39 +0800 Subject: [PATCH 643/818] PUB @wxy https://linux.cn/article-13290-1.html --- .../20210406 Teach anyone how to code with Hedy.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20210406 Teach anyone how to code with Hedy.md (97%) diff --git a/translated/tech/20210406 Teach anyone how to code with Hedy.md b/published/20210406 Teach anyone how to code with Hedy.md similarity index 97% rename from translated/tech/20210406 Teach anyone how to code with Hedy.md rename to published/20210406 Teach anyone how to code with Hedy.md index 656fa1d30a..68b0c45815 100644 --- a/translated/tech/20210406 Teach anyone how to code with Hedy.md +++ b/published/20210406 Teach anyone how to code with Hedy.md @@ -4,15 +4,15 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13290-1.html) 用 Hedy 教人编程 ====== > Hedy 是一种专门为教人编程而设计的新型编程语言。 -!["教师还是学习者?"][1] +![](https://img.linux.net.cn/data/attachment/album/202104/12/111814w62da2sannsd2q76.jpg) 学习编程既要学习编程逻辑,又要学习特定编程语言的语法。我在大学上第一堂编程课的时候,教的语言是 C++。第一个代码例子是基本的 “Hello World” 程序,就像下面的例子。 From c7b858144e0d94efa4b89f534c80d12df7078aba Mon Sep 17 00:00:00 2001 From: tt67wq Date: Mon, 12 Apr 2021 10:14:41 +0800 Subject: [PATCH 644/818] translating by tt67wq --- ...01209 Program a simple game with Elixir.md | 141 ------------------ ...01209 Program a simple game with Elixir.md | 137 +++++++++++++++++ 2 files changed, 137 insertions(+), 141 deletions(-) delete mode 100644 sources/tech/20201209 Program a simple game with Elixir.md create mode 100644 translated/tech/20201209 Program a simple game with Elixir.md diff --git a/sources/tech/20201209 Program a simple game with Elixir.md b/sources/tech/20201209 Program a simple game with Elixir.md deleted file mode 100644 index 8304970ff0..0000000000 --- a/sources/tech/20201209 Program a simple game with Elixir.md +++ /dev/null @@ -1,141 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Program a simple game with Elixir) -[#]: via: (https://opensource.com/article/20/12/elixir) -[#]: author: (Moshe Zadka https://opensource.com/users/moshez) - -Program a simple game with Elixir -====== -Learn Elixir by programming a "guess the number" game and comparing the -language against ones you know. -![A die with rainbow color background][1] - -To you learn a new programming language, it's good to focus on the things most programming languages have in common: - - * Variables - * Expressions - * Statements - - - -These concepts are the basis of most programming languages. Because of these similarities, once you know one programming language, you can start figuring another one out by recognizing its differences. - -Another good tool for learning a new language is starting with a standard program. This allows you to focus on the language, not the program's logic. We're doing that in this article series using a "guess the number" program, in which the computer picks a number between one and 100 and asks you to guess it. The program loops until you guess the number correctly. - -The "guess the number" program exercises several concepts in programming languages: - - * Variables - * Input - * Output - * Conditional evaluation - * Loops - - - -It's a great practical experiment to learn a new programming language. - -### Guess the number in Elixir - -The [Elixir][2] programming language is a dynamically typed functional language designed for building stable and maintainable applications. It runs on top of the same virtual machine as [Erlang][3] and shares many of its strengths—but with slightly easier syntax. - -You can explore Elixir by writing a version of the "guess the number" game. - -Here is my implementation: - - -``` -defmodule Guess do -  def guess() do -     random = Enum.random(1..100) -     IO.puts "Guess a number between 1 and 100" -     Guess.guess_loop(random) -  end -  def guess_loop(num) do -    data = IO.read(:stdio, :line) -    {guess, _rest} = Integer.parse(data) -    cond do -      guess < num -> -        IO.puts "Too low!" -        guess_loop(num) -      guess > num -> -        IO.puts "Too high!" -        guess_loop(num) -      true -> -        IO.puts "That's right!" -    end -  end -end - -Guess.guess() -``` - -To assign a value to a variable, list the variable's name followed by the `=` sign. For example, the statement `random = 0` assigns a zero value to the `random` variable. - -The script starts by defining a **module**. In Elixir, only modules can have named functions in them. - -The next line defines the function that will serve as the entry point, `guess()`, which: - - * Calls the `Enum.random()` function to get a random integer - * Prints the game prompt - * Calls the function that will serve as the loop - - - -The rest of the game logic is implemented in the `guess_loop()` function. - -The `guess_loop()` function uses [tail recursion][4] to loop. There are several ways to do looping in Elixir, but using tail recursion is a common one. The last thing `guess_loop()` does is call _itself_. - -The first line in `guess_loop()` reads the input from the user. The next line uses `parse()` to convert the input to an integer. - -The `cond` statement is Elixir's version of a multi-branch statement. Unlike `if/elif` or `if/elsif` in other languages, Elixir does not treat the first nor the last branch in a different way. - -This `cond` statement has a three-way branch: The guess can be smaller, bigger, or equal to the random number. The first two options output the inequality's direction and then tail-call `guess_loop()`, looping back to the beginning. The last option outputs `That's right`, and the function finishes. - -### Sample output - -Now that you've written your Elixir program, you can run it to play the "guess the number" game. Every time you run the program, Elixir will pick a different random number, and you can guess until you find the correct number: - - -``` -$ elixir guess.exs -Guess a number between 1 and 100 -50 -Too high -30 -Too high -20 -Too high -10 -Too low -15 -Too high -13 -Too low -14 -That's right! -``` - -This "guess the number" game is a great introductory program for learning a new programming language because it exercises several common programming concepts in a pretty straightforward way. By implementing this simple game in different programming languages, you can demonstrate some core concepts of the languages and compare their details. - -Do you have a favorite programming language? How would you write the "guess the number" game in it? Follow this article series to see examples of other programming languages that might interest you. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/12/elixir - -作者:[Moshe Zadka][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/moshez -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/dice_tabletop_board_gaming_game.jpg?itok=y93eW7HN (A die with rainbow color background) -[2]: https://elixir-lang.org/ -[3]: https://www.erlang.org/ -[4]: https://en.wikipedia.org/wiki/Tail_call diff --git a/translated/tech/20201209 Program a simple game with Elixir.md b/translated/tech/20201209 Program a simple game with Elixir.md new file mode 100644 index 0000000000..3583e77763 --- /dev/null +++ b/translated/tech/20201209 Program a simple game with Elixir.md @@ -0,0 +1,137 @@ +[#]: collector: (lujun9972) +[#]: translator: (tt67wq) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Program a simple game with Elixir) +[#]: via: (https://opensource.com/article/20/12/elixir) +[#]: author: (Moshe Zadka https://opensource.com/users/moshez) + +使用 Elixir 语言编写一个小游戏 +====== +通过编写"猜数字"游戏来学习 Elixir 编程语言并将它与一个你熟知的语言做对比。 + +![A die with rainbow color background][1] + +为了更好的学习一门新的编程语言,最好的方法是去关注主流语言的一些共有特征: + + * 变量 + * 表达式 + * 声明 + + +这些概念是大多数编程语言的基础。因为这些相似性,只要你通晓了一门编程语言,你可以通过对比差异来熟知另一门编程语言。 + +另外一个学习新编程语言的好方法是开始编写一个简单标准的程序。它可以让你集中精力在语言上而非程序的逻辑本身。在这个系列的文章中,我们使用"猜数字"程序来实现,计算机会选择一个介于 1 到 100 之间的数字,并要求你来猜测它。程序会循环执行,直到您正确猜出该数字为止。 + +"猜数字"这个小程序使用了编程语言的以下概念: + + * 变量 + * 输入 + * 输出 + * 条件判断 + * 循环 + + +这是一个学习新编程语言的绝佳实践。 + +### 猜数字的 Elixir 实现 + +[Elixir][2] 是一门被设计用于构建稳定可维护应用的动态类型函数式编程语言。它与 [Erlang][3] 运行于同一虚拟机之上,吸纳了 Erlang 的众多长处的同时拥有更加轻便的语法。 + +你可以编写一个 Elixir 版本的"猜数字"游戏来体验这门语言。 + +这是我的实现方法: + + +``` +defmodule Guess do +  def guess() do +     random = Enum.random(1..100) +     IO.puts "Guess a number between 1 and 100" +     Guess.guess_loop(random) +  end +  def guess_loop(num) do +    data = IO.read(:stdio, :line) +    {guess, _rest} = Integer.parse(data) +    cond do +      guess < num -> +        IO.puts "Too low!" +        guess_loop(num) +      guess > num -> +        IO.puts "Too high!" +        guess_loop(num) +      true -> +        IO.puts "That's right!" +    end +  end +end + +Guess.guess() +``` + +Elixir 通过列出变量的名称后面跟一个`=`号来为了给变量分配一个数值。举个例子,表达式 `random = 0` 给 `random` 变量分配一个数值 0。 + +代码以定义一个 **module** 开始。在 Elixir 语言中,只有 module 可以包含非匿名函数。 + +紧随其后的这行代码定义了入口函数 `guess()`,这个函数: + + * 调用 `Enum.random()` 函数来获取一个随机数 + * 打印游戏提示 + * 调用循环执行的函数 + +剩余的游戏逻辑实现在 `guess_loop()` 函数中。 + +`guess_loop()` 函数利用[尾递归 ][4] 来实现循环。Elixir 中有好几种实现循环的方法,尾递归是比较常用的一种方式。`guess_loop()` 函数做的最后一件事就是调用自身。 + +`guess_loop()` 函数的第一行读取用户输入。下一行调用 `parse()` 函数将输入转换成一个整数。 + +`cond` 表达式是 Elixir 版本的多重分支表达式。与其他语言中的 `if/elif` 或者 `if/elsif` 表达式不同,Elixir 对于的首个分支或者最后一个没有分支并没有区别对待。 + +`cond` 表达式有三路分支:猜测的结果可以比随机数大、小或者相等。前两个选项先输出不等式的方向然后递归调用 `guess_loop()`,循环返回至函数开始。最后一个选项输出 `That's right`,然后这个函数就完成了。 + +### 输出例子 + +现在你已经编写了你的 Elixir 代码,你可以运行它来玩"猜数字"的游戏。每次你执行这个程序,Elixir 会选择一个不同的随机数,你可以一直猜下去直到你找到正确的答案: + + +``` +$ elixir guess.exs +Guess a number between 1 and 100 +50 +Too high +30 +Too high +20 +Too high +10 +Too low +15 +Too high +13 +Too low +14 +That's right! +``` + +"猜数字"游戏是一个学习一门新编程语言的绝佳入门程序,因为它用了非常直接的方法实践了常用的几个编程概念。通过用不同语言实现这个简单的小游戏,你可以实践各个语言的核心概念并且比较它们的细节。 + +你是否有你最喜爱的编程语言?你将怎样用它来编写"猜数字"这个游戏?关注这个系列的文章来看看其他你可能感兴趣的语言实现。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/12/elixir + +作者:[Moshe Zadka][a] +选题:[lujun9972][b] +译者:[tt67wq](https://github.com/tt67wq) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/moshez +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/dice_tabletop_board_gaming_game.jpg?itok=y93eW7HN (A die with rainbow color background) +[2]: https://elixir-lang.org/ +[3]: https://www.erlang.org/ +[4]: https://en.wikipedia.org/wiki/Tail_call From 41c9ea16bdff0f17450d37639d9a7c258018fd16 Mon Sep 17 00:00:00 2001 From: "Qian.Sun" <44011673+DCOLIVERSUN@users.noreply.github.com> Date: Mon, 12 Apr 2021 21:06:44 +0800 Subject: [PATCH 645/818] translating --- .../20210409 4 ways open source gives you a competitive edge.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210409 4 ways open source gives you a competitive edge.md b/sources/tech/20210409 4 ways open source gives you a competitive edge.md index 56bb2cb7db..a8782c3749 100644 --- a/sources/tech/20210409 4 ways open source gives you a competitive edge.md +++ b/sources/tech/20210409 4 ways open source gives you a competitive edge.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/4/open-source-competitive-advantage) [#]: author: (Jason Blais https://opensource.com/users/jasonblais) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (DCOLIVERSUN) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 71ae070aae3bd1930c1a36f4afb35ba90465db2c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 12 Apr 2021 22:34:46 +0800 Subject: [PATCH 646/818] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @tt67wq 感谢你,完成了第一篇翻译贡献 ! --- ...01209 Program a simple game with Elixir.md | 77 +++++++++---------- 1 file changed, 37 insertions(+), 40 deletions(-) diff --git a/translated/tech/20201209 Program a simple game with Elixir.md b/translated/tech/20201209 Program a simple game with Elixir.md index 3583e77763..c794b65271 100644 --- a/translated/tech/20201209 Program a simple game with Elixir.md +++ b/translated/tech/20201209 Program a simple game with Elixir.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (tt67wq) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Program a simple game with Elixir) @@ -9,22 +9,22 @@ 使用 Elixir 语言编写一个小游戏 ====== -通过编写"猜数字"游戏来学习 Elixir 编程语言并将它与一个你熟知的语言做对比。 -![A die with rainbow color background][1] +> 通过编写“猜数字”游戏来学习 Elixir 编程语言,并将它与一个你熟知的语言做对比。 + +![](https://img.linux.net.cn/data/attachment/album/202104/12/223351t68886wmza1m9jnt.jpg) 为了更好的学习一门新的编程语言,最好的方法是去关注主流语言的一些共有特征: * 变量 * 表达式 - * 声明 - + * 语句 这些概念是大多数编程语言的基础。因为这些相似性,只要你通晓了一门编程语言,你可以通过对比差异来熟知另一门编程语言。 -另外一个学习新编程语言的好方法是开始编写一个简单标准的程序。它可以让你集中精力在语言上而非程序的逻辑本身。在这个系列的文章中,我们使用"猜数字"程序来实现,计算机会选择一个介于 1 到 100 之间的数字,并要求你来猜测它。程序会循环执行,直到您正确猜出该数字为止。 +另外一个学习新编程语言的好方法是开始编写一个简单标准的程序。它可以让你集中精力在语言上而非程序的逻辑本身。在这个系列的文章中,我们使用“猜数字”程序来实现,在这个程序中,计算机会选择一个介于 1 到 100 之间的数字,并要求你来猜测它。程序会循环执行,直到你正确猜出该数字为止。 -"猜数字"这个小程序使用了编程语言的以下概念: +“猜数字”这个程序使用了编程语言的以下概念: * 变量 * 输入 @@ -32,68 +32,65 @@ * 条件判断 * 循环 - 这是一个学习新编程语言的绝佳实践。 ### 猜数字的 Elixir 实现 -[Elixir][2] 是一门被设计用于构建稳定可维护应用的动态类型函数式编程语言。它与 [Erlang][3] 运行于同一虚拟机之上,吸纳了 Erlang 的众多长处的同时拥有更加轻便的语法。 +[Elixir][2] 是一门被设计用于构建稳定可维护应用的动态类型的函数式编程语言。它与 [Erlang][3] 运行于同一虚拟机之上,吸纳了 Erlang 的众多长处的同时拥有更加简单的语法。 -你可以编写一个 Elixir 版本的"猜数字"游戏来体验这门语言。 +你可以编写一个 Elixir 版本的“猜数字”游戏来体验这门语言。 这是我的实现方法: - ``` defmodule Guess do -  def guess() do -     random = Enum.random(1..100) -     IO.puts "Guess a number between 1 and 100" -     Guess.guess_loop(random) -  end -  def guess_loop(num) do -    data = IO.read(:stdio, :line) -    {guess, _rest} = Integer.parse(data) -    cond do -      guess < num -> -        IO.puts "Too low!" -        guess_loop(num) -      guess > num -> -        IO.puts "Too high!" -        guess_loop(num) -      true -> -        IO.puts "That's right!" -    end -  end + def guess() do + random = Enum.random(1..100) + IO.puts "Guess a number between 1 and 100" + Guess.guess_loop(random) + end + def guess_loop(num) do + data = IO.read(:stdio, :line) + {guess, _rest} = Integer.parse(data) + cond do + guess < num -> + IO.puts "Too low!" + guess_loop(num) + guess > num -> + IO.puts "Too high!" + guess_loop(num) + true -> + IO.puts "That's right!" + end + end end Guess.guess() ``` -Elixir 通过列出变量的名称后面跟一个`=`号来为了给变量分配一个数值。举个例子,表达式 `random = 0` 给 `random` 变量分配一个数值 0。 +Elixir 通过列出变量的名称后面跟一个 `=` 号来为了给变量分配一个值。举个例子,表达式 `random = 0` 给 `random` 变量分配一个数值 0。 -代码以定义一个 **module** 开始。在 Elixir 语言中,只有 module 可以包含非匿名函数。 +代码以定义一个模块开始。在 Elixir 语言中,只有模块可以包含命名函数。 紧随其后的这行代码定义了入口函数 `guess()`,这个函数: - * 调用 `Enum.random()` 函数来获取一个随机数 + * 调用 `Enum.random()` 函数来获取一个随机整数 * 打印游戏提示 * 调用循环执行的函数 剩余的游戏逻辑实现在 `guess_loop()` 函数中。 -`guess_loop()` 函数利用[尾递归 ][4] 来实现循环。Elixir 中有好几种实现循环的方法,尾递归是比较常用的一种方式。`guess_loop()` 函数做的最后一件事就是调用自身。 +`guess_loop()` 函数利用 [尾递归][4] 来实现循环。Elixir 中有好几种实现循环的方法,尾递归是比较常用的一种方式。`guess_loop()` 函数做的最后一件事就是调用自身。 `guess_loop()` 函数的第一行读取用户输入。下一行调用 `parse()` 函数将输入转换成一个整数。 `cond` 表达式是 Elixir 版本的多重分支表达式。与其他语言中的 `if/elif` 或者 `if/elsif` 表达式不同,Elixir 对于的首个分支或者最后一个没有分支并没有区别对待。 -`cond` 表达式有三路分支:猜测的结果可以比随机数大、小或者相等。前两个选项先输出不等式的方向然后递归调用 `guess_loop()`,循环返回至函数开始。最后一个选项输出 `That's right`,然后这个函数就完成了。 +这个 `cond` 表达式有三路分支:猜测的结果可以比随机数大、小或者相等。前两个选项先输出不等式的方向然后递归调用 `guess_loop()`,循环返回至函数开始。最后一个选项输出 `That's right`,然后这个函数就完成了。 ### 输出例子 -现在你已经编写了你的 Elixir 代码,你可以运行它来玩"猜数字"的游戏。每次你执行这个程序,Elixir 会选择一个不同的随机数,你可以一直猜下去直到你找到正确的答案: - +现在你已经编写了你的 Elixir 代码,你可以运行它来玩“猜数字”的游戏。每次你执行这个程序,Elixir 会选择一个不同的随机数,你可以一直猜下去直到你找到正确的答案: ``` $ elixir guess.exs @@ -114,9 +111,9 @@ Too low That's right! ``` -"猜数字"游戏是一个学习一门新编程语言的绝佳入门程序,因为它用了非常直接的方法实践了常用的几个编程概念。通过用不同语言实现这个简单的小游戏,你可以实践各个语言的核心概念并且比较它们的细节。 +“猜数字”游戏是一个学习一门新编程语言的绝佳入门程序,因为它用了非常直接的方法实践了常用的几个编程概念。通过用不同语言实现这个简单的小游戏,你可以实践各个语言的核心概念并且比较它们的细节。 -你是否有你最喜爱的编程语言?你将怎样用它来编写"猜数字"这个游戏?关注这个系列的文章来看看其他你可能感兴趣的语言实现。 +你是否有你最喜爱的编程语言?你将怎样用它来编写“猜数字”这个游戏?关注这个系列的文章来看看其他你可能感兴趣的语言实现。 -------------------------------------------------------------------------------- @@ -125,7 +122,7 @@ via: https://opensource.com/article/20/12/elixir 作者:[Moshe Zadka][a] 选题:[lujun9972][b] 译者:[tt67wq](https://github.com/tt67wq) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From c5cefb04597fef9cc081450f539f1685e8735079 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 12 Apr 2021 22:35:33 +0800 Subject: [PATCH 647/818] PUB @tt67wq https://linux.cn/article-13292-1.html --- .../20201209 Program a simple game with Elixir.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20201209 Program a simple game with Elixir.md (98%) diff --git a/translated/tech/20201209 Program a simple game with Elixir.md b/published/20201209 Program a simple game with Elixir.md similarity index 98% rename from translated/tech/20201209 Program a simple game with Elixir.md rename to published/20201209 Program a simple game with Elixir.md index c794b65271..4d7f6e6211 100644 --- a/translated/tech/20201209 Program a simple game with Elixir.md +++ b/published/20201209 Program a simple game with Elixir.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (tt67wq) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13292-1.html) [#]: subject: (Program a simple game with Elixir) [#]: via: (https://opensource.com/article/20/12/elixir) [#]: author: (Moshe Zadka https://opensource.com/users/moshez) From 10ba82cc5b0ad5cced04cbcdbfc71c2ea08c24ce Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 12 Apr 2021 23:28:56 +0800 Subject: [PATCH 648/818] PRF @wxy --- ...cal guide to using the git stash command.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/translated/tech/20210402 A practical guide to using the git stash command.md b/translated/tech/20210402 A practical guide to using the git stash command.md index ddd8a761dd..37149498ca 100644 --- a/translated/tech/20210402 A practical guide to using the git stash command.md +++ b/translated/tech/20210402 A practical guide to using the git stash command.md @@ -3,24 +3,24 @@ [#]: author: (Ramakrishna Pattnaik https://opensource.com/users/rkpattnaik780) [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) git stash 命令实用指南 ====== -> 学习如何使用 `git stash` 命令,以及何时应该使用它。 +> 学习如何使用 `git stash` 命令,以及何时应该使用它。 -![女人在笔记本上坐在窗口][1] +![](https://img.linux.net.cn/data/attachment/album/202104/12/232830chuyr6lkzevrfuzr.jpg) -版本控制是软件开发人员日常生活中不可分割的一部分。很难想象有哪个团队在开发软件时不使用版本控制工具。同样也很难想象有哪个开发者没有使用过(或没有听说过)Git。在 2018 年 Stackoverflow 开发者调查中,74298 名参与者中 87.2% 的人 [使用 Git][2] 进行版本控制。 +版本控制是软件开发人员日常生活中不可分割的一部分。很难想象有哪个团队在开发软件时不使用版本控制工具。同样也很难想象有哪个开发者没有使用过(或没有听说过)Git。在 2018 年 Stackoverflow 开发者调查中,74298 名参与者中有 87.2% 的人 [使用 Git][2] 进行版本控制。 -Linus Torvalds 在 2005 年创建了 Git 用于开发 Linux 内核。本文将介绍 `git stash` 命令,并探讨一些有用的暂存修改的选项。本文假定你对 [Git 概念][3] 有基本的了解,并对工作树、暂存区和相关命令有良好的理解。 +Linus Torvalds 在 2005 年创建了 Git 用于开发 Linux 内核。本文将介绍 `git stash` 命令,并探讨一些有用的暂存变更的选项。本文假定你对 [Git 概念][3] 有基本的了解,并对工作树、暂存区和相关命令有良好的理解。 ### 为什么 git stash 很重要? -首先要明白为什么在 Git 中暂存变更很重要。假设 Git 没有暂存变更的命令。当你正在一个有两个分支(A 和 B)的仓库上工作时,这两个分支已经分叉了一段时间,并且有不同的头。当你正在处理 A 分支的一些文件时,你的团队要求你修复 B 分支的一个错误。你迅速将你的修改保存到 A 分支,并尝试用 `git checkout B` 来签出 B 分支。Git 立即中止了这个操作,并抛出错误:“你对以下文件的本地修改会被该签出覆盖……请在切换分支之前提交你的修改或将它们暂存起来。” +首先要明白为什么在 Git 中暂存变更很重要。假设 Git 没有暂存变更的命令。当你正在一个有两个分支(A 和 B)的仓库上工作时,这两个分支已经分叉了一段时间,并且有不同的头。当你正在处理 A 分支的一些文件时,你的团队要求你修复 B 分支的一个错误。你迅速将你的修改保存到 A 分支(但没有提交),并尝试用 `git checkout B` 来签出 B 分支。Git 会立即中止了这个操作,并抛出错误:“你对以下文件的本地修改会被该签出覆盖……请在切换分支之前提交你的修改或将它们暂存起来。” 在这种情况下,有几种方法可以启用分支切换: @@ -31,7 +31,7 @@ Linus Torvalds 在 2005 年创建了 Git 用于开发 Linux 内核。本文将 `git stash` 将未提交的改动保存在本地,让你可以进行修改、切换分支以及其他 Git 操作。然后,当你需要的时候,你可以重新应用这些存储的改动。暂存是本地范围的,不会被 `git push` 推送到远程。 -### 如何使用git stash +### 如何使用 git stash 下面是使用 `git stash` 时要遵循的顺序: @@ -54,7 +54,7 @@ $ git stash Saved working directory and index state WIP on master; d7435644 Feat: configure graphql endpoint ``` -默认情况下,`git stash` 存储(或“暂存”)未提交的更改(已暂存和未暂存的文件),并忽略未跟踪和忽略的文件。通常情况下,你不需要暂存未跟踪和忽略的文件,但有时它们可能会干扰你在代码库中要做的其他事情。 +默认情况下,`git stash` 存储(或称之为“暂存”)未提交的更改(已暂存和未暂存的文件),并忽略未跟踪和忽略的文件。通常情况下,你不需要暂存未跟踪和忽略的文件,但有时它们可能会干扰你在代码库中要做的其他事情。 你可以使用附加选项让 `git stash` 来处理未跟踪和忽略的文件: @@ -212,7 +212,7 @@ via: https://opensource.com/article/21/4/git-stash 作者:[Ramakrishna Pattnaik][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From de8cd1562bfd93766c2005a60b578af8f93cbd75 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 12 Apr 2021 23:29:42 +0800 Subject: [PATCH 649/818] PUB @wxy https://linux.cn/article-13293-1.html --- ...210402 A practical guide to using the git stash command.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210402 A practical guide to using the git stash command.md (99%) diff --git a/translated/tech/20210402 A practical guide to using the git stash command.md b/published/20210402 A practical guide to using the git stash command.md similarity index 99% rename from translated/tech/20210402 A practical guide to using the git stash command.md rename to published/20210402 A practical guide to using the git stash command.md index 37149498ca..51917981dd 100644 --- a/translated/tech/20210402 A practical guide to using the git stash command.md +++ b/published/20210402 A practical guide to using the git stash command.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13293-1.html) git stash 命令实用指南 ====== From 22547cb04d6931be67557bdc6fb9c2b4f05ac0db Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 13 Apr 2021 05:02:31 +0800 Subject: [PATCH 650/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210412=20?= =?UTF-8?q?Scheduling=20tasks=20with=20cron?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210412 Scheduling tasks with cron.md --- .../20210412 Scheduling tasks with cron.md | 207 ++++++++++++++++++ 1 file changed, 207 insertions(+) create mode 100644 sources/tech/20210412 Scheduling tasks with cron.md diff --git a/sources/tech/20210412 Scheduling tasks with cron.md b/sources/tech/20210412 Scheduling tasks with cron.md new file mode 100644 index 0000000000..5f0e427d42 --- /dev/null +++ b/sources/tech/20210412 Scheduling tasks with cron.md @@ -0,0 +1,207 @@ +[#]: subject: (Scheduling tasks with cron) +[#]: via: (https://fedoramagazine.org/scheduling-tasks-with-cron/) +[#]: author: (Darshna Das https://fedoramagazine.org/author/climoiselle/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Scheduling tasks with cron +====== + +![][1] + +Photo by [Yomex Owo][2] on [Unsplash][3] + +Cron is a scheduling daemon that executes tasks at specified intervals. These tasks are called _cron_ jobs and are mostly used to automate system maintenance or administration tasks. For example, you could set a _cron_ job to automate repetitive tasks such as backing up database or data, updating the system with the latest security patches, checking the disk space usage, sending emails, and so on. The _cron_ jobs can be scheduled to run by the minute, hour, day of the month, month, day of the week, or any combination of these. + +### **Some advantages of cron** + +These are a few of the advantages of using _cron_ jobs: + + * You have much more control over when your job runs i.e. you can control the minute, the hour, the day, etc. when it will execute. + * It eliminates the need to write the code for the looping and logic of the task and you can shut it off when you no longer need to execute the job. + * Jobs do not occupy your memory when not executing so you are able to save the memory allocation. + * If a job fails to execute and exits for some reason it will run again when the proper time comes. + + + +### Installing the cron daemon + +Luckily Fedora Linux is pre-configured to run important system tasks to keep the system updated. There are several utilities that can run tasks such as _cron_, _anacron_, _at_ and _batch_. This article will focus on the installation of the _cron_ utility only. Cron is installed with the _cronie_ package that also provides the _cron_ services. + +To determine if the package is already present or not, use the rpm command: + +``` +$ rpm -q cronie + Cronie-1.5.2-4.el8.x86_64 +``` + +If the _cronie_ package is installed it will return the full name of the _cronie_ package. If you do not have the package present in your system it will say the package is not installed. +To install type this: + +``` +$ dnf install cronie +``` + +### Running the cron daemon + +A _cron_ job is executed by the _crond_ service based on information from a configuration file. Before adding a job to the configuration file, however, it is necessary to start the _crond_ service, or in some cases install it. What is _crond_? _Crond_ is the compressed name of cron daemon (crond). To determine if the _crond_ service is running or not, type in the following command: + +``` +$ systemctl status crond.service +● crond.service - Command Scheduler + Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor pre> + Active: active (running) since Sat 2021-03-20 14:12:35 PDT; 1 day 21h ago + Main PID: 1110 (crond) +``` + +If you do not see something similar including the line “Active: active (running) since…”, you will have to start the _crond_ daemon. To run the _crond_ service in the current session, enter the following command: + +``` +$ systemctl run crond.service +``` + +To configure the service to start automatically at boot time, type the following: + +``` +$ systemctl enable crond.service +``` + +If, for some reason, you wish to stop the _crond_ service from running, use the _stop_ command as follows: + +``` +$ systemctl stop crond.service +``` + +To restart it, simply use the _restart_ command: + +``` +$ systemctl restart crond.service +``` + +### Defining a cron job + +#### The cron configuration + +Here is an example of the configuration details for a _cron_ job. This defines a simple _cron_ job to pull the latest changes of a _git_ master branch into a cloned repository: + +``` +*/59 * * * * username cd /home/username/project/design && git pull origin master +``` + +There are two main parts: + + * The first part is “*/59 * * * *”. This is where the timer is set to every 59 minutes. + * The rest of the line is the command as it would run from the command line. +The command itself in this example has three parts: + * The job will run as the user “username” + * It will change to the directory /home/username/project/design + * The git command runs to pull the latest changes in the master branch. + + + +#### **Timing syntax** + +The timing information is the first part of the _cron_ job string, as mentioned above. This determines how often and when the cron job is going to run. It consists of 5 parts in this order: + + * minute + * hour + * day of the month + * month + * day of the week + + + +Here is a more graphic way to explain the syntax may be seen here: + +``` +.---------------- minute (0 - 59) + | .------------- hour (0 - 23) + | | .---------- day of month (1 - 31) + | | | .------- month (1 - 12) OR jan,feb,mar,apr … + | | | | .---- day of week (0-6) (Sunday=0 or 7) + | | | | | OR sun,mon,tue,wed,thr,fri,sat + | | | | | + * * * * user-name command-to-be-executed +``` + +#### Use of the **asterisk** + +An asterisk (*) may be used in place of a number to represents all possible values for that position. For example, an asterisk in the minute position would make it run every minute. The following examples may help to better understand the syntax. + +This cron job will run every minute, all the time: + +``` +* * * * [command] +``` + +A slash (/) indicates a multiple number of minutes The following example will run 12 times per hour, i.e., every 5 minutes: + +``` +*/5 * * * * [command] +``` + +The next example will run once a month, on the second day of the month at midnight (e.g. January 2nd 12:00am, February 2nd 12:00am, etc.): + +``` +0 0 2 * * [command] +``` + +#### Using crontab to create a cron job + +Cron jobs run in the background and constantly check the _/etc/crontab_ file, and the _/etc/cron.*/_ and _/var/spool/cron/_ directories. Each user has a unique crontab file in _/var/spool/cron/_ . + +These _cron_ files are not supposed to be edited directly. The _crontab_ command is the method you use to create, edit, install, uninstall, and list cron jobs. + +The same _crontab_ command is used for creating and editing cron jobs. And what’s even cooler is that you don’t need to restart cron after creating new files or editing existing ones. + +``` +$ crontab -e +``` + +This opens your existing _crontab_ file or creates one if necessary. The _vi_ editor opens by default when calling _crontab -e_. Note: To edit the _crontab_ file using Nano editor, you can optionally set the **EDITOR**=nano environment variable. + +List all your _cron_ jobs using the option _-l_ and specify a user using the _-u_ option, if desired. + +``` +$ crontab -l +$ crontab -u username -l +``` + +Remove or erase all your _cron_ jobs using the following command: + +``` +$ crontab -r +``` + +To remove jobs for a specific user you must run the following command as the _root user_: + +``` +$ crontab -r -u username +``` + +Thank you for reading. _cron_ jobs may seem like a tool just for system admins, but they are actually relevant to many kinds of web applications and user tasks. + +#### Reference + +Fedora Linux documentation for [Automated Tasks][4] + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/scheduling-tasks-with-cron/ + +作者:[Darshna 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://fedoramagazine.org/author/climoiselle/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2021/03/schedule_with_cron-816x345.jpg +[2]: https://unsplash.com/@yomex4life?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/clock?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://docs.fedoraproject.org/en-US/Fedora/12/html/Deployment_Guide/ch-autotasks.html From ca6fcaeb4bb5610c0213970b4761ceaecec74086 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 13 Apr 2021 05:03:01 +0800 Subject: [PATCH 651/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210413=20?= =?UTF-8?q?Create=20and=20Edit=20EPUB=20Files=20on=20Linux=20With=20Sigil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md --- ...and Edit EPUB Files on Linux With Sigil.md | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 sources/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md diff --git a/sources/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md b/sources/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md new file mode 100644 index 0000000000..afa283e131 --- /dev/null +++ b/sources/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md @@ -0,0 +1,101 @@ +[#]: subject: (Create and Edit EPUB Files on Linux With Sigil) +[#]: via: (https://itsfoss.com/sigile-epub-editor/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Create and Edit EPUB Files on Linux With Sigil +====== + +Sigil is an open source EPUB editor available for Linux, Windows and macOS. With Sigil, you can create a new ebook in EPUB file format or edit an existing EPUB ebook (file ending in .epub extension). + +In case you are wondering, EPUB is a standard ebook file format endorsed by several digital publishing groups. It is well-supported on a range of devices and ebook readers except Amazon Kindle. + +### Sigil lets you create or edit EPUB files + +[Sigil][1] is an open source software that allows you to edit EPUB files. You may, of course, create a new EPUB file from scratch. + +![][2] + +Many people swear by [Calibre for creating ebooks][3] or editing them. It is indeed a complete tool with lots of features and supports more than just EPUB file format. However, Calibre could be heavy on resources at times. + +Sigil is focused on just the EPUB books with the following features: + + * Support for EPUB 2 and EPUB 3 (with some limitations) + * Provides a preview along with the code view + * Editing EPUB syntax + * Table of content generator with mult-level heading + * Edit metadat + * Spell checking + * REGEX support for find and replace feature + * Supports import of EPUB and HTML files, images, and style sheets + * Additional plugins + * Multiple language support for the interface + * Supports Linux, Windows and macOS + + + +Sigil is not [WYSIWYG][4] type of editor where you can type the chapters of new book. It is focused on code as EPUB depends on XML. Consider it a [code editor like VS Code][5] for EPUB files. For this reason, you should use some other [open source tool for writing][6], export your files in .epub format (if possible) and then edit it in Sigil. + +![][7] + +Sigil does have a [Wiki][8] to provide you some documentation on installing and using Sigil. + +### Installing Sigil on Linux + +Sigil is a cross-platform application with support for Windows and macOS along with Linux. It is a popular software with more than a decade of existence. This is why you should find it in the repositories of your Linux distributions. Just look for it in the software center application of your distribution. + +![Sigil in Ubuntu Software Center][9] + +You may need to enable the universe repository beforehand. You may also use the apt command in Ubuntu-based distributions: + +``` +sudo apt install sigil +``` + +Sigil has a lot of dependencies on Python libraries and modules and hence it downloads and installs a good number of packages. + +![][10] + +I am not going to list commands for Fedora, SUSE, Arch and other distributions. You probably already know how to use your distribution’s package manager, right? + +The version provided by your distribution may not always be the latest. If you want the latest version of Sigil, you can check out its GitHub repositories. + +[Sigil on GitHub][11] + +### Not for everyone, certianly not for reading ePUB books + +I wouldn’t recommend using Sigil for reading ebooks. There are [other dedicated applications on Linux to read .epub files][12]. + +If you are a writer who has to deal with EPUB books or if you are digitizing old books and converting them in various formats, Sigil could be worth a try. + +I haven’t used Sigil extensively so I cannot provide a review of it. I let it up to you to explore it and share your experienced with the rest of us here. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/sigile-epub-editor/ + +作者:[Abhishek Prakash][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/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://sigil-ebook.com/ +[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/open-epub-sigil.png?resize=800%2C621&ssl=1 +[3]: https://itsfoss.com/create-ebook-calibre-linux/ +[4]: https://www.computerhope.com/jargon/w/wysiwyg.htm +[5]: https://itsfoss.com/best-modern-open-source-code-editors-for-linux/ +[6]: https://itsfoss.com/open-source-tools-writers/ +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/sigil-epub-editor-800x621.png?resize=800%2C621&ssl=1 +[8]: https://github.com/Sigil-Ebook/Sigil/wiki +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/sigil-software-center-ubuntu.png?resize=800%2C424&ssl=1 +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/installing-sigil-ubuntu.png?resize=800%2C547&ssl=1 +[11]: https://github.com/Sigil-Ebook/Sigil +[12]: https://itsfoss.com/open-epub-books-ubuntu-linux/ From 1415e21b635bf98b9fd47b2f852b882f1af30ab4 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 13 Apr 2021 05:03:20 +0800 Subject: [PATCH 652/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210412=20?= =?UTF-8?q?6=20open=20source=20tools=20and=20tips=20to=20securing=20a=20Li?= =?UTF-8?q?nux=20server=20for=20beginners?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210412 6 open source tools and tips to securing a Linux server for beginners.md --- ...o securing a Linux server for beginners.md | 202 ++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 sources/tech/20210412 6 open source tools and tips to securing a Linux server for beginners.md diff --git a/sources/tech/20210412 6 open source tools and tips to securing a Linux server for beginners.md b/sources/tech/20210412 6 open source tools and tips to securing a Linux server for beginners.md new file mode 100644 index 0000000000..36b202743a --- /dev/null +++ b/sources/tech/20210412 6 open source tools and tips to securing a Linux server for beginners.md @@ -0,0 +1,202 @@ +[#]: subject: (6 open source tools and tips to securing a Linux server for beginners) +[#]: via: (https://opensource.com/article/21/4/securing-linux-servers) +[#]: author: (Sahana Sreeram https://opensource.com/users/sahanasreeram01gmailcom) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +6 open source tools and tips to securing a Linux server for beginners +====== +Use open source tools to protect your Linux environment from breaches. +![People work on a computer server with devices][1] + +Because so much of our personal and professional data is available online today, it is important for everyone—from professionals to general internet users—to learn the basics of security and privacy. As a student, I've been able to gain experience in this area through my school's CyberPatriot initiative, where I've had the opportunity to interact with industry experts to learn about cyber breaches and the basic steps to establish a system's security. + +This article details six simple steps to improve the security of your Linux environment for personal use, based on what I have learned thus far as a beginner. Throughout my journey, I have utilized open source tools to accelerate my learning process and familiarize myself with higher-level concepts related to securing my Linux server. + +I have tested these steps using Ubuntu 18.04, the version I am most familiar with, but these steps will also work for other Linux distributions. + +### 1\. Run updates + +Developers are constantly finding ways to make servers more stable, fast, and secure by patching known vulnerabilities. Running updates regularly is a good habit to get into to maximize security. Run them with: + + +``` +`sudo apt-get update && apt-get upgrade` +``` + +### 2\. Enable firewall protection + +[Enabling a firewall][2] makes it easier to control incoming and outgoing traffic on your server. There are many firewall applications you can use on Linux, including [firewall-cmd][3] and Uncomplicated Firewall ([UFW][4]). I use UFW, so my examples are specific to it, but these principles apply to any interface you choose. + +Install UFW: + + +``` +`sudo apt-get install ufw` +``` + +If you want to secure your server even more, you can deny incoming and outgoing connections. Be warned: This cuts your server off from the world, so once you've blocked all traffic, you must specify which outgoing connections are allowed from your system: + + +``` +sudo ufw default deny incoming +sudo ufw default allow outgoing +``` + +You can also write rules for allowing incoming connections you need for personal use: + + +``` +`ufw allow ` +``` + +For example, to allow SSH connections: + + +``` +`ufw allow ssh` +``` + +Finally, enable your firewall with: + + +``` +`sudo ufw enable` +``` + +### 3\. Strengthen password protection + +Implementing a strong password policy is an important aspect of keeping a server secure from cyberattacks and data breaches. Some best practices for password policies include enforcing a minimum length and specifying password age. I use the libpam-cracklib package to accomplish these tasks. + +Install the libpam-cracklib package: + + +``` +`sudo apt-get install libpam-cracklib` +``` + +To enforce password length: + + * Open the `/etc/pam.d/common-password` file. + * Change the minimum character length of all passwords by changing the `minlen=12` line to however many characters you want. + + + +To prevent password reuse: + + * In the same file (`/etc/pam.d/common-password`), add the line `remember=x`. + * For example, if you want to prevent a user from reusing one of their last five passwords, use: `remember=5`. + + + +To enforce password age: + + * Find the following lines in the `/etc/login.defs` file and replace them with your preferred amount of time (days). For example: [code] PASS_MIN_AGE: 3 +PASS_MAX_AGE: 90 +PASS_WARN_AGE: 14 +``` +To enforce character specifications: + + * The four parameters to enforce character specifications in passwords are `lcredit` (lowercase), `ucredit` (uppercase), `dcredit` (digit), and `ocredit` (other characters). + * In the same file (`/etc/pam.d/common-password`), locate the line containing `pam_cracklib.so`. + * Add the following to the end of this line: [code]`lcredit=-a ucredit=-b dcredit=-c ocredit=-d` +``` + * For example, the following line requires passwords to contain _one_ of each parameter. You can change the numbers based on your preferred level of password security: [code]`lcredit=-1 ucredit=-1 dcredit=-1 ocredit=-1` +``` +## 4\. Disable nonessential services that are prone to exploitation + +It's a best practice to disable unnecessary services. This allows fewer ports to be open for exploitation. + +Install the systemd package: +``` +`sudo apt-get install systemd` +``` +See which services are running: +``` +`systemctl list-units` +``` +[Recognize][5] which services could cause potential vulnerabilities to your system. For each service: + + * Stop the service if it's currently running: [code]`systemctl stop ` +``` + * Disable the service from starting on boot: [code]`systemctl disable ` +``` +* After running these commands, check the status of the service: [code]`systemctl status ` +``` + + + +### 5\. Check for listening ports + +Open ports might pose security risks, so it's important to check for ports that are listening on your server. I use the [netstat][6] command to show all network connections: + + +``` +`netstat -tulpn` +``` + +Look at the address columns to determine the [port number][7]. Once you've found open ports, review them to make sure they're all necessary. If they aren't, [adjust what services you have running][8], or adjust your firewall settings. + +### 6\. Scan for malware + +Antivirus scanning software can be useful to keep viruses out of your system. Using them is a simple way to keep your server free from malware. My preferred tool is the open source software [ClamAV][9]. + +Install ClamAV: + + +``` +`sudo apt-get install clamav` +``` + +Update virus signatures: + + +``` +`sudo freshclam` +``` + +Scan all files and print out infected files, ringing a bell when one is found: + + +``` +`sudo clamscan -r --bell -i /` +``` + +You can and should automate scans so that you don't have to remember or spend time doing them manually. For simple automation like this, you can use [systemd timers][10] or your [favorite cron][11]. + +### Keep your server safe + +We cannot leave the responsibility for securing servers to a single person or organization. As the threat landscape continues to expand rapidly, it is up to each of us to be aware of the importance of server security and to employ some simple, effective security best practices. + +These are just a few of the many steps you can take to keep your Linux server safe. Of course, prevention is only part of the solution. These policies should be combined with rigorous monitoring for denial of service attacks, doing system analysis with [Lynis][12], and creating frequent backups. + +What open source tools do you use to keep your server safe? Tell us about them in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/securing-linux-servers + +作者:[Sahana Sreeram][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/sahanasreeram01gmailcom +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_linux11x_cc.png?itok=XMDOouJR (People work on a computer server with devices) +[2]: https://www.redhat.com/sysadmin/secure-linux-network-firewall-cmd +[3]: https://opensource.com/article/20/2/firewall-cheat-sheet +[4]: https://wiki.ubuntu.com/UncomplicatedFirewall +[5]: http://www.yorku.ca/infosec/Administrators/UNIX_disable.html +[6]: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/netstat +[7]: https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers +[8]: https://opensource.com/article/20/5/systemd-units +[9]: https://www.clamav.net/ +[10]: https://opensource.com/article/20/7/systemd-timers +[11]: https://opensource.com/article/21/2/linux-automation +[12]: https://opensource.com/article/20/5/linux-security-lynis From 7e84c15e20ab26e893f4f0f9ce3e0d3570d527fe Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 13 Apr 2021 05:03:33 +0800 Subject: [PATCH 653/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210412=20?= =?UTF-8?q?Encrypt=20your=20files=20with=20this=20open=20source=20software?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210412 Encrypt your files with this open source software.md --- ...ur files with this open source software.md | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 sources/tech/20210412 Encrypt your files with this open source software.md diff --git a/sources/tech/20210412 Encrypt your files with this open source software.md b/sources/tech/20210412 Encrypt your files with this open source software.md new file mode 100644 index 0000000000..d5cd35cde2 --- /dev/null +++ b/sources/tech/20210412 Encrypt your files with this open source software.md @@ -0,0 +1,90 @@ +[#]: subject: (Encrypt your files with this open source software) +[#]: via: (https://opensource.com/article/21/4/open-source-encryption) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Encrypt your files with this open source software +====== +VeraCrypt offers open source file-encryption with cross-platform +capabilities. +![Lock][1] + +Many years ago, there was encryption software called [TrueCrypt][2]. Its source code was available, although there were no major claims that anyone had ever audited or contributed to it. Its author was (and remains to this day) anonymous. Still, it was cross-platform, easy to use, and really, really useful. + +TrueCrypt allowed you to create an encrypted file "vault," where you could store sensitive information of any kind (text, audio, video, images, PDFs, and so on). Provided you had the correct passphrase, TrueCrypt could decrypt the vault and provide read and write access on any computer running TrueCrypt. It was a useful technique that essentially provided a virtual, portable, fully encrypted drive (except it was a file) where you could safely store your data. + +TrueCrypt eventually closed down, but a replacement project called VeraCrypt quickly sprang up to fill the void. [VeraCrypt][3] is based on TrueCrypt 7.1a and features many improvements over the original (including significant algorithm changes for standard encrypted volumes and boot volumes). With VeraCrypt 1.12 and later versions, you can use custom iterations for increased encryption security. Better yet, VeraCrypt can load old TrueCrypt volumes, so if you were a TrueCrypt user, it's easy to transfer them over to VeraCrypt. + +### Install VeraCrypt + +You can install VeraCrypt on all major platforms by downloading the appropriate installer file from the [VeraCrypt download page][4]. + +Alternately, you can build it yourself from source code. On Linux, it requires wxGTK3, makeself, and the usual development stack (Binutils, GCC, and so on). + +Once you have it installed, launch VeraCrypt from your application menu. + +### Create a VeraCrypt volume + +If you're new to VeraCrypt, you must create a VeraCrypt volume first (otherwise, you have nothing to decrypt). In the VeraCrypt window, click the **Create Volume** button on the left. + +![Creating a volume with VeraCrypt][5] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +In VeraCrypt's **Volume Creator Wizard** window that appears, choose whether you want to create an encrypted file container or to encrypt an entire drive. The wizard steps you through creating a vault for your data, so follow along as prompted. + +For this article, I created a file container. A VeraCrypt container is a lot like any other file: it exists on a hard drive, external drive, in cloud storage, or anywhere else you can think to store data. Like other files, it can be moved, copied, and deleted. Unlike most other files, it can _contain_ more files, which is why I think of it as a "vault," and VeraCrypt developers refer to it as a "container." Its developers call a VeraCrypt file a "container" because it can contain other data objects; it has nothing to do with the container technology made popular by LXC, Kubernetes, and other modern IT mechanisms. + +#### Choose a filesystem + +During the volume-creation process, you're asked to select a filesystem to decide how the files you place inside your vault are stored. The Microsoft FAT format is archaic, non-journaled, and limits both volume and file sizes, but it's the one format all platforms can read from and write to. If you intend your VeraCrypt vault to cross platforms, FAT is your best bet. + +Aside from that, NTFS works for Windows and Linux. The open source EXT series works for Linux. + +### Mount a VeraCrypt volume + +Once you've created a VeraCrypt volume, you can mount it from within the VeraCrypt window. To mount an encrypted vault, click the **Select File** button on the right. Select your encrypted file, choose one of the numbered slots in the upper half of the VeraCrypt window, and then click the **Mount** button located in the lower-left corner of the VeraCrypt window. + +Your mounted volume is available in the list of available volumes in the VeraCrypt window, and you can access that volume through your file manager as if it were an external drive. For instance, on KDE, I open [Dolphin][7], navigate to `/media/veracrypt1`, and then I can copy files into my vault. + +As long as you have VeraCrypt on a device, you can always access your vault. It's encrypted until you manually mount it in VeraCrypt, where it remains decrypted until you close the volume again. + +### Close a VeraCrypt volume + +To keep your data safe, it's important to close a VeraCrypt volume when you don't need it open. That keeps it safe from prying eyes and crimes of opportunity. + +![Mounting a VeraCrypt volume][8] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +Closing up the VeraCrypt container is about as easy as it is to open one: Select the listed volume in the VeraCrypt window, and click **Dismount**. You no longer have access to the files inside your vault, and neither does anyone else. + +### VeraCrypt for easy cross-platform encryption + +There are many ways to keep your data secure, and VeraCrypt tries to make it easy for you, regardless of what platform you need to use that data on. If you want to experience easy, open source file encryption, try VeraCrypt. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/open-source-encryption + +作者:[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/security-lock-password.jpg?itok=KJMdkKum (Lock) +[2]: https://en.wikipedia.org/wiki/TrueCrypt +[3]: https://www.veracrypt.fr/en/Home.html +[4]: https://www.veracrypt.fr/en/Downloads.html +[5]: https://opensource.com/sites/default/files/uploads/veracrypt-create.jpg (Creating a volume with VeraCrypt) +[6]: https://creativecommons.org/licenses/by-sa/4.0/ +[7]: https://en.wikipedia.org/wiki/Dolphin_%28file_manager%29 +[8]: https://opensource.com/sites/default/files/uploads/veracrypt-volume.jpg (Mounting a VeraCrypt volume) From b5c0a4645e25e7190f528bd04032b0777a51edf4 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 13 Apr 2021 05:03:45 +0800 Subject: [PATCH 654/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210412=20?= =?UTF-8?q?Send=20your=20scans=20to=20a=20Linux=20machine=20over=20your=20?= =?UTF-8?q?network?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210412 Send your scans to a Linux machine over your network.md --- ...ns to a Linux machine over your network.md | 205 ++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 sources/tech/20210412 Send your scans to a Linux machine over your network.md diff --git a/sources/tech/20210412 Send your scans to a Linux machine over your network.md b/sources/tech/20210412 Send your scans to a Linux machine over your network.md new file mode 100644 index 0000000000..b9479545e4 --- /dev/null +++ b/sources/tech/20210412 Send your scans to a Linux machine over your network.md @@ -0,0 +1,205 @@ +[#]: subject: (Send your scans to a Linux machine over your network) +[#]: via: (https://opensource.com/article/21/4/linux-scan-samba) +[#]: author: (Marc Skinner https://opensource.com/users/marc-skinner) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Send your scans to a Linux machine over your network +====== +Set up a Samba share to make a scanner easily accessible by a Linux +computer over your network. +![Files in a folder][1] + +The free software movement famously got started [because of a poorly designed printer][2]. Decades later, printer and scanner manufacturers continue to reinvent the wheel, ignoring established and universal protocols. As a result, every now and again, you'll stumble onto a printer or scanner that just doesn't seem to work with your operating system. + +This happened to me recently with a Canon 3-in-1 scanner (the Canon Maxify MB2720). I was able to solve the scanner's problem with open source. Specifically, I set up a Samba share to make the scanner available on my network. + +The [Samba project][3] is a Windows interoperability suite of programs for Linux and Unix. Although it's mostly low-level code that many users never knowingly interact with, the software makes it easy to share files over your local network, regardless of what platforms are used. + +I'm using Fedora, so these instructions should work for any RPM-based Linux distribution. Minor modifications may be necessary for other distributions. Here's how I did it. + +### Get the Canon tools + +Download the required Windows Canon Quick Utility Toolbox software from Canon's website. The software is required because it is the only way to configure the printer's destination folder location and credentials. Once this is done, you do not need to use the tool unless you want to make a change. + +Before configuring the printer, you must set up a Samba share on your Linux computer or server. Install Samba with the following command: + + +``` +`$ sudo dnf -y install samba` +``` + +Create `/etc/smb.conf` file with the following content: + + +``` +[global] +        workgroup = WORKGROUP +        netbios name = MYSERVER +        security = user +        #CORE needed for CANON PRINTER SCAN FOLDER +        min protocol = CORE +        #NTML AUTHV1 needed for CANON PRINTER SCAN FOLDER +        ntlm auth = yes +        passdb backend = tdbsam + +        printing = cups +        printcap name = cups +        load printers = no +        cups options = raw + +        hosts allow = 127. 192.168.33. +        max smbd processes = 1000 + +[homes] +        comment = Home Directories +        valid users = %S, %D%w%S +        browseable = No +        writable = yes +        read only = No +        inherit acls = Yes + +[SCANS] +        comment = MB2720 SCANS +        path = /mnt/SCANS +        public = yes +        writable = yes +        browseable = yes +        printable = no +        force user = tux +        create mask = 770 +``` + +In the `force user` line near the end, change the username from `tux` to your own username. + +Unfortunately, the Canon printer won't work with Server Message Block ([SMB][4]) protocols higher than CORE or NTML authentication v2. For this reason, the Samba share must be configured with the oldest SMB protocol and NTML authentication versions. This is not ideal by any means and has security implications, so I created a separate Samba server dedicated to the scanner use case. My other Samba server, which shares all home networked files, still uses SMB protocol 3 and NTML authentication v2. + +Start the Samba server service and enable it for restart: + + +``` +$ sudo systemctl start smb +$ sudo systemctl enable smb +``` + +### Create a Samba user + +Create your Samba user and a password for it: + + +``` +`$ sudo smbpasswd -a tux` +``` + +Enter your password at the prompt. + +Assuming you want to mount your Samba scans on a Linux system, you need to do a few steps. + +Create a Samba client credentials file. Mine looks like this: + + +``` +$ sudo cat /root/smb-credentials.txt +username=tux +password=mySTRONGpassword +``` + +Change the permissions so that it isn't world-readable: + + +``` +`$ sudo chmod 640 /root/smb-credentials.txt` +``` + +Create a mount point and add it to `/etc/fstab`: + + +``` +`$ sudo mkdir /mnt/MB2720-SCANS` +``` + +Add the following line into your `/etc/fstab`: + + +``` +`//192.168.33.50/SCANS  /mnt/MB2720-SCANS  cifs vers=3.0,credentials=/root/smb-credentials.txt,gid=1000,uid=1000,_netdev    0 0` +``` + +This mounts the Samba share scans to the new mount point using [CIFS][5], forcing SMBv3, and using the username and password stored in `/root/smb-credetials.txt`. It also passes the user's group identifier (GID) and the user identifier (UID), giving you full ownership of the Linux mount. The `_netdev` option is required so that the mount point is mounted after networking is fully functional (after a reboot, for instance) because this mount requires networking to be accessed. + +### Configure the Canon software + +Now that you have created the Samba share, configured it on the server, and configured the share to be mounted on your Linux client, you need to launch the Canon Quick Utility Toolbox to configure the printer. Because Canon doesn't release this toolbox for Linux, this step requires Windows. You can try [running it on WINE][6], but should that fail, you'll have to either borrow a Windows computer from someone or run a [Windows developer virtual machine][7] in [GNOME Boxes][8] or [VirtualBox][9]. + +Power on the printer, and then start the Canon Quick Utility Toolbox. It should find your printer. If it can't see your printer, you must configure the printer for either LAN or wireless networking first. + +In the toolbox, click on **Destination Folder Settings**. + +![Canon Quick Utility Toolbox][10] + +(Marc Skinner, [CC BY-SA 4.0][11]) + +Enter the printer administration password—my default password was **canon**. + +Click the **Add** button. + +![Add destination folder][12] + +Fill out the form with a Displayed Name, your Samba share location, and your Samba username and password. + +I left the PIN Code blank, but if you want to require a PIN to be entered each time you scan from the printer, you can set one. This would be useful in an office where each user has their own Samba share and PIN to protect their scans. + +Click **Connection Test** to validate the form data. + +Click the **OK** button. + +Click **Register to Printer** to save your configuration back to the printer. + +![Register to Printer ][13] + +(Marc Skinner, [CC BY-SA 4.0][11]) + +Everything is set up. Click **Exit**. You're done with Windows now, and probably the toolbox, unless you need to change something. + +### Start scanning + +You can now scan from the printer and select your Destination Folder from its LCD menu. Scans are saved directly to the Samba share, which you have access to from your Linux computer. + +For convenience, create a symbolic link on your Linux desktop or home directory with the following command: + + +``` +`$ sudo ln -sd /mnt/MB2720-SCANS /home/tux/Desktop/MB2720-SCANS` +``` + +That's all there is to it! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/linux-scan-samba + +作者:[Marc Skinner][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/marc-skinner +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/files_documents_paper_folder.png?itok=eIJWac15 (Files in a folder) +[2]: https://opensource.com/article/18/2/pivotal-moments-history-open-source +[3]: http://samba.org/ +[4]: https://en.wikipedia.org/wiki/Server_Message_Block +[5]: https://searchstorage.techtarget.com/definition/Common-Internet-File-System-CIFS +[6]: https://opensource.com/article/21/2/linux-wine +[7]: https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/ +[8]: https://opensource.com/article/19/5/getting-started-gnome-boxes-virtualization +[9]: https://www.virtualbox.org/ +[10]: https://opensource.com/sites/default/files/uploads/canontoolbox.png (Canon Quick Utility Toolbox) +[11]: https://creativecommons.org/licenses/by-sa/4.0/ +[12]: https://opensource.com/sites/default/files/add_destination_folder.png (Add destination folder) +[13]: https://opensource.com/sites/default/files/uploads/canonregistertoprinter.png (Register to Printer ) From d54549427ebdb9864ea6e1d9d47561b1b93dbade Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 13 Apr 2021 08:38:37 +0800 Subject: [PATCH 655/818] translated --- .../20210407 What is Git cherry-picking.md | 200 ------------------ .../20210407 What is Git cherry-picking.md | 200 ++++++++++++++++++ 2 files changed, 200 insertions(+), 200 deletions(-) delete mode 100644 sources/tech/20210407 What is Git cherry-picking.md create mode 100644 translated/tech/20210407 What is Git cherry-picking.md diff --git a/sources/tech/20210407 What is Git cherry-picking.md b/sources/tech/20210407 What is Git cherry-picking.md deleted file mode 100644 index eede7de952..0000000000 --- a/sources/tech/20210407 What is Git cherry-picking.md +++ /dev/null @@ -1,200 +0,0 @@ -[#]: subject: (What is Git cherry-picking?) -[#]: via: (https://opensource.com/article/21/4/cherry-picking-git) -[#]: author: (Rajeev Bera https://opensource.com/users/acompiler) -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -What is Git cherry-picking? -====== -Learn the what, why, and how of the git cherry-pick command. -![Measuring and baking a cherry pie recipe][1] - -Whenever you're working with a group of programmers on a project, whether small or large, handling changes between multiple Git branches can become difficult. Sometimes, instead of combining an entire Git branch into a different one, you want to select and move a couple of specific commits. This procedure is known as "cherry-picking." - -This article will cover the what, why, and how of cherry-picking. - -So let's start. - -### What is cherry-pick? - -With the `cherry-pick` command, Git lets you incorporate selected individual commits from any branch into your current [Git HEAD][2] branch. - -When performing a `git merge` or `git rebase`, all the commits from a branch are combined. The `cherry-pick` command allows you to select individual commits for integration. - -### Benefits of cherry-pick - -The following situation might make it easier to comprehend the way cherry-picking functions. - -Imagine you are implementing new features for your upcoming weekly sprint. When your code is ready, you will push it into the remote branch, ready for testing. - -However, the customer is not delighted with all of the modifications and requests that you present only certain ones. Because the client hasn't approved all changes for the next launch, `git rebase` wouldn't create the desired results. Why? Because `git rebase` or `git merge` will incorporate every adjustment from the last sprint. - -Cherry-picking is the answer! Because it focuses only on the changes added in the commit, cherry-picking brings in only the approved changes without adding other commits. - -There are several other reasons to use cherry-picking: - - * It is essential for bug fixing because bugs are set in the development branch using their commits. - * You can avoid unnecessary battles by using `git cherry-pick` instead of other options that apply changes in the specified commits, e.g., `git diff`. - * It is a useful tool if a full branch unite is impossible because of incompatible versions in the various Git branches. - - - -### Using the cherry-pick command - -In the `cherry-pick` command's simplest form, you can just use the [SHA][3] identifier for the commit you want to integrate into your current HEAD branch. - -To get the commit hash, you can use the `git log` command: - - -``` -`$ git log --oneline` -``` - -Once you know the commit hash, you can use the `cherry-pick` command. - -The syntax is: - - -``` -`$ git cherry-pick ` -``` - -For example: - - -``` -`$ git cherry-pick 65be1e5` -``` - -This will dedicate the specified change to your currently checked-out branch. - -If you'd like to make further modifications, you can also instruct Git to add commit changes to your working copy. - -The syntax is: - - -``` -`$ git cherry-pick --no-commit` -``` - -For example: - - -``` -`$ git cherry-pick 65be1e5 --no-commit` -``` - -If you would like to select more than one commit simultaneously, add their commit hashes separated by a space: - - -``` -`$ git cherry-pick hash1 hash3` -``` - -When cherry-picking commits, you can't use the `git pull` command because it fetches _and_ automatically merges commits from one repository into another. The `cherry-pick` command is a tool you use to specifically not do that; instead, use `git fetch`, which fetches commits but does not apply them. There's no doubt that `git pull` is convenient, but it's imprecise. - -### Try it yourself - -To try the process, launch a terminal and generate a sample project: - - -``` -$ mkdir fruit.git -$ cd fruit.git -$ git init . -``` - -Create some data and commit it: - - -``` -$ echo "Kiwifruit" > fruit.txt -$ git add fruit.txt -$ git commit -m 'First commit' -``` - -Now, represent a remote developer by creating a fork of your project: - - -``` -$ mkdir ~/fruit.fork -$ cd !$ -$ echo "Strawberry" >> fruit.txt -$ git add fruit.txt -$ git commit -m 'Added a fruit" -``` - -That's a valid commit. Now, create a bad commit to represent something you wouldn't want to merge into your project: - - -``` -$ echo "Rhubarb" >> fruit.txt -$ git add fruit.txt -$ git commit -m 'Added a vegetable that tastes like a fruit" -``` - -Return to your authoritative repo and fetch the commits from your imaginary developer: - - -``` -$ cd ~/fruit.git -$ git remote add dev ~/fruit.fork -$ git fetch dev -remote: Counting objects: 6, done. -remote: Compressing objects: 100% (2/2), done. -remote: Total 6 (delta 0), reused 0 (delta 0) -Unpacking objects: 100% (6/6), done... - -[/code] [code] - -$ git log –oneline dev/master -e858ab2 Added a vegetable that tastes like a fruit -0664292 Added a fruit -b56e0f8 First commit -``` - -You've fetched the commits from your imaginary developer, but you haven't merged them into your repository yet. You want to accept the second commit but not the third, so use `cherry-pick`: - - -``` -`$ git cherry-pick 0664292` -``` - -The second commit is now in your repository: - - -``` -$ cat fruit.txt -Kiwifruit -Strawberry -``` - -Push your changes to your remote server, and you're done! - -### Reasons to avoid cherry-picking - -Cherry-picking is usually discouraged in the developer community. The primary reason is that it creates duplicate commits, but you also lose the ability to track your commit history. - -If you're cherry-picking a lot of commits out of order, those commits will be recorded in your branch, and it might lead to undesirable results in your Git branch. - -Cherry-picking is a powerful command that might cause problems if it's used without a proper understanding of what might occur. However, it may save your life (or at least your day job) when you mess up and make commits to the wrong branches. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/cherry-picking-git - -作者:[Rajeev Bera][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/acompiler -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/pictures/cherry-picking-recipe-baking-cooking.jpg?itok=XVwse6hw (Measuring and baking a cherry pie recipe) -[2]: https://acompiler.com/git-head/ -[3]: https://en.wikipedia.org/wiki/Secure_Hash_Algorithms diff --git a/translated/tech/20210407 What is Git cherry-picking.md b/translated/tech/20210407 What is Git cherry-picking.md new file mode 100644 index 0000000000..91ead9d3c8 --- /dev/null +++ b/translated/tech/20210407 What is Git cherry-picking.md @@ -0,0 +1,200 @@ +[#]: subject: (What is Git cherry-picking?) +[#]: via: (https://opensource.com/article/21/4/cherry-picking-git) +[#]: author: (Rajeev Bera https://opensource.com/users/acompiler) +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +什么是 Git cherry-pick? +====== +了解 git cherry-pick 命令是什么,为什么用以及如何使用。 +![Measuring and baking a cherry pie recipe][1] + +当你和一群程序员一起工作时,无论项目大小,处理多个 Git 分支之间的变化都会变得很困难。有时,你不想将整个 Git 分支合并到另一个分支,而是想选择并移动几个特定的提交。这个过程被称为 ”cherry-pick“。 + +本文将介绍 cherry-pick 是什么、为何使用以及如何使用。 + +那么让我们开始吧。 + +### 什么是 cherry-pick? + +使用 `cherry-pick` 命令,Git 可以让你将任何分支中的个别提交合并到你当前的 [Git HEAD][2] 分支中。 + +当执行 `git merge` 或者 `git rebase` 时,一个分支的所有提交都会被合并。`cherry-pick` 命令允许你选择单个提交进行整合。 + +### cherry-pick 的好处 + +下面的情况可能会让你更容易理解 cherry-pick 的功能。 + +想象一下,你正在为即将到来的每周冲刺实现新功能。当你的代码准备好了,你会把它推送到远程分支,准备进行测试。 + +然而,客户并不对所有修改满意,要求你只呈现某些修改。因为客户还没有批准下次发布的所有修改,所以 `git rebase` 不会有预期的结果。为什么会这样?因为 `git rebase` 或者 `git merge` 会把上一个冲刺的每一个调整都纳入其中。 + +cherry-pick 是答案!因为它只关注在提交中添加的变化,所以 cherry-pick 只会带入批准的变化,而不添加其他提交。 + +还有其他几个原因可以使用 cherry-pick: + + * 这对于 bug 修复是必不可少的,因为 bug 是在开发分支中使用他们的提交产生的。 + * 你可以通过使用 `git cherry-pick` 来避免不必要的工作,而不用使用其他选项例如 `git diff` 来应用特定更改。 + * 如果因为不同 Git 分支的版本不兼容而无法将整个分支联合起来,那么它是一个很有用的工具。 + + + +### 使用 cherry-pick 命令 + +在 `cherry-pick` 命令的最简单形式中,你只需使用 [SHA][3] 标识符来表示你想整合到当前 HEAD 分支的提交。 + +要获得提交的哈希值,可以使用 `git log` 命令: + + +``` +`$ git log --oneline` +``` + +当你知道了提交的哈希值后,你就可以使用 `cherry-pick` 命令。 + +语法是: + + +``` +`$ git cherry-pick ` +``` + +例如: + + +``` +`$ git cherry-pick 65be1e5` +``` + +这将会把指定的修改合并到当前已签出的分支上。 + +如果你想做进一步的修改,也可以让 Git 在你的工作副本中添加提交修改。 + +语法是: + + +``` +`$ git cherry-pick --no-commit` +``` + +例如: + + +``` +`$ git cherry-pick 65be1e5 --no-commit` +``` + +如果你想同时选择多个提交,请将它们的提交哈希值用空格隔开: + + +``` +`$ git cherry-pick hash1 hash3` +``` + +当 cherry-pick 提交时,你不能使用 `git pull` 命令,因为它能获取一个仓库的提交_并_自动合并到另一个仓库。`cherry-pick` 并不是一个专门这么做的工具。相反,你可以使用 `git fetch`,它可以获取提交,但不应用它们。毫无疑问,`git pull` 很方便,但它不精确。 + +### 自己尝试 + +要尝试这个过程,启动终端并生成一个示例项目: + + +``` +$ mkdir fruit.git +$ cd fruit.git +$ git init . +``` + +创建一些数据并提交: + + +``` +$ echo "Kiwifruit" > fruit.txt +$ git add fruit.txt +$ git commit -m 'First commit' +``` + +现在,通过创建一个项目的分叉来代表一个远程开发者: + + +``` +$ mkdir ~/fruit.fork +$ cd !$ +$ echo "Strawberry" >> fruit.txt +$ git add fruit.txt +$ git commit -m 'Added a fruit" +``` + +这是一个有效的提交。现在,创建一个不好的提交,代表你不想合并到你的项目中的东西: + + +``` +$ echo "Rhubarb" >> fruit.txt +$ git add fruit.txt +$ git commit -m 'Added a vegetable that tastes like a fruit" +``` + +返回你的仓库,从你的假想的开发者那里获取提交的内容: + + +``` +$ cd ~/fruit.git +$ git remote add dev ~/fruit.fork +$ git fetch dev +remote: Counting objects: 6, done. +remote: Compressing objects: 100% (2/2), done. +remote: Total 6 (delta 0), reused 0 (delta 0) +Unpacking objects: 100% (6/6), done... + +[/code] [code] + +$ git log –oneline dev/master +e858ab2 Added a vegetable that tastes like a fruit +0664292 Added a fruit +b56e0f8 First commit +``` + +你已经从你想象中的开发者那里获取了提交的内容,但你还没有将它们合并到你的版本库中。你想接受第二个提交,但不想接受第三个提交,所以使用 `cherry-pick`。 + + +``` +`$ git cherry-pick 0664292` +``` + +第二次提交现在在你的仓库里了: + + +``` +$ cat fruit.txt +Kiwifruit +Strawberry +``` + +将你的更改推送到远程服务器上,这就完成了! + +### 避免使用 cherry-pick 的原因 + +在开发者社区中,通常不鼓励 cherry-pick。主要原因是它会造成重复提交,但你也失去了跟踪提交历史的能力。 + +如果你不按顺序地 cherry-pick 了大量的提交,这些提交会被记录在你的分支中,这可能会在 Git 分支中导致不理想的结果。 + +cherry-pick 是一个强大的命令,如果没有正确理解可能发生的情况,它可能会导致问题。不过,当你搞砸了,提交到错误的分支时,它可能会救你一命(至少是你当天的工作)。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/cherry-picking-git + +作者:[Rajeev Bera][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/acompiler +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/pictures/cherry-picking-recipe-baking-cooking.jpg?itok=XVwse6hw (Measuring and baking a cherry pie recipe) +[2]: https://acompiler.com/git-head/ +[3]: https://en.wikipedia.org/wiki/Secure_Hash_Algorithms From 041e3cb6a346424221944962ddefc70d0dfa25c6 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 13 Apr 2021 08:46:39 +0800 Subject: [PATCH 656/818] translating --- ...210407 Why I love using bspwm for my Linux window manager.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210407 Why I love using bspwm for my Linux window manager.md b/sources/tech/20210407 Why I love using bspwm for my Linux window manager.md index c3285f24f2..1e1a8f7ee1 100644 --- a/sources/tech/20210407 Why I love using bspwm for my Linux window manager.md +++ b/sources/tech/20210407 Why I love using bspwm for my Linux window manager.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/4/bspwm-linux) [#]: author: (Stephen Adams https://opensource.com/users/stevehnh) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 32b62d83004d186492cee92870879df2df8dded7 Mon Sep 17 00:00:00 2001 From: stevenzdg988 <3442417@qq.com> Date: Tue, 13 Apr 2021 14:40:02 +0800 Subject: [PATCH 657/818] =?UTF-8?q?=E7=94=B3=E9=A2=86=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20210405 7 Git tips for managing your home directory.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20210405 7 Git tips for managing your home directory.md b/sources/tech/20210405 7 Git tips for managing your home directory.md index 1239482260..3d6beeb574 100644 --- a/sources/tech/20210405 7 Git tips for managing your home directory.md +++ b/sources/tech/20210405 7 Git tips for managing your home directory.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/4/git-home) [#]: author: (Seth Kenlon https://opensource.com/users/seth) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (stevenzdg988) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -122,7 +122,7 @@ via: https://opensource.com/article/21/4/git-home 作者:[Seth Kenlon][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[stevenzdg988](https://github.com/stevenzdg988) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 9f21e3ceb4f6bc053e4e840fa805a2a41ce64ee1 Mon Sep 17 00:00:00 2001 From: "Qian.Sun" Date: Tue, 13 Apr 2021 16:58:02 +0800 Subject: [PATCH 658/818] translated by DCOLIVERSUN 4 ways open source gives you a competitive edge is translated by DCOLIVERSUN --- ...pen source gives you a competitive edge.md | 83 ------------------- ...pen source gives you a competitive edge.md | 83 +++++++++++++++++++ 2 files changed, 83 insertions(+), 83 deletions(-) delete mode 100644 sources/tech/20210409 4 ways open source gives you a competitive edge.md create mode 100644 translated/tech/20210409 4 ways open source gives you a competitive edge.md diff --git a/sources/tech/20210409 4 ways open source gives you a competitive edge.md b/sources/tech/20210409 4 ways open source gives you a competitive edge.md deleted file mode 100644 index a8782c3749..0000000000 --- a/sources/tech/20210409 4 ways open source gives you a competitive edge.md +++ /dev/null @@ -1,83 +0,0 @@ -[#]: subject: (4 ways open source gives you a competitive edge) -[#]: via: (https://opensource.com/article/21/4/open-source-competitive-advantage) -[#]: author: (Jason Blais https://opensource.com/users/jasonblais) -[#]: collector: (lujun9972) -[#]: translator: (DCOLIVERSUN) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -4 ways open source gives you a competitive edge -====== -Using open source technology can help organizations drive better -business outcomes. -![Open ethernet cords.][1] - -Building a tech stack is a major decision for every organization. While picking the right tools will set your team up for success, picking the wrong solutions or platforms can have devastating effects on productivity and profitability. To succeed in today's fast-paced world, organizations must make smart investments in digital solutions that enable them to move faster and increase operational agility. - -This is precisely why more and more organizations of all sizes and across all industries are embracing open source solutions. According to a recent [McKinsey][2] report, open source adoption is the biggest differentiator for top-performing organizations. - -Here are four reasons why adopting open source technology can help organizations drive competitive advantage and experience better business outcomes. - -### 1\. Extensibility and flexibility - -Suffice it to say the world of technology moves quickly. For example, Kubernetes didn't exist before 2014, but today, it's impressively ubiquitous. According to the CNCF's [2020 Cloud Native Survey][3], 91% of teams are using Kubernetes in some form. - -One of the main reasons organizations are investing in open source is because it enables them to operate with agility and rapidly integrate new technologies into their stack. That's compared to the more traditional approach, where teams would take quarters or even years to vet, implement, and adopt software—making it impossible for them to pivot with any sense of urgency. - -Since open source solutions offer complete access to source code, teams can easily connect the software to the other tools they use every day. - -Simply put, open source enables development teams to build the perfect tool for what is at hand instead of being forced to change how they work to fit into how inflexible proprietary tools are designed. - -### 2\. Security and high-trust collaboration - -In the age of high-profile data breaches, organizations need highly secure tools that enable them to keep sensitive data secure. - -When vulnerabilities exist in proprietary solutions, they're often undiscovered until it's too late. Unfortunately for the teams using these platforms, the lack of visibility into source code means they're essentially outsourcing security to the specific vendor and hoping for the best. - -Another main driver of open source adoption is that open source tools enable organizations to take control over their own security. For example, open source projects—particularly those with large communities—tend to receive more responsible vulnerability disclosures because everyone using the product can thoroughly inspect the source code. - -Since the source code is freely available, such disclosures often come with detailed proposed solutions for fixing bugs. This enables dev teams to remedy issues faster, continuously strengthening the software. - -In the age of remote work, it's more important than ever for distributed teams to collaborate while knowing that sensitive data stays protected. Since open source solutions allow organizations to audit security while maintaining complete control over their data, they can facilitate the high-trust collaboration needed to thrive in remote environments. - -### 3\. Freedom from vendor lock-in - -According to a [recent study][4], 68% of CIOs are concerned about vendor lock-in. They should be. When you're locked into a piece of technology, you're forced to live with someone else's conclusions instead of making your own. - -Proprietary solutions often make it [challenging to take data with you][5] when an organization switches vendors. On the other hand, open source tools offer the freedom and flexibility needed to avoid vendor lock-in and take data wherever an organization wants to go. - -### 4\. Top talent and community - -As more and more companies [embrace remote work][6], the war for talent is becoming even more competitive. - -In the world of software development, landing top talent starts with giving engineers access to modern tools that enable them to reach their full potential at work. Since developers increasingly [prefer open source solutions][7] to proprietary counterparts, organizations should strongly consider open source alternatives to their commercial solutions to attract the best developers on the market. - -In addition to making it easier to hire and retain top talent, open source platforms also enable companies to tap into a community of contributors for advice on how to walk through problems and get the most out of the platform. Plus, members of the community also [contribute to open source projects directly][8]. - -### Open source offers freedom - -Open source software is increasingly popular among enterprise teams—[for good reason][9]. It gives teams the flexibility needed to build the perfect tool for the job while enabling them to maintain a highly secure environment. At the same time, an open source approach allows teams to maintain control of their future, rather than being locked into one vendor's roadmap. And it also gives companies access to talented engineers and members of the open source community. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/open-source-competitive-advantage - -作者:[Jason Blais][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/jasonblais -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/openwires_fromRHT_520_0612LL.png?itok=PqZi55Ab (Open ethernet cords.) -[2]: https://www.mckinsey.com/industries/technology-media-and-telecommunications/our-insights/developer-velocity-how-software-excellence-fuels-business-performance# -[3]: https://www.cncf.io/blog/2020/11/17/cloud-native-survey-2020-containers-in-production-jump-300-from-our-first-survey/ -[4]: https://solutionsreview.com/cloud-platforms/flexera-68-percent-of-cios-worry-about-vendor-lock-in-with-public-cloud/ -[5]: https://www.computerworld.com/article/3428679/mattermost-makes-case-for-open-source-as-team-messaging-market-booms.html -[6]: https://mattermost.com/blog/tips-for-working-remotely/ -[7]: https://opensource.com/article/20/6/open-source-developers-survey -[8]: https://mattermost.com/blog/100-most-popular-mattermost-features-invented-and-contributed-by-our-amazing-open-source-community/ -[9]: https://mattermost.com/open-source-advantage/ diff --git a/translated/tech/20210409 4 ways open source gives you a competitive edge.md b/translated/tech/20210409 4 ways open source gives you a competitive edge.md new file mode 100644 index 0000000000..6c16fd31d6 --- /dev/null +++ b/translated/tech/20210409 4 ways open source gives you a competitive edge.md @@ -0,0 +1,83 @@ +[#]: subject: (4 ways open source gives you a competitive edge) +[#]: via: (https://opensource.com/article/21/4/open-source-competitive-advantage) +[#]: author: (Jason Blais https://opensource.com/users/jasonblais) +[#]: collector: (lujun9972) +[#]: translator: (DCOLIVERSUN) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +4 ways open source gives you a competitive edge +开源为你带来竞争优势的 4 条理由 +====== +使用开源技术可以帮助组织获得更好的业务结果。 +![开放式以太网线缆][1] + +构建技术栈是每个组织的主要决策。选择合适的工具将让团队获得成功,选择错误的解决方案或平台会对生产率和利润率产生毁灭性影响。为了在当今快节奏的世界中脱颖而出,组织必须明智地选择数字解决方案,好的数字解决方案可以提升团队行动力与运营敏捷性。 + +这就是为什么越来越多的组织都采用开源解决方案的原因,这些组织来自各行各业,规模有大有小。根据[麦肯锡][2]最近的报告,高绩效组织的最大区别是采用不同的开源方案。 + +采用开源技术可以帮助组织提高竞争优势、获得更好业务成果的原因有以下四点。 + +### 1\. 可拓展性和灵活性 + +可以说,技术世界发展很快。例如,在2014年之前,Kubernetes 并不存在,但今天,它却令人印象深刻,无处不在。根据 CNCF [2020 云原生调查][3],91% 的团队正在以某种形式使用 Kubernetes。 + +组织投资开源的一个主要原因是因为开源赋予组织行动敏捷性,组织迅速将新技术集成到技术栈中。这与传统方法不同,在传统方法中,团队需要几个季度甚至几年来审查、实施、采用软件,这导致团队不可能实现火速转变。 + +开源解决方案完整地提供源代码,团队可以轻松将软件与他们每天使用的工具连接起来。 + +简而言之,开源让开发团队能够为手头的东西构建完美的工具,而不是被迫改变工作方式来适应不灵活的专有工具。 + +### 2\. 安全性和高可信的协作 + +在数据泄露备受瞩目的时代,组织需要高度安全的工具来保护敏感数据的安全。 + +专有解决方案中的漏洞不易被发现,被发现时为时已晚。不幸的是,使用这些平台的团队无法看到源代码,本质上他们将安全性外包给特定供应商,希望得到最好的结果。 + +采用开源的另一个主要原因是开源工具使组织能够自己把控安全。例如,开源项目——尤其是大型开源社区的项目——往往会收到更负责任的漏洞披露,因为每个人在使用过程中都可以彻底检查源代码。 + +由于源代码是免费提供的,因此披露通常伴随着修复缺陷的详细建议解决方案。这些方案使得开发团队能够快速解决问题,不断增强软件。 + +在远程办公时代,协作的分布式团队知道敏感数据受到保护比以往任何时候都更重要。开源解决方案允许组织审核安全性、完成掌控自己数据,因此开源方案可以促进远程环境下高可信协作方式的成长。 + +### 3\. 不受供应商限制 + +根据[最近的一项研究][4],68% 的 CIO 担心受供应商限制。当你受限于一项技术中,你会被迫接受别人的结论,而不是自己做结论。 + +当组织更换供应商时,专有解决方案通常会[给你带来数据使用挑战][5]。另一方面,开源工具提供了组织需要的自由度和灵活性,以避免受供应商限制,开源工具可以让组织把数据带去任意地方。 + +### 4\. 顶尖人才和社区 + +随着越来越多的公司[接受远程办公][6],人才争夺战变得愈发激烈。 + +在软件开发领域,获得顶尖人才始于赋予工程师先进工具,让工程师在工作中充分发挥潜力。开发人员[越来越喜欢开源解决方案][7]而不是专有解决方案,组织应该强烈考虑用开源替代商业解决方案,以吸引市场上最好的开发人员。 + +除了雇佣、留住顶尖人才更容易,公司能够通过开源平台利用贡献者社区,得到解决问题的建议,从平台中得到最大收益。此外,社区成员还[直接贡献开源项目][8]。 + +### 开源带来自由 + +开源软件在企业团队中越来越受到欢迎——[这是有原因的][8]。它帮助团队灵活地构建完美的工作工具,同时使团队可以维护高度安全的环境。同时,开源允许团队掌控未来方向,而不是局限于供应商的路线图。开源还帮助公司接触才华横溢的工程师和开源社区成员。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/open-source-competitive-advantage + +作者:[Jason Blais][a] +选题:[lujun9972][b] +译者:[DCOLIVERSUN](https://github.com/DCOLIVERSUN) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jasonblais +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/openwires_fromRHT_520_0612LL.png?itok=PqZi55Ab (Open ethernet cords.) +[2]: https://www.mckinsey.com/industries/technology-media-and-telecommunications/our-insights/developer-velocity-how-software-excellence-fuels-business-performance# +[3]: https://www.cncf.io/blog/2020/11/17/cloud-native-survey-2020-containers-in-production-jump-300-from-our-first-survey/ +[4]: https://solutionsreview.com/cloud-platforms/flexera-68-percent-of-cios-worry-about-vendor-lock-in-with-public-cloud/ +[5]: https://www.computerworld.com/article/3428679/mattermost-makes-case-for-open-source-as-team-messaging-market-booms.html +[6]: https://mattermost.com/blog/tips-for-working-remotely/ +[7]: https://opensource.com/article/20/6/open-source-developers-survey +[8]: https://mattermost.com/blog/100-most-popular-mattermost-features-invented-and-contributed-by-our-amazing-open-source-community/ +[9]: https://mattermost.com/open-source-advantage/ From fbd019e0f9bdb0d3f366bf68a8ef87217baff0a7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 13 Apr 2021 22:13:40 +0800 Subject: [PATCH 659/818] APL --- .../20210331 3 reasons I use the Git cherry-pick command.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210331 3 reasons I use the Git cherry-pick command.md b/sources/tech/20210331 3 reasons I use the Git cherry-pick command.md index 0ce31f8798..dcf32b229b 100644 --- a/sources/tech/20210331 3 reasons I use the Git cherry-pick command.md +++ b/sources/tech/20210331 3 reasons I use the Git cherry-pick command.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/3/git-cherry-pick) [#]: author: (Manaswini Das https://opensource.com/users/manaswinidas) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 90c9dd350a3350c7d6778830d031d95708f3c693 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 13 Apr 2021 22:25:57 +0800 Subject: [PATCH 660/818] Translating: 5 signs you're a groff programmer --- sources/tech/20210410 5 signs you-re a groff programmer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210410 5 signs you-re a groff programmer.md b/sources/tech/20210410 5 signs you-re a groff programmer.md index 6708800e7e..9cb584d1bc 100644 --- a/sources/tech/20210410 5 signs you-re a groff programmer.md +++ b/sources/tech/20210410 5 signs you-re a groff programmer.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/4/groff-programmer) [#]: author: (Jim Hall https://opensource.com/users/jim-hall) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (liweitianux) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 72a5bfb63dcc8c044fccadec6be60bb78844fd17 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 13 Apr 2021 22:59:32 +0800 Subject: [PATCH 661/818] TSL --- ...asons I use the Git cherry-pick command.md | 198 ------------------ ...asons I use the Git cherry-pick command.md | 181 ++++++++++++++++ 2 files changed, 181 insertions(+), 198 deletions(-) delete mode 100644 sources/tech/20210331 3 reasons I use the Git cherry-pick command.md create mode 100644 translated/tech/20210331 3 reasons I use the Git cherry-pick command.md diff --git a/sources/tech/20210331 3 reasons I use the Git cherry-pick command.md b/sources/tech/20210331 3 reasons I use the Git cherry-pick command.md deleted file mode 100644 index dcf32b229b..0000000000 --- a/sources/tech/20210331 3 reasons I use the Git cherry-pick command.md +++ /dev/null @@ -1,198 +0,0 @@ -[#]: subject: (3 reasons I use the Git cherry-pick command) -[#]: via: (https://opensource.com/article/21/3/git-cherry-pick) -[#]: author: (Manaswini Das https://opensource.com/users/manaswinidas) -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -3 reasons I use the Git cherry-pick command -====== -Cherry-picking solves a lot of problems in Git repositories. Here are -three ways to fix your mistakes with git cherry-pick. -![Measuring and baking a cherry pie recipe][1] - -Finding your way around a version control system can be tricky. It can be massively overwhelming for a newbie, but being well-versed with the terminology and the basics of a version control system like Git is one of the baby steps to start contributing to open source. - -Being familiar with Git can also help you out of sticky situations in your open source journey. Git is powerful and makes you feel in control—there is not a single way in which you cannot revert to a working version. - -Here is an example to help you understand the importance of cherry-picking. Suppose you have made several commits in a branch, but you realize it's the wrong branch! What do you do now? Either you repeat all your changes in the correct branch and make a fresh commit, or you merge the branch into the correct branch. Wait, the former is too tedious, and you may not want to do the latter. So, is there a way? Yes, Git's got you covered. Here is where cherry-picking comes into play. As the term suggests, you can use it to hand-pick a commit from one branch and transfer it into another branch. - -There are various reasons to use cherry-picking. Here are three of them. - -### Avoid redundancy of efforts - -There's no need to redo the same changes in a different branch when you can just copy the same commits to the other branch. Please note that cherry-picking commits will create a fresh commit with a new hash in the other branch, so please don't be confused if you see a different commit hash. - -In case you are wondering what a commit hash is and how it is generated, here is a note to help you: A commit hash is a string generated using the [SHA-1][2] algorithm. The SHA-1 algorithm takes an input and outputs a unique 40-character hash. If you are on a [POSIX][3] system, try running this in your terminal: - - -``` -`$ echo -n "commit" | openssl sha1` -``` - -This outputs a unique 40-character hash, `4015b57a143aec5156fd1444a017a32137a3fd0f`. This hash represents the string `commit`. - -A SHA-1 hash generated by Git when you make a commit represents much more than just a single string. It represents: - - -``` -sha1( -    meta data -        commit message -        committer -        commit date -        author -        authoring date -    Hash of the entire tree object -) -``` - -This explains why you get a unique commit hash for the slightest change you make to your code. Not even a single change goes unnoticed. This is because Git has integrity. - -### Undoing/restoring lost changes - -Cherry-picking can be handy when you want to restore to a working version. When multiple developers are working on the same codebase, it is very likely for changes to get lost and the latest version to move to a stale or non-working version. That's where cherry-picking commits to the working version can be a savior. - -#### How does it work? - -Suppose there are two branches, `feature1` and `feature2`, and you want to apply commits from `feature1` to `feature2`. - -On the `feature1` branch, run a `git log` command, and copy the commit hash that you want to cherry-pick. You can see a series of commits resembling the code sample below. The alphanumeric code following "commit" is the commit hash that you need to copy. You may choose to copy the first six characters (`966cf3` in this example) for the sake of convenience: - - -``` -commit 966cf3d08b09a2da3f2f58c0818baa37184c9778 (HEAD -> master) -Author: manaswinidas <[me@example.com][4]> -Date:   Mon Mar 8 09:20:21 2021 +1300 - -   add instructions -``` - -Then switch to `feature2` and run `git cherry-pick` on the hash you just got from the log: - - -``` -$ git checkout feature2 -$ git cherry-pick 966cf3. -``` - -If the branch doesn't exist, use `git checkout -b feature2` to create it. - -Here's a catch: You may encounter the situation below: - - -``` -$ git cherry-pick 966cf3 -On branch feature2 -You are currently cherry-picking commit 966cf3d. - -nothing to commit, working tree clean -The previous cherry-pick is now empty, possibly due to conflict resolution. -If you wish to commit it anyway, use: - -   git commit --allow-empty - -Otherwise, please use 'git reset' -``` - -Do not panic. Just run `git commit --allow-empty` as suggested: - - -``` -$ git commit --allow-empty -[feature2 afb6fcb] add instructions -Date: Mon Mar 8 09:20:21 2021 +1300 -``` - -This opens your default editor and allows you to edit the commit message. It's acceptable to save the existing message if you have nothing to add. - -There you go; you did your first cherry-pick. As discussed above, if you run a `git log` on branch `feature2`, you will see a different commit hash. Here is an example: - - -``` -commit afb6fcb87083c8f41089cad58deb97a5380cb2c2 (HEAD -> feature2) -Author: manaswinidas <[me@example.com][4]> -Date:   Mon Mar 8 09:20:21 2021 +1300 -   add instructions -``` - -Don't be confused about the different commit hash. That just distinguishes between the commits in `feature1` and `feature2`. - -### Cherry-pick multiple commits - -But what if you want to cherry-pick multiple commits? You can use: - - -``` -`git cherry-pick ... ` -``` - -Please note that you don't have to use the entire commit hash; you can use the first five or six characters. - -Again, this is tedious. What if the commits you want to cherry-pick are a range of continuous commits? This approach is too much work. Don't worry; there's an easier way. - -Assume that you have two branches: - - * `feature1` includes commits you want to copy (from `commitA` (older) to `commitB`). - * `feature2` is the branch you want the commits to be transferred to from `feature1`. - - - -Then: - - 1. Enter `git checkout `. - 2. Get the hashes of `commitA` and `commitB`. - 3. Enter `git checkout `. - 4. Enter `git cherry-pick ^..` (please note that this includes `commitA` and `commitB`). - 5. Should you encounter a merge conflict, [solve it as usual][5] and then type `git cherry-pick --continue` to resume the cherry-pick process. - - - -### Important cherry-pick options - -Here are some useful options from the [Git documentation][6] that you can use with the `cherry-pick` command: - - * `-e`, `--edit`: With this option, `git cherry-pick` lets you edit the commit message prior to committing. - * `-s`, `--signoff`: Add a "Signed-off-by" line at the end of the commit message. See the signoff option in git-commit(1) for more information. - * `-S[]`, `--gpg-sign[=]`: These are GPG-sign commits. The `keyid` argument is optional and defaults to the committer identity; if specified, it must be stuck to the option without a space. - * `--ff`: If the current HEAD is the same as the parent of the cherry-picked commit, then a fast-forward to this commit will be performed. - - - -Here are some other sequencer subcommands (apart from continue): - - * `--quit`: You can forget about the current operation in progress. This can be used to clear the sequencer state after a failed cherry-pick or revert. - * `--abort`: Cancel the operation and return to the presequence state. - - - -Here are some examples of cherry-picking: - - * `git cherry-pick master`: Applies the change introduced by the commit at the tip of the master branch and creates a new commit with this change - * `git cherry-pick master~4 master~2`: Applies the changes introduced by the fifth and third-last commits pointed to by master and creates two new commits with these changes - - - -Feeling overwhelmed? You needn't remember all the commands. You can always type `git cherry-pick --help` in your terminal to look at more options or help. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/git-cherry-pick - -作者:[Manaswini 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://opensource.com/users/manaswinidas -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/pictures/cherry-picking-recipe-baking-cooking.jpg?itok=XVwse6hw (Measuring and baking a cherry pie recipe) -[2]: https://en.wikipedia.org/wiki/SHA-1 -[3]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains -[4]: mailto:me@example.com -[5]: https://opensource.com/article/20/4/git-merge-conflict -[6]: https://git-scm.com/docs/git-cherry-pick diff --git a/translated/tech/20210331 3 reasons I use the Git cherry-pick command.md b/translated/tech/20210331 3 reasons I use the Git cherry-pick command.md new file mode 100644 index 0000000000..01c228978c --- /dev/null +++ b/translated/tech/20210331 3 reasons I use the Git cherry-pick command.md @@ -0,0 +1,181 @@ +[#]: subject: (3 reasons I use the Git cherry-pick command) +[#]: via: (https://opensource.com/article/21/3/git-cherry-pick) +[#]: author: (Manaswini Das https://opensource.com/users/manaswinidas) +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +我使用 Git cherry-pick 命令的 3 个理由 +====== + +> “挑选”可以解决 Git 仓库中的很多问题。以下是用 `git cherry-pick` 修复错误的三种方法。 + +![测量和烘烤樱桃派配方][1] + +在版本控制系统中摸索前进是一件很棘手的事情。对于一个新手来说,这可能是非常难以应付的,但熟悉版本控制系统(如 Git)的术语和基础知识是开始为开源贡献的第一步。 + +熟悉 Git 也能帮助你在开源之路上走出困境。Git 功能强大,让你感觉自己在掌控之中 —— 没有哪一种方法会让你无法恢复到工作版本。 + +这里有一个例子可以帮助你理解“挑选”的重要性。假设你已经在一个分支上做了好几个提交,但你意识到这是个错误的分支!你现在该怎么办?你现在要做什么?要么在正确的分支上重复所有的修改,然后重新提交,要么把这个分支合并到正确的分支上。等等,前者太过繁琐,而你可能不想做后者。那么,有没有办法呢?是的,Git 已经为你准备好了。这就是挑选的作用。顾名思义,你可以用它从一个分支中手工挑选一个提交,然后转移到另一个分支。 + +使用挑选的原因有很多。以下是其中的三个原因。 + +### 避免重复性工作 + +如果你可以直接将相同的提交复制到另一个分支,就没有必要在不同的分支中重做相同的修改。请注意,挑选出来的提交会在另一个分支中创建带有新哈希的新提交,所以如果你看到不同的提交哈希,请不要感到困惑。 + +如果您想知道什么是提交的哈希,以及它是如何生成的,这里有一个说明可以帮助你。提交哈希是用 [SHA-1][2] 算法生成的字符串。SHA-1 算法接收一个输入,然后输出一个唯一的 40 个字符的哈希值。如果你使用的是 [POSIX][3] 系统,请尝试在您的终端上运行这个程序: + +``` +$ echo -n "commit" | openssl sha1 +``` + +这将输出一个唯一的 40 个字符的哈希值 `4015b57a143aec5156fd1444a017a32137a3fd0f`。这个哈希表示字符串 `commit`。 + +Git 在提交时生成的 SHA-1 哈希值不仅仅代表一个字符串。它代表的是: + +``` +sha1( +    meta data +        commit message +        committer +        commit date +        author +        authoring date +    Hash of the entire tree object +) +``` + +这就解释了为什么你对代码所做的任何细微改动都会得到一个独特的提交哈希值。哪怕是一个微小的改动都会被发现。这是因为Git具有完整性。 + +### 撤销/恢复丢失的更改 + +当你想恢复到工作版本时,挑选就很方便。当多个开发人员在同一个代码库上工作时,很可能会丢失更改,最新的版本会被转移到一个陈旧的或非工作版本上。这时,挑选提交到工作版本就可以成为救星。 + +#### 它是如何工作的? + +假设有两个分支,`feature1` 和 `feature2`,你想把 `feature1` 中的提交应用到 `feature2`。 + +在 `feature1` 分支上,运行 `git log` 命令,复制你想挑选的提交哈希值。你可以看到一系列类似于下面代码示例的提交。`commit` 后面的字母数字代码就是你需要复制的提交哈希。为了方便起见,您可以选择复制前六个字符(本例中为 `966cf3`)。 + +``` +commit 966cf3d08b09a2da3f2f58c0818baa37184c9778 (HEAD -> master) +Author: manaswinidas <[me@example.com][4]> +Date:   Mon Mar 8 09:20:21 2021 +1300 + +   add instructions +``` + +然后切换到 `feature2` 分支,在刚刚从日志中得到的哈希值上运行 `git cherry-pick`: + +``` +$ git checkout feature2 +$ git cherry-pick 966cf3. +``` + +如果该分支不存在,使用 `git checkout -b feature2` 来创建它。 + +这里有一个问题。你可能会遇到下面这种情况: + +``` +$ git cherry-pick 966cf3 +On branch feature2 +You are currently cherry-picking commit 966cf3d. + +nothing to commit, working tree clean +The previous cherry-pick is now empty, possibly due to conflict resolution. +If you wish to commit it anyway, use: + +   git commit --allow-empty + +Otherwise, please use 'git reset' +``` + +不要惊慌。只要按照建议运行 `git commit --allow-empty`: + +``` +$ git commit --allow-empty +[feature2 afb6fcb] add instructions +Date: Mon Mar 8 09:20:21 2021 +1300 +``` + +这将打开你的默认编辑器,允许你编辑提交信息。如果你没有什么要补充的,可以保存现有的信息。 + +就这样,你完成了你的第一次挑选。如上所述,如果你在分支 `feature2` 上运行 `git log`,你会看到一个不同的提交哈希。下面是一个例子: + +``` +commit afb6fcb87083c8f41089cad58deb97a5380cb2c2 (HEAD -> feature2) +Author: manaswinidas <[me@example.com][4]> +Date:   Mon Mar 8 09:20:21 2021 +1300 +   add instructions +``` + +不要对不同的提交哈希感到困惑。这只是区分 `feature1` 和 `feature2` 的提交。 + +### 挑选多个提交 + +但如果你想挑选多个提交的内容呢?你可以使用: + +``` +git cherry-pick ... +``` + +请注意,你不必使用整个提交的哈希值,你可以使用前五到六个字符。 + +同样,这也是很繁琐的。如果你想挑选的提交是一系列的连续提交呢?这种方法太费劲了。别担心,有一个更简单的方法。 + +假设你有两个分支: + + * `feature1` 包括你想复制的提交(从更早的 `commitA` 到 `commitB`)。 + * `feature2` 是你想把提交从 `feature1` 转移到的分支。 + +然后: + + 1. 输入 `git checkout `。 + 2. 获取 `commitA` 和 `commitB` 的哈希值。 + 3. 输入 `git checkout `。 + 4. 输入 `git cherry-pick ^..` (请注意,这包括 `commitA` 和 `commitB`)。 + 5. 如果遇到合并冲突,[像往常一样解决][5],然后输入 `git cherry-pick --continue` 恢复挑选过程。 + +### 重要的挑选选项 + +以下是 [Git 文档][6] 中的一些有用的选项,你可以在 `cherry-pick` 命令中使用。 + + * `-e`、`--edit`:用这个选项,`git cherry-pick` 可以让你在提交前编辑提交信息。 + * `-s`、`--signoff`:在提交信息的结尾添加 `Signed-off by` 行。更多信息请参见 `git-commit(1)` 中的 signoff 选项。 + * `-S[]`、`--pgg-sign[=]`:这些是 GPG 签名的提交。`keyid` 参数是可选的,默认为提交者身份;如果指定了,则必须卡在选项中,不加空格。 + * `--ff`:如果当前 HEAD 与挑选的提交的父级提交相同,则会对该提交进行快进操作。 + +下面是除了 `--continue` 外的一些其他的后继操作子命令: + + * `--quit`:你可以忘记当前正在进行的操作。这可以用来清除挑选或撤销失败后的后继操作状态。 + * `--abort`:取消操作并返回到操作序列前状态。 + +下面是一些关于挑选的例子: + + * `git cherry-pick master`:应用 `master` 分支顶端的提交所引入的变更,并创建一个包含该变更的新提交。 + * `git cherry-pick master~4 master~2':应用 `master` 指向的第五个和第三个最新提交所带来的变化,并根据这些变化创建两个新的提交。 + +感到不知所措?你不需要记住所有的命令。你可以随时在你的终端输入 `git cherry-pick --help` 查看更多选项或帮助。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/git-cherry-pick + +作者:[Manaswini Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/manaswinidas +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/pictures/cherry-picking-recipe-baking-cooking.jpg?itok=XVwse6hw (Measuring and baking a cherry pie recipe) +[2]: https://en.wikipedia.org/wiki/SHA-1 +[3]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[4]: mailto:me@example.com +[5]: https://opensource.com/article/20/4/git-merge-conflict +[6]: https://git-scm.com/docs/git-cherry-pick From a1e27363eeb1c1779adb6d95486bc7cbcc67c747 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 14 Apr 2021 05:03:23 +0800 Subject: [PATCH 662/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210413=20?= =?UTF-8?q?Create=20an=20encrypted=20file=20vault=20on=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210413 Create an encrypted file vault on Linux.md --- ...Create an encrypted file vault on Linux.md | 119 ++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 sources/tech/20210413 Create an encrypted file vault on Linux.md diff --git a/sources/tech/20210413 Create an encrypted file vault on Linux.md b/sources/tech/20210413 Create an encrypted file vault on Linux.md new file mode 100644 index 0000000000..6c3dbd7bdf --- /dev/null +++ b/sources/tech/20210413 Create an encrypted file vault on Linux.md @@ -0,0 +1,119 @@ +[#]: subject: (Create an encrypted file vault on Linux) +[#]: via: (https://opensource.com/article/21/4/linux-encryption) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Create an encrypted file vault on Linux +====== +Use Linux Unified Key Setup to create an encrypted vault for sensitive +files on a physical drive or cloud storage. +![Secure safe][1] + +Recently, I demonstrated how to [implement full-drive encryption][2] on Linux with LUKS and the `cryptsetup` command. While encrypting a whole drive is useful in many cases, there are reasons you might not want to encode an entire drive. For instance, you might require a drive to work across several platforms, some of which may not have Linux Unified Key Setup ([LUKS][3]) integration. Furthermore, it's the 21st century, the cloud exists, and you may not be using a physical drive for all your data. + +Several years ago, there was a system called [TrueCrypt][4] that allowed users to create encrypted file "vaults," which could be decrypted by TrueCrypt to provide read/write access. It was a useful technique and essentially provided a virtual portable and fully encrypted drive where you could store important data. TrueCrypt closed down, but it serves as an interesting model. + +Fortunately, LUKS is a flexible system, and you can use it and `cryptsetup` to create an encrypted vault as a self-contained file, which you can save on a physical drive or in cloud storage. + +Here's how to do it. + +### 1\. Create an empty file + +First, you must create an empty file of a predetermined size. This serves as a kind of vault or safe in which you can store other files. The command you use for this is `fallocate`, from the `util-linux` package: + + +``` +`$ fallocate --length 512M vaultfile.img` +``` + +This example creates a 512MB file, but you can make yours any size you want. + +### 2\. Create a LUKS volume + +Next, create a LUKS volume within the empty file: + + +``` +$ cryptsetup --verify-passphrase \ +luksFormat vaultfile.img +``` + +### 3\. Open the LUKS volume + +So that you can create a filesystem ready for file storage, you must open the LUKS volume and mount it on your computer first: + + +``` +$ sudo cryptsetup open \ +\--type luks vaultfile.img myvault +$ ls /dev/mapper +myvault +``` + +### 4\. Create a filesystem + +Make a filesystem in your open vault: + + +``` +`$ sudo mkfs.ext4 -L myvault /dev/mapper/myvault` +``` + +If you don't need it for anything right now, you can close it: + + +``` +`$ sudo cryptsetup close myvault` +``` + +### 5\. Start using your encrypted vault + +Now that it's all set up, you can use your encrypted file vault whenever you need to store or access private data. To access your vault, you must mount it as a usable filesystem: + + +``` +$ sudo cryptsetup open \ +\--type luks vaultfile.img myvault +$ ls /dev/mapper +myvault +$ sudo mkdir /myvault +$ sudo mount /dev/mapper/myvault /myvault +``` + +This example opens the vault with `cryptsetup` and then mounts the vault from `/dev/mapper` to a new directory called `/myvault`. As with any volume on Linux, you can mount the LUKS volume anywhere you want, so instead of `/myvault`, you can use `/mnt` or `~/myvault` or whatever you prefer. + +While it's mounted, your LUKS volume is decrypted. You can read and write files to it just as if it were a physical drive. + +When you're finished using your encrypted vault, unmount and close it: + + +``` +$ sudo umount /myvault +$ sudo cryptsetup close myvault +``` + +### Encrypted file vaults + +An image file you encrypt with LUKS is as portable as any other file, so you can store your vault on your hard drive, an external drive, or even on the internet. As long as you have LUKS available, you can decrypt, mount, and use it to keep your data safe. It's easy encryption for improved data safety, so give it a try. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/linux-encryption + +作者:[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/life_bank_vault_secure_safe.png?itok=YoW93h7C (Secure safe) +[2]: https://opensource.com/article/21/3/encryption-luks +[3]: https://gitlab.com/cryptsetup/cryptsetup/blob/master/README.md +[4]: https://en.wikipedia.org/wiki/TrueCrypt From 234d36d5107e39f83a350b4cfcb226e3e0f37b63 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 14 Apr 2021 05:03:35 +0800 Subject: [PATCH 663/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210413=20?= =?UTF-8?q?What's=20new=20with=20Drupal=20in=202021=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210413 What-s new with Drupal in 2021.md --- ...20210413 What-s new with Drupal in 2021.md | 148 ++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 sources/tech/20210413 What-s new with Drupal in 2021.md diff --git a/sources/tech/20210413 What-s new with Drupal in 2021.md b/sources/tech/20210413 What-s new with Drupal in 2021.md new file mode 100644 index 0000000000..c53b7d678b --- /dev/null +++ b/sources/tech/20210413 What-s new with Drupal in 2021.md @@ -0,0 +1,148 @@ +[#]: subject: (What's new with Drupal in 2021?) +[#]: via: (https://opensource.com/article/21/4/drupal-updates) +[#]: author: (Shefali Shetty https://opensource.com/users/shefalishetty) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +What's new with Drupal in 2021? +====== +Its newest initiatives include decoupled menus, automated updates, and +other usability-focused updates. +![Computer screen with files or windows open][1] + +The success of open source projects is largely carried by the pillars of the community and group collaborations. Without putting a stake in the ground to achieve strategic initiatives, an open source project can lose focus. Open source strategic initiatives should aim at solving impactful problems through collaboration involving the project's stakeholders. + +### The why and how of Drupal's strategic initiatives + +As one of the leading open source projects, [Drupal][2]'s success largely thrives on implementing its various proposed strategic initiatives. Drupal's focus on strategic initiatives and continuous innovation since Drupal 7 brought huge architectural changes in Drupal 8, 9, and beyond that offer a platform for continuous innovation on the web and an easy upgrade path for end users. + +The vision for Drupal's core strategic initiatives is determined by Dries Buytaert, Drupal project lead. These initiatives are backed by community collaboration and lead to significant developments driven by forces like: + + * Collaboration with the core maintainers + * Survey data and usability studies + * A vision to build a leading open source digital experience platform + * Relevancy in the market by improving editorial, developer, and customer experiences + * Validation by broader community discussions and collaborations + + + +Once initiatives are **proposed**, they move ahead to the **planned** initiatives stage, where each initiative is nurtured with detailed plans and goals by a strong team of contributors. When an initiative passes through this stage, it moves to the **active** initiatives stage. Here's where the initiatives take structure and come alive. + +Some of the most successful Drupal 8 initiatives, like Twig and Bigpipe, did not follow the traditional process. However, following a thoughtfully planned process will avoid a lot of [bike-shedding][3]. + +### Popular past initiatives + +In 2011, at DrupalCon Chicago, Dries announced that Drupal 8 would feature core initiatives that would cause big changes to Drupal's architecture. To support the transition, each initiative would have a few leads involved in decision-making and coordination with Dries. Some popular initiatives included: + + * **Configuration Management Initiative (CMI):** This was the first key initiative announced at the 2011 DrupalCon. The idea was to offer site builders more powerful, flexible, and traceable configuration handling in Drupal 8 core. As planned, the Configuration Manager module is now a Drupal 8 core module that allows deploying configurations between different environments easily. + * **Web Services and Context Core Initiative:** This initiative aimed at embracing a modern web and turned Drupal into a first-class REST server with a first-class content management system (CMS) on top of it. The result? Drupal is now a competent REST server providing the ability to manage content entities through HTTP requests. This is part of why Drupal has been the leading CMS for decoupled experiences for several years. + * **Layout Initiative:** This initiative's focus was on improving and simplifying the site-building experience by non-technical users, like site builders and content authors. This initiative came alive in Drupal 8 by introducing the Layout Discovery API (a Layout plugin API) in v.8.4 and the Layout Builder module (a complete layout management solution) in v.8.5 core. + * **Media Initiative:** The Media Initiative was proposed to launch a rich, intuitive, easy-to-use, API-based media solution with extensible media functionalities in the core. This resulted in bringing in the Media API (which manages various operations on media entities) and Media Library (a rich digital asset management tool) to Drupal 8 core. + * **Drupal 9 Readiness Initiative:** The focus of this initiative was to get Drupal 9 ready by June 3, 2020, so that Drupal 7 and 8 users had at least 18 months to upgrade. Since Drupal 9 is just a cleaned-up version of the last version of Drupal 8 (8.9), the idea was to update dependencies and remove any deprecated code. And as planned, Drupal 9 was successfully released on June 3, 2020. Drupal 8-compatible modules were ported to Drupal 9 faster than any major version upgrade in Drupal's history, with more than 90% of the top 1,000 modules already ported (and many of the remaining now obsolete). + + + +### The new strategic initiatives + +Fast-forward to 2021, where everything is virtual. DrupalCon North America will witness a first-of-its-kind "Initiative Days" event added to the traditional DrupalCon content. Previously, initiatives were proposed during the [Driesnote][4] session, but this time, initiatives are more interactive and detailed. DrupalCon North America 2021 participants can learn about an initiative and participate in building components and contributing back to the project. + +#### The Decoupled Menus Initiative + +Dries proposed the Decoupled Menus Initiative in his keynote speech during DrupalCon Global 2020. While this initiative's broader intent is to make Drupal the best decoupled CMS, to accomplish the larger goal, the project chose to work on decoupled menus as a first step because menus are used on every project and are not easy to implement in decoupled architectures. + +The goals of this initiative are to build APIs, documentation, and examples that can: + + * Give JavaScript front-end developers the best way to integrate Drupal-managed menus into their front ends. + * Provide site builders and content editors with an easy-to-use experience to build and update menus independently. + + + +This is because, without web services for decoupled menus in Drupal core, JavaScript developers are often compelled to hard-code menu items. This makes it really hard for a non-developer to edit or remove a menu item without getting a developer involved. The developer needs to make the change, build the JavaScript code, and then deploy it to production. With the Decoupled Menus Initiative, the developer can easily eliminate all these steps and many lines of code by using Drupal's HTTP APIs and using JavaScript-focused resources. + +The bigger idea is to establish patterns and a roadmap that can be adapted to solve other decoupled problems. At DrupalCon 2021, on the [Decoupled Menus Initiative day][5], April 13, you can both learn about where it stands and get involved by building custom menu components and contributing them back to the project. + +#### The Easy Out-Of-The-Box Initiative + +During DrupalCon 2019 in Amsterdam, CMS users were asked about their perceptions of their CMS. The research found that beginners did not favor Drupal as much as intermediate- and expert-level users. However, it was the opposite for other CMS users; they seemed to like their CMS less over time. + +![CMS users' preferences][6] + +([Driesnote, DrupalCon Global 2020][7]) + +Hence, the Easy Out-Of-The-Box Initiative's goal is to make Drupal easy to use, especially for non-technical users and beginners. It is an extension of the great work that has been done for Layouts, Media, and Claro. Layout Builder's low-code design flexibility, Media's robust management of audio-visual content, and Claro's modern and accessible administrative UI combine to empower less-technical users with the power Drupal has under the hood. + +This initiative bundles all three of these features into one initiative and aims to provide a delightful user experience. The ease of use can help attract new and novice users to Drupal. On April 14, DrupalCon North America's [Easy Out-Of-The-Box Initiative day][8], the initiative leads will discuss the initiative and its current progress. Learn about how you can contribute to the project by building a better editorial experience. + +#### Automated Updates Initiative + +The results of a Drupal survey in 2020 revealed that automated updating was the most frequently requested feature. Updating a Drupal site manually can be tedious, expensive, and time-consuming. Luckily, the initiative team has been on this task since 2019, when the first prototype for the Automated Update System was developed as a [contributed module][9]. The focus of the initiative now is to bring this feature into Drupal core. As easy as it may sound, there's a lot more work that needs to go in to: + + * Ensure site readiness for a safe update + * Integrate composer + * Verify updates with package signing + * Safely apply updates in a way that can be rolled back in case of errors + + + +In its first incarnation, the focus is on Drupal Core patch releases and security updates, but the intent is to support the contributed module ecosystem as well. + +The initiative intends to make it easier for small to midsized businesses that sometimes overlook the importance of updating their Drupal site or struggle with the manual process. The [Automated Updates Initiative day][10] is happening on April 15 at DrupalCon North America. You will get an opportunity to know more about this initiative and get involved in the project. + +#### Drupal 10 Readiness Initiative + +With the release of Drupal 10 not too far away (as early as June 2022), the community is gearing up to welcome a more modern version of Drupal. Drupal now integrates more third-party technologies than ever. Dependencies such as Symfony, jQuery, Guzzle, Composer, CKEditor, and more have their own release cycles that Drupal needs to align with. + +![CMS Release Cycles][11] + +([Driesnote, DrupalCon 2020][7]) + +The goal of the initiative is to get Drupal 10 ready, and this involves: + + * Releasing Drupal 10 on time + * Getting compatible with the latest versions of the dependencies for security + * Deprecating the dependencies, libraries, modules, and themes that are no longer needed and removing them from Drupal 10 core. + + + +At the [Drupal 10 Readiness Initiative day][12], April 16, you can learn about the tools you'll use to update your websites and modules from Drupal 9 to Drupal 10 efficiently. There are various things you can do to help make Drupal better. Content authors will get an opportunity to peek into the new CKEditor 5, its new features, and improved editing experience. + +### Learn more at DrupalCon + +Drupal is celebrating its 20th year and its evolution to a more relevant, easier to adopt open source software. Leading an evolution is close to impossible without taking up strategic initiatives. Although the initial initiatives did not focus on offering great user experiences, today, ease of use and out-of-the-box experience are Drupal's most significant goals. + +Our ambition is to create software that works for everyone. At every DrupalCon, the intent is to connect with the community that fosters the same belief, learn from each other, and ultimately, build a better Drupal. + +[DrupalCon North America][13], hosted by the Drupal Association, is the largest Drupal event of the year. Drupal experts, enthusiasts, and users will unite online April 12–16, 2021, share lessons learned and best practices, and collaborate on creating better, more engaging digital experiences. PHP and JavaScript developers, designers, marketers, and anyone interested in a career in open source will be able to learn, connect, and build by attending DrupalCon. + +The [Drupal Association][14] is the nonprofit organization focused on accelerating Drupal, fostering the Drupal community's growth, and supporting the project's vision to create a safe, secure, and open web for everyone. DrupalCon is the primary source of funding for the Drupal Association. Your support and attendance at DrupalCon make our work possible. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/drupal-updates + +作者:[Shefali Shetty][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/shefalishetty +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open) +[2]: https://www.drupal.org/ +[3]: https://en.wikipedia.org/wiki/Law_of_triviality +[4]: https://events.drupal.org/global2020/program/driesnote +[5]: https://events.drupal.org/northamerica2021/decoupled-menus-day +[6]: https://opensource.com/sites/default/files/uploads/cms_preferences.png (CMS users' preferences) +[7]: https://youtu.be/RIeRpLgI1mM +[8]: https://events.drupal.org/northamerica2021/easy-out-box-day +[9]: http://drupal.org/project/automatic_updates/ +[10]: https://events.drupal.org/northamerica2021/automatic-updates-day +[11]: https://opensource.com/sites/default/files/uploads/cms_releasecycles.png (CMS Release Cycles) +[12]: https://events.drupal.org/northamerica2021/drupal-10-readiness-day +[13]: https://events.drupal.org/northamerica2021?utm_source=replyio&utm_medium=email&utm_campaign=DCNA2021-20210318 +[14]: https://www.drupal.org/association From f4d1f6c0ee97e7ae61bed3f4b831d1b423e69604 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 14 Apr 2021 05:03:48 +0800 Subject: [PATCH 664/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210413=20?= =?UTF-8?q?Make=20Conway's=20Game=20of=20Life=20in=20WebAssembly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210413 Make Conway-s Game of Life in WebAssembly.md --- ...ke Conway-s Game of Life in WebAssembly.md | 472 ++++++++++++++++++ 1 file changed, 472 insertions(+) create mode 100644 sources/tech/20210413 Make Conway-s Game of Life in WebAssembly.md diff --git a/sources/tech/20210413 Make Conway-s Game of Life in WebAssembly.md b/sources/tech/20210413 Make Conway-s Game of Life in WebAssembly.md new file mode 100644 index 0000000000..83ba01325d --- /dev/null +++ b/sources/tech/20210413 Make Conway-s Game of Life in WebAssembly.md @@ -0,0 +1,472 @@ +[#]: subject: (Make Conway's Game of Life in WebAssembly) +[#]: via: (https://opensource.com/article/21/4/game-life-simulation-webassembly) +[#]: author: (Mohammed Saud https://opensource.com/users/saud) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Make Conway's Game of Life in WebAssembly +====== +WebAssembly is a good option for computationally expensive tasks due to +its predefined execution environment and memory granularity. +![Woman sitting in front of her computer][1] + +Conway's [Game of Life][2] is a popular programming exercise to create a [cellular automaton][3], a system that consists of an infinite grid of cells. You don't play the game in the traditional sense; in fact, it is sometimes referred to as a game for zero players. + +Once you start the Game of Life, the game plays itself to multiply and sustain "life." In the game, digital cells representing lifeforms are allowed to change states as defined by a set of rules. When the rules are applied to cells through multiple iterations, they exhibit complex behavior and interesting patterns. + +The Game of Life simulation is a very good candidate for a WebAssembly implementation because of how computationally expensive it can be; every cell's state in the entire grid must be calculated for every iteration. WebAssembly excels at computationally expensive tasks due to its predefined execution environment and memory granularity, among many other features. + +### Compiling to WebAssembly + +Although it's possible to write WebAssembly by hand, it is very unintuitive and error-prone as complexity increases. Most importantly, it's not intended to be written that way. It would be the equivalent of manually writing [assembly language][4] instructions. + +Here's a simple WebAssembly function to add two numbers: + + +``` +(func $Add (param $0 i32) (param $1 i32) (result i32) +    local.get $0 +    local.get $1 +    i32.add +) +``` + +It is possible to compile WebAssembly modules using many existing languages, including C, C++, Rust, Go, and even interpreted languages like Lua and Python. This [list][5] is only growing. + +One of the problems with using existing languages is that WebAssembly does not have much of a runtime. It does not know what it means to [free a pointer][6] or what a [closure][7] is. All these language-specific runtimes have to be included in the resulting WebAssembly binaries. Runtime size varies by language, but it has an impact on module size and execution time. + +### AssemblyScript + +[AssemblyScript][8] is one language that is trying to overcome some of these challenges with a different approach. AssemblyScript is designed specifically for WebAssembly, with a focus on providing low-level control, producing smaller binaries, and reducing the runtime overhead. + +AssemblyScript uses a strictly typed variant of [TypeScript][9], a superset of JavaScript. Developers familiar with TypeScript do not have to go through the trouble of learning an entirely new language. + +### Getting started + +The AssemblyScript compiler can easily be installed through [Node,js][10]. Start by initializing a new project in an empty directory: + + +``` +npm init +npm install --save-dev assemblyscript +``` + +If you don't have Node installed locally, you can play around with AssemblyScript on your browser using the nifty [WebAssembly Studio][11] application. + +AssemblyScript comes with `asinit`, which should be installed when you run the installation command above. It is a helpful utility to quickly set up an AssemblyScript project with the recommended directory structure and configuration files: + + +``` +`npx asinit .` +``` + +The newly created `assembly` directory will contain all the AssemblyScript code, a simple example function in `assembly/index.ts`, and the `asbuild` command inside `package.json`. `asbuild`, which compiles the code into WebAssembly binaries. + +When you run `npm run asbuild` to compile the code, it creates files inside `build`. The `.wasm` files are the generated WebAssembly modules. The `.wat` files are the modules in text format and are generally used for debugging and inspection. + +You have to do a little bit of work to get the binaries to run on a browser. + +First, create a simple HTML file, `index.html`: + + +``` +<[html][12]> +    <[head][13]> +        <[meta][14] charset=utf-8> +        <[title][15]>Game of life</[title][15]> +    </[head][13]> +    +    <[body][16]> +        <[script][17] src='./index.js'></[script][17]> +    </[body][16]> +</[html][12]> +``` + +Next, replace the contents of `index.js` with the code snippet below to load the WebAssembly modules: + + +``` +const runWasm = async () => { +  const module = await WebAssembly.instantiateStreaming(fetch('./build/optimized.wasm')); +  const exports = module.instance.exports; + +  console.log('Sum = ', exports.add(20, 22)); +}; + +runWasm(); +``` + +This `fetches` the binary and passes it to `WebAssembly.instantiateStreaming`, the browser API that compiles a module into a ready-to-use instance. This is an asynchronous operation, so it is run inside an async function so that await can be used to wait for it to finish compiling. + +The `module.instance.exports` object contains all the functions exported by AssemblyScript. Use the example function in `assembly/index.ts` and log the result. + +You will need a simple development server to host these files. There are a lot of options listed in this [gist][18]. I used [node-static][19]: + + +``` +npm install -g node-static +static +``` + +You can view the result by pointing your browser to `localhost:8080` and opening the console. + +![console output][20] + +(Mohammed Saud, [CC BY-SA 4.0][21]) + +### Drawing to a canvas + +You will be drawing all the cells onto a `` element: + + +``` +<[body][16]> +    <[canvas][22] id=canvas></[canvas][22]> + +    ... +</[body][16]> +``` + +Add some CSS: + + +``` +<[head][13]> +    ... + +    <[style][23] type=text/css> +    body { +      background: #ccc; +    } +    canvas { +      display: block; +      padding: 0; +      margin: auto; +      width: 40%; + +      image-rendering: pixelated; +      image-rendering: crisp-edges; +    } +    </[style][23]> +</[head][13]> +``` + +The `image-rendering` styles are used to prevent the canvas from smoothing and blurring out pixelated images. + +You will need a canvas drawing context in `index.js`: + + +``` +const canvas = document.getElementById('canvas'); +const ctx = canvas.getContext('2d'); +``` + +There are many functions in the [Canvas API][24] that you could use for drawing—but you need to draw using WebAssembly, not JavaScript. + +Remember that WebAssembly does NOT have access to the browser APIs that JavaScript has, and any call that needs to be made should be interfaced through JavaScript. This also means that your WebAssembly module will run the fastest if there is as little communication with JavaScript as possible. + +One method is to create [ImageData][25] (a data type for the underlying pixel data of a canvas), fill it up with the WebAssembly module's memory, and draw it on the canvas. This way, if the memory buffer is updated inside WebAssembly, it will be immediately available to the `ImageData`. + +Define the pixel count of the canvas and create an `ImageData` object: + + +``` +const WIDTH = 10, HEIGHT = 10; + +const runWasm = async () => { +... + +canvas.width = WIDTH; +canvas.height = HEIGHT; + +const ctx = canvas.getContext('2d'); +const memoryBuffer = exports.memory.buffer; +const memoryArray = new Uint8ClampedArray(memoryBuffer) + +const imageData = ctx.createImageData(WIDTH, HEIGHT); +imageData.data.set(memoryArray.slice(0, WIDTH * HEIGHT * 4)); +ctx.putImageData(imageData, 0, 0); +``` + +The memory of a WebAssembly module is provided in `exports.memory.buffer` as an [ArrayBuffer][26]. You need to use it as an array of 8-bit unsigned integers or `Uint8ClampedArray`. Now you can fill up the module's memory with some pixels. In `assembly/index.ts`, you first need to grow the available memory: + + +``` +`memory.grow(1);` +``` + +WebAssembly does not have access to memory by default and needs to request it from the browser using the `memory.grow` function. Memory grows in chunks of 64Kb, and the number of required chunks can be specified when calling it. You will not need more than one chunk for now. + +Keep in mind that memory can be requested multiple times, whenever needed, and once acquired, memory cannot be freed or given back to the browser. + +Writing to the memory: + + +``` +`store(0, 0xff101010);` +``` + +A pixel is represented by 32 bits, with the RGBA values taking up 8 bits each. Here, RGBA is defined in reverse—ABGR—because WebAssembly is [little-endian][27]. + +The `store` function stores the value `0xff101010` at index `0`, taking up 32 bits. The alpha value is `0xff` so that the pixel is fully opaque. + +![Byte order for a pixel's color][28] + +(Mohammed Saud, [CC BY-SA 4.0][21]) + +Build the module again with `npm run asbuild` before refreshing the page to see your first pixel on the top-left of the canvas. + +### Implementing rules + +Let's review the rules. The [Game of Life Wikipedia page][29] summarizes them nicely: + + 1. Any live cell with fewer than two live neighbors dies, as if by underpopulation. + 2. Any live cell with two or three live neighbors lives on to the next generation. + 3. Any live cell with more than three live neighbors dies, as if by overpopulation. + 4. Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction. + + + +You need to iterate through all the rows, implementing these rules on each cell. You do not know the width and height of the grid, so write a little function to initialize the WebAssembly module with this information: + + +``` +let universe_width: u32; +let universe_height: u32; +let alive_color: u32; +let dead_color: u32; +let chunk_offset: u32; + +export function init(width: u32, height: u32): void { +  universe_width = width; +  universe_height = height; +  chunk_offset = width * height * 4; + +  alive_color = 0xff101010; +  dead_color = 0xffefefef; +} +``` + +Now you can use this function in `index.js` to provide data to the module: + + +``` +`exports.init(WIDTH, HEIGHT);` +``` + +Next, write an `update` function to iterate over all the cells, count the number of active neighbors for each, and set the current cell's state accordingly: + + +``` +export function update(): void { +  for (let x: u32 = 0; x < universe_width; x++) { +    for (let y: u32 = 0; y < universe_height; y++) { + +      const neighbours = countNeighbours(x, y); + +      if (neighbours < 2) { +        // less than 2 neighbours, cell is no longer alive +        setCell(x, y, dead_color); +      } else if (neighbours == 3) { +        // cell will be alive +        setCell(x, y, alive_color); +      } else if (neighbours > 3) { +        // cell dies due to overpopulation +        setCell(x, y, dead_color); +      } +    } +  } + +  copyToPrimary(); +} +``` + +You have two copies of cell arrays, one representing the current state and the other for calculating and temporarily storing the next state. After the calculation is done, the second array is copied to the first for rendering. + +The rules are fairly straightforward, but the `countNeighbours()` function looks interesting. Take a closer look: + + +``` +function countNeighbours(x: u32, y: u32): u32 { +  let neighbours = 0; + +  const max_x = universe_width - 1; +  const max_y = universe_height - 1; + +  const y_above = y == 0 ? max_y : y - 1; +  const y_below = y == max_y ? 0 : y + 1; +  const x_left = x == 0 ? max_x : x - 1; +  const x_right = x == max_x ? 0 : x + 1; + +  // top left +  if(getCell(x_left, y_above) == alive_color) { +    neighbours++; +  } + +  // top +  if(getCell(x, y_above) == alive_color) { +    neighbours++; +  } + +  // top right +  if(getCell(x_right, y_above) == alive_color) { +    neighbours++; +  } + +  ... + +  return neighbours; +} +``` + +![Coordinates of a cell's neighbors][30] + +(Mohammed Saud, [CC BY-SA 4.0][21]) + +Every cell has eight neighbors, and you can check if each one is in the `alive_color` state. The important situation handled here is if a cell is exactly on the edge of the grid. Cellular automata are generally assumed to be on an infinite space, but since infinitely large displays haven't been invented yet, stick to warping at the edges. This means when a cell goes off the top, it comes back in its corresponding position on the bottom. This is commonly known as [toroidal space][31]. + +The `getCell` and `setCell` functions are wrappers to the `store` and `load` functions to make it easier to interact with memory using 2D coordinates: + + +``` +@inline +function getCell(x: u32, y: u32): u32 { +  return load<u32>((x + y * universe_width) << 2); +} + +@inline +function setCell(x: u32, y: u32, val: u32): void { +  store<u32>(((x + y * universe_width) << 2) + chunk_offset, val); +} + +function copyToPrimary(): void { +  memory.copy(0, chunk_offset, chunk_offset); +} +``` + +The `@inline` is an [annotation][32] that requests that the compiler convert calls to the function with the function definition itself. + +Call the update function on every iteration from `index.js` and render the image data from the module memory: + + +``` +const FPS = 5; + +const runWasm = async () => { +  ... + +  const step = () => { +    exports.update(); +  +    imageData.data.set(memoryArray.slice(0, WIDTH * HEIGHT * 4)); +    ctx.putImageData(imageData, 0, 0); +  +    setTimeout(step, 1000 / FPS); +  }; +  step(); +``` + +At this point, if you compile the module and load the page, it shows nothing. The code works fine, but since you don't have any living cells initially, there are no new cells coming up. + +Create a new function to randomly add cells during initialization: + + +``` +function fillUniverse(): void { +  for (let x: u32 = 0; x < universe_width; x++) { +    for (let y: u32 = 0; y < universe_height; y++) { +      setCell(x, y, Math.random() > 0.5 ? alive_color : dead_color); +    } +  } + +  copyToPrimary(); +} + +export function init(width: u32, height: u32): void { +  ... + +  fillUniverse(); +``` + +Since `Math.random` is used to determine the initial state of a cell, the WebAssembly module needs a seed function to derive a random number from. + +AssemblyScript provides a convenient [module loader][33] that does this and a lot more, like wrapping the browser APIs for module loading and providing functions for more fine-grained memory control. You will not be using it here since it abstracts away many details that would otherwise help in learning the inner workings of WebAssembly, so pass in a seed function instead: + + +``` +  const importObject = { +    env: { +      seed: Date.now, +      abort: () => console.log('aborting!') +    } +  }; +  const module = await WebAssembly.instantiateStreaming(fetch('./build/optimized.wasm'), importObject); +``` + +`instantiateStreaming` can be called with an optional second parameter, an object that exposes JavaScript functions to WebAssembly modules. Here, use `Date.now` as the seed to generate random numbers. + +It should now be possible to run the `fillUniverse` function and finally have life on your grid! + +You can also play around with different `WIDTH`, `HEIGHT`, and `FPS` values and use different cell colors. + +![Game of Life result][34] + +(Mohammed Saud, [CC BY-SA 4.0][21]) + +### Try the game + +If you use large sizes, make sure to grow the memory accordingly. + +Here's the [complete code][35]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/game-life-simulation-webassembly + +作者:[Mohammed Saud][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/saud +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_3.png?itok=qw2A18BM (Woman sitting in front of her computer) +[2]: https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life +[3]: https://en.wikipedia.org/wiki/Cellular_automaton +[4]: https://en.wikipedia.org/wiki/Assembly_language +[5]: https://github.com/appcypher/awesome-wasm-langs +[6]: https://en.wikipedia.org/wiki/C_dynamic_memory_allocation +[7]: https://en.wikipedia.org/wiki/Closure_(computer_programming) +[8]: https://www.assemblyscript.org +[9]: https://www.typescriptlang.org/ +[10]: https://nodejs.org/en/download/ +[11]: https://webassembly.studio +[12]: http://december.com/html/4/element/html.html +[13]: http://december.com/html/4/element/head.html +[14]: http://december.com/html/4/element/meta.html +[15]: http://december.com/html/4/element/title.html +[16]: http://december.com/html/4/element/body.html +[17]: http://december.com/html/4/element/script.html +[18]: https://gist.github.com/willurd/5720255 +[19]: https://www.npmjs.com/package/node-static +[20]: https://opensource.com/sites/default/files/uploads/console_log.png (console output) +[21]: https://creativecommons.org/licenses/by-sa/4.0/ +[22]: http://december.com/html/4/element/canvas.html +[23]: http://december.com/html/4/element/style.html +[24]: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API +[25]: https://developer.mozilla.org/en-US/docs/Web/API/ImageData +[26]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer +[27]: https://en.wikipedia.org/wiki/Endianness +[28]: https://opensource.com/sites/default/files/uploads/color_bits.png (Byte order for a pixel's color) +[29]: https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life#Rules +[30]: https://opensource.com/sites/default/files/uploads/count_neighbours.png (Coordinates of a cell's neighbors) +[31]: https://en.wikipedia.org/wiki/Torus +[32]: https://www.assemblyscript.org/peculiarities.html#annotations +[33]: https://www.assemblyscript.org/loader.html +[34]: https://opensource.com/sites/default/files/uploads/life.png (Game of Life result) +[35]: https://github.com/rottencandy/game-of-life-wasm From a2e0a814ab539dcda2eddce3df2ede52c8e66f8c Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 14 Apr 2021 08:44:45 +0800 Subject: [PATCH 665/818] translated --- ...Install Steam on Fedora -Beginner-s Tip.md | 117 ------------------ ...Install Steam on Fedora -Beginner-s Tip.md | 117 ++++++++++++++++++ 2 files changed, 117 insertions(+), 117 deletions(-) delete mode 100644 sources/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md create mode 100644 translated/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md diff --git a/sources/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md b/sources/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md deleted file mode 100644 index 7a36c9f9db..0000000000 --- a/sources/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md +++ /dev/null @@ -1,117 +0,0 @@ -[#]: subject: (How to Install Steam on Fedora [Beginner’s Tip]) -[#]: via: (https://itsfoss.com/install-steam-fedora/) -[#]: author: (John Paul https://itsfoss.com/author/john/) -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -How to Install Steam on Fedora [Beginner’s Tip] -====== - -Steam is the best thing that could happen to Linux gamers. Thanks to Steam, you can play hundreds and thousands of games on Linux. - -If you are not already aware of it, Steam is the most popular PC gaming platform. In 2013, it became available for Linux. [Steam’s latest Proton project][1] allows you to play games created for Windows platform on Linux. This enhanced Linux gaming library many folds. - -![][2] - -Steam provides a desktop client and you can use it to download or purchase games from the Steam store, install the game and play it. - -We have discussed [installing Steam on Ubuntu][3] in the past. In this beginner’s tutorial, I am going to show you the steps for installing Steam on Fedora Linux. - -### Installing Steam on Fedora - -To get Steam on Fedora, you’ll have to use RMPFusion repository. [RPMFusion][4] is a series of third-party repos that contain software that Fedora chooses not to ship with their operating system. They offer both free (open source) and non-free (closed source) repos. Since Steam is in the non-free repo, you will only install that one. - -I shall go over both the terminal and graphical installation methods. - -#### Method 1: Install Steam via terminal - -This is the easiest method because it requires the fewest steps. Just enter the following command to enable the free repo: - -``` -sudo dnf install https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm -``` - -You will be asked to enter your password. You will then be asked to verify that you want to install these repos. Once you approve it, the installation of the repo will be completed. - -To install Steam, simply enter the following command: - -``` -sudo dnf install steam -``` - -![Install Steam via command line][5] - -Enter your password and press “Y” to accept. Once installed, open Steam and play some games. - -#### Method 2: Install Steam via GUI - -You can [enable the third-party repository on Fedora][6] from the Software Center. Open the Software Center application and click on the hamburger menu: - -![][7] - -In the Software Repositories window, you will see a section at the top that says “Third Party Repositories”. Click the Install button. Enter your password when you are prompted and you are done. - -![][8] - -Once you have installed RPM Fusion repository for Steam, update your system’s software cache (if needed) and search for Steam in the software center. - -![Steam in GNOME Software Center][9] - -Once that installation is complete, open up the GNOME Software Center and search for Steam. Once you locate the Steam page, click install. Enter your password when asked and you’re done. - -After installing Steam, start the application, enter your Steam account details or register for it and enjoy your games. - -### Using Steam as Flatpak - -Steam is also available as a Flatpak. Flatpak is installed by default on Fedora. Before we can install Steam using that method, we have to install the Flathub repo. - -![Install Flathub][10] - -First, open the [Flatpak site][11] in your browser. Now, click the blue button marked “Flathub repository file”. The browser will ask you if you want to open the file in GNOME Software Center. Click okay. Once GNOME Software Center open, click the install button. You will be prompted to enter your password. - -If you get an error when you try to install the Flathub repo, run this command in the terminal: - -``` -flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo -``` - -With the Flathub repo installed, all you need to do is search for Steam in the GNOME Software Center. Once you find it, install it, and you are ready to go. - -![Fedora Repo Select][12] - -The Flathub version of Steam has several add-ons you can install, as well. These include a DOS compatibility tool and a couple of tools for [Vulkan][13] and Proton. - -![][14] - -I think this should help you with Steam on Fedora. Enjoy your games :) - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/install-steam-fedora/ - -作者:[John Paul][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/john/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/steam-play-proton/ -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/05/Steam-Store.jpg?resize=800%2C382&ssl=1 -[3]: https://itsfoss.com/install-steam-ubuntu-linux/ -[4]: https://rpmfusion.org/ -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/install-steam-fedora.png?resize=800%2C588&ssl=1 -[6]: https://itsfoss.com/fedora-third-party-repos/ -[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/software-meni.png?resize=800%2C672&ssl=1 -[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/fedora-third-party-repo-gui.png?resize=746%2C800&ssl=1 -[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/gnome-store-steam.jpg?resize=800%2C434&ssl=1 -[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/flatpak-install-button.jpg?resize=800%2C434&ssl=1 -[11]: https://www.flatpak.org/setup/Fedora/ -[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/fedora-repo-select.jpg?resize=800%2C434&ssl=1 -[13]: https://developer.nvidia.com/vulkan -[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/steam-flatpak-addons.jpg?resize=800%2C434&ssl=1 diff --git a/translated/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md b/translated/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md new file mode 100644 index 0000000000..2a51d86e0f --- /dev/null +++ b/translated/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md @@ -0,0 +1,117 @@ +[#]: subject: (How to Install Steam on Fedora [Beginner’s Tip]) +[#]: via: (https://itsfoss.com/install-steam-fedora/) +[#]: author: (John Paul https://itsfoss.com/author/john/) +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +如何在 Fedora 上安装 Steam(入门技巧) +====== + +Steam 对 Linux 游戏玩家来说是最好的事情。由于 Steam,你可以在 Linux 上玩成百上千的游戏。 + +如果你还不知道,Steam 是最流行的 PC 游戏平台。2013 年,它开始适用于 Linux。[Steam 最新的 Proton 项目][1]允许你在 Linux 上玩为 Windows 平台创建的游戏。这让 Linux 游戏库增强了许多倍。 + +![][2] + +Steam 提供了一个桌面客户端,你可以用它从 Steam 商店下载或购买游戏,然后安装并玩它。 + +过去我们曾讨论过[在 Ubuntu 上安装 Steam][3]。在这个初学者教程中,我将向你展示在 Fedora Linux 上安装 Steam 的步骤。 + +### 在 Fedora 上安装 Steam + +要在 Fedora 上使用 Steam,你必须使用 RMPFusion 软件库。[RPMFusion][4] 是一系列第三方软件库,其中包含了 Fedora 选择不与它们的操作系统一起发布的软件。它们提供自由(开源)和非自由(闭源)的软件库。由于 Steam 在非自由软件库中,你将只安装那一个。 + +我将同时介绍终端和图形安装方法。 + +#### 方法 1:通过终端安装 Steam + +这是最简单的方法,因为它需要的步骤最少。只需输入以下命令即可启用仓库: + +``` +sudo dnf install https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm +``` + +你会被要求输入密码。然后你会被要求验证是否要安装这些仓库。你同意后,仓库安装就会完成。 + +要安装 Steam,只需输入以下命令: + +``` +sudo dnf install steam +``` + +![Install Steam via command line][5] + +输入密码后按 “Y” 接受。安装完毕后,打开 Steam,玩一些游戏。 + +#### 方法 2:通过 GUI 安装 Steam + +你可以从软件中心[启用 Fedora 上的第三方仓库][6]。打开软件中心并点击菜单。 + +![][7] + +在 Software Repositories 窗口中,你会看到顶部有一个 “Third Party Repositories”。点击 “Install” 按钮。当提示你输入密码时,就完成了。 + +![][8] + +安装了 Steam 的 RPM Fusion 仓库后,更新你系统的软件缓存(如果需要),并在软件中心搜索 Steam。 + +![Steam in GNOME Software Center][9] + +安装完成后,打开 GNOME 软件中心,搜索 Steam。找到 Steam 页面后,点击安装。当被问及密码时,输入你的密码就可以了。 + +安装完 Steam 后,启动应用,输入你的 Steam 帐户详情或注册它,然后享受你的游戏。 + +### 将 Steam 作为 Flatpak 使用 + +Steam 也可以作为 Flatpak 使用。Fedora 上默认安装 Flatpak。在使用该方法安装 Steam 之前,我们必须安装 Flathub 仓库。 + +![Install Flathub][10] + +首先,在浏览器中打开 [Flatpak 网站][11]。现在,点击标有 “Flathub repository file” 的蓝色按钮。浏览器会询问你是否要在 GNOME 软件中心打开该文件。点击确定。在 GNOME 软件中心打开后,点击安装按钮。系统会提示你输入密码。 + +如果你在尝试安装 Flathub 仓库时出现错误,请在终端运行以下命令: + +``` +flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo +``` + +安装好 Flathub 仓库后,你需要做的就是在 GNOME 软件中心搜索 Steam。找到后,安装它,你就可以开始玩了。 + +![Fedora Repo Select][12] + +Flathub 版本的 Steam 也有几个附加组件可以安装。其中包括一个 DOS 兼容工具和几个 [Vulkan][13] 和 Proton 工具。 + +![][14] + +我想这应该可以帮助你在 Fedora 上使用 Steam。享受你的游戏 :) + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-steam-fedora/ + +作者:[John Paul][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://itsfoss.com/author/john/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/steam-play-proton/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/05/Steam-Store.jpg?resize=800%2C382&ssl=1 +[3]: https://itsfoss.com/install-steam-ubuntu-linux/ +[4]: https://rpmfusion.org/ +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/install-steam-fedora.png?resize=800%2C588&ssl=1 +[6]: https://itsfoss.com/fedora-third-party-repos/ +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/software-meni.png?resize=800%2C672&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/fedora-third-party-repo-gui.png?resize=746%2C800&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/gnome-store-steam.jpg?resize=800%2C434&ssl=1 +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/03/flatpak-install-button.jpg?resize=800%2C434&ssl=1 +[11]: https://www.flatpak.org/setup/Fedora/ +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/fedora-repo-select.jpg?resize=800%2C434&ssl=1 +[13]: https://developer.nvidia.com/vulkan +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/03/steam-flatpak-addons.jpg?resize=800%2C434&ssl=1 From 74f3190612f4a15248f18fc37bddd13d68996578 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 14 Apr 2021 08:50:50 +0800 Subject: [PATCH 666/818] translating --- ...0210412 Encrypt your files with this open source software.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210412 Encrypt your files with this open source software.md b/sources/tech/20210412 Encrypt your files with this open source software.md index d5cd35cde2..0aa7803a9c 100644 --- a/sources/tech/20210412 Encrypt your files with this open source software.md +++ b/sources/tech/20210412 Encrypt your files with this open source software.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/4/open-source-encryption) [#]: author: (Seth Kenlon https://opensource.com/users/seth) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 42b5706c93db85fb008641f6cc946b2b206c8c0e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 14 Apr 2021 13:18:07 +0800 Subject: [PATCH 667/818] PRF @geekpi --- .../20210407 What is Git cherry-picking.md | 87 ++++++++----------- 1 file changed, 37 insertions(+), 50 deletions(-) diff --git a/translated/tech/20210407 What is Git cherry-picking.md b/translated/tech/20210407 What is Git cherry-picking.md index 91ead9d3c8..b19b13750d 100644 --- a/translated/tech/20210407 What is Git cherry-picking.md +++ b/translated/tech/20210407 What is Git cherry-picking.md @@ -3,104 +3,97 @@ [#]: author: (Rajeev Bera https://opensource.com/users/acompiler) [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) -什么是 Git cherry-pick? +什么是 Git 遴选(cherry-pick)? ====== -了解 git cherry-pick 命令是什么,为什么用以及如何使用。 -![Measuring and baking a cherry pie recipe][1] -当你和一群程序员一起工作时,无论项目大小,处理多个 Git 分支之间的变化都会变得很困难。有时,你不想将整个 Git 分支合并到另一个分支,而是想选择并移动几个特定的提交。这个过程被称为 ”cherry-pick“。 +> 了解 `git cherry-pick` 命令是什么,为什么用以及如何使用。 -本文将介绍 cherry-pick 是什么、为何使用以及如何使用。 +![](https://img.linux.net.cn/data/attachment/album/202104/14/131735o63v3ow6y2wc281o.jpg) + +当你和一群程序员一起工作时,无论项目大小,处理多个 Git 分支之间的变更都会变得很困难。有时,你不想将整个 Git 分支合并到另一个分支,而是想选择并移动几个特定的提交。这个过程被称为 “遴选cherry-pick”。 + +本文将介绍“遴选”是什么、为何使用以及如何使用。 那么让我们开始吧。 -### 什么是 cherry-pick? +### 什么是遴选? -使用 `cherry-pick` 命令,Git 可以让你将任何分支中的个别提交合并到你当前的 [Git HEAD][2] 分支中。 +使用遴选(`cherry-pick`)命令,Git 可以让你将任何分支中的个别提交合并到你当前的 [Git HEAD][2] 分支中。 当执行 `git merge` 或者 `git rebase` 时,一个分支的所有提交都会被合并。`cherry-pick` 命令允许你选择单个提交进行整合。 -### cherry-pick 的好处 +### 遴选的好处 -下面的情况可能会让你更容易理解 cherry-pick 的功能。 +下面的情况可能会让你更容易理解遴选功能。 想象一下,你正在为即将到来的每周冲刺实现新功能。当你的代码准备好了,你会把它推送到远程分支,准备进行测试。 -然而,客户并不对所有修改满意,要求你只呈现某些修改。因为客户还没有批准下次发布的所有修改,所以 `git rebase` 不会有预期的结果。为什么会这样?因为 `git rebase` 或者 `git merge` 会把上一个冲刺的每一个调整都纳入其中。 +然而,客户并不是对所有修改都满意,要求你只呈现某些修改。因为客户还没有批准下次发布的所有修改,所以 `git rebase` 不会有预期的结果。为什么会这样?因为 `git rebase` 或者 `git merge` 会把上一个冲刺的每一个调整都纳入其中。 -cherry-pick 是答案!因为它只关注在提交中添加的变化,所以 cherry-pick 只会带入批准的变化,而不添加其他提交。 +遴选就是答案!因为它只关注在提交中添加的变更,所以遴选只会带入批准的变更,而不添加其他的提交。 -还有其他几个原因可以使用 cherry-pick: +还有其他几个原因可以使用遴选: - * 这对于 bug 修复是必不可少的,因为 bug 是在开发分支中使用他们的提交产生的。 - * 你可以通过使用 `git cherry-pick` 来避免不必要的工作,而不用使用其他选项例如 `git diff` 来应用特定更改。 + * 这对于 bug 修复是必不可少的,因为 bug 是出现在开发分支中对应的提交的。 + * 你可以通过使用 `git cherry-pick` 来避免不必要的工作,而不用使用其他选项例如 `git diff` 来应用特定变更。 * 如果因为不同 Git 分支的版本不兼容而无法将整个分支联合起来,那么它是一个很有用的工具。 - - ### 使用 cherry-pick 命令 在 `cherry-pick` 命令的最简单形式中,你只需使用 [SHA][3] 标识符来表示你想整合到当前 HEAD 分支的提交。 要获得提交的哈希值,可以使用 `git log` 命令: - ``` -`$ git log --oneline` +$ git log --oneline ``` 当你知道了提交的哈希值后,你就可以使用 `cherry-pick` 命令。 语法是: - ``` -`$ git cherry-pick ` +$ git cherry-pick ``` 例如: - ``` -`$ git cherry-pick 65be1e5` +$ git cherry-pick 65be1e5 ``` 这将会把指定的修改合并到当前已签出的分支上。 -如果你想做进一步的修改,也可以让 Git 在你的工作副本中添加提交修改。 +如果你想做进一步的修改,也可以让 Git 将提交的变更内容添加到你的工作副本中。 语法是: - ``` -`$ git cherry-pick --no-commit` +$ git cherry-pick --no-commit ``` 例如: - ``` -`$ git cherry-pick 65be1e5 --no-commit` +$ git cherry-pick 65be1e5 --no-commit ``` 如果你想同时选择多个提交,请将它们的提交哈希值用空格隔开: - ``` -`$ git cherry-pick hash1 hash3` +$ git cherry-pick hash1 hash3 ``` -当 cherry-pick 提交时,你不能使用 `git pull` 命令,因为它能获取一个仓库的提交_并_自动合并到另一个仓库。`cherry-pick` 并不是一个专门这么做的工具。相反,你可以使用 `git fetch`,它可以获取提交,但不应用它们。毫无疑问,`git pull` 很方便,但它不精确。 +当遴选提交时,你不能使用 `git pull` 命令,因为它能获取一个仓库的提交**并**自动合并到另一个仓库。`cherry-pick` 是一个专门不这么做的工具;另一方面,你可以使用 `git fetch`,它可以获取提交,但不应用它们。毫无疑问,`git pull` 很方便,但它不精确。 ### 自己尝试 要尝试这个过程,启动终端并生成一个示例项目: - ``` $ mkdir fruit.git $ cd fruit.git @@ -109,36 +102,32 @@ $ git init . 创建一些数据并提交: - ``` -$ echo "Kiwifruit" > fruit.txt +$ echo "Kiwifruit" > fruit.txt $ git add fruit.txt $ git commit -m 'First commit' ``` -现在,通过创建一个项目的分叉来代表一个远程开发者: - +现在,通过创建一个项目的复刻来代表一个远程开发者: ``` $ mkdir ~/fruit.fork $ cd !$ -$ echo "Strawberry" >> fruit.txt +$ echo "Strawberry" >> fruit.txt $ git add fruit.txt $ git commit -m 'Added a fruit" ``` 这是一个有效的提交。现在,创建一个不好的提交,代表你不想合并到你的项目中的东西: - ``` -$ echo "Rhubarb" >> fruit.txt +$ echo "Rhubarb" >> fruit.txt $ git add fruit.txt $ git commit -m 'Added a vegetable that tastes like a fruit" ``` 返回你的仓库,从你的假想的开发者那里获取提交的内容: - ``` $ cd ~/fruit.git $ git remote add dev ~/fruit.fork @@ -147,9 +136,9 @@ remote: Counting objects: 6, done. remote: Compressing objects: 100% (2/2), done. remote: Total 6 (delta 0), reused 0 (delta 0) Unpacking objects: 100% (6/6), done... +``` -[/code] [code] - +``` $ git log –oneline dev/master e858ab2 Added a vegetable that tastes like a fruit 0664292 Added a fruit @@ -158,14 +147,12 @@ b56e0f8 First commit 你已经从你想象中的开发者那里获取了提交的内容,但你还没有将它们合并到你的版本库中。你想接受第二个提交,但不想接受第三个提交,所以使用 `cherry-pick`。 - ``` -`$ git cherry-pick 0664292` +$ git cherry-pick 0664292 ``` 第二次提交现在在你的仓库里了: - ``` $ cat fruit.txt Kiwifruit @@ -174,13 +161,13 @@ Strawberry 将你的更改推送到远程服务器上,这就完成了! -### 避免使用 cherry-pick 的原因 +### 避免使用遴选的原因 -在开发者社区中,通常不鼓励 cherry-pick。主要原因是它会造成重复提交,但你也失去了跟踪提交历史的能力。 +在开发者社区中,通常不鼓励所以遴选。主要原因是它会造成重复提交,而你也失去了跟踪你的提交历史的能力。 -如果你不按顺序地 cherry-pick 了大量的提交,这些提交会被记录在你的分支中,这可能会在 Git 分支中导致不理想的结果。 +如果你不按顺序地遴选了大量的提交,这些提交会被记录在你的分支中,这可能会在 Git 分支中导致不理想的结果。 -cherry-pick 是一个强大的命令,如果没有正确理解可能发生的情况,它可能会导致问题。不过,当你搞砸了,提交到错误的分支时,它可能会救你一命(至少是你当天的工作)。 +遴选是一个强大的命令,如果没有正确理解可能发生的情况,它可能会导致问题。不过,当你搞砸了,提交到错误的分支时,它可能会救你一命(至少是你当天的工作)。 -------------------------------------------------------------------------------- @@ -189,7 +176,7 @@ via: https://opensource.com/article/21/4/cherry-picking-git 作者:[Rajeev Bera][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/) 荣誉推出 From 67f1687e16eb80807ce55d68e81ddd9ad9c71668 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 14 Apr 2021 13:18:31 +0800 Subject: [PATCH 668/818] PUB @geekpi https://linux.cn/article-13295-1.html --- .../tech => published}/20210407 What is Git cherry-picking.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210407 What is Git cherry-picking.md (98%) diff --git a/translated/tech/20210407 What is Git cherry-picking.md b/published/20210407 What is Git cherry-picking.md similarity index 98% rename from translated/tech/20210407 What is Git cherry-picking.md rename to published/20210407 What is Git cherry-picking.md index b19b13750d..ba25e9572c 100644 --- a/translated/tech/20210407 What is Git cherry-picking.md +++ b/published/20210407 What is Git cherry-picking.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13295-1.html) 什么是 Git 遴选(cherry-pick)? ====== From 1bd58859f34c568b9ef63c103672c9ecd6d06a38 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 14 Apr 2021 14:23:21 +0800 Subject: [PATCH 669/818] APL --- .../tech/20210413 Create an encrypted file vault on Linux.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sources/tech/20210413 Create an encrypted file vault on Linux.md b/sources/tech/20210413 Create an encrypted file vault on Linux.md index 6c3dbd7bdf..fb5a87de24 100644 --- a/sources/tech/20210413 Create an encrypted file vault on Linux.md +++ b/sources/tech/20210413 Create an encrypted file vault on Linux.md @@ -2,15 +2,14 @@ [#]: via: (https://opensource.com/article/21/4/linux-encryption) [#]: author: (Seth Kenlon https://opensource.com/users/seth) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) Create an encrypted file vault on Linux ====== -Use Linux Unified Key Setup to create an encrypted vault for sensitive -files on a physical drive or cloud storage. +Use Linux Unified Key Setup to create an encrypted vault for sensitive files on a physical drive or cloud storage. ![Secure safe][1] Recently, I demonstrated how to [implement full-drive encryption][2] on Linux with LUKS and the `cryptsetup` command. While encrypting a whole drive is useful in many cases, there are reasons you might not want to encode an entire drive. For instance, you might require a drive to work across several platforms, some of which may not have Linux Unified Key Setup ([LUKS][3]) integration. Furthermore, it's the 21st century, the cloud exists, and you may not be using a physical drive for all your data. From c30700e43eb80c2fc77a366ab7ee6d9a03817efd Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 14 Apr 2021 15:08:11 +0800 Subject: [PATCH 670/818] TSL&PRF --- ...Create an encrypted file vault on Linux.md | 118 ------------------ ...Create an encrypted file vault on Linux.md | 113 +++++++++++++++++ 2 files changed, 113 insertions(+), 118 deletions(-) delete mode 100644 sources/tech/20210413 Create an encrypted file vault on Linux.md create mode 100644 translated/tech/20210413 Create an encrypted file vault on Linux.md diff --git a/sources/tech/20210413 Create an encrypted file vault on Linux.md b/sources/tech/20210413 Create an encrypted file vault on Linux.md deleted file mode 100644 index fb5a87de24..0000000000 --- a/sources/tech/20210413 Create an encrypted file vault on Linux.md +++ /dev/null @@ -1,118 +0,0 @@ -[#]: subject: (Create an encrypted file vault on Linux) -[#]: via: (https://opensource.com/article/21/4/linux-encryption) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Create an encrypted file vault on Linux -====== -Use Linux Unified Key Setup to create an encrypted vault for sensitive files on a physical drive or cloud storage. -![Secure safe][1] - -Recently, I demonstrated how to [implement full-drive encryption][2] on Linux with LUKS and the `cryptsetup` command. While encrypting a whole drive is useful in many cases, there are reasons you might not want to encode an entire drive. For instance, you might require a drive to work across several platforms, some of which may not have Linux Unified Key Setup ([LUKS][3]) integration. Furthermore, it's the 21st century, the cloud exists, and you may not be using a physical drive for all your data. - -Several years ago, there was a system called [TrueCrypt][4] that allowed users to create encrypted file "vaults," which could be decrypted by TrueCrypt to provide read/write access. It was a useful technique and essentially provided a virtual portable and fully encrypted drive where you could store important data. TrueCrypt closed down, but it serves as an interesting model. - -Fortunately, LUKS is a flexible system, and you can use it and `cryptsetup` to create an encrypted vault as a self-contained file, which you can save on a physical drive or in cloud storage. - -Here's how to do it. - -### 1\. Create an empty file - -First, you must create an empty file of a predetermined size. This serves as a kind of vault or safe in which you can store other files. The command you use for this is `fallocate`, from the `util-linux` package: - - -``` -`$ fallocate --length 512M vaultfile.img` -``` - -This example creates a 512MB file, but you can make yours any size you want. - -### 2\. Create a LUKS volume - -Next, create a LUKS volume within the empty file: - - -``` -$ cryptsetup --verify-passphrase \ -luksFormat vaultfile.img -``` - -### 3\. Open the LUKS volume - -So that you can create a filesystem ready for file storage, you must open the LUKS volume and mount it on your computer first: - - -``` -$ sudo cryptsetup open \ -\--type luks vaultfile.img myvault -$ ls /dev/mapper -myvault -``` - -### 4\. Create a filesystem - -Make a filesystem in your open vault: - - -``` -`$ sudo mkfs.ext4 -L myvault /dev/mapper/myvault` -``` - -If you don't need it for anything right now, you can close it: - - -``` -`$ sudo cryptsetup close myvault` -``` - -### 5\. Start using your encrypted vault - -Now that it's all set up, you can use your encrypted file vault whenever you need to store or access private data. To access your vault, you must mount it as a usable filesystem: - - -``` -$ sudo cryptsetup open \ -\--type luks vaultfile.img myvault -$ ls /dev/mapper -myvault -$ sudo mkdir /myvault -$ sudo mount /dev/mapper/myvault /myvault -``` - -This example opens the vault with `cryptsetup` and then mounts the vault from `/dev/mapper` to a new directory called `/myvault`. As with any volume on Linux, you can mount the LUKS volume anywhere you want, so instead of `/myvault`, you can use `/mnt` or `~/myvault` or whatever you prefer. - -While it's mounted, your LUKS volume is decrypted. You can read and write files to it just as if it were a physical drive. - -When you're finished using your encrypted vault, unmount and close it: - - -``` -$ sudo umount /myvault -$ sudo cryptsetup close myvault -``` - -### Encrypted file vaults - -An image file you encrypt with LUKS is as portable as any other file, so you can store your vault on your hard drive, an external drive, or even on the internet. As long as you have LUKS available, you can decrypt, mount, and use it to keep your data safe. It's easy encryption for improved data safety, so give it a try. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/linux-encryption - -作者:[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/life_bank_vault_secure_safe.png?itok=YoW93h7C (Secure safe) -[2]: https://opensource.com/article/21/3/encryption-luks -[3]: https://gitlab.com/cryptsetup/cryptsetup/blob/master/README.md -[4]: https://en.wikipedia.org/wiki/TrueCrypt diff --git a/translated/tech/20210413 Create an encrypted file vault on Linux.md b/translated/tech/20210413 Create an encrypted file vault on Linux.md new file mode 100644 index 0000000000..1b3a234768 --- /dev/null +++ b/translated/tech/20210413 Create an encrypted file vault on Linux.md @@ -0,0 +1,113 @@ +[#]: subject: (Create an encrypted file vault on Linux) +[#]: via: (https://opensource.com/article/21/4/linux-encryption) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +在 Linux 上创建一个加密文件保险库 +====== + +> 使用 Linux 统一密钥设置(LUKS)为物理驱动器或云存储上的敏感文件创建一个加密保险库。 + +![安全保险库][1] + +最近,我演示了如何在 Linux 上使用统一密钥设置Linux Unified Key Setup([LUKS][3])和 `cryptsetup` 命令 [实现全盘加密][2]。虽然加密整个硬盘在很多情况下是有用的,但也有一些原因让你不想对整个硬盘进行加密。例如,你可能需要让一个硬盘在多个平台上工作,其中一些平台可能没有集成 [LUKS][3]。此外,现在是 21 世纪,由于云的存在,你可能不会使用物理硬盘来处理所有的数据。 + +几年前,有一个名为 [TrueCrypt][4] 的系统,允许用户创建加密的文件保险库,可以通过 TrueCrypt 解密来提供读/写访问。这是一项有用的技术,基本上提供了一个虚拟的便携式、完全加密的驱动器,你可以在那里存储重要数据。TrueCrypt 项目关闭了,但它可以作为一个有趣的模型。 + +幸运的是,LUKS 是一个灵活的系统,你可以使用它和 `cryptsetup` 在一个独立的文件中创建一个加密保险库,你可以将其保存在物理驱动器或云存储中。 + +下面就来介绍一下怎么做。 + +### 1、建立一个空文件 + +首先,你必须创建一个预定大小的空文件。就像是一种保险库或保险箱,你可以在其中存储其他文件。你使用的命令是 `util-linux` 软件包中的 `fallocate`: + +``` +$ fallocate --length 512M vaultfile.img +``` + +这个例子创建了一个 512MB 的文件,但你可以把你的文件做成任何你想要的大小。 + +### 2、创建一个 LUKS 卷 + +接下来,在空文件中创建一个 LUKS 卷: + +``` +$ cryptsetup --verify-passphrase \ + luksFormat vaultfile.img +``` + +### 3、打开 LUKS 卷 + +要想创建一个可以存储文件的文件系统,必须先打开 LUKS 卷,并将其挂载到电脑上: + +``` +$ sudo cryptsetup open \ + --type luks vaultfile.img myvault +$ ls /dev/mapper +myvault +``` + +### 4、建立一个文件系统 + +在你打开的保险库中建立一个文件系统: + +``` +$ sudo mkfs.ext4 -L myvault /dev/mapper/myvault +``` + +如果你现在不需要它做什么,你可以关闭它: + +``` +$ sudo cryptsetup close myvault +``` + +### 5、开始使用你的加密保险库 + +现在一切都设置好了,你可以在任何需要存储或访问私人数据的时候使用你的加密文件库。要访问你的保险库,必须将其挂载为一个可用的文件系统: + +``` +$ sudo cryptsetup open \ + --type luks vaultfile.img myvault +$ ls /dev/mapper +myvault +$ sudo mkdir /myvault +$ sudo mount /dev/mapper/myvault /myvault +``` + +这个例子用 `cryptsetup` 打开保险库,然后把保险库从 `/dev/mapper` 下挂载到一个叫 `/myvault` 的新目录。和 Linux 上的任何卷一样,你可以把 LUKS 卷挂载到任何你想挂载的地方,所以除了 `/myvault`,你可以用 `/mnt` 或 `~/myvault` 或任何你喜欢的位置。 + +当它被挂载后,你的 LUKS 卷就会被解密。你可以像读取和写入文件一样读取和写入它,就像它是一个物理驱动器一样。 + +当使用完你的加密保险库时,请卸载并关闭它: + +``` +$ sudo umount /myvault +$ sudo cryptsetup close myvault +``` + +### 加密的文件保险库 + +你用 LUKS 加密的镜像文件和其他文件一样,都是可移动的,因此你可以将你的保险库存储在硬盘、外置硬盘,甚至是互联网上。只要你可以使用 LUKS,就可以解密、挂载和使用它来保证你的数据安全。轻松加密,提高数据安全性,不妨一试。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/linux-encryption + +作者:[Seth Kenlon][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/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life_bank_vault_secure_safe.png?itok=YoW93h7C (Secure safe) +[2]: https://opensource.com/article/21/3/encryption-luks +[3]: https://gitlab.com/cryptsetup/cryptsetup/blob/master/README.md +[4]: https://en.wikipedia.org/wiki/TrueCrypt From 69f4eef07a5aff406a101179b2e755b8fa2edb33 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 14 Apr 2021 15:13:11 +0800 Subject: [PATCH 671/818] PUB @wxy https://linux.cn/article-13296-1.html --- .../20210413 Create an encrypted file vault on Linux.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20210413 Create an encrypted file vault on Linux.md (96%) diff --git a/translated/tech/20210413 Create an encrypted file vault on Linux.md b/published/20210413 Create an encrypted file vault on Linux.md similarity index 96% rename from translated/tech/20210413 Create an encrypted file vault on Linux.md rename to published/20210413 Create an encrypted file vault on Linux.md index 1b3a234768..94dde76530 100644 --- a/translated/tech/20210413 Create an encrypted file vault on Linux.md +++ b/published/20210413 Create an encrypted file vault on Linux.md @@ -3,16 +3,16 @@ [#]: author: (Seth Kenlon https://opensource.com/users/seth) [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13296-1.html) 在 Linux 上创建一个加密文件保险库 ====== > 使用 Linux 统一密钥设置(LUKS)为物理驱动器或云存储上的敏感文件创建一个加密保险库。 -![安全保险库][1] +![](https://img.linux.net.cn/data/attachment/album/202104/14/151220l5zkkxiukgzix54k.jpg) 最近,我演示了如何在 Linux 上使用统一密钥设置Linux Unified Key Setup([LUKS][3])和 `cryptsetup` 命令 [实现全盘加密][2]。虽然加密整个硬盘在很多情况下是有用的,但也有一些原因让你不想对整个硬盘进行加密。例如,你可能需要让一个硬盘在多个平台上工作,其中一些平台可能没有集成 [LUKS][3]。此外,现在是 21 世纪,由于云的存在,你可能不会使用物理硬盘来处理所有的数据。 From 931e35285de37a0165953cc8a106458bfb61b92c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 14 Apr 2021 22:55:45 +0800 Subject: [PATCH 672/818] APL --- ...e tools and tips to securing a Linux server for beginners.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210412 6 open source tools and tips to securing a Linux server for beginners.md b/sources/tech/20210412 6 open source tools and tips to securing a Linux server for beginners.md index 36b202743a..2f065ca43a 100644 --- a/sources/tech/20210412 6 open source tools and tips to securing a Linux server for beginners.md +++ b/sources/tech/20210412 6 open source tools and tips to securing a Linux server for beginners.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/4/securing-linux-servers) [#]: author: (Sahana Sreeram https://opensource.com/users/sahanasreeram01gmailcom) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From c30436fe32811a72094f7f613c9f597246666554 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 14 Apr 2021 23:47:02 +0800 Subject: [PATCH 673/818] TSL&PRF --- ...o securing a Linux server for beginners.md | 202 ------------------ ...o securing a Linux server for beginners.md | 191 +++++++++++++++++ 2 files changed, 191 insertions(+), 202 deletions(-) delete mode 100644 sources/tech/20210412 6 open source tools and tips to securing a Linux server for beginners.md create mode 100644 translated/tech/20210412 6 open source tools and tips to securing a Linux server for beginners.md diff --git a/sources/tech/20210412 6 open source tools and tips to securing a Linux server for beginners.md b/sources/tech/20210412 6 open source tools and tips to securing a Linux server for beginners.md deleted file mode 100644 index 2f065ca43a..0000000000 --- a/sources/tech/20210412 6 open source tools and tips to securing a Linux server for beginners.md +++ /dev/null @@ -1,202 +0,0 @@ -[#]: subject: (6 open source tools and tips to securing a Linux server for beginners) -[#]: via: (https://opensource.com/article/21/4/securing-linux-servers) -[#]: author: (Sahana Sreeram https://opensource.com/users/sahanasreeram01gmailcom) -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -6 open source tools and tips to securing a Linux server for beginners -====== -Use open source tools to protect your Linux environment from breaches. -![People work on a computer server with devices][1] - -Because so much of our personal and professional data is available online today, it is important for everyone—from professionals to general internet users—to learn the basics of security and privacy. As a student, I've been able to gain experience in this area through my school's CyberPatriot initiative, where I've had the opportunity to interact with industry experts to learn about cyber breaches and the basic steps to establish a system's security. - -This article details six simple steps to improve the security of your Linux environment for personal use, based on what I have learned thus far as a beginner. Throughout my journey, I have utilized open source tools to accelerate my learning process and familiarize myself with higher-level concepts related to securing my Linux server. - -I have tested these steps using Ubuntu 18.04, the version I am most familiar with, but these steps will also work for other Linux distributions. - -### 1\. Run updates - -Developers are constantly finding ways to make servers more stable, fast, and secure by patching known vulnerabilities. Running updates regularly is a good habit to get into to maximize security. Run them with: - - -``` -`sudo apt-get update && apt-get upgrade` -``` - -### 2\. Enable firewall protection - -[Enabling a firewall][2] makes it easier to control incoming and outgoing traffic on your server. There are many firewall applications you can use on Linux, including [firewall-cmd][3] and Uncomplicated Firewall ([UFW][4]). I use UFW, so my examples are specific to it, but these principles apply to any interface you choose. - -Install UFW: - - -``` -`sudo apt-get install ufw` -``` - -If you want to secure your server even more, you can deny incoming and outgoing connections. Be warned: This cuts your server off from the world, so once you've blocked all traffic, you must specify which outgoing connections are allowed from your system: - - -``` -sudo ufw default deny incoming -sudo ufw default allow outgoing -``` - -You can also write rules for allowing incoming connections you need for personal use: - - -``` -`ufw allow ` -``` - -For example, to allow SSH connections: - - -``` -`ufw allow ssh` -``` - -Finally, enable your firewall with: - - -``` -`sudo ufw enable` -``` - -### 3\. Strengthen password protection - -Implementing a strong password policy is an important aspect of keeping a server secure from cyberattacks and data breaches. Some best practices for password policies include enforcing a minimum length and specifying password age. I use the libpam-cracklib package to accomplish these tasks. - -Install the libpam-cracklib package: - - -``` -`sudo apt-get install libpam-cracklib` -``` - -To enforce password length: - - * Open the `/etc/pam.d/common-password` file. - * Change the minimum character length of all passwords by changing the `minlen=12` line to however many characters you want. - - - -To prevent password reuse: - - * In the same file (`/etc/pam.d/common-password`), add the line `remember=x`. - * For example, if you want to prevent a user from reusing one of their last five passwords, use: `remember=5`. - - - -To enforce password age: - - * Find the following lines in the `/etc/login.defs` file and replace them with your preferred amount of time (days). For example: [code] PASS_MIN_AGE: 3 -PASS_MAX_AGE: 90 -PASS_WARN_AGE: 14 -``` -To enforce character specifications: - - * The four parameters to enforce character specifications in passwords are `lcredit` (lowercase), `ucredit` (uppercase), `dcredit` (digit), and `ocredit` (other characters). - * In the same file (`/etc/pam.d/common-password`), locate the line containing `pam_cracklib.so`. - * Add the following to the end of this line: [code]`lcredit=-a ucredit=-b dcredit=-c ocredit=-d` -``` - * For example, the following line requires passwords to contain _one_ of each parameter. You can change the numbers based on your preferred level of password security: [code]`lcredit=-1 ucredit=-1 dcredit=-1 ocredit=-1` -``` -## 4\. Disable nonessential services that are prone to exploitation - -It's a best practice to disable unnecessary services. This allows fewer ports to be open for exploitation. - -Install the systemd package: -``` -`sudo apt-get install systemd` -``` -See which services are running: -``` -`systemctl list-units` -``` -[Recognize][5] which services could cause potential vulnerabilities to your system. For each service: - - * Stop the service if it's currently running: [code]`systemctl stop ` -``` - * Disable the service from starting on boot: [code]`systemctl disable ` -``` -* After running these commands, check the status of the service: [code]`systemctl status ` -``` - - - -### 5\. Check for listening ports - -Open ports might pose security risks, so it's important to check for ports that are listening on your server. I use the [netstat][6] command to show all network connections: - - -``` -`netstat -tulpn` -``` - -Look at the address columns to determine the [port number][7]. Once you've found open ports, review them to make sure they're all necessary. If they aren't, [adjust what services you have running][8], or adjust your firewall settings. - -### 6\. Scan for malware - -Antivirus scanning software can be useful to keep viruses out of your system. Using them is a simple way to keep your server free from malware. My preferred tool is the open source software [ClamAV][9]. - -Install ClamAV: - - -``` -`sudo apt-get install clamav` -``` - -Update virus signatures: - - -``` -`sudo freshclam` -``` - -Scan all files and print out infected files, ringing a bell when one is found: - - -``` -`sudo clamscan -r --bell -i /` -``` - -You can and should automate scans so that you don't have to remember or spend time doing them manually. For simple automation like this, you can use [systemd timers][10] or your [favorite cron][11]. - -### Keep your server safe - -We cannot leave the responsibility for securing servers to a single person or organization. As the threat landscape continues to expand rapidly, it is up to each of us to be aware of the importance of server security and to employ some simple, effective security best practices. - -These are just a few of the many steps you can take to keep your Linux server safe. Of course, prevention is only part of the solution. These policies should be combined with rigorous monitoring for denial of service attacks, doing system analysis with [Lynis][12], and creating frequent backups. - -What open source tools do you use to keep your server safe? Tell us about them in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/securing-linux-servers - -作者:[Sahana Sreeram][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/sahanasreeram01gmailcom -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_linux11x_cc.png?itok=XMDOouJR (People work on a computer server with devices) -[2]: https://www.redhat.com/sysadmin/secure-linux-network-firewall-cmd -[3]: https://opensource.com/article/20/2/firewall-cheat-sheet -[4]: https://wiki.ubuntu.com/UncomplicatedFirewall -[5]: http://www.yorku.ca/infosec/Administrators/UNIX_disable.html -[6]: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/netstat -[7]: https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers -[8]: https://opensource.com/article/20/5/systemd-units -[9]: https://www.clamav.net/ -[10]: https://opensource.com/article/20/7/systemd-timers -[11]: https://opensource.com/article/21/2/linux-automation -[12]: https://opensource.com/article/20/5/linux-security-lynis diff --git a/translated/tech/20210412 6 open source tools and tips to securing a Linux server for beginners.md b/translated/tech/20210412 6 open source tools and tips to securing a Linux server for beginners.md new file mode 100644 index 0000000000..019fcd2979 --- /dev/null +++ b/translated/tech/20210412 6 open source tools and tips to securing a Linux server for beginners.md @@ -0,0 +1,191 @@ +[#]: subject: (6 open source tools and tips to securing a Linux server for beginners) +[#]: via: (https://opensource.com/article/21/4/securing-linux-servers) +[#]: author: (Sahana Sreeram https://opensource.com/users/sahanasreeram01gmailcom) +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) + +6 个提升 Linux 服务器的安全开源工具和技巧 +====== + +> 使用开源工具来保护你的 Linux 环境不被入侵。 + +![人们在带设备的计算机服务器上工作][1] + +由于如今我们的许多个人和专业数据都可以在网上获得,因此无论是专业人士还是普通互联网用户,学习安全和隐私的基本知识是非常重要的。作为一名学生,我通过学校的 CyberPatriot 活动获得了这方面的经验,在那里我有机会与行业专家交流,了解网络漏洞和建立系统安全的基本步骤。 + +本文基于我作为初学者迄今所学的知识,详细介绍了六个简单的步骤,以提高个人使用的 Linux 环境的安全性。在我的整个旅程中,我利用开源工具来加速我的学习过程,并熟悉了与提升 Linux 服务器安全有关的更高层次的概念。 + +我使用我最熟悉的 Ubuntu 18.04 版本测试了这些步骤,但这些步骤也适用于其他 Linux 发行版。 + +### 1、运行更新 + +开发者们不断地寻找方法,通过修补已知的漏洞,使服务器更加稳定、快速、安全。定期运行更新是一个好习惯,可以最大限度地提高安全性。运行它们: + +``` +sudo apt-get update && apt-get upgrade +``` + +### 2、启用防火墙保护 + +[启用防火墙][2] 可以更容易地控制服务器上的进站和出站流量。在 Linux 上有许多防火墙应用程序可以使用,包括 [firewall-cmd][3] 和 简单防火墙Uncomplicated Firewall([UFW][4])。我使用 UFW,所以我的例子是专门针对它的,但这些原则适用于你选择的任何防火墙。 + +安装 UFW: + +``` +sudo apt-get install ufw +``` + +如果你想进一步保护你的服务器,你可以拒绝传入和传出的连接。请注意,这将切断你的服务器与世界的联系,所以一旦你封锁了所有的流量,你必须指定哪些出站连接是允许从你的系统中发出的: + +``` +sudo ufw default deny incoming +sudo ufw default allow outgoing +``` + +你也可以编写规则来允许你个人使用所需要的传入连接: + +``` +ufw allow +``` + +例如,允许 SSH 连接: + +``` +ufw allow ssh +``` + +最后,启用你的防火墙: + +``` +sudo ufw enable +``` + +### 3、加强密码保护 + +实施强有力的密码政策是保持服务器安全、防止网络攻击和数据泄露的一个重要方面。密码策略的一些最佳实践包括强制要求最小长度和指定密码年龄。我使用 libpam-cracklib 软件包来完成这些任务。 + +安装 libpam-cracklib 软件包: + +``` +sudo apt-get install libpam-cracklib +``` + +强制要求密码的长度: + + * 打开 `/etc/pam.d/common-password` 文件。 + * 将 `minlen=12` 行改为你需要的任意字符数,从而改变所有密码的最小字符长度要求。 + +为防止密码重复使用: + + * 在同一个文件(`/etc/pam.d/common-password`)中,添加 `remember=x` 行。 + * 例如,如果你想防止用户重复使用他们最后 5 个密码中的一个,使用 `remember=5`。 + +要强制要求密码年龄: + + * 在 `/etc/login.defs` 文件中找到以下几行,并用你喜欢的时间(天数)替换。例如: + +``` +PASS_MIN_AGE: 3 +PASS_MAX_AGE: 90 +PASS_WARN_AGE: 14 +``` + +强制要求字符规格: + + * 在密码中强制要求字符规格的四个参数是 `lcredit`(小写)、`ucredit`(大写)、`dcredit`(数字)和 `ocredit`(其他字符)。 + * 在同一个文件(`/etc/pam.d/common-password`)中,找到包含 `pam_cracklib.so` 的行。 + * 在该行末尾添加以下内容:`lcredit=-a ucredit=-b dcredit=-c ocredit=-d`。 + * 例如,下面这行要求密码必须至少包含一个每种字符。你可以根据你喜欢的密码安全级别来改变数字。`lcredit=-1 ucredit=-1 dcredit=-1 ocredit=-1`。 + +### 4、停用容易被利用的非必要服务。 + +停用不必要的服务是一种最好的做法。这样可以减少开放的端口,以便被利用。 + +安装 systemd 软件包: + +``` +sudo apt-get install systemd +``` + +查看哪些服务正在运行: + +``` +systemctl list-units +``` + +[识别][5] 哪些服务可能会导致你的系统出现潜在的漏洞。对于每个服务可以: + + * 停止当前正在运行的服务:`systemctl stop `。 + * 禁止服务在系统启动时启动:`systemctl disable `。 + * 运行这些命令后,检查服务的状态:`systemctl status `。 + +### 5、检查监听端口 + +开放的端口可能会带来安全风险,所以检查服务器上的监听端口很重要。我使用 [netstat][6] 命令来显示所有的网络连接: + +``` +netstat -tulpn +``` + +查看 “address” 列,确定 [端口号][7]。一旦你找到了开放的端口,检查它们是否都是必要的。如果不是,[调整你正在运行的服务][8],或者调整你的防火墙设置。 + +### 6、扫描恶意软件 + +杀毒扫描软件可以有用的防止病毒进入你的系统。使用它们是一种简单的方法,可以让你的服务器免受恶意软件的侵害。我首选的工具是开源软件 [ClamAV][9]。 + +安装 ClamAV: + +``` +sudo apt-get install clamav +``` + +更新病毒签名: + +``` +sudo freshclam +``` + +扫描所有文件,并打印出被感染的文件,发现一个就会响铃: + +``` +sudo clamscan -r --bell -i / +``` + +你可以而且应该设置为自动扫描,这样你就不必记住或花时间手动进行扫描。对于这样简单的自动化,你可以使用 [systemd 定时器][10] 或者你的 [喜欢的 cron][11] 来做到。 + +### 保证你的服务器安全 + +我们不能把保护服务器安全的责任只交给一个人或一个组织。随着威胁环境的不断迅速扩大,我们每个人都应该意识到服务器安全的重要性,并采用一些简单、有效的安全最佳实践。 + +这些只是你提升 Linux 服务器的安全可以采取的众多步骤中的一部分。当然,预防只是解决方案的一部分。这些策略应该与严格监控拒绝服务攻击、用 [Lynis][12] 做系统分析以及创建频繁的备份相结合。 + +你使用哪些开源工具来保证服务器的安全?在评论中告诉我们它们的情况。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/securing-linux-servers + +作者:[Sahana Sreeram][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/sahanasreeram01gmailcom +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_linux11x_cc.png?itok=XMDOouJR (People work on a computer server with devices) +[2]: https://www.redhat.com/sysadmin/secure-linux-network-firewall-cmd +[3]: https://opensource.com/article/20/2/firewall-cheat-sheet +[4]: https://wiki.ubuntu.com/UncomplicatedFirewall +[5]: http://www.yorku.ca/infosec/Administrators/UNIX_disable.html +[6]: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/netstat +[7]: https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers +[8]: https://opensource.com/article/20/5/systemd-units +[9]: https://www.clamav.net/ +[10]: https://opensource.com/article/20/7/systemd-timers +[11]: https://opensource.com/article/21/2/linux-automation +[12]: https://opensource.com/article/20/5/linux-security-lynis From 0de350723974ae3743c4a9413e18c43b2af07beb Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 15 Apr 2021 05:02:30 +0800 Subject: [PATCH 674/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210414=20?= =?UTF-8?q?Fedora=20Workstation=2034=20feature=20focus:=20Btrfs=20transpar?= =?UTF-8?q?ent=20compression?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210414 Fedora Workstation 34 feature focus- Btrfs transparent compression.md --- ...re focus- Btrfs transparent compression.md | 145 ++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 sources/tech/20210414 Fedora Workstation 34 feature focus- Btrfs transparent compression.md diff --git a/sources/tech/20210414 Fedora Workstation 34 feature focus- Btrfs transparent compression.md b/sources/tech/20210414 Fedora Workstation 34 feature focus- Btrfs transparent compression.md new file mode 100644 index 0000000000..530feb0a03 --- /dev/null +++ b/sources/tech/20210414 Fedora Workstation 34 feature focus- Btrfs transparent compression.md @@ -0,0 +1,145 @@ +[#]: subject: (Fedora Workstation 34 feature focus: Btrfs transparent compression) +[#]: via: (https://fedoramagazine.org/fedora-workstation-34-feature-focus-btrfs-transparent-compression/) +[#]: author: (nickavem https://fedoramagazine.org/author/nickavem/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Fedora Workstation 34 feature focus: Btrfs transparent compression +====== + +![][1] + +Photo by [Patrick Lindenberg][2] on [Unsplash][3] + +The release of Fedora 34 grows ever closer, and with that, some fun new features! A [previous feature focus][4] talked about some changes coming to GNOME version 40. This article is going to go a little further under the hood and talk about data compression and _transparent compression_ in _btrfs_. A term like that may sound scary at first, but less technical users need not be wary. This change is simple to grasp, and will help many Workstation users in several key areas. + +### What is transparent compression exactly? + +Transparent compression is complex, but at its core it is simple to understand: it makes files take up less space. It is somewhat like a compressed tar file or ZIP file. Transparent compression will dynamically optimize your file system’s bits and bytes into a smaller, reversible format. This has many benefits that will be discussed in more depth later on, however, at its core, it makes files smaller. This may leave most computer users with a question: “I can’t just read ZIP files. You need to decompress them. Am I going to need to constantly decompress things when I access them?”. That is where the “transparent” part of this whole concept comes in. + +Transparent compression makes a file smaller, but the final version is indistinguishable from the original by the human viewer. If you have ever worked with Audio, Video, or Photography you have probably heard of the terms “lossless” and “lossy”. Think of transparent compression like a lossless compressed PNG file. You want the image to look exactly like the original. Small enough to be streamed over the web but still readable by a human. Transparent compression works similarly. Your file system will look and behave the same way as before (no ZIP files everywhere, no major speed reductions). Everything will look, feel, and behave the same. However, in the background it is taking up much less disk space. This is because BTRFS will dynamically compress and decompress your files for you. It’s “Transparent” because even with all this going on, you won’t notice the difference. + +> You can learn more about transparent compression at + +### Transparent compression sounds cool, but also too good to be true… + +I would be lying if I said transparent compression doesn’t slow some things down. It adds extra CPU cycles to pretty much any I/O operation, and can affect performance in certain scenarios. However, Fedora is using the extremely efficient _zstd:1_ algorithm. [Several tests][5] show that relative to the other benefits, the downsides are negligible (as I mentioned in my explanation before). Better disk space usage is the greatest benefit. You may also receive reduction of write amplification (can increase the lifespan of SSDs), and enhanced read/write performance. + +Btrfs transparent compression is extremely performant, and chances are you won’t even notice a difference when it’s there. + +### I’m convinced! How do I get this working? + +In fresh **installations of Fedora 34 and its [corresponding beta][6], it should be enabled by default. However, it is also straightforward to enable before and after an upgrade from Fedora 33. You can even enable it in Fedora 33, if you aren’t ready to upgrade just yet. + + 1. (Optional) Backup any important data. The process itself is completely safe, but human error isn’t. + 2. To truly begin you will be editing your _[fstab][7]_. This file tells your computer what file systems exist where, and how they should be handled. You need to be cautious here, but only a few small changes will be made so don’t be intimidated. On an installation of Fedora 33 with the default Btrfs layout the _/etc/fstab_ file will probably look something like this: + + +``` + +``` + +<strong>$ $EDITOR /etc/fstab</strong> +UUID=1234 /                       btrfs   subvol=root     0 0 +UUID=1234 /boot                   ext4    defaults        1 2 +UUID=1234         /boot/efi               vfat    umask=0077,shortname=winnt 0 2 +UUID=1234 /home                   btrfs   subvol=home     0 0 +``` + +``` + +NOTE: _While this guide builds around the standard partition layout, you may be an advanced enough user to partition things yourself. If so, you are probably also advanced enough to extrapolate the info given here onto your existing system. However, comments on this article are always open for any questions._ + +Disregard the _/boot_ and _/boot/efi_ directories as they aren’t ([currently][8]) compressed. You will be adding the argument _compress=zstd:1_. This tells the computer that it should transparently compress any newly written files if they benefit from it. Add this option in the fourth column, which currently only contains the _subvol_ option for both /home and /: +``` + +``` + +UUID=1234 /                       btrfs   subvol=root,compress=zstd:1     0 0 +UUID=1234 /boot                   ext4    defaults        1 2 +UUID=1234         /boot/efi               vfat    umask=0077,shortname=winnt 0 2 +UUID=1234 /home                   btrfs   subvol=home,compress=zstd:1     0 0 +``` + +``` + +Once complete, simply save and exit (on the default _nano_ editor this is CTRL-X, SHIFT-Y, then ENTER). + +3\. Now that fstab has been edited, tell the computer to read it again. After this, it will make all the changes required: + +``` +$ sudo mount -o remount / /home/ +``` + +Once you’ve done this, you officially have transparent compression enabled for all newly written files! + +### Recommended: Retroactively compress old files + +Chances are you already have many files on your computer. While the previous configuration _will_ compress all newly written files, those old files will not benefit. I recommend taking this next (but optional) step to receive the full benefits of transparent compression. + + 1. (Optional) Clean out any data you don’t need (empty trash etc.). This will speed things up. However, it’s not required. + 2. Time to compress your data. One simple command can do this, but its form is dependent on your system. Fedora Workstation (and any other desktop spins using the DNF package manager) should use: + + + +``` +$ sudo btrfs filesystem defrag -czstd -rv / /home/ +``` + +Fedora Silverblue users should use: + +``` +$ sudo btrfs filesystem defrag -czstd -rv / /var/home/ +``` + +Silverblue users may take note of the immutability of some parts of the file system as described [here][9] as well as this [Bugzilla entry][10]. + +NOTE: _You may receive several warnings that say something like “Cannot compress permission denied.”. This is because some files, on Silverblue systems especially, the user cannot easily modify. This is a tiny subset of files. They will most likely compress on their own, in time, as the system upgrades._ + +Compression can take anywhere from a few minutes to an hour depending on how much data you have. Luckily, since all new writes are compressed, you can continue working while this process completes. Just remember it may partially slow down your work at hand and/or the process itself depending on your hardware. + +Once this command completes you are officially fully compressed! + +### How much file space is used, how big are my files + +Due to the nature of transparent compression, utilities like _du_ will only report exact, uncompressed, files space usage. This is not the actual space they take up on the disk. The [_compsize_][11] utility is the best way to see how much space your files are actually taking up on disk. An example of a _compsize_ command is: + +``` +$ sudo compsize -x / /home/ +``` + +This example provides exact information on how the two locations, / and /home/ are currently, transparently, compressed. If not installed, this utility is available in the Fedora Linux repository. + +### Conclusion: + +Transparent compression is a small but powerful change. It should benefit everyone from developers to sysadmin, from writers to artists, from hobbyists to gamers. It is one among many of the changes in Fedora 34. These changes will allow us to take further advantage of our hardware, and of the powerful Fedora Linux operating system. I have only just touched the surface here. I encourage those of you with interest to begin at the [Fedora Project Wiki][12] and [Btrfs Wiki][13] to learn more! + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/fedora-workstation-34-feature-focus-btrfs-transparent-compression/ + +作者:[nickavem][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/nickavem/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2021/04/btrfs_compression-1-816x345.jpg +[2]: https://unsplash.com/@heapdump?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/hdd-compare?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://fedoramagazine.org/fedora-34-feature-focus-updated-activities-overview/ +[5]: https://fedoraproject.org/wiki/Changes/BtrfsTransparentCompression#Simple_Analysis_of_btrfs_zstd_compression_level +[6]: https://fedoramagazine.org/announcing-fedora-34-beta/ +[7]: https://en.wikipedia.org/wiki/Fstab +[8]: https://fedoraproject.org/wiki/Changes/BtrfsTransparentCompression#Q:_Will_.2Fboot_be_compressed.3F +[9]: https://docs.fedoraproject.org/en-US/fedora-silverblue/technical-information/#filesystem-layout +[10]: https://bugzilla.redhat.com/show_bug.cgi?id=1943850 +[11]: https://github.com/kilobyte/compsize +[12]: https://fedoraproject.org/wiki/Changes/BtrfsTransparentCompression +[13]: https://btrfs.wiki.kernel.org/index.php/Compression From 5e00c99042e1ce07a17eb16ebc3f6b894f81b3f8 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 15 Apr 2021 05:02:58 +0800 Subject: [PATCH 675/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210414=20?= =?UTF-8?q?Using=20Web=20Assembly=20Written=20in=20Rust=20on=20the=20Serve?= =?UTF-8?q?r-Side?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210414 Using Web Assembly Written in Rust on the Server-Side.md --- ...mbly Written in Rust on the Server-Side.md | 306 ++++++++++++++++++ 1 file changed, 306 insertions(+) create mode 100644 sources/tech/20210414 Using Web Assembly Written in Rust on the Server-Side.md diff --git a/sources/tech/20210414 Using Web Assembly Written in Rust on the Server-Side.md b/sources/tech/20210414 Using Web Assembly Written in Rust on the Server-Side.md new file mode 100644 index 0000000000..d610f17791 --- /dev/null +++ b/sources/tech/20210414 Using Web Assembly Written in Rust on the Server-Side.md @@ -0,0 +1,306 @@ +[#]: subject: (Using Web Assembly Written in Rust on the Server-Side) +[#]: via: (https://www.linux.com/news/using-web-assembly-written-in-rust-on-the-server-side/) +[#]: author: (Dan Brown https://training.linuxfoundation.org/announcements/using-web-assembly-written-in-rust-on-the-server-side/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Using Web Assembly Written in Rust on the Server-Side +====== + +_By Bob Reselman_ + +_This article was originally published at [TheNewStac][1]k_ + +WebAssembly allows you to write code in a low-level programming language such as Rust, that gets compiled into a transportable binary. That binary can then be run on the client-side in the WebAssembly virtual machine that is [standard in today’s web browsers][2]. Or, the binary can be used on the server-side, as a component consumed by another programming framework — such as Node.js or [Deno][3]. + +WebAssembly combines the efficiency inherent in low-level code programming with the ease of component transportability typically found in Linux containers. The result is a development paradigm specifically geared toward doing computationally intensive work at scale — for example, artificial intelligence and complex machine learning tasks. + +As Solomon Hykes, the creator of Docker, [tweeted][4] on March 27, 2019: “If WASM+WASI existed in 2008, we wouldn’t have needed to have created Docker. That’s how important it is. WebAssembly on the server is the future of computing.” + +WebAssembly is a compelling approach to software development. However, in order to get a true appreciation for the technology, you need to see it in action. + +In this article, I am going to show you how to program a WebAssembly binary in Rust and use it in a TypeScript-powered web server running under Deno. I’ll show you how to install Rust and prep the runtime environment. We’ll compile the source code into a Rust binary. Then, once the binary is created, I’ll demonstrate how to run it on the server-side under [Deno][3]. Deno is a TypeScript-based programming framework that was started by Ryan Dahl, the creator of Node.js. + +### Understanding the Demonstration Project + +The demonstration project that accompanies this article is called Wise Sayings. The project stores a collection of “wise sayings” in a text file named wisesayings.txt. Each line in the text file is a wise saying, for example, “_A friend in need is a friend indeed._” + +The Rust code publishes a single function, get_wise_saying(). That function gets a random line from the text file, wisesayings.txt, and returns the random line to the caller. (See Figure 1, below) + + + +Figure 1: The demonstration project compiles data in a text file directly into the WebAssembly binary + +Both the code and text file are compiled into a single WebAssembly binary file, named wisesayings.wasm. Then another layer of processing is performed to make the WebAssembly binary consumable by the Deno web server code. The Deno code calls the function get_wise_sayings() in the WebAssembly binary, to produce a random wise saying. (See Figure 2.) + + + +Figure 2: WebAssembly binaries can be consumed by a server-side programming framework such as Deno. + +_You get the source code for the Wise Sayings demonstration project used in this article [on GitHub][5]. All the steps described in this article are listed on the repository’s main [Readme][6] document._ + +### Prepping the Development Environment + +The first thing we need to do to get the code up and running is to make sure that Rust is installed in the development environment. The following steps describe the process. + +**Step 1: **Make sure Rust is installed on your machine by typing: + +1 | rustc —version +---|--- + +You’ll get output similar to the following: + +1 | rustc 1.50.0 (cb75ad5db 2021–02–10) +---|--- + +If the call to rustc –version fails, you don’t have Rust installed. Follow the instructions below and** make sure you do all the tasks presented by the given installation method**. + +To install Rust, go here and install on Linux/MAC: … + +1 | curl —proto ‘=https’ —tlsv1.2 –sSf +---|--- + +… or here to install it on Windows: + +Download and run rustup-init.exe which you can find at this URL: . + +**Step 2:** Modify your system’s PATH + +1 | export PATH=“$HOME/.cargo/bin:$PATH” +---|--- + +**Step 3: **If you’re working in a Linux environment do the following steps to install the required additional Linux components. + +1 2 3 4 5 | sudo apt–get update –y sudo apt–get install –y libssl–dev apt install pkg–config +---|--- + +***Developer’s Note: *_The optimal development environment in which to run this code is one that uses the Linux operating system._ + +**Step 4: **Get the CLI tool that you’ll use for generating the TypeScript/JavaScript adapter files. These adapter files (a.k.a. shims) do the work of exposing the function get_wise_saying() in the WebAssembly binary to the Deno web server that will be hosting the binary. Execute the following command at the command line to install the tool, [wasm-bindgen-cli][7]. + +1 | cargo install wasm–bindgen–cli +---|--- + +The development environment now has Rust installed, along with the necessary ancillary libraries. Now we need to get the Wise Saying source code. + +### Working with the Project Files + +The Wise Saying source code is hosted in a GitHub repository. Take the following steps to clone the source code from GitHub onto the local development environment. + +**Step 1: **Execute the following command to clone the Wise Sayings source code from GitHub + +1 | git clone +---|--- + +**Step 2: **Go to the working directory + +1 | cd wisesayingswasm/ +---|--- + +Listing 1, below lists the files that make up the source code cloned from the GitHub repository. + +1 2 3 4 5 6 7 8 9 10 11 12 13 14 | . ├── Cargo.toml ├── cheatsheet.txt ├── LICENSE ├── lldbconfig ├── package–lock.json ├── README.md ├── server │   ├── main.ts │   └── package–lock.json └── src     ├── fortunes.txt     ├── lib.rs     └── main.rs +---|--- + +_Listing 1: The files for the source code for the Wise Sayings demonstration project hosted in the GitHub repository_ + +Let’s take a moment to describe the source code files listed above in Listing 1. The particular files of interest with regard to creating the WebAssembly binary are the files in the directory named, src at Line 11 and the file, Cargo.toml at Line 2. + +Let’s discuss Cargo.toml first. The content of Cargo.toml is shown in Listing 2, below. + +1 2 3 4 5 6 7 8 9 10 11 12 13 14 | [package] name = “wise-sayings-wasm” version = “0.1.0” authors = [“Bob Reselman <bob@CogArtTech.com>”] edition = “2018” [dependencies] rand = “0.8.3” getrandom = { version = “0.2”, features = [“js”] } wasm–bindgen = “0.2.70” [lib] name = “wisesayings” crate–type =[“cdylib”, “lib”] +---|--- + +_Listing 2: The content of Cargo.toml for the demonstration project Wise Sayings_ + +Cargo.toml is the [manifest file][8] that describes various aspects of the Rust project under development. The Cargo.toml file for the Wise Saying project is organized into three sections: package, dependencies, and lib. The section names are defined in the Cargo manifest specification, which you read [here][8]. + +#### Understanding the Package Section of Cargo.toml + +The package section indicates the name of the package (wise-sayings-wasm), the developer assigned version (0.1.0), the authors (Bob Reselman <[bob@CogArtTech.com][9]>) and the edition of Rust (2018) that is used to program the binary. + +#### Understanding the Dependencies Section of Cargo.toml + +The dependencies section lists the dependencies that the WebAssembly project needs to do its work. As you can see in Listing 2, above at Line 8, the Cargo.toml lists the rand library as a dependency. The rand library provides the capability to generate a random number which is used to get a random line of wise saying text from the file, wisesayings.txt. + +The reference to getrandom at Line 9 in Listing 2 above indicates that the WebAssembly binary’s [getrandom][10] is running under Javascript and that the [JavaScript interface should be used][11]. This condition is very particular to running a WebAssembly binary under JavaScript. The long and short of it is that if the line getrandom = { version = “0.2”, features = [“js”] } is not included in the Cargo.toml, the WebAssembly binary will not be able to create a random number. + +The entry at Line 10 declares the [wasm-bindgen][12] library as a dependency. The wasm-bindgen library provides the capability for wasm modules to talk to JavaScript and JavaScript to talk to wasm modules. + +#### Understanding the Lib Section of Cargo.toml + +The entry [crate-type =[“cdylib”, “lib”]][13] at Line 14 in the lib section of the Cargo.toml file tells the Rust compiler to create a wasm binary without a start function. Typically when cdylib is indicated, the compiler will create a [dynamic library][14] with the extension .dll in Windows, .so in Linux, or .dylib in MacOS. In this case, because the deployment unit is a WebAssembly binary, the compiler will create a file with the extension .wasm. The name of the wasm file will be wisesayings.wasm, as indicated at Line 13 above in Listing 2. + +The important thing to understand about Cargo.toml is that it provides both the design and runtime information needed to get your Rust code up and running. If the Cargo.toml file is not present, the Rust compiler doesn’t know what to do and the build will fail. + +### Understanding the Core Function, get_wise_saying() + +The actual work of getting a random line that contains a Wise Saying from the text file wisesayings.txt is done by the function get_wise_saying(). The code for get_wise_sayings() is in the Rust library file, ./src/lib.rs. The Rust code is shown below in Listing 3. + +1 2 3 4 5 6 7 8 9 10 11 12 13 | use rand::seq::IteratorRandom; use wasm_bindgen::prelude::*; #[wasm_bindgen] pub fn get_wise_saying() -> String {     let str = include_str!(“fortunes.txt”);     let mut lines = str.lines();     let line = lines         .choose(&mut rand::thread_rng())         .expect(“File had no lines”);     return line.to_string(); } +---|--- + +_Listing 3: The function file, lib.rs contains the function, get_wise_saying()._ + +The important things to know about the source is that it’s tagged at Line 4 with the attribute #[wasm_bindgen], which lets the Rust compiler know that the source code is targeted as a WebAssembly binary. The code publishes one function, get_wise_saying(), at Line 5. The way the wise sayings text file is loaded into memory is to use the [Rust macro][15], [include_str!][16]. This macro does the work of getting the file from disk and loading the data into memory. The macro loads the file as a string and the function str.lines() separates the lines within the string into an array. (Line 7.) + +The rand::thread_rng() call at Line 10 returns a number that is used as an index by the .choose() function at Line 10. The result of it all is an array of characters (a string) that reflects the wise saying returned by the function. + +### Creating the WebAssembly Binary + +Let’s move on compiling the code into a WebAssembly Binary. + +**Step 1: **Compile the source code into a WebAssembly is shown below. + +1 | cargo build —lib —target wasm32–unknown–unknown +---|--- + +WHERE + +**cargo build** is the command and subcommand to invoke the Rust compiler using the settings in the Cargo.toml file. + +**–lib** is the option indicating that you’re going to build a library against the source code in the ./lib directory. + +**–targetwasm32-unknown-unknown** indicates that Rust will use the wasm-unknown-unknown compiler and will store the build artifacts as well as the WebAssembly binary into directories within the target directory, **wasm32-unknown-unknown.** + +#### **Understanding the Rust Target Triple Naming Convention** + +Rust has a naming convention for targets. The term used for the convention is a _target triple_. A target triple uses the following format: ARCH-VENDOR-SYS-ABI. + +**WHERE** + +**ARCH** describes the intended target architecture, for example wasm32 for WebAssembly, or i686 for current-generation Intel chips. + +**VENDOR** describes the vendor publishing the target; for example, Apple or Nvidia. + +**SYS** describes the operating system; for example, Windows or Linux. + +**ABI** describes how the process starts up, for eabi is used for bare metal, while gnu is used for glibc. + +Thus, the name i686-unknown-linux-gnu means that the Rust binary is targeted to an i686 architecture, the vendor is defined as unknown, the targeted operating system is Linux, and ABI is gnu. + +In the case of wasm32-unknown-unknown, the target is WebAssembly, the operating system is unknown and the ABI is unknown. The informal inference of the name is “it’s a WebAssembly binary.” + +There are a standard set of built-in targets defined by Rust that can be found [here][17]. + +If you find the naming convention to be confusing because there are optional fields and sometimes there are four sections to the name, while other times there will be three sections, you are not alone. + +### Deploying the Binary Server-Side Using Deno + +After we build the base WeAssembly binary, we need to create the adapter (a.k.a shim) files and a special version of the WebAssembly binary — all of which can be run from within JavaScript. We’ll create these artifacts using the [wasm-bindgen][18] tool. + +**Step 1: **We create these new artifacts using the command shown below. + +1 | wasm–bindgen —target deno ./target/wasm32–unknown–unknown/debug/wisesayings.wasm —out–dir ./server +---|--- + +WHERE + +**wasm-bindgen** is the command for creating the adapter files and the special WebAssembly binary. + +**–target deno ./target/wasm32-unknown-unknown/debug/wisesayings.wasm** is the option that indicates the adapter files will be targeted for Deno. Also, the option denotes the location of the original WebAssembly wasm binary that is the basis for the artifact generation process. + +**–out-dir ./server** is the option that declares the location where the created adapter files will be stored on disk; in this case, **./server**. + +The result of running wasm-bindgen is the server directory shown in Listing 4 below. + +1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | . ├── Cargo.toml ├── cheatsheet.txt ├── LICENSE ├── lldbconfig ├── package–lock.json ├── README.md ├── server │   ├── main.ts │   ├── package–lock.json │   ├── wisesayings_bg.wasm │   ├── wisesayings_bg.wasm.d.ts │   ├── wisesayings.d.ts │   └── wisesayings.js └── src     ├── fortunes.txt     ├── lib.rs     └── main.rs +---|--- + +_Listing 4: The server directory contains the results of running wasm-bindgen_ + +Notice that the contents of the server directory, shown above in Listing 4, now has some added JavaScript (js) and TypeScript (ts) files. Also, the server directory has the special version of the WebAssembly binary, named wisesayings_bg.wasm. This version of the WebAssembly binary is a stripped-down version of the wasm file originally created by the initial compilation, done when invoking cargo build earlier. You can think of this new wasm file as a JavaScript-friendly version of the original WebAssembly binary. The suffix, _bg, is an abbreviation for bindgen. + +### Running the Deno Server + +Once all the artifacts for running WebAssembly have been generated into the server directory, we’re ready to invoke the Deno web server. Listing 5 below shows content of main.ts, which is the source code for the Deno web server. + +1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | import { serve } from “https://deno.land/std@0.86.0/http/server.ts”; import { get_wise_saying } from “./wisesayings.js”; const env = Deno.env.toObject(); let port = 4040; if(env.WISESAYING_PORT){   port = Number(env.WISESAYING_PORT); }; const server = serve({ hostname: “0.0.0.0”, port}); console.log(`HTTP webserver running at ${new Date()}.  Access it at:  http://localhost:${port}/`); for await (const request of server) {     const saying = get_wise_saying();     request.respond({ status: 200, body: saying });   } +---|--- + +_Listing 5: main.ts is the Deno webserver code that uses the WebAssembly binary_ + +You’ll notice that the WebAssembly wasm binary is not imported directly. This is because the work of representing the WebAssembly binary is done by the JavaScript and TypeScript adapter (a.k.a shim) files generated earlier. The WebAssembly/Rust function, get_wise_sayings(), is exposed in the auto-generated JavaScript file, wisesayings.js. + +The function get_wise_saying is imported into the webserver code at Line 2 above. The function is used at Line 16 to get a wise saying that will be returned as an HTTP response by the webserver. + +To get the Deno web server up and running, execute the following command in a terminal window. + +**Step 1:** + +1 | deno run —allow–read —allow–net —allow–env ./main.ts +---|--- + +WHERE + +deno run is the command set to invoke the webserver. + +–allow-read is the option that allows the Deno webserver code to have permission to read files from disk. + +–allow-net is the option that allows the Deno webserver code to have access to the network. + +–allow-env is the option that allows the Deno webserver code read environment variables. + +./main.ts is the TypeScript file that Deno is to run. In this case, it’s the webserver code. + +When the webserver is up and running, you’ll get output similar to the following: + +HTTP webserver running at Thu Mar 11 2021 17:57:32 GMT+0000 (Coordinated Universal Time). Access it at: + +**Step 2:** + +Run the following command in a terminal on your computer to exercise the Deno/WebAssembly code + +1 | curl localhost:4040 +---|--- + +You’ll get a wise saying, for example: + +_True beauty lies within._ + +**Congratulations!** You’ve created and run a server-side WebAssembly binary. + +### Putting It All Together + +In this article, I’ve shown you everything you need to know to create and use a WebAssembly binary in a Deno web server. Yet for as detailed as the information presented in this article is, there is still a lot more to learn about what’s under the covers. Remember, Rust is a low-level programming language. It’s meant to go right up against the processor and memory directly. That’s where its power really is. The real benefit of WebAssembly is using the technology to do computationally intensive work from within a browser. Applications that are well suited to WebAssembly are visually intensive games and activities that require complex machine learning capabilities — for example, real-time voice recognition and language translation. WebAssembly allows you to do computation on the client-side that previously was only possible on the server-side. As Solomon Hykes said, WebAssembly is the future of computing. He might very well be right. + +The important thing to understand is that WebAssembly provides enormous opportunities for those wanting to explore cutting-edge approaches to modern distributed computing. Hopefully, the information presented in this piece will motivate you to explore those opportunities. + +The post [Using Web Assembly Written in Rust on the Server-Side][19] appeared first on [Linux Foundation – Training][20]. + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/using-web-assembly-written-in-rust-on-the-server-side/ + +作者:[Dan Brown][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://training.linuxfoundation.org/announcements/using-web-assembly-written-in-rust-on-the-server-side/ +[b]: https://github.com/lujun9972 +[1]: https://thenewstack.io/using-web-assembly-written-in-rust-on-the-server-side/ +[2]: https://www.infoq.com/news/2017/12/webassembly-browser-support/ +[3]: https://deno.land/ +[4]: https://twitter.com/solomonstre/status/1111004913222324225?s=20 +[5]: https://github.com/reselbob/wisesayingswasm +[6]: https://github.com/reselbob/wisesayingswasm/blob/main/README.md +[7]: https://rustwasm.github.io/docs/wasm-bindgen/reference/cli.html +[8]: https://doc.rust-lang.org/cargo/reference/manifest.html +[9]: mailto:bob@CogArtTech.com +[10]: https://docs.rs/getrandom/0.2.2/getrandom/ +[11]: https://docs.rs/getrandom/0.2.2/getrandom/#webassembly-support +[12]: https://rustwasm.github.io/docs/wasm-bindgen/ +[13]: https://rustwasm.github.io/docs/wasm-pack/tutorials/npm-browser-packages/template-deep-dive/cargo-toml.html#1-crate-type +[14]: https://en.wikipedia.org/wiki/Library_(computing)#Shared_libraries +[15]: https://doc.rust-lang.org/book/ch19-06-macros.html +[16]: https://doc.rust-lang.org/std/macro.include_str.html +[17]: https://docs.rust-embedded.org/embedonomicon/compiler-support.html#built-in-target +[18]: https://rustwasm.github.io/wasm-bindgen/ +[19]: https://training.linuxfoundation.org/announcements/using-web-assembly-written-in-rust-on-the-server-side/ +[20]: https://training.linuxfoundation.org/ From ea259bc238988fb250a093663cc1c555896a76a3 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 15 Apr 2021 05:03:39 +0800 Subject: [PATCH 676/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210414=20?= =?UTF-8?q?3=20essential=20Linux=20cheat=20sheets=20for=20productivity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210414 3 essential Linux cheat sheets for productivity.md --- ...ial Linux cheat sheets for productivity.md | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 sources/tech/20210414 3 essential Linux cheat sheets for productivity.md diff --git a/sources/tech/20210414 3 essential Linux cheat sheets for productivity.md b/sources/tech/20210414 3 essential Linux cheat sheets for productivity.md new file mode 100644 index 0000000000..0456fb5d85 --- /dev/null +++ b/sources/tech/20210414 3 essential Linux cheat sheets for productivity.md @@ -0,0 +1,123 @@ +[#]: subject: (3 essential Linux cheat sheets for productivity) +[#]: via: (https://opensource.com/article/21/4/linux-cheat-sheets) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +3 essential Linux cheat sheets for productivity +====== +Download cheat sheets for sed, grep, and parted to integrate new +processes into your work. +![Hand putting a Linux file folder into a drawer][1] + +Linux is famous for its commands. This is partially because nearly everything that Linux does can also be invoked from a terminal, but it's also that Linux as an operating system is highly modular. Its tools are designed to produce fairly specific results, and when you know a lot about a few commands, you can combine them in interesting ways for useful output. Learning Linux is equal parts learning commands and learning how to string those commands together in interesting combinations. + +With so many Linux commands to learn, though, taking the first step can seem daunting. What command should you learn first? Which commands should you learn well, and which commands require only a passing familiarity? I've thought about these questions a lot, and I'm not convinced there's a universal answer. The "basic" commands are probably the same for anyone: + + * `ls` + * `cd` + * `mv` + + + +These amount to being able to navigate your Linux file system. + +Beyond the basics, though, the "default" commands vary from industry to industry. Sysadmins need tools for [system introspection and monitoring][2]. Artists need tools for [media conversion][3] and [graphic processing][4]. Home users might want tools for [PDF processing][5], or [calendaring][6], or [document conversion][7]. The list goes on and on. + +However, some Linux commands stand out as being particularly important—either because they're common low-level tools that everyone needs on occasion or they're all-purpose tools that anyone might find useful most of the time. + +Here are three to add to your list. + +### Sed + +**Purpose:** The `sed` command is a good, all-purpose tool that any Linux user can benefit from knowing. On the surface, it's just a terminal-based "find and replace." That makes it great for quick and easy corrections across multiple documents. The `sed` command has saved me hours (or possibly cumulative days) of opening individual files, searching and replacing a word, saving the file, and closing the file. It alone justifies my investment in learning the Linux terminal. Once you get to know `sed` well, you're likely to discover a whole world of potential editing tricks that make your life easier. + +**Strength:** The command's strength is in repetition. If you have just one file to edit, it's easy to open it and do a "find and replace" in a traditional [text editor][8]. However, when you're faced with five or 50 files, a good `sed` command (maybe combined with [GNU Parallel][9] for extra speed) can reclaim hours of your day. + +**Weakness:** You have to balance the time you expect to spend making a change with how long it may take you to construct the right `sed` command. Simple edits with the common `sed 's/foo/bar/g` syntax are almost always worth the trivial amount of time it takes to type the command, but complex `sed` commands that utilize a hold space and any of the `ed` style subcommands can take serious concentration combined with several rounds of trial and error. It can be, as it turns out, better to do some edits the new-fashioned way. + +**Cheat:** Download our [sed cheat sheet][10] for quick reference to its single-letter subcommands and an overview of its syntax. + +### Grep + +**Purpose:** The `grep` command comes from its admittedly clunky description: global regular expression print. In other words, `grep` prints to the terminal any matching pattern it finds in files (or other forms of input). That makes it a great search tool, especially adept at scrubbing through vast amounts of text. + +You might use it to find URLs: + + +``` +$ grep --only-matching \ +http\:\/\/.* example.txt +``` + +You could use it to find a specific config option: + + +``` +$ grep --line-number \ +foo= example.ini +2:foo=true +``` + +And of course, you can combine it with other commands: + + +``` +$ grep foo= example.ini | cut -d= -f2 +true +``` + +**Strength:** The `grep` command is a straightforward search command. If you've read the few examples above, then you've essentially learned the command. For even more flexibility, you can use its extended regular expression syntax. + +**Weakness:** The problem with `grep` is also one of its strengths: It's just a search function. Once you've found what you're looking for, you might be faced with the larger question of what to do with it. Sometimes the answer is as easy as redirecting the output to a file, which becomes your filtered list of results. However, more complex use cases mean further processing with any number of commands like [awk][11], [curl][12] (incidentally, [we have a cheat sheet for curl][13], too), or any of the thousands of other options you have on a modern computer. + +**Cheat:** Download our [grep cheat sheet][14] for a quick reference to its many options and regex syntax. + +### Parted + +**Purpose:** GNU `parted` isn't a daily-use command for most people, but it is one of the most powerful tools for hard-drive manipulation. The frustrating thing about hard drives is that you spend years ignoring them until you get a new one and have to set it up for your computer. It's only then that you remember that you have no idea how to best format your drive. That's when familiarity with `parted` can be useful. GNU `parted` can create disk labels and create, back up, and rescue partitions. In addition, it can provide you with lots of information about a drive and its layout and generally prepare a drive for a filesystem. + +**Strength:** The reason I love `parted` over `fdisk` and similar tools is for its combination of an easy interactive mode and its fully noninteractive option. Regardless of how you choose to use `parted`, its commands follow a consistent syntax, and its help menus are well-written and informative. Better still, the command itself is _smart_. When partitioning a drive, you can specify sizes in anything from sectors to percentages, and `parted` does its best to figure out the finer points of partition table placement. + +**Weakness:** It took me a long while to learn GNU `parted` after switching to Linux because, for a very long time, I didn't have a good understanding of how drives actually work. GNU `parted` and most terminal-based drive utilities assume you know what a partition is, that drives have sectors and need disk labels and partition tables that initially lack filesystems, and so on. There's a steep learning curve—not to the command so much as to the foundations of hard-drive technology, and GNU `parted` doesn't do much to bridge the potential gap. It's arguably not the command's job to step you through the process because there are [graphical applications][15] for that, but a workflow-focused option for GNU `parted` could be an interesting addition to the utility. + +**Cheat:** Download our [parted cheat sheet][16] for a quick reference to its many subcommands and options. + +### Learn more + +These are some of my favorite commands, but the list is naturally biased to how I use my computer. I do a lot of shell scripting, so I make heavy use of `grep` to find configuration options, I use `sed` for text editing, and I use `parted` because when I'm working on multimedia projects, there are usually a lot of hard drives involved. You either already have, or you'll soon develop, your own workflows with your own favorite (or at least _frequent_) commands. + +When I'm integrating new processes into my daily work, I create or download a cheat sheet (like the ones linked above), and then I practice. We all learn in our own way, though, so find what works best for you, and learn a new essential command. The more you learn about your most frequent commands, the more you can make them work harder for you. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/linux-cheat-sheets + +作者:[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/yearbook-haff-rx-linux-file-lead_0.png?itok=-i0NNfDC (Hand putting a Linux file folder into a drawer) +[2]: https://opensource.com/life/16/2/open-source-tools-system-monitoring +[3]: https://opensource.com/article/17/6/ffmpeg-convert-media-file-formats +[4]: https://opensource.com/article/17/8/imagemagick +[5]: https://opensource.com/article/20/8/reduce-pdf +[6]: https://opensource.com/article/19/4/calendar-git +[7]: https://opensource.com/article/20/5/pandoc-cheat-sheet +[8]: https://opensource.com/article/21/2/open-source-text-editors +[9]: https://opensource.com/article/18/5/gnu-parallel +[10]: https://opensource.com/downloads/sed-cheat-sheet +[11]: https://opensource.com/article/20/9/awk-ebook +[12]: https://www.redhat.com/sysadmin/social-media-curl +[13]: https://opensource.com/article/20/5/curl-cheat-sheet +[14]: https://opensource.com/downloads/grep-cheat-sheet +[15]: https://opensource.com/article/18/11/partition-format-drive-linux#gui +[16]: https://opensource.com/downloads/parted-cheat-sheet From 6fef5a627762f57cb69cdcbadfa7f9eb3cfe720c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 15 Apr 2021 05:04:03 +0800 Subject: [PATCH 677/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210414=20?= =?UTF-8?q?Make=20your=20data=20boss-friendly=20with=20this=20open=20sourc?= =?UTF-8?q?e=20tool?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210414 Make your data boss-friendly with this open source tool.md --- ...oss-friendly with this open source tool.md | 114 ++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 sources/tech/20210414 Make your data boss-friendly with this open source tool.md diff --git a/sources/tech/20210414 Make your data boss-friendly with this open source tool.md b/sources/tech/20210414 Make your data boss-friendly with this open source tool.md new file mode 100644 index 0000000000..53062a7785 --- /dev/null +++ b/sources/tech/20210414 Make your data boss-friendly with this open source tool.md @@ -0,0 +1,114 @@ +[#]: subject: (Make your data boss-friendly with this open source tool) +[#]: via: (https://opensource.com/article/21/4/visualize-data-eda) +[#]: author: (Juanjo Ortilles https://opensource.com/users/jortilles) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Make your data boss-friendly with this open source tool +====== +Enterprise Data Analytics aims to bring data visualization to everyday +business users. +![metrics and data shown on a computer screen][1] + +Enterprise Data Analytics ([EDA][2]) is a web application that enables access to information through a simple, clear interface. + +After several years of working for Barcelona open source analytics company [Jortilles][3], we realized that the modern world collects data compulsively but there was no easy way for average people to see or interpret that data. There are some powerful open source tools for this purpose, but they are very complex. We couldn't identify a tool designed to be easy to use by common people with little technical skill. + +We developed EDA because we consider access to information to be a requirement and obligation for modern organizations and wanted to provide everyone with access to information. + +![EDA interface][4] + +(Juanjo Ortilles, [CC BY-SA 4.0][5]) + +### Visualize your data + +EDA offers a data model using business terms that people already understand. You choose the information you want, and you can view it how you want. It aims to be user friendly and still powerful. + +EDA visualizes and enriches the information in a database through a metadata model. It can read data from BigQuery, Postgres, [MariaDB, MySQL][6], and several other databases. This transforms the technical database model into familiar business concepts. + +It is also designed to speed up information propagation because it taps into the data already stored in a database. EDA discovers the database's topology and proposes a business model. If you've designed a good database model, you have a good business model. EDA can also connect to production servers to provide real-time analysis. + +This combination of data and a data model mean you and anyone in your organization can analyze its data. However, to protect the data, you can define data security, down to the row, to grant access to the right data to the right people. + +Some of EDA's features include: + + * Automatic data-model generation + * A consistent data model that prevents inconsistent queries + * SQL mode for advanced users + * Data visualizations: + * Standard charts (e.g., bar charts, pie charts, line charts, treemaps) + * Map integration (e.g., geoJSON shapefiles, latitude, longitude) + * Email alerts, which can be defined though key performance indicators (KPIs) + * Private and public information controls to enable private and public dashboards, which you can share with a link + * Data caches and programatic refreshes + + + +### How to use EDA + +The first step in visualizing data with EDA is to create a data model. + +#### Create a data model + +First, select **New Datasource** in the left-hand menu. + +Next, choose the database system where your data is stored (e.g., Postgres, MariaDB, MySQL, Vertica, SqlServer, Oracle, Big Query) and provide the connection parameters. + +EDA will automatically generate the data model for you. It reads tables and columns and defines names for them as well as the relationships between tables. You can also enrich your data model by adding virtual views or geoJSON maps. + +#### Make a dashboard + +Now you are ready to make your first dashboard. On the main page of EDA's interface, you should see a **New dashboard** button. Click it, name your dashboard, and select the data model you created. A new dashboard will appear with a panel for you to configure. + +To configure a panel, click the **Configuration** button in the top-right corner and choose what you want to do. In **Edit query**, select the data you want to show. A new window will appear with your data model represented by entities and attributes for the entities. Choose the entity you want to see and the attributes you want to use. For example, for an entity named **Customers** you might show **Customer Name**, and for a **Sales** entity, you might want to show **Total Sales**. + +Next, run a query, and choose the visualization you want. + +![EDA interface][7] + +(Juanjo Ortilles, [CC BY-SA 4.0][5]) + +You can add as many panels, filters, and text fields as you want, all with explanations. Once you save your dashboard, you can view it, share it with colleagues, and even publish it to the internet. + +### Getting EDA + +The quickest way to take a look at EDA is with the [public demo][8]. But if you want to give it a try on your own, you can get the latest EDA release with Docker: + + +``` +`$ docker run -p 80:80 jortilles / eda: latest` +``` + +We also have a cloud software-as-a-service option for anyone who wants to use EDA without having to do setup, configuration, and ongoing updates. You can review the [cloud options][9] on our website. + +If you want to see it in action, you can watch some [demonstrations][10] on YouTube. + +EDA is in continuous development, and you can find its [source code on GitHub][11]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/visualize-data-eda + +作者:[Juanjo Ortilles][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/jortilles +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_data_dashboard_system_computer_analytics.png?itok=oxAeIEI- (metrics and data shown on a computer screen) +[2]: https://eda.jortilles.com/en/jortilles-english/ +[3]: https://www.jortilles.com/ +[4]: https://opensource.com/sites/default/files/uploads/eda-display.jpeg (EDA interface) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: https://opensource.com/article/20/10/mariadb-mysql-cheat-sheet +[7]: https://opensource.com/sites/default/files/uploads/eda-chart.jpeg (EDA interface) +[8]: https://demoeda.jortilles.com/ +[9]: https://eda.jortilles.com +[10]: https://youtu.be/cBAAJbohHXQ +[11]: https://github.com/jortilles/EDA From a06d44fe3f778d0e28a2dd5b25c6740d6ed06862 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 15 Apr 2021 08:28:30 +0800 Subject: [PATCH 678/818] PUB:20210412 6 open source tools and tips to securing a linux server for beginners (#21603) @wxy https://linux.cn/article-13298-1.html --- ...nd tips to securing a Linux server for beginners.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/tech => published}/20210412 6 open source tools and tips to securing a Linux server for beginners.md (92%) diff --git a/translated/tech/20210412 6 open source tools and tips to securing a Linux server for beginners.md b/published/20210412 6 open source tools and tips to securing a Linux server for beginners.md similarity index 92% rename from translated/tech/20210412 6 open source tools and tips to securing a Linux server for beginners.md rename to published/20210412 6 open source tools and tips to securing a Linux server for beginners.md index 019fcd2979..ebc367d9ff 100644 --- a/translated/tech/20210412 6 open source tools and tips to securing a Linux server for beginners.md +++ b/published/20210412 6 open source tools and tips to securing a Linux server for beginners.md @@ -4,17 +4,17 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13298-1.html) -6 个提升 Linux 服务器的安全开源工具和技巧 +6 个提升 Linux 服务器安全的开源工具和技巧 ====== > 使用开源工具来保护你的 Linux 环境不被入侵。 -![人们在带设备的计算机服务器上工作][1] +![](https://img.linux.net.cn/data/attachment/album/202104/15/082334ltqtgg40tu7l80rd.jpg) -由于如今我们的许多个人和专业数据都可以在网上获得,因此无论是专业人士还是普通互联网用户,学习安全和隐私的基本知识是非常重要的。作为一名学生,我通过学校的 CyberPatriot 活动获得了这方面的经验,在那里我有机会与行业专家交流,了解网络漏洞和建立系统安全的基本步骤。 +如今我们的许多个人和专业数据都可以在网上获得,因此无论是专业人士还是普通互联网用户,学习安全和隐私的基本知识是非常重要的。作为一名学生,我通过学校的 CyberPatriot 活动获得了这方面的经验,在那里我有机会与行业专家交流,了解网络漏洞和建立系统安全的基本步骤。 本文基于我作为初学者迄今所学的知识,详细介绍了六个简单的步骤,以提高个人使用的 Linux 环境的安全性。在我的整个旅程中,我利用开源工具来加速我的学习过程,并熟悉了与提升 Linux 服务器安全有关的更高层次的概念。 From fc381c9c1d3c255e1892cc3125f7456008a7da89 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 15 Apr 2021 08:29:55 +0800 Subject: [PATCH 679/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210414=20?= =?UTF-8?q?4=20tips=20for=20context=20switching=20in=20Git=20(#21601)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210414 4 tips for context switching in Git.md --- ...414 4 tips for context switching in Git.md | 188 ++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100644 sources/tech/20210414 4 tips for context switching in Git.md diff --git a/sources/tech/20210414 4 tips for context switching in Git.md b/sources/tech/20210414 4 tips for context switching in Git.md new file mode 100644 index 0000000000..9ee57414ec --- /dev/null +++ b/sources/tech/20210414 4 tips for context switching in Git.md @@ -0,0 +1,188 @@ +[#]: subject: (4 tips for context switching in Git) +[#]: via: (https://opensource.com/article/21/4/context-switching-git) +[#]: author: (Olaf Alders https://opensource.com/users/oalders) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +4 tips for context switching in Git +====== +Compare the pros and cons of four options to switch branches while +working in Git. +![Computer screen with files or windows open][1] + +Anyone who spends a lot of time working with Git will eventually need to do some form of context switching. Sometimes this adds very little overhead to your workflow, but other times, it can be a real pain. + +Let's discuss the pros and cons of some common strategies for dealing with context switching using this example problem: + +> Imagine you are working in a branch called `feature-X`. You have just discovered you need to solve an unrelated problem. This cannot be done in `feature-X`. You will need to do this work in a new branch, `feature-Y`. + +### Solution #1: stash + branch + +Probably the most common workflow to tackle this issue looks something like this: + + 1. Halt work on the branch `feature-X` + 2. `git stash` + 3. `git checkout -b feature-Y origin/main` + 4. Hack, hack, hack… + 5. `git checkout feature-X` or `git switch -` + 6. `git stash pop` + 7. Resume work on `feature-X` + + + +**Pros:** The nice thing about this approach is that this is a fairly easy workflow for simple changes. It can work quite well, especially for small repositories. + +**Cons:** When using this workflow, you can have only one workspace at a time. Also, depending on the state of your repository, working with the stash can be non-trivial. + +### Solution #2: WIP commit + branch + +A variation on this solution looks quite similar, but it uses a WIP (Work in Progress) commit rather than the stash. When you're ready to switch back, rather than popping the stash, `git reset HEAD~1` unrolls your WIP commit, and you're free to continue, much as you did in the earlier scenario but without touching the stash. + + 1. Halt work on the branch `feature-X` + 2. `git add -u` (adds only modified and deleted files) + 3. `git commit -m "WIP"` + 4. `git checkout -b feature-Y origin/master` + 5. Hack, hack, hack… + 6. `git checkout feature-X` or `git switch -` + 7. `git reset HEAD~1` + + + +**Pros:** This is an easy workflow for simple changes and also good for small repositories. You don't have to work with the stash. + +**Cons:** You can have only one workspace at any time. Also, WIP commits can sneak into your final product if you or your code reviewer are not vigilant. + +When using this workflow, you _never_ want to add a `--hard` to `git reset`. If you do this accidentally, you should be able to restore your commit using `git reflog`, but it's less heartstopping to avoid this scenario entirely. + +### Solution #3: new repository clone + +In this solution, rather than creating a new branch, you make a new clone of the repository for each new feature branch. + +**Pros:** You can work in multiple workspaces simultaneously. You don't need `git stash` or even WIP commits. + +**Cons:** Depending on the size of your repository, this can use a lot of disk space. (Shallow clones can help with this scenario, but they may not always be a good fit.) Additionally, your repository clones will be agnostic about each other. Since they can't track each other, you must track where your clones live. If you need git hooks, you will need to set them up for each new clone. + +### Solution #4: git worktree + +To use this solution, you may need to learn about `git add worktree`. Don't feel bad if you're not familiar with worktrees in Git. Many people get by for years in blissful ignorance of this concept. + +#### What is a worktree? + +Think of a worktree as the files in the repository that belong to a project. Essentially, it's a kind of workspace. You may not realize that you're already using worktrees. When using Git, you get your first worktree for free. + + +``` +$ mkdir /tmp/foo && cd /tmp/foo +$ git init +$ git worktree list +/tmp  0000000 [master] +``` + +As you can see, the worktree exists even before the first commit. Now, add a new worktree to an existing project. + +#### Add a worktree + +To add a new worktree, you need to provide: + + 1. A location on disk + 2. A branch name + 3. Something to branch from + + + + +``` +$ git clone +$ cd http-browserdetect/ +$ git worktree list +/Users/olaf/http-browserdetect  90772ae [master] + +$ git worktree add ~/trees/oalders/feature-X -b oalders/feature-X origin/master +$ git worktree add ~/trees/oalders/feature-Y -b oalders/feature-Y e9df3c555e96b3f1 + +$ git worktree list +/Users/olaf/http-browserdetect       90772ae [master] +/Users/olaf/trees/oalders/feature-X  90772ae [oalders/feature-X] +/Users/olaf/trees/oalders/feature-Y  e9df3c5 [oalders/feature-Y] +``` + +Like with most other Git commands, you need to be inside a repository when issuing this command. Once the worktrees are created, you have isolated work environments. The Git repository tracks where the worktrees live on disk. If Git hooks are already set up in the parent repository, they will also be available in the worktrees. + +Don't overlook that each worktree uses only a fraction of the parent repository's disk space. In this case, the worktree requires about one-third of the original's disk space. This can scale very well. Once your repositories are measured in the gigabytes, you'll really come to appreciate these savings. + + +``` +$ du -sh /Users/olaf/http-browserdetect +2.9M + +$ du -sh /Users/olaf/trees/oalders/feature-X +1.0M +``` + +**Pros:** You can work in multiple workspaces simultaneously. You don't need the stash. Git tracks all of your worktrees. You don't need to set up Git hooks. This is also faster than `git clone` and can save on network traffic since you can do this in airplane mode. You also get more efficient disk space use without needing to resort to a shallow clone. + +**Cons:** This is yet another thing to remember. However, if you can get into the habit of using this feature, it can reward you handsomely. + +### A few more tips + +When you need to clean up your worktrees, you have a couple of options. The preferable way is to let Git remove the worktree: + + +``` +`git worktree remove /Users/olaf/trees/oalders/feature-X` +``` + +If you prefer a scorched-earth approach, `rm -rf` is also your friend: + + +``` +`rm -rf /Users/olaf/trees/oalders/feature-X` +``` + +However, if you do this, you may want to clean up any remaining files with `git worktree prune`. Or you can skip the `prune` now, and this will happen on its own at some point in the future via `git gc`. + +### Notable notes + +If you're ready to get started with `git worktree`, here are a few things to keep in mind. + + * Removing a worktree does not delete the branch. + * You can switch branches within a worktree. + * You cannot simultaneously check out the same branch in multiple worktrees. + * Like many other Git commands, `git worktree` needs to be run from inside a repository. + * You can have many worktrees at once. + * Create your worktrees from the same local checkout, or they will be agnostic about each other. + + + +### git rev-parse + +One final note: When using `git worktree`, your concept of where the root of the repository lives may depend on context. Fortunately, `git rev-parse` allows you to distinguish between the two. + + * To find the parent repository's root: [code]`git rev-parse --git-common-dir` +``` +* To find the root of the repository you're in: [code]`git rev-parse --show-toplevel` +``` + + + +### Choose the best method for your needs + +As in many things, TIMTOWDI (there's more than one way to do it). What's important is that you find a workflow that suits your needs. What your needs are may vary depending on the problem at hand. Maybe you'll occasionally find yourself reaching for `git worktree` as a handy tool in your revision-control toolbelt. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/context-switching-git + +作者:[Olaf Alders][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/oalders +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open) From 8733b823521f39fff03a5287fcb739d2ec62682d Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 15 Apr 2021 08:35:57 +0800 Subject: [PATCH 680/818] translated --- ...using bspwm for my Linux window manager.md | 114 ------------------ ...using bspwm for my Linux window manager.md | 114 ++++++++++++++++++ 2 files changed, 114 insertions(+), 114 deletions(-) delete mode 100644 sources/tech/20210407 Why I love using bspwm for my Linux window manager.md create mode 100644 translated/tech/20210407 Why I love using bspwm for my Linux window manager.md diff --git a/sources/tech/20210407 Why I love using bspwm for my Linux window manager.md b/sources/tech/20210407 Why I love using bspwm for my Linux window manager.md deleted file mode 100644 index 1e1a8f7ee1..0000000000 --- a/sources/tech/20210407 Why I love using bspwm for my Linux window manager.md +++ /dev/null @@ -1,114 +0,0 @@ -[#]: subject: (Why I love using bspwm for my Linux window manager) -[#]: via: (https://opensource.com/article/21/4/bspwm-linux) -[#]: author: (Stephen Adams https://opensource.com/users/stevehnh) -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Why I love using bspwm for my Linux window manager -====== -Install, configure, and start using the bspwm window manager on Fedora -Linux. -![Tall building with windows][1] - -Some folks like to rearrange furniture. Other folks like to try new shoes or redecorate their bedroom on the regular. Me? I try out Linux desktops. - -After drooling over some of the incredible desktop environments I've seen online, I got curious about one window manager in particular: [bspwm][2]. - -![bspwm desktop][3] - -(Stephen Adams, [CC BY-SA 4.0][4]) - -I've been a fan of the [i3][5] window manager for quite a while, and I enjoy the way everything is laid out and the ease of getting started. But something about bspwm called to me. There are a few reasons I decided to try it out: - - * It is _only_ a window manager. - * It is managed by a few easy-to-configure scripts. - * It supports gaps between windows by default. - - - -The first reason—that it is simply a window manager—is probably the top thing to point out. Like i3, there are no graphical bells and whistles applied by default. You can certainly customize it to your heart's content, but _you_ will be putting in all the work to make it look like you want. That's part of its appeal to me. - -Although it is available on many distributions, my examples use Fedora Linux. - -### Install bspwm - -Bspwm is packaged in most common distributions, so you can install it with your system's package manager. This command also installs [sxkhd][6], a daemon for the X Window System "that reacts to input events by executing commands," and [dmenu][7], a generic X Window menu: - - -``` -`dnf install bspwm sxkhd dmenu` -``` - -Since bspwm is _just_ a window manager, there aren't any built-in shortcuts or keyboard commands. This is where it stands in contrast to something like i3. sxkhd makes it easier to get going. So, go ahead and configure sxkhd before you fire up the window manager for the first time: - - -``` -systemctl start sxkhd -systemctl enable sxkhd -``` - -This enables sxkhd at login, but you also need a configuration with some basic functionality ready to go: - - -``` -`curl https://raw.githubusercontent.com/baskerville/bspwm/master/examples/sxhkdrc --output ~/.config/sxkhd/sxkhdrc` -``` - -It's worth taking a look at this file before you get much further, as some commands that the scripts call may not exist on your system. A good example is the `super + Return` shortcut that calls `urxvt`. Change this to your preferred terminal, especially if you do not have urxvt installed: - - -``` -# -# wm independent hotkeys -# -    -# terminal emulator -super + Return -        urxvt -    -# program launcher -super + @space -        dmenu_run -``` - -If you are using GDM, LightDM, or another display manager, just choose bspwm before logging in. - -### Configure bspwm - -Once you are logged in, you'll see a whole lot of nothing on the screen. That's not a sense of emptiness you feel. It's possibility! You are now ready to start fiddling with all the parts of a desktop environment that you have taken for granted all these years. Building from scratch is not easy, but it's very rewarding once you get the hang of it. - -The most difficult thing about any window manager is getting a handle on the shortcuts. You're going to be slow to start, but in a short time, you'll be flying around your system using your keyboard alone and looking like an ultimate hacker to your friends and family. - -You can tailor the system as much as you want by editing `~/.config/bspwm/bspwmrc` to add apps at launch, set up your desktops and monitors, and set rules for how your windows should behave. There are a few examples set by default to get you going. Keyboard shortcuts are all managed by the **sxkhdrc** file. - -There are plenty more open source projects to install to really get things looking nice—like [Feh][8] for desktop backgrounds, [Polybar][9] for that all-important status bar, [Rofi][10] to really help your app launcher pop, and [Compton][11] to give you the shadows and transparency to get things nice and shiny. - -Happy hacking! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/bspwm-linux - -作者:[Stephen Adams][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/stevehnh -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/windows_building_sky_scale.jpg?itok=mH6CAX29 (Tall building with windows) -[2]: https://github.com/baskerville/bspwm -[3]: https://opensource.com/sites/default/files/uploads/bspwm-desktop.png (bspwm desktop) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: https://i3wm.org/ -[6]: https://github.com/baskerville/sxhkd -[7]: https://linux.die.net/man/1/dmenu -[8]: https://github.com/derf/feh -[9]: https://github.com/polybar/polybar -[10]: https://github.com/davatorium/rofi -[11]: https://github.com/chjj/compton diff --git a/translated/tech/20210407 Why I love using bspwm for my Linux window manager.md b/translated/tech/20210407 Why I love using bspwm for my Linux window manager.md new file mode 100644 index 0000000000..e7d89c9782 --- /dev/null +++ b/translated/tech/20210407 Why I love using bspwm for my Linux window manager.md @@ -0,0 +1,114 @@ +[#]: subject: (Why I love using bspwm for my Linux window manager) +[#]: via: (https://opensource.com/article/21/4/bspwm-linux) +[#]: author: (Stephen Adams https://opensource.com/users/stevehnh) +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +为什么我喜欢用 bspwm 来做我的 Linux 窗口管理器 +====== +在 Fedora Linux 上安装、配置并开始使用 bspwm 窗口管理器。 +![Tall building with windows][1] + +有些人喜欢重新布置家具。还有的人喜欢尝试新鞋或定期重新装修他们的卧室。我呢,则是尝试 Linux 桌面。 + +在对网上看到的一些不可思议的桌面环境流口水之后,我对一个窗口管理器特别好奇:[bspwm][2]。 + +![bspwm desktop][3] + +(Stephen Adams, [CC BY-SA 4.0][4]) + +我喜欢 [i3][5] 窗口管理器已经有一段时间了,我很喜欢它的布局方式和上手的便捷性。但 bspwm 的某些特性吸引了我。有几个原因让我决定尝试一下: + + * 它_只是_一个窗口管理器。 + * 它由几个易于配置的脚本管理。 + * 它默认支持窗口之间的间隙。 + + + +可能是最需要指出的第一个原因是它只是一个窗口管理器。和 i3 一样,默认情况下没有任何图形化的功能。你当然可以随心所欲地定制它,但_你_需要付出努力来使它看起来像你想要的。这也是它吸引我的部分原因。 + + +虽然它可以在许多发行版上使用,但在我这个例子中使用的是 Fedora Linux。 + +### 安装 bspwm + +bspwm 在大多数常见的发行版中都有打包,所以你可以用系统的包管理器安装它。这个命令还会安装 [sxkhd][6],一个 X 窗口系统的守护程序,它“通过执行命令对输入事件做出反应”,还有 [dmenu][7],一个通用的 X 窗口菜单: + + +``` +`dnf install bspwm sxkhd dmenu` +``` + +因为 bspwm 只是一个窗口管理器,所以没有任何内置的快捷键或键盘命令。这也是它与 i3 等软件的不同之处。所以,在你第一次启动窗口管理器之前,请先配置一下 sxkhd: + + +``` +systemctl start sxkhd +systemctl enable sxkhd +``` + +这样就可以在登录时启用 sxkhd,但你还需要一些基本功能的配置: + + +``` +`curl https://raw.githubusercontent.com/baskerville/bspwm/master/examples/sxhkdrc --output ~/.config/sxkhd/sxkhdrc` +``` + +在你深入了解之前,不妨先看看这个文件,因为有些脚本调用的命令可能在你的系统中并不存在。一个很好的例子是调用 `urxvt` 的 `super + Return` 快捷键。把它改成你喜欢的终端,尤其是当你没有安装 urxvt 的时候: + + +``` +# +# wm independent hotkeys +# +    +# terminal emulator +super + Return +        urxvt +    +# program launcher +super + @space +        dmenu_run +``` + +如果你使用的是 GDM、LightDM 或其他显示管理器,只要在登录前选择 bspwm 即可。 + +### 配置 bspwm + +当你登录后,你会看到屏幕上什么都没有。这不是你感觉到的空虚感。而是可能性!你现在可以开始摆弄桌面环境的所有部分了。你现在可以开始摆弄这些年你认为理所当然的桌面环境的所有部分了。从头开始构建并不容易,但一旦你掌握了诀窍,就会非常有收获。 + +任何窗口管理器最困难的是掌握快捷键。你开始会很慢,但在很短的时间内,你会只使用键盘在系统中到处操作,在你的朋友和家人面前看起来像一个终极黑客。 + +你可以通过编辑 `~/.config/bspwm/bspwmrc`,在启动时添加应用,设置桌面和显示器,并为你的窗口应该如何表现设置规则,随心所欲地定制系统。有一些默认设置的例子可以让你开始使用。键盘快捷键都是由 **sxkhdrc** 文件管理的。 + +还有更多的开源项目可以安装,让你的电脑看起来更漂亮,比如用于桌面背景的 [Feh][8] ,状态栏的 [Polybar][9] ,应用启动器的 [Rofi][10] ,还有 [Compton][11] 可以给你提供阴影和透明度,让你的电脑看起来更漂亮更有光泽。 + +玩得愉快! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/bspwm-linux + +作者:[Stephen Adams][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/stevehnh +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/windows_building_sky_scale.jpg?itok=mH6CAX29 (Tall building with windows) +[2]: https://github.com/baskerville/bspwm +[3]: https://opensource.com/sites/default/files/uploads/bspwm-desktop.png (bspwm desktop) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://i3wm.org/ +[6]: https://github.com/baskerville/sxhkd +[7]: https://linux.die.net/man/1/dmenu +[8]: https://github.com/derf/feh +[9]: https://github.com/polybar/polybar +[10]: https://github.com/davatorium/rofi +[11]: https://github.com/chjj/compton From 50b63f4395bd6a42df433c9c5e9064b471319259 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 15 Apr 2021 08:40:52 +0800 Subject: [PATCH 681/818] translating --- ...4 Make your data boss-friendly with this open source tool.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210414 Make your data boss-friendly with this open source tool.md b/sources/tech/20210414 Make your data boss-friendly with this open source tool.md index 53062a7785..a6b86444f9 100644 --- a/sources/tech/20210414 Make your data boss-friendly with this open source tool.md +++ b/sources/tech/20210414 Make your data boss-friendly with this open source tool.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/4/visualize-data-eda) [#]: author: (Juanjo Ortilles https://opensource.com/users/jortilles) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 3baedf515ad5d6e5c9b136c85ec30e5504424b7e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 15 Apr 2021 08:54:11 +0800 Subject: [PATCH 682/818] PRF @DCOLIVERSUN --- ...pen source gives you a competitive edge.md | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/translated/tech/20210409 4 ways open source gives you a competitive edge.md b/translated/tech/20210409 4 ways open source gives you a competitive edge.md index 6c16fd31d6..f261704a5b 100644 --- a/translated/tech/20210409 4 ways open source gives you a competitive edge.md +++ b/translated/tech/20210409 4 ways open source gives you a competitive edge.md @@ -3,57 +3,58 @@ [#]: author: (Jason Blais https://opensource.com/users/jasonblais) [#]: collector: (lujun9972) [#]: translator: (DCOLIVERSUN) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) -4 ways open source gives you a competitive edge -开源为你带来竞争优势的 4 条理由 +开源为你带来竞争优势的 4 种方式 ====== -使用开源技术可以帮助组织获得更好的业务结果。 -![开放式以太网线缆][1] + +> 使用开源技术可以帮助组织获得更好的业务结果。 + +![](https://img.linux.net.cn/data/attachment/album/202104/15/085345a2aani3axxj7wcis.jpg) 构建技术栈是每个组织的主要决策。选择合适的工具将让团队获得成功,选择错误的解决方案或平台会对生产率和利润率产生毁灭性影响。为了在当今快节奏的世界中脱颖而出,组织必须明智地选择数字解决方案,好的数字解决方案可以提升团队行动力与运营敏捷性。 -这就是为什么越来越多的组织都采用开源解决方案的原因,这些组织来自各行各业,规模有大有小。根据[麦肯锡][2]最近的报告,高绩效组织的最大区别是采用不同的开源方案。 +这就是为什么越来越多的组织都采用开源解决方案的原因,这些组织来自各行各业,规模有大有小。根据 [麦肯锡][2] 最近的报告,高绩效组织的最大区别是采用不同的开源方案。 采用开源技术可以帮助组织提高竞争优势、获得更好业务成果的原因有以下四点。 -### 1\. 可拓展性和灵活性 +### 1、可拓展性和灵活性 -可以说,技术世界发展很快。例如,在2014年之前,Kubernetes 并不存在,但今天,它却令人印象深刻,无处不在。根据 CNCF [2020 云原生调查][3],91% 的团队正在以某种形式使用 Kubernetes。 +可以说,技术世界发展很快。例如,在 2014 年之前,Kubernetes 并不存在,但今天,它却令人印象深刻,无处不在。根据 CNCF [2020 云原生调查][3],91% 的团队正在以某种形式使用 Kubernetes。 -组织投资开源的一个主要原因是因为开源赋予组织行动敏捷性,组织迅速将新技术集成到技术栈中。这与传统方法不同,在传统方法中,团队需要几个季度甚至几年来审查、实施、采用软件,这导致团队不可能实现火速转变。 +组织投资开源的一个主要原因是因为开源赋予组织行动敏捷性,组织可以迅速地将新技术集成到技术栈中。这与传统方法不同,在传统方法中,团队需要几个季度甚至几年来审查、实施、采用软件,这导致团队不可能实现火速转变。 开源解决方案完整地提供源代码,团队可以轻松将软件与他们每天使用的工具连接起来。 简而言之,开源让开发团队能够为手头的东西构建完美的工具,而不是被迫改变工作方式来适应不灵活的专有工具。 -### 2\. 安全性和高可信的协作 +### 2、安全性和高可信的协作 在数据泄露备受瞩目的时代,组织需要高度安全的工具来保护敏感数据的安全。 -专有解决方案中的漏洞不易被发现,被发现时为时已晚。不幸的是,使用这些平台的团队无法看到源代码,本质上他们将安全性外包给特定供应商,希望得到最好的结果。 +专有解决方案中的漏洞不易被发现,被发现时为时已晚。不幸的是,使用这些平台的团队无法看到源代码,本质上是他们将安全性外包给特定供应商,并希望得到最好的结果。 -采用开源的另一个主要原因是开源工具使组织能够自己把控安全。例如,开源项目——尤其是大型开源社区的项目——往往会收到更负责任的漏洞披露,因为每个人在使用过程中都可以彻底检查源代码。 +采用开源的另一个主要原因是开源工具使组织能够自己把控安全。例如,开源项目——尤其是拥有大型开源社区的项目——往往会收到更负责任的漏洞披露,因为每个人在使用过程中都可以彻底检查源代码。 由于源代码是免费提供的,因此披露通常伴随着修复缺陷的详细建议解决方案。这些方案使得开发团队能够快速解决问题,不断增强软件。 -在远程办公时代,协作的分布式团队知道敏感数据受到保护比以往任何时候都更重要。开源解决方案允许组织审核安全性、完成掌控自己数据,因此开源方案可以促进远程环境下高可信协作方式的成长。 +在远程办公时代,对于分布式团队来说,在知道敏感数据受到保护的情况下进行协作比以往任何时候都更重要。开源解决方案允许组织审核安全性、完全掌控自己数据,因此开源方案可以促进远程环境下高可信协作方式的成长。 -### 3\. 不受供应商限制 +### 3、不受供应商限制 -根据[最近的一项研究][4],68% 的 CIO 担心受供应商限制。当你受限于一项技术中,你会被迫接受别人的结论,而不是自己做结论。 +根据 [最近的一项研究][4],68% 的 CIO 担心受供应商限制。当你受限于一项技术中,你会被迫接受别人的结论,而不是自己做结论。 -当组织更换供应商时,专有解决方案通常会[给你带来数据使用挑战][5]。另一方面,开源工具提供了组织需要的自由度和灵活性,以避免受供应商限制,开源工具可以让组织把数据带去任意地方。 +当组织更换供应商时,专有解决方案通常会 [给你带走数据带来挑战][5]。另一方面,开源工具提供了组织需要的自由度和灵活性,以避免受供应商限制,开源工具可以让组织把数据带去任意地方。 -### 4\. 顶尖人才和社区 +### 4、顶尖人才和社区 -随着越来越多的公司[接受远程办公][6],人才争夺战变得愈发激烈。 +随着越来越多的公司 [接受远程办公][6],人才争夺战变得愈发激烈。 -在软件开发领域,获得顶尖人才始于赋予工程师先进工具,让工程师在工作中充分发挥潜力。开发人员[越来越喜欢开源解决方案][7]而不是专有解决方案,组织应该强烈考虑用开源替代商业解决方案,以吸引市场上最好的开发人员。 +在软件开发领域,获得顶尖人才始于赋予工程师先进工具,让工程师在工作中充分发挥潜力。开发人员 [越来越喜欢开源解决方案][7] 而不是专有解决方案,组织应该强烈考虑用开源替代商业解决方案,以吸引市场上最好的开发人员。 -除了雇佣、留住顶尖人才更容易,公司能够通过开源平台利用贡献者社区,得到解决问题的建议,从平台中得到最大收益。此外,社区成员还[直接贡献开源项目][8]。 +除了雇佣、留住顶尖人才更容易,公司能够通过开源平台利用贡献者社区,得到解决问题的建议,从平台中得到最大收益。此外,社区成员还可以 [直接为开源项目做贡献][8]。 ### 开源带来自由 @@ -66,7 +67,7 @@ via: https://opensource.com/article/21/4/open-source-competitive-advantage 作者:[Jason Blais][a] 选题:[lujun9972][b] 译者:[DCOLIVERSUN](https://github.com/DCOLIVERSUN) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 3c65d86927ca46995ac5f6949a2860a5682fbff9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 15 Apr 2021 08:54:56 +0800 Subject: [PATCH 683/818] PUB @DCOLIVERSUN https://linux.cn/article-13299-1.html --- ...0210409 4 ways open source gives you a competitive edge.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210409 4 ways open source gives you a competitive edge.md (98%) diff --git a/translated/tech/20210409 4 ways open source gives you a competitive edge.md b/published/20210409 4 ways open source gives you a competitive edge.md similarity index 98% rename from translated/tech/20210409 4 ways open source gives you a competitive edge.md rename to published/20210409 4 ways open source gives you a competitive edge.md index f261704a5b..4a9603b1ba 100644 --- a/translated/tech/20210409 4 ways open source gives you a competitive edge.md +++ b/published/20210409 4 ways open source gives you a competitive edge.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (DCOLIVERSUN) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13299-1.html) 开源为你带来竞争优势的 4 种方式 ====== From 3a9dcf2744e52dd3ab22a2360bfa059918cce925 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 15 Apr 2021 22:08:48 +0800 Subject: [PATCH 684/818] APL --- ...20210407 Using network bound disk encryption with Stratis.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210407 Using network bound disk encryption with Stratis.md b/sources/tech/20210407 Using network bound disk encryption with Stratis.md index becf63e533..ceb717ac4d 100644 --- a/sources/tech/20210407 Using network bound disk encryption with Stratis.md +++ b/sources/tech/20210407 Using network bound disk encryption with Stratis.md @@ -2,7 +2,7 @@ [#]: via: (https://fedoramagazine.org/network-bound-disk-encryption-with-stratis/) [#]: author: (briansmith https://fedoramagazine.org/author/briansmith/) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 3c3a80fa9f8c7ebea5f21029ae3e2a99d8cb6393 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 15 Apr 2021 23:16:22 +0800 Subject: [PATCH 685/818] TSL&PRF --- ...work bound disk encryption with Stratis.md | 288 ------------------ ...work bound disk encryption with Stratis.md | 284 +++++++++++++++++ 2 files changed, 284 insertions(+), 288 deletions(-) delete mode 100644 sources/tech/20210407 Using network bound disk encryption with Stratis.md create mode 100644 translated/tech/20210407 Using network bound disk encryption with Stratis.md diff --git a/sources/tech/20210407 Using network bound disk encryption with Stratis.md b/sources/tech/20210407 Using network bound disk encryption with Stratis.md deleted file mode 100644 index ceb717ac4d..0000000000 --- a/sources/tech/20210407 Using network bound disk encryption with Stratis.md +++ /dev/null @@ -1,288 +0,0 @@ -[#]: subject: (Using network bound disk encryption with Stratis) -[#]: via: (https://fedoramagazine.org/network-bound-disk-encryption-with-stratis/) -[#]: author: (briansmith https://fedoramagazine.org/author/briansmith/) -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Using network bound disk encryption with Stratis -====== - -![][1] - -Photo by [iMattSmart][2] on [Unsplash][3] - -In an environment with many encrypted disks, unlocking them all is a difficult task. Network bound disk encryption (NBDE) helps automate the process of unlocking Stratis volumes. This is a critical requirement in large environments. Stratis version 2.1 added support for encryption, which was introduced in the article “[Getting started with Stratis encryption][4].” Stratis version 2.3 recently introduced support for Network Bound Disk Encryption (NBDE) when using encrypted Stratis pools, which is the topic of this article. - -The [Stratis website][5] describes Stratis as an “_easy to use local storage management for Linux_.” The  short video [“Managing Storage With Stratis”][6] gives a quick demonstration of the basics. The video was recorded on a Red Hat Enterprise Linux 8 system, however, the concepts shown in the video also apply to Stratis in Fedora Linux. - -### Prerequisites - -This article assumes you are familiar with Stratis, and also Stratis pool encryption. If you aren’t familiar with these topics, refer to this [article][4] and the [Stratis overview video][6] previously mentioned. - -NBDE requires Stratis 2.3 or later. The examples in this article use a pre-release version of Fedora Linux 34. The Fedora Linux 34 final release will include Stratis 2.3. - -### Overview of network bound disk encryption (NBDE) - -One of the main challenges of encrypting storage is having a secure method to unlock the storage again after a system reboot. In large environments, typing in the encryption passphrase manually doesn’t scale well. NBDE addresses this and allows for encrypted storage to be unlocked in an automated manner. - -At a high level, NBDE requires a Tang server in the environment. Client systems (using Clevis Pin) can automatically decrypt storage as long as they can establish a network connection to the Tang server. If there is no network connectivity to the Tang server, the storage would have to be decrypted manually. - -The idea behind this is that the Tang server would only be available on an internal network, thus if the encrypted device is lost or stolen, it would no longer have access to the internal network to connect to the Tang server, therefore would not be automatically decrypted. - -For more information on Tang and Clevis, see the man pages (man tang, man clevis) , the [Tang GitHub page][7], and the [Clevis GitHub page][8]. - -### Setting up the Tang server - -This example uses another Fedora Linux system as the Tang server with a hostname of tang-server. Start by installing the tang package: - -``` -dnf install tang -``` - -Then enable and start the tangd.socket with systemctl: - -``` -systemctl enable tangd.socket --now -``` - -Tang uses TCP port 80, so you also need to open that in the firewall: - -``` -firewall-cmd --add-port=80/tcp --permanent -firewall-cmd --add-port=80/tcp -``` - -Finally, run _tang-show-keys_ to display the output signing key thumbprint. You’ll need this later. - -``` -# tang-show-keys -l3fZGUCmnvKQF_OA6VZF9jf8z2s -``` - -### Creating the encrypted Stratis Pool - -The previous article on Stratis encryption goes over how to setup an encrypted Stratis pool in detail, so this article won’t cover that in depth. - -The first step is capturing a key that will be used to decrypt the Stratis pool. Even when using NBDE, you need to set this, as it can be used to manually unlock the pool in the event that the NBDE server is unreachable. Capture the pool1 key with the following command: - -``` -# stratis key set --capture-key pool1key -Enter key data followed by the return key: -``` - -Then I’ll create an encrypted Stratis pool (using the pool1key just created) named pool1 using the _/dev/vdb_ device: - -``` -# stratis pool create --key-desc pool1key pool1 /dev/vdb -``` - -Next, create a filesystem in this Stratis pool named filesystem1, create a mount point, mount the filesystem, and create a testfile in it: - -``` -# stratis filesystem create pool1 filesystem1 -# mkdir /filesystem1 -# mount /dev/stratis/pool1/filesystem1 /filesystem1 -# cd /filesystem1 -# echo "this is a test file" > testfile -``` - -### Binding the Stratis pool to the Tang server - -At this point, we have the encrypted Stratis pool created, and also have a filesystem created in the pool. The next step is to bind your Stratis pool to the Tang server that you just setup. Do this with the _stratis pool bind nbde_ command. - -When you make the Tang binding, you need to pass several parameters to the command: - - * the pool name (in this example, pool1) - * the key descriptor name (in this example, pool1key) - * the Tang server name (in this example, ) - - - -Recall that on the Tang server, you previously ran _tang-show-keys_ which showed the Tang output signing key thumbprint is _l3fZGUCmnvKQF_OA6VZF9jf8z2s_. In addition to the previous parameters, you either need to pass this thumbprint with the parameter _–thumbprint l3fZGUCmnvKQF_OA6VZF9jf8z2s_, or skip the verification of the thumbprint with the _–trust-url_ parameter. **** - -It is more secure to use the _–thumbprint_ parameter. For example: - -``` -# stratis pool bind nbde pool1 pool1key http://tang-server --thumbprint l3fZGUCmnvKQF_OA6VZF9jf8z2s -``` - -### Unlocking the Stratis Pool with NBDE - -Next reboot the host, and validate that you can unlock the Stratis pool with NBDE, without requiring the use of the key passphrase. After rebooting the host, the pool is no longer available: - -``` -# stratis pool list -Name Total Physical Properties -``` - -To unlock the pool using NBDE, run the following command: - -``` -# stratis pool unlock clevis -``` - -Note that you did not need to use the key passphrase. This command could be automated to run during the system boot up. - -At this point, the pool is now available: - -``` -# stratis pool list -Name Total Physical Properties -pool1 4.98 GiB / 583.65 MiB / 4.41 GiB ~Ca, Cr -``` - -You can mount the filesystem and access the file that was previously created: - -``` -# mount /dev/stratis/pool1/filesystem1 /filesystem1/ -# cat /filesystem1/testfile -this is a test file -``` - -### Rotating Tang server keys - -Best practices recommend that you periodically rotate the Tang server keys and update the Stratis client servers to use the new Tang keys. - -To generate new Tang keys, start by logging in to your Tang server and look at the current status of the /var/db/tang directory. Then, run the _tang-show-keys_ command: - -``` -# ls -al /var/db/tang -total 8 -drwx------. 1 tang tang 124 Mar 15 15:51 . -drwxr-xr-x. 1 root root 16 Mar 15 15:48 .. --rw-r--r--. 1 tang tang 361 Mar 15 15:51 hbjJEDXy8G8wynMPqiq8F47nJwo.jwk --rw-r--r--. 1 tang tang 367 Mar 15 15:51 l3fZGUCmnvKQF_OA6VZF9jf8z2s.jwk -# tang-show-keys -l3fZGUCmnvKQF_OA6VZF9jf8z2s -``` - -To generate new keys, run tangd-keygen and point it to the /var/db/tang directory: - -``` -# /usr/libexec/tangd-keygen /var/db/tang -``` - -If you look at the /var/db/tang directory again, you will see two new files: - -``` -# ls -al /var/db/tang -total 16 -drwx------. 1 tang tang 248 Mar 22 10:41 . -drwxr-xr-x. 1 root root 16 Mar 15 15:48 .. --rw-r--r--. 1 tang tang 361 Mar 15 15:51 hbjJEDXy8G8wynMPqiq8F47nJwo.jwk --rw-r--r--. 1 root root 354 Mar 22 10:41 iyG5HcF01zaPjaGY6L_3WaslJ_E.jwk --rw-r--r--. 1 root root 349 Mar 22 10:41 jHxerkqARY1Ww_H_8YjQVZ5OHao.jwk --rw-r--r--. 1 tang tang 367 Mar 15 15:51 l3fZGUCmnvKQF_OA6VZF9jf8z2s.jwk -``` - -And if you run _tang-show-keys_, it will show the keys being advertised by Tang: - -``` -# tang-show-keys -l3fZGUCmnvKQF_OA6VZF9jf8z2s -iyG5HcF01zaPjaGY6L_3WaslJ_E -``` - -You can prevent the old key (starting with l3fZ) from being advertised by renaming the two original files to be hidden files, starting with a period. With this method, the old key will no longer be advertised, however it will still be usable by any existing clients that haven’t been updated to use the new key. Once all clients have been updated to use the new key, these old key files can be deleted. - -``` -# cd /var/db/tang -# mv hbjJEDXy8G8wynMPqiq8F47nJwo.jwk .hbjJEDXy8G8wynMPqiq8F47nJwo.jwk -# mv l3fZGUCmnvKQF_OA6VZF9jf8z2s.jwk .l3fZGUCmnvKQF_OA6VZF9jf8z2s.jwk -``` - -At this point, if you run _tang-show-keys_ again, only the new key is being advertised by Tang: - -``` -# tang-show-keys -iyG5HcF01zaPjaGY6L_3WaslJ_E -``` - -Next, switch over to your Stratis system and update it to use the new Tang key. Stratis supports doing this while the filesystem(s) are online. - -First, unbind the pool: - -``` -# stratis pool unbind pool1 -``` - -Next, set the key with the original passphrase used when the encrypted pool was created: - -``` -# stratis key set --capture-key pool1key -Enter key data followed by the return key: -``` - -Finally, bind the pool to the Tang server with the updated key thumbprint: - -``` -# stratis pool bind nbde pool1 pool1key http://tang-server --thumbprint iyG5HcF01zaPjaGY6L_3WaslJ_E -``` - -The Stratis system is now configured to use the updated Tang key. Once any other client systems using the old Tang key have been updated, the two original key files that were renamed to hidden files in the /var/db/tang directory on the Tang server can be backed up and deleted. - -### What if the Tang server is unavailable? - -Next, shutdown the Tang server to simulate it being unavailable, then reboot the Stratis system. - -Again, after the reboot, the Stratis pool is not available: - -``` -# stratis pool list -Name Total Physical Properties -``` - -If you try to unlock it with NBDE, this fails because the Tang server is unavailable: - -``` -# stratis pool unlock clevis -Execution failed: -An iterative command generated one or more errors: The operation 'unlock' on a resource of type pool failed. The following errors occurred: -Partial action "unlock" failed for pool with UUID 4d62f840f2bb4ec9ab53a44b49da3f48: Cryptsetup error: Failed with error: Error: Command failed: cmd: "clevis" "luks" "unlock" "-d" "/dev/vdb" "-n" "stratis-1-private-42142fedcb4c47cea2e2b873c08fcf63-crypt", exit reason: 1 stdout: stderr: /dev/vdb could not be opened. -``` - -At this point, without the Tang server being reachable, the only option to unlock the pool is to use the original key passphrase: - -``` -# stratis key set --capture-key pool1key -Enter key data followed by the return key: -``` - -You can then unlock the pool using the key: - -``` -# stratis pool unlock keyring -``` - -Next, verify the pool was successfully unlocked: - -``` -# stratis pool list -Name Total Physical Properties -pool1 4.98 GiB / 583.65 MiB / 4.41 GiB ~Ca, Cr -``` - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/network-bound-disk-encryption-with-stratis/ - -作者:[briansmith][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/briansmith/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2021/03/stratis-nbde-816x345.jpg -[2]: https://unsplash.com/@imattsmart?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[3]: https://unsplash.com/s/photos/lock?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[4]: https://fedoramagazine.org/getting-started-with-stratis-encryption/ -[5]: https://stratis-storage.github.io/ -[6]: https://www.youtube.com/watch?v=CJu3kmY-f5o -[7]: https://github.com/latchset/tang -[8]: https://github.com/latchset/clevis diff --git a/translated/tech/20210407 Using network bound disk encryption with Stratis.md b/translated/tech/20210407 Using network bound disk encryption with Stratis.md new file mode 100644 index 0000000000..69d8a6987f --- /dev/null +++ b/translated/tech/20210407 Using network bound disk encryption with Stratis.md @@ -0,0 +1,284 @@ +[#]: subject: (Using network bound disk encryption with Stratis) +[#]: via: (https://fedoramagazine.org/network-bound-disk-encryption-with-stratis/) +[#]: author: (briansmith https://fedoramagazine.org/author/briansmith/) +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) + +使用 Stratis 的网络绑定磁盘加密 +====== + +![][1] + +在一个有许多加密磁盘的环境中,解锁所有的磁盘是一项困难的任务。网络绑定磁盘加密Network bound disk encryption(NBDE)有助于自动解锁 Stratis 卷的过程。这是在大型环境中的一个关键要求。Stratis 2.1 版本增加了对加密的支持,这在《[Stratis 加密入门][4]》一文中介绍过。Stratis 2.3 版本最近在使用加密的 Stratis 池时引入了对网络绑定磁盘加密(NBDE)的支持,这是本文的主题。 + +[Stratis 网站][5] 将 Stratis 描述为一个“_易于使用的 Linux 本地存储管理_”。短视频《[使用 Stratis 管理存储][6]》对基础知识进行了快速演示。该视频是在 Red Hat Enterprise Linux 8 系统上录制的,然而,视频中显示的概念也适用于 Fedora Linux 中的 Stratis。 + +### 先决条件 + +本文假设你熟悉 Stratis,也熟悉 Stratis 池加密。如果你不熟悉这些主题,请参考这篇 [文章][4] 和前面提到的 [Stratis 概述视频][6]。 + +NBDE 需要 Stratis 2.3 或更高版本。本文中的例子使用的是 Fedora Linux 34 的预发布版本。Fedora Linux 34 的最终版本将包含 Stratis 2.3。 + +### 网络绑定磁盘加密(NBDE)概述 + +加密存储的主要挑战之一是有一个安全的方法在系统重启后再次解锁存储。在大型环境中,手动输入加密口令并不能很好地扩展。NBDE 解决了这一问题,允许以自动方式解锁加密存储。 + +在更高层次上,NBDE 需要环境中的 Tang 服务器。客户端系统(使用 Clevis Pin)只要能与 Tang 服务器建立网络连接,就可以自动解密存储。如果网络没有连接到 Tang 服务器,则必须手动解密存储。 + +这背后的想法是,Tang 服务器只能在内部网络上使用,因此,如果加密设备丢失或被盗,它将不再能够访问内部网络连接到 Tang 服务器,因此不会被自动解密。 + +关于 Tang 和 Clevis 的更多信息,请参见手册页(`man tang`、`man clevis`)、[Tang 的 GitHub 页面][7] 和 [Clevis 的 GitHub 页面][8]。 + +### 设置 Tang 服务器 + +本例使用另一个 Fedora Linux 系统作为 Tang 服务器,主机名为 `tang-server`。首先安装 `tang` 包。 + +``` +dnf install tang +``` + +然后用 `systemctl` 启用并启动 `tangd.socket`。 + +``` +systemctl enable tangd.socket --now +``` + +Tang 使用的是 TCP 80 端口,所以你也需要在防火墙中打开该端口。 + +``` +firewall-cmd --add-port=80/tcp --permanent +firewall-cmd --add-port=80/tcp +``` + +最后,运行 `tang-show-keys` 来显示输出签名密钥指纹。你以后会需要这个。 + +``` +# tang-show-keys +l3fZGUCmnvKQF_OA6VZF9jf8z2s +``` + +### 创建加密的 Stratis 池 + +上一篇关于 Stratis 加密的文章详细介绍了如何设置加密的 Stratis 池,所以本文不会深入介绍。 + +第一步是捕获一个将用于解密 Stratis 池的密钥。即使使用 NBDE,也需要设置这个,因为在 NBDE 服务器无法到达的情况下,可以用它来手动解锁池。使用以下命令捕获 `pool1` 密钥。 + +``` +# stratis key set --capture-key pool1key +Enter key data followed by the return key: +``` + +然后我将使用 `/dev/vdb` 设备创建一个加密的 Stratis 池(使用刚才创建的 `pool1key`),命名为 `pool1`。 + +``` +# stratis pool create --key-desc pool1key pool1 /dev/vdb。 +``` + +接下来,在这个 Stratis 池中创建一个名为 `filesystem1` 的文件系统,创建一个挂载点,挂载文件系统,并在其中创建一个测试文件: + +``` +# stratis filesystem create pool1 filesystem1 +# mkdir /filesystem1 +# mount /dev/stratis/pool1/filesystem1 /filesystem1 +# cd /filesystem1 +# echo "this is a test file" > testfile +``` + +### 将 Stratis 池绑定到 Tang 服务器上 + +此时,我们已经创建了加密的 Stratis 池,并在池中创建了一个文件系统。下一步是将你的 Stratis 池绑定到刚刚设置的 Tang 服务器上。使用 `stratis pool bind nbde` 命令进行。 + +当你进行 Tang 绑定时,需要向该命令传递几个参数: + + * 池名(在本例中,`pool1`) + * 钥匙描述符名称(本例中为 `pool1key`) + * Tang 服务器名称(在本例中,`http://tang-server`) + +记得之前在 Tang 服务器上,运行了 `tang-show-keys`,显示 Tang 输出的签名密钥指纹是 `l3fZGUCmnvKQF_OA6VZF9jf8z2s`。除了前面的参数外,还需要用参数 `-thumbprint l3fZGUCmnvKQF_OA6VZF9jf8z2s` 传递这个指纹,或者用 `-trust-url` 参数跳过对指纹的验证。 + +使用 `-thumbprint` 参数更安全。例如: + +``` +# stratis pool bind nbde pool1 pool1key http://tang-server --thumbprint l3fZGUCmnvKQF_OA6VZF9jf8z2s +``` + +### 用 NBDE 解锁 Stratis 池 + +接下来重启主机,并验证你可以用 NBDE 解锁 Stratis 池,而不需要使用密钥口令。重启主机后,该池不再可用: + +``` +# stratis pool list +Name Total Physical Properties +``` + +要使用 NBDE 解锁池,请运行以下命令: + +``` +# stratis pool unlock clevis +``` + +注意,你不需要使用密钥口令。这个命令可以在系统启动时自动运行。 + +此时,Stratis 池已经可以使用了: + +``` +# stratis pool list +Name Total Physical Properties +pool1 4.98 GiB / 583.65 MiB / 4.41 GiB ~Ca, Cr +``` + +你可以挂载文件系统,访问之前创建的文件: + +``` +# mount /dev/stratis/pool1/filesystem1 /filesystem1/ +# cat /filesystem1/testfile +this is a test file +``` + +### 轮换 Tang 服务器密钥 + +最好定期轮换 Tang 服务器密钥,并更新 Stratis 客户服务器以使用新的 Tang 密钥。 + +要生成新的 Tang 密钥,首先登录到 Tang 服务器,查看 `/var/db/tang` 目录的当前状态。然后,运行 `tang-show-keys` 命令: + +``` +# ls -al /var/db/tang +total 8 +drwx------. 1 tang tang 124 Mar 15 15:51 . +drwxr-xr-x. 1 root root 16 Mar 15 15:48 .. +-rw-r--r--. 1 tang tang 361 Mar 15 15:51 hbjJEDXy8G8wynMPqiq8F47nJwo.jwk +-rw-r--r--. 1 tang tang 367 Mar 15 15:51 l3fZGUCmnvKQF_OA6VZF9jf8z2s.jwk +# tang-show-keys +l3fZGUCmnvKQF_OA6VZF9jf8z2s +``` + +要生成新的密钥,运行 `tangd-keygen` 并将其指向 `/var/db/tang` 目录: + +``` +# /usr/libexec/tangd-keygen /var/db/tang +``` + +如果你再看看 `/var/db/tang` 目录,你会看到两个新文件: + +``` +# ls -al /var/db/tang +total 16 +drwx------. 1 tang tang 248 Mar 22 10:41 . +drwxr-xr-x. 1 root root 16 Mar 15 15:48 .. +-rw-r--r--. 1 tang tang 361 Mar 15 15:51 hbjJEDXy8G8wynMPqiq8F47nJwo.jwk +-rw-r--r--. 1 root root 354 Mar 22 10:41 iyG5HcF01zaPjaGY6L_3WaslJ_E.jwk +-rw-r--r--. 1 root root 349 Mar 22 10:41 jHxerkqARY1Ww_H_8YjQVZ5OHao.jwk +-rw-r--r--. 1 tang tang 367 Mar 15 15:51 l3fZGUCmnvKQF_OA6VZF9jf8z2s.jwk +``` + +如果你运行 `tang-show-keys`,就会显示出 Tang 所公布的密钥: + +``` +# tang-show-keys +l3fZGUCmnvKQF_OA6VZF9jf8z2s +iyG5HcF01zaPjaGY6L_3WaslJ_E +``` + +你可以通过将两个原始文件改名为以句号开头的隐藏文件,来防止旧的密钥(以 `l3fZ` 开头)被公布。通过这种方法,旧的密钥将不再被公布,但是它仍然可以被任何没有更新为使用新密钥的现有客户端使用。一旦所有的客户端都更新使用了新密钥,这些旧密钥文件就可以删除了。 + +``` +# cd /var/db/tang +# mv hbjJEDXy8G8wynMPqiq8F47nJwo.jwk .hbjJEDXy8G8wynMPqiq8F47nJwo.jwk +# mv l3fZGUCmnvKQF_OA6VZF9jf8z2s.jwk .l3fZGUCmnvKQF_OA6VZF9jf8z2s.jwk +``` + +此时,如果再运行 `tang-show-keys`,Tang 只公布新钥匙: + +``` +# tang-show-keys +iyG5HcF01zaPjaGY6L_3WaslJ_E +``` + +下一步,切换到你的 Stratis 系统并更新它以使用新的 Tang 密钥。当文件系统在线时, Stratis 支持这样做。 + +首先,解除对池的绑定: + +``` +# stratis pool unbind pool1 +``` + +接下来,用创建加密池时使用的原始口令设置密钥: + +``` +# stratis key set --capture-key pool1key +Enter key data followed by the return key: +``` + +最后,用更新后的密钥指纹将 Stratis 池绑定到 Tang 服务器上: + +``` +# stratis pool bind nbde pool1 pool1key http://tang-server --thumbprint iyG5HcF01zaPjaGY6L_3WaslJ_E +``` + +Stratis 系统现在配置为使用更新的 Tang 密钥。一旦使用旧的 Tang 密钥的任何其他客户系统被更新,在 Tang 服务器上的 `/var/db/tang` 目录中被重命名为隐藏文件的两个原始密钥文件就可以被备份和删除了。 + +### 如果 Tang 服务器不可用怎么办? + +接下来,关闭 Tang 服务器,模拟它不可用,然后重启 Stratis 系统。 + +重启后,Stratis 池又不可用了: + +``` +# stratis pool list +Name Total Physical Properties +``` + +如果你试图用 NBDE 解锁,会因为 Tang 服务器不可用而失败: + +``` +# stratis pool unlock clevis +Execution failed: +An iterative command generated one or more errors: The operation 'unlock' on a resource of type pool failed. The following errors occurred: +Partial action "unlock" failed for pool with UUID 4d62f840f2bb4ec9ab53a44b49da3f48: Cryptsetup error: Failed with error: Error: Command failed: cmd: "clevis" "luks" "unlock" "-d" "/dev/vdb" "-n" "stratis-1-private-42142fedcb4c47cea2e2b873c08fcf63-crypt", exit reason: 1 stdout: stderr: /dev/vdb could not be opened. +``` + +此时,在 Tang 服务器无法到达的情况下,解锁池的唯一选择就是使用原密钥口令: + +``` +# stratis key set --capture-key pool1key +Enter key data followed by the return key: +``` + +然后你可以使用钥匙解锁池: + +``` +# stratis pool unlock keyring +``` + +接下来,验证池是否成功解锁: + +``` +# stratis pool list +Name Total Physical Properties +pool1 4.98 GiB / 583.65 MiB / 4.41 GiB ~Ca, Cr +``` + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/network-bound-disk-encryption-with-stratis/ + +作者:[briansmith][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://fedoramagazine.org/author/briansmith/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2021/03/stratis-nbde-816x345.jpg +[2]: https://unsplash.com/@imattsmart?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/lock?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://fedoramagazine.org/getting-started-with-stratis-encryption/ +[5]: https://stratis-storage.github.io/ +[6]: https://www.youtube.com/watch?v=CJu3kmY-f5o +[7]: https://github.com/latchset/tang +[8]: https://github.com/latchset/clevis From 2a6330450f9528a9244a570ac920501e040d5727 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 16 Apr 2021 05:03:05 +0800 Subject: [PATCH 686/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210415=20?= =?UTF-8?q?5=20reasons=20sysadmins=20love=20systemd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210415 5 reasons sysadmins love systemd.md --- ...210415 5 reasons sysadmins love systemd.md | 204 ++++++++++++++++++ 1 file changed, 204 insertions(+) create mode 100644 sources/tech/20210415 5 reasons sysadmins love systemd.md diff --git a/sources/tech/20210415 5 reasons sysadmins love systemd.md b/sources/tech/20210415 5 reasons sysadmins love systemd.md new file mode 100644 index 0000000000..f063a55ddc --- /dev/null +++ b/sources/tech/20210415 5 reasons sysadmins love systemd.md @@ -0,0 +1,204 @@ +[#]: subject: (5 reasons sysadmins love systemd) +[#]: via: (https://opensource.com/article/21/4/sysadmins-love-systemd) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +5 reasons sysadmins love systemd +====== +Systemd's speed and ease make it a popular way to manage modern Linux +systems. +![Woman sitting in front of her laptop][1] + +As systems administrators know, there's a lot happening on modern computers. Applications run in the background, automated events wait to be triggered at a certain time, log files are written, status reports are delivered. Traditionally, these disparate processes have been managed and monitored with a collection of Unix tools to great effect and with great efficiency. However, modern computers are diverse, with local services running alongside containerized applications, easy access to clouds and the clusters they run on, real-time processes, and more data to process than ever. + +Having a unified method of managing them is an expectation for users and a useful luxury for busy sysadmins. For this nontrivial task, the system daemon, or **systemd**, was developed and quickly adopted by all major Linux distributions. + +Of course, systemd isn't the only way to manage a Linux system. There are many alternative init systems, including sysvinit, OpenRC, runit, s6, and even BusyBox, but systemd treats Linux as a unified data set, meant to be manipulated and queried consistently with robust tools. For a busy systems administrator and many users, the speed and ease of systemd is an important feature. Here are five reasons why. + +### Boot management + +Booting a Linux computer can be a surprisingly rare event, if you want it to be. Certainly in the server world, uptimes are often counted in _years_ rather than months or weeks. Laptops and desktops tend to be shut down and booted pretty frequently, although even these are as likely to be suspended or hibernated as they are to be shut down. Either way, the time since the most recent boot event can serve as a sort of session manager for a computer health check. It's a useful way to limit what data you look at when monitoring your system or diagnosing problems. + +In the likely event that you can't remember the last time you booted your computer, you can list boot sessions with systemd's logging tool, `journalctl`: + + +``` +$ journalctl --list-boots +-42 7fe7c3... Fri 2020-12-04 05:13:59 - Wed 2020-12-16 16:01:23 +-41 332e99... Wed 2020-12-16 20:07:39 - Fri 2020-12-18 22:08:13 +[...] +-1 e0fe5f... Mon 2021-03-29 20:47:46 - Mon 2021-03-29 21:59:29 + 0 37fbe4... Tue 2021-03-30 04:46:13 - Tue 2021-03-30 10:42:08 +``` + +The latest boot sessions appear at the bottom of the list, so you can pipe the output to `tail` for just the latest boots. + +The numbers on the left (42, 41, 1, and 0 in this example) are index numbers for each boot session. In other words, to view logs for only a specific boot session, you can use its index number as reference. + +### Log reviews + +Looking at logs is an important method of extrapolating information about your system. Logs provide a history of much of the activity your computer engages in without your direct supervision. You can see when services launched, when timed jobs ran, what services are running in the background, which activities failed, and more. One of the most common initial troubleshooting steps is to review logs, which is easy to do with `journalctl`: + + +``` +`$ journalctl --pager-end` +``` + +The `--pager-end` (or `-e` for short) option starts your view of the logs at the end of the `journalctl` output, so you must scroll up to see events that happened earlier. + +Systemd maintains a "catalog" of errors and messages filled with records of errors, possible solutions, pointers to support forums, and developer documentation. This can provide important context to a log event, which can otherwise be a confusing blip in a sea of messages, or worse, could go entirely unnoticed. To integrate error messages with explanatory text, you can use the `--catalog` (or `-x` for short) option: + + +``` +`$ journalctl --pager-end --catalog` +``` + +To further limit the log output you need to wade through, you can specify which boot session you want to see logs for. Because each boot session is indexed, you can specify certain sessions with the `--boot` option and view only the logs that apply to it: + + +``` +`$ journalctl --pager-end --catalog --boot 42` +``` + +You can also see logs for a specific systemd unit. For instance, to troubleshoot an issue with your secure shell (SSH) service, you can specify `--unit sshd` to see only the logs that apply to the `sshd` daemon: + + +``` +$ journalctl --pager-end \ +\--catalog --boot 42 \ +\--unit sshd +``` + +### Service management + +The first task for systemd is to boot your computer, and it generally does that promptly, efficiently, and effectively. But the task that's never finished is service management. By design, systemd ensures that the services you want to run do indeed start and continue running during your session. This is nicely robust, because in theory even a crashed service can be restarted without your intervention. + +Your interface to help systemd manage services is the `systemctl` command. With it, you can view the unit files that define a service: + + +``` +$ systemctl cat sshd +# /usr/lib/systemd/system/sshd.service +[Unit] +Description=OpenSSH server daemon +Documentation=man:sshd(8) man:sshd_config(5) +After=network.target sshd-keygen.target +Wants=sshd-keygen.target + +[Service] +Type=notify +EnvironmentFile=-/etc/crypto-policies/back-ends/opensshserver.config +EnvironmentFile=-/etc/sysconfig/sshd +ExecStart=/usr/sbin/sshd -D $OPTIONS $CRYPTO_POLICY +ExecReload=/bin/kill -HUP $MAINPID +KillMode=process +Restart=on-failure +RestartSec=42s + +[Install] +WantedBy=multi-user.target +``` + +Most unit files exist in `/usr/lib/systemd/system/` but, as with many important configurations, you're encouraged to modify them with local changes. There's an interface for that, too: + + +``` +`$ systemctl edit sshd` +``` + +You can see whether a service is currently active: + + +``` +$ systemctl is-active sshd +active +$ systemctl is-active foo +inactive +``` + +Similarly, you can see whether a service has failed with `is-failed`. + +Starting and stopping services is nicely intuitive: + + +``` +$ systemctl stop sshd +$ systemctl start sshd +``` + +And enabling a service to start at boot time is simple: + + +``` +`$ systemctl enable sshd` +``` + +Add the `--now` option to enable a service to start at boot time or to start it for your current session. + +### Timers + +Long ago, when you wanted to automate a task on Linux, the canonical tool for the job was `cron`. There's still a place for the cron command, but there are also some compelling alternatives. For instance, the [`anacron` command][2] is a versatile, cron-like system capable of running tasks that otherwise would have been missed during downtime. + +Scheduled events are little more than services activated at a specific time, so systemd manages a cron-like function called [timers][3]. You can list active timers: + + +``` +$ systemctl list-timers +NEXT                          LEFT       +Tue 2021-03-30 12:37:54 NZDT  16min left [...] +Wed 2021-03-31 00:00:00 NZDT  11h left [...] +Wed 2021-03-31 06:42:02 NZDT  18h left [...] + +3 timers listed. +Pass --all to see loaded but inactive timers, too. +``` + +You can enable a timer the same way you enable a service: + + +``` +`$ systemctl enable myMonitor.timer` +``` + +### Targets + +Targets are the final major component of the systemd matrix. A target is defined by a unit file, the same as services and timers. Targets can also be started and enabled in the same way. What makes targets unique is that they group other unit files in an arbitrarily significant way. For instance, you might want to boot to a text console instead of a graphical desktop, so the `multi-user` target exists. However, the `multi-user` target is only the `graphical` target without the desktop unit files as dependencies. + +In short, targets are an easy way for you to collect services, timers, and even other targets together to represent an intended state for your machine. + +In fact, within systemd, a reboot, a power-off, or a shut-down action is just another target. + +You can list all available targets using the `list-unit-files` option, constraining it with the `--type` option set to `target`: + + +``` +`$ systemctl list-unit-files --type target` +``` + +### Taking control with systemd + +Modern Linux uses systemd for service management and log introspection. It provides everything from personal Linux systems to enterprise servers with a modern mechanism for monitoring and easy maintenance. The more you use it, the more systemd becomes comfortably predictable and intuitive, and the more you discover how disparate parts of your system are interconnected. + +To get better acquainted with systemd, you must use it. And to get comfortable with using it, [download our cheat sheet][4] and refer to it often. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/sysadmins-love-systemd + +作者:[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/OSDC_women_computing_4.png?itok=VGZO8CxT (Woman sitting in front of her laptop) +[2]: https://opensource.com/article/21/2/linux-automation +[3]: https://opensource.com/article/20/7/systemd-timers +[4]: https://opensource.com/downloads/linux-systemd-cheat-sheet From b1598470f6119974064ad0fbb4248d037e0b66ee Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 16 Apr 2021 05:03:17 +0800 Subject: [PATCH 687/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210415=20?= =?UTF-8?q?A=20beginner's=20guide=20to=20load=20balancing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210415 A beginner-s guide to load balancing.md --- ...15 A beginner-s guide to load balancing.md | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 sources/tech/20210415 A beginner-s guide to load balancing.md diff --git a/sources/tech/20210415 A beginner-s guide to load balancing.md b/sources/tech/20210415 A beginner-s guide to load balancing.md new file mode 100644 index 0000000000..b12f5c066a --- /dev/null +++ b/sources/tech/20210415 A beginner-s guide to load balancing.md @@ -0,0 +1,84 @@ +[#]: subject: (A beginner's guide to load balancing) +[#]: via: (https://opensource.com/article/21/4/load-balancing) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +A beginner's guide to load balancing +====== +Load balancing distributes resources to where they're needed most at +that moment. +![eight stones balancing][1] + +When the personal computer was young, a household was likely to have one (or fewer) computers in it. Children played games on it during the day, and parents did accounting or programming or roamed through a BBS in the evening. Imagine a one-computer household today, though, and you can predict the conflict it would create. Everyone would want to use the computer at the same time, and there wouldn't be enough keyboard and mouse to go around. + +This is, more or less, the same scenario that's been happening to the IT industry as computers have become more and more ubiquitous. Demand for services and servers has increased to the point that they could grind to a halt from overuse. Fortunately, we now have the concept of load balancing to help us handle the demand. + +### What is load balancing? + +Load balancing is a generic term referring to anything you do to ensure the resources you manage are distributed efficiently. For a web server's systems administrator, load balancing usually means ensuring that the web server software (such as [Nginx][2]) is configured with enough worker nodes to handle a spike in incoming visitors. In other words, should a site suddenly become very popular and its visitor count quadruple in a matter of minutes, the software running the server must be able to respond to each visitor without any of them noticing service degradation. For simple sites, this is as simple as a one-line configuration option, but for complex sites with dynamic content and several database queries for each user, it can be a serious problem. + +This problem is supposed to have been solved with cloud computing, but it's not impossible for a web app to fail to scale out when it experiences an unexpected surge. + +The important thing to keep in mind when it comes to load balancing is that distributing resources _efficiently_ doesn't necessarily mean distributing them _evenly_. Not all tasks require all available resources at all times. A smart load-balancing strategy provides resources to users and tasks only when those resources are needed. This is often the application developer's domain rather than the IT infrastructure's responsibility. Asynchronous applications are vital to ensuring that a user who walks away from the computer for a coffee break isn't occupying valuable resources on the server. + +### How does load balancing work? + +Load balancing avoids bottlenecks by distributing a workload across multiple computational nodes. Those nodes may be physical servers in a data center, containers in a cloud, strategically placed servers enlisted for edge computing, separate Java Virtual Machines (JVMs) in a complex application framework, or daemons running on a single Linux server. + +The idea is to divide a large problem into small tasks and assign each task to a dedicated computer. For a website that requires its users to log in, for instance, the website might be hosted on Server A, while the login page and all the authentication lookups that go along with it are hosted on Server B. This way, the process of a new user logging into an account doesn't steal resources from other users actively using the site. + +#### Load balancing the cloud + +Cloud computing uses [containers][3], so there aren't usually separate physical servers to handle distinct tasks (actually, there are many separate servers, but they're clustered together to act as one computational "brain"). Instead, a "pod" is created from several containers. When one pod starts to run out of resources due to its user or task load, an identical pod is generated. Pods share storage and network resources, and each pod is assigned to a compute node as it's created. Pods can be created or destroyed on demand as the load requires so that users experience consistent quality of service regardless of how many users there are. + +#### Edge computing + +[Edge computing][4] takes the physical world into account when load balancing. The cloud is naturally a distributed system, but in practice, a cloud's nodes are usually concentrated in a few data centers. The further a user is from the data center running the cloud, the more physical barriers they must overcome for optimal service. Even with fiber connections and proper load balancing, the response time of a server located 3,000 miles away is likely greater than the response time of something just 300 miles away. + +Edge computing brings compute nodes to the "edge" of the cloud in an attempt to bridge the geographic divide, forming a sort of satellite network for the cloud, so it also plays a part in a good load-balancing effort. + +### What is a load-balancing algorithm? + +There are many strategies for load balancing, and they range in complexity depending on what technology is involved and what the requirements demand. Load balancing doesn't have to be complicated, and it's important, even when using specialized software like [Kubernetes][5] or [Keepalived][6], to start load balancing from inception. + +Don't rely on containers to balance the load when you could design your application to take simple precautions on its own. If you design your application to be modular and ephemeral from the start, then you'll benefit from the load balancing opportunities made available by clever network design, container orchestration, and whatever tomorrow's technology brings. + +Some popular algorithms that can guide your efforts as an application developer or network engineer include: + + * Assign tasks to servers sequentially (this is often called _round-robin_). + * Assign tasks to the server that's currently the least busy. + * Assign tasks to the server with the best response time. + * Assign tasks randomly. + + + +These principles can be combined or weighted to favor, for instance, the most powerful server in a group when assigning particularly complex tasks. [Orchestration][7] is commonly used so that an administrator doesn't have to drum up the perfect algorithm or strategy for load balancing, although sometimes it's up to the admin to choose which combination of load balancing schemes to use. + +### Expect the unexpected + +Load balancing isn't really about ensuring that all your resources are used evenly across your network. Load balancing is all about guaranteeing a reliable user experience even when the unexpected happens. Good infrastructure can withstand a computer crash, application overload, onslaught of network traffic, and user errors. Think about how your service can be resilient and design load balancing accordingly from the ground up. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/load-balancing + +作者:[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/water-stone-balance-eight-8.png?itok=1aht_V5V (eight stones balancing) +[2]: https://opensource.com/business/15/4/nginx-open-source-platform +[3]: https://opensource.com/resources/what-are-linux-containers +[4]: https://opensource.com/article/18/5/edge-computing +[5]: https://opensource.com/resources/what-is-kubernetes +[6]: https://www.redhat.com/sysadmin/keepalived-basics +[7]: https://opensource.com/article/20/11/orchestration-vs-automation From 78ba86b67c3d97c969db8e8ce2862e93ff88f9f0 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 16 Apr 2021 05:03:30 +0800 Subject: [PATCH 688/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210415=20?= =?UTF-8?q?Resolve=20systemd-resolved=20name-service=20failures=20with=20A?= =?UTF-8?q?nsible?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210415 Resolve systemd-resolved name-service failures with Ansible.md --- ...lved name-service failures with Ansible.md | 140 ++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 sources/tech/20210415 Resolve systemd-resolved name-service failures with Ansible.md diff --git a/sources/tech/20210415 Resolve systemd-resolved name-service failures with Ansible.md b/sources/tech/20210415 Resolve systemd-resolved name-service failures with Ansible.md new file mode 100644 index 0000000000..392d087922 --- /dev/null +++ b/sources/tech/20210415 Resolve systemd-resolved name-service failures with Ansible.md @@ -0,0 +1,140 @@ +[#]: subject: (Resolve systemd-resolved name-service failures with Ansible) +[#]: via: (https://opensource.com/article/21/4/systemd-resolved) +[#]: author: (David Both https://opensource.com/users/dboth) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Resolve systemd-resolved name-service failures with Ansible +====== +Name resolution and the ever-changing networking landscape. +![People work on a computer server with devices][1] + +Most people tend to take name services for granted. They are necessary to convert human-readable names, such as `www.example.com`, into IP addresses, like `93.184.216.34`. It is easier for humans to recognize and remember names than IP addresses, and name services allow us to use names, and they also convert them to IP addresses for us. + +The [Domain Name System][2] (DNS) is the global distributed database that maintains the data required to perform these lookups and reverse lookups, in which the IP address is known and the domain name is needed. + +I [installed Fedora 33][3] the first day it became available in October 2020. One of the major changes was a migration from the ancient Name Service Switch (NSS) resolver to [systemd-resolved][4]. Unfortunately, after everything was up and running, I couldn't connect to or even ping any of the hosts on my network by name, although using IP addresses did work. + +### The problem + +I run my own name server using BIND on my network server, and all has been good for over 20 years. I've configured my DHCP server to provide the IP address of my name server to every workstation connected to my network, and that (along with a couple of backup name servers) is stored in `/etc/resolv.conf`. + +[Michael Catanzaro][5] describes how systemd-resolved is supposed to work, but the introduction of systemd-resolved caused various strange resolution problems on my network hosts. The symptoms varied depending upon the host's purpose. The trouble mostly presented as an inability to find IP addresses for hosts inside the network on most systems. On other systems, it failed to resolve any names at all. For example, even though nslookup sometimes returned the correct IP addresses for hosts inside and outside networks, ping would not contact the designated host, nor could I SSH to that same host. Most of the time, neither the lookup, the ping, nor SSH would work unless I used the IP address in the command. + +The new resolver allegedly has four operational modes, described in this [Fedora Magazine article][6]. None of the options seems to work correctly when the network has its own name server designed to perform lookups for internal and external hosts. + +In theory, systemd-resolved is supposed to fix some corner issues around the NSS resolver failing to use the correct name server when a host is connected to a VPN, which has become a common problem with so many more people working from home. + +The new resolver is supposed to use the fact that `/etc/resolv.conf` is now a symlink to determine how it is supposed to work based on which resolve file it is linked to. systemd-resolved's man page includes details about this behavior. The man page says that setting `/etc/resolv.conf` as a symlink to `/run/systemd/resolve/resolv.conf` should cause the new resolver to work the same way the old one does, but that didn't work for me. + +### My fix + +I have seen many options on the internet for resolving this problem, but the only thing that works reliably for me is to stop and disable the new resolver. First, I deleted the existing link for `resolv.conf`, copied my preferred `resolv.conf` file to `/run/NetworkManager/resolv.conf`, and added a new link to that file in `/etc`: + + +``` +# rm -f /etc/resolv.conf +# ln -s /run/NetworkManager/resolv.conf /etc/resolv.conf +``` + +These commands stop and disable the systemd-resolved service: + + +``` +# systemctl stop systemd-resolved.service ; systemctl disable systemd-resolved.service +Removed /etc/systemd/system/multi-user.target.wants/systemd-resolved.service. +Removed /etc/systemd/system/dbus-org.freedesktop.resolve1.service. +``` + +There's no reboot required. The old resolver takes over, and name services work as expected. + +### Make it easy with Ansible + +I set up this Ansible playbook to make the necessary changes if I install a new host or an update that reverts the resolver to systemd-resolved, or if an upgrade to the next release of Fedora reverts the resolver. The `resolv.conf` file you want for your network should be located in `/root/ansible/resolver/files/`: + + +``` +################################################################################ +#                              fixResolver.yml                                 # +#------------------------------------------------------------------------------# +#                                                                              # +# This playbook configures the old nss resolver on systems that have the new   # +# systemd-resolved service installed. It copies the resolv.conf file for my    # +# network to /run/NetworkManager/resolv.conf and places a link to that file    # +# as /etc/resolv.conf. It then stops and disables systemd-resolved which       # +# activates the old nss resolver.                                              # +#                                                                              # +#------------------------------------------------------------------------------# +#                                                                              # +# Change History                                                               # +# Date        Name         Version   Description                               # +# 2020/11/07  David Both   00.00     Started new code                          # +# 2021/03/26  David Both   00.50     Tested OK on multiple hosts.              # +#                                                                              # +################################################################################ +\--- +\- name: Revert to old NSS resolver and disable the systemd-resolved service +  hosts: all_by_IP + +################################################################################ + +  tasks: +    - name: Copy resolv.conf for my network +      copy: +        src: /root/ansible/resolver/files/resolv.conf +        dest: /run/NetworkManager/resolv.conf +        mode: 0644 +        owner: root +        group: root + +    - name: Delete existing /etc/resolv.conf file or link +      file: +        path: /etc/resolv.conf +        state: absent + +    - name: Create link from /etc/resolv.conf to /run/NetworkManager/resolv.conf +      file: +        src: /run/NetworkManager/resolv.conf +        dest: /etc/resolv.conf +        state: link + +    - name: Stop and disable systemd-resolved +      systemd: +        name: systemd-resolved +        state: stopped +        enabled: no +``` + +Whichever Ansible inventory you use must have a group that uses IP addresses instead of hostnames. This command runs the playbook and specifies the name of the inventory file I use for hosts by IP address: + + +``` +`# ansible-playbook -i /etc/ansible/hosts_by_IP fixResolver.yml` +``` + +### Final thoughts + +Sometimes the best answer to a tech problem is to fall back to what you know. When systemd-resolved is more robust, I'll likely give it another try, but for now I'm glad that open source infrastructure allows me to quickly identify and resolve network problems. Using Ansible to automate the process is a much appreciated bonus. The important lesson here is to do your research when troubleshooting, and to never be afraid to void your warranty. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/systemd-resolved + +作者:[David Both][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/dboth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_linux11x_cc.png?itok=XMDOouJR (People work on a computer server with devices) +[2]: https://opensource.com/article/17/4/introduction-domain-name-system-dns +[3]: https://opensource.com/article/20/11/new-gnome +[4]: https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html +[5]: https://blogs.gnome.org/mcatanzaro/2020/12/17/understanding-systemd-resolved-split-dns-and-vpn-configuration/ +[6]: https://fedoramagazine.org/systemd-resolved-introduction-to-split-dns/ From 62c3346448b4a03d6ba0f541d3fa8bb453d66a1b Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 16 Apr 2021 08:30:49 +0800 Subject: [PATCH 689/818] translating --- ...ur files with this open source software.md | 90 ------------------- ...ur files with this open source software.md | 89 ++++++++++++++++++ 2 files changed, 89 insertions(+), 90 deletions(-) delete mode 100644 sources/tech/20210412 Encrypt your files with this open source software.md create mode 100644 translated/tech/20210412 Encrypt your files with this open source software.md diff --git a/sources/tech/20210412 Encrypt your files with this open source software.md b/sources/tech/20210412 Encrypt your files with this open source software.md deleted file mode 100644 index 0aa7803a9c..0000000000 --- a/sources/tech/20210412 Encrypt your files with this open source software.md +++ /dev/null @@ -1,90 +0,0 @@ -[#]: subject: (Encrypt your files with this open source software) -[#]: via: (https://opensource.com/article/21/4/open-source-encryption) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Encrypt your files with this open source software -====== -VeraCrypt offers open source file-encryption with cross-platform -capabilities. -![Lock][1] - -Many years ago, there was encryption software called [TrueCrypt][2]. Its source code was available, although there were no major claims that anyone had ever audited or contributed to it. Its author was (and remains to this day) anonymous. Still, it was cross-platform, easy to use, and really, really useful. - -TrueCrypt allowed you to create an encrypted file "vault," where you could store sensitive information of any kind (text, audio, video, images, PDFs, and so on). Provided you had the correct passphrase, TrueCrypt could decrypt the vault and provide read and write access on any computer running TrueCrypt. It was a useful technique that essentially provided a virtual, portable, fully encrypted drive (except it was a file) where you could safely store your data. - -TrueCrypt eventually closed down, but a replacement project called VeraCrypt quickly sprang up to fill the void. [VeraCrypt][3] is based on TrueCrypt 7.1a and features many improvements over the original (including significant algorithm changes for standard encrypted volumes and boot volumes). With VeraCrypt 1.12 and later versions, you can use custom iterations for increased encryption security. Better yet, VeraCrypt can load old TrueCrypt volumes, so if you were a TrueCrypt user, it's easy to transfer them over to VeraCrypt. - -### Install VeraCrypt - -You can install VeraCrypt on all major platforms by downloading the appropriate installer file from the [VeraCrypt download page][4]. - -Alternately, you can build it yourself from source code. On Linux, it requires wxGTK3, makeself, and the usual development stack (Binutils, GCC, and so on). - -Once you have it installed, launch VeraCrypt from your application menu. - -### Create a VeraCrypt volume - -If you're new to VeraCrypt, you must create a VeraCrypt volume first (otherwise, you have nothing to decrypt). In the VeraCrypt window, click the **Create Volume** button on the left. - -![Creating a volume with VeraCrypt][5] - -(Seth Kenlon, [CC BY-SA 4.0][6]) - -In VeraCrypt's **Volume Creator Wizard** window that appears, choose whether you want to create an encrypted file container or to encrypt an entire drive. The wizard steps you through creating a vault for your data, so follow along as prompted. - -For this article, I created a file container. A VeraCrypt container is a lot like any other file: it exists on a hard drive, external drive, in cloud storage, or anywhere else you can think to store data. Like other files, it can be moved, copied, and deleted. Unlike most other files, it can _contain_ more files, which is why I think of it as a "vault," and VeraCrypt developers refer to it as a "container." Its developers call a VeraCrypt file a "container" because it can contain other data objects; it has nothing to do with the container technology made popular by LXC, Kubernetes, and other modern IT mechanisms. - -#### Choose a filesystem - -During the volume-creation process, you're asked to select a filesystem to decide how the files you place inside your vault are stored. The Microsoft FAT format is archaic, non-journaled, and limits both volume and file sizes, but it's the one format all platforms can read from and write to. If you intend your VeraCrypt vault to cross platforms, FAT is your best bet. - -Aside from that, NTFS works for Windows and Linux. The open source EXT series works for Linux. - -### Mount a VeraCrypt volume - -Once you've created a VeraCrypt volume, you can mount it from within the VeraCrypt window. To mount an encrypted vault, click the **Select File** button on the right. Select your encrypted file, choose one of the numbered slots in the upper half of the VeraCrypt window, and then click the **Mount** button located in the lower-left corner of the VeraCrypt window. - -Your mounted volume is available in the list of available volumes in the VeraCrypt window, and you can access that volume through your file manager as if it were an external drive. For instance, on KDE, I open [Dolphin][7], navigate to `/media/veracrypt1`, and then I can copy files into my vault. - -As long as you have VeraCrypt on a device, you can always access your vault. It's encrypted until you manually mount it in VeraCrypt, where it remains decrypted until you close the volume again. - -### Close a VeraCrypt volume - -To keep your data safe, it's important to close a VeraCrypt volume when you don't need it open. That keeps it safe from prying eyes and crimes of opportunity. - -![Mounting a VeraCrypt volume][8] - -(Seth Kenlon, [CC BY-SA 4.0][6]) - -Closing up the VeraCrypt container is about as easy as it is to open one: Select the listed volume in the VeraCrypt window, and click **Dismount**. You no longer have access to the files inside your vault, and neither does anyone else. - -### VeraCrypt for easy cross-platform encryption - -There are many ways to keep your data secure, and VeraCrypt tries to make it easy for you, regardless of what platform you need to use that data on. If you want to experience easy, open source file encryption, try VeraCrypt. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/open-source-encryption - -作者:[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/security-lock-password.jpg?itok=KJMdkKum (Lock) -[2]: https://en.wikipedia.org/wiki/TrueCrypt -[3]: https://www.veracrypt.fr/en/Home.html -[4]: https://www.veracrypt.fr/en/Downloads.html -[5]: https://opensource.com/sites/default/files/uploads/veracrypt-create.jpg (Creating a volume with VeraCrypt) -[6]: https://creativecommons.org/licenses/by-sa/4.0/ -[7]: https://en.wikipedia.org/wiki/Dolphin_%28file_manager%29 -[8]: https://opensource.com/sites/default/files/uploads/veracrypt-volume.jpg (Mounting a VeraCrypt volume) diff --git a/translated/tech/20210412 Encrypt your files with this open source software.md b/translated/tech/20210412 Encrypt your files with this open source software.md new file mode 100644 index 0000000000..9bbb82ac9d --- /dev/null +++ b/translated/tech/20210412 Encrypt your files with this open source software.md @@ -0,0 +1,89 @@ +[#]: subject: (Encrypt your files with this open source software) +[#]: via: (https://opensource.com/article/21/4/open-source-encryption) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +用这个开源软件加密你的文件 +====== +VeraCrypt 提供跨平台的开源文件加密功能。 +![Lock][1] + +许多年前,有一个名为 [TrueCrypt][2] 的加密软件。它的源码是可以得到的,尽管没有任何人声称曾对它进行过审计或贡献过。它的作者是(至今仍是)匿名的。不过,它是跨平台的,易于使用,而且真的非常有用。 + +TrueCrypt 允许你创建一个加密的文件“保险库”,在那里你可以存储任何类型的敏感信息(文本、音频、视频、图像、PDF 等)。只要你有正确的口令,TrueCrypt 就可以解密保险库,并在任何运行 TrueCrypt 的电脑上提供读写权限。这是一项有用的技术,它基本上提供了一个虚拟的、可移动的、完全加密的驱动器(除了文件以外),你可以在其中安全地存储你的数据。 + +TrueCrypt 最终关闭了,但一个名为 VeraCrypt 的替代项目迅速兴起,填补了这一空白。[VeraCrypt][3] 基于 TrueCrypt 7.1a,比原来的版本有许多改进(包括标准加密卷和引导卷的算法的重大变化)。在 VeraCrypt 1.12 及以后的版本中,你可以使用自定义迭代来提高加密安全性。更好的是,VeraCrypt 可以加载旧的 TrueCrypt 卷,所以如果你是 TrueCrypt 用户,可以很容易地将它们转移到 VeraCrypt 上。 + +### 安装 VeraCrypt + +你可以从 [VeraCrypt 下载页面][4]下载相应的安装文件,之后在所有主流平台上安装 VeraCrypt。 + +另外,你也可以自己从源码构建它。在 Linux 上,它需要 wxGTK3、makeself 和通常的开发栈(Binutils、GCC 等)。 + +当你安装后,从你的应用菜单中启动 VeraCrypt。 + +### 创建一个 VeraCrypt 卷 + +如果你刚接触 VeraCrypt,你必须先创建一个 VeraCrypt 加密卷(否则,你没有任何东西可以解密)。在 VeraCrypt 窗口中,点击左侧的 **Create Volume** 按钮。 + +![Creating a volume with VeraCrypt][5] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +在出现的 VeraCrypt 的**卷创建向导**窗口中,选择要创建一个加密文件容器还是要加密整个驱动器。向导将为你的数据创建一个保险库,所以请按照提示进行操作。 + +在本文中,我创建了一个文件容器。VeraCrypt 容器和其他文件很像:它保存在硬盘、外置硬盘、云存储或其他任何你能想到的存储数据的地方。与其他文件一样,它可以被移动、复制和删除。与大多数其他文件不同的是,它可以_容纳_更多的文件,这就是为什么我认为它是一个“保险库”,而 VeraCrypt 开发者将其称为“容器”。它的开发者将 VeraCrypt 文件称为“容器”,因为它可以包含其他数据对象;它与 LXC、Kubernetes 和其他现代 IT 机制所流行的容器技术无关。 + +#### 选择一个文件系统 + +在创建卷的过程中,你会被要求选择一个文件系统来决定你放在保险库中的文件的存储方式。微软 FAT 格式是过时的、非日志型,并且限制了卷和文件的大小,但它是所有平台都能读写的一种格式。如果你打算让你的 VeraCrypt 保险库跨平台,FAT 是你最好的选择。 + +除此之外,NTFS 适用于 Windows 和 Linux。开源的 EXT 系列适用于 Linux。 + +### 挂载 VeraCrypt 加密卷 + +当你创建了 VeraCrypt 卷,你就可以在 VeraCrypt 窗口中加载它。要挂载一个加密库,点击右侧的 **Select File** 按钮。选择你的加密文件,选择 VeraCrypt 窗口上半部分的一个编号栏,然后点击位于 VeraCrypt 窗口左下角的 **Mount** 按钮。 + +你挂载的卷在 VeraCrypt 窗口的可用卷列表中,你可以通过文件管理器访问该卷,就像访问一个外部驱动器一样。例如,在 KDE 上,我打开 [Dolphin][7],进入 `/media/veracrypt1`,然后我就可以把文件复制到我的保险库里。 + +只要你的设备上有 VeraCrypt,你就可以随时访问你的保险库。在你手动在 VeraCrypt 中挂载之前,文件都是加密的,在那里,文件会保持解密,直到你再次关闭卷。 + +### 关闭 VeraCrypt 卷 + +为了保证你的数据安全,当你不需要打开 VeraCrypt 卷时,关闭它是很重要的。这样可以保证数据的安全,不被人窥视,且不被人趁机犯罪。 + +![Mounting a VeraCrypt volume][8] + +(Seth Kenlon, [CC BY-SA 4.0][6]) + +关闭 VeraCrypt 容器和打开容器一样简单。在 VeraCrypt 窗口中选择列出的卷,然后点击 **Dismount**。你就不再能访问保险库中的文件,其他人也不会再有访问权。 + +### VeraCrypt 轻松实现跨平台加密 + +有很多方法可以保证你的数据安全,VeraCrypt 试图为你提供方便,而无论你需要在什么平台上使用这些数据。如果你想体验简单、开源的文件加密,请尝试 VeraCrypt。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/open-source-encryption + +作者:[Seth Kenlon][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/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/security-lock-password.jpg?itok=KJMdkKum (Lock) +[2]: https://en.wikipedia.org/wiki/TrueCrypt +[3]: https://www.veracrypt.fr/en/Home.html +[4]: https://www.veracrypt.fr/en/Downloads.html +[5]: https://opensource.com/sites/default/files/uploads/veracrypt-create.jpg (Creating a volume with VeraCrypt) +[6]: https://creativecommons.org/licenses/by-sa/4.0/ +[7]: https://en.wikipedia.org/wiki/Dolphin_%28file_manager%29 +[8]: https://opensource.com/sites/default/files/uploads/veracrypt-volume.jpg (Mounting a VeraCrypt volume) From 7fe4cf285a094163190efacab762aa3cb4967bd9 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 16 Apr 2021 08:35:58 +0800 Subject: [PATCH 690/818] translating --- .../20210413 Create and Edit EPUB Files on Linux With Sigil.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md b/sources/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md index afa283e131..571cef2f5b 100644 --- a/sources/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md +++ b/sources/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md @@ -2,7 +2,7 @@ [#]: via: (https://itsfoss.com/sigile-epub-editor/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 90ad01a37d8eadfa51e2cac0890affcb8f45ecda Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 16 Apr 2021 08:57:44 +0800 Subject: [PATCH 691/818] PUB @wxy https://linux.cn/article-13301-1.html --- ...nt on your code freely with Git worktree.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) rename {translated/tech => published}/20210406 Experiment on your code freely with Git worktree.md (80%) diff --git a/translated/tech/20210406 Experiment on your code freely with Git worktree.md b/published/20210406 Experiment on your code freely with Git worktree.md similarity index 80% rename from translated/tech/20210406 Experiment on your code freely with Git worktree.md rename to published/20210406 Experiment on your code freely with Git worktree.md index ffffba7845..b684e0e46f 100644 --- a/translated/tech/20210406 Experiment on your code freely with Git worktree.md +++ b/published/20210406 Experiment on your code freely with Git worktree.md @@ -4,25 +4,25 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13301-1.html) 使用 Git 工作树对你的代码进行自由实验 ====== > 获得自由尝试的权利,同时在你的实验出错时可以安全地拥有一个新的、链接的克隆存储库。 -![带烧杯的科学实验室][1] +![](https://img.linux.net.cn/data/attachment/album/202104/16/085512x3auafu5uaymk52u.jpg) -Git 的设计部分是为了进行实验。如果你知道你的工作会被安全地跟踪,并且在出现严重错误时有安全状态存在,你就不会害怕尝试新的想法。不过,创新的部分代价是,你很可能会在过程中弄得一团糟。文件会被重新命名、移动、删除、更改、切割成碎片;新的文件被引入;你不打算跟踪的临时文件会在你的工作目录中占据一席之地等等。 +Git 的设计部分是为了进行实验。如果你知道你的工作会被安全地跟踪,并且在出现严重错误时有安全状态存在,你就不会害怕尝试新的想法。不过,创新的部分代价是,你很可能会在这个过程中弄得一团糟。文件会被重新命名、移动、删除、更改、切割成碎片;新的文件被引入;你不打算跟踪的临时文件会在你的工作目录中占据一席之地等等。 -简而言之,你的工作空间变成了纸牌屋,在“快好了!”和“哦,不,我做了什么?”之间岌岌可危地平衡着。那么,当你需要把仓库恢复到下午的一个已知状态,以便完成一些真正的工作时,该怎么办?我立刻想到了 `git branch` 和 [git stash][2] 这两个经典命令,但这两个命令都不是用来处理未被跟踪的文件的,而且文件路径的改变和其他重大的转变也会让人困惑,它们只能把工作藏(`stash`)起来以备后用。解决这个需求的答案是 Git 工作树。 +简而言之,你的工作空间变成了纸牌屋,在“快好了!”和“哦,不,我做了什么?”之间岌岌可危地平衡着。那么,当你需要把仓库恢复到下午的一个已知状态,以便完成一些真正的工作时,该怎么办?我立刻想到了 `git branch` 和 [git stash][2] 这两个经典命令,但这两个命令都不是用来处理未被跟踪的文件的,而且文件路径的改变和其他重大的转变也会让人困惑,它们只能把工作暂存(`stash`)起来以备后用。解决这个需求的答案是 Git 工作树。 ### 什么是 Git 工作树 -Git 工作树是 Git 仓库的一个链接副本,允许你同时签出多个分支。工作树与主工作副本的路径是分开的,它可以处于不同的状态和不同的分支上。在 Git 中新建工作树的好处是,你可以在不干扰当前工作环境的情况下,做出与当前任务无关的修改,提交修改,然后在以后再合并。 +Git 工作树worktree是 Git 仓库的一个链接副本,允许你同时签出多个分支。工作树与主工作副本的路径是分开的,它可以处于不同的状态和不同的分支上。在 Git 中新建工作树的好处是,你可以在不干扰当前工作环境的情况下,做出与当前任务无关的修改、提交修改,然后在以后合并。 -直接从 `git-worktree` 手册中找到了一个典型的例子:当你正在为一个项目做一个令人兴奋的新功能时,你的项目经理告诉你有一个紧急的修复工作。问题是你的工作仓库(你的“工作树”)处于混乱状态,因为你正在开发一个重要的新功能。你不想在当前的冲刺中“偷偷地”进行修复,而且你也不愿意把变更藏(`stash`)起来,为修复创建一个新的分支。相反,你决定创建一个新的工作树,这样你就可以在那里进行修复: +直接从 `git-worktree` 手册中找到了一个典型的例子:当你正在为一个项目做一个令人兴奋的新功能时,你的项目经理告诉你有一个紧急的修复工作。问题是你的工作仓库(你的“工作树”)处于混乱状态,因为你正在开发一个重要的新功能。你不想在当前的冲刺中“偷偷地”进行修复,而且你也不愿意把变更暂存起来,为修复创建一个新的分支。相反,你决定创建一个新的工作树,这样你就可以在那里进行修复: ``` $ git branch | tee @@ -75,7 +75,7 @@ $ git worktree list /home/seth/code/hotfix     09e585d [master] ``` -你可以在任何一个工作树中使用这个功能。工作树始终是链接的(除非你手动移动它们,破坏 Git 定位工作树的能力,从而切断链接)。 +你可以在任何一个工作树中使用这个功能。工作树始终是连接的(除非你手动移动它们,破坏 Git 定位工作树的能力,从而切断连接)。 ### 移动工作树 @@ -132,4 +132,4 @@ via: https://opensource.com/article/21/4/git-worktree [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/science_experiment_beaker_lab.png?itok=plKWRhlU (Science lab with beakers) -[2]: https://opensource.com/article/21/4/git-stash +[2]: https://linux.cn/article-13293-1.html From 14561c1cb9258ad81d2965e5960896536355c007 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 16 Apr 2021 09:07:27 +0800 Subject: [PATCH 692/818] PRF @geekpi --- ...Install Steam on Fedora -Beginner-s Tip.md | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/translated/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md b/translated/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md index 2a51d86e0f..010070c0ef 100644 --- a/translated/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md +++ b/translated/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md @@ -3,26 +3,28 @@ [#]: author: (John Paul https://itsfoss.com/author/john/) [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) -如何在 Fedora 上安装 Steam(入门技巧) +如何在 Fedora 上安装 Steam ====== -Steam 对 Linux 游戏玩家来说是最好的事情。由于 Steam,你可以在 Linux 上玩成百上千的游戏。 +![](https://img.linux.net.cn/data/attachment/album/202104/16/090703cg4t5npnseskhxhv.jpg) -如果你还不知道,Steam 是最流行的 PC 游戏平台。2013 年,它开始适用于 Linux。[Steam 最新的 Proton 项目][1]允许你在 Linux 上玩为 Windows 平台创建的游戏。这让 Linux 游戏库增强了许多倍。 +Steam 对 Linux 游戏玩家来说是最好的东西了。由于 Steam,你可以在 Linux 上玩成百上千的游戏。 + +如果你还不知道,Steam 是最流行的 PC 游戏平台。2013 年,它开始可以在 Linux 使用。[Steam 最新的 Proton 项目][1] 允许你在 Linux 上玩为 Windows 平台创建的游戏。这让 Linux 游戏库增强了许多倍。 ![][2] Steam 提供了一个桌面客户端,你可以用它从 Steam 商店下载或购买游戏,然后安装并玩它。 -过去我们曾讨论过[在 Ubuntu 上安装 Steam][3]。在这个初学者教程中,我将向你展示在 Fedora Linux 上安装 Steam 的步骤。 +过去我们曾讨论过 [在 Ubuntu 上安装 Steam][3]。在这个初学者教程中,我将向你展示在 Fedora Linux 上安装 Steam 的步骤。 ### 在 Fedora 上安装 Steam -要在 Fedora 上使用 Steam,你必须使用 RMPFusion 软件库。[RPMFusion][4] 是一系列第三方软件库,其中包含了 Fedora 选择不与它们的操作系统一起发布的软件。它们提供自由(开源)和非自由(闭源)的软件库。由于 Steam 在非自由软件库中,你将只安装那一个。 +要在 Fedora 上使用 Steam,你必须使用 RMPFusion 软件库。[RPMFusion][4] 是一套第三方软件库,其中包含了 Fedora 选择不与它们的操作系统一起发布的软件。它们提供自由(开源)和非自由(闭源)的软件库。由于 Steam 在非自由软件库中,你将只安装那一个。 我将同时介绍终端和图形安装方法。 @@ -44,15 +46,15 @@ sudo dnf install steam ![Install Steam via command line][5] -输入密码后按 “Y” 接受。安装完毕后,打开 Steam,玩一些游戏。 +输入密码后按 `Y` 接受。安装完毕后,打开 Steam,玩一些游戏。 #### 方法 2:通过 GUI 安装 Steam -你可以从软件中心[启用 Fedora 上的第三方仓库][6]。打开软件中心并点击菜单。 +你可以从软件中心 [启用 Fedora 上的第三方仓库][6]。打开软件中心并点击菜单。 ![][7] -在 Software Repositories 窗口中,你会看到顶部有一个 “Third Party Repositories”。点击 “Install” 按钮。当提示你输入密码时,就完成了。 +在 “软件仓库” 窗口中,你会看到顶部有一个 “第三方软件仓库”。点击 “安装” 按钮。当提示你输入密码时,就完成了。 ![][8] @@ -95,7 +97,7 @@ via: https://itsfoss.com/install-steam-fedora/ 作者:[John Paul][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/) 荣誉推出 From b7a3fff4f16fa335f0d329905873b5a46b688311 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 16 Apr 2021 09:08:04 +0800 Subject: [PATCH 693/818] PUB @geekpi https://linux.cn/article-13302-1.html --- ...20210410 How to Install Steam on Fedora -Beginner-s Tip.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210410 How to Install Steam on Fedora -Beginner-s Tip.md (98%) diff --git a/translated/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md b/published/20210410 How to Install Steam on Fedora -Beginner-s Tip.md similarity index 98% rename from translated/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md rename to published/20210410 How to Install Steam on Fedora -Beginner-s Tip.md index 010070c0ef..9aa71925fa 100644 --- a/translated/tech/20210410 How to Install Steam on Fedora -Beginner-s Tip.md +++ b/published/20210410 How to Install Steam on Fedora -Beginner-s Tip.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13302-1.html) 如何在 Fedora 上安装 Steam ====== From 4dcfe5707d9b16ee6de9e25fce8f1461c3db6aad Mon Sep 17 00:00:00 2001 From: stevenzdg988 <3442417@qq.com> Date: Fri, 16 Apr 2021 09:40:00 +0800 Subject: [PATCH 694/818] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=AF=91=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...t tips for managing your home directory.md | 87 +++++++++---------- 1 file changed, 41 insertions(+), 46 deletions(-) diff --git a/sources/tech/20210405 7 Git tips for managing your home directory.md b/sources/tech/20210405 7 Git tips for managing your home directory.md index 3d6beeb574..f79436921e 100644 --- a/sources/tech/20210405 7 Git tips for managing your home directory.md +++ b/sources/tech/20210405 7 Git tips for managing your home directory.md @@ -7,54 +7,50 @@ [#]: publisher: ( ) [#]: url: ( ) -7 Git tips for managing your home directory +7个管理家目录的 Git 技巧 ====== -Here is how I set up Git to manage my home directory. -![Houses in a row][1] +这是我怎样设置 Git 来管理我的家目录的方法。 +![一排房子][1] -I have several computers. I've got a laptop at work, a workstation at home, a Raspberry Pi (or four), a [Pocket CHIP][2], a [Chromebook running various forms of Linux][3], and so on. I used to set up my user environment on each computer by more or less following the same steps, and I often told myself that I enjoyed that each one was slightly unique. For instance, I use [Bash aliases][4] more often at work than at home, and the helper scripts I use at home might not be useful at work. +我有几台电脑。我有一台笔记本电脑在工作,一台工作站在家里,一台 Raspberry Pi(或四台),一台 [Pocket CHIP][2],一台 [运行各种不同的 Linux 的 Chromebook][3],等等。我过去常常按照相同的步骤或多或少地在每台计算机上设置我的用户环境,而且我经常告诉自己,我喜欢每台计算机都略微独特。例如,我在工作中比在家里更经常使用 [Bash 别名][4],并且我在家里使用的帮助脚本可能对工作没有用。 -Over the years, my expectations across devices began to merge, and I'd forget that a feature I'd built up on my home machine wasn't ported over to my work machine, and so on. I needed a way to standardize my customized toolkit. The answer, to my surprise, was Git. +这些年来,我对各种设备的期望开始相融,而我忘记了我在家用计算机上建立的功能没有移植到我的工作计算机上,诸如此类。我需要一种标准化我的自定义工具包的方法。使我感到意外的答案是 Git。 -Git is version-tracker software. It's famously used by the biggest and smallest open source projects and even by the largest proprietary software companies. But it was designed for source code—not a home directory filled with music and video files, games, photos, and so on. I'd heard of people managing their home directory with Git, but I assumed that it was a fringe experiment done by coders, not real-life users like me. +Git 是版本跟踪器软件。它著名于使用在最大和最小的开源项目,甚至最大的专利软件公司。但是它是为源代码设计的,而不是一个充满音乐和视频文件,游戏,照片等的家目录。我听说有人使用 Git 管理其家目录,但我认为这是编码人员进行的一项附带实验,而不是像我这样的现实生活中的用户。 -Managing my home directory with Git has been an evolving process. I've learned and adapted along the way. Here are the things you might want to keep in mind should you decide to manage your home directory with Git. +用 Git 管理我的家目录是一个不断发展的过程。随着时间的推移我一直在学习和适应。如果您决定使用 Git 管理家目录,则可能需要记住以下几点。 -### 1\. Text and binary locations +### 1\. 文本和二进制位置 -![home directory][5] +![家目录][5] (Seth Kenlon, [CC BY-SA 4.0][6]) -When managed by Git, your home directory becomes something of a no-man 's-land for everything but configuration files. That means when you open your home directory, you should see nothing but a list of predictable directories. There shouldn't be any stray photos or LibreOffice documents, and no "I'll put this here for just a minute" files. +当由 Git 管理时,除了配置文件之外,您的家目录对于所有内容而言都是"无人之地"。这意味着当您打开主目录时,除了可预见的目录的列表之外,您什么都看不到。不应有任何无主的照片或 LibreOffice 文档,也不应有 “我将其放在此处仅一分钟(临时)” 的文件。 -The reason for this is simple: when you manage your home directory with Git, everything in your home directory that's _not_ being committed becomes noise. Every time you do a `git status`, you'll have to scroll past any file that Git isn't tracking, so it's vital that you keep those files in subdirectories (which you add to your `.gitignore` file). +原因很简单:使用 Git 管理家目录时,家目录中所有 _未_ 提交的内容都会变得杂乱无章。每次执行 `git status` 时,您都必须滚动到过去任何 Git 未跟踪的文件,因此将这些文件保存在子目录(添加到 `.gitignore` 文件中)至关重要。 -Many Linux distributions provide a set of default directories: +许多 Linux 发行版提供了一组默认目录: - * Documents - * Downloads - * Music - * Photos - * Templates - * Videos + * 文档 + * 下载 + * 音乐 + * 相片 + * 模板 + * 视频 +如果需要,您可以创建更多。例如,我区分创作的音乐(音乐)和购买的聆听音乐(专辑)。同样,我的 Cinema (电影)目录包含其他人的电影,而 Videos (视频目录)包含我需要编辑的视频文件。换句话说,我的默认目录结构比大多数 Linux 发行版提供的默认集更详细,但是我认为这样做有好处。如果没有适合您的目录结构,由于缺少更好的存放位置,您将更有可能将其存放在家目录中,因此请提前考虑并计划适合您的工作目录。您以后总是可以添加更多,但是最好先开始擅长的。 +### 2\. 设置最优的 `.gitignore` -You can create more if you need them. For instance, I differentiate between the music I create (Music) and the music I purchase to listen to (Albums). Likewise, my Cinema directory contains movies by other people, while Videos contains video files I need for editing. In other words, my default directory structure has more granularity than the default set provided by most Linux distributions, but I think there's a benefit to that. Without a directory structure that works for you, you'll be more likely to just stash stuff in your home directory, for lack of a better place for it, so think ahead and plan out directories that work for you. You can always add more later, but it's best to start strong. - -### 2\. Setting up your very best .gitignore - -Once you've cleaned up your home directory, you can instantiate it as a Git repository as usual: - +清理家目录后,您可以像往常一样将其作为 Git 存储库实例化: ``` $ cd $ git init . ``` -Your Git repository contains nothing yet, so everything in your home directory is untracked. Your first job is to sift through the list of untracked files and determine what you want to remain untracked. To see untracked files: - +您的 Git 信息库还没有任何内容,因此您的家目录中的所有内容均未被跟踪。您的第一项工作是筛选未跟踪文件的列表,并确定要保持未跟踪状态的文件。要查看未跟踪的文件: ``` $ git status @@ -69,52 +65,51 @@ $ git status [...] ``` -Depending on how long you've been using your home directory, this list may be long. The easy ones are the directories you decided on in the first step. By adding these to a hidden file called `.gitignore`, you tell Git to stop listing them as untracked files and never to track them: - +根据您使用家目录的时间长短,此列表可能很长。简单的目录是您在第一步中确定的目录。通过将它们添加到名为 `.gitignore` 的隐藏文件中,您告诉 Git 停止将它们列为未跟踪文件,并且从不对其进行跟踪: ``` `$ \ls -lg | grep ^d | awk '{print $8}' >> ~/.gitignore` ``` -With that done, go through the remaining untracked files shown by `git status` and determine whether any other files warrant exclusion. This process helped me discover several stale old configuration files and directories, which I ended up trashing altogether, but also some that were very specific to one computer. I was fairly strict here because many configuration files do better when they're auto-generated. For instance, I never commit my KDE configuration files because many contain information like recent documents and other elements that don't exist on another machine. +完成后,浏览 `git status` 所示的其余未跟踪文件,并确定是否有其他文件需要授权排除。这个过程帮助我发现了几个陈旧的配置文件和目录,这些文件和目录最终被我全部丢弃了,而且还发现了一些特定于一台计算机的文件和目录。我在这里非常严格,因为许多配置文件在自动生成时会做得更好。例如,我从未提交过 KDE 配置文件,因为许多文件包含诸如最新文档之类的信息以及其他机器上不存在的其他元素。 -I track my personalized configuration files, scripts and utilities, profile and Bash configs, and cheat sheets and other snippets of text that I refer to frequently. If the software is mostly responsible for maintaining a file, I ignore it. And when in doubt about a file, I ignore it. You can always un-ignore it later (by removing it from your `.gitignore` file). +我跟踪我的个性化配置文件,脚本和实用程序,配置文件和 Bash 配置以及速查表和我经常引用的其他文本片段。如果该软件主要负责维护文件,则将其忽略。当对文件有疑问时,我将其忽略。您以后总是可以取消忽略它(通过从 .gitignore 文件中删除它)。 -### 3\. Get to know your data +### 3\. 了解您的数据 -I'm on KDE, so I use the open source scanner [Filelight][7] to get an overview of my data. Filelight gives you a chart that lets you see the size of each directory. You can navigate through each directory to see what's taking up all the space and then backtrack to investigate elsewhere. It's a fascinating view of your system, and it lets you see your files in a completely new light. +我正在使用 KDE,因此我使用开源扫描程序 [Filelight][7] 来获取我的数据概述。Filelight 为您提供了一个图表,可让您查看每个目录的大小。您可以浏览每个目录以查看占用了所有空间的内容,然后回溯调查其他地方。这是您系统的迷人视图,它使您可以以全新的方式查看文件。 ![Filelight][8] (Seth Kenlon, [CC BY-SA 4.0][6]) -Use Filelight or a similar utility to find unexpected caches of data you don't need to commit. For instance, the KDE file indexer (Baloo) generates quite a lot of data specific to its host that I definitely wouldn't want to transport to another computer. +使用 Filelight 或类似的实用程序查找不需要提交的意外数据缓存。例如,KDE 文件索引器(Baloo)生成了大量特定于其主机的数据,我绝对不希望将其传输到另一台计算机。 -### 4\. Don't ignore your .gitignore file +### 4\. 不要忽略您的 .gitignore 文件 -On some projects, I tell Git to ignore my `.gitignore` file because what I want to ignore is sometimes specific to my working directory, and I don't presume other developers on the same project need me to tell them what their `.gitignore` file ought to look like. Because my home directory is for my use only, I do _not_ ignore my home's `.gitignore` file. I commit it along with other important files, so it's inherited across all of my systems. And of course, all of my systems are identical from the home directory's viewpoint: they have the same set of default folders and many of the same hidden configuration files. +在某些项目中,我告诉 Git 忽略我的`.gitignore`文件,因为有时我要忽略的内容特定于我的工作目录,并且我不认为同一项目中的其他开发人员需要我告诉他们的 `.gitignore` 文件的内容应该看起来像什么。因为我的家目录仅供我使用,所以我 _不_ 会忽略我的家目录的 `.gitignore` 文件。我将其与其他重要文件一起提交,因此它已在我的所有系统中被继承。当然,从家目录的角度来看,我所有的系统都是相同的:它们具有相同的默认文件夹集和许多相同的隐藏配置文件。 -### 5\. Don't fear the binary +### 5\. 不要担心二进制文件 -I put my system through weeks and weeks of rigorous testing, convinced that it was _never_ wise to commit binary files to Git. I tried GPG encrypted password files, I tried LibreOffice documents, JPEGs, PNGs, and more. I even had a script that unarchived LibreOffice files before adding them to Git, extracted the XML inside so I could commit just the XML, and then rebuilt the LibreOffice file so that I could work on it within LibreOffice. My theory was that committing XML would render a smaller Git repository than a ZIP file (which is all a LibreOffice document really is). +我对系统进行了数周的严格测试,确信将二进制文件提交到 Git 是绝对不明智的。我尝试了 GPG 加密的密码文件,尝试了 LibreOffice 文档,JPEG,PNG 等等。我甚至有一个脚本,可以在将 LibreOffice 文件添加到 Git 之前取消存档,然后提取其中的 XML,以便仅提交 XML,然后重新构建 LibreOffice 文件,以便可以在 LibreOffice 中继续工作。我的理论是,提交 XML 会比使用 ZIP 文件(这实际上是 LibreOffice 文档的全部)提供一个更小的 Git 存储库。 -To my great surprise, I found that committing a few binary files every now and then did not substantially increase the size of my Git repository. I've worked with Git long enough to know that if I were to commit gigabytes of binary data, my repository would suffer, but the occasional binary file isn't an emergency to avoid at all costs. +令我惊讶的是,我发现不时提交一些二进制文件并没有实质性地增加我的 Git 存储库的大小。我使用 Git 已经很长时间了,以至于如果我要提交千兆字节的二进制数据,我的存储库将会遭受损失,但是偶尔的二进制文件并不是不惜一切代价避免的紧急情况。 -Armed with this new confidence, I add font OTF and TTF files to my standard home repo, my `.face` file for GDM, and other incidental minor binary blobs. Don't overthink it, don't waste time trying to avoid it; just commit it. +有了这种信心,我将字体 OTF 和 TTF 文件添加到我的标准主存储库,GDM 的`.face`文件以及其他附带的次要二进制 Blob 文件。不要想太多,不要浪费时间去避免它。只需提交即可。 -### 6\. Use a private repo +### 6\. 使用私有存储库 -Don't commit your home directory to a public Git repository, even if the host offers private accounts. If you're like me, you have SSH keys and GPG keychains and GPG-encrypted files that ought not end up on anybody's server but my own. +即使主机提供私人帐户,也不要将您的主目录提交到公共 Git 存储库。如果您像我一样,拥有 SSH 密钥,GPG 密钥链和 GPG 加密的文件,这些属于自己的文件不应该出现在任何人的服务器上。 -I [run a local Git server][9] on a Raspberry Pi (it's easier than you think), so I can update any computer any time I'm home. I'm a remote worker, so that's usually good enough, but I can also reach the computer when traveling over my [VPN][10]. +我在 Raspberry Pi 上[运行本地 Git 服务器][9](这比您想象的要容易),因此我可以在家里时随时更新任何一台计算机。我是一名远程工作者,所以通常情况下就足够了,但是我也可以通过 [VPN][10] 访问计算机。 -### 7\. Remember to push +### 7\. 要记得推送 -The thing about Git is that it only pushes changes to your server when you tell it to. If you're a longtime Git user, this process is probably natural to you. For new users who might be accustomed to the automatic synchronization in Nextcloud or Syncthing, this may take some getting used to. +关于 Git ,仅当您通知服务器时,它才会将更改推送到您的服务器。如果您是 Git 的长期用户,则此过程可能对您很自然。对于可能习惯于 Nextcloud 或 Syncthing 自动同步的新用户,这可能需要一些时间来适应。 -### Git at home +### Git 家目录 -Managing my common files with Git hasn't just made life more convenient across devices. Knowing that I have a full history for all my configurations and utility scripts encourages me to try out new ideas because it's always easy to roll back my changes if they turn out to be _bad_ ideas. Git has rescued me from an ill-advised umask setting in `.bashrc`, a poorly executed late-night addition to my package management script, and an it-seemed-like-a-cool-idea-at-the-time change of my [rxvt][11] color scheme—and probably a few other mistakes in my past. Try Git in your home because a home that commits together merges together. +使用 Git 管理我的通用文件并没有使跨设备的生活更加便利。知道我对所有配置和实用程序脚本都有完整的历史记录,这会鼓励我尝试新的想法,因为如果结果变得 _很糟糕_,则很容易回滚我的更改。 Git 已将我从在 `.bashrc` 文件欠考虑的掩码设置中解救出来,对于我的软件包管理脚本糟糕的深夜附加物,并且更改 [rxvt][11] 配色方案以及过去的其他一些错误这时看起来像一个很酷的想法。在家(目录)中尝试 Git,因为一起提交的家(目录)会合并在一起。 -------------------------------------------------------------------------------- From da2e0675b6994fb38f6e2684bd4514e483abe8f0 Mon Sep 17 00:00:00 2001 From: stevenzdg988 <3442417@qq.com> Date: Fri, 16 Apr 2021 13:11:26 +0800 Subject: [PATCH 695/818] movefile --- .../tech/20210405 7 Git tips for managing your home directory.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20210405 7 Git tips for managing your home directory.md (100%) diff --git a/sources/tech/20210405 7 Git tips for managing your home directory.md b/translated/tech/20210405 7 Git tips for managing your home directory.md similarity index 100% rename from sources/tech/20210405 7 Git tips for managing your home directory.md rename to translated/tech/20210405 7 Git tips for managing your home directory.md From b572776e77cc629fc53cd1ed9a3bf15973e16bfb Mon Sep 17 00:00:00 2001 From: Guoliang Han Date: Fri, 16 Apr 2021 14:02:50 +0800 Subject: [PATCH 696/818] translate complete and first commit of 20210212 Network address translation part 2 --- ...translation part 2 - the conntrack tool.md | 139 ------------------ ...translation part 2 - the conntrack tool.md | 135 +++++++++++++++++ 2 files changed, 135 insertions(+), 139 deletions(-) delete mode 100644 sources/tech/20210212 Network address translation part 2 - the conntrack tool.md create mode 100644 translated/tech/20210212 Network address translation part 2 - the conntrack tool.md diff --git a/sources/tech/20210212 Network address translation part 2 - the conntrack tool.md b/sources/tech/20210212 Network address translation part 2 - the conntrack tool.md deleted file mode 100644 index 60078eb4c5..0000000000 --- a/sources/tech/20210212 Network address translation part 2 - the conntrack tool.md +++ /dev/null @@ -1,139 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (cooljelly) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Network address translation part 2 – the conntrack tool) -[#]: via: (https://fedoramagazine.org/network-address-translation-part-2-the-conntrack-tool/) -[#]: author: (Florian Westphal https://fedoramagazine.org/author/strlen/) - -Network address translation part 2 – the conntrack tool -====== - -![][1] - -This is the second article in a series about network address translation (NAT). The first article introduced [how to use the iptables/nftables packet tracing feature][2] to find the source of NAT-related connectivity problems. Part 2 introduces the “conntrack” command. conntrack allows you to inspect and modify tracked connections. - -### Introduction - -NAT configured via iptables or nftables builds on top of netfilters connection tracking facility. The _conntrack_ command is used to inspect and alter the state table. It is part of the “conntrack-tools” package. - -### Conntrack state table - -The connection tracking subsystem keeps track of all packet flows that it has seen. Run “_sudo conntrack -L_” to see its content: - -``` -tcp 6 43184 ESTABLISHED src=192.168.2.5 dst=10.25.39.80 sport=5646 dport=443 src=10.25.39.80 dst=192.168.2.5 sport=443 dport=5646 [ASSURED] mark=0 use=1 -tcp 6 26 SYN_SENT src=192.168.2.5 dst=192.168.2.10 sport=35684 dport=443 [UNREPLIED] src=192.168.2.10 dst=192.168.2.5 sport=443 dport=35684 mark=0 use=1 -udp 17 29 src=192.168.8.1 dst=239.255.255.250 sport=48169 dport=1900 [UNREPLIED] src=239.255.255.250 dst=192.168.8.1 sport=1900 dport=48169 mark=0 use=1 -``` - -Each line shows one connection tracking entry. You might notice that each line shows the addresses and port numbers twice and even with inverted address and port pairs! This is because each entry is inserted into the state table twice. The first address quadruple (source and destination address and ports) are those recorded in the original direction, i.e. what the initiator sent. The second quadruple is what conntrack expects to see when a reply from the peer is received. This solves two problems: - - 1. If a NAT rule matches, such as IP address masquerading, this is recorded in the reply part of the connection tracking entry and can then be automatically applied to all future packets that are part of the same flow. - 2. A lookup in the state table will be successful even if its a reply packet to a flow that has any form of network or port address translation applied. - - - -The original (first shown) quadruple stored never changes: Its what the initiator sent. NAT manipulation only alters the reply (second) quadruple because that is what the receiver will see. Changes to the first quadruple would be pointless: netfilter has no control over the initiators state, it can only influence the packet as it is received/forwarded. When a packet does not map to an existing entry, conntrack may add a new state entry for it. In the case of UDP this happens automatically. In the case of TCP conntrack can be configured to only add the new entry if the TCP packet has the [SYN bit][3] set. By default conntrack allows mid-stream pickups to not cause problems for flows that existed prior to conntrack becoming active. - -### Conntrack state table and NAT - -As explained in the previous section, the reply tuple listed contains the NAT information. Its possible to filter the output to only show entries with source or destination nat applied. This allows to see which kind of NAT transformation is active on a given flow. _“sudo conntrack -L -p tcp –src-nat_” might show something like this: - -``` -tcp 6 114 TIME_WAIT src=10.0.0.10 dst=10.8.2.12 sport=5536 dport=80 src=10.8.2.12 dst=192.168.1.2 sport=80 dport=5536 [ASSURED] -``` - -This entry shows a connection from 10.0.0.10:5536 to 10.8.2.12:80. But unlike the previous example, the reply direction is not just the inverted original direction: the source address is changed. The destination host (10.8.2.12) sends reply packets to 192.168.1.2 instead of 10.0.0.10. Whenever 10.0.0.10 sends another packet, the router with this entry replaces the source address with 192.168.1.2. When 10.8.2.12 sends a reply, it changes the destination back to 10.0.0.10. This source NAT is due to a [nft masquerade][4] rule: - -``` -inet nat postrouting meta oifname "veth0" masquerade -``` - -Other types of NAT rules, such as “dnat to” or “redirect to” would be shown in a similar fashion, with the reply tuples destination different from the original one. - -### Conntrack extensions - -Two useful extensions are conntrack accounting and timestamping. _“sudo sysctl net.netfilter.nf_conntrack_acct=1”_ makes _“sudo conntrack -L_” track byte and packet counters for each flow. - -_“sudo sysctl net.netfilter.nf_conntrack_timestamp=1”_ records a “start timestamp” for each connection. _“sudo conntrack -L”_ then displays the seconds elapsed since the flow was first seen. Add “_–output ktimestamp_” to see the absolute start date as well. - -### Insert and change entries - -You can add entries to the state table. For example: - -``` -sudo conntrack -I -s 192.168.7.10 -d 10.1.1.1 --protonum 17 --timeout 120 --sport 12345 --dport 80 -``` - -This is used by conntrackd for state replication. Entries of an active firewall are replicated to a standby system. The standby system can then take over without breaking connectivity even on established flows. Conntrack can also store metadata not related to the packet data sent on the wire, for example the conntrack mark and connection tracking labels. Change them with the “update” (-U) option: - -``` -sudo conntrack -U -m 42 -p tcp -``` - -This changes the connmark of all tcp flows to 42. - -### **Delete entries** - -In some cases, you want to delete enries from the state table. For example, changes to NAT rules have no effect on packets belonging to flows that are already in the table. For long-lived UDP sessions, such as tunneling protocols like VXLAN, it might make sense to delete the entry so the new NAT transformation can take effect. Delete entries via _“sudo conntrack -D_” followed by an optional list of address and port information. The following example removes the given entry from the table: - -``` -sudo conntrack -D -p udp --src 10.0.12.4 --dst 10.0.0.1 --sport 1234 --dport 53 -``` - -### Conntrack error counters - -Conntrack also exports statistics: - -``` -# sudo conntrack -S -cpu=0 found=0 invalid=130 insert=0 insert_failed=0 drop=0 early_drop=0 error=0 search_restart=10 -cpu=1 found=0 invalid=0 insert=0 insert_failed=0 drop=0 early_drop=0 error=0 search_restart=0 -cpu=2 found=0 invalid=0 insert=0 insert_failed=0 drop=0 early_drop=0 error=0 search_restart=1 -cpu=3 found=0 invalid=0 insert=0 insert_failed=0 drop=0 early_drop=0 error=0 search_restart=0 -``` - -Most counters will be 0. “Found” and “insert” will always be 0, they only exist for backwards compatibility. Other errors accounted for are: - - * invalid: packet does not match an existing connection and doesn’t create a new connection. - * insert_failed: packet starts a new connection, but insertion into the state table failed. This can happen for example when NAT engine happened to pick identical source address and port when Masquerading. - * drop: packet starts a new connection, but no memory is available to allocate a new state entry for it. - * early_drop: conntrack table is full. In order to accept the new connection existing connections that did not see two-way communication were dropped. - * error: icmp(v6) received icmp error packet that did not match a known connection - * search_restart: lookup interrupted by an insertion or deletion on another CPU. - * clash_resolve: Several CPUs tried to insert identical conntrack entry. - - - -These error conditions are harmless unless they occur frequently. Some can be mitigated by tuning the conntrack sysctls for the expected workload. _net.netfilter.nf_conntrack_buckets_ and _net.netfilter.nf_conntrack_max_ are typical candidates. See the [nf_conntrack-sysctl documentation][5] for a full list. - -Use “_sudo sysctl_ _net.netfilter.nf_conntrack_log_invalid=255″_ to get more information when a packet is invalid. For example, when conntrack logs the following when it encounters a packet with all tcp flags cleared: - -``` -nf_ct_proto_6: invalid tcp flag combination SRC=10.0.2.1 DST=10.0.96.7 LEN=1040 TOS=0x00 PREC=0x00 TTL=255 ID=0 PROTO=TCP SPT=5723 DPT=443 SEQ=1 ACK=0 -``` - -### Summary - -This article gave an introduction on how to inspect the connection tracking table and the NAT information stored in tracked flows. The next part in the series will expand on the conntrack tool and the connection tracking event framework. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/network-address-translation-part-2-the-conntrack-tool/ - -作者:[Florian Westphal][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/strlen/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2021/02/network-address-translation-part-2-816x345.jpg -[2]: https://fedoramagazine.org/network-address-translation-part-1-packet-tracing/ -[3]: https://en.wikipedia.org/wiki/Transmission_Control_Protocol#TCP_segment_structure -[4]: https://wiki.nftables.org/wiki-nftables/index.php/Performing_Network_Address_Translation_(NAT)#Masquerading -[5]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking/nf_conntrack-sysctl.rst diff --git a/translated/tech/20210212 Network address translation part 2 - the conntrack tool.md b/translated/tech/20210212 Network address translation part 2 - the conntrack tool.md new file mode 100644 index 0000000000..992ab1e3c3 --- /dev/null +++ b/translated/tech/20210212 Network address translation part 2 - the conntrack tool.md @@ -0,0 +1,135 @@ +[#]: collector: (lujun9972) +[#]: translator: (cooljelly) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Network address translation part 2 – the conntrack tool) +[#]: via: (https://fedoramagazine.org/network-address-translation-part-2-the-conntrack-tool/) +[#]: author: (Florian Westphal https://fedoramagazine.org/author/strlen/) + +网络地址转换第二部分 - conntrack 工具 +====== + +![][1] + +这是有关网络地址转换network address translation(NAT)的系列文章中的第二篇。之前的第一篇文章介绍了 [如何使用 iptables/nftables 的报文跟踪功能][2] 来定位 NAT 相关的连接问题。作为第二部分,本文介绍 “conntrack” 命令。conntrack 命令允许您查看和修改被跟踪的连接。 + +### 引言 + +通过 iptables 或 nftables 配置的 NAT 建立在 netfilters 连接跟踪工具之上。_conntrack_ 命令作为 “conntrack-tools” 软件包的一部分,用于查看和更改连接状态表。 + +### Conntrack 连接状态表 + +连接跟踪子系统跟踪它看到的所有报文流。运行 “_sudo conntrack -L_” 可查看其内容: + +``` +tcp 6 43184 ESTABLISHED src=192.168.2.5 dst=10.25.39.80 sport=5646 dport=443 src=10.25.39.80 dst=192.168.2.5 sport=443 dport=5646 [ASSURED] mark=0 use=1 +tcp 6 26 SYN_SENT src=192.168.2.5 dst=192.168.2.10 sport=35684 dport=443 [UNREPLIED] src=192.168.2.10 dst=192.168.2.5 sport=443 dport=35684 mark=0 use=1 +udp 17 29 src=192.168.8.1 dst=239.255.255.250 sport=48169 dport=1900 [UNREPLIED] src=239.255.255.250 dst=192.168.8.1 sport=1900 dport=48169 mark=0 use=1 +``` + +上述显示结果中,每行表示一个连接跟踪项。您可能会注意到,每行相同的地址和端口号会出现两次,而且第二次出现的源地址/端口对和目标地址/端口对会与第一次正好相反!这是因为每个连接跟踪项会先后两次被插入连接状态表。第一个四元组(源地址,目标地址,源端口,目标端口)记录的是原始方向的连接信息,即发送者发送报文的方向。而第二个四元组则记录的是 conntrack 子系统期望收到的对端回复报文的连接信息。这解决了两个问题: + + 1. 如果报文匹配到一个 NAT 规则,例如 IP 地址伪装,相应的映射信息会记录在链接跟踪项的回复方向部分,并自动应用于同一条流的所有后续报文。 + 2. 即使一条流经过了地址或端口的转换,也可以成功在连接状态表中查找到回复报文的四元组信息。 + +原始方向的(第一个显示的)四元组信息永远不会改变:它就是发送者发送的连接信息。NAT 操作只会修改回复方向(第二个)四元组,因为这是接受者看到的连接信息。修改第一个四元组没有意义:netfilter 无法控制发起者的连接状态,它只能在收到/转发报文时对其施加影响。当一个报文未映射到现有连接表项时,conntrack 可以为其新建一个表项。对于 UDP 报文,该操作会自动进行。对于 TCP 报文,conntrack 可以配置为只有 TCP 报文设置了 [SYN 标志位][3] 才新建表项。默认情况下,conntrack 会允许从流的中间报文开始创建,这是为了避免对 conntrack 使能之前就存在的流处理出现问题。 + +### Conntrack 连接状态表和 NAT + +如上一节所述,回复方向的四元组包含 NAT 信息。您可以通过命令过滤输出经过源地址 NAT 或目标地址 NAT 的连接跟踪项。通过这种方式可以看到一个指定的流经过了哪种类型的 NAT 转换。例如,运行 “_sudo conntrack -L -p tcp –src-nat_” 可显示经过源 NAT 的连接跟踪项,输出结果类似于以下内容: + +``` +tcp 6 114 TIME_WAIT src=10.0.0.10 dst=10.8.2.12 sport=5536 dport=80 src=10.8.2.12 dst=192.168.1.2 sport=80 dport=5536 [ASSURED] +``` + +这个连接跟踪项表示一条从 10.0.0.10:5536 到 10.8.2.12:80 的连接。与前面示例不同的是,回复方向的四元组不是原始方向四元组的简单翻转:源地址已修改。目标主机(10.8.2.12)将回复数据包发送到 192.168.1.2,而不是 10.0.0.10。每当 10.0.0.10 发送新的报文时,具有此连接跟踪项的路由器会将源地址替换为 192.168.1.2。当 10.8.2.12 发送回复报文时,该路由器将目的地址修改回 10.0.0.10。上述源 NAT 行为源自一条 [NFT 伪装][4] 规则: + +``` +inet nat postrouting meta oifname "veth0" masquerade +``` + +其他类型的 NAT 规则,例如目标地址 DNAT 规则或重定向规则,其连接跟踪项也会以类似的方式显示,回复方向四元组的远端地址或端口与原始方向四元组的远端地址或端口不同。 + +### Conntrack 扩展 + +conntrack 的记帐功能和时间戳功能是两个有用的扩展功能。运行 “_sudo sysctl net.netfilter.nf_conntrack_acct=1_” 可以在运行 “_sudo conntrack -L_” 时显示每个流经过的字节数和报文数。运行 “_sudo sysctl net.netfilter.nf_conntrack_timestamp=1_” 为每个连接记录一个开始时间戳,之后每次运行 “_sudo conntrack -L_” 时都可以显示这个流从开始经过了多少秒。在上述命令中增加 “–output ktimestamp” 选项也可以看到流开始的绝对时间。 + + +### 插入和更改连接跟踪项 + +您可以手动为状态表添加连接跟踪项,例如: + +``` +sudo conntrack -I -s 192.168.7.10 -d 10.1.1.1 --protonum 17 --timeout 120 --sport 12345 --dport 80 +``` + +这项命令通常被 conntrackd 用于状态复制,即将主防火墙的连接跟踪项复制到备用防火墙系统。于是当切换发生的时候,备用系统可以接管已经建立的连接且不会造成中断。Conntrack 还可以存储报文的带外元数据,例如 conntrack 标记和连接跟踪标签。可以用 “update” (-U) 选项来修改它们: + +``` +sudo conntrack -U -m 42 -p tcp +``` + +这条命令将所有的 TCP 流的 connmark 修改为 42。 + +### **Delete entries** +### **删除连接跟踪项** + +在某些情况下,您可能想从状态表中删除条目。例如,对 NAT 规则的修改不会影响表中已存在流的经过报文。因此对 UDP 长连接(例如像 VXLAN 这样的隧道协议),删除表项可能很有意义,这样新的 NAT 转换规则才能生效。可以通过 “sudo conntrack -D” 命令附带可选的地址和端口列表选项,来删除相应的表项,如下例所示: + +``` +sudo conntrack -D -p udp --src 10.0.12.4 --dst 10.0.0.1 --sport 1234 --dport 53 +``` + +### Conntrack 错误计数 + +Conntrack 也可以输出统计数字: + +``` +# sudo conntrack -S +cpu=0 found=0 invalid=130 insert=0 insert_failed=0 drop=0 early_drop=0 error=0 search_restart=10 +cpu=1 found=0 invalid=0 insert=0 insert_failed=0 drop=0 early_drop=0 error=0 search_restart=0 +cpu=2 found=0 invalid=0 insert=0 insert_failed=0 drop=0 early_drop=0 error=0 search_restart=1 +cpu=3 found=0 invalid=0 insert=0 insert_failed=0 drop=0 early_drop=0 error=0 search_restart=0 +``` + +大多数计数器将为 0。“Found” 和 “insert” 数将始终为 0,它们只是为了后向兼容。其他错误计数包括: + + * invalid:报文既不匹配已有连接跟踪项,也未创建新连接。 + * insert_failed:报文新建了一个连接,但插入状态表时失败。这在 NAT 引擎在伪装时恰好选择了重复的源地址和端口时可能出现。 + * drop:报文新建了一个连接,但是没有可用的内存为其分配新的状态条目。 + * early_drop:conntrack 表已满。为了接受新的连接,已有的未看到双向报文的连接被丢弃。 + * error:icmp(v6) 收到与已知连接不匹配的 icmp 错误数据包。 + * search_restart:查找过程由于另一个 CPU 的插入或删除操作而中断。 + * clash_resolve:多个 CPU 试图插入相同的 conntrack 条目。 + +除非经常发生,这些错误条件通常无害。一些错误可以通过针对预期工作负载调整 conntrack 系统的参数来降低其发生概率,典型的配置包括 _net.netfilter.nf_conntrack_buckets_ 和 _net.netfilter.nf_conntrack_max_ 参数。可在 [nf_conntrack-sysctl 文档][5] 中查阅相应配置参数的完整列表。 + +当报文状态是 invalid 时,请使用 “_sudo sysctl net.netfilter.nf_conntrack_log_invalid=255_” 来获取更多信息。例如,当 conntrack 遇到一个所有 TCP 标志位均为 0 的报文时,将记录以下内容: + +``` +nf_ct_proto_6: invalid tcp flag combination SRC=10.0.2.1 DST=10.0.96.7 LEN=1040 TOS=0x00 PREC=0x00 TTL=255 ID=0 PROTO=TCP SPT=5723 DPT=443 SEQ=1 ACK=0 +``` + +### 总结 + +本文介绍了如何检查连接跟踪表和存储在跟踪流中的 NAT 信息。本系列的下一部分将延伸讨论 conntrack 工具和连接跟踪事件框架。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/network-address-translation-part-2-the-conntrack-tool/ + +作者:[Florian Westphal][a] +选题:[lujun9972][b] +译者:[cooljelly](https://github.com/cooljelly) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/strlen/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2021/02/network-address-translation-part-2-816x345.jpg +[2]: https://fedoramagazine.org/network-address-translation-part-1-packet-tracing/ +[3]: https://en.wikipedia.org/wiki/Transmission_Control_Protocol#TCP_segment_structure +[4]: https://wiki.nftables.org/wiki-nftables/index.php/Performing_Network_Address_Translation_(NAT)#Masquerading +[5]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking/nf_conntrack-sysctl.rst From 1cff1ef1070d03f958a77e75bef6fe1afc14de1b Mon Sep 17 00:00:00 2001 From: tt67wq Date: Tue, 13 Apr 2021 16:59:34 +0800 Subject: [PATCH 697/818] translating by tt67wq --- ...07 Use systemd timers instead of cronjobs.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/sources/tech/20200707 Use systemd timers instead of cronjobs.md b/sources/tech/20200707 Use systemd timers instead of cronjobs.md index b09dc86034..b83d015d4c 100644 --- a/sources/tech/20200707 Use systemd timers instead of cronjobs.md +++ b/sources/tech/20200707 Use systemd timers instead of cronjobs.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (tt67wq) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -7,20 +7,21 @@ [#]: via: (https://opensource.com/article/20/7/systemd-timers) [#]: author: (David Both https://opensource.com/users/dboth) -Use systemd timers instead of cronjobs +使用systemd定时器代替cronjobs ====== Timers provide finer-grained control of events than cronjobs. +定时器提供了比cronjob更为细粒度的事件控制。 ![Team checklist][1] -I am in the process of converting my [cron][2] jobs to systemd timers. I have used timers for a few years, but usually, I learned just enough to perform the task I was working on. While doing research for this [systemd series][3], I learned that systemd timers have some very interesting capabilities. +我正在致力于将我的[cron][2]jobs迁移到systemd定时器上。我已经使用定时器多年了,通常来说,我的学识足以支撑我当前的工作。在我研究[systemd series][3]的过程中,我发现systemd定时器有一些非常有意思的能力。 -Like cron jobs, systemd timers can trigger events—shell scripts and programs—at specified time intervals, such as once a day, on a specific day of the month (perhaps only if it is a Monday), or every 15 minutes during business hours from 8am to 6pm. Timers can also do some things that cron jobs cannot. For example, a timer can trigger a script or program to run a specific amount of time after an event such as boot, startup, completion of a previous task, or even the previous completion of the service unit called by the timer. +与cronjobs类似,systemd定时器可以在特定的时间间隔触发事件--shell脚本和程序,例如每天一次,在一个月中的特定某一天(或许只有在周一生效),或在从上午8点到下午6点的工作时间内每隔15分钟一次。定时器也可以做到cronjob无法做到的一些事情。举个例子,一个定时器可以在特定事件发生后的一段时间后触发一段脚本或者程序去执行,例如开机,启动,上个任务完成,甚至于定时器调用的上个服务单元的完成。 -### System maintenance timers +### 系统维护的计时器 -When Fedora or any systemd-based distribution is installed on a new system, it creates several timers that are part of the system maintenance procedures that happen in the background of any Linux host. These timers trigger events necessary for common maintenance tasks, such as updating system databases, cleaning temporary directories, rotating log files, and more. +当在一个新系统上安装Fedora或者是任意一个基于systemd的发行版时,它会在Linux宿主机的后台中创建多个定时器作为系统维护过程的一部分。这些定时器会触发事件来执行必要的日常维护任务,比如更新系统数据库,清理临时目录,轮转日志文件,和更多其他事件。 -As an example, I'll look at some of the timers on my primary workstation by using the `systemctl status *timer` command to list all the timers on my host. The asterisk symbol works the same as it does for file globbing, so this command lists all systemd timer units: +作为例子,我会查看一些我的主要工作站上的定时器,通过执行`systemctl status *timer`命令来展示所有主机上的定时器。星号的作用于文件遍历相同,所以这个命令会列出所有的systemd定时器单元。 ``` @@ -520,7 +521,7 @@ via: https://opensource.com/article/20/7/systemd-timers 作者:[David Both][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[tt67wq](https://github.com/tt67wq) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 98efdac79c115fbc09c87c943e3bb4e0327c4d74 Mon Sep 17 00:00:00 2001 From: tt67wq Date: Fri, 16 Apr 2021 15:35:51 +0800 Subject: [PATCH 698/818] translate done: 20200707 Use systemd timers instead of cronjobs.md --- ... Use systemd timers instead of cronjobs.md | 552 ----------------- ... Use systemd timers instead of cronjobs.md | 558 ++++++++++++++++++ 2 files changed, 558 insertions(+), 552 deletions(-) delete mode 100644 sources/tech/20200707 Use systemd timers instead of cronjobs.md create mode 100644 translated/tech/20200707 Use systemd timers instead of cronjobs.md diff --git a/sources/tech/20200707 Use systemd timers instead of cronjobs.md b/sources/tech/20200707 Use systemd timers instead of cronjobs.md deleted file mode 100644 index b83d015d4c..0000000000 --- a/sources/tech/20200707 Use systemd timers instead of cronjobs.md +++ /dev/null @@ -1,552 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (tt67wq) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Use systemd timers instead of cronjobs) -[#]: via: (https://opensource.com/article/20/7/systemd-timers) -[#]: author: (David Both https://opensource.com/users/dboth) - -使用systemd定时器代替cronjobs -====== -Timers provide finer-grained control of events than cronjobs. -定时器提供了比cronjob更为细粒度的事件控制。 -![Team checklist][1] - -我正在致力于将我的[cron][2]jobs迁移到systemd定时器上。我已经使用定时器多年了,通常来说,我的学识足以支撑我当前的工作。在我研究[systemd series][3]的过程中,我发现systemd定时器有一些非常有意思的能力。 - -与cronjobs类似,systemd定时器可以在特定的时间间隔触发事件--shell脚本和程序,例如每天一次,在一个月中的特定某一天(或许只有在周一生效),或在从上午8点到下午6点的工作时间内每隔15分钟一次。定时器也可以做到cronjob无法做到的一些事情。举个例子,一个定时器可以在特定事件发生后的一段时间后触发一段脚本或者程序去执行,例如开机,启动,上个任务完成,甚至于定时器调用的上个服务单元的完成。 - -### 系统维护的计时器 - -当在一个新系统上安装Fedora或者是任意一个基于systemd的发行版时,它会在Linux宿主机的后台中创建多个定时器作为系统维护过程的一部分。这些定时器会触发事件来执行必要的日常维护任务,比如更新系统数据库,清理临时目录,轮转日志文件,和更多其他事件。 - -作为例子,我会查看一些我的主要工作站上的定时器,通过执行`systemctl status *timer`命令来展示所有主机上的定时器。星号的作用于文件遍历相同,所以这个命令会列出所有的systemd定时器单元。 - - -``` -[root@testvm1 ~]# systemctl status *timer -● mlocate-updatedb.timer - Updates mlocate database every day -     Loaded: loaded (/usr/lib/systemd/system/mlocate-updatedb.timer; enabled; vendor preset: enabled) -     Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago -    Trigger: Fri 2020-06-05 00:00:00 EDT; 15h left -   Triggers: ● mlocate-updatedb.service - -Jun 02 08:02:33 testvm1.both.org systemd[1]: Started Updates mlocate database every day. - -● logrotate.timer - Daily rotation of log files -     Loaded: loaded (/usr/lib/systemd/system/logrotate.timer; enabled; vendor preset: enabled) -     Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago -    Trigger: Fri 2020-06-05 00:00:00 EDT; 15h left -   Triggers: ● logrotate.service -       Docs: man:logrotate(8) -             man:logrotate.conf(5) - -Jun 02 08:02:33 testvm1.both.org systemd[1]: Started Daily rotation of log files. - -● sysstat-summary.timer - Generate summary of yesterday's process accounting -     Loaded: loaded (/usr/lib/systemd/system/sysstat-summary.timer; enabled; vendor preset: enabled) -     Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago -    Trigger: Fri 2020-06-05 00:07:00 EDT; 15h left -   Triggers: ● sysstat-summary.service - -Jun 02 08:02:33 testvm1.both.org systemd[1]: Started Generate summary of yesterday's process accounting. - -● fstrim.timer - Discard unused blocks once a week -     Loaded: loaded (/usr/lib/systemd/system/fstrim.timer; enabled; vendor preset: enabled) -     Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago -    Trigger: Mon 2020-06-08 00:00:00 EDT; 3 days left -   Triggers: ● fstrim.service -       Docs: man:fstrim - -Jun 02 08:02:33 testvm1.both.org systemd[1]: Started Discard unused blocks once a week. - -● sysstat-collect.timer - Run system activity accounting tool every 10 minutes -     Loaded: loaded (/usr/lib/systemd/system/sysstat-collect.timer; enabled; vendor preset: enabled) -     Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago -    Trigger: Thu 2020-06-04 08:50:00 EDT; 41s left -   Triggers: ● sysstat-collect.service - -Jun 02 08:02:33 testvm1.both.org systemd[1]: Started Run system activity accounting tool every 10 minutes. - -● dnf-makecache.timer - dnf makecache --timer -     Loaded: loaded (/usr/lib/systemd/system/dnf-makecache.timer; enabled; vendor preset: enabled) -     Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago -    Trigger: Thu 2020-06-04 08:51:00 EDT; 1min 41s left -   Triggers: ● dnf-makecache.service - -Jun 02 08:02:33 testvm1.both.org systemd[1]: Started dnf makecache –timer. - -● systemd-tmpfiles-clean.timer - Daily Cleanup of Temporary Directories -     Loaded: loaded (/usr/lib/systemd/system/systemd-tmpfiles-clean.timer; static; vendor preset: disabled) -     Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago -    Trigger: Fri 2020-06-05 08:19:00 EDT; 23h left -   Triggers: ● systemd-tmpfiles-clean.service -       Docs: man:tmpfiles.d(5) -             man:systemd-tmpfiles(8) - -Jun 02 08:02:33 testvm1.both.org systemd[1]: Started Daily Cleanup of Temporary Directories. -``` - -Each timer has at least six lines of information associated with it: - - * The first line has the timer's file name and a short description of its purpose. - * The second line displays the timer's status, whether it is loaded, the full path to the timer unit file, and the vendor preset. - * The third line indicates its active status, which includes the date and time the timer became active. - * The fourth line contains the date and time the timer will be triggered next and an approximate time until the trigger occurs. - * The fifth line shows the name of the event or the service that is triggered by the timer. - * Some (but not all) systemd unit files have pointers to the relevant documentation. Three of the timers in my virtual machine's output have pointers to documentation. This is a nice (but optional) bit of data. - * The final line is the journal entry for the most recent instance of the service triggered by the timer. - - - -Depending upon your host, you will probably have a different set of timers. - -### Create a timer - -Although we can deconstruct one or more of the existing timers to learn how they work, let’s create our own [service unit][4] and a timer unit to trigger it. We will use a fairly trivial example in order to keep this simple. After we have finished this, it will be easier to understand how the other timers work and to determine what they are doing. - -First, create a simple service that will run something basic, such as the `free` command. For example, you may want to monitor free memory at regular intervals. Create the following `myMonitor.service` unit file in the `/etc/systemd/system` directory. It does not need to be executable: - - -``` -# This service unit is for testing timer units -# By David Both -# Licensed under GPL V2 -# - -[Unit] -Description=Logs system statistics to the systemd journal -Wants=myMonitor.timer - -[Service] -Type=oneshot -ExecStart=/usr/bin/free - -[Install] -WantedBy=multi-user.target -``` - -This is about the simplest service unit you can create. Now let’s look at the status and test our service unit to ensure that it works as we expect it to. - - -``` -[root@testvm1 system]# systemctl status myMonitor.service -● myMonitor.service - Logs system statistics to the systemd journal -     Loaded: loaded (/etc/systemd/system/myMonitor.service; disabled; vendor preset: disabled) -     Active: inactive (dead) -[root@testvm1 system]# systemctl start myMonitor.service -[root@testvm1 system]# -``` - -Where is the output? By default, the standard output (`STDOUT`) from programs run by systemd service units is sent to the systemd journal, which leaves a record you can view now or later—up to a point. (I will look at systemd journaling and retention strategies in a future article in this series.) Look at the journal specifically for your service unit and for today only. The `-S` option, which is the short version of `--since`, allows you to specify the time period that the `journalctl` tool should search for entries. This isn't because you don't care about previous results—in this case, there won't be any—it is to shorten the search time if your host has been running for a long time and has accumulated a large number of entries in the journal: - - -``` -[root@testvm1 system]# journalctl -S today -u myMonitor.service -\-- Logs begin at Mon 2020-06-08 07:47:20 EDT, end at Thu 2020-06-11 09:40:47 EDT. -- -Jun 11 09:12:09 testvm1.both.org systemd[1]: Starting Logs system statistics to the systemd journal... -Jun 11 09:12:09 testvm1.both.org free[377966]:               total        used        free      shared  buff/cache   available -Jun 11 09:12:09 testvm1.both.org free[377966]: Mem:       12635740      522868    11032860        8016     1080012    11821508 -Jun 11 09:12:09 testvm1.both.org free[377966]: Swap:       8388604           0     8388604 -Jun 11 09:12:09 testvm1.both.org systemd[1]: myMonitor.service: Succeeded. -[root@testvm1 system]# -``` - -A task triggered by a service can be a single program, a series of programs, or a script written in any scripting language. Add another task to the service by adding the following line to the end of the `[Service]` section of the `myMonitor.service` unit file: - - -``` -`ExecStart=/usr/bin/lsblk` -``` - -Start the service again and check the journal for the results, which should look like this. You should see the results from both commands in the journal: - - -``` -Jun 11 15:42:18 testvm1.both.org systemd[1]: Starting Logs system statistics to the systemd journal... -Jun 11 15:42:18 testvm1.both.org free[379961]:               total        used        free      shared  buff/cache   available -Jun 11 15:42:18 testvm1.both.org free[379961]: Mem:       12635740      531788    11019540        8024     1084412    11812272 -Jun 11 15:42:18 testvm1.both.org free[379961]: Swap:       8388604           0     8388604 -Jun 11 15:42:18 testvm1.both.org lsblk[379962]: NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT -Jun 11 15:42:18 testvm1.both.org lsblk[379962]: sda             8:0    0  120G  0 disk -Jun 11 15:42:18 testvm1.both.org lsblk[379962]: ├─sda1          8:1    0    4G  0 part /boot -Jun 11 15:42:18 testvm1.both.org lsblk[379962]: └─sda2          8:2    0  116G  0 part -Jun 11 15:42:18 testvm1.both.org lsblk[379962]:   ├─VG01-root 253:0    0    5G  0 lvm  / -Jun 11 15:42:18 testvm1.both.org lsblk[379962]:   ├─VG01-swap 253:1    0    8G  0 lvm  [SWAP] -Jun 11 15:42:18 testvm1.both.org lsblk[379962]:   ├─VG01-usr  253:2    0   30G  0 lvm  /usr -Jun 11 15:42:18 testvm1.both.org lsblk[379962]:   ├─VG01-tmp  253:3    0   10G  0 lvm  /tmp -Jun 11 15:42:18 testvm1.both.org lsblk[379962]:   ├─VG01-var  253:4    0   20G  0 lvm  /var -Jun 11 15:42:18 testvm1.both.org lsblk[379962]:   └─VG01-home 253:5    0   10G  0 lvm  /home -Jun 11 15:42:18 testvm1.both.org lsblk[379962]: sr0            11:0    1 1024M  0 rom -Jun 11 15:42:18 testvm1.both.org systemd[1]: myMonitor.service: Succeeded. -Jun 11 15:42:18 testvm1.both.org systemd[1]: Finished Logs system statistics to the systemd journal. -``` - -Now that you know your service works as expected, create the timer unit file, `myMonitor.timer` in `/etc/systemd/system`, and add the following: - - -``` -# This timer unit is for testing -# By David Both -# Licensed under GPL V2 -# - -[Unit] -Description=Logs some system statistics to the systemd journal -Requires=myMonitor.service - -[Timer] -Unit=myMonitor.service -OnCalendar=*-*-* *:*:00 - -[Install] -WantedBy=timers.target -``` - -The `OnCalendar` time specification in the `myMonitor.timer file`, `*-*-* *:*:00`, should trigger the timer to execute the `myMonitor.service` unit every minute. I will explore `OnCalendar` settings a bit later in this article. - -For now, observe any journal entries pertaining to running your service when it is triggered by the timer. You could also follow the timer, but following the service allows you to see the results in near real time. Run `journalctl` with the `-f` (follow) option: - - -``` -[root@testvm1 system]# journalctl -S today -f -u myMonitor.service -\-- Logs begin at Mon 2020-06-08 07:47:20 EDT. -- -``` - -Start but do not enable the timer, and see what happens after it runs for a while: - - -``` -[root@testvm1 ~]# systemctl start myMonitor.service -[root@testvm1 ~]# -``` - -One result shows up right away, and the next ones come at—sort of—one-minute intervals. Watch the journal for a few minutes and see if you notice the same things I did: - - -``` -[root@testvm1 system]# journalctl -S today -f -u myMonitor.service -\-- Logs begin at Mon 2020-06-08 07:47:20 EDT. -- -Jun 13 08:39:18 testvm1.both.org systemd[1]: Starting Logs system statistics to the systemd journal... -Jun 13 08:39:18 testvm1.both.org systemd[1]: myMonitor.service: Succeeded. -Jun 13 08:39:19 testvm1.both.org free[630566]:               total        used        free      shared  buff/cache   available -Jun 13 08:39:19 testvm1.both.org free[630566]: Mem:       12635740      556604    10965516        8036     1113620    11785628 -Jun 13 08:39:19 testvm1.both.org free[630566]: Swap:       8388604           0     8388604 -Jun 13 08:39:18 testvm1.both.org systemd[1]: Finished Logs system statistics to the systemd journal. -Jun 13 08:39:19 testvm1.both.org lsblk[630567]: NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT -Jun 13 08:39:19 testvm1.both.org lsblk[630567]: sda             8:0    0  120G  0 disk -Jun 13 08:39:19 testvm1.both.org lsblk[630567]: ├─sda1          8:1    0    4G  0 part /boot -Jun 13 08:39:19 testvm1.both.org lsblk[630567]: └─sda2          8:2    0  116G  0 part -Jun 13 08:39:19 testvm1.both.org lsblk[630567]:   ├─VG01-root 253:0    0    5G  0 lvm  / -Jun 13 08:39:19 testvm1.both.org lsblk[630567]:   ├─VG01-swap 253:1    0    8G  0 lvm  [SWAP] -Jun 13 08:39:19 testvm1.both.org lsblk[630567]:   ├─VG01-usr  253:2    0   30G  0 lvm  /usr -Jun 13 08:39:19 testvm1.both.org lsblk[630567]:   ├─VG01-tmp  253:3    0   10G  0 lvm  /tmp -Jun 13 08:39:19 testvm1.both.org lsblk[630567]:   ├─VG01-var  253:4    0   20G  0 lvm  /var -Jun 13 08:39:19 testvm1.both.org lsblk[630567]:   └─VG01-home 253:5    0   10G  0 lvm  /home -Jun 13 08:39:19 testvm1.both.org lsblk[630567]: sr0            11:0    1 1024M  0 rom -Jun 13 08:40:46 testvm1.both.org systemd[1]: Starting Logs system statistics to the systemd journal... -Jun 13 08:40:46 testvm1.both.org free[630572]:               total        used        free      shared  buff/cache   available -Jun 13 08:40:46 testvm1.both.org free[630572]: Mem:       12635740      555228    10966836        8036     1113676    11786996 -Jun 13 08:40:46 testvm1.both.org free[630572]: Swap:       8388604           0     8388604 -Jun 13 08:40:46 testvm1.both.org lsblk[630574]: NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT -Jun 13 08:40:46 testvm1.both.org lsblk[630574]: sda             8:0    0  120G  0 disk -Jun 13 08:40:46 testvm1.both.org lsblk[630574]: ├─sda1          8:1    0    4G  0 part /boot -Jun 13 08:40:46 testvm1.both.org lsblk[630574]: └─sda2          8:2    0  116G  0 part -Jun 13 08:40:46 testvm1.both.org lsblk[630574]:   ├─VG01-root 253:0    0    5G  0 lvm  / -Jun 13 08:40:46 testvm1.both.org lsblk[630574]:   ├─VG01-swap 253:1    0    8G  0 lvm  [SWAP] -Jun 13 08:40:46 testvm1.both.org lsblk[630574]:   ├─VG01-usr  253:2    0   30G  0 lvm  /usr -Jun 13 08:40:46 testvm1.both.org lsblk[630574]:   ├─VG01-tmp  253:3    0   10G  0 lvm  /tmp -Jun 13 08:40:46 testvm1.both.org lsblk[630574]:   ├─VG01-var  253:4    0   20G  0 lvm  /var -Jun 13 08:40:46 testvm1.both.org lsblk[630574]:   └─VG01-home 253:5    0   10G  0 lvm  /home -Jun 13 08:40:46 testvm1.both.org lsblk[630574]: sr0            11:0    1 1024M  0 rom -Jun 13 08:40:46 testvm1.both.org systemd[1]: myMonitor.service: Succeeded. -Jun 13 08:40:46 testvm1.both.org systemd[1]: Finished Logs system statistics to the systemd journal. -Jun 13 08:41:46 testvm1.both.org systemd[1]: Starting Logs system statistics to the systemd journal... -Jun 13 08:41:46 testvm1.both.org free[630580]:               total        used        free      shared  buff/cache   available -Jun 13 08:41:46 testvm1.both.org free[630580]: Mem:       12635740      553488    10968564        8036     1113688    11788744 -Jun 13 08:41:46 testvm1.both.org free[630580]: Swap:       8388604           0     8388604 -Jun 13 08:41:47 testvm1.both.org lsblk[630581]: NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT -Jun 13 08:41:47 testvm1.both.org lsblk[630581]: sda             8:0    0  120G  0 disk -Jun 13 08:41:47 testvm1.both.org lsblk[630581]: ├─sda1          8:1    0    4G  0 part /boot -Jun 13 08:41:47 testvm1.both.org lsblk[630581]: └─sda2          8:2    0  116G  0 part -Jun 13 08:41:47 testvm1.both.org lsblk[630581]:   ├─VG01-root 253:0    0    5G  0 lvm  / -Jun 13 08:41:47 testvm1.both.org lsblk[630581]:   ├─VG01-swap 253:1    0    8G  0 lvm  [SWAP] -Jun 13 08:41:47 testvm1.both.org lsblk[630581]:   ├─VG01-usr  253:2    0   30G  0 lvm  /usr -Jun 13 08:41:47 testvm1.both.org lsblk[630581]:   ├─VG01-tmp  253:3    0   10G  0 lvm  /tmp -Jun 13 08:41:47 testvm1.both.org lsblk[630581]:   ├─VG01-var  253:4    0   20G  0 lvm  /var -Jun 13 08:41:47 testvm1.both.org lsblk[630581]:   └─VG01-home 253:5    0   10G  0 lvm  /home -Jun 13 08:41:47 testvm1.both.org lsblk[630581]: sr0            11:0    1 1024M  0 rom -Jun 13 08:41:47 testvm1.both.org systemd[1]: myMonitor.service: Succeeded. -Jun 13 08:41:47 testvm1.both.org systemd[1]: Finished Logs system statistics to the systemd journal. -``` - -Be sure to check the status of both the timer and the service. - -You probably noticed at least two things in the journal. First, you do not need to do anything special to cause the `STDOUT` from the `ExecStart` triggers in the `myMonitor.service` unit to be stored in the journal. That is all part of using systemd for running services. However, it does mean that you might need to be careful about running scripts from a service unit and how much `STDOUT` they generate. - -The second thing is that the timer does not trigger exactly on the minute at :00 seconds or even exactly one minute from the previous instance. This is intentional, but it can be overridden if necessary (or if it just offends your sysadmin sensibilities). - -The reason for this behavior is to prevent multiple services from triggering at exactly the same time. For example, you can use time specifications such as Weekly, Daily, and more. These shortcuts are all defined to trigger at 00:00:00 hours on the day they are triggered. When multiple timers are specified this way, there is a strong likelihood that they would attempt to start simultaneously. - -systemd timers are intentionally designed to trigger somewhat randomly around the specified time to try to prevent simultaneous triggers. They trigger semi-randomly within a time window that starts at the specified trigger time and ends at the specified time plus one minute. This trigger time is maintained at a stable position with respect to all other defined timer units, according to the `systemd.timer` man page. You can see in the journal entries above that the timer triggered immediately when it started and then about 46 or 47 seconds after each minute. - -Most of the time, such probabilistic trigger times are fine. When scheduling tasks such as backups to run, so long as they run during off-hours, there will be no problems. A sysadmin can select a deterministic start time, such as 01:05:00 in a typical cron job specification, to not conflict with other tasks, but there is a large range of time values that will accomplish that. A one-minute bit of randomness in a start time is usually irrelevant. - -However, for some tasks, exact trigger times are an absolute requirement. For those, you can specify greater trigger time-span accuracy (to within a microsecond) by adding a statement like this to the `Timer` section of the timer unit file: - - -``` -`AccuracySec=1us` -``` - -Time spans can be used to specify the desired accuracy as well as to define time spans for repeating or one-time events. It recognizes the following units: - - * usec, us, µs - * msec, ms - * seconds, second, sec, s - * minutes, minute, min, m - * hours, hour, hr, h - * days, day, d - * weeks, week, w - * months, month, M (defined as 30.44 days) - * years, year, y (defined as 365.25 days) - - - -All the default timers in `/usr/lib/systemd/system` specify a much larger range for accuracy because exact times are not critical. Look at some of the specifications in the system-created timers: - - -``` -[root@testvm1 system]# grep Accur /usr/lib/systemd/system/*timer -/usr/lib/systemd/system/fstrim.timer:AccuracySec=1h -/usr/lib/systemd/system/logrotate.timer:AccuracySec=1h -/usr/lib/systemd/system/logwatch.timer:AccuracySec=12h -/usr/lib/systemd/system/mlocate-updatedb.timer:AccuracySec=24h -/usr/lib/systemd/system/raid-check.timer:AccuracySec=24h -/usr/lib/systemd/system/unbound-anchor.timer:AccuracySec=24h -[root@testvm1 system]# -``` - -View the complete contents of some of the timer unit files in the `/usr/lib/systemd/system` directory to see how they are constructed. - -You do not have to enable the timer in this experiment to activate it at boot time, but the command to do so would be: - - -``` -`[root@testvm1 system]# systemctl enable myMonitor.timer` -``` - -The unit files you created do not need to be executable. You also did not enable the service unit because it is triggered by the timer. You can still trigger the service unit manually from the command line, should you want to. Try that and observe the journal. - -See the man pages for `systemd.timer` and `systemd.time` for more information about timer accuracy, event-time specifications, and trigger events. - -### Timer types - -systemd timers have other capabilities that are not found in cron, which triggers only on specific, repetitive, real-time dates and times. systemd timers can be configured to trigger based on status changes in other systemd units. For example, a timer might be configured to trigger a specific elapsed time after system boot, after startup, or after a defined service unit activates. These are called monotonic timers. Monotonic refers to a count or sequence that continually increases. These timers are not persistent because they reset after each boot. - -Table 1 lists the monotonic timers along with a short definition of each, as well as the `OnCalendar` timer, which is not monotonic and is used to specify future times that may or may not be repetitive. This information is derived from the `systemd.timer` man page with a few minor changes. - -Timer | Monotonic | Definition ----|---|--- -`OnActiveSec=` | X | This defines a timer relative to the moment the timer is activated. -`OnBootSec=` | X | This defines a timer relative to when the machine boots up. -`OnStartupSec=` | X | This defines a timer relative to when the service manager first starts. For system timer units, this is very similar to `OnBootSec=`, as the system service manager generally starts very early at boot. It's primarily useful when configured in units running in the per-user service manager, as the user service manager generally starts on first login only, not during boot. -`OnUnitActiveSec=` | X | This defines a timer relative to when the timer that is to be activated was last activated. -`OnUnitInactiveSec=` | X | This defines a timer relative to when the timer that is to be activated was last deactivated. -`OnCalendar=` | | This defines real-time (i.e., wall clock) timers with calendar event expressions. See `systemd.time(7)` for more information on the syntax of calendar event expressions. Otherwise, the semantics are similar to `OnActiveSec=` and related settings. This timer is the one most like those used with the cron service. - -_Table 1: systemd timer definitions_ - -The monotonic timers can use the same shortcut names for their time spans as the `AccuracySec` statement mentioned before, but systemd normalizes those names to seconds. For example, you might want to specify a timer that triggers an event one time, five days after the system boots; that might look like: `OnBootSec=5d`. If the host booted at `2020-06-15 09:45:27`, the timer would trigger at `2020-06-20 09:45:27` or within one minute after. - -### Calendar event specifications - -Calendar event specifications are a key part of triggering timers at desired repetitive times. Start by looking at some specifications used with the `OnCalendar` setting. - -systemd and its timers use a different style for time and date specifications than the format used in crontab. It is more flexible than crontab and allows fuzzy dates and times in the manner of the `at` command. It should also be familiar enough that it will be easy to understand. - -The basic format for systemd timers using `OnCalendar=` is `DOW YYYY-MM-DD HH:MM:SS`. DOW (day of week) is optional, and other fields can use an asterisk (*) to match any value for that position. All calendar time forms are converted to a normalized form. If the time is not specified, it is assumed to be 00:00:00. If the date is not specified but the time is, the next match might be today or tomorrow, depending upon the current time. Names or numbers can be used for the month and day of the week. Comma-separated lists of each unit can be specified. Unit ranges can be specified with `..` between the beginning and ending values. - -There are a couple interesting options for specifying dates. The Tilde (~) can be used to specify the last day of the month or a specified number of days prior to the last day of the month. The “/” can be used to specify a day of the week as a modifier. - -Here are some examples of some typical time specifications used in `OnCalendar` statements. - -Calendar event specification | Description ----|--- -DOW YYYY-MM-DD HH:MM:SS | -*-*-* 00:15:30 | Every day of every month of every year at 15 minutes and 30 seconds after midnight -Weekly | Every Monday at 00:00:00 -Mon *-*-* 00:00:00 | Same as weekly -Mon | Same as weekly -Wed 2020-*-* | Every Wednesday in 2020 at 00:00:00 -Mon..Fri 2021-*-* | Every weekday in 2021 at 00:00:00 -2022-6,7,8-1,15 01:15:00 | The 1st and 15th of June, July, and August of 2022 at 01:15:00am -Mon *-05~03 | The next occurrence of a Monday in May of any year which is also the 3rd day from the end of the month. -Mon..Fri *-08~04 | The 4th day preceding the end of August for any years in which it also falls on a weekday. -*-05~03/2 | The 3rd day from the end of the month of May and then again two days later. Repeats every year. Note that this expression uses the Tilde (~). -*-05-03/2 | The third day of the month of may and then every 2nd day for the rest of May. Repeats every year. Note that this expression uses the dash (-). - -_Table 2: Sample `OnCalendar` event specifications_ - -### Test calendar specifications - -systemd provides an excellent tool for validating and examining calendar time event specifications in a timer. The `systemd-analyze calendar` tool parses a calendar time event specification and provides the normalized form as well as other interesting information such as the date and time of the next "elapse," i.e., match, and the approximate amount of time before the trigger time is reached. - -First, look at a date in the future without a time (note that the times for `Next elapse` and `UTC` will differ based on your local time zone): - - -``` -[student@studentvm1 ~]$ systemd-analyze calendar 2030-06-17 -  Original form: 2030-06-17                 -Normalized form: 2030-06-17 00:00:00         -    Next elapse: Mon 2030-06-17 00:00:00 EDT -       (in UTC): Mon 2030-06-17 04:00:00 UTC -       From now: 10 years 0 months left     -[root@testvm1 system]# -``` - -Now add a time. In this example, the date and time are analyzed separately as non-related entities: - - -``` -[root@testvm1 system]# systemd-analyze calendar 2030-06-17 15:21:16 -  Original form: 2030-06-17                 -Normalized form: 2030-06-17 00:00:00         -    Next elapse: Mon 2030-06-17 00:00:00 EDT -       (in UTC): Mon 2030-06-17 04:00:00 UTC -       From now: 10 years 0 months left     - -  Original form: 15:21:16                   -Normalized form: *-*-* 15:21:16             -    Next elapse: Mon 2020-06-15 15:21:16 EDT -       (in UTC): Mon 2020-06-15 19:21:16 UTC -       From now: 3h 55min left               -[root@testvm1 system]# -``` - -To analyze the date and time as a single unit, enclose them together in quotes. Be sure to remove the quotes when using them in the `OnCalendar=` event specification in a timer unit or you will get errors: - - -``` -[root@testvm1 system]# systemd-analyze calendar "2030-06-17 15:21:16" -Normalized form: 2030-06-17 15:21:16         -    Next elapse: Mon 2030-06-17 15:21:16 EDT -       (in UTC): Mon 2030-06-17 19:21:16 UTC -       From now: 10 years 0 months left     -[root@testvm1 system]# -``` - -Now test the entries in Table 2. I like the last one, especially: - - -``` -[root@testvm1 system]# systemd-analyze calendar "2022-6,7,8-1,15 01:15:00" -  Original form: 2022-6,7,8-1,15 01:15:00 -Normalized form: 2022-06,07,08-01,15 01:15:00 -    Next elapse: Wed 2022-06-01 01:15:00 EDT -       (in UTC): Wed 2022-06-01 05:15:00 UTC -       From now: 1 years 11 months left -[root@testvm1 system]# -``` - -Let’s look at one example in which we list the next five elapses for the timestamp expression. - - -``` -[root@testvm1 ~]# systemd-analyze calendar --iterations=5 "Mon *-05~3" -  Original form: Mon *-05~3                 -Normalized form: Mon *-05~03 00:00:00       -    Next elapse: Mon 2023-05-29 00:00:00 EDT -       (in UTC): Mon 2023-05-29 04:00:00 UTC -       From now: 2 years 11 months left     -       Iter. #2: Mon 2028-05-29 00:00:00 EDT -       (in UTC): Mon 2028-05-29 04:00:00 UTC -       From now: 7 years 11 months left     -       Iter. #3: Mon 2034-05-29 00:00:00 EDT -       (in UTC): Mon 2034-05-29 04:00:00 UTC -       From now: 13 years 11 months left     -       Iter. #4: Mon 2045-05-29 00:00:00 EDT -       (in UTC): Mon 2045-05-29 04:00:00 UTC -       From now: 24 years 11 months left     -       Iter. #5: Mon 2051-05-29 00:00:00 EDT -       (in UTC): Mon 2051-05-29 04:00:00 UTC -       From now: 30 years 11 months left     -[root@testvm1 ~]# -``` - -This should give you enough information to start testing your `OnCalendar` time specifications. The `systemd-analyze` tool can be used for other interesting analyses, which I will begin to explore in the next article in this series. - -### Summary - -systemd timers can be used to perform the same kinds of tasks as the cron tool but offer more flexibility in terms of the calendar and monotonic time specifications for triggering events. - -Even though the service unit you created for this experiment is usually triggered by the timer, you can also use the `systemctl start myMonitor.service` command to trigger it at any time. Multiple maintenance tasks can be scripted in a single timer; these can be Bash scripts or Linux utility programs. You can run the service triggered by the timer to run all the scripts, or you can run individual scripts as needed. - -I will explore systemd's use of time and time specifications in much more detail in the next article. - -I have not yet seen any indication that `cron` and `at` will be deprecated. I hope that does not happen because `at`, at least, is much easier to use for one-off task scheduling than systemd timers. - -### Resources - -There is a great deal of information about systemd available on the internet, but much is terse, obtuse, or even misleading. In addition to the resources mentioned in this article, the following webpages offer more detailed and reliable information about systemd startup. - - * The Fedora Project has a good, practical [guide to systemd][5]. It has pretty much everything you need to know in order to configure, manage, and maintain a Fedora computer using systemd. - * The Fedora Project also has a good [cheat sheet][6] that cross-references the old SystemV commands to comparable systemd ones. - * For detailed technical information about systemd and the reasons for creating it, check out [Freedesktop.org][7]'s [description of systemd][8]. - * [Linux.com][9]'s "More systemd fun" offers more advanced systemd [information and tips][10]. - - - -There is also a series of deeply technical articles for Linux sysadmins by Lennart Poettering, the designer and primary developer of systemd. These articles were written between April 2010 and September 2011, but they are just as relevant now as they were then. Much of everything else good that has been written about systemd and its ecosystem is based on these papers. - - * [Rethinking PID 1][11] - * [systemd for Administrators, Part I][12] - * [systemd for Administrators, Part II][13] - * [systemd for Administrators, Part III][14] - * [systemd for Administrators, Part IV][15] - * [systemd for Administrators, Part V][16] - * [systemd for Administrators, Part VI][17] - * [systemd for Administrators, Part VII][18] - * [systemd for Administrators, Part VIII][19] - * [systemd for Administrators, Part IX][20] - * [systemd for Administrators, Part X][21] - * [systemd for Administrators, Part XI][22] - - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/systemd-timers - -作者:[David Both][a] -选题:[lujun9972][b] -译者:[tt67wq](https://github.com/tt67wq) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/dboth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/checklist_todo_clock_time_team.png?itok=1z528Q0y (Team checklist) -[2]: https://opensource.com/article/17/11/how-use-cron-linux -[3]: https://opensource.com/users/dboth -[4]: https://opensource.com/article/20/5/manage-startup-systemd -[5]: https://docs.fedoraproject.org/en-US/quick-docs/understanding-and-administering-systemd/index.html -[6]: https://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet -[7]: http://Freedesktop.org -[8]: http://www.freedesktop.org/wiki/Software/systemd -[9]: http://Linux.com -[10]: https://www.linux.com/training-tutorials/more-systemd-fun-blame-game-and-stopping-services-prejudice/ -[11]: http://0pointer.de/blog/projects/systemd.html -[12]: http://0pointer.de/blog/projects/systemd-for-admins-1.html -[13]: http://0pointer.de/blog/projects/systemd-for-admins-2.html -[14]: http://0pointer.de/blog/projects/systemd-for-admins-3.html -[15]: http://0pointer.de/blog/projects/systemd-for-admins-4.html -[16]: http://0pointer.de/blog/projects/three-levels-of-off.html -[17]: http://0pointer.de/blog/projects/changing-roots -[18]: http://0pointer.de/blog/projects/blame-game.html -[19]: http://0pointer.de/blog/projects/the-new-configuration-files.html -[20]: http://0pointer.de/blog/projects/on-etc-sysinit.html -[21]: http://0pointer.de/blog/projects/instances.html -[22]: http://0pointer.de/blog/projects/inetd.html diff --git a/translated/tech/20200707 Use systemd timers instead of cronjobs.md b/translated/tech/20200707 Use systemd timers instead of cronjobs.md new file mode 100644 index 0000000000..3b65f723db --- /dev/null +++ b/translated/tech/20200707 Use systemd timers instead of cronjobs.md @@ -0,0 +1,558 @@ +[#]: collector: (lujun9972) +[#]: translator: (tt67wq) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Use systemd timers instead of cronjobs) +[#]: via: (https://opensource.com/article/20/7/systemd-timers) +[#]: author: (David Both https://opensource.com/users/dboth) + +使用 systemd 定时器代替 cronjobs +====== +定时器提供了比 cronjob 更为细粒度的事件控制。 +![Team checklist][1] + +我正在致力于将我的 [cron][2]jobs 迁移到 systemd 定时器上。我已经使用定时器多年了,通常来说,我的学识足以支撑我当前的工作。但在我研究 [systemd series][3] 的过程中,我发现 systemd 定时器有一些非常有意思的能力。 + +与 cronjobs 类似,systemd 定时器可以在特定的时间间隔触发事件 --shell 脚本和程序,例如每天一次或在一个月中的特定某一天(或许只有在周一生效),或在从上午 8 点到下午 6 点的工作时间内每隔 15 分钟一次。定时器也可以做到 cronjob 无法做到的一些事情。举个例子,一个定时器可以在特定事件发生后的一段时间后触发一段脚本或者程序去执行,例如开机,启动,上个任务完成,甚至于定时器调用的上个服务单元的完成的时刻。 + +### 操作系统维护的计时器 + +当在一个新系统上安装 Fedora 或者是任意一个基于 systemd 的发行版时,它会在 Linux 宿主机的后台中创建多个定时器作为系统维护过程的一部分。这些定时器会触发事件来执行必要的日常维护任务,比如更新系统数据库,清理临时目录,轮转日志文件,以及更多其他事件。 + +作为示例,我会查看一些我的主要工作站上的定时器,通过执行 `systemctl status *timer` 命令来展示所有主机上的定时器。星号的作用于文件遍历相同,所以这个命令会列出所有的 systemd 定时器单元。 + + +``` +[root@testvm1 ~]# systemctl status *timer +● mlocate-updatedb.timer - Updates mlocate database every day +     Loaded: loaded (/usr/lib/systemd/system/mlocate-updatedb.timer; enabled; vendor preset: enabled) +     Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago +    Trigger: Fri 2020-06-05 00:00:00 EDT; 15h left +   Triggers: ● mlocate-updatedb.service + +Jun 02 08:02:33 testvm1.both.org systemd[1]: Started Updates mlocate database every day. + +● logrotate.timer - Daily rotation of log files +     Loaded: loaded (/usr/lib/systemd/system/logrotate.timer; enabled; vendor preset: enabled) +     Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago +    Trigger: Fri 2020-06-05 00:00:00 EDT; 15h left +   Triggers: ● logrotate.service +       Docs: man:logrotate(8) +             man:logrotate.conf(5) + +Jun 02 08:02:33 testvm1.both.org systemd[1]: Started Daily rotation of log files. + +● sysstat-summary.timer - Generate summary of yesterday's process accounting +     Loaded: loaded (/usr/lib/systemd/system/sysstat-summary.timer; enabled; vendor preset: enabled) +     Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago +    Trigger: Fri 2020-06-05 00:07:00 EDT; 15h left +   Triggers: ● sysstat-summary.service + +Jun 02 08:02:33 testvm1.both.org systemd[1]: Started Generate summary of yesterday's process accounting. + +● fstrim.timer - Discard unused blocks once a week +     Loaded: loaded (/usr/lib/systemd/system/fstrim.timer; enabled; vendor preset: enabled) +     Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago +    Trigger: Mon 2020-06-08 00:00:00 EDT; 3 days left +   Triggers: ● fstrim.service +       Docs: man:fstrim + +Jun 02 08:02:33 testvm1.both.org systemd[1]: Started Discard unused blocks once a week. + +● sysstat-collect.timer - Run system activity accounting tool every 10 minutes +     Loaded: loaded (/usr/lib/systemd/system/sysstat-collect.timer; enabled; vendor preset: enabled) +     Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago +    Trigger: Thu 2020-06-04 08:50:00 EDT; 41s left +   Triggers: ● sysstat-collect.service + +Jun 02 08:02:33 testvm1.both.org systemd[1]: Started Run system activity accounting tool every 10 minutes. + +● dnf-makecache.timer - dnf makecache --timer +     Loaded: loaded (/usr/lib/systemd/system/dnf-makecache.timer; enabled; vendor preset: enabled) +     Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago +    Trigger: Thu 2020-06-04 08:51:00 EDT; 1min 41s left +   Triggers: ● dnf-makecache.service + +Jun 02 08:02:33 testvm1.both.org systemd[1]: Started dnf makecache –timer. + +● systemd-tmpfiles-clean.timer - Daily Cleanup of Temporary Directories +     Loaded: loaded (/usr/lib/systemd/system/systemd-tmpfiles-clean.timer; static; vendor preset: disabled) +     Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago +    Trigger: Fri 2020-06-05 08:19:00 EDT; 23h left +   Triggers: ● systemd-tmpfiles-clean.service +       Docs: man:tmpfiles.d(5) +             man:systemd-tmpfiles(8) + +Jun 02 08:02:33 testvm1.both.org systemd[1]: Started Daily Cleanup of Temporary Directories. +``` + +每个定时器至少有六行相关信息: + + * 定时器的第一行有定时器名字和定时器目的的简短介绍 + * 第二行展示了定时器的状态,是否有被加载,定时器 unit 文件的绝对路径以及预设信息。 + * 但三行指明了其活动状态,包括该定时器已激活的日期和时间。 + * 第四行包括了该定时器下次将要被触发的日期和时间和距离触发的大概时间。 + * 第五行展示了事件名称或被定时器触发的服务名称。 + * 部分(不是全部 )systemd unit 文件有相关文档的指引。我虚拟机上输出中有三个定时器有文档指引。这是一个优秀(但非必要)的信息。 + * 最后一行是计时器触发服务的最近的日志实例。 + + +你也许有一些不一样的定时器,取决于你的物理机。 + +### 创建一个定时器 + +尽管我们可以解构一个或多个现有的计时器来了解其工作原理,我们还是要创建我们自己的[服务单元 ][4] 和一个定时器去触发它。我们将举一个相当简单的例子来让这个过程保持简单。当我们完成这个实验之后,就能更容易理解其他定时器的工作原理以及发现它们正在做什么。 + +首先,创建一个运行基础东西的简单的服务,例如 `free` 命令。举个例子,你可能想定时监控空余内存。在 `/etc/systemd/system` 目录下创建如下的 `myMonitor.server` 单元文件。它不一定是可执行的: + + +``` +# This service unit is for testing timer units +# By David Both +# Licensed under GPL V2 +# + +[Unit] +Description=Logs system statistics to the systemd journal +Wants=myMonitor.timer + +[Service] +Type=oneshot +ExecStart=/usr/bin/free + +[Install] +WantedBy=multi-user.target +``` + +这大概是你能创建的最简单的服务单元了。现在我们查看一下服务状态同时测试一下服务单元确保它和我们预期一样可用。 + + +``` +[root@testvm1 system]# systemctl status myMonitor.service +● myMonitor.service - Logs system statistics to the systemd journal +     Loaded: loaded (/etc/systemd/system/myMonitor.service; disabled; vendor preset: disabled) +     Active: inactive (dead) +[root@testvm1 system]# systemctl start myMonitor.service +[root@testvm1 system]# +``` + +输出在哪里呢?默认情况下,systemd 服务单元执行程序的标准输出 (`STDOUT`) 被发送到系统日志中,它保留了记录供现在或者之后某个时间点查看。(在本系列的后续文章中,我将介绍系统日志的记录和保留策略)。查看今天的该服务单元的专属日志。`-S` 选项,即 `--since` 的缩写,允许你指定 `journalctl` 工具搜索条目的时间段。这并不代表你不关心过往结果--在这个案例中,不会有过往记录--如果你的机器以及运行了很长时间且堆积了大量的日志,它可以缩短搜索时间。 + + +``` +[root@testvm1 system]# journalctl -S today -u myMonitor.service +\-- Logs begin at Mon 2020-06-08 07:47:20 EDT, end at Thu 2020-06-11 09:40:47 EDT. -- +Jun 11 09:12:09 testvm1.both.org systemd[1]: Starting Logs system statistics to the systemd journal... +Jun 11 09:12:09 testvm1.both.org free[377966]:               total        used        free      shared  buff/cache   available +Jun 11 09:12:09 testvm1.both.org free[377966]: Mem:       12635740      522868    11032860        8016     1080012    11821508 +Jun 11 09:12:09 testvm1.both.org free[377966]: Swap:       8388604           0     8388604 +Jun 11 09:12:09 testvm1.both.org systemd[1]: myMonitor.service: Succeeded. +[root@testvm1 system]# +``` + +一个服务触发的任务可以是单个程序,一组程序或者是一个脚本语言写的脚本。通过在 `myMonitor.service` 单元文件里的 `[Service]` 块末尾中添加如下行可以为服务添加另一个任务: + + +``` +`ExecStart=/usr/bin/lsblk` +``` + +再次启动服务,查看日志检查结果,结果应该看上去像这样。你应该在日志中看到两条命令的结果输出: + + +``` +Jun 11 15:42:18 testvm1.both.org systemd[1]: Starting Logs system statistics to the systemd journal... +Jun 11 15:42:18 testvm1.both.org free[379961]:               total        used        free      shared  buff/cache   available +Jun 11 15:42:18 testvm1.both.org free[379961]: Mem:       12635740      531788    11019540        8024     1084412    11812272 +Jun 11 15:42:18 testvm1.both.org free[379961]: Swap:       8388604           0     8388604 +Jun 11 15:42:18 testvm1.both.org lsblk[379962]: NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT +Jun 11 15:42:18 testvm1.both.org lsblk[379962]: sda             8:0    0  120G  0 disk +Jun 11 15:42:18 testvm1.both.org lsblk[379962]: ├─sda1          8:1    0    4G  0 part /boot +Jun 11 15:42:18 testvm1.both.org lsblk[379962]: └─sda2          8:2    0  116G  0 part +Jun 11 15:42:18 testvm1.both.org lsblk[379962]:   ├─VG01-root 253:0    0    5G  0 lvm  / +Jun 11 15:42:18 testvm1.both.org lsblk[379962]:   ├─VG01-swap 253:1    0    8G  0 lvm  [SWAP] +Jun 11 15:42:18 testvm1.both.org lsblk[379962]:   ├─VG01-usr  253:2    0   30G  0 lvm  /usr +Jun 11 15:42:18 testvm1.both.org lsblk[379962]:   ├─VG01-tmp  253:3    0   10G  0 lvm  /tmp +Jun 11 15:42:18 testvm1.both.org lsblk[379962]:   ├─VG01-var  253:4    0   20G  0 lvm  /var +Jun 11 15:42:18 testvm1.both.org lsblk[379962]:   └─VG01-home 253:5    0   10G  0 lvm  /home +Jun 11 15:42:18 testvm1.both.org lsblk[379962]: sr0            11:0    1 1024M  0 rom +Jun 11 15:42:18 testvm1.both.org systemd[1]: myMonitor.service: Succeeded. +Jun 11 15:42:18 testvm1.both.org systemd[1]: Finished Logs system statistics to the systemd journal. +``` + +现在你知道了你的服务是可用的,在 `/etc/systemd/system` 目录下创建 `myMonitor.timer` 定时器单元文件,添加如下代码: + + +``` +# This timer unit is for testing +# By David Both +# Licensed under GPL V2 +# + +[Unit] +Description=Logs some system statistics to the systemd journal +Requires=myMonitor.service + +[Timer] +Unit=myMonitor.service +OnCalendar=*-*-* *:*:00 + +[Install] +WantedBy=timers.target +``` + +在 `myMonitor.timer` 文件中的 `OnCalendar` 时间格式,`*-*-* *:*:00`,应该会每分钟触发一次定时器去执行 `myMonitor.service` 单元。我会在文章的后面进一步探索 `OnCalendar` 设置。 + +到目前为止,在服务被计时器触发运行时观察任意与之有关的日志记录。你也可以跟踪计时器,跟踪服务可以让你接近实时的看到结果。执行 `journalctl` 时带上 `-f` 选项: + + +``` +[root@testvm1 system]# journalctl -S today -f -u myMonitor.service +\-- Logs begin at Mon 2020-06-08 07:47:20 EDT. -- +``` + +执行但是不启用该定时器,看看它运行一段时间后发生了什么: + + +``` +[root@testvm1 ~]# systemctl start myMonitor.service +[root@testvm1 ~]# +``` + +一条结果立即就显示出来了,下一条大概在一分钟后出来。观察几分钟日志,看看你有没有跟我发现同样的事情: + + +``` +[root@testvm1 system]# journalctl -S today -f -u myMonitor.service +\-- Logs begin at Mon 2020-06-08 07:47:20 EDT. -- +Jun 13 08:39:18 testvm1.both.org systemd[1]: Starting Logs system statistics to the systemd journal... +Jun 13 08:39:18 testvm1.both.org systemd[1]: myMonitor.service: Succeeded. +Jun 13 08:39:19 testvm1.both.org free[630566]:               total        used        free      shared  buff/cache   available +Jun 13 08:39:19 testvm1.both.org free[630566]: Mem:       12635740      556604    10965516        8036     1113620    11785628 +Jun 13 08:39:19 testvm1.both.org free[630566]: Swap:       8388604           0     8388604 +Jun 13 08:39:18 testvm1.both.org systemd[1]: Finished Logs system statistics to the systemd journal. +Jun 13 08:39:19 testvm1.both.org lsblk[630567]: NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT +Jun 13 08:39:19 testvm1.both.org lsblk[630567]: sda             8:0    0  120G  0 disk +Jun 13 08:39:19 testvm1.both.org lsblk[630567]: ├─sda1          8:1    0    4G  0 part /boot +Jun 13 08:39:19 testvm1.both.org lsblk[630567]: └─sda2          8:2    0  116G  0 part +Jun 13 08:39:19 testvm1.both.org lsblk[630567]:   ├─VG01-root 253:0    0    5G  0 lvm  / +Jun 13 08:39:19 testvm1.both.org lsblk[630567]:   ├─VG01-swap 253:1    0    8G  0 lvm  [SWAP] +Jun 13 08:39:19 testvm1.both.org lsblk[630567]:   ├─VG01-usr  253:2    0   30G  0 lvm  /usr +Jun 13 08:39:19 testvm1.both.org lsblk[630567]:   ├─VG01-tmp  253:3    0   10G  0 lvm  /tmp +Jun 13 08:39:19 testvm1.both.org lsblk[630567]:   ├─VG01-var  253:4    0   20G  0 lvm  /var +Jun 13 08:39:19 testvm1.both.org lsblk[630567]:   └─VG01-home 253:5    0   10G  0 lvm  /home +Jun 13 08:39:19 testvm1.both.org lsblk[630567]: sr0            11:0    1 1024M  0 rom +Jun 13 08:40:46 testvm1.both.org systemd[1]: Starting Logs system statistics to the systemd journal... +Jun 13 08:40:46 testvm1.both.org free[630572]:               total        used        free      shared  buff/cache   available +Jun 13 08:40:46 testvm1.both.org free[630572]: Mem:       12635740      555228    10966836        8036     1113676    11786996 +Jun 13 08:40:46 testvm1.both.org free[630572]: Swap:       8388604           0     8388604 +Jun 13 08:40:46 testvm1.both.org lsblk[630574]: NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT +Jun 13 08:40:46 testvm1.both.org lsblk[630574]: sda             8:0    0  120G  0 disk +Jun 13 08:40:46 testvm1.both.org lsblk[630574]: ├─sda1          8:1    0    4G  0 part /boot +Jun 13 08:40:46 testvm1.both.org lsblk[630574]: └─sda2          8:2    0  116G  0 part +Jun 13 08:40:46 testvm1.both.org lsblk[630574]:   ├─VG01-root 253:0    0    5G  0 lvm  / +Jun 13 08:40:46 testvm1.both.org lsblk[630574]:   ├─VG01-swap 253:1    0    8G  0 lvm  [SWAP] +Jun 13 08:40:46 testvm1.both.org lsblk[630574]:   ├─VG01-usr  253:2    0   30G  0 lvm  /usr +Jun 13 08:40:46 testvm1.both.org lsblk[630574]:   ├─VG01-tmp  253:3    0   10G  0 lvm  /tmp +Jun 13 08:40:46 testvm1.both.org lsblk[630574]:   ├─VG01-var  253:4    0   20G  0 lvm  /var +Jun 13 08:40:46 testvm1.both.org lsblk[630574]:   └─VG01-home 253:5    0   10G  0 lvm  /home +Jun 13 08:40:46 testvm1.both.org lsblk[630574]: sr0            11:0    1 1024M  0 rom +Jun 13 08:40:46 testvm1.both.org systemd[1]: myMonitor.service: Succeeded. +Jun 13 08:40:46 testvm1.both.org systemd[1]: Finished Logs system statistics to the systemd journal. +Jun 13 08:41:46 testvm1.both.org systemd[1]: Starting Logs system statistics to the systemd journal... +Jun 13 08:41:46 testvm1.both.org free[630580]:               total        used        free      shared  buff/cache   available +Jun 13 08:41:46 testvm1.both.org free[630580]: Mem:       12635740      553488    10968564        8036     1113688    11788744 +Jun 13 08:41:46 testvm1.both.org free[630580]: Swap:       8388604           0     8388604 +Jun 13 08:41:47 testvm1.both.org lsblk[630581]: NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT +Jun 13 08:41:47 testvm1.both.org lsblk[630581]: sda             8:0    0  120G  0 disk +Jun 13 08:41:47 testvm1.both.org lsblk[630581]: ├─sda1          8:1    0    4G  0 part /boot +Jun 13 08:41:47 testvm1.both.org lsblk[630581]: └─sda2          8:2    0  116G  0 part +Jun 13 08:41:47 testvm1.both.org lsblk[630581]:   ├─VG01-root 253:0    0    5G  0 lvm  / +Jun 13 08:41:47 testvm1.both.org lsblk[630581]:   ├─VG01-swap 253:1    0    8G  0 lvm  [SWAP] +Jun 13 08:41:47 testvm1.both.org lsblk[630581]:   ├─VG01-usr  253:2    0   30G  0 lvm  /usr +Jun 13 08:41:47 testvm1.both.org lsblk[630581]:   ├─VG01-tmp  253:3    0   10G  0 lvm  /tmp +Jun 13 08:41:47 testvm1.both.org lsblk[630581]:   ├─VG01-var  253:4    0   20G  0 lvm  /var +Jun 13 08:41:47 testvm1.both.org lsblk[630581]:   └─VG01-home 253:5    0   10G  0 lvm  /home +Jun 13 08:41:47 testvm1.both.org lsblk[630581]: sr0            11:0    1 1024M  0 rom +Jun 13 08:41:47 testvm1.both.org systemd[1]: myMonitor.service: Succeeded. +Jun 13 08:41:47 testvm1.both.org systemd[1]: Finished Logs system statistics to the systemd journal. +``` + +别忘了检查下计时器和服务的状态。 + +你在日志里大概至少注意到两件事。第一,你不需要特地做什么来让 `myMonitor.service` 单元中 `ExecStart` 触发器的 `STDOUT` 存储到日志里。这都是用 systemd 来托管服务的一部分功能。然而,它确实意味着你需要小心对待服务单元里面执行的脚本和它们能产生多少 `STDOUT`。 + +第二,定时器并不是在每分钟的 :00 秒执行的,甚至每次执行的时间间隔都不是刚好一分钟。这是特意的设计,但是有必要的话可以被改写(如果只是它挑战了你的系统管理员的敏感神经)。 + +这样设计的初衷是为了防止多个服务在同个时刻被触发。举个例子,你可以用例如 Weekly,Daily 或者跟多其他的时间格式。这些快捷写法都被定义为在某一天的 00:00:00 执行。当多个定时器都这样定义的话,有很大可能它们会同时执行。 + +systemd 定时器被故意设计成在规定时间附近随机波动的时间点触发来避免同一时间触发。它们在一个时间窗口内半随机触发,时间窗口开始于预设的触发时间,结束于预设时间加一分钟。根据 `systemd.timer` 的 man 手册,相对于其他已经定义的定时器单元,这个触发时间保持在稳定的位置。你可以在日志条目中看到,定时器在启动后立即触发,然后在每分钟后的 46 或 47 秒触发。 + +大部分情况下,这种概率抖动的定时器是没事的。当调度类似执行备份的任务,只需要它们在下班时间运行,这样是没问题的。系统管理员可以选择确定的开始时间来确保不和其他任务冲突,例如 01:05:00 这样典型的 cron 工作时间,但是有很大范围的时间值可以满足这一点。在开始时间上一个分钟级别的随机往往是无关紧要的。 + +然而,对某些任务来说,确定的触发时间是个硬性要求。对于这类任务,你可以向单元文件的 `Timer` 块中添加如下声明来指定更高的触发时间跨度精确度(一微秒以内): + + +``` +`AccuracySec=1us` +``` + +时间跨度可用于指定所需的精度,以及定义重复事件或一次性事件的时间跨度。它能识别一下单位: + + * usec,us,µs + * msec,ms + * seconds,second,sec,s + * minutes,minute,min,m + * hours,hour,hr,h + * days,day,d + * weeks,week,w + * months,month,M (定义为 30.44 天) + * years,year,y (定义为 365.25 天) + + +所有 `/usr/lib/systemd/system` 中的定时器都指定了一个更宽松的时间精度,因为精准时间没那么重要。看看这些系统创建的定时器的时间格式: + + +``` +[root@testvm1 system]# grep Accur /usr/lib/systemd/system/*timer +/usr/lib/systemd/system/fstrim.timer:AccuracySec=1h +/usr/lib/systemd/system/logrotate.timer:AccuracySec=1h +/usr/lib/systemd/system/logwatch.timer:AccuracySec=12h +/usr/lib/systemd/system/mlocate-updatedb.timer:AccuracySec=24h +/usr/lib/systemd/system/raid-check.timer:AccuracySec=24h +/usr/lib/systemd/system/unbound-anchor.timer:AccuracySec=24h +[root@testvm1 system]# +``` + + +看下 `/usr/lib/systemd/system` 目录下部分定时器单元文件的完整内容,看看它们是如何构建的。 + +你没有必要在实验中设置开机启动这个定时器,下面这个命令会设置开机自启: + + +``` +[root@testvm1 system]# systemctl enable myMonitor.timer +``` + +你创建的单元文件不一定是可执行的。你同样不需要启用服务因为它是被定时器触发的。如果你需要的话,你仍然可以在命令行里手动触发该服务单元。尝试一下,然后观察日志。 + +翻阅 `Systemd.timer` 和 `Systemd.time` 的 man 手册查看更多有关精确度,时间格式和触发事件相关信息。 + +### 定时器类型 + +systemd 定时器还有一些在 cron 中找不到的功能,仅在确定的,重复的,实时的日期和时间触发。systemd 定时器可以被配置成在其他 systemd 单元状态发生改变时触发。举个例子,一个定时器可以配置成在系统开机,启动,或是某个确定的服务单元激活之后的一段时间被触发。这些被称为单调计时器。单调指的是一个持续增长的计数器或序列。这些定时器没有持久化因为它们在每次 boot 后被重置。 + +表格 1 列出了一些单调定时器以及每个定时器的简短定义,同时有 `OnCalendar` 定时器,这些不是单调的,它们被用于未来有可能重复的某个确定时间。这个信息来自于 `systemd.timer` 的 man 手册,有一些不重要的修改。 + + +定时器 | 单调性 | 定义 +---|---|--- +`OnActiveSec=` | X | 定义了一个与定时器被激活的那一刻相关的定时器。 +`OnBootSec=` | X | 定义了一个与机器启动时间相关的计时器。 +`OnStartupSec=` | X | 定义了一个与服务管理器首次启动相关的计时器。对于系统定时器来说,这个定时器与 OnBootSec= 类似,因为系统服务管理器在机器启动后很短的时间后就会启动。当以在每个用户服务管理器中运行的单元进行配置时,它尤其有用,因为用户的服务管理器通常在首次登录后启动,而不是机器启动后。 +`OnUnitActiveSec=` | X | 定义了一个与将要激活的定时器上次激活时间相关的定时器。 +`OnUnitInactiveSec=` | X | 定义了一个与将要激活的定时器上次停用时间相关的定时器。 +`OnCalendar=` | | 定义了一个有日期事件表达式语法的实时(即时钟)定时器。查看 systemd.time(7) 的 man 手册获取更多与日历事件表达式相关的语法信息。除此以外,它的语义和 `OnActiveSec=` 类似。 + +_Table 1: systemd 定时器定义_ + + +单调计时器课使用同样的简写名作为它们的时间跨度,即我们之前提到的 `AccuracySec` 表达式,但是 systemd 将这些名字统一转换成了秒。举个例子,比如你想规定某个定时器在系统启动后五天触发一次一个事件;它可能看起来像 `OnBootSec=5d`。如果机器启动于 `2020-06-15 09:45:27`,这个定时器会在 `2020-06-20 09:45:27` 或在这之后的一分钟内触发。这个定时器最类似于 cron 服务所使用的计时器。 + + + +### 日历事件格式 + +日历事件格式是定时器在所需重复的时间触发的关键。我们开始看下一些 `OnCalendar` 设置一起使用的格式。 + +与 crontab 中的格式相比,systemd 及其计时器使用的时间和日历格式风格不同。它比 crontab 更为灵活,而且可以使用类似 "at" 命令的方式允许模糊的日期和时间。它还应该足够熟悉使其易于理解。 + +systemd 定时器使用 `OnCalendar=` 的基础格式是 `DOW YYYY-MM-DD HH:MM:SS`。DOW( 天或星期)是选填的,其他字段可以用一个星号(*)来匹配此位置的任意值。所有的日历时间格式会被转换成标准格式。如果时间没有指定,它会被设置为 00:00:00。如果日期没有指定但是时间指定了,那么下次匹配的时间可能是今天或者明天,取决于当前的时间。名字或数字可被用于月份或者星期几。每个单元的逗号分隔列表都可以被指定。单元范围可以在开始值和结束值之间用`。。.`指定。 + + +指定日期有一些有趣的选项,波浪号(~)可以指定月份的最后一条或者最后一天之前的某几天。"/"可以用来指定星期几作为修饰符。 + +这里有几个在 `OnCalendar` 表达式中使用的典型时间格式例子。 + + +日期事件格式 | 描述 +---|--- +DOW YYYY-MM-DD HH:MM:SS | +*-*-* 00:15:30 | 每年每月每天的 0 点 15 分 30 秒 +Weekly | 每个周一的 00:00:00 +Mon *-*-* 00:00:00 | 同上 +Mon | 参考 Weekly +Wed 2020-*-* | 2020 年每个周三的 00:00:00 +Mon。.Fri 2021-*-* | 2021 年的每个工作日的 00:00:00 +2022-6,7,8-1,15 01:15:00 | 2022 年 6,7,8 月的 1 到 15 号的 01:15:00 +Mon *-05~03 | 每年五月份的下个周一发生,同时这也是距离月末的第三天。 +Mon。.Fri *-08~04 | 任何年份 8 月末前的第四天(工作日也算) +*-05~03/2 | 五月末的第三天,然后 2 天后再来一次。每年重复一次。注意这个表达式使用了波浪号(~)。 +*-05-03/2 | 五月的第三天,然后每两天重复一次直到 5 月底。注意这个表达式使用了破折号(-)。 + + +_Table 2: `OnCalendar` 事件时间格式例子_ + + +### 测试日历格式 + +systemd 提供了一个绝佳的工具用于检测和测试定时器中日历时间事件的格式。`systemd-analyze calendar` 工具解析一个时间事件格式,提供标准格式和其他有趣的信息,例如下次"经过"(即匹配)的日期和时间,以及距离下次触发之前大概时间。 + +首先,看看未来没有时间的日期(注意 `Next elapse` 和 `UTC` 的时间会根据你当地时区改变): + + +``` +[student@studentvm1 ~]$ systemd-analyze calendar 2030-06-17 +  Original form: 2030-06-17                 +Normalized form: 2030-06-17 00:00:00         +    Next elapse: Mon 2030-06-17 00:00:00 EDT +       (in UTC): Mon 2030-06-17 04:00:00 UTC +       From now: 10 years 0 months left     +[root@testvm1 system]# +``` + +现在添加一个时间,在这个例子中,日期和时间是当作无关的部分分开解析的: + + +``` +[root@testvm1 system]# systemd-analyze calendar 2030-06-17 15:21:16 +  Original form: 2030-06-17                 +Normalized form: 2030-06-17 00:00:00         +    Next elapse: Mon 2030-06-17 00:00:00 EDT +       (in UTC): Mon 2030-06-17 04:00:00 UTC +       From now: 10 years 0 months left     + +  Original form: 15:21:16                   +Normalized form: *-*-* 15:21:16             +    Next elapse: Mon 2020-06-15 15:21:16 EDT +       (in UTC): Mon 2020-06-15 19:21:16 UTC +       From now: 3h 55min left               +[root@testvm1 system]# +``` + +为了把日期和时间当作一个单元来分析,可以把它们包在引号里。你在定时器单元里 `OnCalendar=` 时间格式中使用的时候记得把引号去掉,否则会报错: + + +``` +[root@testvm1 system]# systemd-analyze calendar "2030-06-17 15:21:16" +Normalized form: 2030-06-17 15:21:16         +    Next elapse: Mon 2030-06-17 15:21:16 EDT +       (in UTC): Mon 2030-06-17 19:21:16 UTC +       From now: 10 years 0 months left     +[root@testvm1 system]# +``` + +现在我们测试下 Table2 里的例子。我尤其喜欢最后一个: + + +``` +[root@testvm1 system]# systemd-analyze calendar "2022-6,7,8-1,15 01:15:00" +  Original form: 2022-6,7,8-1,15 01:15:00 +Normalized form: 2022-06,07,08-01,15 01:15:00 +    Next elapse: Wed 2022-06-01 01:15:00 EDT +       (in UTC): Wed 2022-06-01 05:15:00 UTC +       From now: 1 years 11 months left +[root@testvm1 system]# +``` + +让我们看一个例子,这个例子里我们列出了时间表达式的五个经过时间。 + + +``` +[root@testvm1 ~]# systemd-analyze calendar --iterations=5 "Mon *-05~3" +  Original form: Mon *-05~3                 +Normalized form: Mon *-05~03 00:00:00       +    Next elapse: Mon 2023-05-29 00:00:00 EDT +       (in UTC): Mon 2023-05-29 04:00:00 UTC +       From now: 2 years 11 months left     +       Iter. #2: Mon 2028-05-29 00:00:00 EDT +       (in UTC): Mon 2028-05-29 04:00:00 UTC +       From now: 7 years 11 months left     +       Iter. #3: Mon 2034-05-29 00:00:00 EDT +       (in UTC): Mon 2034-05-29 04:00:00 UTC +       From now: 13 years 11 months left     +       Iter. #4: Mon 2045-05-29 00:00:00 EDT +       (in UTC): Mon 2045-05-29 04:00:00 UTC +       From now: 24 years 11 months left     +       Iter. #5: Mon 2051-05-29 00:00:00 EDT +       (in UTC): Mon 2051-05-29 04:00:00 UTC +       From now: 30 years 11 months left     +[root@testvm1 ~]# +``` + +这些应该为你提供了足够的信息去开始测试你的 `OnCalendar` 时间格式。`systemd-analyze` 工具可用于其他有趣的分析,我会在这个系列的下一篇文章来探索这些。 + +### 总结 + +systemd 定时器可以用于执行和 cron 工具相同的任务,但是通过按照日历和单调时间格式去触发事件的方法提供了更多的灵活性。 + +虽然你为此次实验创建的服务单元通常被定时器调用,你也可以随时使用 `systemctl start myMonitor.service` 命令去触发它。多个需要维护的任务可以被写成脚本放在单个定时器中;它们可以是 Bash 脚本或者其他 Linux 程序。你可以通过触发定时器来运行所有的脚本来运行服务,也可以按照需要执行单独的脚本。 + +我会在下篇文章中更加深入的探索 systemd 时间格式的用处。 + +我还没看到任何 `cron` 和 `at` 要被弃用的迹象。我希望这一切不会发生因为 `at` 至少在执行一次性调度任务的时候要比 systemd 定时器容易的多。 + +### 参考资料 + +网上有大量的关于 systemd 的参考资料,但是大部分都有点幼稚,粗略甚至有误导性。除了本文中提到的资料,下列的网页提供了跟多可靠且详细的 systemd 入门信息。 + + * Fedora 项目有切实好用的 [systemd 入门 ][5]。它囊括了几乎所有你需要知道的关于如何使用 systemd 配置,管理和维护 Fedora 计算机。 + * Fedora 项目也有一个不错的[备忘录 ][6],交叉引用了过去 SystemV 命令和 systemd 命令做对比。 + * 关于 systemd 和为创建这个项目原因的技术细节,查看 [Freedesktop.org][7]'s [systemd 描述 ][8]。 + * [Linux.com][9] 的"更多 systemd 的乐趣"栏目提供了跟多 systemd 进阶的[内幕和技巧 ][10]。 + + + +还有一系列 Lennart Poettering 撰写的 Linux 系统管理相关的深度的技术文章,他是 systemd 的设计者和主要实现者。这些文章写在 2010 年 4 月至 2011 年 9 月,但是它们如同现在一样贴切。systemd 及其生态相关的几乎一些优秀的产出基本都是基于这些论文。 + + * [Rethinking PID 1][11] + * [systemd for Administrators,Part I][12] + * [systemd for Administrators,Part II][13] + * [systemd for Administrators,Part III][14] + * [systemd for Administrators,Part IV][15] + * [systemd for Administrators,Part V][16] + * [systemd for Administrators,Part VI][17] + * [systemd for Administrators,Part VII][18] + * [systemd for Administrators,Part VIII][19] + * [systemd for Administrators,Part IX][20] + * [systemd for Administrators,Part X][21] + * [systemd for Administrators,Part XI][22] + + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/7/systemd-timers + +作者:[David Both][a] +选题:[lujun9972][b] +译者:[tt67wq](https://github.com/tt67wq) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/dboth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/checklist_todo_clock_time_team.png?itok=1z528Q0y (Team checklist) +[2]: https://opensource.com/article/17/11/how-use-cron-linux +[3]: https://opensource.com/users/dboth +[4]: https://opensource.com/article/20/5/manage-startup-systemd +[5]: https://docs.fedoraproject.org/en-US/quick-docs/understanding-and-administering-systemd/index.html +[6]: https://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet +[7]: http://Freedesktop.org +[8]: http://www.freedesktop.org/wiki/Software/systemd +[9]: http://Linux.com +[10]: https://www.linux.com/training-tutorials/more-systemd-fun-blame-game-and-stopping-services-prejudice/ +[11]: http://0pointer.de/blog/projects/systemd.html +[12]: http://0pointer.de/blog/projects/systemd-for-admins-1.html +[13]: http://0pointer.de/blog/projects/systemd-for-admins-2.html +[14]: http://0pointer.de/blog/projects/systemd-for-admins-3.html +[15]: http://0pointer.de/blog/projects/systemd-for-admins-4.html +[16]: http://0pointer.de/blog/projects/three-levels-of-off.html +[17]: http://0pointer.de/blog/projects/changing-roots +[18]: http://0pointer.de/blog/projects/blame-game.html +[19]: http://0pointer.de/blog/projects/the-new-configuration-files.html +[20]: http://0pointer.de/blog/projects/on-etc-sysinit.html +[21]: http://0pointer.de/blog/projects/instances.html +[22]: http://0pointer.de/blog/projects/inetd.html From 2de987a63057504b4739bd267f4cc198ed5683e7 Mon Sep 17 00:00:00 2001 From: tt67wq Date: Fri, 16 Apr 2021 16:03:30 +0800 Subject: [PATCH 699/818] translating by tt67wq --- ...617 How to handle dynamic and static libraries in Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20200617 How to handle dynamic and static libraries in Linux.md b/sources/tech/20200617 How to handle dynamic and static libraries in Linux.md index abd312b1e1..24cce91127 100644 --- a/sources/tech/20200617 How to handle dynamic and static libraries in Linux.md +++ b/sources/tech/20200617 How to handle dynamic and static libraries in Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (tt67wq) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -281,7 +281,7 @@ via: https://opensource.com/article/20/6/linux-libraries 作者:[Stephan Avenwedde][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[tt67wq](https://github.com/tt67wq) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From a078a740469c44291bcc80da9f25f2ead7fae68c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 17 Apr 2021 05:02:33 +0800 Subject: [PATCH 700/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210416=20?= =?UTF-8?q?Use=20the=20DNF=20local=20plugin=20to=20speed=20up=20your=20hom?= =?UTF-8?q?e=20lab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210416 Use the DNF local plugin to speed up your home lab.md --- ... local plugin to speed up your home lab.md | 436 ++++++++++++++++++ 1 file changed, 436 insertions(+) create mode 100644 sources/tech/20210416 Use the DNF local plugin to speed up your home lab.md diff --git a/sources/tech/20210416 Use the DNF local plugin to speed up your home lab.md b/sources/tech/20210416 Use the DNF local plugin to speed up your home lab.md new file mode 100644 index 0000000000..cf802d3894 --- /dev/null +++ b/sources/tech/20210416 Use the DNF local plugin to speed up your home lab.md @@ -0,0 +1,436 @@ +[#]: subject: (Use the DNF local plugin to speed up your home lab) +[#]: via: (https://fedoramagazine.org/use-the-dnf-local-plugin-to-speed-up-your-home-lab/) +[#]: author: (Brad Smith https://fedoramagazine.org/author/buckaroogeek/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Use the DNF local plugin to speed up your home lab +====== + +![][1] + +Photo by [Sven Hornburg][2] on [Unsplash][3] + +### Introduction + +If you are a Fedora Linux enthusiast or a developer working with multiple instances of Fedora Linux then you might benefit from the [DNF local][4] plugin. An example of someone who would benefit from the DNF local plugin would be an enthusiast who is running a cluster of Raspberry Pis. Another example would be someone running several virtual machines managed by Vagrant. The DNF local plugin reduces the time required for DNF transactions. It accomplishes this by transparently creating and managing a local RPM repository. Because accessing files on a local file system is significantly faster than downloading them repeatedly, multiple Fedora Linux machines will see a significant performance improvement when running _dnf_ with the DNF local plugin enabled. + +I recently started using this plugin after reading a tip from Glenn Johnson (aka glennzo) in [a 2018 fedoraforum.org post][5]. While working on a Raspberry Pi based Kubernetes cluster running Fedora Linux and also on several container-based services, I winced with every DNF update on each Pi or each container that downloaded a duplicate set of rpms across my expensive internet connection. In order to improve this situation, I searched for a solution that would cache rpms for local reuse. I wanted something that would not require any changes to repository configuration files on every machine. I also wanted it to continue to use the network of Fedora Linux mirrors. I didn’t want to use a single mirror for all updates. + +### Prior art + +An internet search yields two common solutions that eliminate or reduce repeat downloads of the same RPM set – create a private Fedora Linux mirror or set up a caching proxy. + +Fedora provides guidance on setting up a [private mirror][6]. A mirror requires a lot of bandwidth and disk space and significant work to maintain. A full private mirror would be too expensive and it would be overkill for my purposes. + +The most common solution I found online was to implement a caching proxy using Squid. I had two concerns with this type of solution. First, I would need to edit repository definitions stored in _/etc/yum.repo.d_ on each virtual and physical machine or container to use the same mirror. Second, I would need to use _http_ and not _https_ connections which would introduce a security risk. + +After reading Glenn’s 2018 post on the DNF local plugin, I searched for additional information but could not find much of anything besides the sparse documentation for the plugin on the DNF documentation web site. This article is intended to raise awareness of this plugin. + +### About the DNF local plugin + +The [online documentation][4] provides a succinct description of the plugin: “Automatically copy all downloaded packages to a repository on the local filesystem and generating repo metadata”. The magic happens when there are two or more Fedora Linux machines configured to use the plugin and to share the same local repository. These machines can be virtual machines or containers running on a host and all sharing the host filesystem, or separate physical hardware on a local area network sharing the file system using a network-based file system sharing technology. The plugin, once configured, handles everything else transparently. Continue to use _dnf_ as before. _dnf_ will check the plugin repository for rpms, then proceed to download from a mirror if not found. The plugin will then cache all rpms in the local repository regardless of their upstream source – an official Fedora Linux repository or a third-party RPM repository – and make them available for the next run of _dnf_. + +### Install and configure the DNF local plugin + +Install the plugin using _dnf_. The _createrepo_c_ packages will be installed as a dependency. The latter is used, if needed, to create the local repository. + +``` +sudo dnf install python3-dnf-plugin-local +``` + +The plugin configuration file is stored at /_etc/dnf/plugins/local.conf_. An example copy of the file is provided below. The only change required is to set the _repodir_ option. The _repodir_ option defines where on the local filesystem the plugin will keep the RPM repository. + +``` +[main] +enabled = true +# Path to the local repository. +# repodir = /var/lib/dnf/plugins/local + +# Createrepo options. See man createrepo_c +[createrepo] +# This option lets you disable createrepo command. This could be useful +# for large repositories where metadata is priodically generated by cron +# for example. This also has the side effect of only copying the packages +# to the local repo directory. +enabled = true + +# If you want to speedup createrepo with the --cachedir option. Eg. +# cachedir = /tmp/createrepo-local-plugin-cachedir + +# quiet = true + +# verbose = false +``` + +Change _repodir_ to the filesystem directory where you want the RPM repository stored. For example, change _repodir_ to _/srv/repodir_ as shown below. + +``` +... +# Path to the local repository. +# repodir = /var/lib/dnf/plugins/local +repodir = /srv/repodir +... +``` + +Finally, create the directory if it does not already exist. If this directory does not exist, _dnf_ will display some errors when it first attempts to access the directory. The plugin will create the directory, if necessary, despite the initial errors. + +``` +sudo mkdir -p /srv/repodir +``` + +Repeat this process on any virtual machine or container that you want to share the local repository. See the use cases below for more information. An alternative configuration using NFS (network file system) is also provided below. + +### How to use the DNF local plugin + +After you have installed the plugin, you do not need to change how you use _dnf_. The plugin will cause a few additional steps to run transparently behind the scenes whenever _dnf_ is called. After _dnf_ determines which rpms to update or install, the plugin will try to retrieve them from the local repository before trying to download them from a mirror. After _dnf_ has successfully completed the requested updates, the plugin will copy any rpms downloaded from a mirror to the local repository and then update the local repository’s metadata. The downloaded rpms will then be available in the local repository for the next _dnf_ client. + +There are two points to be aware of. First, benefits from the local repository only occur if multiple machines share the same architecture (for example, x86_64 or aarch64). Virtual machines and containers running on a host will usually share the same architecture as the host. But if there is only one aarch64 device and one x86_64 device there is little real benefit to a shared local repository unless one of the devices is constantly reset and updated which is common when developing with a virtual machine or container. Second, I have not explored how robust the local repository is to multiple _dnf_ clients updating the repository metadata concurrently. I therefore run _dnf_ from multiple machines serially rather than in parallel. This may not be a real concern but I want to be cautious. + +The use cases outlined below assume that work is being done on Fedora Workstation. Other desktop environments can work as well but may take a little extra effort. I created a GitHub repository with examples to help with each use case. Click the _Code_ button at to clone the repository or to download a zip file. + +#### Use case 1: networked physical machines + +The simplest use case is two or more Fedora Linux computers on the same network. Install the DNF local plugin on each Fedora Linux machine and configure the plugin to use a repository on a network-aware file system. There are many network-aware file systems to choose from. Which file system you will use will probably be influenced by the existing devices on your network. + +For example, I have a small Synology Network Attached Storage device (NAS) on my home network. The web admin interface for the Synology makes it very easy to set up a NFS server and export a file system share to other devices on the network. NFS is a shared file system that is well supported on Fedora Linux. I created a share on my NAS named _nfs-dnf_ and exported it to all the Fedora Linux machines on my network. For the sake of simplicity, I am omitting the details of the security settings. However, please keep in mind that security is always important even on your own local network. If you would like more information about NFS, the online Red Hat Enable Sysadmin magazine has an [informative post][7] that covers both client and server configurations on Red Hat Enterprise Linux. They translate well to Fedora Linux. + +I configured the NFS client on each of my Fedora Linux machines using the steps shown below. In the below example, _quga.lan_ is the hostname of my NAS device. + +Install the NFS client on each Fedora Linux machine. + +``` +$ sudo dnf install nfs-utils +``` + +Get the list of exports from the NFS server: + +``` +$ showmount -e quga.lan +Export list for quga.lan: +/volume1/nfs-dnf pi*.lan +``` + +Create a local directory to be used as a mount point on the Fedora Linux client: + +``` +$ sudo mkdir -p /srv/repodir +``` + +Mount the remote file system on the local directory. See _man mount_ for more information and options. + +``` +$ sudo mount -t nfs -o vers=4 quga.lan:/nfs-dnf /srv/repodir +``` + +The DNF local plugin will now work until as long as the client remains up. If you want the NFS export to be automatically mounted when the client is rebooted, then you must to edit /_etc/fstab_ as demonstrated below. I recommend making a backup of _/etc/fstab_ before editing it. You can substitute _vi_ with _nano_ or another editor of your choice if you prefer. + +``` +$ sudo vi /etc/fstab +``` + +Append the following line at the bottom of _/etc/fstab_, then save and exit. + +``` +quga.lan:/volume1/nfs-dnf /srv/repodir nfs defaults,timeo=900,retrans=5,_netdev 0 0 +``` + +Finally, notify systemd that it should rescan _/etc/fstab_ by issuing the following command. + +``` +$ sudo systemctl daemon-reload +``` + +NFS works across the network and, like all network traffic, may be blocked by firewalls on the client machines. Use _firewall-cmd_ to allow NFS-related network traffic through each Fedora Linux machine’s firewall. + +``` +$ sudo firewall-cmd --permanent --zone=public --allow-service=nfs +``` + +As you can imagine, replicating these steps correctly on multiple Fedora Linux machines can be challenging and tedious. Ansible automation solves this problem. + +In the _rpi-example_ directory of the github repository I’ve included an example Ansible playbook (_configure.yaml_) that installs and configures both the DNF plugin and the NFS client on all Fedora Linux machines on my network. There is also a playbook (_update.yaml)_ that runs a DNF update across all devices. See this [recent post in Fedora Magazine][8] for more information about Ansible. + +To use the provided Ansible examples, first update the inventory file (_inventory_) to include the list of Fedora Linux machines on your network that you want to managed. Next, install two Ansible roles in the roles subdirectory (or another suitable location). + +``` +$ ansible-galaxy install --roles-path ./roles -r requirements.yaml +``` + +Run the _configure.yaml_ playbook to install and configure the plugin and NFS client on all hosts defined in the inventory file. The role that installs and configures the NFS client does so via _/etc/fstab_ but also takes it a step further by creating an automount for the NFS share in systemd. The automount is configured to mount the share only when needed and then to automatically unmount. This saves network bandwidth and CPU cycles which can be important for low power devices like a Raspberry Pi. See the github repository for the role and for more information. + +``` +$ ansible-playbook -i inventory configure.yaml +``` + +Finally, Ansible can be configured to execute _dnf update_ on all the systems serially by using the _update.yaml_ playbook. + +``` +$ ansible-playbook -i inventory update.yaml +``` + +Ansible and other automation tools such as Puppet, Salt, or Chef can be big time savers when working with multiple virtual or physical machines that share many characteristics. + +#### Use case 2: virtual machines running on the same host + +Fedora Linux has excellent built-in support for virtual machines. The Fedora Project also provides [Fedora Cloud][9] base images for use as virtual machines. [Vagrant][10] is a tool for managing virtual machines. Fedora Magazine has [instructions][11] on how to set up and configure Vagrant. Add the following line in your _.bashrc_ (or other comparable shell configuration file) to inform Vagrant to use _libvirt_ automatically on your workstation instead of the default VirtualBox. + +``` +export VAGRANT_DEFAULT_PROVIDER=libvirt +``` + +In your project directory initialize Vagrant and the Fedora Cloud image (use 34-cloud-base for Fedora Linux 34 when available): + +``` +$ vagrant init fedora/33-cloud-base +``` + +This creates a Vagrant file in the project directory. Edit the Vagrant file to look like the example below. DNF will likely fail with the default memory settings for _libvirt_. So the example Vagrant file below provides additional memory to the virtual machine. The example below also shares the host _/srv/repodir_ with the virtual machine. The shared directory will have the same path in the virtual machine – _/srv/repodir_. The Vagrant file can be downloaded from [github][12]. + +``` +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# define repo directory; same name on host and vm +REPO_DIR = "/srv/repodir" + +Vagrant.configure("2") do |config| + + config.vm.box = "fedora/33-cloud-base" + + config.vm.provider :libvirt do |v| + v.memory = 2048 + # v.cpus = 2 + end + + # share the local repository with the vm at the same location + config.vm.synced_folder REPO_DIR, REPO_DIR + + # ansible provisioner - commented out by default + # the ansible role is installed into a path defined by + # ansible.galaxy_roles-path below. The extra_vars are ansible + # variables passed to the playbook. + # +# config.vm.provision "ansible" do |ansible| +# ansible.verbose = "v" +# ansible.playbook = "ansible/playbook.yaml" +# ansible.extra_vars = { +# repo_dir: REPO_DIR, +# dnf_update: false +# } +# ansible.galaxy_role_file = "ansible/requirements.yaml" +# ansible.galaxy_roles_path = "ansible/roles" +# end +end +``` + +Once you have Vagrant managing a Fedora Linux virtual machine, you can install the plugin manually. SSH into the virtual machine: + +``` +$ vagrant ssh +``` + +When you are at a command prompt in the virtual machine, repeat the steps from the _Install and configure the DNF local plugin_ section above. The Vagrant configuration file should have already made _/srv/repodir_ from the host available in the virtual machine at the same path. + +If you are working with several virtual machines or repeatedly re-initiating a new virtual machine then some simple automation becomes useful. As with the network example above, I use ansible to automate this process. + +In the [vagrant-example directory][12] on github, you will see an _ansible_ subdirectory. Edit the Vagrant file and remove the comment marks under the _ansible provisioner_ section. Make sure the _ansible_ directory and its contents (_playbook.yaml_, _requirements.yaml_) are in the project directory. + +After you’ve uncommented the lines, the _ansible provisioner_ section in the Vagrant file should look similar to the following: + +``` +.... + # ansible provisioner + # the ansible role is installed into a path defined by + # ansible.galaxy_roles-path below. The extra_vars are ansible + # variables passed to the playbook. + # + config.vm.provision "ansible" do |ansible| + ansible.verbose = "v" + ansible.playbook = "ansible/playbook.yaml" + ansible.extra_vars = { + repo_dir: REPO_DIR, + dnf_update: false + } + ansible.galaxy_role_file = "ansible/requirements.yaml" + ansible.galaxy_roles_path = "ansible/roles" + end +.... +``` + +Ansible must be installed (_sudo dnf install ansible_). Note that there are significant changes to how Ansible is packaged beginning with Fedora Linux 34 (use _sudo dnf install ansible-base ansible-collections*_). + +If you run Vagrant now (or reprovision: _vagrant provision_), Ansible will automatically download an Ansible role that installs the DNF local plugin. It will then use the downloaded role in a playbook. You can _vagrant ssh_ into the virtual machine to verify that the plugin is installed and to verify that rpms are coming from the DNF local repository instead of a mirror. + +#### Use case 3: container builds + +Container images are a common way to distribute and run applications. If you are a developer or enthusiast using Fedora Linux containers as a foundation for applications or services, you will likely use _dnf_ to update the container during the development/build process. Application development is iterative and can result in repeated executions of _dnf_ pulling the same RPM set from Fedora Linux mirrors. If you cache these rpms locally then you can speed up the container build process by retrieving them from the local cache instead of re-downloading them over the network each time. One way to accomplish this is to create a custom Fedora Linux container image with the DNF local plugin installed and configured to use a local repository on the host workstation. Fedora Linux offers _podman_ and _buildah_ for managing the container build, run and test life cycle. See the Fedora Magazine post [_How to build Fedora container images_][13] for more about managing containers on Fedora Linux. + +Note that the _fedora_minimal_ container uses _microdnf_ by default which does not support plugins. The _fedora_ container, however, uses _dnf_. + +A script that uses _buildah_ and _podman_ to create a custom Fedora Linux image named _myFedora_ is provided below. The script creates a mount point for the local repository at _/srv/repodir_. The below script is also available in the [_container-example_][14] directory of the github repository. It is named _base-image-build.sh_. + +``` +#!/bin/bash +set -x + +# bash script that creates a 'myfedora' image from fedora:latest. +# Adds dnf-local-plugin, points plugin to /srv/repodir for local +# repository and creates an external mount point for /srv/repodir +# that can be used with a -v switch in podman/docker + +# custom image name +custom_name=myfedora + +# scratch conf file name +tmp_name=local.conf + +# location of plugin config file +configuration_name=/etc/dnf/plugins/local.conf + +# location of repodir on container +container_repodir=/srv/repodir + +# create scratch plugin conf file for container +# using repodir location as set in container_repodir +cat < "$tmp_name" +[main] +enabled = true +repodir = $container_repodir +[createrepo] +enabled = true +# If you want to speedup createrepo with the --cachedir option. Eg. +# cachedir = /tmp/createrepo-local-plugin-cachedir +# quiet = true +# verbose = false +EOF + +# pull registry.fedoraproject.org/fedora:latest +podman pull registry.fedoraproject.org/fedora:latest + +#start the build +mkdev=$(buildah from fedora:latest) + +# tag author +buildah config --author "$USER" "$mkdev" + +# install dnf-local-plugin, clean +# do not run update as local repo is not operational +buildah run "$mkdev" -- dnf --nodocs -y install python3-dnf-plugin-local createrepo_c +buildah run "$mkdev" -- dnf -y clean all + +# create the repo dir +buildah run "$mkdev" -- mkdir -p "$container_repodir" + +# copy the scratch plugin conf file from host +buildah copy "$mkdev" "$tmp_name" "$configuration_name" + +# mark container repodir as a mount point for host volume +buildah config --volume "$container_repodir" "$mkdev" + +# create myfedora image +buildah commit "$mkdev" "localhost/$custom_name:latest" + +# clean up working image +buildah rm "$mkdev" + +# remove scratch file +rm $tmp_name +``` + +Given normal security controls for containers, you usually run this script with _sudo_ and when you use the _myFedora_ image in your development process. + +``` +$ sudo ./base_image_build.sh +``` + +To list the images stored locally and see both _fedora:latest_ and _myfedora:latest_ run: + +``` +$ sudo podman images +``` + +To run the _myFedora_ image as a container and get a bash prompt in the container run: + +``` +$ sudo podman run -ti -v /srv/repodir:/srv/repodir:Z myfedora /bin/bash +``` + +Podman also allows you to run containers rootless (as an unprivileged user). Run the script without _sudo_ to create the _myfedora_ image and store it in the unprivileged user’s image repository: + +``` +$ ./base-image-build.sh +``` + +In order to run the _myfedora_ image as a rootless container on a Fedora Linux host, an additional flag is needed. Without the extra flag, SELinux will block access to _/srv/repodir_ on the host. + +``` +$ podman run --security-opt label=disable -ti -v /srv/repodir:/srv/repodir:Z myfedora /bin/bash +``` + +By using this custom image as the base for your Fedora Linux containers, the iterative building and development of applications or services on them will be faster. + +**Bonus Points** – for even better _dnf_ performance, Dan Walsh describes how to share _dnf_ metadata between a host and container using a file overlay (see . redhat.com/sysadmin/speeding-container-buildah). This technique will work in combination with a shared local repository only if the host and the container use the same local repository. The _dnf_ metadata cache includes metadata for the local repository under the name __dnf_local_. + +I have created a container file that uses _buildah_ to do a _dnf_ update on a _fedora:latest_ image. I’ve also created a container file to repeat the process using a _myfedora_ image. There are 53 MB and 111 rpms in the _dnf_ update. The only difference between the images is that _myfedora_ has the DNF local plugin installed. Using the local repository cut the elapse time by more than half in this example and saves 53MB of internet bandwidth consumption. + +With the _fedora:latest_ image the command and elapsed time is: + +``` +# sudo time -f "Elapsed Time: %E" buildah bud -v /var/cache/dnf:/var/cache/dnf:O - f Containerfile.3 . +128 Elapsed Time: 0:48.06 +``` + +With the _myfedora_ image the command and elapsed time is less than half of the base run. The **:Z** on the **-v** volume below is required when running the container on a SELinux-enabled host. + +``` +# sudo time -f "Elapsed Time: %E" buildah bud -v /var/cache/dnf:/var/cache/dnf:O -v /srv/repodir:/srv/repodir:Z -f Containerfile.4 . +133 Elapsed Time: 0:19.75 +``` + +### Repository management + +The local repository will accumulate files over time. Among the files will be many versions of rpms that change frequently. The kernel rpms are one such example. A system upgrade (for example upgrading from Fedora Linux 33 to Fedora Linux 34) will copy many rpms into the local repository. The _dnf repomanage_ command can be used to remove outdated rpm archives. I have not used the plugin long enough to explore this. The interested and knowledgeable reader is welcome to write an article about the _dnf repomanage_ command for Fedora Magazine. + +Finally, I keep the _x86_64_ rpms for my workstation, virtual machines and containers in a local repository that is separate from the _aarch64_ local repository for the Raspberry Pis and (future) containers hosting my Kubernetes cluster. I have separated them for reasons of convenience and happenstance. A single repository location should work across all architectures. + +### An important note about Fedora Linux system upgrades + +Glenn Johnson has more than four years experience with the DNF local plugin. On occasion he has experienced problems when upgrading to a new release of Fedora Linux with the DNF local plugin enabled. Glenn strongly recommends that the _enabled_ attribute in the plugin configuration file _/etc/dnf/plugins/local.conf_ be set to **false** before upgrading your systems to a new Fedora Linux release. After the system upgrade, re-enable the plugin. Glenn also recommends using a separate local repository for each Fedora Linux release. For example, a NFS server might export _/volume1/dnf-repo/33_ for Fedora Linux 33 systems only. Glenn hangs out on fedoraforum.org – an independent online resource for Fedora Linux users. + +### Summary + +The DNF local plugin has been beneficial to my ongoing work with a Fedora Linux based Kubernetes cluster. The containers and virtual machines running on my Fedora Linux desktop have also benefited. I appreciate how it supplements the existing DNF process and does not dictate any changes to how I update my systems or how I work with containers and virtual machines. I also appreciate not having to download the same set of rpms multiple times which saves me money, frees up bandwidth, and reduces the load on the Fedora Linux mirror hosts. Give it a try and see if the plugin will help in your situation! + +Thanks to Glenn Johnson for his post on the DNF local plugin which started this journey, and for his helpful reviews of this post. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/use-the-dnf-local-plugin-to-speed-up-your-home-lab/ + +作者:[Brad Smith][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/buckaroogeek/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2021/04/dnf-local-816x345.jpg +[2]: https://unsplash.com/@_s9h8_?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://dnf-plugins-core.readthedocs.io/en/latest/local.html +[5]: https://forums.fedoraforum.org/showthread.php?318812-dnf-plugin-local +[6]: https://fedoraproject.org/wiki/%20Infrastructure/Mirroring#How_can_someone_make_a_private_mirror +[7]: https://www.redhat.com/sysadmin/nfs-server-client +[8]: https://fedoramagazine.org/using-ansible-setup-workstation/ +[9]: https://alt.fedoraproject.org/cloud/ +[10]: https://vagrantup.com/ +[11]: https://fedoramagazine.org/vagrant-qemukvm-fedora-devops-sysadmin/ +[12]: https://github.com/buckaroogeek/dnf-local-plugin-examples/tree/main/vagrant-example +[13]: https://fedoramagazine.org/how-to-build-fedora-container-images/ +[14]: https://github.com/buckaroogeek/dnf-local-plugin-examples/tree/main/container-example From 7327eb05eb35790de1c49346fdc9482af2e495a8 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 17 Apr 2021 05:03:00 +0800 Subject: [PATCH 701/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210416=20?= =?UTF-8?q?WASI,=20Bringing=20WebAssembly=20Way=20Beyond=20Browsers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210416 WASI, Bringing WebAssembly Way Beyond Browsers.md --- ...ringing WebAssembly Way Beyond Browsers.md | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 sources/tech/20210416 WASI, Bringing WebAssembly Way Beyond Browsers.md diff --git a/sources/tech/20210416 WASI, Bringing WebAssembly Way Beyond Browsers.md b/sources/tech/20210416 WASI, Bringing WebAssembly Way Beyond Browsers.md new file mode 100644 index 0000000000..83b6c0ba38 --- /dev/null +++ b/sources/tech/20210416 WASI, Bringing WebAssembly Way Beyond Browsers.md @@ -0,0 +1,87 @@ +[#]: subject: (WASI, Bringing WebAssembly Way Beyond Browsers) +[#]: via: (https://www.linux.com/news/wasi-bringing-webassembly-way-beyond-browsers/) +[#]: author: (Dan Brown https://training.linuxfoundation.org/announcements/wasi-bringing-webassembly-way-beyond-browsers/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +WASI, Bringing WebAssembly Way Beyond Browsers +====== + +_By Marco Fioretti_ + +[WebAssembly (Wasm)][1] is a binary software format that all browsers can run directly, [safely][2] and at near-native speeds, on any operating system (OS). Its biggest promise, however, is to eventually work in the same way [everywhere][3], from IoT devices and edge servers, to mobile devices and traditional desktops. This post introduces the main interface that should make this happen. The next post in this series will describe some of the already available, real-world implementations and applications of the same interface. + +**What is portability, again?** + +To be safe and portable, software code needs, as a minimum:  + + 1. guarantees that users and programs can do only what they actually _have_ the right to do, and only do it without creating problems to other programs or users + 2. standard, platform-independent methods to declare and apply those guarantees + + + +Traditionally, these services are provided by libraries of “system calls” for each language, that is functions with which a software program can ask its host OS to perform some low-level, or sensitive task. When those libraries follow standards like [POSIX][4], any compiler can automatically combine them with the source code, to produce a binary file that can run on _some_ combination of OSes and processors. + +**The next level: BINARY compatibility** + +System calls only make _source code_ portable across platforms. As useful as they are, they still force developers to generate platform-specific executable files, all too often from more or less different combinations of source code. + +WebAssembly instead aims to get to the next level: use any language you want, then compile it once, to produce one binary file that will _just run_, securely, in any environment that recognizes WebAssembly.  + +**What Wasm does not need to work outside browsers** + +Since WebAssembly already “compiles once” for all major browsers, the easiest way to expand its reach may seem to create, for every target environment, a full virtual machine (runtime) that provides everything a Wasm module expects from Firefox or Chrome. + +Work like that however would be _really_ complex, and above all simply unnecessary, if not impossible, in many cases (e.g. on IoT devices). Besides, there are better ways to secure Wasm modules than dumping them in one-size-fits-all sandboxes as browsers do today. + +**The solution? A virtual operating system and runtime** + +Fully portable Wasm modules cannot happen until, to give one practical example, accesses to webcams or websites can be written only with system calls that generate platform-dependent machine code. + +Consequently, the most practical way to have such modules, from _any_ programming language, seems to be that of the [WebAssembly System interface (WASI) project][5]: write and compile code for only _one, obviously virtual,_ but complete operating system. + +On one hand WASI gives to all the developers of [Wasm runtimes][6] one single OS to emulate. On the other, WASI gives to all programming languages one set of system calls to talk to that same OS. + +In this way, even if you loaded it on ten different platforms, a _binary_ Wasm module calling a certain WASI function would still get – from the runtime that launched it – a different binary object every time. But since all those objects would interact with that single Wasm module in exactly the same way, it would not matter! + +This approach would work also in the first use case of WebAssembly, that is with the JavaScript virtual machines inside web browsers. To run Wasm modules that use WASI calls, those machines should only load the JavaScript versions of the corresponding libraries. + +This OS-level emulation is also more secure than simple sandboxing. With WASI, any runtime can implement different versions of each system call – with different security privileges – as long as they all follow the specification. Then that runtime could place every instance of every Wasm module it launches into a separate sandbox, containing only the smallest, and least privileged combination of functions that that specific instance really needs. + +This “principle of least privilege”, or “[capability-based security model][7]“, is everywhere in WASI. A WASI runtime can pass into a sandbox an instance of the “open” system call that is only capable of opening the specific files, or folders, that were _pre-selected_ by the runtime itself. This is a more robust, much more granular control on what programs can do than it would be possible with traditional file permissions, or even with chroot systems. + +Coding-wise, functions for things like basic management of files, folders, network connections or time are needed by almost any program. Therefore the corresponding WASI interfaces are designed as similar as possible to their POSIX equivalents, and all packaged into one “wasi-core” module, that every WASI-compliant runtime must contain. + +A version of the [libc][8] standard C library, rewritten usi wasi-core functions, is already available and, [according to its developers][9], already “sufficiently stable and usable for many purposes”.  + +All the other virtual interfaces that WASI includes, or will include over time, are standardized and packaged as separate modules,  without forcing any runtime to support all of them. In the next article we will see how some of these WASI components are already used today. + +The post [WASI, Bringing WebAssembly Way Beyond Browsers][10] appeared first on [Linux Foundation – Training][11]. + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/wasi-bringing-webassembly-way-beyond-browsers/ + +作者:[Dan Brown][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://training.linuxfoundation.org/announcements/wasi-bringing-webassembly-way-beyond-browsers/ +[b]: https://github.com/lujun9972 +[1]: https://training.linuxfoundation.org/announcements/an-introduction-to-webassembly/ +[2]: https://training.linuxfoundation.org/announcements/webassembly-security-now-and-in-the-future/ +[3]: https://webassembly.org/docs/non-web/ +[4]: https://www.gnu.org/software/libc/manual/html_node/POSIX.html#POSIX +[5]: https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webassembly-system-interface/ +[6]: https://github.com/appcypher/awesome-wasm-runtimes +[7]: https://github.com/WebAssembly/WASI/blob/main/docs/WASI-overview.md#capability-oriented +[8]: https://en.wikipedia.org/wiki/C_standard_library +[9]: https://github.com/WebAssembly/wasi-libc +[10]: https://training.linuxfoundation.org/announcements/wasi-bringing-webassembly-way-beyond-browsers/ +[11]: https://training.linuxfoundation.org/ From 3129efac664d8860173a27e97ea39b94261dc87d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 17 Apr 2021 05:03:40 +0800 Subject: [PATCH 702/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210417=20?= =?UTF-8?q?How=20to=20Download=20Ubuntu=20via=20Torrent=20[Absolute=20Begi?= =?UTF-8?q?nner=E2=80=99s=20Tip]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210417 How to Download Ubuntu via Torrent -Absolute Beginner-s Tip.md --- ...tu via Torrent -Absolute Beginner-s Tip.md | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 sources/tech/20210417 How to Download Ubuntu via Torrent -Absolute Beginner-s Tip.md diff --git a/sources/tech/20210417 How to Download Ubuntu via Torrent -Absolute Beginner-s Tip.md b/sources/tech/20210417 How to Download Ubuntu via Torrent -Absolute Beginner-s Tip.md new file mode 100644 index 0000000000..a14a44fffd --- /dev/null +++ b/sources/tech/20210417 How to Download Ubuntu via Torrent -Absolute Beginner-s Tip.md @@ -0,0 +1,79 @@ +[#]: subject: (How to Download Ubuntu via Torrent [Absolute Beginner’s Tip]) +[#]: via: (https://itsfoss.com/download-ubuntu-via-torrent/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +How to Download Ubuntu via Torrent [Absolute Beginner’s Tip] +====== + +Downloading Ubuntu is pretty straightforward. You go to its [official website][1]. Click on the [desktop download section][2], select the appropriate Ubuntu version and hit the download button. + +![][3] + +Ubuntu is available as a single image of more than 2.5 GB in size. The direct download works well for people with high-speed internet connection. + +However, if you have a slow or inconsistent internet connection, you’ll have a difficult time downloading such a big file. The download may be interrupted several times in the process or may take several hours. + +![Direct download may take several hours for slow internet connections][4] + +### Downloading Ubuntu via Torrent + +If you also suffer from limited data or slow internet connection, using a download manager or torrent would be a better option. I am not going to discuss what torrent is in this quick tutorial. Just know that with torrents, you can download a large file in a number of sessions. + +The Good thing is that Ubuntu actually provides downloads via torrents. The bad thing is that it is hidden on the website and difficult to guess if you are not familiar with it. + +If you want to download Ubuntu via torrent, go to your chosen Ubuntu version’s section and look for **alternative downloads**. + +![][5] + +**Click on this “alternative downloads” link** and it will open a new web page. **Scroll down** on this page to see the BitTorrent section. You’ll see the option to download the torrent files for all the available versions. If you are going to use Ubuntu on your personal computer or laptop, you should go with the desktop version. + +![][6] + +Read [this article to get some guidance on which Ubuntu version][7] you should be using. Considering that you are going to use this distribution, having some ideas about [Ubuntu LTS and non-LTS release would be helpful][8]. + +#### How do you use the download torrent file for getting Ubuntu? + +I presumed that you know how to use torrent. If not, let me quickly summarize it for you. + +You have downloaded a .torrent file of a few KB in size. You need to download and install a Torrent application like uTorrent or Deluge or BitTorrent. + +I recommend using [uTorrent][9] on Windows. If you are using some Linux distribution, you should already have a [torrent client like Transmission][10]. If not, you can install it from your distribution’s software manager. + +Once you have installed the torrent application, run it. Now drag and drop the .torrent file you had downloaded from the website of Ubuntu. You may also use the open with option from the menu. + +Once the torrent file has been added to the Torrent application, it starts downloading the file. If you turn off the system, the download is paused. Start the Torrent application again and the download resumes from the same point. + +When the download is 100% complete, you can use it to [install Ubuntu afresh][11] or in [dual boot with Windows][12]. + +Enjoy Ubuntu :) + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/download-ubuntu-via-torrent/ + +作者:[Abhishek Prakash][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/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://ubuntu.com +[2]: https://ubuntu.com/download/desktop +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/download-ubuntu.png?resize=800%2C325&ssl=1 +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/slow-direct-download-ubuntu.png?resize=800%2C365&ssl=1 +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/ubuntu-torrent-download.png?resize=800%2C505&ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/ubuntu-torrent-download-option.png?resize=800%2C338&ssl=1 +[7]: https://itsfoss.com/which-ubuntu-install/ +[8]: https://itsfoss.com/long-term-support-lts/ +[9]: https://www.utorrent.com/ +[10]: https://itsfoss.com/best-torrent-ubuntu/ +[11]: https://itsfoss.com/install-ubuntu/ +[12]: https://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ From 002db69e4c4b67230fb50546d2ede5be4df90ac7 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 17 Apr 2021 05:03:57 +0800 Subject: [PATCH 703/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210416=20?= =?UTF-8?q?Play=20a=20fun=20math=20game=20with=20Linux=20commands?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210416 Play a fun math game with Linux commands.md --- ...lay a fun math game with Linux commands.md | 209 ++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 sources/tech/20210416 Play a fun math game with Linux commands.md diff --git a/sources/tech/20210416 Play a fun math game with Linux commands.md b/sources/tech/20210416 Play a fun math game with Linux commands.md new file mode 100644 index 0000000000..6a179e1ba6 --- /dev/null +++ b/sources/tech/20210416 Play a fun math game with Linux commands.md @@ -0,0 +1,209 @@ +[#]: subject: (Play a fun math game with Linux commands) +[#]: via: (https://opensource.com/article/21/4/math-game-linux-commands) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Play a fun math game with Linux commands +====== +Play the numbers game from the popular British game show "Countdown" at +home. +![Math formulas in green writing][1] + +Like many people, I've been exploring lots of new TV shows during the pandemic. I recently discovered a British game show called _[Countdown][2]_, where contestants play two types of games: a _words_ game, where they try to make the longest word out of a jumble of letters, and a _numbers_ game, where they calculate a target number from a random selection of numbers. Because I enjoy mathematics, I've found myself drawn to the numbers game. + +The numbers game can be a fun addition to your next family game night, so I wanted to share my own variation of it. You start with a collection of random numbers, divided into "small" numbers from 1 to 10 and "large" numbers that are 15, 20, 25, and so on until 100. You pick any combination of six numbers from both large and small numbers. + +Next, you generate a random "target" number between 200 and 999. Then use simple arithmetic operations with your six numbers to try to calculate the target number using each "small" and "large" number no more than once. You get the highest number of points if you calculate the target number exactly and fewer points if you can get within 10 of the target number. + +For example, if your random numbers were 75, 100, 2, 3, 4, and 1, and your target number was 505, you might say _2+3=5_, _5×100=500_, _4+1=5_, and _5+500=505_. Or more directly: (**2**+**3**)×**100** \+ **4** \+ **1** = **505**. + +### Randomize lists on the command line + +I've found the best way to play this game at home is to pull four "small" numbers from a pool of 1 to 10 and two "large" numbers from multiples of five from 15 to 100. You can use the Linux command line to create these random numbers for you. + +Let's start with the "small" numbers. I want these to be in the range of 1 to 10. You can generate a sequence of numbers using the Linux `seq` command. You can run `seq` a few different ways, but the simplest form is to provide the starting and ending numbers for the sequence. To generate a list from 1 to 10, you might run this command: + + +``` +$ seq 1 10 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +``` + +To randomize this list, you can use the Linux `shuf` ("shuffle") command. `shuf` will randomize the order of whatever you give it, usually a file. For example, if you send the output of the `seq` command to the `shuf` command, you will receive a randomized list of numbers between 1 and 10: + + +``` +$ seq 1 10 | shuf +3 +6 +8 +10 +7 +4 +5 +2 +1 +9 +``` + +To select just four random numbers from a list of 1 to 10, you can send the output to the `head` command, which prints out the first few lines of its input. Use the `-4` option to specify that `head` should print only the first four lines: + + +``` +$ seq 1 10 | shuf | head -4 +6 +1 +8 +4 +``` + +Note that this list is different from the earlier example because `shuf` will generate a random order every time. + +Now you can take the next step to generate the random list of "large" numbers. The first step is to generate a list of possible numbers starting at 15, incrementing by five, until you reach 100. You can generate this list with the Linux `seq` command. To increment each number by five, insert another option for the `seq` command to indicate the _step_: + + +``` +$ seq 15 5 100 +15 +20 +25 +30 +35 +40 +45 +50 +55 +60 +65 +70 +75 +80 +85 +90 +95 +100 +``` + +And just as before, you can randomize this list and select two of the "large" numbers: + + +``` +$ seq 15 5 100 | shuf | head -2 +75 +40 +``` + +### Generate a random number with Bash + +I suppose you could use a similar method to select the game's target number from the range 200 to 999. But the simplest solution to generate a single random value is to use the `RANDOM` variable directly in Bash. When you reference this built-in variable, Bash generates a large random number. To put this in the range of 200 to 999, you need to put the random number into the range 0 to 799 first, then add 200. + +To put a random number into a specific range starting at 0, you can use the **modulo** arithmetic operation. Modulo calculates the _remainder_ after dividing two numbers. If I started with 801 and divided by 800, the result is 1 _with a remainder of_ 1 (the modulo is 1). Dividing 800 by 800 gives 1 _with a remainder of_ 0 (the modulo is 0). And dividing 799 by 800 results in 0 _with a remainder of_ 799 (the modulo is 799). + +Bash supports arithmetic expansion with the `$(( ))` construct. Between the double parentheses, Bash will perform arithmetic operations on the values you provide. To calculate the modulo of 801 divided by 800, then add 200, you would type: + + +``` +$ echo $(( 801 % 800 + 200 )) +201 +``` + +With that operation, you can calculate a random target number between 200 and 999: + + +``` +$ echo $(( RANDOM % 800 + 200 )) +673 +``` + +You might wonder why I used `RANDOM` instead of `$RANDOM` in my Bash statement. In arithmetic expansion, Bash will automatically expand any variables within the double parentheses. You don't need the `$` on the `$RANDOM` variable to reference the value of the variable because Bash will do it for you. + +### Playing the numbers game + +Let's put all that together to play the numbers game. Generate two random "large" numbers, four random "small" values, and the target value: + + +``` +$ seq 15 5 100 | shuf | head -2 +75 +100 +$ seq 1 10 | shuf | head -4 +4 +3 +10 +2 +$ echo $(( RANDOM % 800 + 200 )) +868 +``` + +My numbers are **75**, **100**, **4**, **3**, **10**, and **2**, and my target number is **868**. + +I can get close to the target number if I do these arithmetic operations using each of the "small" and "large" numbers no more than once: + + +``` +10×75 = 750 +750+100 = 850 + +and: + +4×3 = 12 +850+12 = 862 +862+2 = 864 +``` + +That's only four away—not bad! But I found this way to calculate the exact number using each random number no more than once: + + +``` +4×2 = 8 +8×100 = 800 + +and: + +75-10+3 = 68 +800+68 = 868 +``` + +Or I could perform _these_ calculations to get the target number exactly. This uses only five of the six random numbers: + + +``` +4×3 = 12 +75+12 = 87 + +and: + +87×10 = 870 +870-2 = 868 +``` + +Give the _Countdown_ numbers game a try, and let us know how well you did in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/math-game-linux-commands + +作者:[Jim Hall][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/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/edu_math_formulas.png?itok=B59mYTG3 (Math formulas in green writing) +[2]: https://en.wikipedia.org/wiki/Countdown_%28game_show%29 From 93756d2452b1b4347e718dcc9b9d05b50ac9feb1 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 17 Apr 2021 05:04:29 +0800 Subject: [PATCH 704/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210416=20?= =?UTF-8?q?Notes=20on=20building=20debugging=20puzzles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210416 Notes on building debugging puzzles.md --- ...416 Notes on building debugging puzzles.md | 228 ++++++++++++++++++ 1 file changed, 228 insertions(+) create mode 100644 sources/tech/20210416 Notes on building debugging puzzles.md diff --git a/sources/tech/20210416 Notes on building debugging puzzles.md b/sources/tech/20210416 Notes on building debugging puzzles.md new file mode 100644 index 0000000000..593526933a --- /dev/null +++ b/sources/tech/20210416 Notes on building debugging puzzles.md @@ -0,0 +1,228 @@ +[#]: subject: (Notes on building debugging puzzles) +[#]: via: (https://jvns.ca/blog/2021/04/16/notes-on-debugging-puzzles/) +[#]: author: (Julia Evans https://jvns.ca/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Notes on building debugging puzzles +====== + +Hello! This week I started building some choose-your-own-adventure-style puzzles about debugging networking problems. I’m pretty excited about it and I’m trying to organize my thoughts so here’s a blog post! + +The two I’ve made so far are: + + * [The Case of the Connection Timeout][1] + * [The Case of the Slow Website][2] + + + +I’ll talk about how I came to this idea, design decisions I made, how it works, what I think is hard about making these puzzles, and some feedback I’ve gotten so far. + +### why this choose-your-own-adventure format? + +I’ve been thinking a lot about DNS recently, and how to help people troubleshoot their DNS issues. So on Tuesday I was sitting in a park with a couple of friends chatting about this. + +We started out by talking about the idea of flowcharts (“here’s a flowchart that will help you debug any DNS problem”). I’ve don’t think I’ve ever seen a flowchart that I found helpful in solving a problem, so I found it really hard to imagine creating one – there are so many possibilities! It’s hard to be exhaustive! It would be disappointing if the flowchart failed and didn’t give you your answer! + +But then someone mentioned choose-your-own-adventure games, and I thought about something I **could** relate to – debugging a problem together with someone who knows things that I don’t! + +So I thought – what if I made a choose-your-own-adventure game where you’re given the symptoms of a specific networking bug, and you have to figure out how to diagnose it? + +I got really excited about this and immediately went home and started putting something together in Twine. + +Here are some design decisions I’ve made so far. Some of them might change. + +### design decision: the mystery has 1 specific bug + +Each mystery has one very specific bug, ideally a bug that I’ve actually run into in the past. Your mission is to figure out the cause of the bug and fix it. + +### design decision: show people the actual output of the tools they’re using + +All of the bugs I’m starting with are networking issues, and the way you solve them is to use various tools (like dig, curl, tcpdump, ping, etc) to get more information. + +Originally I thought of writing the game like this: + + 1. You choose “Use curl” + 2. It says “You run ``. You see that the output tells you ``“ + + + +But I realized that immediately interpreting the output of a command for someone is extremely unrealistic – one of the biggest problems with using some of these command line networking tools is that their output is hard to interpret! + +So instead, the puzzle: + + 1. Asks what tool you want to use + 2. Tells you what command they ran, and shows you the output of the command + 3. Asks you to interpret the output (you type it in in a freeform text box) + 4. Tells you the “correct” interpretation of the output and shows you how you could have figured it out (by highlighting the relevant parts of the output) + + + +This really lines up with how I’ve learned about these tools in real life – I don’t learn about how to read all of the output all at once, I learn it in bits and pieces by debugging real problems. + +### design decision: make the output realistic + +This is sort of obvious, but in order to give someone output to help them diagnose a bug, the output needs to be a realistic representation of what would actually happen. + +I’ve been doing this by reproducing the bug in a virtual machine (or on my laptop), and then running the commands in the same way I would to fix the bug in real life and paste their output. + +Reproducing the bug isn’t always easy, but once I’ve reproduced it it makes building the puzzle much more straightforward than trying to imagine what tcpdump would theoretically output in a given situation. + +### design decision: let people collect “knowledge” throughout the mystery + +When I debug, I think about it as slowly collecting new pieces of information as I go. So in this mystery, every time you figure out a new piece of information, you get a little box that looks like this: + +![][3] + +And in the sidebar, you have a sort of “inventory” that lists all of the knowledge you’ve collected so far. It looks like this: + +![][4] + +### design decision: you always figure out the bug + +My friend Sumana pointed out an interesting difference between this and normal choose-your-own-adventure games: in the choose-your-own-adventure games I grew up reading, you lose a lot! You make the wrong choice, and you fall into a pit and die. + +But that’s not how debugging works in my experience. When debugging, if you make a “wrong” choice (for example by making a guess about the bug that isn’t correct), there’s no cost except your time! So you can always go back, keep trying, and eventually figure out what’s going on. + +I think that “you always win” is sort of realistic in the sense that with any bug you can always figure out what the bug is, given: + + 1. enough time + 2. enough understanding of how the systems you’re debugging work + 3. tools that can give you information about what’s happening + + + +I’m still not sure if I want all bugs to result in “you fix the bug!” – sometimes bugs are impossible to fix if they’re caused by a system that’s outside of your control! One really interesting idea Sumana had was to have the resolution sometimes be “you submit a really clear and convincing bug report and someone else fixes it”. + +### design decision: include red herrings sometimes + +In debugging in real life, there are a lot of red herrings! Sometimes you see something that looks weird, and you spend three hours looking into it, and then you realize that wasn’t it at all. + +One of the mysteries right now has a red herring, and the way I came up with it was that I ran a command and I thought “wait, the output of that is pretty confusing, it’s not clear how to interpret that”. So I just included the confusing output in the mystery and said “hey, what do you think it means?”. + +One thing I like about including red herrings is that it lets me show how you can prove what the cause of the bug **isn’t** which is even harder than proving what the cause of the bug is. + +### design decision: use free form text boxes + +Here’s an example of what it looks like to be asked to interpret some output. You’re asked a question and you fill in the answer in a text box. + +![][5] + +I think I like using free form text boxes instead of multiple choice because it feels a little more realistic to me – in real life, when you see some output like this, you don’t get a list of choices! + +### design decision: don’t do anything with what you enter in the text box + +No matter what you enter in the text box (or if you say “I don’t know”), exactly the same thing happens. It’ll send you to a page that tells you the answer and explains the reasoning. So you have to think about what you think the answer might be, but if you get it “wrong”, it’s no big deal. + +The reason I’m doing this is basically “it’s very easy to implement”, but I think there’s maybe also something nice about it for the person using it – if you don’t know, it’s totally okay! You can learn something new and keep moving! You don’t get penalized for your “wrong” answers in any way. + +### design decision: the epilogue + +At the end of the game, there’s a very short epilogue where it talks about how likely you are to run into this bug in real life / how realistic this is. I think I need to expand on this to answer other questions people might have had while going through it, but I think it’s going to be a nice place to wrap up loose ends. + +### how long each one takes to play: 5 minutes + +People seem to report so far that each mystery takes about 5 minutes to play, which feels reasonable to me. I think I’m most likely to extend this by making lots of different 5-minute mysteries rather than making one really long mystery, but we’ll see. + +### what’s hard: reproducing the bug + +Figuring out how to reproduce a given bug is actually not that easy – I think I want to include some pretty weird bugs, and setting up a computer where that bug is happening in a realistic way isn’t actually that easy. I think this just takes some work and creativity though. + +### what’s hard: giving realistic options + +The most common critique I got was of the form “In this situation I would have done X but you didn’t include X as an option”. Some examples of X: “ping the problem host”, “ssh to the problem host and run tcpdump there”, “look at the log file”, “use netstat”, etc. + +I think it’s possible to make a lot of progress on this with playtesting – if I playtest a mystery with a bunch of people and ask them to tell me when there was an option they wish they had, I can add that option pretty easily! + +Because I can actually reproduce the bug, providing an option like “run netstat” is pretty straightforward – all I have to do is go to the VM where I’ve reproduced the bug, run `netstat`, and put the output into the game. + +A couple of people also said that the game felt too “linear” or didn’t branch enough. I’m curious about whether that will naturally come out of having more realistic options. + +### how it works: it’s a Twine game! + +I felt like Twine was the obvious choice for this even though I’d never used it before – I’d heard so many good things about it over the years. + +You can see all of the source code for The Case of the Connection Timeout in [connection-timeout.twee][6] and [common.twee][7], which has some shared code between all the games. + +A few notes about using Twine: + + * I’m using SugarCube, the [sugarcube docs are very good][8] + * I’m using [tweego][9] to translate the `.twee` files in to a HTML page. I started out using the visual Twine editor to do my editing but switched to `tweego` pretty quickly because I wanted to use version control and have a more text-based workflow. + * The final output is one big HTML file that includes all the images and CSS and Javascript inline. The final HTML files are about 800K which seems reasonable to me. + * I base64-encode all the images in the game and include them inline in the file + * The [Twine wiki][10] and forums have a lot of great information and between the Twine wiki, the forums, and the Sugarcube docs I could pretty easily find answers to all my questions. + + + +I used pretty much the exact Twine workflow from Em Lazerwalker’s great post [A Modern Developer’s Workflow For Twine][11]. + +I won’t explain how Twine works because it has great documentation and it would make this post way too long. + +### some feedback so far + +I posted this on Twitter and asked for feedback. Some common pieces of feedback I got: + +things people liked: + + * maybe 180 “I love this, this was so fun, I learned something new” + * A bunch of people specifically said that they liked learning how to interpret tcpdump’s output format + * A few people specifically mentioned that they liked the “what you know” list and the mechanic of hunting for clues and how it breaks down the debugging process. + + + +some suggestions for improvements: + + * Like I mentioned before, lots of people said “I wanted to try X but it wasn’t an option” + * One of the puzzles had a resolution to the bug that some people found unsatisfying (they felt it was more of a workaround than a fix, which I agreed with). I updated it to add a different resolution that was more satisfying. + * There were some technical issues (it could be more mobile-friendly, one of the images was hard to read, I needed to add a “Submit” button to one of the forms) + * Right now the way the text boxes work is that no matter what you type, the exact same thing happens. Some people found this a bit confusing, like “why did it act like I answered correctly if my answer was wrong”. This definitely needs some work. + + + +### some goals of this project + +Here’s what I think the goals of this project are: + + 1. help people learn about **tools** (like tcpcdump, dig, and curl). How do you use each tool? What questions can they be used to answer? How do you interpret their output? + 2. help people learn about **bugs**. There are some super common bugs that we run into over and over, and once you see a bug once it’s easier to recognize the same bug in the future. + 3. help people get better at the **debugging process** (gathering data, asking questions) + + + +### what experience is this trying to imitate? + +Something I try to keep in mind with all my projects is – what real-life experience does this reproduce? For example, I kind of think of my zines as being the experience “your coworker explains something to you in a really clear way”. + +I think the experience here might be “you’re debugging a problem together with your coworker and they’re really knowledgeable about the tools you’re using”. + +### that’s all! + +I’m pretty excited about this project right now – I’m going to build at least a couple more of these and see how it goes! If things go well I might make this into my first non-zine thing for sale – maybe it’ll be a collection of 12 small debugging mysteries! We’ll see. + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2021/04/16/notes-on-debugging-puzzles/ + +作者:[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://mysteries.wizardzines.com/connection-timeout.html +[2]: https://mysteries.wizardzines.com/slow-website.html +[3]: https://jvns.ca/images/newinfo.png +[4]: https://jvns.ca/images/sidebar-mystery.png +[5]: https://jvns.ca/images/textboxes.png +[6]: https://github.com/jvns/twine-stories/blob/2914c4326e3ff760a0187b2cfb15161928d6335b/connection-timeout.twee +[7]: https://github.com/jvns/twine-stories/blob/2914c4326e3ff760a0187b2cfb15161928d6335b/common.twee +[8]: https://www.motoslave.net/sugarcube/2/docs/ +[9]: https://www.motoslave.net/tweego/ +[10]: https://twinery.org/wiki/ +[11]: https://dev.to/lazerwalker/a-modern-developer-s-workflow-for-twine-4imp From 654f9429155869f10ab3897a67495e95e5cd3062 Mon Sep 17 00:00:00 2001 From: Weitian LI Date: Sat, 17 Apr 2021 10:10:27 +0800 Subject: [PATCH 705/818] Translated: 5 signs you're a groff programmer --- ...10410 5 signs you-re a groff programmer.md | 77 ------------------- ...10410 5 signs you-re a groff programmer.md | 76 ++++++++++++++++++ 2 files changed, 76 insertions(+), 77 deletions(-) delete mode 100644 sources/tech/20210410 5 signs you-re a groff programmer.md create mode 100644 translated/tech/20210410 5 signs you-re a groff programmer.md diff --git a/sources/tech/20210410 5 signs you-re a groff programmer.md b/sources/tech/20210410 5 signs you-re a groff programmer.md deleted file mode 100644 index 9cb584d1bc..0000000000 --- a/sources/tech/20210410 5 signs you-re a groff programmer.md +++ /dev/null @@ -1,77 +0,0 @@ -[#]: subject: (5 signs you're a groff programmer) -[#]: via: (https://opensource.com/article/21/4/groff-programmer) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) -[#]: collector: (lujun9972) -[#]: translator: (liweitianux) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -5 signs you're a groff programmer -====== -Learning groff, an old-school text processor, is like learning to ride a -bicycle. -![Typewriter in the grass][1] - -I first discovered Unix systems in the early 1990s, when I was an undergraduate at university. I liked it so much that I replaced the MS-DOS system on my home computer with the Linux operating system. - -One thing that Linux didn't have in the early to mid-1990s was a word processor. A standard office application on other desktop operating systems, a word processor lets you edit text easily. I often used a word processor on DOS to write my papers for class. I wouldn't find a Linux-native word processor until the late 1990s. Until then, word processing was one of the rare reasons I maintained dual-boot on my first computer, so I could occasionally boot back into DOS to write papers. - -Then I discovered that Linux provided kind of a word processor. GNU troff, better known as [groff][2], is a modern implementation of a classic text processing system called troff, short for "typesetter roff," which is an improved version of the nroff system. And nroff was meant to be a new implementation of the original roff (which stood for "run off," as in to "run off" a document). - -With text processing, you edit text in a plain text editor, and you add formatting through macros or other processing commands. You then process that text file through a text-processing system such as groff to generate formatted output suitable for a printer. Another well-known text processing system is LaTeX, but groff was simple enough for my needs. - -With a little practice, I found I could write my class papers just as easily in groff as I could using a word processor on Linux. While I don't use groff to write documents today, I still remember the macros and commands to generate printed documents with it. And if you're the same and you learned how to write with groff all those years ago, you probably recognize these five signs that you're a groff writer. - -### 1\. You have a favorite macro set - -You format a document in groff by writing plain text interspersed with macros. A macro in groff is a short command that starts with a single period at the beginning of a line. For example: if you want to insert a few lines into your output, the `.sp 2` macro command adds two blank lines. groff supports other basic macros for all kinds of formatting. - -To make formatting a document easier for the writer, groff also provides different _macro sets_, collections of macros that let you format documents your own way. The first macro set I learned was the `-me` macro set. Really, the macro set is called the `e` macro set, and you specify the `e` macro set when you process a file using the `-me` option. - -groff includes other macro sets, too. For example, the `-man` macro set used to be the standard macro set to format the built-in _manual_ pages on Unix systems, and the `-ms` macro set is often used to format certain other technical documents. If you learned to write with groff, you probably have a favorite macro set. - -### 2\. You want to focus on your content, not the formatting - -One great feature of writing with groff is that you can focus on your _content_ and not worry too much about what it looks like. That is a handy feature for technical writers. groff is a great "distraction-free" environment for professional writers. At least, as long as you don't mind delivering your output in any of the formats that groff supports with the `-T` command-line option, including PDF, PostScript, HTML, and plain text. You can't generate a LibreOffice ODT file or Word DOC file directly from groff. - -Once you get comfortable writing in groff, the macros start to _disappear_. The formatting macros become part of the background, and you focus purely on the text in front of you. I've done enough writing in groff that I don't even see the macros anymore. Maybe it's like writing programming code, and your mind just switches gears, so you think like a computer and see the code as a set of instructions. For me, writing in groff is like that; I just see my text, and my mind interprets the macros automatically into formatting. - -### 3\. You like the old-school feel - -Sure, it might be _easier_ to write your documents with a more typical word processor like LibreOffice Writer or even Google Docs or Microsoft Word. And for certain kinds of documents, a desktop word processor is the right fit. But if you want the "old-school" feel, it's hard to beat writing in groff. - -I'll admit that I do most of my writing with LibreOffice Writer, which does an outstanding job. But when I get that itch to do it "old-school," I'll open an editor and write my document using groff. - -### 4\. You like that you can use it anywhere - -groff (and its cousins) are a standard package on almost any Unix system. And with groff, the macros don't change. For example, the `-me` macros should be the same from system to system. So once you've learned to use the macros on one system, you can use them on the next system. - -And because groff documents are just plain text, you can use any editor you like to edit your documents for groff. I like to use GNU Emacs to edit my groff documents, but you can use GNOME Gedit, Vim, or your [favorite text editor][3]. Most editors include some kind of "mode" that will highlight the groff macros in a different color from the rest of your text to help you spot errors before processing the file. - -### 5\. You wrote this article in -me - -When I decided to write this article, I thought the best way would be to use groff directly. I wanted to demonstrate how flexible groff was in preparing documents. So even though you're reading this on a website, the article was originally written using groff. - -I hope this has interested you in learning how to use groff to write documents. If you'd like to use more advanced functions in the `-me` macro set, refer to Eric Allman's _Writing papers with groff using -me_, which you should find on your system as **meintro.me** in groff's documentation. It's a great reference document that explains other ways to format papers using the `-me` macros. - -I've also included a copy of the original draft of my article that uses the `-me` macros. Save the file to your system as **five-signs-groff.me**, and run it through groff to view it. The `-T` option sets the output type, such as `-Tps` to generate PostScript output or `-Thtml` to create an HTML file. For example: - -groff -me -Thtml five-signs-groff.me > five-signs-groff.html - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/groff-programmer - -作者:[Jim Hall][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/jim-hall -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/doc-dish-lead.png?itok=h3fCkVmU (Typewriter in the grass) -[2]: https://en.wikipedia.org/wiki/Groff_(software) -[3]: https://opensource.com/article/21/2/open-source-text-editors diff --git a/translated/tech/20210410 5 signs you-re a groff programmer.md b/translated/tech/20210410 5 signs you-re a groff programmer.md new file mode 100644 index 0000000000..8fd7d28acf --- /dev/null +++ b/translated/tech/20210410 5 signs you-re a groff programmer.md @@ -0,0 +1,76 @@ +[#]: subject: (5 signs you're a groff programmer) +[#]: via: (https://opensource.com/article/21/4/groff-programmer) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: (liweitianux) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +你是 groff 程序员的 5 个标志 +====== +学习 groff,一款老派的文本处理软件,类似于学习骑自行车。 +![Typewriter in the grass][1] + +我第一次发现 Unix 系统是在 90 年代早期,当时我还在大学读本科。我太喜欢这个系统了,所以我将家里电脑上的 MS-DOS 也换成了 Linux 系统。 + +在 90 年代早期至中期,Linux 所缺失的一个东西是字处理软件word processor。在其他桌面操作系统上,这是一套标准的办公软件,其中的字处理软件能让你轻松地编辑文本。我经常在 DOS 上使用字处理软件来撰写课程论文。直到 90 年代末,我都没能找到一款 Linux 原生的字处理软件。也直到那时,文字处理是我在第一台电脑上保留双启动的个别原因之一,那样我可以偶尔切换到 DOS 系统写论文。 + +后来,我发现 Linux 提供了一款文字处理软件。GNU troff,一般称为 [groff][2],是经典的文本处理系统 troff 的一个现代实现。troff 是 typesetter roff 的简称,是 nroff 系统的改进版本,而 nroff 又是最初的 roff 系统的新实现。roff 表示快速印出run off,比如“快速印出”一份文档。 + +利用文本处理系统,你在纯文本编辑器里编辑内容,通过macro或其他处理命令来添加格式。然后将文件输入文本处理系统,比如 groff,来生成适合打印的格式化输出。另一个知名的文本处理系统是 LaTeX,但是 groff 已经满足我的需求,而且足够简单。 + +经过一点实践,我发现在 Linux 上使用 groff 来撰写课程论文与使用字处理软件一样容易。尽管我现在不再使用 groff 来写文档了,我依然记得它的那些宏和命令。如果你也是这样并且在那么多年之前学会了使用 groff 写作,你可能会认出这 5 个你是 groff 程序员的标志。 + +### 1\. 你有一个最喜欢的宏集 + +输入由宏点缀的纯文本,你便能在 groff 里对文档进行格式化。groff 里的宏是行首为单个句点的短命令。例如:如果你想在输出里插入几行,宏命令 `.sp 2` 会添加两个空行。groff 还具有其他一些基本的宏,支持各种各样的格式化。 + +为了能让作者更容易地格式化文档,groff 还提供了不同的 _宏集macro set_,即一组能够让你以自己的方式格式化文档的宏的集合。我学会的第一个宏集是 `-me` 宏集。这个宏集的名称其实是 `e`,而且你在处理文件时使用 `-me` 选项来指定这个 `e` 宏集。 + +groff 还包含其他宏集。例如,`-man` 宏集以前是用于格式化 Unix 系统内置 _手册页manual page_ 的标准宏集,`-ms` 宏集经常用于格式化其他一些技术文档。如果你学会了使用 groff 写作,你可能有一个最喜欢的宏集。 + +### 2\. 你想专注于内容而非格式 + +使用 groff 写作的一个很好的特点是你能专注于你的 _内容_,而不用太担心它看起来会怎么样。对于技术作者而言这是一个很实用的特点。对专业作家来说,groff 是一个很好的、“不会分心”的写作环境。至少,你不必在意使用 groff `-T` 选项所支持的任何格式来交付内容,包括 PDF、PostScript、HTML、以及纯文本。不过,你无法直接从 groff 生成 LibreOffice ODT 文件或者 Word DOC 文件。 + +一旦你使用 groff 写作变得有信心之后,宏便开始 _消失_。用于格式化的宏变成了背景,而你纯粹地专注于眼前的文本内容。我已经使用 groff 写了足够多,以至于我甚至不再看见那些宏。也许,这就像写代码,而你的大脑随意换档,于是你就像计算机一样思考,看到的代码就是一组指令。对我而言,使用 groff 写作就像那样:我仅仅看到文本,而我的大脑将宏自动地翻译成格式。 + +### 3\. 你喜欢怀旧复古的感觉 + +当然,使用一个更典型的字处理软件来写你的文档可能更 _简单_,比如 LibreOffice Writer、甚至 Google Docs 或 Microsoft Word。而且对于某些种类的文档,桌面型字处理软件才是正确的选择。但是,如果你想要这种怀旧复古的感觉,使用 groff 写作很难被打败。 + +我会承认我大部分的写作是用 LibreOffice Writer 完成的,它的表现很出色。但是当我渴望以一种怀旧复古的方式去做时,我会打开编辑器用 groff 来写文档。 + +### 4\. 你希望能到处使用它 + +groff 及其同类软件在几乎所有的 Unix 系统上都是一个标准软件包。此外,groff 宏不会随系统而变化。比如,`-me` 宏集在不同系统上都应该相同。因此,一旦你在一个系统上学会使用宏,你能在下一个系统上同样地使用它们。 + +另外,因为 groff 文档就是纯文本,所以你能使用任何你喜欢的编辑器来编辑文档。我喜欢使用 GNU Emacs 来编辑我的 groff 文档,但是你可能使用 GNOME Gedit、Vim、其他你[最喜欢的文本编辑器][3]。大部分编辑器会支持这样一种模式,其中 groff 宏会以不同的颜色高亮显示,帮助你在处理文件之前便能发现错误。 + +### 5\. 你使用 -me 写了这篇文章 + +当我决定要写这篇文章时,我认为最佳的方式便是直接使用 groff。我想要演示 groff 在编写文档方面是多么的灵活。所以,虽然你正在网上读这篇文章,但是它最初是用 groff 写的。 + +我希望这激发了你学习如何使用 groff 撰写文档的兴趣。如果你想学习 `-me` 宏集里更高级的函数,参考 Eric Allman 的《Writing papers with groff using -me》,你应该能在系统的 groff 文档找到,文件名为 **meintro.me**。这是一份很好的参考资料,还解释了使用 `-me` 宏集格式化论文的其他方式。 + +我还提供了这篇文章的原始草稿,其中使用了 `-me` 宏集。下载这个文件并保存为 **five-signs-groff.me**,然后输入 groff 处理来查看。`-T` 选项设置输出类型,比如 `-Tps` 用于生成 PostScript 输出,`-Thtml` 用于生成 HTML 文件。比如: + +groff -me -Thtml five-signs-groff.me > five-signs-groff.html + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/groff-programmer + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[liweitianux](https://github.com/liweitianux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/doc-dish-lead.png?itok=h3fCkVmU (Typewriter in the grass) +[2]: https://en.wikipedia.org/wiki/Groff_(software) +[3]: https://opensource.com/article/21/2/open-source-text-editors From 2d781092bc8abd49ee1b7d05893077bab3f13855 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 17 Apr 2021 11:03:12 +0800 Subject: [PATCH 706/818] PRF --- ...ur files with this open source software.md | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/translated/tech/20210412 Encrypt your files with this open source software.md b/translated/tech/20210412 Encrypt your files with this open source software.md index 9bbb82ac9d..0257479d34 100644 --- a/translated/tech/20210412 Encrypt your files with this open source software.md +++ b/translated/tech/20210412 Encrypt your files with this open source software.md @@ -3,14 +3,16 @@ [#]: author: (Seth Kenlon https://opensource.com/users/seth) [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) -用这个开源软件加密你的文件 +用开源的 VeraCrypt 加密你的文件 ====== -VeraCrypt 提供跨平台的开源文件加密功能。 -![Lock][1] + +> VeraCrypt 提供跨平台的开源文件加密功能。 + +![](https://img.linux.net.cn/data/attachment/album/202104/17/110244p1g4tbpnw00tqwq3.jpg) 许多年前,有一个名为 [TrueCrypt][2] 的加密软件。它的源码是可以得到的,尽管没有任何人声称曾对它进行过审计或贡献过。它的作者是(至今仍是)匿名的。不过,它是跨平台的,易于使用,而且真的非常有用。 @@ -20,7 +22,7 @@ TrueCrypt 最终关闭了,但一个名为 VeraCrypt 的替代项目迅速兴 ### 安装 VeraCrypt -你可以从 [VeraCrypt 下载页面][4]下载相应的安装文件,之后在所有主流平台上安装 VeraCrypt。 +你可以从 [VeraCrypt 下载页面][4] 下载相应的安装文件,之后在所有主流平台上安装 VeraCrypt。 另外,你也可以自己从源码构建它。在 Linux 上,它需要 wxGTK3、makeself 和通常的开发栈(Binutils、GCC 等)。 @@ -28,15 +30,13 @@ TrueCrypt 最终关闭了,但一个名为 VeraCrypt 的替代项目迅速兴 ### 创建一个 VeraCrypt 卷 -如果你刚接触 VeraCrypt,你必须先创建一个 VeraCrypt 加密卷(否则,你没有任何东西可以解密)。在 VeraCrypt 窗口中,点击左侧的 **Create Volume** 按钮。 +如果你刚接触 VeraCrypt,你必须先创建一个 VeraCrypt 加密卷(否则,你没有任何东西可以解密)。在 VeraCrypt 窗口中,点击左侧的 “Create Volume” 按钮。 ![Creating a volume with VeraCrypt][5] -(Seth Kenlon, [CC BY-SA 4.0][6]) +在出现的 VeraCrypt 的卷创建向导窗口中,选择要创建一个加密文件容器还是要加密整个驱动器或分区。向导将为你的数据创建一个保险库,所以请按照提示进行操作。 -在出现的 VeraCrypt 的**卷创建向导**窗口中,选择要创建一个加密文件容器还是要加密整个驱动器。向导将为你的数据创建一个保险库,所以请按照提示进行操作。 - -在本文中,我创建了一个文件容器。VeraCrypt 容器和其他文件很像:它保存在硬盘、外置硬盘、云存储或其他任何你能想到的存储数据的地方。与其他文件一样,它可以被移动、复制和删除。与大多数其他文件不同的是,它可以_容纳_更多的文件,这就是为什么我认为它是一个“保险库”,而 VeraCrypt 开发者将其称为“容器”。它的开发者将 VeraCrypt 文件称为“容器”,因为它可以包含其他数据对象;它与 LXC、Kubernetes 和其他现代 IT 机制所流行的容器技术无关。 +在本文中,我创建了一个文件容器。VeraCrypt 容器和其他文件很像:它保存在硬盘、外置硬盘、云存储或其他任何你能想到的存储数据的地方。与其他文件一样,它可以被移动、复制和删除。与大多数其他文件不同的是,它可以_容纳_更多的文件,这就是为什么我认为它是一个“保险库”,而 VeraCrypt 开发者将其称为“容器”。它的开发者将 VeraCrypt 文件称为“容器”,是因为它可以包含其他数据对象;它与 LXC、Kubernetes 和其他现代 IT 机制所流行的容器技术无关。 #### 选择一个文件系统 @@ -46,7 +46,7 @@ TrueCrypt 最终关闭了,但一个名为 VeraCrypt 的替代项目迅速兴 ### 挂载 VeraCrypt 加密卷 -当你创建了 VeraCrypt 卷,你就可以在 VeraCrypt 窗口中加载它。要挂载一个加密库,点击右侧的 **Select File** 按钮。选择你的加密文件,选择 VeraCrypt 窗口上半部分的一个编号栏,然后点击位于 VeraCrypt 窗口左下角的 **Mount** 按钮。 +当你创建了 VeraCrypt 卷,你就可以在 VeraCrypt 窗口中加载它。要挂载一个加密库,点击右侧的 “Select File” 按钮。选择你的加密文件,选择 VeraCrypt 窗口上半部分的一个编号栏,然后点击位于 VeraCrypt 窗口左下角的 “Mount” 按钮。 你挂载的卷在 VeraCrypt 窗口的可用卷列表中,你可以通过文件管理器访问该卷,就像访问一个外部驱动器一样。例如,在 KDE 上,我打开 [Dolphin][7],进入 `/media/veracrypt1`,然后我就可以把文件复制到我的保险库里。 @@ -58,9 +58,7 @@ TrueCrypt 最终关闭了,但一个名为 VeraCrypt 的替代项目迅速兴 ![Mounting a VeraCrypt volume][8] -(Seth Kenlon, [CC BY-SA 4.0][6]) - -关闭 VeraCrypt 容器和打开容器一样简单。在 VeraCrypt 窗口中选择列出的卷,然后点击 **Dismount**。你就不再能访问保险库中的文件,其他人也不会再有访问权。 +关闭 VeraCrypt 容器和打开容器一样简单。在 VeraCrypt 窗口中选择列出的卷,然后点击 “Dismount”。你就不能访问保险库中的文件了,其他人也不会再有访问权。 ### VeraCrypt 轻松实现跨平台加密 @@ -73,7 +71,7 @@ via: https://opensource.com/article/21/4/open-source-encryption 作者:[Seth Kenlon][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/) 荣誉推出 From a4a08e464ecabdd1cfda61ffac67f854fe0f5037 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 17 Apr 2021 11:03:57 +0800 Subject: [PATCH 707/818] PUB @geekpi https://linux.cn/article-13304-1.html --- ...10412 Encrypt your files with this open source software.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210412 Encrypt your files with this open source software.md (98%) diff --git a/translated/tech/20210412 Encrypt your files with this open source software.md b/published/20210412 Encrypt your files with this open source software.md similarity index 98% rename from translated/tech/20210412 Encrypt your files with this open source software.md rename to published/20210412 Encrypt your files with this open source software.md index 0257479d34..bf2e9d9fd2 100644 --- a/translated/tech/20210412 Encrypt your files with this open source software.md +++ b/published/20210412 Encrypt your files with this open source software.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13304-1.html) 用开源的 VeraCrypt 加密你的文件 ====== From f062ae86a7e1df1e339e101c3d6e3398bed27113 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 17 Apr 2021 17:45:01 +0800 Subject: [PATCH 708/818] PRF @wxy --- ...asons I use the Git cherry-pick command.md | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/translated/tech/20210331 3 reasons I use the Git cherry-pick command.md b/translated/tech/20210331 3 reasons I use the Git cherry-pick command.md index 01c228978c..183bdb85fe 100644 --- a/translated/tech/20210331 3 reasons I use the Git cherry-pick command.md +++ b/translated/tech/20210331 3 reasons I use the Git cherry-pick command.md @@ -3,36 +3,36 @@ [#]: author: (Manaswini Das https://opensource.com/users/manaswinidas) [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) 我使用 Git cherry-pick 命令的 3 个理由 ====== -> “挑选”可以解决 Git 仓库中的很多问题。以下是用 `git cherry-pick` 修复错误的三种方法。 +> “遴选”可以解决 Git 仓库中的很多问题。以下是用 `git cherry-pick` 修复错误的三种方法。 -![测量和烘烤樱桃派配方][1] +![](https://img.linux.net.cn/data/attachment/album/202104/17/174429qw1im6if6mf6zi9i.jpg) 在版本控制系统中摸索前进是一件很棘手的事情。对于一个新手来说,这可能是非常难以应付的,但熟悉版本控制系统(如 Git)的术语和基础知识是开始为开源贡献的第一步。 熟悉 Git 也能帮助你在开源之路上走出困境。Git 功能强大,让你感觉自己在掌控之中 —— 没有哪一种方法会让你无法恢复到工作版本。 -这里有一个例子可以帮助你理解“挑选”的重要性。假设你已经在一个分支上做了好几个提交,但你意识到这是个错误的分支!你现在该怎么办?你现在要做什么?要么在正确的分支上重复所有的修改,然后重新提交,要么把这个分支合并到正确的分支上。等等,前者太过繁琐,而你可能不想做后者。那么,有没有办法呢?是的,Git 已经为你准备好了。这就是挑选的作用。顾名思义,你可以用它从一个分支中手工挑选一个提交,然后转移到另一个分支。 +这里有一个例子可以帮助你理解“遴选cherry-pick”的重要性。假设你已经在一个分支上做了好几个提交,但你意识到这是个错误的分支!你现在该怎么办?你现在要做什么?要么在正确的分支上重复所有的变更,然后重新提交,要么把这个分支合并到正确的分支上。等一下,前者太过繁琐,而你可能不想做后者。那么,还有没有办法呢?有的,Git 已经为你准备好了。这就是“遴选”的作用。顾名思义,你可以用它从一个分支中手工遴选一个提交,然后转移到另一个分支。 -使用挑选的原因有很多。以下是其中的三个原因。 +使用遴选的原因有很多。以下是其中的三个原因。 ### 避免重复性工作 -如果你可以直接将相同的提交复制到另一个分支,就没有必要在不同的分支中重做相同的修改。请注意,挑选出来的提交会在另一个分支中创建带有新哈希的新提交,所以如果你看到不同的提交哈希,请不要感到困惑。 +如果你可以直接将相同的提交复制到另一个分支,就没有必要在不同的分支中重做相同的变更。请注意,遴选出来的提交会在另一个分支中创建带有新哈希的新提交,所以如果你看到不同的提交哈希,请不要感到困惑。 -如果您想知道什么是提交的哈希,以及它是如何生成的,这里有一个说明可以帮助你。提交哈希是用 [SHA-1][2] 算法生成的字符串。SHA-1 算法接收一个输入,然后输出一个唯一的 40 个字符的哈希值。如果你使用的是 [POSIX][3] 系统,请尝试在您的终端上运行这个程序: +如果您想知道什么是提交的哈希,以及它是如何生成的,这里有一个说明可以帮助你。提交哈希是用 [SHA-1][2] 算法生成的字符串。SHA-1 算法接收一个输入,然后输出一个唯一的 40 个字符的哈希值。如果你使用的是 [POSIX][3] 系统,请尝试在您的终端上运行这个命令: ``` $ echo -n "commit" | openssl sha1 ``` -这将输出一个唯一的 40 个字符的哈希值 `4015b57a143aec5156fd1444a017a32137a3fd0f`。这个哈希表示字符串 `commit`。 +这将输出一个唯一的 40 个字符的哈希值 `4015b57a143aec5156fd1444a017a32137a3fd0f`。这个哈希代表了字符串 `commit`。 Git 在提交时生成的 SHA-1 哈希值不仅仅代表一个字符串。它代表的是: @@ -48,24 +48,24 @@ sha1( ) ``` -这就解释了为什么你对代码所做的任何细微改动都会得到一个独特的提交哈希值。哪怕是一个微小的改动都会被发现。这是因为Git具有完整性。 +这就解释了为什么你对代码所做的任何细微改动都会得到一个独特的提交哈希值。哪怕是一个微小的改动都会被发现。这是因为 Git 具有完整性。 ### 撤销/恢复丢失的更改 -当你想恢复到工作版本时,挑选就很方便。当多个开发人员在同一个代码库上工作时,很可能会丢失更改,最新的版本会被转移到一个陈旧的或非工作版本上。这时,挑选提交到工作版本就可以成为救星。 +当你想恢复到工作版本时,遴选就很方便。当多个开发人员在同一个代码库上工作时,很可能会丢失更改,最新的版本会被转移到一个陈旧的或非工作版本上。这时,遴选提交到工作版本就可以成为救星。 #### 它是如何工作的? -假设有两个分支,`feature1` 和 `feature2`,你想把 `feature1` 中的提交应用到 `feature2`。 +假设有两个分支:`feature1` 和 `feature2`,你想把 `feature1` 中的提交应用到 `feature2`。 -在 `feature1` 分支上,运行 `git log` 命令,复制你想挑选的提交哈希值。你可以看到一系列类似于下面代码示例的提交。`commit` 后面的字母数字代码就是你需要复制的提交哈希。为了方便起见,您可以选择复制前六个字符(本例中为 `966cf3`)。 +在 `feature1` 分支上,运行 `git log` 命令,复制你想遴选的提交哈希值。你可以看到一系列类似于下面代码示例的提交。`commit` 后面的字母数字代码就是你需要复制的提交哈希。为了方便起见,您可以选择复制前六个字符(本例中为 `966cf3`)。 ``` -commit 966cf3d08b09a2da3f2f58c0818baa37184c9778 (HEAD -> master) -Author: manaswinidas <[me@example.com][4]> -Date:   Mon Mar 8 09:20:21 2021 +1300 +commit 966cf3d08b09a2da3f2f58c0818baa37184c9778 (HEAD -> master) +Author: manaswinidas +Date: Mon Mar 8 09:20:21 2021 +1300 -   add instructions + add instructions ``` 然后切换到 `feature2` 分支,在刚刚从日志中得到的哈希值上运行 `git cherry-pick`: @@ -103,7 +103,7 @@ Date: Mon Mar 8 09:20:21 2021 +1300 这将打开你的默认编辑器,允许你编辑提交信息。如果你没有什么要补充的,可以保存现有的信息。 -就这样,你完成了你的第一次挑选。如上所述,如果你在分支 `feature2` 上运行 `git log`,你会看到一个不同的提交哈希。下面是一个例子: +就这样,你完成了你的第一次遴选。如上所述,如果你在分支 `feature2` 上运行 `git log`,你会看到一个不同的提交哈希。下面是一个例子: ``` commit afb6fcb87083c8f41089cad58deb97a5380cb2c2 (HEAD -> feature2) @@ -114,9 +114,9 @@ Date:   Mon Mar 8 09:20:21 2021 +1300 不要对不同的提交哈希感到困惑。这只是区分 `feature1` 和 `feature2` 的提交。 -### 挑选多个提交 +### 遴选多个提交 -但如果你想挑选多个提交的内容呢?你可以使用: +但如果你想遴选多个提交的内容呢?你可以使用: ``` git cherry-pick ... @@ -124,7 +124,7 @@ git cherry-pick ... 请注意,你不必使用整个提交的哈希值,你可以使用前五到六个字符。 -同样,这也是很繁琐的。如果你想挑选的提交是一系列的连续提交呢?这种方法太费劲了。别担心,有一个更简单的方法。 +同样,这也是很繁琐的。如果你想遴选的提交是一系列的连续提交呢?这种方法太费劲了。别担心,有一个更简单的方法。 假设你有两个分支: @@ -137,23 +137,23 @@ git cherry-pick ... 2. 获取 `commitA` 和 `commitB` 的哈希值。 3. 输入 `git checkout `。 4. 输入 `git cherry-pick ^..` (请注意,这包括 `commitA` 和 `commitB`)。 - 5. 如果遇到合并冲突,[像往常一样解决][5],然后输入 `git cherry-pick --continue` 恢复挑选过程。 + 5. 如果遇到合并冲突,[像往常一样解决][5],然后输入 `git cherry-pick --continue` 恢复遴选过程。 -### 重要的挑选选项 +### 重要的遴选选项 以下是 [Git 文档][6] 中的一些有用的选项,你可以在 `cherry-pick` 命令中使用。 * `-e`、`--edit`:用这个选项,`git cherry-pick` 可以让你在提交前编辑提交信息。 * `-s`、`--signoff`:在提交信息的结尾添加 `Signed-off by` 行。更多信息请参见 `git-commit(1)` 中的 signoff 选项。 - * `-S[]`、`--pgg-sign[=]`:这些是 GPG 签名的提交。`keyid` 参数是可选的,默认为提交者身份;如果指定了,则必须卡在选项中,不加空格。 - * `--ff`:如果当前 HEAD 与挑选的提交的父级提交相同,则会对该提交进行快进操作。 + * `-S[]`、`--pgg-sign[=]`:这些是 GPG 签名的提交。`keyid` 参数是可选的,默认为提交者身份;如果指定了,则必须嵌在选项中,不加空格。 + * `--ff`:如果当前 HEAD 与遴选的提交的父级提交相同,则会对该提交进行快进操作。 下面是除了 `--continue` 外的一些其他的后继操作子命令: - * `--quit`:你可以忘记当前正在进行的操作。这可以用来清除挑选或撤销失败后的后继操作状态。 + * `--quit`:你可以忘记当前正在进行的操作。这可以用来清除遴选或撤销失败后的后继操作状态。 * `--abort`:取消操作并返回到操作序列前状态。 -下面是一些关于挑选的例子: +下面是一些关于遴选的例子: * `git cherry-pick master`:应用 `master` 分支顶端的提交所引入的变更,并创建一个包含该变更的新提交。 * `git cherry-pick master~4 master~2':应用 `master` 指向的第五个和第三个最新提交所带来的变化,并根据这些变化创建两个新的提交。 @@ -167,7 +167,7 @@ via: https://opensource.com/article/21/3/git-cherry-pick 作者:[Manaswini Das][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From ec47aefdd621748c3f76e51bd638928b4a94365e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 17 Apr 2021 17:45:51 +0800 Subject: [PATCH 709/818] PUB @wxy https://linux.cn/article-13305-1.html --- .../20210331 3 reasons I use the Git cherry-pick command.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210331 3 reasons I use the Git cherry-pick command.md (99%) diff --git a/translated/tech/20210331 3 reasons I use the Git cherry-pick command.md b/published/20210331 3 reasons I use the Git cherry-pick command.md similarity index 99% rename from translated/tech/20210331 3 reasons I use the Git cherry-pick command.md rename to published/20210331 3 reasons I use the Git cherry-pick command.md index 183bdb85fe..5f87ecc61e 100644 --- a/translated/tech/20210331 3 reasons I use the Git cherry-pick command.md +++ b/published/20210331 3 reasons I use the Git cherry-pick command.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13305-1.html) 我使用 Git cherry-pick 命令的 3 个理由 ====== From b62c01cd9f84dca6ad5f8f9638199a83aa1c7297 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 17 Apr 2021 21:20:40 +0800 Subject: [PATCH 710/818] APL --- .../tech/20201109 Getting started with Stratis encryption.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20201109 Getting started with Stratis encryption.md b/sources/tech/20201109 Getting started with Stratis encryption.md index 1aa0df1c7b..effb4222f1 100644 --- a/sources/tech/20201109 Getting started with Stratis encryption.md +++ b/sources/tech/20201109 Getting started with Stratis encryption.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 9859ce5d4db739577cc32ce19a2be9eee2f739ef Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 17 Apr 2021 22:20:53 +0800 Subject: [PATCH 711/818] TSL --- ...Getting started with Stratis encryption.md | 201 ------------------ ...Getting started with Stratis encryption.md | 201 ++++++++++++++++++ 2 files changed, 201 insertions(+), 201 deletions(-) delete mode 100644 sources/tech/20201109 Getting started with Stratis encryption.md create mode 100644 translated/tech/20201109 Getting started with Stratis encryption.md diff --git a/sources/tech/20201109 Getting started with Stratis encryption.md b/sources/tech/20201109 Getting started with Stratis encryption.md deleted file mode 100644 index effb4222f1..0000000000 --- a/sources/tech/20201109 Getting started with Stratis encryption.md +++ /dev/null @@ -1,201 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Getting started with Stratis encryption) -[#]: via: (https://fedoramagazine.org/getting-started-with-stratis-encryption/) -[#]: author: (briansmith https://fedoramagazine.org/author/briansmith/) - -Getting started with Stratis encryption -====== - -![][1] - -Stratis is described on its [official website][2] as an “_easy to use local storage management for Linux_.” See this [short video][3] for a quick demonstration of the basics. The video was recorded on a Red Hat Enterprise Linux 8 system. The concepts shown in the video also apply to Stratis in Fedora. - -Stratis version 2.1 introduces support for encryption. Continue reading to learn how to get started with encryption in Stratis. - -### Prerequisites - -Encryption requires Stratis version 2.1 or greater. The examples in this post use a pre-release of Fedora 33. Stratis 2.1 will be available in the final release of Fedora 33. - -You’ll also need at least one available block device to create an encrypted pool. The examples shown below were done on a KVM virtual machine with a 5 GB virtual disk drive _(/dev/vdb_). - -### Create a key in the kernel keyring - -The Linux kernel keyring is used to store the encryption key. For more information on the kernel keyring, refer to the _keyrings_ manual page (_man keyrings_).   - -Use the _stratis key set_ command to set up the key within the kernel keyring.  You must specify where the key should be read from. To read the key from standard input, use the _–capture-key_ option. To retrieve the key from a file, use the _–keyfile-path <file>_ option. The last parameter is a key description. It will be used later when you create the encrypted Stratis pool. - -For example, to create a key with the description _pool1key_, and to read the key from standard input, you would enter: - -``` -# stratis key set --capture-key pool1key -Enter desired key data followed by the return key: -``` - -The command prompts us to type the key data / passphrase, and the key is then created within the kernel keyring.   - -To verify that the key was created, run _stratis key list_: - -``` -# stratis key list -Key Description -pool1key -``` - -This verifies that the _pool1key_ was created. Note that these keys are not persistent. If the host is rebooted, the key will need to be provided again before the encrypted Stratis pool can be accessed (this process is covered later). - -If you have multiple encrypted pools, they can have a separate keys, or they can share the same key. - -The keys can also be viewed using the following _keyctl_ commands: - -``` -# keyctl get_persistent @s -318044983 -# keyctl show -Session Keyring - 701701270 --alswrv 0 0 keyring: _ses - 649111286 --alswrv 0 65534 \_ keyring: _uid.0 - 318044983 ---lswrv 0 65534 \_ keyring: _persistent.0 -1051260141 --alswrv 0 0 \_ user: stratis-1-key-pool1key -``` - -### Create the encrypted Stratis pool - -Now that a key has been created for Stratis, the next step is to create the encrypted Stratis pool. Encrypting a pool can only be done at pool creation. It isn’t currently possible to encrypt an existing pool. - -Use the _stratis pool create_ command to create a pool. Add _–key-desc_ and the key description that you provided in the previous step (_pool1key_). This will signal to Stratis that the pool should be encrypted using the provided key. The below example creates the Stratis pool on _/dev/vdb_, and names it _pool1_. Be sure to specify an empty/available device on your system. - -``` -# stratis pool create --key-desc pool1key pool1 /dev/vdb -``` - -You can verify that the pool has been created with the _stratis pool list_ command: - -``` -# stratis pool list -Name Total Physical Properties -pool1 4.98 GiB / 37.63 MiB / 4.95 GiB ~Ca, Cr -``` - -In the sample output shown above, _~Ca_ indicates that caching is disabled (the tilde negates the property). _Cr_ indicates that encryption is enabled.  Note that caching and encryption are mutually exclusive. Both features cannot be simultaneously enabled. - -Next, create a filesystem. The below example, demonstrates creating a filesystem named _filesystem1_, mounting it at the _/filesystem1_ mountpoint, and creating a test file in the new filesystem: - -``` -# stratis filesystem create pool1 filesystem1 -# mkdir /filesystem1 -# mount /stratis/pool1/filesystem1 /filesystem1 -# cd /filesystem1 -# echo "this is a test file" > testfile -``` - -### Access the encrypted pool after a reboot - -When you reboot you’ll notice that Stratis no longer shows your encrypted pool or its block device: - -``` -# stratis pool list -Name Total Physical Properties -``` - -``` -# stratis blockdev list -Pool Name Device Node Physical Size Tier -``` - -To access the encrypted pool, first re-create the key with the same key description and key data / passphrase that you used previously: - -``` -# stratis key set --capture-key pool1key -Enter desired key data followed by the return key: -``` - -Next, run the _stratis pool unlock_ command, and verify that you can now see the pool and its block device: - -``` -# stratis pool unlock -# stratis pool list -Name Total Physical Properties -pool1 4.98 GiB / 583.65 MiB / 4.41 GiB ~Ca, Cr -# stratis blockdev list -Pool Name Device Node Physical Size Tier -pool1 /dev/dm-2 4.98 GiB Data -``` - -Next, mount the filesystem and verify that you can access the test file you created previously: - -``` -# mount /stratis/pool1/filesystem1 /filesystem1/ -# cat /filesystem1/testfile -this is a test file -``` - -### Use a systemd unit file to automatically unlock a Stratis pool at boot - -It is possible to automatically unlock your Stratis pool at boot without manual intervention. However, a file containing the key must be available. Storing the key in a file might be a security concern in some environments. - -The systemd unit file shown below provides a simple method to unlock a Stratis pool at boot and mount the filesystem. Feedback on a better/alternative methods is welcome. You can provide suggestions in the comment section at the end of this article. - -Start by creating your key file with the following command. Be sure to substitute _passphrase_ with the same key data / passphrase you entered previously. - -``` -# echo -n passphrase > /root/pool1key -``` - -Make sure that the file is only readable by root: - -``` -# chmod 400 /root/pool1key -# chown root:root /root/pool1key -``` - -Create a systemd unit file at _/etc/systemd/system/stratis-filesystem1.service_ with the following content: - -``` -[Unit] -Description = stratis mount pool1 filesystem1 file system -After = stratisd.service - -[Service] -ExecStartPre=sleep 2 -ExecStartPre=stratis key set --keyfile-path /root/pool1key pool1key -ExecStartPre=stratis pool unlock -ExecStartPre=sleep 3 -ExecStart=mount /stratis/pool1/filesystem1 /filesystem1 -RemainAfterExit=yes - -[Install] -WantedBy = multi-user.target -``` - -Next, enable the service so that it will run at boot: - -``` -# systemctl enable stratis-filesystem1.service -``` - -Now reboot and verify that the Stratis pool has been automatically unlocked and that its filesystem is mounted. - -### Summary and conclusion - -In today’s environment, encryption is a must for many people and organizations. This post demonstrated how to enable encryption in Stratis 2.1. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/getting-started-with-stratis-encryption/ - -作者:[briansmith][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/briansmith/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/11/stratis-encryption-2-816x345.jpg -[2]: https://stratis-storage.github.io/ -[3]: https://www.youtube.com/watch?v=CJu3kmY-f5o diff --git a/translated/tech/20201109 Getting started with Stratis encryption.md b/translated/tech/20201109 Getting started with Stratis encryption.md new file mode 100644 index 0000000000..fef944a41e --- /dev/null +++ b/translated/tech/20201109 Getting started with Stratis encryption.md @@ -0,0 +1,201 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Getting started with Stratis encryption) +[#]: via: (https://fedoramagazine.org/getting-started-with-stratis-encryption/) +[#]: author: (briansmith https://fedoramagazine.org/author/briansmith/) + +Stratis 加密入门 +====== + +![][1] + +Stratis 在其 [官方网站][2] 上被描述为“_易于使用的 Linux 本地存储管理”。请看这个 [短视频][3],快速演示基础知识。该视频是在 Red Hat Enterprise Linux 8 系统上录制的。视频中显示的概念也适用于 Fedora 中的 Stratis。 + +Stratis 2.1 版本引入了对加密的支持。继续阅读以了解如何在 Stratis 中开始加密。 + +### 先决条件 + +加密需要 Stratis 2.1 或更高版本。这篇文章中的例子使用的是 Fedora 33 的预发布版本。 Stratis 2.1 将用在 Fedora 33 的最终版本中。 + +你还需要至少一个可用的块设备来创建一个加密池。下面的例子是在 KVM 虚拟机上完成的,虚拟磁盘驱动器为 5GB(`/dev/vdb`)。 + +### 在内核密钥环中创建一个密钥 + +Linux 内核密钥环keyring用于存储加密密钥。关于内核密钥环的更多信息,请参考 `keyrings` 手册页(`man keyrings`)。   + +使用 `stratis key set` 命令在内核钥匙圈中设置密钥。你必须指定从哪里读取密钥。要从标准输入中读取密钥,使用 `-capture-key` 选项。要从文件中读取密钥,使用 `-keyfile-path ` 选项。最后一个参数是一个密钥描述。它将稍后你创建加密的 Stratis 池时使用。 + +例如,要创建一个描述为 `pool1key` 的密钥,并从标准输入中读取密钥,可以输入: + +``` +# stratis key set --capture-key pool1key +Enter desired key data followed by the return key: +``` + +该命令提示我们输入密钥数据/密码,然后密钥就创建在内核密钥环中了。 + +要验证密钥是否已被创建,运行 `stratis key list`: + +``` +# stratis key list +Key Description +pool1key +``` + +这将验证是否创建了 `pool1key`。请注意,这些密钥不是持久的。如果主机重启,在访问加密的 Stratis 池之前,需要再次提供密钥(此过程将在后面介绍)。 + +如果你有多个加密池,它们可以有一个单独的密钥,也可以共享同一个密钥。 + +也可以使用以下 `keyctl` 命令查看密钥: + +``` +# keyctl get_persistent @s +318044983 +# keyctl show +Session Keyring + 701701270 --alswrv 0 0 keyring: _ses + 649111286 --alswrv 0 65534 \_ keyring: _uid.0 + 318044983 ---lswrv 0 65534 \_ keyring: _persistent.0 +1051260141 --alswrv 0 0 \_ user: stratis-1-key-pool1key +``` + +### 创建加密的 Stratis 池 + +现在已经为 Stratis 创建了一个密钥,下一步是创建加密的 Stratis 池。加密池只能在创建池时进行。目前不可能对现有的池进行加密。 + +使用 `stratis pool create` 命令创建一个池。添加 `-key-desc` 和你在上一步提供的密钥描述(`pool1key`)。这将向 Stratis 发出信号,池应该使用提供的密钥进行加密。下面的例子是在 `/dev/vdb` 上创建 Stratis 池,并将其命名为 `pool1`。确保在你的系统中指定一个空的/可用的设备。 + +``` +# stratis pool create --key-desc pool1key pool1 /dev/vdb +``` + +你可以使用 `stratis pool list` 命令验证该池是否已经创建: + +``` +# stratis pool list +Name Total Physical Properties +pool1 4.98 GiB / 37.63 MiB / 4.95 GiB ~Ca, Cr +``` + +在上面显示的示例输出中,`~Ca` 表示禁用了缓存(`~` 否定了该属性)。`Cr` 表示启用了加密。请注意,缓存和加密是相互排斥的。这两个功能不能同时启用。 + +接下来,创建一个文件系统。下面的例子演示了创建一个名为 `filesystem1` 的文件系统,将其挂载在 `/filesystem1` 挂载点上,并在新文件系统中创建一个测试文件: + +``` +# stratis filesystem create pool1 filesystem1 +# mkdir /filesystem1 +# mount /stratis/pool1/filesystem1 /filesystem1 +# cd /filesystem1 +# echo "this is a test file" > testfile +``` + +### 重启后访问加密池 + +当重新启动时,你会发现 Stratis 不再显示你的加密池或它的块设备: + +``` +# stratis pool list +Name Total Physical Properties +``` + +``` +# stratis blockdev list +Pool Name Device Node Physical Size Tier +``` + +要访问加密池,首先要用之前使用的相同的密钥描述和密钥数据/口令重新创建密钥: + +``` +# stratis key set --capture-key pool1key +Enter desired key data followed by the return key: +``` + +接下来,运行 `stratis pool unlock` 命令,并验证现在可以看到池和它的块设备: + +``` +# stratis pool unlock +# stratis pool list +Name Total Physical Properties +pool1 4.98 GiB / 583.65 MiB / 4.41 GiB ~Ca, Cr +# stratis blockdev list +Pool Name Device Node Physical Size Tier +pool1 /dev/dm-2 4.98 GiB Data +``` + +接下来,挂载文件系统并验证是否可以访问之前创建的测试文件: + +``` +# mount /stratis/pool1/filesystem1 /filesystem1/ +# cat /filesystem1/testfile +this is a test file +``` + +### 使用 systemd 单元文件在启动时自动解锁 Stratis 池 + +可以在启动时自动解锁 Stratis 池,无需手动干预。但是,必须有一个包含密钥的文件。在某些环境下,将密钥存储在文件中可能会有安全问题。 + +下图所示的 systemd 单元文件提供了一个简单的方法来在启动时解锁 Stratis 池并挂载文件系统。欢迎提供更好的/替代方法的反馈。你可以在文章末尾的评论区提供建议。 + +首先用下面的命令创建你的密钥文件。确保用之前输入的相同的密钥数据/密码来代替`passphrase`。 + +``` +# echo -n passphrase > /root/pool1key +``` + +确保该文件只能由 root 读取: + +``` +# chmod 400 /root/pool1key +# chown root:root /root/pool1key +``` + +在 `/etc/systemd/system/stratis-filesystem1.service` 创建包含以下内容的 systemd 单元文件: + +``` +[Unit] +Description = stratis mount pool1 filesystem1 file system +After = stratisd.service + +[Service] +ExecStartPre=sleep 2 +ExecStartPre=stratis key set --keyfile-path /root/pool1key pool1key +ExecStartPre=stratis pool unlock +ExecStartPre=sleep 3 +ExecStart=mount /stratis/pool1/filesystem1 /filesystem1 +RemainAfterExit=yes + +[Install] +WantedBy = multi-user.target +``` + +接下来,启用服务,使其在启动时运行: + +``` +# systemctl enable stratis-filesystem1.service +``` + +现在重新启动并验证 Stratis 池是否已自动解锁,其文件系统是否已挂载。 + +### 结语 + +在今天的环境中,加密是很多人和组织的必修课。本篇文章演示了如何在 Stratis 2.1 中启用加密功能。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/getting-started-with-stratis-encryption/ + +作者:[briansmith][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/briansmith/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2020/11/stratis-encryption-2-816x345.jpg +[2]: https://stratis-storage.github.io/ +[3]: https://www.youtube.com/watch?v=CJu3kmY-f5o From eed90a20ded326cbf69dcb5781cc4d0fdf872c9e Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 18 Apr 2021 05:02:39 +0800 Subject: [PATCH 712/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210418=20?= =?UTF-8?q?Hyperbola=20Linux=20Review:=20Systemd-Free=20Arch=20With=20Linu?= =?UTF-8?q?x-libre=20Kernel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210418 Hyperbola Linux Review- Systemd-Free Arch With Linux-libre Kernel.md --- ...stemd-Free Arch With Linux-libre Kernel.md | 181 ++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 sources/tech/20210418 Hyperbola Linux Review- Systemd-Free Arch With Linux-libre Kernel.md diff --git a/sources/tech/20210418 Hyperbola Linux Review- Systemd-Free Arch With Linux-libre Kernel.md b/sources/tech/20210418 Hyperbola Linux Review- Systemd-Free Arch With Linux-libre Kernel.md new file mode 100644 index 0000000000..4e12dcd583 --- /dev/null +++ b/sources/tech/20210418 Hyperbola Linux Review- Systemd-Free Arch With Linux-libre Kernel.md @@ -0,0 +1,181 @@ +[#]: subject: (Hyperbola Linux Review: Systemd-Free Arch With Linux-libre Kernel) +[#]: via: (https://itsfoss.com/hyperbola-linux-review/) +[#]: author: (Sarvottam Kumar https://itsfoss.com/author/sarvottam/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Hyperbola Linux Review: Systemd-Free Arch With Linux-libre Kernel +====== + +In the last month of 2019, the Hyperbola project took a [major decision][1] of ditching Linux in favor of OpenBSD. We also had a [chat][2] with Hyperbola co-founder Andre Silva, who detailed the reason for dropping Hyperbola OS and starting a new HyperbolaBSD. + +HyperbolaBSD is still under development and its alpha release will be ready by September 2021 for initial testing. The current Hyperbola GNU/Linux-libre v0.3.1 Milky Way will be supported until the legacy [Linux-libre kernel][3] reaches the end of life in 2022. + +I thought of giving it a try before it goes away and switches to BSD completely. + +### What is Hyperbola GNU/Linux-libre? + +![][4] + +Back in April 2017, the Hyperbola project was started by its [six co-founders][5] with an aim to deliver a lightweight, stable, secure, software freedom, and privacy focussed operating system.  + +Subsequently, the first stable version of Hyperbola GNU/Linux-libre arrived in July 2017. It was based on Arch Linux snapshots combining Debian development. + +But, unlike Arch having a rolling release model, Hyperbola GNU/Linux-libre follows a Long Term Support (LTS) model. + +Also, instead of a generic Linux kernel, it includes GNU operating system components and the Linux-libre kernel. Most importantly, Hyperbola is also one of the distributions without Systemd init system. + +Even though the Systemd is widely adopted by major Linux distributions like Ubuntu, Hyperbola replaced it with OpenRC as the default init system. v0.1 of Hyperbola was the first and the last version to support Systemd. + +Moreover, Hyperbola put high emphasis on Keep It Simple Stupid (KISS) methodology. It provides packages for i686 and x86_64 architecture that meets GNU Free System Distribution Guidelines (GNU FSDG). + +Not just that, but it also has its own social contract and packaging guidelines that follow the philosophy of the Free Software Movement. + +Hence, Free Software Foundation [recognized][6] Hyperbola GNU/Linux-libre as the first completely free Brazilian operating system in 2018. + +### Downloading Hyperbola GNU/Linux-libre 0.3.1 Milky Way + +The hyperbola project provides [two live images][7] for installation: one is the regular Hyperbola and the other is Hypertalking. Hypertalking is the ISO optimized and adapted for blind and visually impaired users. + +Interestingly, if you already use Arch Linux or Arch-based distribution like Parabola, you don’t need to download a live image. You can easily migrate to Hyperbola by following the official [Arch][8] or [Parabola][9] migration guide. + +The ISO image sizes around 650MB containing only essential packages (excluding desktop environment) to boot only in a command line interface. + +### Hardware requirements for Hyperbola + +For v0.3.1 (x86_64), you require a minimum of any 64-bit processor, 47MiB (OS installed) and 302MiB (Live image) of RAM for text mode only with no desktop environment. + +While for v0.3.1 (i686), you require a minimum of Intel Pentium II or AMD Athlon CPU model, 33MiB (OS installed), and 252MiB (Live image) of RAM for text mode only with no desktop environment. + +### Installing Hyperbola Linux from scratch + +Currently, I don’t use Arch or Parabola distribution. Hence, instead of migration, I chose to install Hyperbola Linux from scratch. + +I also mostly don’t dual boot unknown (to me) distribution on my hardware as it may create undetermined problems. So, I decided to use the wonderful GNOME Boxes app for setting up a Hyperbola virtual machine with up to 2 GB of RAM and 22 GB of free disk space. + +Similar to Arch, Hyperbola also does not come with a graphical user interface (GUI) installer. It means you need to set up almost everything from scratch using a command line interface (CLI). + +Here, it also concludes that Hyperbola is definitely not for beginners and those afraid of the command line. + +However, Hyperbola does provide separate [installation instruction][10], especially for beginners. But I think it still misses several steps that can trouble beginners during the installation process. + +For instance, it does not guide you to connect to the network, set up a new user account, and install a desktop environment. + +Hence, there is also another Hyperbola [installation guide][11] that you need to refer to in case you’re stuck at any step. + +As I booted the live image, the boot menu showed the option to install for both 64-bit or 32-bit architecture. + +![Live Image Boot Menu][12] + +Next, following the installation instruction, I went through setting up disk partition, DateTime, language, and password for the root user. + +![Disk partition][13] + +Once everything set up, I then installed the most common [Grub bootloader][14] and rebooted the system. Phew! until now, all went well as I could log in to my Hyperbola system. + +![text mode][15] + +### Installing Xfce desktop in Hyperbola Linux + +The command-line interface was working fine for me. But now, to have a graphical user interface, I need to manually choose and install a new [desktop environment][16] as Hyperbola does not come with any default DE. + +For the sake of simplicity and lightweight, I chose to get the popular [Xfce desktop][17]. But before installing it, I also needed a Xorg [display server][18]. So, I installed it along with other important packages using the default pacman package manager. + +![Install X.Org][19] + +Later, I installed LightDM cross-desktop [display manager][20], Xfce desktop, and other necessary packages like elogind for managing user logins. + +![Install Xfce desktop environment][21] + +After the Xfce installation, you also need to add LightDM service at the default run level to automatically switch to GUI mode. You can use the below command and reboot the system: + +``` +rc-update add lightdm default +reboot +``` + +![Add LightDM at runlevel][22] + +#### Pacman Signature Error In Hyperbola Linux + +While installing Xorg and Xfce in the latest Hyperbola v0.3.1, I encountered the signature error for some packages showing “signature is marginal trust” or “invalid or corrupted package.” + +![Signature Error In Hyperbola Linux][23] + +After searching the solution, I came to know from Hyperbola [Forum][24] that the main author Emulatorman’s keys expired on 1st Feb 2021. + +Hence, until the author upgrades the key or a new version 0.4 arrives sooner or later, you can change the `SigLevel` from “SigLevel=Required DatabaseOptional” to “SigLevel=Never” in`/etc/pacman.conf` file to avoid this error. + +![][25] + +### Hyperbola Linux with Xfce desktop + +![Hyperbola Linux With Xfce desktop][26] + +Hyperbola GNU/Linux-libre with Xfce 4.12 desktop gives a very clean, light, and smooth user experience. At the core, it contains Linux-libre 4.9 and OpenRC 0.28 service manager. + +![][27] + +As Hyperbola does not come with customized desktops and tons of bloated software, it definitely gives flexibility and freedom to choose, install, and configure the services you want. + +On the memory usage side, it takes around 205MB of RAM (approx. 10%) while running no applications (except terminal). + +![][28] + +### Is Hyperbola a suitable distribution for you? + +As per my experience, it definitely not a [Linux distribution that I would like to suggest to complete beginners][29]. Well, the Hyperbola project does not even claim to be beginners-friendly. + +If you’re well-versed with the command line and have quite a good knowledge of Linux concepts like disk partition, you can give it a try and decide yourself. Spending time hacking around the installation and configuration process can teach you a lot. + +Another thing that might matter in choosing Hyperbola Linux is also the default init system. If you’re looking for Systemd-free distribution with complete customization control from scratch, what can be better than it. + +Last but not least, you should also consider the future of Hyperbola, which will no longer contain Linux Kernel as it will turn into a HyperbolaBSD with OpenBSD Linux and userspace. + +If you’ve already tried or currently using Hyperbola Linux, let us know your experience in the comment below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/hyperbola-linux-review/ + +作者:[Sarvottam Kumar][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sarvottam/ +[b]: https://github.com/lujun9972 +[1]: https://www.hyperbola.info/news/announcing-hyperbolabsd-roadmap/ +[2]: https://itsfoss.com/hyperbola-linux-bsd/ +[3]: https://www.fsfla.org/ikiwiki/selibre/linux-libre/ +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/hyperbola-gnu-linux.png?resize=800%2C450&ssl=1 +[5]: https://www.hyperbola.info/members/founders/ +[6]: https://www.fsf.org/news/fsf-adds-hyperbola-gnu-linux-libre-to-list-of-endorsed-gnu-linux-distributions +[7]: https://wiki.hyperbola.info/doku.php?id=en:main:downloads&redirect=1 +[8]: https://wiki.hyperbola.info/doku.php?id=en:migration:from_arch +[9]: https://wiki.hyperbola.info/doku.php?id=en:migration:from_parabola +[10]: https://wiki.hyperbola.info/doku.php?id=en:guide:beginners +[11]: https://wiki.hyperbola.info/doku.php?id=en:guide:installation +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/Live-Image-Boot-Menu.png?resize=640%2C480&ssl=1 +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/Disk-partition.png?resize=600%2C450&ssl=1 +[14]: https://itsfoss.com/what-is-grub/ +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/text-mode.png?resize=600%2C450&ssl=1 +[16]: https://itsfoss.com/what-is-desktop-environment/ +[17]: https://xfce.org/ +[18]: https://itsfoss.com/display-server/ +[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/Install-xorg-package.png?resize=600%2C450&ssl=1 +[20]: https://itsfoss.com/display-manager/ +[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/Install-Xfce-desktop-environment-800x600.png?resize=600%2C450&ssl=1 +[22]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/Add-LightDM-at-runlevel.png?resize=600%2C450&ssl=1 +[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/Signature-Error-In-Hyperbola-Linux.png?resize=600%2C450&ssl=1 +[24]: https://forums.hyperbola.info/viewtopic.php?id=493 +[25]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/Configure-pacman-SigLevel.png?resize=600%2C450&ssl=1 +[26]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/Hyperbola-Linux-With-Xfce-desktop.jpg?resize=800%2C450&ssl=1 +[27]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/Hyperbola-System-Information.jpg?resize=800%2C450&ssl=1 +[28]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/Memory-Usage.jpg?resize=800%2C450&ssl=1 +[29]: https://itsfoss.com/best-linux-beginners/ From 73236246aa018f0e5718b785a091274daf3fb373 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 18 Apr 2021 05:03:00 +0800 Subject: [PATCH 713/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210417=20?= =?UTF-8?q?How=20I=20digitized=20my=20CD=20collection=20with=20open=20sour?= =?UTF-8?q?ce=20tools?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210417 How I digitized my CD collection with open source tools.md --- ...my CD collection with open source tools.md | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 sources/tech/20210417 How I digitized my CD collection with open source tools.md diff --git a/sources/tech/20210417 How I digitized my CD collection with open source tools.md b/sources/tech/20210417 How I digitized my CD collection with open source tools.md new file mode 100644 index 0000000000..608e564933 --- /dev/null +++ b/sources/tech/20210417 How I digitized my CD collection with open source tools.md @@ -0,0 +1,101 @@ +[#]: subject: (How I digitized my CD collection with open source tools) +[#]: via: (https://opensource.com/article/21/4/digitize-cd-open-source-tools) +[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +How I digitized my CD collection with open source tools +====== +Clean off your shelves by ripping your CDs and tagging them for easy +playback across your home network. +![11 CDs in a U shape][1] + +The restrictions on getting out and about during the pandemic occasionally remind me that time is slipping by—although some days, "slipping" doesn't quite feel like the right word. But it also reminds me there are more than a few tasks around the house that can be great for restoring the sense of accomplishment that so many of us have missed. + +One such task, in my home anyway, is converting our CD collection to [FLAC][2] and storing the files on our music server's hard drive. Considering we don't have a huge collection (at least, by some people's standards), I'm surprised we still have so many CDs awaiting conversion—even excluding all the ones that fail to impress and therefore don't merit the effort. + +As for that ticking clock—who knows how much longer the CD player will continue working or the CD-ROM drive in the old computer will remain in service? Plus, I'd rather have the CDs shelved in the basement storage instead of cluttering up the family room. + +So, here I sit on a rainy Sunday afternoon with a pile of classical music CDs, ready to go… + +### Ripping CDs + +I like using the open source [Asunder CD ripper][3]. It's a simple and straightforward tool that uses the [cdparanoia][4] tool to handle the conversion chores. This image shows it working away on an album. + +![Asunder][5] + +(Chris Hermansen, [CC BY-SA 4.0][6]) + +When I fired up Asunder, I was surprised that its Compact Disc Database (CDDB) lookup feature didn't seem to find any matching info. A quick online search led me to a Linux Mint forum discussion that [offered alternatives][7] for the freedb.freedb.org online service, which apparently is no longer working. I first tried using gnudb.gnudb.org with no appreciably better result; plus, the suggested link to gnudb.org/howto.php upset Firefox due to an expired certificate. + +Next, I tried the freedb.freac.org service (note that it is on port 80, not 8880, as was freedb.freedb.org), which worked well for me… with one notable exception: The contributed database entries don't seem to understand the difference between "artist" (or "performer") and "composer." This isn't a huge problem for popular music, but having JS Bach as the "artist" seems a bit incongruous since he never made it to a recording studio, as far as I know. + +Quite a few of the tracks I converted identified the composer in the track title, but if there's one thing I've learned, your metadata can never be too correct. This leads me to the issue of tag editing, or curating the collection. + +Oh wait, there's another reason for tag editing, too, at least when using Asunder to rip: getting the albums' cover images. + +### Editing tags and curating the collection + +My open source go-to tool for [music tag editing continues to be EasyTag][8]. I use it a lot, both for downloads I purchase (it's amazing how messed up their tags can be, and some download services offer untagged WAV format files) and for tidying up the CDs I rip. + +Take a look at what Asunder has (and hasn't) accomplished from EasyTag's perspective. One of the CDs I ripped included Ravel's _Daphnis et Chloé Suites 1 and 2_ and Strauss' _Don Quixote_. The freedb.freac.org database seemed to think that the composers Maurice Ravel and Richard Strauss were the artists performing the work, but the artist on this album is the wonderful London Symphony Orchestra led by André Previn. In Asunder, I clicked the "single artist" checkbox and changed the artist name to the LSO. Here's what it looks like in EasyTag: + +![EasyTag][9] + +(Chris Hermansen, [CC BY-SA 4.0][6]) + +It's not quite there! But in EasyTag, I can select the first six tracks, tagging the composer on all the files by clicking on that little "A" icon on the right of the Composer field: + +![Editing tags in EasyTag][10] + +(Chris Hermansen, [CC BY-SA 4.0][6]) + +I can set the remaining 13 similarly, then select the whole lot and set the Album Artist as well. Finally, I can flip to the Images tab and find and set the album cover image. + +Speaking of images, I've found it wise to always name the image "cover.jpg" and make sure it's in the directory with the FLAC files… some players aren't happy with PNG files, some want the file in the same directory, and some are just plain difficult to get along with, as far as images go. + +What is your favorite open source CD ripping tool? How about the open source tool you like to use to fix your metadata? Let me know in the comments below! + +### And speaking of music… + +I haven't been as regular with my music and open source column over the past year as I was in previous years. Although I didn't acquire a lot of new music in 2020 and 2021, a few jewels still came my way… + +As always, [Erased Tapes][11] continues to develop an amazing collection of hmmm… what would you call it, anyway? The site uses the terms "genre-defying" and "avant-garde," which don't seem overblown for once. A recent favorite is Rival Consoles' [_Night Melody Articulation_][12], guaranteed to transport me from the day-to-day grind to somewhere else. + +I've been a huge fan of [Gustavo Santaolalla][13] since I first heard his music on a road trip from Coyhaique to La Tapera in Chile's Aysén Region. You might be familiar with his film scores to _Motorcycle Diaries_ or _Brokeback Mountain_. I recently picked up [_Qhapaq Ñan_, music about the Inca Trail][14], on the Linux-friendly music site [7digital][15], which has a good selection of his work. + +Finally, and continuing with the Latin American theme, The Queen's Six recording [_Journeys to the New World_][16] is not to be missed. It is available in FLAC format (including high-resolution versions) from the Linux-friendly [Signum Classics][17] site. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/digitize-cd-open-source-tools + +作者:[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/life_cd_dvd.png?itok=RBwVIzmi (11 CDs in a U shape) +[2]: https://en.wikipedia.org/wiki/FLAC +[3]: https://opensource.com/article/17/2/open-music-tagging +[4]: https://www.xiph.org/paranoia/ +[5]: https://opensource.com/sites/default/files/uploads/asunsder.png (Asunder) +[6]: https://creativecommons.org/licenses/by-sa/4.0/ +[7]: https://forums.linuxmint.com/viewtopic.php?t=322415 +[8]: https://opensource.com/article/17/5/music-library-tag-management-tools +[9]: https://opensource.com/sites/default/files/uploads/easytag.png (EasyTag) +[10]: https://opensource.com/sites/default/files/uploads/easytag_editing-tags.png (Editing tags in EasyTag) +[11]: https://www.erasedtapes.com/about +[12]: https://www.erasedtapes.com/release/eratp139-rival-consoles-night-melody-articulation +[13]: https://en.wikipedia.org/wiki/Gustavo_Santaolalla +[14]: https://ca.7digital.com/artist/gustavo-santaolalla/release/qhapaq-%C3%B1an-12885504?f=20%2C19%2C12%2C16%2C17%2C9%2C2 +[15]: https://ca.7digital.com/search/release?q=gustavo%20santaolalla&f=20%2C19%2C12%2C16%2C17%2C9%2C2 +[16]: https://signumrecords.com/product/journeys-to-the-new-world-hispanic-sacred-music-from-the-16th-17th-centuries/SIGCD626/ +[17]: https://signumrecords.com/ From 731236451910d8c9608a3a4cceb16dcbc7543c95 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 18 Apr 2021 10:46:38 +0800 Subject: [PATCH 714/818] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @tt76wq 翻译的很认真,辛苦了! --- ... Use systemd timers instead of cronjobs.md | 375 ++++++++---------- 1 file changed, 173 insertions(+), 202 deletions(-) diff --git a/translated/tech/20200707 Use systemd timers instead of cronjobs.md b/translated/tech/20200707 Use systemd timers instead of cronjobs.md index 3b65f723db..6f1c34e46d 100644 --- a/translated/tech/20200707 Use systemd timers instead of cronjobs.md +++ b/translated/tech/20200707 Use systemd timers instead of cronjobs.md @@ -1,88 +1,89 @@ [#]: collector: (lujun9972) [#]: translator: (tt67wq) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Use systemd timers instead of cronjobs) [#]: via: (https://opensource.com/article/20/7/systemd-timers) [#]: author: (David Both https://opensource.com/users/dboth) -使用 systemd 定时器代替 cronjobs +使用 systemd 定时器代替 cron 作业 ====== -定时器提供了比 cronjob 更为细粒度的事件控制。 -![Team checklist][1] -我正在致力于将我的 [cron][2]jobs 迁移到 systemd 定时器上。我已经使用定时器多年了,通常来说,我的学识足以支撑我当前的工作。但在我研究 [systemd series][3] 的过程中,我发现 systemd 定时器有一些非常有意思的能力。 +> 定时器提供了比 cron 作业更为细粒度的事件控制。 -与 cronjobs 类似,systemd 定时器可以在特定的时间间隔触发事件 --shell 脚本和程序,例如每天一次或在一个月中的特定某一天(或许只有在周一生效),或在从上午 8 点到下午 6 点的工作时间内每隔 15 分钟一次。定时器也可以做到 cronjob 无法做到的一些事情。举个例子,一个定时器可以在特定事件发生后的一段时间后触发一段脚本或者程序去执行,例如开机,启动,上个任务完成,甚至于定时器调用的上个服务单元的完成的时刻。 +![](https://img.linux.net.cn/data/attachment/album/202104/18/104406dgszkj3eeibkea55.jpg) + +我正在致力于将我的 [cron][2] 作业迁移到 systemd 定时器上。我已经使用定时器多年了,但通常来说,我的学识只足以支撑我当前的工作。但在我研究 [systemd 系列][3] 的过程中,我发现 systemd 定时器有一些非常有意思的能力。 + +与 cron 作业类似,systemd 定时器可以在特定的时间间隔触发事件(shell 脚本和程序),例如每天一次或在一个月中的特定某一天(或许只有在周一生效),或在从上午 8 点到下午 6 点的工作时间内每隔 15 分钟一次。定时器也可以做到 cron 作业无法做到的一些事情。举个例子,定时器可以在特定事件发生后的一段时间后触发一段脚本或者程序去执行,例如开机、启动、上个任务完成,甚至于定时器调用的上个服务单元的完成的时刻。 ### 操作系统维护的计时器 -当在一个新系统上安装 Fedora 或者是任意一个基于 systemd 的发行版时,它会在 Linux 宿主机的后台中创建多个定时器作为系统维护过程的一部分。这些定时器会触发事件来执行必要的日常维护任务,比如更新系统数据库,清理临时目录,轮转日志文件,以及更多其他事件。 - -作为示例,我会查看一些我的主要工作站上的定时器,通过执行 `systemctl status *timer` 命令来展示所有主机上的定时器。星号的作用于文件遍历相同,所以这个命令会列出所有的 systemd 定时器单元。 +当在一个新系统上安装 Fedora 或者是任意一个基于 systemd 的发行版时,作为系统维护过程的一部分,它会在 Linux 宿主机的后台中创建多个定时器。这些定时器会触发事件来执行必要的日常维护任务,比如更新系统数据库、清理临时目录、轮换日志文件,以及更多其他事件。 +作为示例,我会查看一些我的主要工作站上的定时器,通过执行 `systemctl status *timer` 命令来展示主机上的所有定时器。星号的作用与文件通配相同,所以这个命令会列出所有的 systemd 定时器单元。 ``` [root@testvm1 ~]# systemctl status *timer ● mlocate-updatedb.timer - Updates mlocate database every day -     Loaded: loaded (/usr/lib/systemd/system/mlocate-updatedb.timer; enabled; vendor preset: enabled) -     Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago -    Trigger: Fri 2020-06-05 00:00:00 EDT; 15h left -   Triggers: ● mlocate-updatedb.service + Loaded: loaded (/usr/lib/systemd/system/mlocate-updatedb.timer; enabled; vendor preset: enabled) + Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago + Trigger: Fri 2020-06-05 00:00:00 EDT; 15h left + Triggers: ● mlocate-updatedb.service Jun 02 08:02:33 testvm1.both.org systemd[1]: Started Updates mlocate database every day. ● logrotate.timer - Daily rotation of log files -     Loaded: loaded (/usr/lib/systemd/system/logrotate.timer; enabled; vendor preset: enabled) -     Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago -    Trigger: Fri 2020-06-05 00:00:00 EDT; 15h left -   Triggers: ● logrotate.service -       Docs: man:logrotate(8) -             man:logrotate.conf(5) + Loaded: loaded (/usr/lib/systemd/system/logrotate.timer; enabled; vendor preset: enabled) + Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago + Trigger: Fri 2020-06-05 00:00:00 EDT; 15h left + Triggers: ● logrotate.service + Docs: man:logrotate(8) + man:logrotate.conf(5) Jun 02 08:02:33 testvm1.both.org systemd[1]: Started Daily rotation of log files. ● sysstat-summary.timer - Generate summary of yesterday's process accounting -     Loaded: loaded (/usr/lib/systemd/system/sysstat-summary.timer; enabled; vendor preset: enabled) -     Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago -    Trigger: Fri 2020-06-05 00:07:00 EDT; 15h left -   Triggers: ● sysstat-summary.service + Loaded: loaded (/usr/lib/systemd/system/sysstat-summary.timer; enabled; vendor preset: enabled) + Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago + Trigger: Fri 2020-06-05 00:07:00 EDT; 15h left + Triggers: ● sysstat-summary.service Jun 02 08:02:33 testvm1.both.org systemd[1]: Started Generate summary of yesterday's process accounting. ● fstrim.timer - Discard unused blocks once a week -     Loaded: loaded (/usr/lib/systemd/system/fstrim.timer; enabled; vendor preset: enabled) -     Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago -    Trigger: Mon 2020-06-08 00:00:00 EDT; 3 days left -   Triggers: ● fstrim.service -       Docs: man:fstrim + Loaded: loaded (/usr/lib/systemd/system/fstrim.timer; enabled; vendor preset: enabled) + Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago + Trigger: Mon 2020-06-08 00:00:00 EDT; 3 days left + Triggers: ● fstrim.service + Docs: man:fstrim Jun 02 08:02:33 testvm1.both.org systemd[1]: Started Discard unused blocks once a week. ● sysstat-collect.timer - Run system activity accounting tool every 10 minutes -     Loaded: loaded (/usr/lib/systemd/system/sysstat-collect.timer; enabled; vendor preset: enabled) -     Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago -    Trigger: Thu 2020-06-04 08:50:00 EDT; 41s left -   Triggers: ● sysstat-collect.service + Loaded: loaded (/usr/lib/systemd/system/sysstat-collect.timer; enabled; vendor preset: enabled) + Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago + Trigger: Thu 2020-06-04 08:50:00 EDT; 41s left + Triggers: ● sysstat-collect.service Jun 02 08:02:33 testvm1.both.org systemd[1]: Started Run system activity accounting tool every 10 minutes. ● dnf-makecache.timer - dnf makecache --timer -     Loaded: loaded (/usr/lib/systemd/system/dnf-makecache.timer; enabled; vendor preset: enabled) -     Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago -    Trigger: Thu 2020-06-04 08:51:00 EDT; 1min 41s left -   Triggers: ● dnf-makecache.service + Loaded: loaded (/usr/lib/systemd/system/dnf-makecache.timer; enabled; vendor preset: enabled) + Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago + Trigger: Thu 2020-06-04 08:51:00 EDT; 1min 41s left + Triggers: ● dnf-makecache.service Jun 02 08:02:33 testvm1.both.org systemd[1]: Started dnf makecache –timer. ● systemd-tmpfiles-clean.timer - Daily Cleanup of Temporary Directories -     Loaded: loaded (/usr/lib/systemd/system/systemd-tmpfiles-clean.timer; static; vendor preset: disabled) -     Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago -    Trigger: Fri 2020-06-05 08:19:00 EDT; 23h left -   Triggers: ● systemd-tmpfiles-clean.service -       Docs: man:tmpfiles.d(5) -             man:systemd-tmpfiles(8) + Loaded: loaded (/usr/lib/systemd/system/systemd-tmpfiles-clean.timer; static; vendor preset: disabled) + Active: active (waiting) since Tue 2020-06-02 08:02:33 EDT; 2 days ago + Trigger: Fri 2020-06-05 08:19:00 EDT; 23h left + Triggers: ● systemd-tmpfiles-clean.service + Docs: man:tmpfiles.d(5) + man:systemd-tmpfiles(8) Jun 02 08:02:33 testvm1.both.org systemd[1]: Started Daily Cleanup of Temporary Directories. ``` @@ -90,22 +91,20 @@ Jun 02 08:02:33 testvm1.both.org systemd[1]: Started Daily Cleanup of Temporary 每个定时器至少有六行相关信息: * 定时器的第一行有定时器名字和定时器目的的简短介绍 - * 第二行展示了定时器的状态,是否有被加载,定时器 unit 文件的绝对路径以及预设信息。 - * 但三行指明了其活动状态,包括该定时器已激活的日期和时间。 - * 第四行包括了该定时器下次将要被触发的日期和时间和距离触发的大概时间。 - * 第五行展示了事件名称或被定时器触发的服务名称。 - * 部分(不是全部 )systemd unit 文件有相关文档的指引。我虚拟机上输出中有三个定时器有文档指引。这是一个优秀(但非必要)的信息。 - * 最后一行是计时器触发服务的最近的日志实例。 + * 第二行展示了定时器的状态,是否已加载,定时器单元文件的完整路径以及预设信息。 + * 第三行指明了其活动状态,包括该定时器激活的日期和时间。 + * 第四行包括了该定时器下次被触发的日期和时间和距离触发的大概时间。 + * 第五行展示了被定时器触发的事件或服务名称。 + * 部分(不是全部)systemd 单元文件有相关文档的指引。我虚拟机上输出中有三个定时器有文档指引。这是一个很好(但非必要)的信息。 + * 最后一行是计时器最近触发的服务实例的日志条目。 - -你也许有一些不一样的定时器,取决于你的物理机。 +你也许有一些不一样的定时器,取决于你的主机。 ### 创建一个定时器 -尽管我们可以解构一个或多个现有的计时器来了解其工作原理,我们还是要创建我们自己的[服务单元 ][4] 和一个定时器去触发它。我们将举一个相当简单的例子来让这个过程保持简单。当我们完成这个实验之后,就能更容易理解其他定时器的工作原理以及发现它们正在做什么。 - -首先,创建一个运行基础东西的简单的服务,例如 `free` 命令。举个例子,你可能想定时监控空余内存。在 `/etc/systemd/system` 目录下创建如下的 `myMonitor.server` 单元文件。它不一定是可执行的: +尽管我们可以解构一个或多个现有的计时器来了解其工作原理,但让我们创建我们自己的 [服务单元][4] 和一个定时器去触发它。为了保持简单,我们将使用一个相当简单的例子。当我们完成这个实验之后,就能更容易理解其他定时器的工作原理以及发现它们正在做什么。 +首先,创建一个运行基础东西的简单的服务,例如 `free` 命令。举个例子,你可能想定时监控空余内存。在 `/etc/systemd/system` 目录下创建如下的 `myMonitor.server` 单元文件。它不需要是可执行文件: ``` # This service unit is for testing timer units @@ -131,58 +130,54 @@ WantedBy=multi-user.target ``` [root@testvm1 system]# systemctl status myMonitor.service ● myMonitor.service - Logs system statistics to the systemd journal -     Loaded: loaded (/etc/systemd/system/myMonitor.service; disabled; vendor preset: disabled) -     Active: inactive (dead) + Loaded: loaded (/etc/systemd/system/myMonitor.service; disabled; vendor preset: disabled) + Active: inactive (dead) [root@testvm1 system]# systemctl start myMonitor.service [root@testvm1 system]# ``` -输出在哪里呢?默认情况下,systemd 服务单元执行程序的标准输出 (`STDOUT`) 被发送到系统日志中,它保留了记录供现在或者之后某个时间点查看。(在本系列的后续文章中,我将介绍系统日志的记录和保留策略)。查看今天的该服务单元的专属日志。`-S` 选项,即 `--since` 的缩写,允许你指定 `journalctl` 工具搜索条目的时间段。这并不代表你不关心过往结果--在这个案例中,不会有过往记录--如果你的机器以及运行了很长时间且堆积了大量的日志,它可以缩短搜索时间。 - +输出在哪里呢?默认情况下,systemd 服务单元执行程序的标准输出(`STDOUT`)会被发送到系统日志中,它保留了记录供现在或者之后(直到某个时间点)查看。(在本系列的后续文章中,我将介绍系统日志的记录和保留策略)。专门查看你的服务单元的日志,而且只针对今天。`-S` 选项,即 `--since` 的缩写,允许你指定 `journalctl` 工具搜索条目的时间段。这并不代表你不关心过往结果 —— 在这个案例中,不会有过往记录 —— 如果你的机器以及运行了很长时间且堆积了大量的日志,它可以缩短搜索时间。 ``` [root@testvm1 system]# journalctl -S today -u myMonitor.service -\-- Logs begin at Mon 2020-06-08 07:47:20 EDT, end at Thu 2020-06-11 09:40:47 EDT. -- +-- Logs begin at Mon 2020-06-08 07:47:20 EDT, end at Thu 2020-06-11 09:40:47 EDT. -- Jun 11 09:12:09 testvm1.both.org systemd[1]: Starting Logs system statistics to the systemd journal... -Jun 11 09:12:09 testvm1.both.org free[377966]:               total        used        free      shared  buff/cache   available -Jun 11 09:12:09 testvm1.both.org free[377966]: Mem:       12635740      522868    11032860        8016     1080012    11821508 -Jun 11 09:12:09 testvm1.both.org free[377966]: Swap:       8388604           0     8388604 +Jun 11 09:12:09 testvm1.both.org free[377966]: total used free shared buff/cache available +Jun 11 09:12:09 testvm1.both.org free[377966]: Mem: 12635740 522868 11032860 8016 1080012 11821508 +Jun 11 09:12:09 testvm1.both.org free[377966]: Swap: 8388604 0 8388604 Jun 11 09:12:09 testvm1.both.org systemd[1]: myMonitor.service: Succeeded. [root@testvm1 system]# ``` -一个服务触发的任务可以是单个程序,一组程序或者是一个脚本语言写的脚本。通过在 `myMonitor.service` 单元文件里的 `[Service]` 块末尾中添加如下行可以为服务添加另一个任务: - +由服务触发的任务可以是单个程序、一组程序或者是一个脚本语言写的脚本。通过在 `myMonitor.service` 单元文件里的 `[Service]` 块末尾中添加如下行可以为服务添加另一个任务: ``` -`ExecStart=/usr/bin/lsblk` +ExecStart=/usr/bin/lsblk ``` 再次启动服务,查看日志检查结果,结果应该看上去像这样。你应该在日志中看到两条命令的结果输出: - ``` Jun 11 15:42:18 testvm1.both.org systemd[1]: Starting Logs system statistics to the systemd journal... -Jun 11 15:42:18 testvm1.both.org free[379961]:               total        used        free      shared  buff/cache   available -Jun 11 15:42:18 testvm1.both.org free[379961]: Mem:       12635740      531788    11019540        8024     1084412    11812272 -Jun 11 15:42:18 testvm1.both.org free[379961]: Swap:       8388604           0     8388604 -Jun 11 15:42:18 testvm1.both.org lsblk[379962]: NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT -Jun 11 15:42:18 testvm1.both.org lsblk[379962]: sda             8:0    0  120G  0 disk -Jun 11 15:42:18 testvm1.both.org lsblk[379962]: ├─sda1          8:1    0    4G  0 part /boot -Jun 11 15:42:18 testvm1.both.org lsblk[379962]: └─sda2          8:2    0  116G  0 part -Jun 11 15:42:18 testvm1.both.org lsblk[379962]:   ├─VG01-root 253:0    0    5G  0 lvm  / -Jun 11 15:42:18 testvm1.both.org lsblk[379962]:   ├─VG01-swap 253:1    0    8G  0 lvm  [SWAP] -Jun 11 15:42:18 testvm1.both.org lsblk[379962]:   ├─VG01-usr  253:2    0   30G  0 lvm  /usr -Jun 11 15:42:18 testvm1.both.org lsblk[379962]:   ├─VG01-tmp  253:3    0   10G  0 lvm  /tmp -Jun 11 15:42:18 testvm1.both.org lsblk[379962]:   ├─VG01-var  253:4    0   20G  0 lvm  /var -Jun 11 15:42:18 testvm1.both.org lsblk[379962]:   └─VG01-home 253:5    0   10G  0 lvm  /home -Jun 11 15:42:18 testvm1.both.org lsblk[379962]: sr0            11:0    1 1024M  0 rom +Jun 11 15:42:18 testvm1.both.org free[379961]: total used free shared buff/cache available +Jun 11 15:42:18 testvm1.both.org free[379961]: Mem: 12635740 531788 11019540 8024 1084412 11812272 +Jun 11 15:42:18 testvm1.both.org free[379961]: Swap: 8388604 0 8388604 +Jun 11 15:42:18 testvm1.both.org lsblk[379962]: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT +Jun 11 15:42:18 testvm1.both.org lsblk[379962]: sda 8:0 0 120G 0 disk +Jun 11 15:42:18 testvm1.both.org lsblk[379962]: ├─sda1 8:1 0 4G 0 part /boot +Jun 11 15:42:18 testvm1.both.org lsblk[379962]: └─sda2 8:2 0 116G 0 part +Jun 11 15:42:18 testvm1.both.org lsblk[379962]: ├─VG01-root 253:0 0 5G 0 lvm / +Jun 11 15:42:18 testvm1.both.org lsblk[379962]: ├─VG01-swap 253:1 0 8G 0 lvm [SWAP] +Jun 11 15:42:18 testvm1.both.org lsblk[379962]: ├─VG01-usr 253:2 0 30G 0 lvm /usr +Jun 11 15:42:18 testvm1.both.org lsblk[379962]: ├─VG01-tmp 253:3 0 10G 0 lvm /tmp +Jun 11 15:42:18 testvm1.both.org lsblk[379962]: ├─VG01-var 253:4 0 20G 0 lvm /var +Jun 11 15:42:18 testvm1.both.org lsblk[379962]: └─VG01-home 253:5 0 10G 0 lvm /home +Jun 11 15:42:18 testvm1.both.org lsblk[379962]: sr0 11:0 1 1024M 0 rom Jun 11 15:42:18 testvm1.both.org systemd[1]: myMonitor.service: Succeeded. Jun 11 15:42:18 testvm1.both.org systemd[1]: Finished Logs system statistics to the systemd journal. ``` -现在你知道了你的服务是可用的,在 `/etc/systemd/system` 目录下创建 `myMonitor.timer` 定时器单元文件,添加如下代码: - +现在你知道了你的服务可以按预期工作了,在 `/etc/systemd/system` 目录下创建 `myMonitor.timer` 定时器单元文件,添加如下代码: ``` # This timer unit is for testing @@ -204,17 +199,15 @@ WantedBy=timers.target 在 `myMonitor.timer` 文件中的 `OnCalendar` 时间格式,`*-*-* *:*:00`,应该会每分钟触发一次定时器去执行 `myMonitor.service` 单元。我会在文章的后面进一步探索 `OnCalendar` 设置。 -到目前为止,在服务被计时器触发运行时观察任意与之有关的日志记录。你也可以跟踪计时器,跟踪服务可以让你接近实时的看到结果。执行 `journalctl` 时带上 `-f` 选项: - +到目前为止,在服务被计时器触发运行时观察与之有关的日志记录。你也可以跟踪计时器,跟踪服务可以让你接近实时的看到结果。执行 `journalctl` 时带上 `-f` 选项: ``` [root@testvm1 system]# journalctl -S today -f -u myMonitor.service -\-- Logs begin at Mon 2020-06-08 07:47:20 EDT. -- +-- Logs begin at Mon 2020-06-08 07:47:20 EDT. -- ``` 执行但是不启用该定时器,看看它运行一段时间后发生了什么: - ``` [root@testvm1 ~]# systemctl start myMonitor.service [root@testvm1 ~]# @@ -222,98 +215,94 @@ WantedBy=timers.target 一条结果立即就显示出来了,下一条大概在一分钟后出来。观察几分钟日志,看看你有没有跟我发现同样的事情: - ``` [root@testvm1 system]# journalctl -S today -f -u myMonitor.service -\-- Logs begin at Mon 2020-06-08 07:47:20 EDT. -- +-- Logs begin at Mon 2020-06-08 07:47:20 EDT. -- Jun 13 08:39:18 testvm1.both.org systemd[1]: Starting Logs system statistics to the systemd journal... Jun 13 08:39:18 testvm1.both.org systemd[1]: myMonitor.service: Succeeded. -Jun 13 08:39:19 testvm1.both.org free[630566]:               total        used        free      shared  buff/cache   available -Jun 13 08:39:19 testvm1.both.org free[630566]: Mem:       12635740      556604    10965516        8036     1113620    11785628 -Jun 13 08:39:19 testvm1.both.org free[630566]: Swap:       8388604           0     8388604 +Jun 13 08:39:19 testvm1.both.org free[630566]: total used free shared buff/cache available +Jun 13 08:39:19 testvm1.both.org free[630566]: Mem: 12635740 556604 10965516 8036 1113620 11785628 +Jun 13 08:39:19 testvm1.both.org free[630566]: Swap: 8388604 0 8388604 Jun 13 08:39:18 testvm1.both.org systemd[1]: Finished Logs system statistics to the systemd journal. -Jun 13 08:39:19 testvm1.both.org lsblk[630567]: NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT -Jun 13 08:39:19 testvm1.both.org lsblk[630567]: sda             8:0    0  120G  0 disk -Jun 13 08:39:19 testvm1.both.org lsblk[630567]: ├─sda1          8:1    0    4G  0 part /boot -Jun 13 08:39:19 testvm1.both.org lsblk[630567]: └─sda2          8:2    0  116G  0 part -Jun 13 08:39:19 testvm1.both.org lsblk[630567]:   ├─VG01-root 253:0    0    5G  0 lvm  / -Jun 13 08:39:19 testvm1.both.org lsblk[630567]:   ├─VG01-swap 253:1    0    8G  0 lvm  [SWAP] -Jun 13 08:39:19 testvm1.both.org lsblk[630567]:   ├─VG01-usr  253:2    0   30G  0 lvm  /usr -Jun 13 08:39:19 testvm1.both.org lsblk[630567]:   ├─VG01-tmp  253:3    0   10G  0 lvm  /tmp -Jun 13 08:39:19 testvm1.both.org lsblk[630567]:   ├─VG01-var  253:4    0   20G  0 lvm  /var -Jun 13 08:39:19 testvm1.both.org lsblk[630567]:   └─VG01-home 253:5    0   10G  0 lvm  /home -Jun 13 08:39:19 testvm1.both.org lsblk[630567]: sr0            11:0    1 1024M  0 rom +Jun 13 08:39:19 testvm1.both.org lsblk[630567]: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT +Jun 13 08:39:19 testvm1.both.org lsblk[630567]: sda 8:0 0 120G 0 disk +Jun 13 08:39:19 testvm1.both.org lsblk[630567]: ├─sda1 8:1 0 4G 0 part /boot +Jun 13 08:39:19 testvm1.both.org lsblk[630567]: └─sda2 8:2 0 116G 0 part +Jun 13 08:39:19 testvm1.both.org lsblk[630567]: ├─VG01-root 253:0 0 5G 0 lvm / +Jun 13 08:39:19 testvm1.both.org lsblk[630567]: ├─VG01-swap 253:1 0 8G 0 lvm [SWAP] +Jun 13 08:39:19 testvm1.both.org lsblk[630567]: ├─VG01-usr 253:2 0 30G 0 lvm /usr +Jun 13 08:39:19 testvm1.both.org lsblk[630567]: ├─VG01-tmp 253:3 0 10G 0 lvm /tmp +Jun 13 08:39:19 testvm1.both.org lsblk[630567]: ├─VG01-var 253:4 0 20G 0 lvm /var +Jun 13 08:39:19 testvm1.both.org lsblk[630567]: └─VG01-home 253:5 0 10G 0 lvm /home +Jun 13 08:39:19 testvm1.both.org lsblk[630567]: sr0 11:0 1 1024M 0 rom Jun 13 08:40:46 testvm1.both.org systemd[1]: Starting Logs system statistics to the systemd journal... -Jun 13 08:40:46 testvm1.both.org free[630572]:               total        used        free      shared  buff/cache   available -Jun 13 08:40:46 testvm1.both.org free[630572]: Mem:       12635740      555228    10966836        8036     1113676    11786996 -Jun 13 08:40:46 testvm1.both.org free[630572]: Swap:       8388604           0     8388604 -Jun 13 08:40:46 testvm1.both.org lsblk[630574]: NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT -Jun 13 08:40:46 testvm1.both.org lsblk[630574]: sda             8:0    0  120G  0 disk -Jun 13 08:40:46 testvm1.both.org lsblk[630574]: ├─sda1          8:1    0    4G  0 part /boot -Jun 13 08:40:46 testvm1.both.org lsblk[630574]: └─sda2          8:2    0  116G  0 part -Jun 13 08:40:46 testvm1.both.org lsblk[630574]:   ├─VG01-root 253:0    0    5G  0 lvm  / -Jun 13 08:40:46 testvm1.both.org lsblk[630574]:   ├─VG01-swap 253:1    0    8G  0 lvm  [SWAP] -Jun 13 08:40:46 testvm1.both.org lsblk[630574]:   ├─VG01-usr  253:2    0   30G  0 lvm  /usr -Jun 13 08:40:46 testvm1.both.org lsblk[630574]:   ├─VG01-tmp  253:3    0   10G  0 lvm  /tmp -Jun 13 08:40:46 testvm1.both.org lsblk[630574]:   ├─VG01-var  253:4    0   20G  0 lvm  /var -Jun 13 08:40:46 testvm1.both.org lsblk[630574]:   └─VG01-home 253:5    0   10G  0 lvm  /home -Jun 13 08:40:46 testvm1.both.org lsblk[630574]: sr0            11:0    1 1024M  0 rom +Jun 13 08:40:46 testvm1.both.org free[630572]: total used free shared buff/cache available +Jun 13 08:40:46 testvm1.both.org free[630572]: Mem: 12635740 555228 10966836 8036 1113676 11786996 +Jun 13 08:40:46 testvm1.both.org free[630572]: Swap: 8388604 0 8388604 +Jun 13 08:40:46 testvm1.both.org lsblk[630574]: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT +Jun 13 08:40:46 testvm1.both.org lsblk[630574]: sda 8:0 0 120G 0 disk +Jun 13 08:40:46 testvm1.both.org lsblk[630574]: ├─sda1 8:1 0 4G 0 part /boot +Jun 13 08:40:46 testvm1.both.org lsblk[630574]: └─sda2 8:2 0 116G 0 part +Jun 13 08:40:46 testvm1.both.org lsblk[630574]: ├─VG01-root 253:0 0 5G 0 lvm / +Jun 13 08:40:46 testvm1.both.org lsblk[630574]: ├─VG01-swap 253:1 0 8G 0 lvm [SWAP] +Jun 13 08:40:46 testvm1.both.org lsblk[630574]: ├─VG01-usr 253:2 0 30G 0 lvm /usr +Jun 13 08:40:46 testvm1.both.org lsblk[630574]: ├─VG01-tmp 253:3 0 10G 0 lvm /tmp +Jun 13 08:40:46 testvm1.both.org lsblk[630574]: ├─VG01-var 253:4 0 20G 0 lvm /var +Jun 13 08:40:46 testvm1.both.org lsblk[630574]: └─VG01-home 253:5 0 10G 0 lvm /home +Jun 13 08:40:46 testvm1.both.org lsblk[630574]: sr0 11:0 1 1024M 0 rom Jun 13 08:40:46 testvm1.both.org systemd[1]: myMonitor.service: Succeeded. Jun 13 08:40:46 testvm1.both.org systemd[1]: Finished Logs system statistics to the systemd journal. Jun 13 08:41:46 testvm1.both.org systemd[1]: Starting Logs system statistics to the systemd journal... -Jun 13 08:41:46 testvm1.both.org free[630580]:               total        used        free      shared  buff/cache   available -Jun 13 08:41:46 testvm1.both.org free[630580]: Mem:       12635740      553488    10968564        8036     1113688    11788744 -Jun 13 08:41:46 testvm1.both.org free[630580]: Swap:       8388604           0     8388604 -Jun 13 08:41:47 testvm1.both.org lsblk[630581]: NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT -Jun 13 08:41:47 testvm1.both.org lsblk[630581]: sda             8:0    0  120G  0 disk -Jun 13 08:41:47 testvm1.both.org lsblk[630581]: ├─sda1          8:1    0    4G  0 part /boot -Jun 13 08:41:47 testvm1.both.org lsblk[630581]: └─sda2          8:2    0  116G  0 part -Jun 13 08:41:47 testvm1.both.org lsblk[630581]:   ├─VG01-root 253:0    0    5G  0 lvm  / -Jun 13 08:41:47 testvm1.both.org lsblk[630581]:   ├─VG01-swap 253:1    0    8G  0 lvm  [SWAP] -Jun 13 08:41:47 testvm1.both.org lsblk[630581]:   ├─VG01-usr  253:2    0   30G  0 lvm  /usr -Jun 13 08:41:47 testvm1.both.org lsblk[630581]:   ├─VG01-tmp  253:3    0   10G  0 lvm  /tmp -Jun 13 08:41:47 testvm1.both.org lsblk[630581]:   ├─VG01-var  253:4    0   20G  0 lvm  /var -Jun 13 08:41:47 testvm1.both.org lsblk[630581]:   └─VG01-home 253:5    0   10G  0 lvm  /home -Jun 13 08:41:47 testvm1.both.org lsblk[630581]: sr0            11:0    1 1024M  0 rom +Jun 13 08:41:46 testvm1.both.org free[630580]: total used free shared buff/cache available +Jun 13 08:41:46 testvm1.both.org free[630580]: Mem: 12635740 553488 10968564 8036 1113688 11788744 +Jun 13 08:41:46 testvm1.both.org free[630580]: Swap: 8388604 0 8388604 +Jun 13 08:41:47 testvm1.both.org lsblk[630581]: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT +Jun 13 08:41:47 testvm1.both.org lsblk[630581]: sda 8:0 0 120G 0 disk +Jun 13 08:41:47 testvm1.both.org lsblk[630581]: ├─sda1 8:1 0 4G 0 part /boot +Jun 13 08:41:47 testvm1.both.org lsblk[630581]: └─sda2 8:2 0 116G 0 part +Jun 13 08:41:47 testvm1.both.org lsblk[630581]: ├─VG01-root 253:0 0 5G 0 lvm / +Jun 13 08:41:47 testvm1.both.org lsblk[630581]: ├─VG01-swap 253:1 0 8G 0 lvm [SWAP] +Jun 13 08:41:47 testvm1.both.org lsblk[630581]: ├─VG01-usr 253:2 0 30G 0 lvm /usr +Jun 13 08:41:47 testvm1.both.org lsblk[630581]: ├─VG01-tmp 253:3 0 10G 0 lvm /tmp +Jun 13 08:41:47 testvm1.both.org lsblk[630581]: ├─VG01-var 253:4 0 20G 0 lvm /var +Jun 13 08:41:47 testvm1.both.org lsblk[630581]: └─VG01-home 253:5 0 10G 0 lvm /home +Jun 13 08:41:47 testvm1.both.org lsblk[630581]: sr0 11:0 1 1024M 0 rom Jun 13 08:41:47 testvm1.both.org systemd[1]: myMonitor.service: Succeeded. Jun 13 08:41:47 testvm1.both.org systemd[1]: Finished Logs system statistics to the systemd journal. ``` 别忘了检查下计时器和服务的状态。 -你在日志里大概至少注意到两件事。第一,你不需要特地做什么来让 `myMonitor.service` 单元中 `ExecStart` 触发器的 `STDOUT` 存储到日志里。这都是用 systemd 来托管服务的一部分功能。然而,它确实意味着你需要小心对待服务单元里面执行的脚本和它们能产生多少 `STDOUT`。 +你在日志里大概至少注意到两件事。第一,你不需要特地做什么来让 `myMonitor.service` 单元中 `ExecStart` 触发器产生的 `STDOUT` 存储到日志里。这都是用 systemd 来运行服务的一部分功能。然而,它确实意味着你需要小心对待服务单元里面执行的脚本和它们能产生多少 `STDOUT`。 -第二,定时器并不是在每分钟的 :00 秒执行的,甚至每次执行的时间间隔都不是刚好一分钟。这是特意的设计,但是有必要的话可以被改写(如果只是它挑战了你的系统管理员的敏感神经)。 +第二,定时器并不是精确在每分钟的 :00 秒执行的,甚至每次执行的时间间隔都不是刚好一分钟。这是特意的设计,但是有必要的话可以改变这种行为(如果只是它挑战了你的系统管理员的敏感神经)。 -这样设计的初衷是为了防止多个服务在同个时刻被触发。举个例子,你可以用例如 Weekly,Daily 或者跟多其他的时间格式。这些快捷写法都被定义为在某一天的 00:00:00 执行。当多个定时器都这样定义的话,有很大可能它们会同时执行。 +这样设计的初衷是为了防止多个服务在完全相同的时刻被触发。举个例子,你可以用例如 Weekly,Daily 等时间格式。这些快捷写法都被定义为在某一天的 00:00:00 执行。当多个定时器都这样定义的话,有很大可能它们会同时执行。 -systemd 定时器被故意设计成在规定时间附近随机波动的时间点触发来避免同一时间触发。它们在一个时间窗口内半随机触发,时间窗口开始于预设的触发时间,结束于预设时间加一分钟。根据 `systemd.timer` 的 man 手册,相对于其他已经定义的定时器单元,这个触发时间保持在稳定的位置。你可以在日志条目中看到,定时器在启动后立即触发,然后在每分钟后的 46 或 47 秒触发。 +systemd 定时器被故意设计成在规定时间附近随机波动的时间点触发,以避免同一时间触发。它们在一个时间窗口内半随机触发,时间窗口开始于预设的触发时间,结束于预设时间后一分钟。根据 `systemd.timer` 的手册页,这个触发时间相对于其他已经定义的定时器单元保持在稳定的位置。你可以在日志条目中看到,定时器在启动后立即触发,然后在每分钟后的 46 或 47 秒触发。 -大部分情况下,这种概率抖动的定时器是没事的。当调度类似执行备份的任务,只需要它们在下班时间运行,这样是没问题的。系统管理员可以选择确定的开始时间来确保不和其他任务冲突,例如 01:05:00 这样典型的 cron 工作时间,但是有很大范围的时间值可以满足这一点。在开始时间上一个分钟级别的随机往往是无关紧要的。 - -然而,对某些任务来说,确定的触发时间是个硬性要求。对于这类任务,你可以向单元文件的 `Timer` 块中添加如下声明来指定更高的触发时间跨度精确度(一微秒以内): +大部分情况下,这种概率抖动的定时器是没事的。当调度类似执行备份的任务,只需要它们在下班时间运行,这样是没问题的。系统管理员可以选择确定的开始时间来确保不和其他任务冲突,例如 01:05:00 这样典型的 cron 作业时间,但是有很大范围的时间值可以满足这一点。在开始时间上的一个分钟级别的随机往往是无关紧要的。 +然而,对某些任务来说,精确的触发时间是个硬性要求。对于这类任务,你可以向单元文件的 `Timer` 块中添加如下声明来指定更高的触发时间跨度精确度(精确到微秒以内): ``` -`AccuracySec=1us` +AccuracySec=1us ``` -时间跨度可用于指定所需的精度,以及定义重复事件或一次性事件的时间跨度。它能识别一下单位: - - * usec,us,µs - * msec,ms - * seconds,second,sec,s - * minutes,minute,min,m - * hours,hour,hr,h - * days,day,d - * weeks,week,w - * months,month,M (定义为 30.44 天) - * years,year,y (定义为 365.25 天) +时间跨度可用于指定所需的精度,以及定义重复事件或一次性事件的时间跨度。它能识别以下单位: + * `usec`,`us`,`µs` + * `msec`,`ms` + * `seconds`,`second`,`sec`,`s` + * `minutes`,`minute`,`min`,`m` + * `hours`,`hour`,`hr`,`h` + * `days`,`day`,`d` + * `weeks`,`week`,`w` + * `months`,`month`,`M`(定义为 30.44 天) + * `years`,`year`,`y`(定义为 365.25 天) 所有 `/usr/lib/systemd/system` 中的定时器都指定了一个更宽松的时间精度,因为精准时间没那么重要。看看这些系统创建的定时器的时间格式: - ``` [root@testvm1 system]# grep Accur /usr/lib/systemd/system/*timer /usr/lib/systemd/system/fstrim.timer:AccuracySec=1h @@ -325,82 +314,72 @@ systemd 定时器被故意设计成在规定时间附近随机波动的时间点 [root@testvm1 system]# ``` - 看下 `/usr/lib/systemd/system` 目录下部分定时器单元文件的完整内容,看看它们是如何构建的。 -你没有必要在实验中设置开机启动这个定时器,下面这个命令会设置开机自启: - +在本实验中不必让这个定时器在启动时激活,但下面这个命令可以设置开机自启: ``` [root@testvm1 system]# systemctl enable myMonitor.timer ``` -你创建的单元文件不一定是可执行的。你同样不需要启用服务因为它是被定时器触发的。如果你需要的话,你仍然可以在命令行里手动触发该服务单元。尝试一下,然后观察日志。 +你创建的单元文件不需要是可执行的。你同样不需要启用服务,因为它是被定时器触发的。如果你需要的话,你仍然可以在命令行里手动触发该服务单元。尝试一下,然后观察日志。 -翻阅 `Systemd.timer` 和 `Systemd.time` 的 man 手册查看更多有关精确度,时间格式和触发事件相关信息。 +关于定时器精度、事件时间规格和触发事件的详细信息,请参见 systemd.timer 和 systemd.time 的手册页。 ### 定时器类型 -systemd 定时器还有一些在 cron 中找不到的功能,仅在确定的,重复的,实时的日期和时间触发。systemd 定时器可以被配置成在其他 systemd 单元状态发生改变时触发。举个例子,一个定时器可以配置成在系统开机,启动,或是某个确定的服务单元激活之后的一段时间被触发。这些被称为单调计时器。单调指的是一个持续增长的计数器或序列。这些定时器没有持久化因为它们在每次 boot 后被重置。 - -表格 1 列出了一些单调定时器以及每个定时器的简短定义,同时有 `OnCalendar` 定时器,这些不是单调的,它们被用于未来有可能重复的某个确定时间。这个信息来自于 `systemd.timer` 的 man 手册,有一些不重要的修改。 +systemd 定时器还有一些在 cron 中找不到的功能,cron 只在确定的、重复的、具体的日期和时间触发。systemd 定时器可以被配置成根据其他 systemd 单元状态发生改变时触发。举个例子,定时器可以配置成在系统开机、启动后,或是某个确定的服务单元激活之后的一段时间被触发。这些被称为单调计时器。“单调”指的是一个持续增长的计数器或序列。这些定时器不是持久的,因为它们在每次启动后都会重置。 +表格 1 列出了一些单调定时器以及每个定时器的简短定义,同时有 `OnCalendar` 定时器,这些不是单调的,它们被用于指定未来有可能重复的某个确定时间。这个信息来自于 `systemd.timer` 的手册页,有一些不重要的修改。 定时器 | 单调性 | 定义 ---|---|--- `OnActiveSec=` | X | 定义了一个与定时器被激活的那一刻相关的定时器。 `OnBootSec=` | X | 定义了一个与机器启动时间相关的计时器。 -`OnStartupSec=` | X | 定义了一个与服务管理器首次启动相关的计时器。对于系统定时器来说,这个定时器与 OnBootSec= 类似,因为系统服务管理器在机器启动后很短的时间后就会启动。当以在每个用户服务管理器中运行的单元进行配置时,它尤其有用,因为用户的服务管理器通常在首次登录后启动,而不是机器启动后。 +`OnStartupSec=` | X | 定义了一个与服务管理器首次启动相关的计时器。对于系统定时器来说,这个定时器与 `OnBootSec=` 类似,因为系统服务管理器在机器启动后很短的时间后就会启动。当以在每个用户服务管理器中运行的单元进行配置时,它尤其有用,因为用户的服务管理器通常在首次登录后启动,而不是机器启动后。 `OnUnitActiveSec=` | X | 定义了一个与将要激活的定时器上次激活时间相关的定时器。 `OnUnitInactiveSec=` | X | 定义了一个与将要激活的定时器上次停用时间相关的定时器。 -`OnCalendar=` | | 定义了一个有日期事件表达式语法的实时(即时钟)定时器。查看 systemd.time(7) 的 man 手册获取更多与日历事件表达式相关的语法信息。除此以外,它的语义和 `OnActiveSec=` 类似。 +`OnCalendar=` | | 定义了一个有日期事件表达式语法的实时(即时钟)定时器。查看 `systemd.time(7)` 的手册页获取更多与日历事件表达式相关的语法信息。除此以外,它的语义和 `OnActiveSec=` 类似。 _Table 1: systemd 定时器定义_ - -单调计时器课使用同样的简写名作为它们的时间跨度,即我们之前提到的 `AccuracySec` 表达式,但是 systemd 将这些名字统一转换成了秒。举个例子,比如你想规定某个定时器在系统启动后五天触发一次一个事件;它可能看起来像 `OnBootSec=5d`。如果机器启动于 `2020-06-15 09:45:27`,这个定时器会在 `2020-06-20 09:45:27` 或在这之后的一分钟内触发。这个定时器最类似于 cron 服务所使用的计时器。 - - +单调计时器可使用同样的简写名作为它们的时间跨度,即我们之前提到的 `AccuracySec` 表达式,但是 systemd 将这些名字统一转换成了秒。举个例子,比如你想规定某个定时器在系统启动后五天触发一次事件;它可能看起来像 `OnBootSec=5d`。如果机器启动于 `2020-06-15 09:45:27`,这个定时器会在 `2020-06-20 09:45:27` 或在这之后的一分钟内触发。 ### 日历事件格式 -日历事件格式是定时器在所需重复的时间触发的关键。我们开始看下一些 `OnCalendar` 设置一起使用的格式。 +日历事件格式是定时器在所需的重复时间触发的关键。我们开始看下一些 `OnCalendar` 设置一起使用的格式。 -与 crontab 中的格式相比,systemd 及其计时器使用的时间和日历格式风格不同。它比 crontab 更为灵活,而且可以使用类似 "at" 命令的方式允许模糊的日期和时间。它还应该足够熟悉使其易于理解。 +与 crontab 中的格式相比,systemd 及其计时器使用的时间和日历格式风格不同。它比 crontab 更为灵活,而且可以使用类似 `at` 命令的方式允许模糊的日期和时间。它还应该足够熟悉使其易于理解。 -systemd 定时器使用 `OnCalendar=` 的基础格式是 `DOW YYYY-MM-DD HH:MM:SS`。DOW( 天或星期)是选填的,其他字段可以用一个星号(*)来匹配此位置的任意值。所有的日历时间格式会被转换成标准格式。如果时间没有指定,它会被设置为 00:00:00。如果日期没有指定但是时间指定了,那么下次匹配的时间可能是今天或者明天,取决于当前的时间。名字或数字可被用于月份或者星期几。每个单元的逗号分隔列表都可以被指定。单元范围可以在开始值和结束值之间用`。。.`指定。 +systemd 定时器使用 `OnCalendar=` 的基础格式是 `DOW YYYY-MM-DD HH:MM:SS`。DOW(星期几)是选填的,其他字段可以用一个星号(`*`)来匹配此位置的任意值。所有的日历时间格式会被转换成标准格式。如果时间没有指定,它会被设置为 `00:00:00`。如果日期没有指定但是时间指定了,那么下次匹配的时间可能是今天或者明天,取决于当前的时间。月份和星期可以使用名称或数字。每个单元都可以使用逗号分隔的列表。单元范围可以在开始值和结束值之间用 `..` 指定。 - -指定日期有一些有趣的选项,波浪号(~)可以指定月份的最后一条或者最后一天之前的某几天。"/"可以用来指定星期几作为修饰符。 +指定日期有一些有趣的选项,波浪号(`~`)可以指定月份的最后一天或者最后一天之前的某几天。`/` 可以用来指定星期几作为修饰符。 这里有几个在 `OnCalendar` 表达式中使用的典型时间格式例子。 - 日期事件格式 | 描述 ---|--- -DOW YYYY-MM-DD HH:MM:SS | -*-*-* 00:15:30 | 每年每月每天的 0 点 15 分 30 秒 -Weekly | 每个周一的 00:00:00 -Mon *-*-* 00:00:00 | 同上 -Mon | 参考 Weekly -Wed 2020-*-* | 2020 年每个周三的 00:00:00 -Mon。.Fri 2021-*-* | 2021 年的每个工作日的 00:00:00 -2022-6,7,8-1,15 01:15:00 | 2022 年 6,7,8 月的 1 到 15 号的 01:15:00 -Mon *-05~03 | 每年五月份的下个周一发生,同时这也是距离月末的第三天。 -Mon。.Fri *-08~04 | 任何年份 8 月末前的第四天(工作日也算) -*-05~03/2 | 五月末的第三天,然后 2 天后再来一次。每年重复一次。注意这个表达式使用了波浪号(~)。 -*-05-03/2 | 五月的第三天,然后每两天重复一次直到 5 月底。注意这个表达式使用了破折号(-)。 - +`DOW YYYY-MM-DD HH:MM:SS` | +`*-*-* 00:15:30` | 每年每月每天的 0 点 15 分 30 秒 +`Weekly` | 每个周一的 00:00:00 +`Mon *-*-* 00:00:00` | 同上 +`Mon` | 同上 +`Wed 2020-*-*` | 2020 年每个周三的 00:00:00 +`Mon..Fri 2021-*-*` | 2021 年的每个工作日(周一到周五)的 00:00:00 +`2022-6,7,8-1,15 01:15:00` | 2022 年 6、7、8 月的 1 到 15 号的 01:15:00 +`Mon *-05~03` | 每年五月份的下个周一同时也是月末的倒数第三天 +`Mon..Fri *-08~04` | 任何年份 8 月末的倒数第四天,同时也须是工作日 +`*-05~03/2` | 五月末的倒数第三天,然后 2 天后再来一次。每年重复一次。注意这个表达式使用了波浪号(`~`)。 +`*-05-03/2` | 五月的第三天,然后每两天重复一次直到 5 月底。注意这个表达式使用了破折号(`-`)。 _Table 2: `OnCalendar` 事件时间格式例子_ ### 测试日历格式 -systemd 提供了一个绝佳的工具用于检测和测试定时器中日历时间事件的格式。`systemd-analyze calendar` 工具解析一个时间事件格式,提供标准格式和其他有趣的信息,例如下次"经过"(即匹配)的日期和时间,以及距离下次触发之前大概时间。 - -首先,看看未来没有时间的日期(注意 `Next elapse` 和 `UTC` 的时间会根据你当地时区改变): +systemd 提供了一个绝佳的工具用于检测和测试定时器中日历时间事件的格式。`systemd-analyze calendar` 工具解析一个时间事件格式,提供标准格式和其他有趣的信息,例如下次“经过”(即匹配)的日期和时间,以及距离下次触发之前大概时间。 +首先,看看未来没有时间的日(注意 `Next elapse` 和 `UTC` 的时间会根据你当地时区改变): ``` [student@studentvm1 ~]$ systemd-analyze calendar 2030-06-17 @@ -414,7 +393,6 @@ Normalized form: 2030-06-17 00:00:00         现在添加一个时间,在这个例子中,日期和时间是当作无关的部分分开解析的: - ``` [root@testvm1 system]# systemd-analyze calendar 2030-06-17 15:21:16   Original form: 2030-06-17                 @@ -433,7 +411,6 @@ Normalized form: *-*-* 15:21:16             为了把日期和时间当作一个单元来分析,可以把它们包在引号里。你在定时器单元里 `OnCalendar=` 时间格式中使用的时候记得把引号去掉,否则会报错: - ``` [root@testvm1 system]# systemd-analyze calendar "2030-06-17 15:21:16" Normalized form: 2030-06-17 15:21:16         @@ -445,7 +422,6 @@ Normalized form: 2030-06-17 15:21:16         现在我们测试下 Table2 里的例子。我尤其喜欢最后一个: - ``` [root@testvm1 system]# systemd-analyze calendar "2022-6,7,8-1,15 01:15:00"   Original form: 2022-6,7,8-1,15 01:15:00 @@ -458,7 +434,6 @@ Normalized form: 2022-06,07,08-01,15 01:15:00 让我们看一个例子,这个例子里我们列出了时间表达式的五个经过时间。 - ``` [root@testvm1 ~]# systemd-analyze calendar --iterations=5 "Mon *-05~3"   Original form: Mon *-05~3                 @@ -487,24 +462,22 @@ Normalized form: Mon *-05~03 00:00:00       systemd 定时器可以用于执行和 cron 工具相同的任务,但是通过按照日历和单调时间格式去触发事件的方法提供了更多的灵活性。 -虽然你为此次实验创建的服务单元通常被定时器调用,你也可以随时使用 `systemctl start myMonitor.service` 命令去触发它。多个需要维护的任务可以被写成脚本放在单个定时器中;它们可以是 Bash 脚本或者其他 Linux 程序。你可以通过触发定时器来运行所有的脚本来运行服务,也可以按照需要执行单独的脚本。 +虽然你为此次实验创建的服务单元通常是由定时器调用的,你也可以随时使用 `systemctl start myMonitor.service` 命令去触发它。可以在一个定时器中编写多个维护任务的脚本;它们可以是 Bash 脚本或者其他 Linux 程序。你可以通过触发定时器来运行所有的脚本来运行服务,也可以按照需要执行单独的脚本。 我会在下篇文章中更加深入的探索 systemd 时间格式的用处。 -我还没看到任何 `cron` 和 `at` 要被弃用的迹象。我希望这一切不会发生因为 `at` 至少在执行一次性调度任务的时候要比 systemd 定时器容易的多。 +我还没有看到任何迹象表明 cron 和 at 将被废弃。我希望这种情况不会发生,因为至少 `at` 在执行一次性调度任务的时候要比 systemd 定时器容易的多。 ### 参考资料 -网上有大量的关于 systemd 的参考资料,但是大部分都有点幼稚,粗略甚至有误导性。除了本文中提到的资料,下列的网页提供了跟多可靠且详细的 systemd 入门信息。 +网上有大量的关于 systemd 的参考资料,但是大部分都有点简略、晦涩甚至有误导性。除了本文中提到的资料,下列的网页提供了跟多可靠且详细的 systemd 入门信息。 - * Fedora 项目有切实好用的 [systemd 入门 ][5]。它囊括了几乎所有你需要知道的关于如何使用 systemd 配置,管理和维护 Fedora 计算机。 - * Fedora 项目也有一个不错的[备忘录 ][6],交叉引用了过去 SystemV 命令和 systemd 命令做对比。 - * 关于 systemd 和为创建这个项目原因的技术细节,查看 [Freedesktop.org][7]'s [systemd 描述 ][8]。 - * [Linux.com][9] 的"更多 systemd 的乐趣"栏目提供了跟多 systemd 进阶的[内幕和技巧 ][10]。 + * Fedora 项目有一篇切实好用的 [systemd 入门][5],它囊括了几乎所有你需要知道的关于如何使用 systemd 配置、管理和维护 Fedora 计算机的信息。 + * Fedora 项目也有一个不错的 [备忘录][6],交叉引用了过去 SystemV 命令和 systemd 命令做对比。 + * 关于 systemd 的技术细节和创建这个项目的原因,请查看 [Freedesktop.org][7] 上的 [systemd 描述][8]。 + * [Linux.com][9] 的“更多 systemd 的乐趣”栏目提供了更多高级的 systemd [信息和技巧][10]。 - - -还有一系列 Lennart Poettering 撰写的 Linux 系统管理相关的深度的技术文章,他是 systemd 的设计者和主要实现者。这些文章写在 2010 年 4 月至 2011 年 9 月,但是它们如同现在一样贴切。systemd 及其生态相关的几乎一些优秀的产出基本都是基于这些论文。 +此外,还有一系列深度的技术文章,是由 systemd 的设计者和主要实现者 Lennart Poettering 为 Linux 系统管理员撰写的。这些文章写于 2010 年 4 月至 2011 年 9 月间,但它们现在和当时一样具有现实意义。关于 systemd 及其生态的许多其他好文章都是基于这些文章: * [Rethinking PID 1][11] * [systemd for Administrators,Part I][12] @@ -519,8 +492,6 @@ systemd 定时器可以用于执行和 cron 工具相同的任务,但是通过 * [systemd for Administrators,Part X][21] * [systemd for Administrators,Part XI][22] - - -------------------------------------------------------------------------------- via: https://opensource.com/article/20/7/systemd-timers @@ -528,7 +499,7 @@ via: https://opensource.com/article/20/7/systemd-timers 作者:[David Both][a] 选题:[lujun9972][b] 译者:[tt67wq](https://github.com/tt67wq) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 9616c24fb5fa79211690ef2a4b079116fa9c6cd5 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 18 Apr 2021 10:47:15 +0800 Subject: [PATCH 715/818] PUB @tt76wq https://linux.cn/article-13307-1.html --- .../20200707 Use systemd timers instead of cronjobs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200707 Use systemd timers instead of cronjobs.md (99%) diff --git a/translated/tech/20200707 Use systemd timers instead of cronjobs.md b/published/20200707 Use systemd timers instead of cronjobs.md similarity index 99% rename from translated/tech/20200707 Use systemd timers instead of cronjobs.md rename to published/20200707 Use systemd timers instead of cronjobs.md index 6f1c34e46d..5b80ac5816 100644 --- a/translated/tech/20200707 Use systemd timers instead of cronjobs.md +++ b/published/20200707 Use systemd timers instead of cronjobs.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (tt67wq) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13307-1.html) [#]: subject: (Use systemd timers instead of cronjobs) [#]: via: (https://opensource.com/article/20/7/systemd-timers) [#]: author: (David Both https://opensource.com/users/dboth) From 90c6430bf46bcc1cd3c9453628acea2ce2b97ad1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 18 Apr 2021 11:05:11 +0800 Subject: [PATCH 716/818] PRF --- ...7 Use systemd timers instead of cronjobs.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/published/20200707 Use systemd timers instead of cronjobs.md b/published/20200707 Use systemd timers instead of cronjobs.md index 5b80ac5816..81e4553369 100644 --- a/published/20200707 Use systemd timers instead of cronjobs.md +++ b/published/20200707 Use systemd timers instead of cronjobs.md @@ -291,15 +291,15 @@ AccuracySec=1us 时间跨度可用于指定所需的精度,以及定义重复事件或一次性事件的时间跨度。它能识别以下单位: - * `usec`,`us`,`µs` - * `msec`,`ms` - * `seconds`,`second`,`sec`,`s` - * `minutes`,`minute`,`min`,`m` - * `hours`,`hour`,`hr`,`h` - * `days`,`day`,`d` - * `weeks`,`week`,`w` - * `months`,`month`,`M`(定义为 30.44 天) - * `years`,`year`,`y`(定义为 365.25 天) + * `usec`、`us`、`µs` + * `msec`、`ms` + * `seconds`、`second`、`sec`、`s` + * `minutes`、`minute`、`min`、`m` + * `hours`、`hour`、`hr`、`h` + * `days`、`day`、`d` + * `weeks`、`week`、`w` + * `months`、`month`、`M`(定义为 30.44 天) + * `years`、`year`、`y`(定义为 365.25 天) 所有 `/usr/lib/systemd/system` 中的定时器都指定了一个更宽松的时间精度,因为精准时间没那么重要。看看这些系统创建的定时器的时间格式: From c3bd8a7b61c4b0e10c8498bede84d49b87494913 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 18 Apr 2021 11:46:59 +0800 Subject: [PATCH 717/818] PRF --- ...using bspwm for my Linux window manager.md | 47 ++++++++----------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/translated/tech/20210407 Why I love using bspwm for my Linux window manager.md b/translated/tech/20210407 Why I love using bspwm for my Linux window manager.md index e7d89c9782..de925e533e 100644 --- a/translated/tech/20210407 Why I love using bspwm for my Linux window manager.md +++ b/translated/tech/20210407 Why I love using bspwm for my Linux window manager.md @@ -3,14 +3,16 @@ [#]: author: (Stephen Adams https://opensource.com/users/stevehnh) [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) 为什么我喜欢用 bspwm 来做我的 Linux 窗口管理器 ====== -在 Fedora Linux 上安装、配置并开始使用 bspwm 窗口管理器。 -![Tall building with windows][1] + +> 在 Fedora Linux 上安装、配置并开始使用 bspwm 窗口管理器。 + +![](https://img.linux.net.cn/data/attachment/album/202104/18/114637hxvqp4hfvbbhihb4.jpg) 有些人喜欢重新布置家具。还有的人喜欢尝试新鞋或定期重新装修他们的卧室。我呢,则是尝试 Linux 桌面。 @@ -18,47 +20,38 @@ ![bspwm desktop][3] -(Stephen Adams, [CC BY-SA 4.0][4]) - 我喜欢 [i3][5] 窗口管理器已经有一段时间了,我很喜欢它的布局方式和上手的便捷性。但 bspwm 的某些特性吸引了我。有几个原因让我决定尝试一下: - * 它_只是_一个窗口管理器。 + * 它_只是_一个窗口管理器(WM)。 * 它由几个易于配置的脚本管理。 * 它默认支持窗口之间的间隙。 - - -可能是最需要指出的第一个原因是它只是一个窗口管理器。和 i3 一样,默认情况下没有任何图形化的功能。你当然可以随心所欲地定制它,但_你_需要付出努力来使它看起来像你想要的。这也是它吸引我的部分原因。 - +可能是最需要指出的第一个原因是它只是一个窗口管理器。和 i3 一样,默认情况下没有任何图形化的那些花哨东西。你当然可以随心所欲地定制它,但_你_需要付出努力来使它看起来像你想要的。这也是它吸引我的部分原因。 虽然它可以在许多发行版上使用,但在我这个例子中使用的是 Fedora Linux。 ### 安装 bspwm -bspwm 在大多数常见的发行版中都有打包,所以你可以用系统的包管理器安装它。这个命令还会安装 [sxkhd][6],一个 X 窗口系统的守护程序,它“通过执行命令对输入事件做出反应”,还有 [dmenu][7],一个通用的 X 窗口菜单: - +bspwm 在大多数常见的发行版中都有打包,所以你可以用系统的包管理器安装它。下面这个命令还会安装 [sxkhd][6],这是一个 X 窗口系统的守护程序,它“通过执行命令对输入事件做出反应”;还有 [dmenu][7],这是一个通用的 X 窗口菜单: ``` -`dnf install bspwm sxkhd dmenu` +dnf install bspwm sxkhd dmenu ``` -因为 bspwm 只是一个窗口管理器,所以没有任何内置的快捷键或键盘命令。这也是它与 i3 等软件的不同之处。所以,在你第一次启动窗口管理器之前,请先配置一下 sxkhd: - +因为 bspwm 只是一个窗口管理器,所以没有任何内置的快捷键或键盘命令。这也是它与 i3 等软件的不同之处。所以,在你第一次启动窗口管理器之前,请先配置一下 `sxkhd`: ``` systemctl start sxkhd systemctl enable sxkhd ``` -这样就可以在登录时启用 sxkhd,但你还需要一些基本功能的配置: - +这样就可以在登录时启用 `sxkhd`,但你还需要一些基本功能的配置: ``` -`curl https://raw.githubusercontent.com/baskerville/bspwm/master/examples/sxhkdrc --output ~/.config/sxkhd/sxkhdrc` +curl https://raw.githubusercontent.com/baskerville/bspwm/master/examples/sxhkdrc --output ~/.config/sxkhd/sxkhdrc ``` -在你深入了解之前,不妨先看看这个文件,因为有些脚本调用的命令可能在你的系统中并不存在。一个很好的例子是调用 `urxvt` 的 `super + Return` 快捷键。把它改成你喜欢的终端,尤其是当你没有安装 urxvt 的时候: - +在你深入了解之前,不妨先看看这个文件,因为有些脚本调用的命令可能在你的系统中并不存在。一个很好的例子是调用 `urxvt` 的 `super + Return` 快捷键。把它改成你喜欢的终端,尤其是当你没有安装 `urxvt` 的时候: ``` # @@ -74,19 +67,19 @@ super + @space         dmenu_run ``` -如果你使用的是 GDM、LightDM 或其他显示管理器,只要在登录前选择 bspwm 即可。 +如果你使用的是 GDM、LightDM 或其他显示管理器(DM),只要在登录前选择 `bspwm` 即可。 ### 配置 bspwm -当你登录后,你会看到屏幕上什么都没有。这不是你感觉到的空虚感。而是可能性!你现在可以开始摆弄桌面环境的所有部分了。你现在可以开始摆弄这些年你认为理所当然的桌面环境的所有部分了。从头开始构建并不容易,但一旦你掌握了诀窍,就会非常有收获。 +当你登录后,你会看到屏幕上什么都没有。这不是你感觉到的空虚感。而是无限可能性!你现在可以开始摆弄桌面环境的所有部分了。你现在可以开始摆弄这些年你认为理所当然的桌面环境的所有部分了。从头开始构建并不容易,但一旦你掌握了诀窍,就会非常有收获。 -任何窗口管理器最困难的是掌握快捷键。你开始会很慢,但在很短的时间内,你会只使用键盘在系统中到处操作,在你的朋友和家人面前看起来像一个终极黑客。 +任何窗口管理器最困难的是掌握快捷键。你开始会很慢,但在很短的时间内,你就可以只使用键盘在系统中到处操作,在你的朋友和家人面前看起来像一个终极黑客。 -你可以通过编辑 `~/.config/bspwm/bspwmrc`,在启动时添加应用,设置桌面和显示器,并为你的窗口应该如何表现设置规则,随心所欲地定制系统。有一些默认设置的例子可以让你开始使用。键盘快捷键都是由 **sxkhdrc** 文件管理的。 +你可以通过编辑 `~/.config/bspwm/bspwmrc`,在启动时添加应用,设置桌面和显示器,并为你的窗口应该如何表现设置规则,随心所欲地定制系统。有一些默认设置的例子可以让你开始使用。键盘快捷键都是由 `sxkhdrc` 文件管理的。 -还有更多的开源项目可以安装,让你的电脑看起来更漂亮,比如用于桌面背景的 [Feh][8] ,状态栏的 [Polybar][9] ,应用启动器的 [Rofi][10] ,还有 [Compton][11] 可以给你提供阴影和透明度,让你的电脑看起来更漂亮更有光泽。 +还有更多的开源项目可以安装,让你的电脑看起来更漂亮,比如用于桌面背景的 [Feh][8]、状态栏的 [Polybar][9]、应用启动器的 [Rofi][10],还有 [Compton][11] 可以给你提供阴影和透明度,可以让你的电脑看起来焕然一新。 -玩得愉快! +玩得愉快! -------------------------------------------------------------------------------- @@ -95,7 +88,7 @@ via: https://opensource.com/article/21/4/bspwm-linux 作者:[Stephen Adams][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/) 荣誉推出 From 9cd2f37b6f99074434e319a894e625723fc1a79f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 18 Apr 2021 11:47:45 +0800 Subject: [PATCH 718/818] PUB @geekpi https://linux.cn/article-13308-1.html --- ...0407 Why I love using bspwm for my Linux window manager.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210407 Why I love using bspwm for my Linux window manager.md (98%) diff --git a/translated/tech/20210407 Why I love using bspwm for my Linux window manager.md b/published/20210407 Why I love using bspwm for my Linux window manager.md similarity index 98% rename from translated/tech/20210407 Why I love using bspwm for my Linux window manager.md rename to published/20210407 Why I love using bspwm for my Linux window manager.md index de925e533e..8050039891 100644 --- a/translated/tech/20210407 Why I love using bspwm for my Linux window manager.md +++ b/published/20210407 Why I love using bspwm for my Linux window manager.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13308-1.html) 为什么我喜欢用 bspwm 来做我的 Linux 窗口管理器 ====== From d0b60bc9b9df4f84dfb5ea75f95a642e36b0df7f Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 19 Apr 2021 05:02:36 +0800 Subject: [PATCH 719/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210419=20?= =?UTF-8?q?How=20to=20Deploy=20Seafile=20Server=20with=20Docker=20to=20Hos?= =?UTF-8?q?t=20Your=20Own=20File=20Synchronization=20and=20Sharing=20Solut?= =?UTF-8?q?ion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210419 How to Deploy Seafile Server with Docker to Host Your Own File Synchronization and Sharing Solution.md --- ...le Synchronization and Sharing Solution.md | 282 ++++++++++++++++++ 1 file changed, 282 insertions(+) create mode 100644 sources/tech/20210419 How to Deploy Seafile Server with Docker to Host Your Own File Synchronization and Sharing Solution.md diff --git a/sources/tech/20210419 How to Deploy Seafile Server with Docker to Host Your Own File Synchronization and Sharing Solution.md b/sources/tech/20210419 How to Deploy Seafile Server with Docker to Host Your Own File Synchronization and Sharing Solution.md new file mode 100644 index 0000000000..97fd223969 --- /dev/null +++ b/sources/tech/20210419 How to Deploy Seafile Server with Docker to Host Your Own File Synchronization and Sharing Solution.md @@ -0,0 +1,282 @@ +[#]: subject: (How to Deploy Seafile Server with Docker to Host Your Own File Synchronization and Sharing Solution) +[#]: via: (https://itsfoss.com/deploy-seafile-server-docker/) +[#]: author: (Hunter Wittenborn https://itsfoss.com/author/hunter/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +How to Deploy Seafile Server with Docker to Host Your Own File Synchronization and Sharing Solution +====== + +First off, what is Seafile? + +[Seafile][1] is a self-hosted file synchronization program that works with the server-client model, as in you have several devices like your laptop and phone that connect to a central server. + +Unlike some more popular alternatives like [Nextcloud or ownCloud][2], Seafile tries to follow the philosophy of “do one thing only, but do it well”. Likewise, Seafile doesn’t have extra goodies built in like Contacts or Calendar integration. + +Seafile instead focuses solely on file syncing, sharing, and the things surrounding it, and that’s it. As a result of that though, it ends up doing so _extremely_ well. + +### Deploying Seafile Server with Docker and NGINX + +Advanced tutorial + +Most tutorials on It’s FOSS are focused on beginners. This one is not. It is intended for advanced users who tinker a lot with DIY projects and prefer to self-host. +This tutorial presumes that you are comfortable using the command line, and that you are at least decently knowledgeable with the programs we’ll be using. + +While the whole process could be done without using NGINX at all, using NGINX will allow for an easier setup, as well as making it significantly easier to self-host more services in the future. + +If you want to use a full-on Docker setup, you could set up [NGINX inside of Docker][3] as well, but it will only make things more complex and doesn’t add too much of a benefit, and likewise won’t be covered in this tutorial. + +#### Installing and Setting Up NGINX + +_**I will be using Ubuntu in this tutorial and will thus be using apt to install packages. If you use Fedora or some other non-Debian distribution, please use your distribution’s [package manager][4].**_ + +[NGINX][5], as well as being a web server, is what’s known as a proxy. It will function as the connection between the Seafile server and the internet, whilst also making several tasks easier to deal with. + +To install NGINX, use the following command: + +``` +sudo apt install nginx +``` + +If you want to use HTTPS (that little padlock in your browser), you will also need to install [Certbot][6]: + +``` +sudo apt install certbot python3-certbot-nginx +``` + +Next, you need to configure NGINX to connect to the Seafile instance that we set up later. + +First, run the following command: + +``` +sudo nano /etc/nginx/sites-available/seafile.conf +``` + +Enter the following text into the file: + +``` +server { + server_name localhost; + location / { + proxy_pass http://localhost:8080; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + } +} +``` + +**Important**: Replace **localhost** on the **server_name** line with the address you’ll be accessing your server from (i.e. **seafile.example.com** or **192.168.0.0**). Not sure what to put? + + * If you are testing just for the sake of it, use localhost. This setup will **only allow you to access the server from your computer**, and that’s it. + * If you want to use Seafile across your local WiFi connection(any device on the same WiFi network as you), you should enter [your computer’s IP address][7]. You may also want to look into [setting a static IP address][8], though it isn’t necessary. + * If you have a public IP address that you know points to your system, use that. + * If you have a domain name(i.e. **example.com**, **example.org**) _and_ a public IP address for your system, change your DNS settings to point the domain name to your system’s IP address. This will also require the public IP address to point to your system. + + + +Now you need to copy the config file to the directory NGINX looks at for files, then restart NGINX: + +``` +sudo ln -s /etc/nginx/sites-available/seafile.conf /etc/nginx/sites-enabled/seafile.conf +sudo systemctl restart nginx +``` + +If you set up Certbot, you’ll also need to run the following to set up HTTPS: + +``` +sudo certbot +``` + +If asked to redirect HTTP traffic to HTTPS, choose **2**. + +Now would be a good time to make sure everything we’ve set up so far is working. If you visit your site, you should get a screen that says something on the lines of `502 Bad Gateway`. + +![][9] + +#### Install Docker and Docker Compose + +Now to get into the fun stuff! + +First things first, you need to have [Docker][10] and [Docker Compose][11] installed. Docker Compose is needed to utilize a docker-compose.yml file, which will make managing the various Docker [containers][12] Seafile needs easier. + +Docker and Docker Compose can be installed with the following command: + +``` +sudo apt install docker.io docker-compose +``` + +To check if Docker is installed and running, run the following: + +``` +sudo docker run --rm hello-world +``` + +You should see something along the lines of this in your terminal if it completed successfully: + +![][13] + +If you would like to avoid adding `sudo` to the beginning of the `docker` command, you can run the following commands to add yourself to the `docker` group: + +``` +sudo groupadd docker +sudo usermod -aG docker $USER +``` + +The rest of this tutorial assumes you ran the above two commands. If you didn’t, add `sudo` to all commands that start with `docker` or `docker-compose`. + +#### Installing Seafile Server + +This part is significantly easier than the part before this. All you need to do is put some text into a file and run a few commands. + +Open up a terminal. Then create a directory where you’d like the contents of the Seafile server to be stored and enter the directory: + +``` +mkdir ~/seafile-server && cd ~/seafile-server +``` + +![][14] + +Go to the directory you created and run the following: + +``` +nano docker-compose.yml +``` + +Next, enter the text below into the window that pops up: + +``` +version: '2.0' +services: + db: + image: mariadb + container_name: seafile-mysql + environment: + - MYSQL_ROOT_PASSWORD=password + - MYSQL_LOG_CONSOLE=true + volumes: + - ./data/mariadb:/var/lib/mysql + networks: + - seafile-net + + memcached: + image: memcached + container_name: seafile-memcached + entrypoint: memcached -m 256 + networks: + - seafile-net + + seafile: + image: seafileltd/seafile-mc + container_name: seafile + ports: + - "8080:80" + volumes: + - ./data/app:/shared + environment: + - DB_HOST=db + - DB_ROOT_PASSWD=password + - TIME_ZONE=Etc/UTC + - [email protected] + - SEAFILE_ADMIN_PASSWORD=password + - SEAFILE_SERVER_LETSENCRYPT=false + - SEAFILE_SERVER_HOSTNAME=docs.seafile.com + depends_on: + - db + - memcached + networks: + - seafile-net + +networks: + seafile-net: +``` + +Before saving the file, a few things will need to be changed: + + * **MYSQL_ROOT_PASSWORD**: Change to a stronger password, you _don’t_ need to remember this, so don’t try to pick anything easy. If you need help making one, use a [password generator][15]. I’d recommend 20 characters long and avoiding any special characters(all the **[[email protected]][16]#$%^&*** symbols). + * **DB_ROOT_PASSWD**: Change to the value you set for ****MYSQL_ROOT_PASSWORD****. + * ****SEAFILE_ADMIN_EMAIL****: Sets the email address for the admin account. + * **SEAFILE_ADMIN_PASSWORD**: Sets the password for the admin account. Avoid making this the same as **MYSQL_ROOT_PASSWORD** or **DB_ROOT_PASSWD**. + * **SEAFILE_SERVER_HOSTNAME**: Set to the address you set in the NGINX configuration. + + + +With that done, you can bring up the whole thing with `docker-compose`: + +``` +docker-compose up -d +``` + +It might take a minute or two depending on your internet connection, as it has to pull down several containers that Seafile needs to run. + +After it’s done, give it a few more minutes to finish up. You can also check the status of it by running the following: + +``` +docker logs seafile +``` + +When it’s done, you’ll see the following output: + +![][17] + +Next, just type the address you set for ****SEAFILE_SERVER_HOSTNAME**** into your browser, and you should be at a login screen. + +![][18] + +And there you go! Everything’s now fully functional and ready to be used with the clients. + +#### Installing the Seafile Clients + +Seafile on mobile is available on [Google Play][19], [F-Droid][20], and on the [iOS App Store][21]. Seafile also has desktop clients available for Linux, Windows, and Mac, available [here][22]. + +Seafile is readily available on Ubuntu systems via the `seafile-gui` package: + +``` +sudo apt install seafile-gui +``` + +Seafile is also in the AUR for Arch users via the `seafile-client` package. + +### Closing Up + +Feel free to explore the clients and all they have to offer. I’ll go into all of what the Seafile clients are capable of in a future article (stay tuned 😃). + +If something’s not working right, or you just have a question in general, feel free to leave it in the comments below – I’ll try to respond whenever I can! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/deploy-seafile-server-docker/ + +作者:[Hunter Wittenborn][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/hunter/ +[b]: https://github.com/lujun9972 +[1]: https://www.seafile.com/en/home/ +[2]: https://itsfoss.com/nextcloud-vs-owncloud/ +[3]: https://linuxhandbook.com/nginx-reverse-proxy-docker/ +[4]: https://itsfoss.com/package-manager/ +[5]: https://www.nginx.com/ +[6]: https://certbot.eff.org/ +[7]: https://itsfoss.com/check-ip-address-ubuntu/ +[8]: https://itsfoss.com/static-ip-ubuntu/ +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/nginx_bad_gateway.png?resize=489%2C167&ssl=1 +[10]: https://www.docker.com/ +[11]: https://docs.docker.com/compose/ +[12]: https://www.docker.com/resources/what-container +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/seafile-docker-helloworld.png?resize=752%2C416&ssl=1 +[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/seafile-dir.png?resize=731%2C174&ssl=1 +[15]: https://itsfoss.com/password-generators-linux/ +[16]: https://itsfoss.com/cdn-cgi/l/email-protection +[17]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/seafile-running.png?resize=752%2C484&ssl=1 +[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/seafile-login.jpg?resize=800%2C341&ssl=1 +[19]: https://play.google.com/store/apps/details?id=com.seafile.seadroid2 +[20]: https://f-droid.org/repository/browse/?fdid=com.seafile.seadroid2 +[21]: https://itunes.apple.com/cn/app/seafile-pro/id639202512?l=en&mt=8 +[22]: https://www.seafile.com/en/download/ From 073b11079b80602bb2700aaa97d4483ae9258069 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 19 Apr 2021 08:51:12 +0800 Subject: [PATCH 720/818] translated --- ...oss-friendly with this open source tool.md | 114 ------------------ ...oss-friendly with this open source tool.md | 113 +++++++++++++++++ 2 files changed, 113 insertions(+), 114 deletions(-) delete mode 100644 sources/tech/20210414 Make your data boss-friendly with this open source tool.md create mode 100644 translated/tech/20210414 Make your data boss-friendly with this open source tool.md diff --git a/sources/tech/20210414 Make your data boss-friendly with this open source tool.md b/sources/tech/20210414 Make your data boss-friendly with this open source tool.md deleted file mode 100644 index a6b86444f9..0000000000 --- a/sources/tech/20210414 Make your data boss-friendly with this open source tool.md +++ /dev/null @@ -1,114 +0,0 @@ -[#]: subject: (Make your data boss-friendly with this open source tool) -[#]: via: (https://opensource.com/article/21/4/visualize-data-eda) -[#]: author: (Juanjo Ortilles https://opensource.com/users/jortilles) -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Make your data boss-friendly with this open source tool -====== -Enterprise Data Analytics aims to bring data visualization to everyday -business users. -![metrics and data shown on a computer screen][1] - -Enterprise Data Analytics ([EDA][2]) is a web application that enables access to information through a simple, clear interface. - -After several years of working for Barcelona open source analytics company [Jortilles][3], we realized that the modern world collects data compulsively but there was no easy way for average people to see or interpret that data. There are some powerful open source tools for this purpose, but they are very complex. We couldn't identify a tool designed to be easy to use by common people with little technical skill. - -We developed EDA because we consider access to information to be a requirement and obligation for modern organizations and wanted to provide everyone with access to information. - -![EDA interface][4] - -(Juanjo Ortilles, [CC BY-SA 4.0][5]) - -### Visualize your data - -EDA offers a data model using business terms that people already understand. You choose the information you want, and you can view it how you want. It aims to be user friendly and still powerful. - -EDA visualizes and enriches the information in a database through a metadata model. It can read data from BigQuery, Postgres, [MariaDB, MySQL][6], and several other databases. This transforms the technical database model into familiar business concepts. - -It is also designed to speed up information propagation because it taps into the data already stored in a database. EDA discovers the database's topology and proposes a business model. If you've designed a good database model, you have a good business model. EDA can also connect to production servers to provide real-time analysis. - -This combination of data and a data model mean you and anyone in your organization can analyze its data. However, to protect the data, you can define data security, down to the row, to grant access to the right data to the right people. - -Some of EDA's features include: - - * Automatic data-model generation - * A consistent data model that prevents inconsistent queries - * SQL mode for advanced users - * Data visualizations: - * Standard charts (e.g., bar charts, pie charts, line charts, treemaps) - * Map integration (e.g., geoJSON shapefiles, latitude, longitude) - * Email alerts, which can be defined though key performance indicators (KPIs) - * Private and public information controls to enable private and public dashboards, which you can share with a link - * Data caches and programatic refreshes - - - -### How to use EDA - -The first step in visualizing data with EDA is to create a data model. - -#### Create a data model - -First, select **New Datasource** in the left-hand menu. - -Next, choose the database system where your data is stored (e.g., Postgres, MariaDB, MySQL, Vertica, SqlServer, Oracle, Big Query) and provide the connection parameters. - -EDA will automatically generate the data model for you. It reads tables and columns and defines names for them as well as the relationships between tables. You can also enrich your data model by adding virtual views or geoJSON maps. - -#### Make a dashboard - -Now you are ready to make your first dashboard. On the main page of EDA's interface, you should see a **New dashboard** button. Click it, name your dashboard, and select the data model you created. A new dashboard will appear with a panel for you to configure. - -To configure a panel, click the **Configuration** button in the top-right corner and choose what you want to do. In **Edit query**, select the data you want to show. A new window will appear with your data model represented by entities and attributes for the entities. Choose the entity you want to see and the attributes you want to use. For example, for an entity named **Customers** you might show **Customer Name**, and for a **Sales** entity, you might want to show **Total Sales**. - -Next, run a query, and choose the visualization you want. - -![EDA interface][7] - -(Juanjo Ortilles, [CC BY-SA 4.0][5]) - -You can add as many panels, filters, and text fields as you want, all with explanations. Once you save your dashboard, you can view it, share it with colleagues, and even publish it to the internet. - -### Getting EDA - -The quickest way to take a look at EDA is with the [public demo][8]. But if you want to give it a try on your own, you can get the latest EDA release with Docker: - - -``` -`$ docker run -p 80:80 jortilles / eda: latest` -``` - -We also have a cloud software-as-a-service option for anyone who wants to use EDA without having to do setup, configuration, and ongoing updates. You can review the [cloud options][9] on our website. - -If you want to see it in action, you can watch some [demonstrations][10] on YouTube. - -EDA is in continuous development, and you can find its [source code on GitHub][11]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/visualize-data-eda - -作者:[Juanjo Ortilles][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/jortilles -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_data_dashboard_system_computer_analytics.png?itok=oxAeIEI- (metrics and data shown on a computer screen) -[2]: https://eda.jortilles.com/en/jortilles-english/ -[3]: https://www.jortilles.com/ -[4]: https://opensource.com/sites/default/files/uploads/eda-display.jpeg (EDA interface) -[5]: https://creativecommons.org/licenses/by-sa/4.0/ -[6]: https://opensource.com/article/20/10/mariadb-mysql-cheat-sheet -[7]: https://opensource.com/sites/default/files/uploads/eda-chart.jpeg (EDA interface) -[8]: https://demoeda.jortilles.com/ -[9]: https://eda.jortilles.com -[10]: https://youtu.be/cBAAJbohHXQ -[11]: https://github.com/jortilles/EDA diff --git a/translated/tech/20210414 Make your data boss-friendly with this open source tool.md b/translated/tech/20210414 Make your data boss-friendly with this open source tool.md new file mode 100644 index 0000000000..3bfc85d88a --- /dev/null +++ b/translated/tech/20210414 Make your data boss-friendly with this open source tool.md @@ -0,0 +1,113 @@ +[#]: subject: (Make your data boss-friendly with this open source tool) +[#]: via: (https://opensource.com/article/21/4/visualize-data-eda) +[#]: author: (Juanjo Ortilles https://opensource.com/users/jortilles) +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +用这个开源工具让你的数据对老板友好起来 +====== +企业数据分析 (Enterprise Data Analytics) 旨在将数据可视化带给日常商务用户。 +![metrics and data shown on a computer screen][1] + +企业数据分析 ([EDA][2]) 是一个网络应用,它可以通过一个简单、清晰的界面来获取信息。 + +在巴塞罗那开源分析公司 [Jortilles][3] 工作几年后,我们意识到,现代世界强制性地收集数据,但普通人没有简单的方法来查看或解释这些数据。有一些强大的开源工具可用于此目的,但它们非常复杂。我们找不到一个工具设计成能让没有什么技术能力的普通人轻松使用。 + +我们之所以开发 EDA,是因为我们认为获取信息是现代组织的要求和义务,并希望为每个人提供获取信息的机会。 + +![EDA interface][4] + +(Juanjo Ortilles, [CC BY-SA 4.0][5]) + +### 可视化你的数据 + +EDA 使用人们已经理解的商业术语提供了一个数据模型。你可以选择你想要的信息,并可以以你想要的方式查看它。它的目标是对用户友好,同时又功能强大。 + +EDA 通过元数据模型将数据库中的信息可视化和丰富化。它可以从 BigQuery、Postgres、[MariaDB、MySQL][6] 和其他一些数据库中读取数据。这就把技术性的数据库模型转化为熟悉的商业概念。 + +它还设计为加快信息传播的速度,因为它可以利用已经存储在数据库中的数据。EDA 发现数据库的拓扑结构,并提出业务模型。如果你设计了一个好的数据库模型,你就有了一个好的业务模型。EDA 还可以连接到生产服务器,提供实时分析。 + +这种数据和数据模型的结合意味着你和你组织中的任何人都可以分析其数据。然而,为了保护数据,你可以定义数据安全,可以精确到行,以授予正当的人访问正当的数据。 + +EDA 的一些功能包括: + + * 自动生成数据模型 + * 一致的数据模型,防止出现不一致的查询 + * 高级用户的 SQL 模式 + * 数据可视化: + * 标准图表(如柱状图、饼状图、线状图、树状图) + * 地图整合(如 geoJSON shapefile、纬度、经度) + * 电子邮件提醒,可通过关键绩效指标 (KPI) 来定义 + * 私人和公共信息控制,以启用私人和公共仪表板,你可以通过链接分享它。 + * 数据缓存和程序刷新。 + + + +### 如何使用 EDA + +用 EDA 实现数据可视化的第一步是创建数据模型。 + +#### 创建数据模型 + +首先,在左侧菜单中选择 **New Datasource**。 + +接下来,选择你的数据存储的数据库系统(如 Postgres、MariaDB、MySQL、Vertica、SqlServer、Oracle、Big Query),并提供连接参数。 + +EDA 将自动为你生成数据模型。它读取表和列,并为它们定义名称以及表之间的关系。你还可以通过添加虚拟视图或 geoJSON 图来丰富你的数据模型。 + +#### 制作仪表板 + +现在你已经准备好制作第一个仪表板了。在 EDA 界面的主页面上,你应该会看到一个 **New dashboard** 按钮。点击它,命名你的仪表板,并选择你创建的数据模型。新的仪表板将出现一个面板供你配置。 + +要配置面板,请单击右上角的 **Configuration** 按钮,并选择你要做的事情。在 **Edit query** 中,选择你要显示的数据。这将出现一个新的窗口,你的数据模型由实体和实体的属性表示。选择你要查看的实体和你要使用的属性。例如,对于名为 **Customers** 的实体,你可能会显示 **Customer Name**,对于 **Sales** 实体,你可能希望显示 **Total Sales**。 + +接下来,运行一个查询,并选择你想要的可视化。 + +![EDA interface][7] + +(Juanjo Ortilles, [CC BY-SA 4.0][5]) + +你可以添加任意数量的面板、过滤器和文本字段,所有这些都有说明。当你保存仪表板后,你可以查看它,与同事分享,甚至发布到互联网上。 + +### 获取 EDA + +最快的方法是用[公开演示][8]来查看 EDA。但如果你想自己试一试,可以用 Docker 获取最新的 EDA 版本: + + +``` +`$ docker run -p 80:80 jortilles / eda: latest` +``` + +我们还有一个 SaaS 选项,适用于任何想要使用 EDA 而无需进行安装、配置和持续更新的用户。你可以在我们的网站上查看[云选项][9]。 + +如果你想看看它的实际运行情况,你可以在 YouTube 上观看一些[演示][10]。 + +EDA 正在持续开发中,你可以在 GitHub 上找到它的[源代码][11]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/visualize-data-eda + +作者:[Juanjo Ortilles][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/jortilles +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_data_dashboard_system_computer_analytics.png?itok=oxAeIEI- (metrics and data shown on a computer screen) +[2]: https://eda.jortilles.com/en/jortilles-english/ +[3]: https://www.jortilles.com/ +[4]: https://opensource.com/sites/default/files/uploads/eda-display.jpeg (EDA interface) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: https://opensource.com/article/20/10/mariadb-mysql-cheat-sheet +[7]: https://opensource.com/sites/default/files/uploads/eda-chart.jpeg (EDA interface) +[8]: https://demoeda.jortilles.com/ +[9]: https://eda.jortilles.com +[10]: https://youtu.be/cBAAJbohHXQ +[11]: https://github.com/jortilles/EDA From b2fe7a96eaa4fea1e7f8797683b6d98a3443868e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 19 Apr 2021 08:54:23 +0800 Subject: [PATCH 721/818] =?UTF-8?q?=E8=B6=85=E6=9C=9F=E5=9B=9E=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @chensanle @amwps290 @MZqk @mengxinayan @scvoet @Tracygcz @MjSeven @RiaXu 请注意,申请文件已经超期回收。如果您还在此篇文章上工作,请重新申请并完成。 --- sources/tech/20200223 The Zen of Go.md | 2 +- ...10104 Network address translation part 1 - packet tracing.md | 2 +- ...ew of Container-to-Container Communications in Kubernetes.md | 2 +- ...04 A guide to understanding Linux software libraries in C.md | 2 +- ...Fingerprint Login in Ubuntu and Other Linux Distributions.md | 2 +- sources/tech/20210214 Why programmers love Linux packaging.md | 2 +- ...222 A friendly guide to the syntax of C-- method pointers.md | 2 +- .../20210308 Cast your Android device with a Raspberry Pi.md | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sources/tech/20200223 The Zen of Go.md b/sources/tech/20200223 The Zen of Go.md index 249c3790cd..c4143aed32 100644 --- a/sources/tech/20200223 The Zen of Go.md +++ b/sources/tech/20200223 The Zen of Go.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( chensanle ) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20210104 Network address translation part 1 - packet tracing.md b/sources/tech/20210104 Network address translation part 1 - packet tracing.md index a1cfd4de2c..850b4f9e1c 100644 --- a/sources/tech/20210104 Network address translation part 1 - packet tracing.md +++ b/sources/tech/20210104 Network address translation part 1 - packet tracing.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (amwps290) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20210115 Review of Container-to-Container Communications in Kubernetes.md b/sources/tech/20210115 Review of Container-to-Container Communications in Kubernetes.md index c79503bbc9..0c18578a9c 100644 --- a/sources/tech/20210115 Review of Container-to-Container Communications in Kubernetes.md +++ b/sources/tech/20210115 Review of Container-to-Container Communications in Kubernetes.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (MZqk) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20210204 A guide to understanding Linux software libraries in C.md b/sources/tech/20210204 A guide to understanding Linux software libraries in C.md index fe977cd22f..bfb9d0a880 100644 --- a/sources/tech/20210204 A guide to understanding Linux software libraries in C.md +++ b/sources/tech/20210204 A guide to understanding Linux software libraries in C.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (mengxinayan) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20210210 How to Add Fingerprint Login in Ubuntu and Other Linux Distributions.md b/sources/tech/20210210 How to Add Fingerprint Login in Ubuntu and Other Linux Distributions.md index dcf6c9a3ae..c2cea8fdcc 100644 --- a/sources/tech/20210210 How to Add Fingerprint Login in Ubuntu and Other Linux Distributions.md +++ b/sources/tech/20210210 How to Add Fingerprint Login in Ubuntu and Other Linux Distributions.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (scvoet) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20210214 Why programmers love Linux packaging.md b/sources/tech/20210214 Why programmers love Linux packaging.md index bb82a93193..837b4a2aed 100644 --- a/sources/tech/20210214 Why programmers love Linux packaging.md +++ b/sources/tech/20210214 Why programmers love Linux packaging.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (Tracygcz) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20210222 A friendly guide to the syntax of C-- method pointers.md b/sources/tech/20210222 A friendly guide to the syntax of C-- method pointers.md index 36600f7f63..2f059ce95e 100644 --- a/sources/tech/20210222 A friendly guide to the syntax of C-- method pointers.md +++ b/sources/tech/20210222 A friendly guide to the syntax of C-- method pointers.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (MjSeven) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20210308 Cast your Android device with a Raspberry Pi.md b/sources/tech/20210308 Cast your Android device with a Raspberry Pi.md index 189ed359d4..218bdb488e 100644 --- a/sources/tech/20210308 Cast your Android device with a Raspberry Pi.md +++ b/sources/tech/20210308 Cast your Android device with a Raspberry Pi.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/3/android-raspberry-pi) [#]: author: (Sudeshna Sur https://opensource.com/users/sudeshna-sur) [#]: collector: (lujun9972) -[#]: translator: ( RiaXu) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 53c51fd9e87484ae8cfdf3132f5d20001fffb513 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 19 Apr 2021 09:02:20 +0800 Subject: [PATCH 722/818] translating --- ...Fingerprint Login in Ubuntu and Other Linux Distributions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210210 How to Add Fingerprint Login in Ubuntu and Other Linux Distributions.md b/sources/tech/20210210 How to Add Fingerprint Login in Ubuntu and Other Linux Distributions.md index c2cea8fdcc..1fd15cf3ac 100644 --- a/sources/tech/20210210 How to Add Fingerprint Login in Ubuntu and Other Linux Distributions.md +++ b/sources/tech/20210210 How to Add Fingerprint Login in Ubuntu and Other Linux Distributions.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From b539588eb79797d193a0143e2789c9724935dae8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 19 Apr 2021 09:29:24 +0800 Subject: [PATCH 723/818] PRF&PUB @geekpi https://linux.cn/article-13310-1.html --- ...oss-friendly with this open source tool.md | 43 ++++++++----------- 1 file changed, 19 insertions(+), 24 deletions(-) rename {translated/tech => published}/20210414 Make your data boss-friendly with this open source tool.md (70%) diff --git a/translated/tech/20210414 Make your data boss-friendly with this open source tool.md b/published/20210414 Make your data boss-friendly with this open source tool.md similarity index 70% rename from translated/tech/20210414 Make your data boss-friendly with this open source tool.md rename to published/20210414 Make your data boss-friendly with this open source tool.md index 3bfc85d88a..5104978e55 100644 --- a/translated/tech/20210414 Make your data boss-friendly with this open source tool.md +++ b/published/20210414 Make your data boss-friendly with this open source tool.md @@ -3,16 +3,18 @@ [#]: author: (Juanjo Ortilles https://opensource.com/users/jortilles) [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13310-1.html) 用这个开源工具让你的数据对老板友好起来 ====== -企业数据分析 (Enterprise Data Analytics) 旨在将数据可视化带给日常商务用户。 -![metrics and data shown on a computer screen][1] -企业数据分析 ([EDA][2]) 是一个网络应用,它可以通过一个简单、清晰的界面来获取信息。 +> 企业数据分析旨在将数据可视化带给日常商务用户。 + +![](https://img.linux.net.cn/data/attachment/album/202104/19/092617elri0ff4r6lr06rr.jpg) + +企业数据分析Enterprise Data Analytics([EDA][2]) 是一个网页应用,它可以通过一个简单、清晰的界面来获取信息。 在巴塞罗那开源分析公司 [Jortilles][3] 工作几年后,我们意识到,现代世界强制性地收集数据,但普通人没有简单的方法来查看或解释这些数据。有一些强大的开源工具可用于此目的,但它们非常复杂。我们找不到一个工具设计成能让没有什么技术能力的普通人轻松使用。 @@ -20,15 +22,13 @@ ![EDA interface][4] -(Juanjo Ortilles, [CC BY-SA 4.0][5]) - ### 可视化你的数据 EDA 使用人们已经理解的商业术语提供了一个数据模型。你可以选择你想要的信息,并可以以你想要的方式查看它。它的目标是对用户友好,同时又功能强大。 EDA 通过元数据模型将数据库中的信息可视化和丰富化。它可以从 BigQuery、Postgres、[MariaDB、MySQL][6] 和其他一些数据库中读取数据。这就把技术性的数据库模型转化为熟悉的商业概念。 -它还设计为加快信息传播的速度,因为它可以利用已经存储在数据库中的数据。EDA 发现数据库的拓扑结构,并提出业务模型。如果你设计了一个好的数据库模型,你就有了一个好的业务模型。EDA 还可以连接到生产服务器,提供实时分析。 +它还设计为加快信息传播的速度,因为它可以利用已经存储在数据库中的数据。EDA 可以发现数据库的拓扑结构,并提出业务模型。如果你设计了一个好的数据库模型,你就有了一个好的业务模型。EDA 还可以连接到生产服务器,提供实时分析。 这种数据和数据模型的结合意味着你和你组织中的任何人都可以分析其数据。然而,为了保护数据,你可以定义数据安全,可以精确到行,以授予正当的人访问正当的数据。 @@ -39,20 +39,18 @@ EDA 的一些功能包括: * 高级用户的 SQL 模式 * 数据可视化: * 标准图表(如柱状图、饼状图、线状图、树状图) - * 地图整合(如 geoJSON shapefile、纬度、经度) + * 地图整合(如 geoJSON shapefile、纬度、经度) * 电子邮件提醒,可通过关键绩效指标 (KPI) 来定义 * 私人和公共信息控制,以启用私人和公共仪表板,你可以通过链接分享它。 * 数据缓存和程序刷新。 - - ### 如何使用 EDA 用 EDA 实现数据可视化的第一步是创建数据模型。 #### 创建数据模型 -首先,在左侧菜单中选择 **New Datasource**。 +首先,在左侧菜单中选择 “New Datasource”。 接下来,选择你的数据存储的数据库系统(如 Postgres、MariaDB、MySQL、Vertica、SqlServer、Oracle、Big Query),并提供连接参数。 @@ -60,32 +58,29 @@ EDA 将自动为你生成数据模型。它读取表和列,并为它们定义 #### 制作仪表板 -现在你已经准备好制作第一个仪表板了。在 EDA 界面的主页面上,你应该会看到一个 **New dashboard** 按钮。点击它,命名你的仪表板,并选择你创建的数据模型。新的仪表板将出现一个面板供你配置。 +现在你已经准备好制作第一个仪表板了。在 EDA 界面的主页面上,你应该会看到一个 “New dashboard” 按钮。点击它,命名你的仪表板,并选择你创建的数据模型。新的仪表板将出现一个面板供你配置。 -要配置面板,请单击右上角的 **Configuration** 按钮,并选择你要做的事情。在 **Edit query** 中,选择你要显示的数据。这将出现一个新的窗口,你的数据模型由实体和实体的属性表示。选择你要查看的实体和你要使用的属性。例如,对于名为 **Customers** 的实体,你可能会显示 **Customer Name**,对于 **Sales** 实体,你可能希望显示 **Total Sales**。 +要配置面板,请单击右上角的 “Configuration” 按钮,并选择你要做的事情。在 “Edit query” 中,选择你要显示的数据。这将出现一个新的窗口,你的数据模型由实体和实体的属性表示。选择你要查看的实体和你要使用的属性。例如,对于名为 “Customers” 的实体,你可能会显示 “Customer Name”,对于 “Sales” 实体,你可能希望显示 “Total Sales”。 接下来,运行一个查询,并选择你想要的可视化。 ![EDA interface][7] -(Juanjo Ortilles, [CC BY-SA 4.0][5]) - 你可以添加任意数量的面板、过滤器和文本字段,所有这些都有说明。当你保存仪表板后,你可以查看它,与同事分享,甚至发布到互联网上。 ### 获取 EDA -最快的方法是用[公开演示][8]来查看 EDA。但如果你想自己试一试,可以用 Docker 获取最新的 EDA 版本: - +最快的方法是用 [公开演示][8] 来查看 EDA。但如果你想自己试一试,可以用 Docker 获取最新的 EDA 版本: ``` -`$ docker run -p 80:80 jortilles / eda: latest` +$ docker run -p 80:80 jortilles / eda: latest ``` -我们还有一个 SaaS 选项,适用于任何想要使用 EDA 而无需进行安装、配置和持续更新的用户。你可以在我们的网站上查看[云选项][9]。 +我们还有一个 SaaS 选项,适用于任何想要使用 EDA 而无需进行安装、配置和持续更新的用户。你可以在我们的网站上查看 [云选项][9]。 -如果你想看看它的实际运行情况,你可以在 YouTube 上观看一些[演示][10]。 +如果你想看看它的实际运行情况,你可以在 YouTube 上观看一些 [演示][10]。 -EDA 正在持续开发中,你可以在 GitHub 上找到它的[源代码][11]。 +EDA 正在持续开发中,你可以在 GitHub 上找到它的 [源代码][11]。 -------------------------------------------------------------------------------- @@ -94,7 +89,7 @@ via: https://opensource.com/article/21/4/visualize-data-eda 作者:[Juanjo Ortilles][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/) 荣誉推出 From c628b6941e3632b9b36be5bd20bdd12269333705 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 19 Apr 2021 09:51:06 +0800 Subject: [PATCH 724/818] PRF&PUB @wxy https://linux.cn/article-13311-1.html --- ...1109 Getting started with Stratis encryption.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename {translated/tech => published}/20201109 Getting started with Stratis encryption.md (92%) diff --git a/translated/tech/20201109 Getting started with Stratis encryption.md b/published/20201109 Getting started with Stratis encryption.md similarity index 92% rename from translated/tech/20201109 Getting started with Stratis encryption.md rename to published/20201109 Getting started with Stratis encryption.md index fef944a41e..6708bdaea5 100644 --- a/translated/tech/20201109 Getting started with Stratis encryption.md +++ b/published/20201109 Getting started with Stratis encryption.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13311-1.html) [#]: subject: (Getting started with Stratis encryption) [#]: via: (https://fedoramagazine.org/getting-started-with-stratis-encryption/) [#]: author: (briansmith https://fedoramagazine.org/author/briansmith/) @@ -10,15 +10,15 @@ Stratis 加密入门 ====== -![][1] +![](https://img.linux.net.cn/data/attachment/album/202104/19/094919orzaxwl5axiqqfiu.jpg) -Stratis 在其 [官方网站][2] 上被描述为“_易于使用的 Linux 本地存储管理”。请看这个 [短视频][3],快速演示基础知识。该视频是在 Red Hat Enterprise Linux 8 系统上录制的。视频中显示的概念也适用于 Fedora 中的 Stratis。 +Stratis 在其 [官方网站][2] 上被描述为“_易于使用的 Linux 本地存储管理_”。请看这个 [短视频][3],快速演示基础知识。该视频是在 Red Hat Enterprise Linux 8 系统上录制的。视频中显示的概念也适用于 Fedora 中的 Stratis。 Stratis 2.1 版本引入了对加密的支持。继续阅读以了解如何在 Stratis 中开始加密。 ### 先决条件 -加密需要 Stratis 2.1 或更高版本。这篇文章中的例子使用的是 Fedora 33 的预发布版本。 Stratis 2.1 将用在 Fedora 33 的最终版本中。 +加密需要 Stratis 2.1 或更高版本。这篇文章中的例子使用的是 Fedora 33 的预发布版本。Stratis 2.1 将用在 Fedora 33 的最终版本中。 你还需要至少一个可用的块设备来创建一个加密池。下面的例子是在 KVM 虚拟机上完成的,虚拟磁盘驱动器为 5GB(`/dev/vdb`)。 @@ -190,7 +190,7 @@ via: https://fedoramagazine.org/getting-started-with-stratis-encryption/ 作者:[briansmith][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 4af099eee475696da4453116cf3ebad19d2e9358 Mon Sep 17 00:00:00 2001 From: stevenzdg988 <3442417@qq.com> Date: Mon, 19 Apr 2021 13:23:52 +0800 Subject: [PATCH 725/818] =?UTF-8?q?=E7=94=B3=E9=A2=86=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...utions You Can Rely on for Your Ancient 32-bit Computer.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md b/sources/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md index 54608a245e..0552d641e5 100644 --- a/sources/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md +++ b/sources/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (stevenzdg988) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -172,7 +172,7 @@ via: https://itsfoss.com/32-bit-linux-distributions/ 作者:[Ankush Das][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[stevenzdg988](https://github.com/stevenzdg988) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From ed76ed350649c484ab634e4c75594332bae111ba Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 20 Apr 2021 05:02:35 +0800 Subject: [PATCH 726/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210419=20?= =?UTF-8?q?Something=20bugging=20you=20in=20Fedora=20Linux=3F=20Let?= =?UTF-8?q?=E2=80=99s=20get=20it=20fixed!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210419 Something bugging you in Fedora Linux- Let-s get it fixed.md --- ...you in Fedora Linux- Let-s get it fixed.md | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 sources/tech/20210419 Something bugging you in Fedora Linux- Let-s get it fixed.md diff --git a/sources/tech/20210419 Something bugging you in Fedora Linux- Let-s get it fixed.md b/sources/tech/20210419 Something bugging you in Fedora Linux- Let-s get it fixed.md new file mode 100644 index 0000000000..312a0c4b1b --- /dev/null +++ b/sources/tech/20210419 Something bugging you in Fedora Linux- Let-s get it fixed.md @@ -0,0 +1,70 @@ +[#]: subject: (Something bugging you in Fedora Linux? Let’s get it fixed!) +[#]: via: (https://fedoramagazine.org/something-bugging-you-in-fedora-linux-lets-get-it-fixed/) +[#]: author: (Matthew Miller https://fedoramagazine.org/author/mattdm/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Something bugging you in Fedora Linux? Let’s get it fixed! +====== + +![][1] + +Software has bugs. Any complicated system is guaranteed to have at least some bits that don’t work as planned. Fedora Linux is a _very_ complicated system. It contains thousands of packages created by countless independent upstream projects around the world. There are also hundreds of updates every week. So, it’s inevitable that problems creep in. This article addresses the bug fixing process and how some bugs may be prioritized. + +### The release development process + +As a Linux distribution project, we want to deliver a polished, “everything just works” experience to our users. Our release process starts with “Rawhide”. This is our development area where we integrate new versions of all that updated free and open source software. We’re constantly improving our ongoing testing and continuous integration processes to make even Rawhide safe to use for the adventurous. By its nature, however, Rawhide will always be a little bit rough. + +Twice a year we take that rough operating system and branch it for a beta release, and then a final release. As we do that, we make a concerted effort to find problems. We run Test Days to check on specific areas and features. “Candidate builds” are made which are checked against our [release validation test plan][2]. We then enter a “freeze” state where only approved changes go into the candidates. This isolates the candidate from the constant development (which still goes into Rawhide!) so new problems are not introduced. + +Many bugs, big and small, are squashed as part of the release process. When all goes according to plan, we have a shiny new on-schedule Fedora Linux release for all of our users. (We’ve done this reliably and repeatedly for the last few years — thanks, everyone who works so hard to make it so!) If something is really wrong, we can mark it as a “release blocker”. That means we won’t ship until it’s fixed. This is often appropriate for big issues, and definitely turns up the heat and attention that bug gets. + +Sometimes, we have issues that are persistent. Perhaps something that’s been going on for a release or two, or where we don’t have an agreed solution. Some issues are really annoying and frustrating to many users, but individually don’t rise to the level we’d normally block a release for. We _can_ mark these things as blockers. But that is a really big sledgehammer. A blocker may cause the bug to get finally smashed, but it can also cause disruption all around. If the schedule slips, all the _other_ bug fixes and improvements, as well as features people have been working on, don’t get to users. + +### The Prioritized Bugs process + +So, we have another way to address annoying bugs! The [Prioritized Bugs process][3] is a different way to highlight issues that result in unpleasantness for a large number of users. There’s no hammer here, but something more like a spotlight. Unlike the release blocker process, the Prioritized Bugs process does not have a strictly-defined set of criteria. Each bug is evaluated based on the breadth and severity of impact. + +A team of interested contributors helps curate a short list of issues that need attention. We then work to connect those issues to people who can fix them. This helps take pressure off of the release process, by not tying the issues to any specific deadlines. Ideally, we find and fix things before we even get to the beta stage. We try to keep the list short, no more than a handful, so there truly is a focus. This helps the teams and individuals addressing problems because they know we’re respectful of their often-stretched-thin time and energy. + +Through this process, Fedora has resolved dozens of serious and annoying problems. This includes everything from keyboard input glitches to SELinux errors to that thing where gigabytes of old, obsolete package updates would gradually fill up your disk. But we can do a lot more — we actually aren’t getting as many nominations as we can handle. So, if there’s something _you_ know that’s causing long-term frustration or affecting a lot of people and yet which seems to not be reaching a resolution, follow the [Prioritized Bugs process][3] and let _us_ know. + +#### **You can help** + +All Fedora contributors are invited to participate in the Prioritized Bugs process. Evaluation meetings occur every two weeks on IRC. Anyone is welcome to join and help us evaluate the nominated bugs. See the [calendar][4] for meeting time and location. The Fedora Program Manager sends an agenda to the [triage][5] and [devel][6] mailing lists the day before meetings. + +### Bug reports welcome + +Big or small, when you find a bug, we really appreciate it if you report it. In many cases, the best place to do that is with the project that creates the software. For example, lets say there is a problem with the way the Darktable photography software renders images from your digital camera. It’s best to take that to the Darktable developers. For another example, say there’s a problem with the GNOME or KDE desktop environments or with the software that is part of them. Taking these issues to those projects will usually get you the best results. + +However, if it’s a Fedora-specific problem, like something with our build or configuration of the software, or a problem with how it’s integrated, don’t hesitate to [file a bug with us][7]. This is also true when there is a problem which you know has a fix that we just haven’t included yet. + +I know this is kind of complex… it’d be nice to have a one-stop place to handle all of the bugs. But remember that Fedora packagers — the people who do the work of taking upstream software and configuring it to build in our system — are largely volunteers. They are not always the deepest experts in the code for the software they’re working with. When in doubt, you can always file a [Fedora bug][7]. The folks in Fedora responsible for the corresponding package can help with their connections to the upstream software project. + +Remember, when you find a bug that’s gone through diagnosis and doesn’t yet have a good fix, when you see something that affects a lot of people, or when there’s a long-standing problem that just isn’t getting attention, please nominate it as a Prioritized Bug. We’ll take a look and see what can be done! + +_PS: The famous image in the header is, of course, from the logbook of the Mark II computer at Harvard where Rear Admiral Grace Murray Hopper worked. But contrary to popular belief about the story, this isn’t the first use of the term “bug” for a systems problem — it was already common in engineering, which is why it was funny to find a literal bug as the cause of an issue. #nowyouknow #jokeexplainer_ + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/something-bugging-you-in-fedora-linux-lets-get-it-fixed/ + +作者:[Matthew Miller][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/mattdm/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2021/04/bugging_you-816x345.jpg +[2]: https://fedoraproject.org/wiki/QA:Release_validation_test_plan +[3]: https://docs.fedoraproject.org/en-US/program_management/prioritized_bugs/ +[4]: https://calendar.fedoraproject.org/base/ +[5]: https://lists.fedoraproject.org/archives/list/triage%40lists.fedoraproject.org/ +[6]: https://lists.fedoraproject.org/archives/list/devel%40lists.fedoraproject.org/ +[7]: https://docs.fedoraproject.org/en-US/quick-docs/howto-file-a-bug/ From 83279dc445d9e0c7cd3e181ff63230e8317a993e Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 20 Apr 2021 05:02:55 +0800 Subject: [PATCH 727/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210420=20?= =?UTF-8?q?Blanket:=20Ambient=20Noise=20App=20With=20Variety=20of=20Sounds?= =?UTF-8?q?=20to=20Stay=20Focused?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210420 Blanket- Ambient Noise App With Variety of Sounds to Stay Focused.md --- ... With Variety of Sounds to Stay Focused.md | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 sources/tech/20210420 Blanket- Ambient Noise App With Variety of Sounds to Stay Focused.md diff --git a/sources/tech/20210420 Blanket- Ambient Noise App With Variety of Sounds to Stay Focused.md b/sources/tech/20210420 Blanket- Ambient Noise App With Variety of Sounds to Stay Focused.md new file mode 100644 index 0000000000..27bfbe6d37 --- /dev/null +++ b/sources/tech/20210420 Blanket- Ambient Noise App With Variety of Sounds to Stay Focused.md @@ -0,0 +1,88 @@ +[#]: subject: (Blanket: Ambient Noise App With Variety of Sounds to Stay Focused) +[#]: via: (https://itsfoss.com/blanket-ambient-noise-app/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Blanket: Ambient Noise App With Variety of Sounds to Stay Focused +====== + +_**Brief: An open-source ambient noise player offering a variety of sounds to help you focus or fall asleep.**_ + +With the increase in the number of activities around you, it is often tough to keep calm and stay focused. + +Sometimes music helps, but it also distracts in some cases. But, ambient noise? That is always soothing to hear. Who doesn’t want to hear birds chirping, rain falling and crowd chattering in a restaurant? Okay, may be not the last one but listening to natural sound could help in relaxing and focusing. This indirectly boots your productivity. + +Recently, I came across a dedicated player which includes different sounds that could help anyone focus. + +### Play Different Ambient Sounds Using Blanket + +Blanket is an impressive ambient noise player that features different sounds that can help you fall asleep or just regain focus by helping you forget about the surrounding distractions. + +It includes nature sounds like rain, waves, birds chirping, storm, wind, water stream, and summer night. + +![][1] + +Also, if you are a commuter or someone comfortable in a mildly busy environment, you can find sounds for trains, boat, city, coffee shop, or a fireplace. + +If you are fond of white noise or pink noise, which combines all sound frequencies that humans can hear, that is available here too. + +It also lets you autostart every time you boot, if that is what you prefer. + +![][2] + +### Install Blanket on Linux + +The best way to install Blanket is from [Flathub][3]. Considering that you have [Flatpak][4] enabled, all you have to type in the terminal to install it is: + +``` +flatpak install flathub com.rafaelmardojai.Blanket +``` + +In case you’re new to Flatpak, you might want to go through our [Flatpak guide][5]. + +If you do not prefer using Flatpaks, you can install it using a PPA maintained by a contributor in the project. For Arch Linux users, you can find it in [AUR][6] to easily install it. + +In addition, you can also find packages for Fedora and openSUSE. To explore all the available packages, you can head to its [GitHub page][7]. + +**Recommended Read:** + +![][8] + +#### [Relax With Natural Sounds By Using Ambient Noise Music Player In Ubuntu][9] + +Listen to natural white noise music with Ambient Noise Music Player application In Ubuntu. + +### Closing Thoughts + +The user experience for a simple ambient noise player is pretty good. I have a pair of HyperX Alpha S headphones and I must mention that the quality of the sounds is good to hear. + +In other words, it is soothing to hear, and I will recommend you to try it out if you wanted to experience Ambient sounds to focus, get rid of your anxiety or just fall asleep. + +Have you tried it yet? Feel free to share your thoughts below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/blanket-ambient-noise-app/ + +作者:[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://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/blanket-screenshot.png?resize=614%2C726&ssl=1 +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/blanket-autostart-1.png?resize=514%2C214&ssl=1 +[3]: https://flathub.org/apps/details/com.rafaelmardojai.Blanket +[4]: https://itsfoss.com/what-is-flatpak/ +[5]: https://itsfoss.com/flatpak-guide/ +[6]: https://itsfoss.com/aur-arch-linux/ +[7]: https://github.com/rafaelmardojai/blanket +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2015/04/Ambient_Noise_Ubuntu.jpeg?fit=700%2C350&ssl=1 +[9]: https://itsfoss.com/ambient-noise-music-player-ubuntu/ From 15a332a0826c7baf07e41c6d5e937cee02c8c4f2 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 20 Apr 2021 05:03:12 +0800 Subject: [PATCH 728/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210419=20?= =?UTF-8?q?21=20reasons=20why=20I=20think=20everyone=20should=20try=20Linu?= =?UTF-8?q?x?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210419 21 reasons why I think everyone should try Linux.md --- ...s why I think everyone should try Linux.md | 189 ++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 sources/tech/20210419 21 reasons why I think everyone should try Linux.md diff --git a/sources/tech/20210419 21 reasons why I think everyone should try Linux.md b/sources/tech/20210419 21 reasons why I think everyone should try Linux.md new file mode 100644 index 0000000000..fc2dffba07 --- /dev/null +++ b/sources/tech/20210419 21 reasons why I think everyone should try Linux.md @@ -0,0 +1,189 @@ +[#]: subject: (21 reasons why I think everyone should try Linux) +[#]: via: (https://opensource.com/article/21/4/linux-reasons) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +21 reasons why I think everyone should try Linux +====== +Gaming, business, budgeting, art, programming, and more. These are just +a few of the many ways anyone can use Linux. +![Linux keys on the keyboard for a desktop computer][1] + +When I go on holiday, I often end up at one or more used bookstores. I always find a good book I've been meaning to read, and I always justify the inevitable purchase by saying, "I'm on vacation; I should treat myself to this book." It works well, and I've acquired some of my favorite books this way. Yet, like so many traditions in life, it doesn't hold up to scrutiny. In reality, I don't need an excuse to buy a good book. All things being equal, I can do it any time I want. But having a reason does seem to make the process more enjoyable, somehow. + +In my everyday life, I get a lot of questions about Linux. When caught unaware, I sometimes awkwardly ramble on about the history of open source software or the intellectual and economic benefits of sharing resources. Sometimes, I manage to mention some of my favorite features I enjoy on Linux and then end up reverse-engineering those benefits so they can be enjoyed on another operating system. These discussions are usually enjoyable and informative, but there's just one problem: None of it answers the question that people are really asking. + +When a person asks you about Linux, they're often asking you to give them a reason to try it. There are exceptions, of course. People who have never heard the term "Linux" are probably asking for a literal definition of the word. But when your friends and colleagues confide that they're a little dissatisfied with their current operating system, it's probably safe to explain why you enjoy Linux, rather than lecturing them on why Linux is a better option than proprietary systems. In other words, you don't need a sales presentation; you need vacation photos (or used books you bought on vacation, if you're a bookworm). + +To that end, the links below connect to 21 reasons I enjoy Linux, given to 21 separate people on 21 separate occasions. + +### Gaming + +![Gaming on Linux][2] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +When it comes to enjoying a computer, one of the most obvious activities is gaming, and when it comes to gaming, I love it all. I'm happy to spend an evening playing an 8-bit puzzler or a triple-A studio epic. Other times, I settle in for a board game or a tabletop role-playing game (RPG). + +And I [do it all on a Linux computer][4]. + +### Office + +![LibreOffice][5] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +One size doesn't fit all. This is as true for hats as it is for office work. It pains me to see colleagues locked into a singular workflow that doesn't suit them, and I enjoy the way Linux encourages users to find tools they love. I've used office applications ranging from big suites (like LibreOffice and OpenOffice) to lightweight word processors (such as Abiword) to minimal text editors (with Pandoc for conversion). + +Regardless of what users around me are locked into, I have [the freedom to use the tools that work best][6] on my computer and with the way I want to work. + +### Choice + +![Linux login screen][7] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +One of open source's most valuable traits is the trust it allows users to have in the software they use. This trust is derived from a network of friends who can read the source code of the applications and operating systems they use. That means, even if you don't know good source code from bad, you can make friends within the [open source community][8] who do. These are important connections that Linux users can make as they explore the distribution they run. If you don't trust the community that builds and maintains a distribution, you can and should move to a different distribution. Many of us have done it, and it's one of the strengths of having many distros to choose from. + +[Linux offers choice][9] as a feature. A strong community, filled with real human connections, combined with the freedom of choice that Linux provides all give users confidence in the software they run. Because I've read some source code, and because I trust the people who maintain the code I haven't read, [I trust Linux][10]. + +### Budgeting + +![Skrooge][11] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +Budgeting isn't fun, but it's important. I learned early, while working menial jobs as I learned a _free_ operating system (Linux!) in my free time, that a budget isn't meant to track your money so much as it tracks your habits. That means that whether you're living paycheck to paycheck or you're well on the way to planning your retirement, you should [maintain a budget][12]. + +If you're in the United States, you can even [pay your taxes on Linux][13]. + +### Art + +![MyPaint][14] + +(Dogchicken, [CC BY-SA 4.0][3]) + +It doesn't matter whether you paint or do pixel art, [edit video][15], or scratch records, you can create great content on Linux. Some of the best art I've seen has been casually made with tools that aren't "industry standard," and it might surprise you just how much of the content you see is made the same way. Linux is a quiet engine, but it's a powerful one that drives indie artists as well as big producers. + +Try using Linux [to create some art][16]. + +### Programming + +![NetBeans][17] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +Look, using Linux to program is almost a foregone conclusion. Second only to server administration, open source code and Linux are an obvious combination. There are [many reasons for this][18], but the one I cite is that it's just more fun. I run into plenty of roadblocks when inventing something new, so the last thing I need is for an operating system or software development kit (SDK) to be the reason for failure. On Linux, I have access to everything. Literally everything. + +### Packaging + +![Packaging GNOME software][19] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +The thing nobody talks about when they tell you about programming is _packaging_. As a developer, you have to get your code to your users, or you won't have any users. Linux makes it easy for developers [to deliver apps][20] and easy for users to [install those applications][21]. + +It surprises many people, but [Linux can run many Windows applications][22] as if they were native apps. You shouldn't expect a Windows application to be executable on Linux. Still, many of the major common applications either already exist natively on Linux or else can be run through a compatibility layer called Wine. + +### Technology + +![Data center][23] + +([Taylor Vick][24], [Unsplash License][25]) + +If you're looking for a career in IT, Linux is a great first step. As a former art student who stumbled into Linux to render video faster, I speak from experience! + +Cutting-edge technology happens on Linux. Linux drives most of the internet, most of the world's fastest supercomputers, and the cloud itself. Today, Linux drives [edge computing][26], combining the power of cloud data centers with decentralized nodes for quick response. + +You don't have to start at the top, though. You can learn to [automate][27] tasks on your laptop or desktop and remotely control systems with a [good terminal][28]. + +Linux is open to your new ideas and [available for customization][29]. + +### Share files + +![Beach with cloudy sky][30] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +Whether you're a fledgling sysadmin or just a housemate with files to distribute to friends, Linux makes [file sharing a breeze][31]. + +### Media + +![Waterfall][32] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +With all the talk about programming and servers, people sometimes envision Linux as just a black screen filled with green 1's and 0's. Unsurprisingly to those of us who use it, Linux [plays all your media][33], too. + +### Easy install + +![CentOS installation][34] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +Never installed an operating system before? Linux is shockingly easy. Step-by-step, Linux installers hold your hand through an operating system installation to make you feel like a computer expert in under an hour. + +[Go install Linux][35]! + +### Try Linux + +![Porteus][36] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +If you're not ready to install Linux, then you can _try_ Linux instead. No idea where to start? It's less intimidating than you may think. Here are some [things you should consider first][37]. Then take your pick, download a distro, and come up with your own 21 reasons to use Linux. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/linux-reasons + +作者:[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/linux_keyboard_desktop.png?itok=I2nGw78_ (Linux keys on the keyboard for a desktop computer) +[2]: https://opensource.com/sites/default/files/uploads/game_0ad-egyptianpyramids.jpg (Gaming on Linux) +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://opensource.com/article/21/2/linux-gaming +[5]: https://opensource.com/sites/default/files/uploads/office_libreoffice.jpg (LibreOffice) +[6]: https://opensource.com/article/21/2/linux-workday +[7]: https://opensource.com/sites/default/files/uploads/trust_sddm.jpg (Linux login screen) +[8]: https://opensource.com/article/21/2/linux-community +[9]: https://opensource.com/article/21/2/linux-choice +[10]: https://opensource.com/article/21/2/open-source-security +[11]: https://opensource.com/sites/default/files/uploads/skrooge_1.jpg (Skrooge) +[12]: https://opensource.com/article/21/2/linux-skrooge +[13]: https://opensource.com/article/21/2/linux-tax-software +[14]: https://opensource.com/sites/default/files/uploads/art_mypaint.jpg (MyPaint) +[15]: https://opensource.com/article/21/2/linux-python-video +[16]: https://opensource.com/article/21/2/linux-art-design +[17]: https://opensource.com/sites/default/files/uploads/programming_java-netbeans.jpg (NetBeans) +[18]: https://opensource.com/article/21/2/linux-programming +[19]: https://opensource.com/sites/default/files/uploads/packaging_gnome-software.png (Packaging GNOME software) +[20]: https://opensource.com/article/21/2/linux-packaging +[21]: https://opensource.com/article/21/2/linux-package-management +[22]: https://opensource.com/article/21/2/linux-wine +[23]: https://opensource.com/sites/default/files/uploads/edge_taylorvick-unsplash.jpg (Data center) +[24]: https://unsplash.com/@tvick +[25]: https://unsplash.com/license +[26]: https://opensource.com/article/21/2/linux-edge-computing +[27]: https://opensource.com/article/21/2/linux-automation +[28]: https://opensource.com/article/21/2/linux-terminals +[29]: https://opensource.com/article/21/2/linux-technology +[30]: https://opensource.com/sites/default/files/uploads/cloud_beach-sethkenlon.jpg (Beach with cloudy sky) +[31]: https://opensource.com/article/21/3/linux-server +[32]: https://opensource.com/sites/default/files/uploads/media_waterfall.jpg (Waterfall) +[33]: https://opensource.com/article/21/2/linux-media-players +[34]: https://opensource.com/sites/default/files/uploads/install_centos8.jpg (CentOS installation) +[35]: https://opensource.com/article/21/2/linux-installation +[36]: https://opensource.com/sites/default/files/uploads/porteus_0.jpg (Porteus) +[37]: https://opensource.com/article/21/2/try-linux From 0de54cbb94c109b2cf0f3fcba4ffce10cefa3270 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 20 Apr 2021 05:03:24 +0800 Subject: [PATCH 729/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210419=20?= =?UTF-8?q?4=20steps=20to=20customizing=20your=20Mac=20terminal=20theme=20?= =?UTF-8?q?with=20open=20source=20tools?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md --- ...c terminal theme with open source tools.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 sources/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md diff --git a/sources/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md b/sources/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md new file mode 100644 index 0000000000..94daa8e70a --- /dev/null +++ b/sources/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md @@ -0,0 +1,100 @@ +[#]: subject: (4 steps to customizing your Mac terminal theme with open source tools) +[#]: via: (https://opensource.com/article/21/4/zsh-mac) +[#]: author: (Bryant Son https://opensource.com/users/brson) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +4 steps to customizing your Mac terminal theme with open source tools +====== +Make your terminal window pretty on your Mac with open source tools. +![4 different color terminal windows with code][1] + +Do you ever get bored with seeing the same old terminal window on your macOS computer? If so, add some bells and whistles to your view with the open source Oh My Zsh framework and Powerlevel10k theme. + +This basic step-by-step walkthrough (including a video tutorial at the end) will get you started customizing your macOS terminal. If you're a Linux user, check out Seth Kenlon's guide to [Adding themes and plugins to Zsh][2] for in-depth guidance. + +### Step 1: Install Oh My Zsh + +[Oh My Zsh][3] is an open source, community-driven framework for managing your Z shell (Zsh) configuration. + +![Oh My Zsh][4] + +(Bryant Son, [CC BY-SA 4.0][5]) + +Oh My Zsh is released under the MIT License. Install it with: + + +``` +`$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"` +``` + +### Step 2: Install Powerlevel10k fonts + +![Powerlevel10k][6] + +(Bryant Son, [CC BY-SA 4.0][5]) + +Powerlevel10k is an MIT-Licensed Zsh theme. Before installing Powerlevel10k, you will want to install custom fonts for your terminal. + +Go to the [Powerlevel10 GitHub][7] page, and search for "fonts" in the README. The steps for installing the custom fonts will vary depending on your operating system; the video at the bottom of this page explains how to do it on macOS. It should be just a simple click–download–install series of operations. + +![Powerlevel10k fonts][8] + +(Bryant Son, [CC BY-SA 4.0][5]) + +### Step 3: Install the Powerlevel10k theme + +Next, install Powerlevel10k by running: + + +``` +`git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k` +``` + +After you finish, open a `~/.zshrc` configuration file with a text editor, such as [Vim][9], set the line `ZSH_THEME="powerlevel10k/powerlevel10k`, then save the file. + +### Step 4: Finalize your Powerlevel10k setup + +Open a new terminal, and you should see the Powerlevel10k configuration wizard. If not, run `p10k configure` to bring up the configuration wizard. If you installed the custom fonts in Step 2, the icons and symbols should display correctly. Change the default font to **MeslowLG NF** (see the video below for instructions). + +![Powerlevel10k configuration][10] + +(Bryant Son, [CC BY-SA 4.0][5]) + +Once you complete the configuration, you should see a beautiful terminal. + +![Oh My Zsh/Powerlevel10k theme][11] + +(Bryant Son, [CC BY-SA 4.0][5]) + +If you want to see an interactive tutorial, please check out this video: + +That's it! You should be ready to enjoy your beautiful new terminal. Be sure to check out other Opensource.com articles for more tips and articles on using the shell, Linux administration, and more. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/zsh-mac + +作者:[Bryant Son][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/brson +[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/9/adding-plugins-zsh +[3]: https://ohmyz.sh/ +[4]: https://opensource.com/sites/default/files/uploads/1_ohmyzsh.jpg (Oh My Zsh) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: https://opensource.com/sites/default/files/uploads/2_powerlevel10k.jpg (Powerlevel10k) +[7]: https://github.com/romkatv/powerlevel10k +[8]: https://opensource.com/sites/default/files/uploads/3_downloadfonts.jpg (Powerlevel10k fonts) +[9]: https://opensource.com/resources/what-vim +[10]: https://opensource.com/sites/default/files/uploads/4_p10kconfiguration.jpg (Powerlevel10k configuration) +[11]: https://opensource.com/sites/default/files/uploads/5_finalresult.jpg (Oh My Zsh/Powerlevel10k theme) From ebbd67db7b142d7c094d3e57796cb78192e29df7 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 20 Apr 2021 05:03:37 +0800 Subject: [PATCH 730/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210419=20?= =?UTF-8?q?13=20ways=20to=20get=20involved=20with=20your=20favorite=20open?= =?UTF-8?q?=20source=20project?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210419 13 ways to get involved with your favorite open source project.md --- ... with your favorite open source project.md | 116 ++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 sources/tech/20210419 13 ways to get involved with your favorite open source project.md diff --git a/sources/tech/20210419 13 ways to get involved with your favorite open source project.md b/sources/tech/20210419 13 ways to get involved with your favorite open source project.md new file mode 100644 index 0000000000..809d8c4319 --- /dev/null +++ b/sources/tech/20210419 13 ways to get involved with your favorite open source project.md @@ -0,0 +1,116 @@ +[#]: subject: (13 ways to get involved with your favorite open source project) +[#]: via: (https://opensource.com/article/21/4/open-source-project-level) +[#]: author: (Mike Bursell https://opensource.com/users/mikecamel) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +13 ways to get involved with your favorite open source project +====== +Apply GET/SET principles to connecting with open source projects. +![Looking at a map for career journey][1] + +Many of my [blog][2]'s readers already know lots about open source, but I'm also aware that many know little, if anything, about it. I'm a big, big proponent of open source software (and beyond, such as open hardware), and there are lots of great resources you can find to learn more about it. + +One very good starting point is the one you're now reading, Opensource.com. It's run by a bunch of brilliant people for the broader community by my current employer, Red Hat. (I should add a disclaimer that I'm not only employed by Red Hat but also a [Correspondent][3] at Opensource.com—a kind of frequent contributor/Elder Thing.) It has articles on pretty much every aspect of open source that you can imagine. + +I was thinking about APIs today (they're [in the news][4] as I'm writing this, after a US Supreme Court judgment on an argument between Google and Oracle), and it occurred to me that if I were interested in understanding how to interact with open source at the project level but didn't know much about it, then a quick guide might be useful. The same goes if I were involved in an open source project (e.g., [Enarx][5]) interested in attracting contributors (particularly techie contributors) who aren't already knowledgeable about open source. + +Given that most programmers will understand what GET and SET methods do (one reads data, the other writes data), I thought this might be a useful framework for considering engagement.[1][6] I'll start with GET, as that's how you're likely to be starting off—finding out more about the project—and then move to SET methods for getting involved with an open source project. + +This is far from an exhaustive list, but I hope that I've hit most of the key ways you're most likely to start getting involved or encouraging others to get involved. The order I've chosen reflects what I suspect is a fairly typical approach to finding out more about a project, particularly for those who aren't open source savvy already but, as they say, YMMV.[3][7] + +I've managed to stop myself from using Enarx (which I co-founded) as the sole source of examples and have tried to find a variety of projects to give you a taster. Disclaimer: their inclusion here does not mean that I am a user or contributor to the project, nor is it any guarantee of their open source credentials, code quality, up to date-ness, project maturity, or community health.[4][8] + +### GET methods + + * **Landing page:** The first encounter you have with a project will probably be its landing page. Some projects go for something basic, others apply more design, but you should be able to use this as the starting point for your adventures around the project. You'd generally hope to find links to various of the other resources listed below from the landing page. + * See [Sigstore][9]'s landing page. + * **Wiki:** In many cases, the project will have a wiki. This could be simple, or it could be complex. It may allow editing by anyone or only by a select band of contributors to the project, and its relevance as a source of truth may be impacted by how up to date it is. Still, the wiki is usually an excellent place to start. + * See the [Fedora Project][10] wiki. + * **Videos:** Some projects maintain a set of videos about their project. These may include introductions to the concepts, talking-head interviews with team members, conference sessions, demos, how-tos, and more. It's also worth looking for videos put up by contributors to the project but not necessarily officially owned by the project. + * See [Rust Language][11] videos. + * **Code of conduct:** Many projects insist that their project members follow a code of conduct to reduce harassment, reduce friction, and generally make the project a friendly, more inclusive, and more diverse place to be. + * See the [Linux kernel][12]'s CoC. + * **Binary downloads:** As projects get more mature, they may choose to provide precompiled binary downloads for users. More technically inclined users may choose to compile their own binaries from the codebase (see below), but binary downloads can be a quick way to try out a project and see whether it does what you want. + * See the binaries from [Chocolate Doom][13] (a Doom port). + * **Design documentation:** Without design documentation, it can be very difficult to get really into a project. (I've written about the [importance of architecture diagrams][14] before.) This documentation is likely to include everything from an API definition to complex use cases and threat models. + * See [Kubernetes][15]' design docs. + * **Codebase:** You've found out all you need to get going: It's time to look at the code! This may vary from a few lines to many thousands, include documentation in comments, or include test cases, but if the code is not there, then the project can't legitimately call itself open source. + * See [Rocket Rust web framework][16]'s code.[5][17] + * **Email/chat:** Most projects like to have a way for contributors to discuss matters asynchronously. The preferred medium varies among projects, but most will choose an email list, a chat server, or both. These are where to get to know other users and contributors, ask questions, celebrate successful compiles, and just hang out. + * See [Enarx chat][18]. + * **Meetups, videoconferences, calls, etc.:** Although in-person meetings are tricky for many at the moment (I'm writing as COVID-19 still reduces travel opportunities), having ways for community members and contributors to get together synchronously can be really helpful for everybody. Sometimes these are scheduled on a daily, weekly, or monthly basis; sometimes, they coincide with other, larger meetups, sometimes a project gets big enough to have its own meetups; sometimes, it's so big that there are meetups of subprojects or internal interest groups. + * See the [Linux Security Summit Europe][19]. + + + +### PUT methods + + * **Bug reports:** The first time many of us contribute anything substantive back to an open source project is when we file a bug report. Bug reports from new users can be really helpful for projects, as they not only expose bugs that may not already be known to the project, but they also give clues as to how actual users of the project are trying to use the code. If the project already publishes binary downloads (see above), you don't even need to compile the code to try it and submit a bug report. But bug reports related to compilation and build can also be extremely useful to the project. Sometimes, the mechanism for bug reporting also provides a way to ask more general questions about the project or to ask for new features. + * See the issues page for [exa][20] (a replacement for the _ls_ command). + * **Tests:** Once you've started using the project, another way to get involved (particularly once you start contributing code) can be to design and submit tests for how the project _ought_ to work. This can be a great way to unearth both your assumptions (and lack of knowledge!) about the project and the project's design assumptions (some of which may well be flawed). Tests are often part of the code repository, but not always. + * See [GNOME Shell][21]'s test repository. + * **Wiki:** A wiki can be a great way to contribute to the project, whether you're coding or not. Many projects don't have as much information available as they should, and that information may not be aimed at people coming to the project "fresh." If this is what you've done, then you're in a great position to write material that will help other "newbs" get into the project faster, as you'll know what would have helped you if it had been there. + * See the wiki for [Wine][22] (Windows Emulator for Linux). + * **Code:** Last but not least, you can write code. You may take hours, months, or years to get to this stage—or you may never reach it—but open source software is nothing without its code. If you've paid enough attention to the other steps, gotten involved in the community, understood what the project aims to do, and have the technical expertise (which you may well develop as you go!), then writing code may be the way you want to contribute. + * See [Enarx][23] (again). + + + +* * * + + 1. I did consider standard RESTful verbs—GET, PUT, POST, and DELETE—but that felt rather contrived.[2][24] + 2. And I don't like the idea of DELETE in this context! + 3. "Your Mileage May Vary," meaning, basically, that your experience may be different, and that's to be expected. + 4. That said, I do use lots of them! + 5. I included this one because I've spent _far_ too much of my time looking at this over the past few months… + + + +* * * + +_This article was originally published on [Alice, Eve, and Bob][25] and is reprinted with the author's permission._ + +Six non-code opportunities for contributing to open source software code and communities. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/open-source-project-level + +作者:[Mike Bursell][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/mikecamel +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/career_journey_road_gps_path_map_520.png?itok=PpL6jJgY (Looking at a map for career journey) +[2]: https://aliceevebob.com/ +[3]: https://opensource.com/correspondent-program +[4]: https://www.eff.org/deeplinks/2021/04/victory-fair-use-supreme-court-reverses-federal-circuit-oracle-v-google +[5]: https://enarx.dev/ +[6]: tmp.WF7h0s934j#1 +[7]: tmp.WF7h0s934j#3 +[8]: tmp.WF7h0s934j#4 +[9]: https://sigstore.dev/ +[10]: https://fedoraproject.org/wiki/Fedora_Project_Wiki +[11]: https://www.youtube.com/channel/UCaYhcUwRBNscFNUKTjgPFiA +[12]: https://www.kernel.org/doc/html/latest/process/code-of-conduct.html +[13]: https://www.chocolate-doom.org/wiki/index.php/Downloads +[14]: https://opensource.com/article/20/5/diagrams-documentation +[15]: https://kubernetes.io/docs/reference/ +[16]: https://github.com/SergioBenitez/Rocket/tree/v0.4 +[17]: tmp.WF7h0s934j#5 +[18]: https://chat.enarx.dev/ +[19]: https://events.linuxfoundation.org/linux-security-summit-europe/ +[20]: https://github.com/ogham/exa/issues +[21]: https://gitlab.gnome.org/GNOME/gnome-shell/tree/master/tests/interactive +[22]: https://wiki.winehq.org/Main_Page +[23]: https://github.com/enarx +[24]: tmp.WF7h0s934j#2 +[25]: https://aliceevebob.com/2021/04/06/get-set-methods-for-open-source-projects/ From fb4376abc785bc797dabdc2f5f73e6372313d365 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 20 Apr 2021 08:36:10 +0800 Subject: [PATCH 731/818] Rename sources/tech/20210419 13 ways to get involved with your favorite open source project.md to sources/talk/20210419 13 ways to get involved with your favorite open source project.md --- ...ways to get involved with your favorite open source project.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20210419 13 ways to get involved with your favorite open source project.md (100%) diff --git a/sources/tech/20210419 13 ways to get involved with your favorite open source project.md b/sources/talk/20210419 13 ways to get involved with your favorite open source project.md similarity index 100% rename from sources/tech/20210419 13 ways to get involved with your favorite open source project.md rename to sources/talk/20210419 13 ways to get involved with your favorite open source project.md From 01bae48b5cb6f47f8986e82dee09d3434ec50925 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 20 Apr 2021 08:36:15 +0800 Subject: [PATCH 732/818] translated --- ...and Edit EPUB Files on Linux With Sigil.md | 101 ----------------- ...and Edit EPUB Files on Linux With Sigil.md | 102 ++++++++++++++++++ 2 files changed, 102 insertions(+), 101 deletions(-) delete mode 100644 sources/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md create mode 100644 translated/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md diff --git a/sources/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md b/sources/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md deleted file mode 100644 index 571cef2f5b..0000000000 --- a/sources/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md +++ /dev/null @@ -1,101 +0,0 @@ -[#]: subject: (Create and Edit EPUB Files on Linux With Sigil) -[#]: via: (https://itsfoss.com/sigile-epub-editor/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Create and Edit EPUB Files on Linux With Sigil -====== - -Sigil is an open source EPUB editor available for Linux, Windows and macOS. With Sigil, you can create a new ebook in EPUB file format or edit an existing EPUB ebook (file ending in .epub extension). - -In case you are wondering, EPUB is a standard ebook file format endorsed by several digital publishing groups. It is well-supported on a range of devices and ebook readers except Amazon Kindle. - -### Sigil lets you create or edit EPUB files - -[Sigil][1] is an open source software that allows you to edit EPUB files. You may, of course, create a new EPUB file from scratch. - -![][2] - -Many people swear by [Calibre for creating ebooks][3] or editing them. It is indeed a complete tool with lots of features and supports more than just EPUB file format. However, Calibre could be heavy on resources at times. - -Sigil is focused on just the EPUB books with the following features: - - * Support for EPUB 2 and EPUB 3 (with some limitations) - * Provides a preview along with the code view - * Editing EPUB syntax - * Table of content generator with mult-level heading - * Edit metadat - * Spell checking - * REGEX support for find and replace feature - * Supports import of EPUB and HTML files, images, and style sheets - * Additional plugins - * Multiple language support for the interface - * Supports Linux, Windows and macOS - - - -Sigil is not [WYSIWYG][4] type of editor where you can type the chapters of new book. It is focused on code as EPUB depends on XML. Consider it a [code editor like VS Code][5] for EPUB files. For this reason, you should use some other [open source tool for writing][6], export your files in .epub format (if possible) and then edit it in Sigil. - -![][7] - -Sigil does have a [Wiki][8] to provide you some documentation on installing and using Sigil. - -### Installing Sigil on Linux - -Sigil is a cross-platform application with support for Windows and macOS along with Linux. It is a popular software with more than a decade of existence. This is why you should find it in the repositories of your Linux distributions. Just look for it in the software center application of your distribution. - -![Sigil in Ubuntu Software Center][9] - -You may need to enable the universe repository beforehand. You may also use the apt command in Ubuntu-based distributions: - -``` -sudo apt install sigil -``` - -Sigil has a lot of dependencies on Python libraries and modules and hence it downloads and installs a good number of packages. - -![][10] - -I am not going to list commands for Fedora, SUSE, Arch and other distributions. You probably already know how to use your distribution’s package manager, right? - -The version provided by your distribution may not always be the latest. If you want the latest version of Sigil, you can check out its GitHub repositories. - -[Sigil on GitHub][11] - -### Not for everyone, certianly not for reading ePUB books - -I wouldn’t recommend using Sigil for reading ebooks. There are [other dedicated applications on Linux to read .epub files][12]. - -If you are a writer who has to deal with EPUB books or if you are digitizing old books and converting them in various formats, Sigil could be worth a try. - -I haven’t used Sigil extensively so I cannot provide a review of it. I let it up to you to explore it and share your experienced with the rest of us here. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/sigile-epub-editor/ - -作者:[Abhishek Prakash][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/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://sigil-ebook.com/ -[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/open-epub-sigil.png?resize=800%2C621&ssl=1 -[3]: https://itsfoss.com/create-ebook-calibre-linux/ -[4]: https://www.computerhope.com/jargon/w/wysiwyg.htm -[5]: https://itsfoss.com/best-modern-open-source-code-editors-for-linux/ -[6]: https://itsfoss.com/open-source-tools-writers/ -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/sigil-epub-editor-800x621.png?resize=800%2C621&ssl=1 -[8]: https://github.com/Sigil-Ebook/Sigil/wiki -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/sigil-software-center-ubuntu.png?resize=800%2C424&ssl=1 -[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/installing-sigil-ubuntu.png?resize=800%2C547&ssl=1 -[11]: https://github.com/Sigil-Ebook/Sigil -[12]: https://itsfoss.com/open-epub-books-ubuntu-linux/ diff --git a/translated/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md b/translated/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md new file mode 100644 index 0000000000..1f0780b0ec --- /dev/null +++ b/translated/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md @@ -0,0 +1,102 @@ +[#]: subject: (Create and Edit EPUB Files on Linux With Sigil) +[#]: via: (https://itsfoss.com/sigile-epub-editor/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +用 Sigil 在 Linux 上创建和编辑 EPUB 文件 +====== + +Sigil 是一个开源的 Linux、Windows 和 MacOS 上的 EPUB 编辑器。你可以使用 Sigil 创建一个新的 EPUB 格式的电子书,或编辑现有的 EPUB 电子书(以 .epub 扩展结尾的文件)。 + +如果你感到好奇,EPUB 是一个标准的电子书格式,并被几个数字出版集团认可。它被许多设备和电子阅读器支持,除了 亚马逊的 Kindle。 + +### Sigil 让你创建或编辑 EPUB 文件 + +[Sigil][1] 是一个允许你编辑 EPUB 文件的开源软件。当然,你可以从头开始创建一个新的 EPUB 文件。 + +![][2] + +很多人在[创建或编辑电子书时非常相信 Calibre][3]。它确实是一个完整的工具,它有很多的功能并支持不仅仅是 EPUB 格式。然而,Calibre 有时可能是沉重的资源。 + + +Sigil 只专注于 EPUB 书籍,它有以下功能: + + * 支持 EPUB 2 和 EPUB 3(有一定的限制) + * 提供代码视图预览 + * 编辑 EPUB 语法 + * 带有多级标题的内容表生成器 + * 编辑元数据 + * 拼写检查 + * 支持正则查找和替换 + * 支持导入 EPUB、HTML 文件、图像和样式表 + * 额外插件 + * 多语言支持的接口 + * 支持 Linux、Windows 和 MacOS + + + +Sigil 不是你可以直接输入新书章节的 [WYSIWYG][4] 类型的编辑器。由于 EPUB 依赖于 XML,因此它专注于代码。 将其视为用于 EPUB 文件的[类似于 VS Code 的代码编辑器][5]。出于这个原因,你应该使用一些其他[开源写作工具][6],以 epub 格式导出你的文件(如果可能的话),然后在 Sigil 中编辑它。 + +![][7] + +Sigil 有一个 [Wiki][8] 来提供一些安装和使用 Sigil 的文档。 + +### 在 Linux 上安装 Sigil + +Sigil 是一款跨平台应用,支持 Windows 和 macOS 以及 Linux。它是一个流行的软件,有超过十年的历史。这就是为什么你应该会在你的 Linux 发行版仓库中找到它。只要在你的发行版的软件中心应用中寻找它就可以了。 + +![Sigil in Ubuntu Software Center][9] + +你可能需要事先启用 universe 仓库。你也可以在 Ubuntu发行版中使用 apt 命令: + +``` +sudo apt install sigil +``` + +Sigil 有很多对 Python 库和模块的依赖,因此它下载和安装了大量的包。 + +![][10] + +我不会列出 Fedora、SUSE、Arch 和其他发行版的命令。你可能已经知道如何使用你的发行版的软件包管理器,对吧? + +你的发行版提供的版本不一定是最新的。如果你想要 Sigil 的最新版本,你可以查看它的 GitHub 仓库。 + +[Sigil on GitHub][11] + +### 并不适合所有人,当然也不适合用于阅读 ePUB 电子书 + +我不建议使用 Sigil 阅读电子书。Linux 上有[其他专门的应用来阅读 .epub 文件][12]。 + +如果你是一个必须处理 EPUB 书籍的作家,或者如果你在数字化旧书,并在各种格式间转换,Sigil 可能是值得一试。 + +我还没有广泛使用 Sigil,所以我不提供对它的评论。我让你去探索它,并在这里与我们分享你的经验。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/sigile-epub-editor/ + +作者:[Abhishek Prakash][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://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://sigil-ebook.com/ +[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/open-epub-sigil.png?resize=800%2C621&ssl=1 +[3]: https://itsfoss.com/create-ebook-calibre-linux/ +[4]: https://www.computerhope.com/jargon/w/wysiwyg.htm +[5]: https://itsfoss.com/best-modern-open-source-code-editors-for-linux/ +[6]: https://itsfoss.com/open-source-tools-writers/ +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/sigil-epub-editor-800x621.png?resize=800%2C621&ssl=1 +[8]: https://github.com/Sigil-Ebook/Sigil/wiki +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/sigil-software-center-ubuntu.png?resize=800%2C424&ssl=1 +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/installing-sigil-ubuntu.png?resize=800%2C547&ssl=1 +[11]: https://github.com/Sigil-Ebook/Sigil +[12]: https://itsfoss.com/open-epub-books-ubuntu-linux/ From 94af7bcfa6ab3c8296263d7591a1230b7d88d5b7 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 20 Apr 2021 08:37:16 +0800 Subject: [PATCH 733/818] Rename sources/tech/20210419 21 reasons why I think everyone should try Linux.md to sources/talk/20210419 21 reasons why I think everyone should try Linux.md --- .../20210419 21 reasons why I think everyone should try Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20210419 21 reasons why I think everyone should try Linux.md (100%) diff --git a/sources/tech/20210419 21 reasons why I think everyone should try Linux.md b/sources/talk/20210419 21 reasons why I think everyone should try Linux.md similarity index 100% rename from sources/tech/20210419 21 reasons why I think everyone should try Linux.md rename to sources/talk/20210419 21 reasons why I think everyone should try Linux.md From f5f0229201e29ca47d344f9d62bd715651f0bec3 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 20 Apr 2021 08:43:49 +0800 Subject: [PATCH 734/818] translating --- ...ustomizing your Mac terminal theme with open source tools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md b/sources/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md index 94daa8e70a..60ac7ea7e6 100644 --- a/sources/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md +++ b/sources/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/4/zsh-mac) [#]: author: (Bryant Son https://opensource.com/users/brson) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From c13c02c6117434ef432f4f6325e44023c2e19986 Mon Sep 17 00:00:00 2001 From: stevenzdg988 <3442417@qq.com> Date: Tue, 20 Apr 2021 09:42:48 +0800 Subject: [PATCH 735/818] =?UTF-8?q?=E8=AF=91=E6=96=87=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ely on for Your Ancient 32-bit Computer.md | 224 ------------------ ...ely on for Your Ancient 32-bit Computer.md | 224 ++++++++++++++++++ 2 files changed, 224 insertions(+), 224 deletions(-) delete mode 100644 sources/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md create mode 100644 translated/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md diff --git a/sources/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md b/sources/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md deleted file mode 100644 index 0552d641e5..0000000000 --- a/sources/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md +++ /dev/null @@ -1,224 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (stevenzdg988) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer) -[#]: via: (https://itsfoss.com/32-bit-linux-distributions/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer -====== - -If you’ve been keeping up with the latest [Linux distributions][1], you must have noticed that 32-bit support has been dropped from [most of the popular Linux distributions][2]. Arch Linux, Ubuntu, Fedora, everyone has dropped the support for this older architecture. - -But, what if you have vintage hardware with you that still needs to be revived or you want to make use of it for something? Fret not, there are still a few options left to choose from for your 32-bit system. - -In this article, I’ve tried to compile some of the best Linux distributions that will keep on supporting 32-bit platform for next few years. - -### Top Linux distributions that still offer 32-bit support - -![][3] - -This list is a bit different from [our earlier list of Linux distributions for old laptops][4]. Even 64-bit computers can be considered old if they were released before 2010. This is why some suggestions listed there included distros that only support 64-bit now. - -The information presented here are correct as per my knowledge and findings but if you find otherwise, please let me know in the comment section. - -Before you go on, I suppose you know [how to check if you have a 32 bit or 64 bit computer][5]. - -#### 1\. Debian - -![Image Credits: mrneilypops / Deviantart][6] - -Debian is a fantastic choice for 32-bit systems because they still support it with their latest stable release. At the time of writing this, the latest stable release **Debian 10 “buster”** offers a 32-bit version and is supported until 2024. - -If you’re new to Debian, it is worth mentioning that you get solid documentation for everything on their [official wiki][7]. So, it shouldn’t be an issue to get started. - -You can browse through the [available installers][8] to get it installed. However, before you proceed, I would recommend referring to the list of [things to remember before installing Debian][9] in addition to its [installation manual][10]. - -[Debian][11] - -#### 2\. Slax - -![][12] - -If you just want to quickly boot up a device for some temporary work, Slax is an impressive option. - -It is based on Debian but it aims to be a portable and fast option that is meant to be run through USB devices or DVDs. You can download the 32-bit ISO file from their website for free or purchase a rewritable DVD/encrypted pendrive with Slax pre-installed. - -Of course, this isn’t meant to replace a traditional desktop operating system. But, yes, you do get the 32-bit support with Debian as its base. - -[Slax][13] - -#### 3\. AntiX - -![Image Credits: Opensourcefeed][14] - -Yet another impressive Debian-based distribution. AntiX is popularly known as a systemd-free distribution which focuses on performance while being a lightweight installation. - -It is perfectly suitable for just about any old 32-bit system. To give you an idea, it just needs 256 MB RAM and 2.7 GB storage space at the very least. Not just easy to install, but the user experience is focused for both newbies and experienced users as well. - -You should get the latest version based on Debian’s latest stable branch available. - -[AntiX][15] - -#### 4\. openSUSE - -![][16] - -openSUSE is an independent Linux distribution that supports 32-bit systems as well. Even though the latest regular version (Leap) does not offer 32-bit images, the rolling release edition (Tumbleweed) does provide 32-bit image. - -It will be an entirely different experience if you’re new. However, I suggest you to go through the [reasons why you should be using openSUSE.][17] - -It is mostly focused for developers and system administrators but you can utilize it as an average desktop user as well. It is worth noting that openSUSE is not meant to run on vintage hardware — so you have to make sure that you have at least 2 GB RAM, 40+ GB storage space, and a dual core processor. - -[openSUSE][18] - -#### 5\. Emmabuntüs - -![][19] - -Emmabuntus is an interesting distribution that aims to extend the life of the hardware to reduce waste of raw materials with 32-bit support. As a group they’re also involved in providing computers and digital technologies to schools. - -It offers two different editions, one based on Ubuntu and the other based on Debian. If you want a longer 32-bit support, you may want to go with the Debian edition. It may not be the best option, but with a number of pre-configured software to make the Linux learning experience easy and 32-bit support, it is a decent option if you want to support their cause in the process. - -[Emmanbuntus][20] - -#### 6\. NixOS - -![Nixos KDE Edition \(Image Credits: Distrowatch\)][21] - -NixOS is yet another independent Linux distribution that supports 32-bit systems. It focuses on providing a reliable system where packages are isolated from each other. - -This may not be directly geared towards average users but it is a KDE-powered usable distribution with a unique approach to package management. You can learn more about its [features][22] from its official website. - -[NixOS][23] - -#### 7\. Gentoo Linux - -![][24] - -If you’re an experienced Linux user and looking for a 32-bit Linux distributions, Gentoo Linux should be a great choice. - -You can easily configure, compile, and install a kernel through package manager with Gentoo Linux if you want. Not just limited to its configurability, which it is popularly known for, you will also be able to run it without any issues on older hardware. - -Even if you’re not an experienced user and want to give it a try, simply read through the [installation instructions][25] and you will be in for an adventure. - -[Gentoo Linux][26] - -#### 8\. Devuan - -![][27] - -[Devuan][28] is yet another systemd-free distribution. It is technically a fork of Debian, just without systemd and encouraging [Init freedom][29]. - -It may not be a very popular Linux distribution for an average user but if you want a systemd-free distribution and 32-bit support, Devuan should be a good option. - -[Devuan][30] - -#### 9\. Void Linux - -![][31] - -Void Linux is an interesting distribution independently developed by volunteers. It aims to be a general purpose OS while offering a stable rolling release cycle. It features runit as the init system instead of systemd and gives you the option of several [desktop environments][32]. - -It has an extremely impressive minimum requirement specification with just 96 MB of RAM paired up with Pentium 4 (or equivalent) chip. Try it out! - -[Void Linux][33] - -#### 10\. Q4OS - -![][34] - -Q4OS is another Debian-based distribution that focuses on providing a minimal and fast desktop user experience. It also happens to be one of the [best lightweight Linux distributions][4] in our list. It features the [Trinity desktop][35] for its 32-bit edition and you can find KDE Plasma support on 64-bit version. - -Similar to Void Linux, Q4OS also runs on a bare minimum of at least 128 MB RAM and a 300 MHz CPU with a 3 GB storage space requirement. It should be more than enough for any vintage hardware. So, I’d say, you should definitely try it out! - -To know more about it, you can also check out [our review of Q4OS][36]. - -[Q$OS][37] - -#### 11: MX Linux - -![][38] - -If you’ve got a slightly decent configuration (not completely vintage but old), MX Linux would be my personal recommendation for 32-bit systems. It also happens to be one of the [best Linux distributions][2] for every type of user. - -In general, MX Linux is a fantastic lightweight and customizable distribution based on Debian. You get the option to choose from KDE, XFCE or Fluxbox (which is their own desktop environment for older hardware). You can explore more about it on their official website and give it a try. - -[MX Linux][39] - -### Honorable Mention: Funtoo - -Funtoo is a Gentoo-based community-developed Linux distribution. It focuses on giving you the best performance with Gentoo Linux along with some extra packages to make the experience complete for users. It is also interesting to note that the development is actually led by Gentoo Linux’s creator **Daniel Robbins**. - -Of course, if you’re new to Linux, you may not have the best experience here. But, it does support 32-bit systems and works well across many older Intel/AMD chipsets. Explore more about it on its official website to see if you want to try it out. - -[Funtoo][40] - -### Wrapping Up - -I focused the list on Debian-based and some Independent distributions. However, if you don’t mind long term support and just want to get your hands on a 32-bit supported image, you can try any Ubuntu 18.04 based distributions (or any official flavour) as well. - -At the time of writing this, they just have a few more months of software support left. Hence, I avoided mentioning it as the primary options. But, if you like Ubuntu 18.04 based distros or any of its flavours, you do have options like [LXLE][41], [Linux Lite][42], [Zorin Lite 15][43], and other official flavours. - -Even though most modern desktop operating systems based on Ubuntu have dropped support for 32-bit support. You still have plenty of choices to go with. - -What would you prefer to have on your 32-bit system? Let me know your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/32-bit-linux-distributions/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[stevenzdg988](https://github.com/stevenzdg988) -校对:[校对者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/what-is-linux-distribution/ -[2]: https://itsfoss.com/best-linux-distributions/ -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/32-bit-linux.png?resize=800%2C450&ssl=1 -[4]: https://itsfoss.com/lightweight-linux-beginners/ -[5]: https://itsfoss.com/32-bit-64-bit-ubuntu/ -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/08/debian-screenshot.png?resize=800%2C450&ssl=1 -[7]: https://wiki.debian.org/FrontPage -[8]: https://www.debian.org/releases/buster/debian-installer/ -[9]: https://itsfoss.com/before-installing-debian/ -[10]: https://www.debian.org/releases/buster/installmanual -[11]: https://www.debian.org/ -[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/slax-screenshot.jpg?resize=800%2C600&ssl=1 -[13]: https://www.slax.org -[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/antiX-19-1.jpg?resize=800%2C500&ssl=1 -[15]: https://antixlinux.com -[16]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/01/opensuse-15-1.png?resize=800%2C500&ssl=1 -[17]: https://itsfoss.com/why-use-opensuse/ -[18]: https://www.opensuse.org/ -[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/Emmabuntus-xfce.png?resize=800%2C500&ssl=1 -[20]: https://emmabuntus.org/ -[21]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/nixos-kde.jpg?resize=800%2C500&ssl=1 -[22]: https://nixos.org/features.html -[23]: https://nixos.org/ -[24]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/gentoo-linux.png?resize=800%2C450&ssl=1 -[25]: https://www.gentoo.org/get-started/ -[26]: https://www.gentoo.org -[27]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/devuan-beowulf.jpg?resize=800%2C600&ssl=1 -[28]: https://itsfoss.com/devuan-3-release/ -[29]: https://www.devuan.org/os/init-freedom -[30]: https://www.devuan.org -[31]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/void-linux.jpg?resize=800%2C450&ssl=1 -[32]: https://itsfoss.com/best-linux-desktop-environments/ -[33]: https://voidlinux.org/ -[34]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/q4os8Debonaire.jpg?resize=800%2C500&ssl=1 -[35]: https://en.wikipedia.org/wiki/Trinity_Desktop_Environment -[36]: https://itsfoss.com/q4os-linux-review/ -[37]: https://q4os.org/index.html -[38]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/08/mx-linux-19-2-kde.jpg?resize=800%2C452&ssl=1 -[39]: https://mxlinux.org/ -[40]: https://www.funtoo.org/Welcome -[41]: https://www.lxle.net/ -[42]: https://www.linuxliteos.com -[43]: https://zorinos.com/download/15/lite/32/ diff --git a/translated/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md b/translated/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md new file mode 100644 index 0000000000..294f392832 --- /dev/null +++ b/translated/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md @@ -0,0 +1,224 @@ +[#]: collector: (lujun9972) +[#]: translator: (stevenzdg988) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer) +[#]: via: (https://itsfoss.com/32-bit-linux-distributions/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +可以在古老的 32 位计算机上使用的 11 种 Linux 发行版 +====== + +如果您紧跟最新的[Linux 发行版][1],那么您一定已经注意到,[大多数流行的 Linux 发行版][2]已经终止了 32 位支持。Arch Linux,Ubuntu,Fedora,每一个都已经放弃了对这种较旧架构的支持。 + +但是,如果您拥有仍然需要再生的老式硬件,或者想将其用于某些用途,该怎么办?不用担心,还剩下一些 32 位系统选项可供选择。 + +在本文中,我试图编译一些最好的 Linux 发行版,这些发行版将在未来几年继续支持 32 位平台。 + +### 仍提供 32 位支持的最优 Linux 发行版 + +![][3] + +此列表与[较早的支持旧笔记本电脑的 Linux 发行版列表][4]略有不同。如果 64 位计算机是在 2010 年之前发布的,那么甚至可以认为它们是过时的。这就是为什么其中列出的一些建议包括现在仅支持 64 位版本的发行版的原因。 + +根据我的知识和认知,此处提供的信息是正确的,但是如果您发现有误,请在评论部分让我知道。 + +在继续之前,我认为您知道[如何检查您拥有的是否是 32 位或 64 位计算机][5]。 + +#### 1\. Debian + +![图片来源: mrneilypops / Deviantart][6] + +对于 32 位系统,Debian 是一个绝佳的选择,因为他们仍通过最新的稳定版本支持它。在撰写本文时,最新的稳定发行版 **Debian 10“buster”** 提供了32位版本,并一直支持到2024年。 + +如果您是 Debian 的新手,值得一提的是,您可以在[官方Wiki][7]上获得有关其所有内容的可靠文档。因此,上手应该不是问题。 + +您可以浏览[可用的安装程序][8]进行安装。但是,在开始之前,除了[安装手册][10]外,我建议您参考[安装 Debian 之前要记住的事情][9]列表。 + +[Debian][11] + +#### 2\. Slax + +![][12] + +如果您只是想快速启动设备以进行一些临时工作,Slax是一个令人印象深刻的选择。 + +它基于 Debian,但它旨在成为一种便携式且通过 USB 设备或 DVD 运行的快速选项。您可以从他们的网站免费下载 32 位 ISO 文件,或购买预装有 Slax 的可擦写 DVD /**(或)**加密的闪存盘。 + +当然,这并不是要取代传统的桌面操作系统。但是,是的,您确实获得了以 Debian 为基础的 32 位支持。 + +[Slax][13] + +#### 3\. AntiX + +![图片来源: Opensourcefeed(开源提供)][14] + +另一个令人印象深刻的基于 Debian 的发行版。AntiX 通常被称为免系统发行版,该发行版在轻量级安装的同时侧重于性能。 + +它完全适合几乎所有老式的 32 位系统。建议至少需要 256 MB 内存和 2.7 GB 存储空间。不仅易于安装,而且用户体验也针对新手和有经验的用户。 + +您应该根据 Debian 的最新稳定可用分支获得最新版本。 + +[AntiX][15] + +#### 4\. openSUSE + +![][16] + +openSUSE 是一个独立的 Linux 发行版,也支持 32 位系统。实际上最新的常规版本(Leap)不提供 32 位映像,但滚动发行版本(Tumbleweed)确实提供了 32 位映像。 + +如果您是新手,那将是完全不同的体验。但是,我建议您仔细阅读[为什么要使用 openSUSE 的原因。][17] + +它主要面向开发人员和系统管理员,但也可以将其用作普通桌面用户。值得注意的是,openSUSE 不意味在老式硬件上运行-因此必须确保至少有 2 GB 内存,40+ GB存储空间和双核处理器。 + +[openSUSE][18] + +#### 5\. Emmabuntüs + +![][19] + +Emmabuntus 是一个有趣的发行版,旨在通过 32 位支持来延长硬件的使用寿命,以减少原材料的浪费。作为一个小组,他们还参与向学校提供计算机和数字技术。 + +它提供了两个不同的版本,一个基于 Ubuntu,另一个基于 Debian。如果您需要更长久的 32 位支持,则可能要使用 Debian 版本。它可能不是最好的选择,但是它具有许多预配置的软件来简化 Linux 学习体验并提供 32 位支持,如果您希望在此过程中支持他们的事业,那么这是一个相当不错的选择。 + +[Emmanbuntus][20] + +#### 6\. NixOS + +![Nixos KDE Edition \(图片来源: Distrowatch\)][21] + +NixOS 是另一个独立的支持 32 位系统的 Linux 发行版。它着重于提供一个可靠的系统,其中程序包彼此隔离。 + +这可能不直接面向普通用户,但它是 KDE 支持的可用发行版,具有独一无二的软件包管理方法。您可以从其官方网站上了解有关其[功能][22]的更多信息。 + +[NixOS][23] + +#### 7\. Gentoo Linux + +![][24] + +如果您是经验丰富的 Linux 用户,并且正在寻找 32 位 Linux 发行版,那么 Gentoo Linux 应该是一个不错的选择。 + +如果需要,您可以使用 Gentoo Linux 通过软件包管理器轻松配置,编译和安装内核。不仅限于众所周知的可配置性,您还可以在较旧的硬件上运行而不会出现任何问题。 + +即使您不是经验丰富的用户,也想尝试一下,只需阅读[安装说明][25],就可以大胆尝试了。 + +[Gentoo Linux][26] + +#### 8\. Devuan + +![][27] + +[Devuan][28]是另一种免系统的发行版。从技术上讲,它是 Debian的一个分支,只是没有系统化和鼓励[开始自由][29]。 + +对于普通用户来说,它可能不是一个非常流行的 Linux 发行版,但是如果您想要免系统发行版和 32 位支持,Devuan 应该是一个不错的选择。 + +[Devuan][30] + +#### 9\. Void Linux + +![][31] + +Void Linux 是由志愿者独立开发的有趣发行版。它旨在成为一个通用的 OS(操作系统),同时提供稳定的滚动发布周期。它以 `runit`作为初始系统替代 `systemd`,并具有多个[桌面环境][32]的选项。 + +它具有令人印象深刻的最低需求规格,只需 96 MB 的内存和 Pentium(奔腾) 4(或等效的)芯片配对。试试看吧! + +[Void Linux][33] + +#### 10\. Q4OS + +![][34] + +Q4OS 是另一个基于 Debian 的发行版,致力于提供最小和快速的桌面用户体验。它也恰好是我们列表中的[最佳轻量级 Linux 发行版][4]之一。它的 32 位版本具有[Trinity 桌面][35],您可以在 64 位版本上找到 KDE Plasma 支持。 + +与 Void Linux 类似,Q4OS 也至少可以运行在至少 128 MB 的内存和 300 MHz 的 CPU 上,并需要 3 GB 的存储空间。对于任何老式硬件来说,它应该绰绰有余。因此,我想说,您绝对应该尝试一下! + +要了解更多信息,您还可以查看[我们对 Q4OS 的回顾][36]。 + +[Q$OS][37] + +#### 11: MX Linux + +![][38] + +如果有一个稍微不错的配置(不完全是老式的,而是旧的),对于 32 位系统,我个人推荐 MX Linux。对于每种类型的用户,它也都会成为[最佳 Linux 发行版][2]之一。 + +通常,MX Linux 是基于 Debian 的出色的轻量级和可自定义发行版。您可以选择从 KDE,XFCE 或 Fluxbox(这是它们自己的用于较旧硬件的桌面环境)中进行选择。您可以在他们的官方网站上找到更多关于它的信息,然后尝试一下。 + +[MX Linux][39] + +### 荣誉提名:Funtoo + +Funtoo 是基于 Gentoo 社区开发的 Linux 发行版。它着重于为您提供 Gentoo Linux 的最佳性能以及一些额外的软件包,以使用户获得完整的体验。有趣的是,该开发实际上是由 Gentoo Linux 的创建者丹尼尔·罗宾斯(Daniel Robbins)领导的。 + +当然,如果您不熟悉 Linux,那么这里可能没有最好的体验。但是,它确实支持 32 位系统,并且可以在许多较旧的 Intel/AMD 芯片组上很好地工作。 + +[Funtoo][40] + +### 总结 + +我将列表集中在基于 Debian 的发行版和一些独立发行版上。但是,如果您不介意长期支持条款,而只想获得 32 位受支持的映像,也可以尝试使用任何基于 Ubuntu 18.04 的发行版(或任何官方版本)。 + +在撰写本文时,他们只剩下几个月的软件支持。因此,我避免将其作为主要选项提及。但是,如果您喜欢基于 Ubuntu 18.04 的发行版或其它任何版本,可以选择 [LXLE][41],[Linux Lite][42],[Zorin Lite 15][43]及其他官方版本。 + +即使大多数基于 Ubuntu 的现代桌面操作系统都放弃了对 32 位的支持。您仍然有很多选项可以选择。 + +在 32 位系统上更喜欢哪一个?在下面的评论中让我知道您的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/32-bit-linux-distributions/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[stevenzdg988](https://github.com/stevenzdg988) +校对:[校对者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/what-is-linux-distribution/ +[2]: https://itsfoss.com/best-linux-distributions/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/32-bit-linux.png?resize=800%2C450&ssl=1 +[4]: https://itsfoss.com/lightweight-linux-beginners/ +[5]: https://itsfoss.com/32-bit-64-bit-ubuntu/ +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/08/debian-screenshot.png?resize=800%2C450&ssl=1 +[7]: https://wiki.debian.org/FrontPage +[8]: https://www.debian.org/releases/buster/debian-installer/ +[9]: https://itsfoss.com/before-installing-debian/ +[10]: https://www.debian.org/releases/buster/installmanual +[11]: https://www.debian.org/ +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/slax-screenshot.jpg?resize=800%2C600&ssl=1 +[13]: https://www.slax.org +[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/antiX-19-1.jpg?resize=800%2C500&ssl=1 +[15]: https://antixlinux.com +[16]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/01/opensuse-15-1.png?resize=800%2C500&ssl=1 +[17]: https://itsfoss.com/why-use-opensuse/ +[18]: https://www.opensuse.org/ +[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/Emmabuntus-xfce.png?resize=800%2C500&ssl=1 +[20]: https://emmabuntus.org/ +[21]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/nixos-kde.jpg?resize=800%2C500&ssl=1 +[22]: https://nixos.org/features.html +[23]: https://nixos.org/ +[24]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/gentoo-linux.png?resize=800%2C450&ssl=1 +[25]: https://www.gentoo.org/get-started/ +[26]: https://www.gentoo.org +[27]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/devuan-beowulf.jpg?resize=800%2C600&ssl=1 +[28]: https://itsfoss.com/devuan-3-release/ +[29]: https://www.devuan.org/os/init-freedom +[30]: https://www.devuan.org +[31]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/void-linux.jpg?resize=800%2C450&ssl=1 +[32]: https://itsfoss.com/best-linux-desktop-environments/ +[33]: https://voidlinux.org/ +[34]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/q4os8Debonaire.jpg?resize=800%2C500&ssl=1 +[35]: https://en.wikipedia.org/wiki/Trinity_Desktop_Environment +[36]: https://itsfoss.com/q4os-linux-review/ +[37]: https://q4os.org/index.html +[38]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/08/mx-linux-19-2-kde.jpg?resize=800%2C452&ssl=1 +[39]: https://mxlinux.org/ +[40]: https://www.funtoo.org/Welcome +[41]: https://www.lxle.net/ +[42]: https://www.linuxliteos.com +[43]: https://zorinos.com/download/15/lite/32/ From b74b31052d662f4125262b36772adf35acdcfea1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 20 Apr 2021 09:52:47 +0800 Subject: [PATCH 736/818] PRF @stevenzdg988 --- ...t tips for managing your home directory.md | 84 +++++++++---------- 1 file changed, 41 insertions(+), 43 deletions(-) diff --git a/translated/tech/20210405 7 Git tips for managing your home directory.md b/translated/tech/20210405 7 Git tips for managing your home directory.md index f79436921e..2ea2141134 100644 --- a/translated/tech/20210405 7 Git tips for managing your home directory.md +++ b/translated/tech/20210405 7 Git tips for managing your home directory.md @@ -3,54 +3,54 @@ [#]: author: (Seth Kenlon https://opensource.com/users/seth) [#]: collector: (lujun9972) [#]: translator: (stevenzdg988) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) 7个管理家目录的 Git 技巧 ====== -这是我怎样设置 Git 来管理我的家目录的方法。 -![一排房子][1] -我有几台电脑。我有一台笔记本电脑在工作,一台工作站在家里,一台 Raspberry Pi(或四台),一台 [Pocket CHIP][2],一台 [运行各种不同的 Linux 的 Chromebook][3],等等。我过去常常按照相同的步骤或多或少地在每台计算机上设置我的用户环境,而且我经常告诉自己,我喜欢每台计算机都略微独特。例如,我在工作中比在家里更经常使用 [Bash 别名][4],并且我在家里使用的帮助脚本可能对工作没有用。 +> 这是我怎样设置 Git 来管理我的家目录的方法。 -这些年来,我对各种设备的期望开始相融,而我忘记了我在家用计算机上建立的功能没有移植到我的工作计算机上,诸如此类。我需要一种标准化我的自定义工具包的方法。使我感到意外的答案是 Git。 +![](https://img.linux.net.cn/data/attachment/album/202104/20/095224mtq14szo7opfofq7.jpg) -Git 是版本跟踪器软件。它著名于使用在最大和最小的开源项目,甚至最大的专利软件公司。但是它是为源代码设计的,而不是一个充满音乐和视频文件,游戏,照片等的家目录。我听说有人使用 Git 管理其家目录,但我认为这是编码人员进行的一项附带实验,而不是像我这样的现实生活中的用户。 +我有好几台电脑。一台笔记本电脑用于工作,一台工作站放在家里,一台树莓派(或四台),一台 [Pocket CHIP][2],一台 [运行各种不同的 Linux 的 Chromebook][3],等等。我曾经在每台计算机上或多或少地按照相同的步骤设置我的用户环境,也经常告诉自己让每台计算机都略有不同。例如,我在工作中比在家里更经常使用 [Bash 别名][4],并且我在家里使用的辅助脚本可能对工作没有用。 -用 Git 管理我的家目录是一个不断发展的过程。随着时间的推移我一直在学习和适应。如果您决定使用 Git 管理家目录,则可能需要记住以下几点。 +这些年来,我对各种设备的期望开始相融,我会忘记我在家用计算机上建立的功能没有移植到我的工作计算机上,诸如此类。我需要一种标准化我的自定义工具包的方法。使我感到意外的答案是 Git。 -### 1\. 文本和二进制位置 +Git 是版本跟踪软件。它以既可以用在非常大的开源项目也可以用在极小的开源项目而闻名,甚至最大的专有软件公司也在用它。但是它是为源代码设计的,而不是用在一个装满音乐和视频文件、游戏、照片等的家目录。我听说过有人使用 Git 管理其家目录,但我认为这是程序员们进行的一项附带实验,而不是像我这样的现实生活中的用户。 + +用 Git 管理我的家目录是一个不断发展的过程。随着时间的推移我一直在学习和适应。如果你决定使用 Git 管理家目录,则可能需要记住以下几点。 + +### 1、文本和二进制位置 ![家目录][5] -(Seth Kenlon, [CC BY-SA 4.0][6]) +当由 Git 管理时,除了配置文件之外,你的家目录对于所有内容而言都是“无人之地”。这意味着当你打开主目录时,除了可预见的目录的列表之外,你什么都看不到。不应有任何杂乱无章的照片或 LibreOffice 文档,也不应有 “我就在这里放一分钟” 的临时文件。 -当由 Git 管理时,除了配置文件之外,您的家目录对于所有内容而言都是"无人之地"。这意味着当您打开主目录时,除了可预见的目录的列表之外,您什么都看不到。不应有任何无主的照片或 LibreOffice 文档,也不应有 “我将其放在此处仅一分钟(临时)” 的文件。 - -原因很简单:使用 Git 管理家目录时,家目录中所有 _未_ 提交的内容都会变得杂乱无章。每次执行 `git status` 时,您都必须滚动到过去任何 Git 未跟踪的文件,因此将这些文件保存在子目录(添加到 `.gitignore` 文件中)至关重要。 +原因很简单:使用 Git 管理家目录时,家目录中所有 _未_ 提交的内容都会变成噪音。每次执行 `git status` 时,你都必须翻过去之前 Git 未跟踪的任何文件,因此将这些文件保存在子目录(添加到 `.gitignore` 文件中)至关重要。 许多 Linux 发行版提供了一组默认目录: - * 文档 - * 下载 - * 音乐 - * 相片 - * 模板 - * 视频 + * `Documents` + * `Downloads` + * `Music` + * `Photos` + * `Templates` + * `Videos` -如果需要,您可以创建更多。例如,我区分创作的音乐(音乐)和购买的聆听音乐(专辑)。同样,我的 Cinema (电影)目录包含其他人的电影,而 Videos (视频目录)包含我需要编辑的视频文件。换句话说,我的默认目录结构比大多数 Linux 发行版提供的默认集更详细,但是我认为这样做有好处。如果没有适合您的目录结构,由于缺少更好的存放位置,您将更有可能将其存放在家目录中,因此请提前考虑并计划适合您的工作目录。您以后总是可以添加更多,但是最好先开始擅长的。 +如果需要,你可以创建更多。例如,我把创作的音乐(`Music`)和购买来聆听的音乐(`Albums`)区分开来。同样,我的电影(`Cinema`)目录包含了其他人的电影,而视频(`Videos`)目录包含我需要编辑的视频文件。换句话说,我的默认目录结构比大多数 Linux 发行版提供的默认设置更详细,但是我认为这样做有好处。如果没有适合你的目录结构,你更会将其存放在家目录中,因为没有更好的存放位置,因此请提前考虑并规划好适合你的工作目录。你以后总是可以添加更多,但是最好先开始擅长的。 -### 2\. 设置最优的 `.gitignore` +### 2、、设置最优的 `.gitignore` -清理家目录后,您可以像往常一样将其作为 Git 存储库实例化: +清理家目录后,你可以像往常一样将其作为 Git 存储库实例化: ``` $ cd $ git init . ``` -您的 Git 信息库还没有任何内容,因此您的家目录中的所有内容均未被跟踪。您的第一项工作是筛选未跟踪文件的列表,并确定要保持未跟踪状态的文件。要查看未跟踪的文件: +你的 Git 仓库中还没有任何内容,你的家目录中的所有内容均未被跟踪。你的第一项工作是筛选未跟踪文件的列表,并确定要保持未跟踪状态的文件。要查看未跟踪的文件: ``` $ git status @@ -65,51 +65,49 @@ $ git status [...] ``` -根据您使用家目录的时间长短,此列表可能很长。简单的目录是您在第一步中确定的目录。通过将它们添加到名为 `.gitignore` 的隐藏文件中,您告诉 Git 停止将它们列为未跟踪文件,并且从不对其进行跟踪: +根据你使用家目录的时间长短,此列表可能很长。简单的是你在上一步中确定的目录。通过将它们添加到名为 `.gitignore` 的隐藏文件中,你告诉 Git 停止将它们列为未跟踪文件,并且永远不对其进行跟踪: ``` -`$ \ls -lg | grep ^d | awk '{print $8}' >> ~/.gitignore` +$ \ls -lg | grep ^d | awk '{print $8}' >> ~/.gitignore ``` -完成后,浏览 `git status` 所示的其余未跟踪文件,并确定是否有其他文件需要授权排除。这个过程帮助我发现了几个陈旧的配置文件和目录,这些文件和目录最终被我全部丢弃了,而且还发现了一些特定于一台计算机的文件和目录。我在这里非常严格,因为许多配置文件在自动生成时会做得更好。例如,我从未提交过 KDE 配置文件,因为许多文件包含诸如最新文档之类的信息以及其他机器上不存在的其他元素。 +完成后,浏览 `git status` 所示的其余未跟踪文件,并确定是否有其他文件需要排除。这个过程帮助我发现了几个陈旧的配置文件和目录,这些文件和目录最终被我全部丢弃了,而且还发现了一些特定于一台计算机的文件和目录。我在这里非常严格,因为许多配置文件在自动生成时会表现得更好。例如,我从不提交我的 KDE 配置文件,因为许多文件包含了诸如最新文档之类的信息以及其他机器上不存在的其他元素。 -我跟踪我的个性化配置文件,脚本和实用程序,配置文件和 Bash 配置以及速查表和我经常引用的其他文本片段。如果该软件主要负责维护文件,则将其忽略。当对文件有疑问时,我将其忽略。您以后总是可以取消忽略它(通过从 .gitignore 文件中删除它)。 +我会跟踪我的个性化配置文件、脚本和实用程序、配置文件和 Bash 配置,以及速查表和我经常引用的其他文本片段。如果有软件主要负责维护的文件,则将其忽略。当对一个文件不确定时,我将其忽略。你以后总是可以取消忽略它(通过从 `.gitignore` 文件中删除它)。 -### 3\. 了解您的数据 +### 3、了解你的数据 -我正在使用 KDE,因此我使用开源扫描程序 [Filelight][7] 来获取我的数据概述。Filelight 为您提供了一个图表,可让您查看每个目录的大小。您可以浏览每个目录以查看占用了所有空间的内容,然后回溯调查其他地方。这是您系统的迷人视图,它使您可以以全新的方式查看文件。 +我使用的是 KDE,因此我使用开源扫描程序 [Filelight][7] 来了解我的数据概况。Filelight 为你提供了一个图表,可让你查看每个目录的大小。你可以浏览每个目录以查看占用了空间的内容,然后回溯调查其他地方。这是一个令人着迷的系统视图,它使你可以以全新的方式看待你的文件。 ![Filelight][8] -(Seth Kenlon, [CC BY-SA 4.0][6]) - 使用 Filelight 或类似的实用程序查找不需要提交的意外数据缓存。例如,KDE 文件索引器(Baloo)生成了大量特定于其主机的数据,我绝对不希望将其传输到另一台计算机。 -### 4\. 不要忽略您的 .gitignore 文件 +### 4、不要忽略你的 `.gitignore` 文件 -在某些项目中,我告诉 Git 忽略我的`.gitignore`文件,因为有时我要忽略的内容特定于我的工作目录,并且我不认为同一项目中的其他开发人员需要我告诉他们的 `.gitignore` 文件的内容应该看起来像什么。因为我的家目录仅供我使用,所以我 _不_ 会忽略我的家目录的 `.gitignore` 文件。我将其与其他重要文件一起提交,因此它已在我的所有系统中被继承。当然,从家目录的角度来看,我所有的系统都是相同的:它们具有相同的默认文件夹集和许多相同的隐藏配置文件。 +在某些项目中,我告诉 Git 忽略我的 `.gitignore` 文件,因为有时我要忽略的内容特定于我的工作目录,并且我不认为同一项目中的其他开发人员需要我告诉他们 `.gitignore` 文件应该是什么样子。因为我的家目录仅供我使用,所以我 _不_ 会忽略我的家目录的 `.gitignore` 文件。我将其与其他重要文件一起提交,因此它已在我的所有系统中被继承。当然,从家目录的角度来看,我所有的系统都是相同的:它们具有一组相同的默认文件夹和许多相同的隐藏配置文件。 -### 5\. 不要担心二进制文件 +### 5、不要担心二进制文件 -我对系统进行了数周的严格测试,确信将二进制文件提交到 Git 是绝对不明智的。我尝试了 GPG 加密的密码文件,尝试了 LibreOffice 文档,JPEG,PNG 等等。我甚至有一个脚本,可以在将 LibreOffice 文件添加到 Git 之前取消存档,然后提取其中的 XML,以便仅提交 XML,然后重新构建 LibreOffice 文件,以便可以在 LibreOffice 中继续工作。我的理论是,提交 XML 会比使用 ZIP 文件(这实际上是 LibreOffice 文档的全部)提供一个更小的 Git 存储库。 +我对我的系统进行了数周的严格测试,确信将二进制文件提交到 Git 绝对不是明智之举。我试过 GPG 加密的密码文件、试过 LibreOffice 文档、JPEG、PNG 等等。我甚至有一个脚本,可以在将 LibreOffice 文件添加到 Git 之前先解压缩,提取其中的 XML,以便仅提交 XML,然后重新构建 LibreOffice 文件,以便可以在 LibreOffice 中继续工作。我的理论是,提交 XML 会比使用 ZIP 文件(LibreOffice 文档实际上就是一个 ZIP 文件)会让 Git 存储库更小一些。 -令我惊讶的是,我发现不时提交一些二进制文件并没有实质性地增加我的 Git 存储库的大小。我使用 Git 已经很长时间了,以至于如果我要提交千兆字节的二进制数据,我的存储库将会遭受损失,但是偶尔的二进制文件并不是不惜一切代价避免的紧急情况。 +令我惊讶的是,我发现偶尔提交一些二进制文件并没有大幅增加我的 Git 存储库的大小。我使用 Git 已经很长时间了,我知道如果我要提交几千兆的二进制数据,我的存储库将会受到影响,但是偶尔提交几个二进制文件也不是不惜一切代价要避免的紧急情况。 -有了这种信心,我将字体 OTF 和 TTF 文件添加到我的标准主存储库,GDM 的`.face`文件以及其他附带的次要二进制 Blob 文件。不要想太多,不要浪费时间去避免它。只需提交即可。 +有了这种信心,我将字体 OTF 和 TTF 文件添加到我的标准主存储库,以及 GDM 的 `.face` 文件以及其他偶尔小型二进制 Blob 文件。不要想太多,不要浪费时间去避免它。只需提交即可。 -### 6\. 使用私有存储库 +### 6、使用私有存储库 -即使主机提供私人帐户,也不要将您的主目录提交到公共 Git 存储库。如果您像我一样,拥有 SSH 密钥,GPG 密钥链和 GPG 加密的文件,这些属于自己的文件不应该出现在任何人的服务器上。 +即使托管方提供了私人帐户,也不要将你的主目录提交到公共 Git 存储库。如果你像我一样,拥有 SSH 密钥、GPG 密钥链和 GPG 加密的文件,这些文件不应该出现在任何人的服务器上,而应该出现在我自己的服务器上。 -我在 Raspberry Pi 上[运行本地 Git 服务器][9](这比您想象的要容易),因此我可以在家里时随时更新任何一台计算机。我是一名远程工作者,所以通常情况下就足够了,但是我也可以通过 [VPN][10] 访问计算机。 +我在树莓派上 [运行本地 Git 服务器][9](这比你想象的要容易),因此我可以在家里时随时更新任何一台计算机。我是一名远程工作者,所以通常情况下就足够了,但是我也可以在旅行时通过 [虚拟私人网络][10] 访问我的计算机。 -### 7\. 要记得推送 +### 7、要记得推送 -关于 Git ,仅当您通知服务器时,它才会将更改推送到您的服务器。如果您是 Git 的长期用户,则此过程可能对您很自然。对于可能习惯于 Nextcloud 或 Syncthing 自动同步的新用户,这可能需要一些时间来适应。 +Git 的特点是,只有当你告诉它要推送改动时,它才会把改动推送到你的服务器上。如果你是 Git 的老用户,则此过程可能对你很自然。对于可能习惯于 Nextcloud 或 Syncthing 自动同步的新用户,这可能需要一些时间来适应。 ### Git 家目录 -使用 Git 管理我的通用文件并没有使跨设备的生活更加便利。知道我对所有配置和实用程序脚本都有完整的历史记录,这会鼓励我尝试新的想法,因为如果结果变得 _很糟糕_,则很容易回滚我的更改。 Git 已将我从在 `.bashrc` 文件欠考虑的掩码设置中解救出来,对于我的软件包管理脚本糟糕的深夜附加物,并且更改 [rxvt][11] 配色方案以及过去的其他一些错误这时看起来像一个很酷的想法。在家(目录)中尝试 Git,因为一起提交的家(目录)会合并在一起。 +使用 Git 管理我的常用文件,不仅使我在不同设备上的生活更加便利。我知道我拥有所有配置和实用程序脚本的完整历史记录,这会鼓励我尝试新的想法,因为如果结果变得 _很糟糕_,则很容易回滚我的更改。Git 曾将我从在 `.bashrc` 文件中一个欠考虑的 `umask` 设置中解救出来、从深夜对包管理脚本的拙劣添加中解救出来、从当时看似很酷的 [rxvt][11] 配色方案的修改中解救出来,也许还有其他一些错误。在家目录中尝试 Git 吧,因为这些提交会让家目录融合在一起。 -------------------------------------------------------------------------------- @@ -118,7 +116,7 @@ via: https://opensource.com/article/21/4/git-home 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[stevenzdg988](https://github.com/stevenzdg988) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From fe92594d4afce25a10e7b5bab65d6334c23d035d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 20 Apr 2021 09:54:05 +0800 Subject: [PATCH 737/818] PUB @stevenzdg988 https://linux.cn/article-13313-1.html --- .../20210405 7 Git tips for managing your home directory.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210405 7 Git tips for managing your home directory.md (99%) diff --git a/translated/tech/20210405 7 Git tips for managing your home directory.md b/published/20210405 7 Git tips for managing your home directory.md similarity index 99% rename from translated/tech/20210405 7 Git tips for managing your home directory.md rename to published/20210405 7 Git tips for managing your home directory.md index 2ea2141134..67d8a3ceea 100644 --- a/translated/tech/20210405 7 Git tips for managing your home directory.md +++ b/published/20210405 7 Git tips for managing your home directory.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (stevenzdg988) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13313-1.html) 7个管理家目录的 Git 技巧 ====== From 70901f10de3ef855c6a7dc6c89e40d87415037f2 Mon Sep 17 00:00:00 2001 From: cooljelly Date: Tue, 20 Apr 2021 10:24:13 +0800 Subject: [PATCH 738/818] translating by cooljelly --- ...10104 Network address translation part 1 - packet tracing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210104 Network address translation part 1 - packet tracing.md b/sources/tech/20210104 Network address translation part 1 - packet tracing.md index 850b4f9e1c..1a2b7b92cb 100644 --- a/sources/tech/20210104 Network address translation part 1 - packet tracing.md +++ b/sources/tech/20210104 Network address translation part 1 - packet tracing.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (cooljelly) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From f98a28abeb4c2c2e20df4862d71fef2c6f57d503 Mon Sep 17 00:00:00 2001 From: RiaXu <1257021170@qq.com> Date: Tue, 20 Apr 2021 10:34:35 +0800 Subject: [PATCH 739/818] Update 20210308 Cast your Android device with a Raspberry Pi.md --- ...your Android device with a Raspberry Pi.md | 76 ++++++++++--------- 1 file changed, 39 insertions(+), 37 deletions(-) diff --git a/sources/tech/20210308 Cast your Android device with a Raspberry Pi.md b/sources/tech/20210308 Cast your Android device with a Raspberry Pi.md index 218bdb488e..c9527e687e 100644 --- a/sources/tech/20210308 Cast your Android device with a Raspberry Pi.md +++ b/sources/tech/20210308 Cast your Android device with a Raspberry Pi.md @@ -2,34 +2,36 @@ [#]: via: (https://opensource.com/article/21/3/android-raspberry-pi) [#]: author: (Sudeshna Sur https://opensource.com/users/sudeshna-sur) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (RiaXu) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) -Cast your Android device with a Raspberry Pi +使用树莓派投射你的安卓设备 ====== -Use Scrcpy to turn your phone screen into an app running alongside your -applications on a Raspberry Pi or any other Linux-based device. +使用Scrcpy可以把你的手机屏幕变成一个应用,与在树莓派或任何其他基于Linux的设备上的应用一起运行。 ![A person looking at a phone][1] -It's hard to stay away from the gadgets we use on a daily basis. In the hustle and bustle of modern life, I want to make sure I don't miss out on the important notifications from friends and family that pop up on my phone screen. I'm also busy and do not want to get lost in distractions, and picking up a phone and replying to messages tends to be distracting. +要远离我们日常使用的电子产品是很难的。在熙熙攘攘的现代生活中,我想确保我不会错过手机屏幕上弹出的来自朋友和家人的重要信息。我很忙而且不希望迷失在令人分心的事情中,但是拿起手机并且恢复信息往往会使我分心。 -To further complicate matters, there are a lot of devices out there. Luckily, most of them, from powerful workstations to laptops and even the humble Raspberry Pi, can run Linux. Because they run Linux, almost every solution I find for one device is a perfect fit for the others. -### One size fits all +更糟糕的是,还有很多其他的设备。幸运地是,大多数的设备(从功能强大的笔记本电脑到甚至不起眼的树莓派)都可以运行Linux。因为它们运行Linux,所以我找到的解决方案几乎都适用于其他设备。 -I wanted a way to unify the different sources of data in my life on whatever screen I am staring at. -I decided to solve this problem by copying my phone's screen onto my computer. In essence, I made my phone into an app running alongside all of my other applications. This helps me keep my attention on my desktop, prevents me from mentally wandering away, and makes it easier for me to reply to urgent notifications. +### 万全之策 -Sound appealing? Here's how you can do it too. +我想要一种无论我使用什么屏幕,都能统一我生活中不同来源的数据的方法。 -### Set up Scrcpy +我决定通过把手机屏幕复制到电脑上来解决这个问题。本质上,我把手机变成了一个应用,可以和其他所有程序运行在一起。这个有助于我将注意力集中在桌面上,防止我走神,并使我更容易回复紧急通知。 -[Scrcpy][2], commonly known as Screen Copy, is an open source screen-mirroring tool that displays and controls Android devices from Linux, Windows, or macOS. Communication between the Android device and the computer is primarily done over a USB connection and Android Debug Bridge (ADB). It uses TCP/IP and does not require any root access. +听起来有吸引力吗?你也可以这样做。 -Scrcpy's setup and configuration are very easy. If you're running Fedora, you can install it from a Copr repository: +### 设置Scrcpy + +[Scrcpy][2], 通常被称为屏幕复制(Screen Copy),是一个开源屏幕镜像工具,它可以在Linux、Windows或者MacOS上显示和控制安卓设备。安卓设备和计算机之间的通信主要是通过USB连接和安卓调试桥(Android Debug Bridge, ADB)。它使用TCP/IP,且不需要root权限访问。 + + +Scrcpy的设置和配置非常简单。如果你正在运行Fedora,你可以从Copr仓库安装它: ``` @@ -37,32 +39,32 @@ $ sudo dnf copr enable zeno/scrcpy $ sudo dnf install scrcpy -y ``` -On Debian or Ubuntu: +在Debian或者Ubuntu上: ``` `$ sudo apt install scrcpy` ``` -You can also compile scrcpy yourself. It doesn't take long to build, even on a Raspberry Pi, using the instructions on [scrcpy's GitHub page][3]. +你也可以自己编译Scrcpy。即使是在树莓派上,使用[Scrcpy的Github主页][3]上的说明来构建也不需要很长时间。 -### Set up the phone +### 设置手机 -Once scrcpy is installed, you must enable USB debugging and authorize each device (your Raspberry Pi, laptop, or workstation) as a trusted controller. +Scrcpy安装好后,你必须启用USB调试并授权每个设备(你的树莓派、笔记本电脑或者工作站)为受信任的控制器。 -Open the **Settings** app on your Android and scroll down to **Developer options.** If Developer options is not activated, follow Android's [instructions to unlock it][4]. +打开安卓上的**设置**应用程序。如果**开发者选项**没有被激活,按照安卓的[说明来解锁它][4]。 -Next, enable **USB debugging**. +接下来,启用**USB调试**。 ![Enable USB Debugging option][5] (Sudeshna Sur, [CC BY-SA 4.0][6]) -Then connect the phone to your Raspberry Pi or laptop (or whatever device you're using) over USB and set the mode to [PTP][7], if that's an option. If your phone doesn't use PTP, set the mode your phone uses for transferring files (rather than, for instance, serving as a tethering or MIDI device). +然后通过USB将手机连接到你的树莓派或者笔记本电脑(或者你正在使用的任何设备),如果可以选择的话,将模式设置为[PTP][7]。如果你的手机不能使用PTP,将你的手机设置为用于传输文件的模式(而不是,如,作为一个捆绑或者MIDI设备)。 -Your phone will probably prompt you to authorize your computer, identified by its RSA fingerprint. You only have to do this the first time you connect; after that, your phone will recognize and trust your computer. +你的手机可能会提示你授权你的电脑,这个是会通过它的RSA指纹进行识别的。你只需要在你第一次连接的时候操作即可,在之后你的手机会识别并信任你的计算机。 -Confirm the setting with the `lsusb` command: +使用`lsusb`命令确认设置: ``` @@ -77,53 +79,53 @@ Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub ``` -Then execute `$ scrcpy` to launch it with the default settings. +然后执行`$scrcpy`在默认设置下运行。 ![Scrcpy running on a Raspberry Pi][8] (Opensource.com, [CC BY-SA 4.0][6]) -Performance and responsiveness vary depending on what device you're using to control your mobile. On a Pi, some of the animations can be slow, and even the response sometimes lags. Scrcpy provides an easy fix for this: Reducing the bitrate and resolution of the image scrcpy displays makes it easier for your computer to keep up. Do this with: +性能和响应能力取决于你使用什么设备来控制你的手机。在一个派上,一些动画可能会变慢,甚至有时候会响应滞后。Scrcpy提供了一个简单的解决办法:降低scrcpy显示的图像的位速率和分辨率使得你的计算机能够容易显示动画。使用以下命令来实现: ``` `$ scrcpy --bit-rate 1M --max-size 800` ``` -Try different values to find the one you prefer. To make it easier to type, once you've settled on a command, consider [making your own Bash alias][9]. +尝试不同的值来找到一个适合你的值。为了使键入更方便,在选定一个命令之后,可以考虑[创建自己的Bash别名][9]。 -### Cut the cord +### 冲破束缚 -Once scrcpy is running, you can even connect your mobile and your computer over WiFi. The scrcpy installation process also installs `adb`, a command to communicate with Android devices. Scrcpy also uses this command to communicate with your device and `adb` can connect over TCP/IP. +一旦Scrcpy开始运行,你甚至可以通过WIFI连接你的手机和计算机。Scrcpy安装过程也会安装`adb`,它是一个完成安卓设备之间通信的命令。Scrcpy也可以使用这个命令与设备通信,`adb`可以通过TCP/IP连接。 ![Scrcpy running on a computer][10] (Sudeshna Sur, [CC BY-SA 4.0][6]) -To try it, make sure your phone is connected over WiFi on the same wireless network your computer is using. Do NOT disconnect your phone from USB yet! +试试吧,请确保你的手机通过WIFI连在与你的计算机所使用的相同的无线网络上。依然不要断开你的手机与USB的连接! -Next, get your phone's IP address by navigating to **Settings** and selecting **About phone**. Look at the **Status** option to get your address. It usually starts with 192.168 or 10. +接下来,通过手机中的**设置**,选择**关于手机**来获取你手机的IP地址。查看**状态**选项来获得你的地址。它通常是192.168或者10开头。 -Alternately, you can get your mobile's IP address using `adb`: +或者,你也可以使用`adb`来获得你手机的IP地址: ``` $ adb shell ip route | awk '{print $9}' -To connect to your device over WiFi, you must enable TCP/IP connections. This, you must do through the adb command: +为了通过WIFI连接你的设备,你必须打开TCP/IP连接。也就是说你必须通过adb命令: $ adb tcpip 5555 -Now you can disconnect your mobile from USB. -Whenever you want to connect over WiFi, first connect to the mobile with the command adb connect. For instance, assuming my mobile's IP address is 10.1.1.22, the command is: +现在你可以断开手机和USB的连接了。 +任何你想通过WIFI连接的时候,首先需要通过adb命令连接你的手机。例如,假设我的手机IP地址是10.1.1.22,命令如下: $ adb connect 10.1.1.22:5555 ``` -Once it's connected, you can run scrcpy as usual. +连接好之后,你就可以像往常一样运行Scrcpy了。 -### Remote control +### 远程控制 -Scrcpy is easy to use. You can try it in a terminal or as [a GUI application][11]. +Scrcpy很容易使用。你可以在终端或者[一个图形界面应用][11]中尝试它。 -Do you use another screen-mirroring application? If so, let us know about it in the comments. +你是否在使用另一个屏幕镜像?如果有的话,请在评论中告诉我们吧。 -------------------------------------------------------------------------------- From 9806ea3b8a4d6ece71941ab5046e823290eb3ce7 Mon Sep 17 00:00:00 2001 From: RiaXu <1257021170@qq.com> Date: Tue, 20 Apr 2021 10:35:21 +0800 Subject: [PATCH 740/818] Rename sources/tech/20210308 Cast your Android device with a Raspberry Pi.md to translated/tech/20210308 Cast your Android device with a Raspberry Pi.md --- .../tech/20210308 Cast your Android device with a Raspberry Pi.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20210308 Cast your Android device with a Raspberry Pi.md (100%) diff --git a/sources/tech/20210308 Cast your Android device with a Raspberry Pi.md b/translated/tech/20210308 Cast your Android device with a Raspberry Pi.md similarity index 100% rename from sources/tech/20210308 Cast your Android device with a Raspberry Pi.md rename to translated/tech/20210308 Cast your Android device with a Raspberry Pi.md From 0e26858497c8053a783543e019324fbb4727037f Mon Sep 17 00:00:00 2001 From: "Qian.Sun" Date: Tue, 20 Apr 2021 12:05:04 +0800 Subject: [PATCH 741/818] translating by DCOLIVERSUN --- ...Something bugging you in Fedora Linux- Let-s get it fixed.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210419 Something bugging you in Fedora Linux- Let-s get it fixed.md b/sources/tech/20210419 Something bugging you in Fedora Linux- Let-s get it fixed.md index 312a0c4b1b..bf3bc428bd 100644 --- a/sources/tech/20210419 Something bugging you in Fedora Linux- Let-s get it fixed.md +++ b/sources/tech/20210419 Something bugging you in Fedora Linux- Let-s get it fixed.md @@ -2,7 +2,7 @@ [#]: via: (https://fedoramagazine.org/something-bugging-you-in-fedora-linux-lets-get-it-fixed/) [#]: author: (Matthew Miller https://fedoramagazine.org/author/mattdm/) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (DCOLIVERSUN) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 0fd3859204642b6d7c4e733a2137df9f09063a45 Mon Sep 17 00:00:00 2001 From: stevenzdg988 <3442417@qq.com> Date: Tue, 20 Apr 2021 13:23:47 +0800 Subject: [PATCH 742/818] =?UTF-8?q?=E7=94=B3=E9=A2=86=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...orum Software That You Can Deploy on Your Linux Servers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md b/sources/tech/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md index 7f9aa7f892..431f3041e2 100644 --- a/sources/tech/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md +++ b/sources/tech/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (stevenzdg988) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -179,7 +179,7 @@ via: https://itsfoss.com/open-source-forum-software/ 作者:[Ankush Das][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[stevenzdg988](https://github.com/stevenzdg988) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 1a47a36ea6c0fcc287d98ca97a8294a2318ed35b Mon Sep 17 00:00:00 2001 From: tt67wq Date: Tue, 20 Apr 2021 14:46:20 +0800 Subject: [PATCH 743/818] translate done: 20200617 How to handle dynamic and static libraries in Linux.md --- ...e dynamic and static libraries in Linux.md | 298 ----------------- ...e dynamic and static libraries in Linux.md | 299 ++++++++++++++++++ 2 files changed, 299 insertions(+), 298 deletions(-) delete mode 100644 sources/tech/20200617 How to handle dynamic and static libraries in Linux.md create mode 100644 translated/tech/20200617 How to handle dynamic and static libraries in Linux.md diff --git a/sources/tech/20200617 How to handle dynamic and static libraries in Linux.md b/sources/tech/20200617 How to handle dynamic and static libraries in Linux.md deleted file mode 100644 index 24cce91127..0000000000 --- a/sources/tech/20200617 How to handle dynamic and static libraries in Linux.md +++ /dev/null @@ -1,298 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (tt67wq) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to handle dynamic and static libraries in Linux) -[#]: via: (https://opensource.com/article/20/6/linux-libraries) -[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99) - -How to handle dynamic and static libraries in Linux -====== -Knowing how Linux uses libraries, including the difference between -static and dynamic linking, can help you fix dependency problems. -![Hand putting a Linux file folder into a drawer][1] - -Linux, in a way, is a series of static and dynamic libraries that depend on each other. For new users of Linux-based systems, the whole handling of libraries can be a mystery. But with experience, the massive amount of shared code built into the operating system can be an advantage when writing new applications. - -To help you get in touch with this topic, I prepared a small [application example][2] that shows the most common methods that work on common Linux distributions (these have not been tested on other systems). To follow along with this hands-on tutorial using the example application, open a command prompt and type: - - -``` -$ git clone -$ cd library_sample/ -$ make -cc -c main.c -Wall -Werror -cc -c libmy_static_a.c -o libmy_static_a.o -Wall -Werror -cc -c libmy_static_b.c -o libmy_static_b.o -Wall -Werror -ar -rsv libmy_static.a libmy_static_a.o libmy_static_b.o -ar: creating libmy_static.a -a - libmy_static_a.o -a - libmy_static_b.o -cc -c -fPIC libmy_shared.c -o libmy_shared.o -cc -shared -o libmy_shared.so libmy_shared.o -$ make clean -rm *.o -``` - -After executing these commands, these files should be added to the directory (run `ls` to see them): - - -``` -my_app -libmy_static.a -libmy_shared.so -``` - -### About static linking - -When your application links against a static library, the library's code becomes part of the resulting executable. This is performed only once at linking time, and these static libraries usually end with a `.a` extension. - -A static library is an archive ([ar][3]) of object files. The object files are usually in the ELF format. ELF is short for [Executable and Linkable Format][4], which is compatible with many operating systems. - -The output of the `file` command tells you that the static library `libmy_static.a` is the `ar` archive type: - - -``` -$ file libmy_static.a -libmy_static.a: current ar archive -``` - -With `ar -t`, you can look into this archive; it shows two object files: - - -``` -$ ar -t libmy_static.a -libmy_static_a.o -libmy_static_b.o -``` - -You can extract the archive's files with `ar -x `. The extracted files are object files in ELF format: - - -``` -$ ar -x libmy_static.a -$ file libmy_static_a.o -libmy_static_a.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped -``` - -### About dynamic linking - -Dynamic linking means the use of shared libraries. Shared libraries usually end with `.so` (short for "shared object"). - -Shared libraries are the most common way to manage dependencies on Linux systems. These shared resources are loaded into memory before the application starts, and when several processes require the same library, it will be loaded only once on the system. This feature saves on memory usage by the application. - -Another thing to note is that when a bug is fixed in a shared library, every application that references this library will profit from it. This also means that if the bug remains undetected, each referencing application will suffer from it (if the application uses the affected parts). - -It can be very hard for beginners when an application requires a specific version of the library, but the linker only knows the location of an incompatible version. In this case, you must help the linker find the path to the correct version. - -Although this is not an everyday issue, understanding dynamic linking will surely help you in fixing such problems. - -Fortunately, the mechanics for this are quite straightforward. - -To detect which libraries are required for an application to start, you can use `ldd`, which will print out the shared libraries used by a given file: - - -``` -$ ldd my_app -        linux-vdso.so.1 (0x00007ffd1299c000) -        libmy_shared.so => not found -        libc.so.6 => /lib64/libc.so.6 (0x00007f56b869b000) -        /lib64/ld-linux-x86-64.so.2 (0x00007f56b8881000) -``` - -Note that the library `libmy_shared.so` is part of the repository but is not found. This is because the dynamic linker, which is responsible for loading all dependencies into memory before executing the application, cannot find this library in the standard locations it searches. - -Errors associated with linkers finding incompatible versions of common libraries (like `bzip2`, for example) can be quite confusing for a new user. One way around this is to add the repository folder to the environment variable `LD_LIBRARY_PATH` to tell the linker where to look for the correct version. In this case, the right version is in this folder, so you can export it: - - -``` -$ LD_LIBRARY_PATH=$(pwd):$LD_LIBRARY_PATH -$ export LD_LIBRARY_PATH -``` - -Now the dynamic linker knows where to find the library, and the application can be executed. You can rerun `ldd` to invoke the dynamic linker, which inspects the application's dependencies and loads them into memory. The memory address is shown after the object path: - - -``` -$ ldd my_app -        linux-vdso.so.1 (0x00007ffd385f7000) -        libmy_shared.so => /home/stephan/library_sample/libmy_shared.so (0x00007f3fad401000) -        libc.so.6 => /lib64/libc.so.6 (0x00007f3fad21d000) -        /lib64/ld-linux-x86-64.so.2 (0x00007f3fad408000) -``` - -To find out which linker is invoked, you can use `file`: - - -``` -$ file my_app -my_app: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=26c677b771122b4c99f0fd9ee001e6c743550fa6, for GNU/Linux 3.2.0, not stripped -``` - -The linker `/lib64/ld-linux-x86–64.so.2` is a symbolic link to `ld-2.30.so`, which is the default linker for my Linux distribution: - - -``` -$ file /lib64/ld-linux-x86-64.so.2 -/lib64/ld-linux-x86-64.so.2: symbolic link to ld-2.31.so -``` - -Looking back to the output of `ldd`, you can also see (next to `libmy_shared.so`) that each dependency ends with a number (e.g., `/lib64/libc.so.6`). The usual naming scheme of shared objects is: - - -``` -`**lib** XYZ.so **.** . ****` -``` - -On my system, `libc.so.6` is also a symbolic link to the shared object `libc-2.30.so` in the same folder: - - -``` -$ file /lib64/libc.so.6 -/lib64/libc.so.6: symbolic link to libc-2.31.so -``` - -If you are facing the issue that an application will not start because the loaded library has the wrong version, it is very likely that you can fix this issue by inspecting and rearranging the symbolic links or specifying the correct search path (see "The dynamic loader: ld.so" below). - -For more information, look on the [`ldd` man page][5]. - -#### Dynamic loading - -Dynamic loading means that a library (e.g., a `.so` file) is loaded during a program's runtime. This is done using a certain programming scheme. - -Dynamic loading is applied when an application uses plugins that can be modified during runtime. - -See the [`dlopen` man page][6] for more information. - -#### The dynamic loader: ld.so - -On Linux, you mostly are dealing with shared objects, so there must be a mechanism that detects an application's dependencies and loads them into memory. - -`ld.so` looks for shared objects in these places in the following order: - - 1. The relative or absolute path in the application (hardcoded with the `-rpath` compiler option on GCC) - 2. In the environment variable `LD_LIBRARY_PATH` - 3. In the file `/etc/ld.so.cache` - - - -Keep in mind that adding a library to the systems library archive `/usr/lib64` requires administrator privileges. You could copy `libmy_shared.so` manually to the library archive and make the application work without setting `LD_LIBRARY_PATH`: - - -``` -unset LD_LIBRARY_PATH -sudo cp libmy_shared.so /usr/lib64/ -``` - -When you run `ldd`, you can see the path to the library archive shows up now: - - -``` -$ ldd my_app -        linux-vdso.so.1 (0x00007ffe82fab000) -        libmy_shared.so => /lib64/libmy_shared.so (0x00007f0a963e0000) -        libc.so.6 => /lib64/libc.so.6 (0x00007f0a96216000) -        /lib64/ld-linux-x86-64.so.2 (0x00007f0a96401000) -``` - -### Customize the shared library at compile time - -If you want your application to use your shared libraries, you can specify an absolute or relative path during compile time. - -Modify the makefile (line 10) and recompile the program by invoking `make -B` . Then, the output of `ldd` shows `libmy_shared.so` is listed with its absolute path. - -Change this: - - -``` -`CFLAGS =-Wall -Werror -Wl,-rpath,$(shell pwd)` -``` - -To this (be sure to edit the username): - - -``` -`CFLAGS =/home/stephan/library_sample/libmy_shared.so` -``` - -Then recompile: - - -``` -`$ make` -``` - -Confirm it is using the absolute path you set, which you can see on line 2 of the output: - - -``` -$ ldd my_app -    linux-vdso.so.1 (0x00007ffe143ed000) -        libmy_shared.so => /lib64/libmy_shared.so (0x00007fe50926d000) -        /home/stephan/library_sample/libmy_shared.so (0x00007fe509268000) -        libc.so.6 => /lib64/libc.so.6 (0x00007fe50909e000) -        /lib64/ld-linux-x86-64.so.2 (0x00007fe50928e000) -``` - -This is a good example, but how would this work if you were making a library for others to use? New library locations can be registered by writing them to `/etc/ld.so.conf` or creating a `.conf` file containing the location under `/etc/ld.so.conf.d/`. Afterward, `ldconfig` must be executed to rewrite the `ld.so.cache` file. This step is sometimes necessary after you install a program that brings some special shared libraries with it. - -See the [`ld.so` man page][7] for more information. - -### How to handle multiple architectures - -Usually, there are different libraries for the 32-bit and 64-bit versions of applications. The following list shows their standard locations for different Linux distributions: - -**Red Hat family** - - * 32 bit: `/usr/lib` - * 64 bit: `/usr/lib64` - - - -**Debian family** - - * 32 bit: `/usr/lib/i386-linux-gnu` - * 64 bit: `/usr/lib/x86_64-linux-gnu` - - - -**Arch Linux family** - - * 32 bit: `/usr/lib32` - * 64 bit: `/usr/lib64` - - - -[**FreeBSD**][8] (technical not a Linux distribution) - - * 32bit: `/usr/lib32` - * 64bit: `/usr/lib` - - - -Knowing where to look for these key libraries can make broken library links a problem of the past. - -While it may be confusing at first, understanding dependency management in Linux libraries is a way to feel in control of the operating system. Run through these steps with other applications to become familiar with common libraries, and continue to learn how to fix any library challenges that could come up along your way. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/linux-libraries - -作者:[Stephan Avenwedde][a] -选题:[lujun9972][b] -译者:[tt67wq](https://github.com/tt67wq) -校对:[校对者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/yearbook-haff-rx-linux-file-lead_0.png?itok=-i0NNfDC (Hand putting a Linux file folder into a drawer) -[2]: https://github.com/hANSIc99/library_sample -[3]: https://en.wikipedia.org/wiki/Ar_%28Unix%29 -[4]: https://linuxhint.com/understanding_elf_file_format/ -[5]: https://www.man7.org/linux/man-pages/man1/ldd.1.html -[6]: https://www.man7.org/linux/man-pages/man3/dlopen.3.html -[7]: https://www.man7.org/linux/man-pages/man8/ld.so.8.html -[8]: https://opensource.com/article/20/5/furybsd-linux diff --git a/translated/tech/20200617 How to handle dynamic and static libraries in Linux.md b/translated/tech/20200617 How to handle dynamic and static libraries in Linux.md new file mode 100644 index 0000000000..bc951369bb --- /dev/null +++ b/translated/tech/20200617 How to handle dynamic and static libraries in Linux.md @@ -0,0 +1,299 @@ +[#]: collector: (lujun9972) +[#]: translator: (tt67wq) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to handle dynamic and static libraries in Linux) +[#]: via: (https://opensource.com/article/20/6/linux-libraries) +[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99) + +怎样在 Linux 中处理动态和静态库 +====== +了解 Linux 如何使用库,包括静态库和动态库的差别,有助于你解决依赖问题。![Hand putting a Linux file folder into a drawer][1] + +Linux 从某种意义上来说就是一堆相互依赖的静态和动态库。对于 Linux 系统新手来说,库的整个处理过程简直是个迷。但对有经验的人来说,被构建进操作系统的大量共享代码对于编写新应用来说却是个优点。 + + +为了让你熟悉这个话题,我准备了一个小巧的[应用例子 ][2] 来展示在常用 Linux 发行版(在其他操作系统上未验证)上最常用的可行方法。为了用这个例子来跟上这个需要动手的教程,打开命令行输入: + + +``` +$ git clone +$ cd library_sample/ +$ make +cc -c main.c -Wall -Werror +cc -c libmy_static_a.c -o libmy_static_a.o -Wall -Werror +cc -c libmy_static_b.c -o libmy_static_b.o -Wall -Werror +ar -rsv libmy_static.a libmy_static_a.o libmy_static_b.o +ar: creating libmy_static.a +a - libmy_static_a.o +a - libmy_static_b.o +cc -c -fPIC libmy_shared.c -o libmy_shared.o +cc -shared -o libmy_shared.so libmy_shared.o +$ make clean +rm *.o +``` + +当执行完这些命令,这些文件应当被添加进目录下(执行 `ls` 来查看): + + +``` +my_app +libmy_static.a +libmy_shared.so +``` + +### 关于静态链接 + +当你的应用链接了一个静态库,这个库的代码就变成了可执行结果的一部分。这个动作只在链接过程中执行一次,这些静态库通常以 `.a` 扩展符结尾。 + +静态库是多个对象文件的打包。这些目标文件通常是 ELF 格式的。ELF 是 [Executable and Linkable Format][4] 的简写,可以兼容多个操作系统。 + +`file` 命令的输出告诉你静态库 `libmy_static.a` 是 `ar` 格式的压缩文件类型。 + + +``` +$ file libmy_static.a +libmy_static.a: current ar archive +``` + +使用 `ar -t`,你可以看到压缩包内部;它展示了两个目标文件: + + +``` +$ ar -t libmy_static.a +libmy_static_a.o +libmy_static_b.o +``` + +你可以用 `ax -x ` 命令来提取压缩包的文件。被提出的都是 ELF 格式的对象文件: + + +``` +$ ar -x libmy_static.a +$ file libmy_static_a.o +libmy_static_a.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped +``` + +### 关于动态链接 + +动态链接的指的是使用共享库。共享库通常以 `.so` 的扩展符结尾 ("shared object" 的简写)。 + +共享库是 Linux 系统中依赖管理最常用的方法。这些共享库在应用启动前被载入内存,当多个应用都需要同一个库时,这个库在系统中只会被加载一次。这个特点减少了应用的内存占用。 + +另外一个值得注意的点是,当一个共享库的 bug 被修复后,所有引用了这个库的应用都会受益。这也意味着,如果一个 bug 还没被发现,那所有相关的应用都会遭受这个 bug 影响(如果这个应用使用了受影响的部分)。 + +当一个应用需要某个特定版本的库,但是链接器只知道某个不兼容版本的位置,对于初学者来说这个问题非常棘手。在这个场景下,你必须帮助链接器找到正确版本的路径。 + +尽管这不是一个需要每天处理的问题,但是理解动态链接的原理总是有助于你修复类似的问题。 + +幸运的是,动态链接的机制其实非常简洁明了。 + +为了检查一个应用在启动时需要哪些库,你可以使用 `ldd` 命令,它会打印出给定文件所需的动态库: + + +``` +$ ldd my_app +        linux-vdso.so.1 (0x00007ffd1299c000) +        libmy_shared.so => not found +        libc.so.6 => /lib64/libc.so.6 (0x00007f56b869b000) +        /lib64/ld-linux-x86-64.so.2 (0x00007f56b8881000) +``` + +注意到 `libmy_shared.so` 库是代码仓库的一部分但是没有被找到。这是因为负责在应用启动之前将所有依赖加载进内存的动态链接器没有在它搜索的标准路径下找到这个库。 + +对新手来说,与常用库(例如 `bizp2`) 版本不兼容相关的问题往往十分令人困惑。一种方法是把该仓库的路径加入到环境变量 `LD_LIBRARY_PATH` 中来告诉链接器去哪里找到正确的版本。在本例中,正确的版本就在这个目录下,所以你可以导出它至环境变量: + + +``` +$ LD_LIBRARY_PATH=$(pwd):$LD_LIBRARY_PATH +$ export LD_LIBRARY_PATH +``` + +现在动态链接器知道去哪找库了,应用也可以执行了。你可以再次执行 `ldd` 去调用动态链接器,它会检查应用的依赖然后加载进内存。内存地址会在对象路径后展示: + + +``` +$ ldd my_app +        linux-vdso.so.1 (0x00007ffd385f7000) +        libmy_shared.so => /home/stephan/library_sample/libmy_shared.so (0x00007f3fad401000) +        libc.so.6 => /lib64/libc.so.6 (0x00007f3fad21d000) +        /lib64/ld-linux-x86-64.so.2 (0x00007f3fad408000) +``` + +想知道哪个链接器被调用了,你可以用 `file` 命令: + + + +``` +$ file my_app +my_app: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=26c677b771122b4c99f0fd9ee001e6c743550fa6, for GNU/Linux 3.2.0, not stripped +``` + +链接器 `/lib64/ld-linux-x86–64.so.2` 是一个指向 `ld-2.30.so` 的软链接,它也是我的 Linux 发行版的默认链接器: + + +``` +$ file /lib64/ld-linux-x86-64.so.2 +/lib64/ld-linux-x86-64.so.2: symbolic link to ld-2.31.so +``` + +回头看看 `ldd` 命令的输出,你还可以看到(在 `libmy_shared.so` 边上)每个依赖都以一个数字结尾(例如 `/lib64/libc.so.6`)。共享对象的常见命名格式为: + + +``` +`**lib** XYZ.so **.** . ****` +``` + +在我的系统中,`libc.so.6` 也是指向同一目录下的共享对象 `libc-2.30.so` 的软链接。 + + +``` +$ file /lib64/libc.so.6 +/lib64/libc.so.6: symbolic link to libc-2.31.so +``` + +如果你正在面对一个应用因为加载库的版本不对导致无法启动的问题,有很大可能你可以通过检查整理这些软链接或者确定正确的搜索路径(查看下方"动态链接器:ld.so") 来解决这个问题。 + +更为详细的信息请查看 [`ldd`man 手册 ][5] + +#### 动态加载 + +动态加载的意思是一个库(例如一个 `.so` 文件)在程序的运行时被加载。这是使用某种特定的编程方法实现的。 + +当一个应用使用运行时可编辑的插件时,动态加载会生效。 + +查看 [`dlopen`man 手册 ][6] 获取更多信息。 + +#### 动态加载器:ld.so + +在 Linux 系统中,你很大可能正在跟共享库打交道,所以必须有个机制来检测一个应用的依赖并将其加载进内存中。 + + +`ld.so` 按以下顺序在这些地方寻找共享对象: + + 1。应用的绝对路径或相对路径下 (GCC 编译器用 `-rpath` 选项来硬编码) + 2。环境变量 `LD_LIBRARY_PATH` + 3。`/etc/ld.so.cache` 文件 + + +需要记住的是,将一个库加到系统归档 `/usr/lib64` 中需要管理员权限。你可以手动拷贝 `libmy_shared.so` 至库归档中来让应用可用而避免设置 `LD_LIBRARY_PATH`。 + + +``` +unset LD_LIBRARY_PATH +sudo cp libmy_shared.so /usr/lib64/ +``` + + +当你运行 `ldd` 时,你现在可以看到归档库的路径被展示出来: + + +``` +$ ldd my_app +        linux-vdso.so.1 (0x00007ffe82fab000) +        libmy_shared.so => /lib64/libmy_shared.so (0x00007f0a963e0000) +        libc.so.6 => /lib64/libc.so.6 (0x00007f0a96216000) +        /lib64/ld-linux-x86-64.so.2 (0x00007f0a96401000) +``` + +### 在编译时定制共享库 + +如果你想你的应用使用你的共享库,你可以在编译时指定一个绝对或相对路径。 + +编辑 makefile( 第 10 行)然后通过 `make -B` 来重新编译程序。然后 `ldd` 输出显示 `libmy_shared.so` 和它的绝对路径一起被列出来了。 + +把这个: + + +``` +`CFLAGS =-Wall -Werror -Wl,-rpath,$(shell pwd)` +``` + +改成这个(记得修改用户名): + + +``` +`CFLAGS =/home/stephan/library_sample/libmy_shared.so` +``` + +然后重新编译: + + +``` +`$ make` +``` + +确认下它正在使用你设定的绝对路径,你可以在输出的第二行看到: + + +``` +$ ldd my_app +    linux-vdso.so.1 (0x00007ffe143ed000) +        libmy_shared.so => /lib64/libmy_shared.so (0x00007fe50926d000) +        /home/stephan/library_sample/libmy_shared.so (0x00007fe509268000) +        libc.so.6 => /lib64/libc.so.6 (0x00007fe50909e000) +        /lib64/ld-linux-x86-64.so.2 (0x00007fe50928e000) +``` + +这是个不错的例子,但是如果你在编写给其他人用的库,它是怎样工作的呢?新库的路径可以通过写入 `/etc/ld.so.conf` 或是在 `/etc/ld.so.conf.d/` 目录下创建一个包含路径的 `.conf` 文件来注册至系统。之后,你必须执行 `ldconfig` 命令来覆写 `ld.so.cache` 文件。这一步有时候在你装了携带特殊的共享库的程序来说是不可省略的。 + +查看 [`ld.so` 的 man 手册 ][7] 获取更多详细信息。 + +### 怎样处理多种架构 + +通常来说,32 位和 64 位版本的应用有不同的库。下面列表展示了不同 Linux 发行版库的标准路径: + +**红帽家族** + + * 32 位:`/usr/lib` + * 64 位:`/usr/lib64` + + + +**Debian 家族** + + * 32 位:`/usr/lib/i386-linux-gnu` + * 64 位:`/usr/lib/x86_64-linux-gnu` + + + +**Arch Linux 家族** + + * 32 位:`/usr/lib32` + * 64 位:`/usr/lib64` + + + +[**FreeBSD**][8] (技术上来说不算 Linux 发行版) + + * 32 位:`/usr/lib32` + * 64 位:`/usr/lib` + + + +知道去哪找这些关键库可以让库链接失效的问题成为历史。 + +虽然刚开始会有点困惑,但是理解 Linux 库的依赖管理是一种对操作系统掌控感的表现。用其他应用按这些步骤执行下来增加常用库的熟练度,然后继续学习怎样解决任何你可能遇到的库的挑战。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/6/linux-libraries + +作者:[Stephan Avenwedde][a] +选题:[lujun9972][b] +译者:[tt67wq](https://github.com/tt67wq) +校对:[校对者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/yearbook-haff-rx-linux-file-lead_0.png?itok=-i0NNfDC (Hand putting a Linux file folder into a drawer) +[2]: https://github.com/hANSIc99/library_sample +[3]: https://en.wikipedia.org/wiki/Ar_%28Unix%29 +[4]: https://linuxhint.com/understanding_elf_file_format/ +[5]: https://www.man7.org/linux/man-pages/man1/ldd.1.html +[6]: https://www.man7.org/linux/man-pages/man3/dlopen.3.html +[7]: https://www.man7.org/linux/man-pages/man8/ld.so.8.html +[8]: https://opensource.com/article/20/5/furybsd-linux From 74b07b40cb74dee7f44e98af44af3dc41d681690 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 20 Apr 2021 16:24:29 +0800 Subject: [PATCH 744/818] PRF @RiaXu --- ...your Android device with a Raspberry Pi.md | 86 ++++++++----------- 1 file changed, 37 insertions(+), 49 deletions(-) diff --git a/translated/tech/20210308 Cast your Android device with a Raspberry Pi.md b/translated/tech/20210308 Cast your Android device with a Raspberry Pi.md index c9527e687e..fc88271808 100644 --- a/translated/tech/20210308 Cast your Android device with a Raspberry Pi.md +++ b/translated/tech/20210308 Cast your Android device with a Raspberry Pi.md @@ -3,69 +3,63 @@ [#]: author: (Sudeshna Sur https://opensource.com/users/sudeshna-sur) [#]: collector: (lujun9972) [#]: translator: (RiaXu) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) -使用树莓派投射你的安卓设备 +将你的安卓手机屏幕投射到 Linux ====== -使用Scrcpy可以把你的手机屏幕变成一个应用,与在树莓派或任何其他基于Linux的设备上的应用一起运行。 -![A person looking at a phone][1] -要远离我们日常使用的电子产品是很难的。在熙熙攘攘的现代生活中,我想确保我不会错过手机屏幕上弹出的来自朋友和家人的重要信息。我很忙而且不希望迷失在令人分心的事情中,但是拿起手机并且恢复信息往往会使我分心。 +> 使用 Scrcpy 可以把你的手机屏幕变成一个“应用”,与在树莓派或任何其他基于 Linux 的设备上的应用一起运行。 +![](https://img.linux.net.cn/data/attachment/album/202104/20/162346alpbh85xz26xcb5h.jpg) -更糟糕的是,还有很多其他的设备。幸运地是,大多数的设备(从功能强大的笔记本电脑到甚至不起眼的树莓派)都可以运行Linux。因为它们运行Linux,所以我找到的解决方案几乎都适用于其他设备。 +要远离我们日常使用的电子产品是很难的。在熙熙攘攘的现代生活中,我想确保我不会错过手机屏幕上弹出的来自朋友和家人的重要信息。我也很忙,不希望迷失在令人分心的事情中,但是拿起手机并且回复信息往往会使我分心。 +更糟糕的是,有很多的设备。幸运地是,大多数的设备(从功能强大的笔记本电脑到甚至不起眼的树莓派)都可以运行 Linux。因为它们运行的是 Linux,所以我为一种设置找到的解决方案几乎都适用于其他设备。 -### 万全之策 +### 普遍适用 我想要一种无论我使用什么屏幕,都能统一我生活中不同来源的数据的方法。 -我决定通过把手机屏幕复制到电脑上来解决这个问题。本质上,我把手机变成了一个应用,可以和其他所有程序运行在一起。这个有助于我将注意力集中在桌面上,防止我走神,并使我更容易回复紧急通知。 +我决定通过把手机屏幕复制到电脑上来解决这个问题。本质上,我把手机变成了一个“应用”,可以和我所有的其他程序运行在一起。这有助于我将注意力集中在桌面上,防止我走神,并使我更容易回复紧急通知。 听起来有吸引力吗?你也可以这样做。 -### 设置Scrcpy +### 设置 Scrcpy -[Scrcpy][2], 通常被称为屏幕复制(Screen Copy),是一个开源屏幕镜像工具,它可以在Linux、Windows或者MacOS上显示和控制安卓设备。安卓设备和计算机之间的通信主要是通过USB连接和安卓调试桥(Android Debug Bridge, ADB)。它使用TCP/IP,且不需要root权限访问。 - - -Scrcpy的设置和配置非常简单。如果你正在运行Fedora,你可以从Copr仓库安装它: +[Scrcpy][2] 俗称屏幕复制(Screen Copy),是一个开源的屏幕镜像工具,它可以在 Linux、Windows 或者 macOS 上显示和控制安卓设备。安卓设备和计算机之间的通信主要是通过 USB 连接和安卓调试桥Android Debug Bridge(ADB)。它使用 TCP/IP,且不需要 root 权限访问。 +Scrcpy 的设置和配置非常简单。如果你正在运行 Fedora,你可以从 COPR 仓库安装它: ``` $ sudo dnf copr enable zeno/scrcpy $ sudo dnf install scrcpy -y ``` -在Debian或者Ubuntu上: - +在 Debian 或者 Ubuntu 上: ``` -`$ sudo apt install scrcpy` +$ sudo apt install scrcpy ``` -你也可以自己编译Scrcpy。即使是在树莓派上,使用[Scrcpy的Github主页][3]上的说明来构建也不需要很长时间。 +你也可以自己编译 Scrcpy。即使是在树莓派上,按照 [Scrcpy 的 GitHub 主页][3] 上的说明来构建也不需要很长时间。 ### 设置手机 -Scrcpy安装好后,你必须启用USB调试并授权每个设备(你的树莓派、笔记本电脑或者工作站)为受信任的控制器。 +Scrcpy 安装好后,你必须启用 USB 调试并授权每个设备(你的树莓派、笔记本电脑或者工作站)为受信任的控制器。 -打开安卓上的**设置**应用程序。如果**开发者选项**没有被激活,按照安卓的[说明来解锁它][4]。 +打开安卓上的“设置”应用程序。如果“开发者选项”没有被激活,按照安卓的 [说明来解锁它][4]。 -接下来,启用**USB调试**。 +接下来,启用“USB 调试”。 ![Enable USB Debugging option][5] -(Sudeshna Sur, [CC BY-SA 4.0][6]) +然后通过 USB 将手机连接到你的树莓派或者笔记本电脑(或者你正在使用的任何设备),如果可以选择的话,将模式设置为 [PTP][7]。如果你的手机不能使用 PTP,将你的手机设置为用于传输文件的模式(而不是,作为一个叠接tethering或者 MIDI 设备)。 -然后通过USB将手机连接到你的树莓派或者笔记本电脑(或者你正在使用的任何设备),如果可以选择的话,将模式设置为[PTP][7]。如果你的手机不能使用PTP,将你的手机设置为用于传输文件的模式(而不是,如,作为一个捆绑或者MIDI设备)。 - -你的手机可能会提示你授权你的电脑,这个是会通过它的RSA指纹进行识别的。你只需要在你第一次连接的时候操作即可,在之后你的手机会识别并信任你的计算机。 - -使用`lsusb`命令确认设置: +你的手机可能会提示你授权你的电脑,这是通过它的 RSA 指纹进行识别的。你只需要在你第一次连接的时候操作即可,在之后你的手机会识别并信任你的计算机。 +使用 `lsusb` 命令确认设置: ``` $ lsusb @@ -79,53 +73,47 @@ Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub ``` -然后执行`$scrcpy`在默认设置下运行。 +然后执行 `scrcpy` 以默认设置运行。 ![Scrcpy running on a Raspberry Pi][8] -(Opensource.com, [CC BY-SA 4.0][6]) - -性能和响应能力取决于你使用什么设备来控制你的手机。在一个派上,一些动画可能会变慢,甚至有时候会响应滞后。Scrcpy提供了一个简单的解决办法:降低scrcpy显示的图像的位速率和分辨率使得你的计算机能够容易显示动画。使用以下命令来实现: - +性能和响应能力取决于你使用什么设备来控制你的手机。在树莓派派上,一些动画可能会变慢,甚至有时候会响应滞后。Scrcpy 提供了一个简单的解决办法:降低 Scrcpy 显示图像的位速率和分辨率使得你的计算机能够容易显示动画。使用以下命令来实现: ``` -`$ scrcpy --bit-rate 1M --max-size 800` +$ scrcpy --bit-rate 1M --max-size 800 ``` -尝试不同的值来找到一个适合你的值。为了使键入更方便,在选定一个命令之后,可以考虑[创建自己的Bash别名][9]。 +尝试不同的值来找到一个适合你的值。为了使键入更方便,在选定一个命令之后,可以考虑 [创建自己的 Bash 别名][9]。 -### 冲破束缚 +### 剪断连线 -一旦Scrcpy开始运行,你甚至可以通过WIFI连接你的手机和计算机。Scrcpy安装过程也会安装`adb`,它是一个完成安卓设备之间通信的命令。Scrcpy也可以使用这个命令与设备通信,`adb`可以通过TCP/IP连接。 +Scrcpy 开始运行后,你甚至可以通过 WiFi 连接你的手机和计算机。Scrcpy 安装过程也会安装 `adb`,它是一个与安卓设备通信的命令。Scrcpy 也可以使用这个命令与你的设备通信,`adb` 可以通过 TCP/IP 连接。 ![Scrcpy running on a computer][10] -(Sudeshna Sur, [CC BY-SA 4.0][6]) +要尝试的话,请确保你的手机通过 WiFi 连在与你的计算机所使用的相同的无线网络上。依然不要断开你的手机与 USB 的连接! -试试吧,请确保你的手机通过WIFI连在与你的计算机所使用的相同的无线网络上。依然不要断开你的手机与USB的连接! - -接下来,通过手机中的**设置**,选择**关于手机**来获取你手机的IP地址。查看**状态**选项来获得你的地址。它通常是192.168或者10开头。 - -或者,你也可以使用`adb`来获得你手机的IP地址: +接下来,通过手机中的“设置”,选择“关于手机”来获取你手机的 IP 地址。查看“状态”选项来获得你的地址。它通常是 192.168 或者 10 开头。 +或者,你也可以使用 `adb` 来获得你手机的IP地址: ``` $ adb shell ip route | awk '{print $9}' -为了通过WIFI连接你的设备,你必须打开TCP/IP连接。也就是说你必须通过adb命令: +To connect to your device over WiFi, you must enable TCP/IP connections. This, you must do through the adb command: $ adb tcpip 5555 -现在你可以断开手机和USB的连接了。 -任何你想通过WIFI连接的时候,首先需要通过adb命令连接你的手机。例如,假设我的手机IP地址是10.1.1.22,命令如下: +Now you can disconnect your mobile from USB. +Whenever you want to connect over WiFi, first connect to the mobile with the command adb connect. For instance, assuming my mobile's IP address is 10.1.1.22, the command is: $ adb connect 10.1.1.22:5555 ``` -连接好之后,你就可以像往常一样运行Scrcpy了。 +连接好之后,你就可以像往常一样运行 Scrcpy 了。 ### 远程控制 -Scrcpy很容易使用。你可以在终端或者[一个图形界面应用][11]中尝试它。 +Scrcpy 很容易使用。你可以在终端或者 [一个图形界面应用][11] 中尝试它。 -你是否在使用另一个屏幕镜像?如果有的话,请在评论中告诉我们吧。 +你是否在使用其它的屏幕镜像工具?如果有的话,请在评论中告诉我们吧。 -------------------------------------------------------------------------------- @@ -133,8 +121,8 @@ via: https://opensource.com/article/21/3/android-raspberry-pi 作者:[Sudeshna Sur][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/ShuyRoy) -校对:[校对者ID](https://github.com/校对者ID) +译者:[ShuyRoy](https://github.com/ShuyRoy) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From e89832627c4411e1c344dff20c7ed1ca2fddaecf Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 20 Apr 2021 16:26:31 +0800 Subject: [PATCH 745/818] PUB @ShuyRoy https://linux.cn/article-13314-1.html --- ...20210308 Cast your Android device with a Raspberry Pi.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20210308 Cast your Android device with a Raspberry Pi.md (98%) diff --git a/translated/tech/20210308 Cast your Android device with a Raspberry Pi.md b/published/20210308 Cast your Android device with a Raspberry Pi.md similarity index 98% rename from translated/tech/20210308 Cast your Android device with a Raspberry Pi.md rename to published/20210308 Cast your Android device with a Raspberry Pi.md index fc88271808..b41dd7f427 100644 --- a/translated/tech/20210308 Cast your Android device with a Raspberry Pi.md +++ b/published/20210308 Cast your Android device with a Raspberry Pi.md @@ -2,10 +2,10 @@ [#]: via: (https://opensource.com/article/21/3/android-raspberry-pi) [#]: author: (Sudeshna Sur https://opensource.com/users/sudeshna-sur) [#]: collector: (lujun9972) -[#]: translator: (RiaXu) +[#]: translator: (ShuyRoy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13314-1.html) 将你的安卓手机屏幕投射到 Linux ====== From cfc4e9716127882f6d5d134b0558e0ace625f4a6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 20 Apr 2021 22:13:13 +0800 Subject: [PATCH 746/818] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @liweitianux 感谢您,完成了第一篇贡献! --- ...10410 5 signs you-re a groff programmer.md | 54 ++++++++++--------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/translated/tech/20210410 5 signs you-re a groff programmer.md b/translated/tech/20210410 5 signs you-re a groff programmer.md index 8fd7d28acf..f63ca7fc8c 100644 --- a/translated/tech/20210410 5 signs you-re a groff programmer.md +++ b/translated/tech/20210410 5 signs you-re a groff programmer.md @@ -3,60 +3,64 @@ [#]: author: (Jim Hall https://opensource.com/users/jim-hall) [#]: collector: (lujun9972) [#]: translator: (liweitianux) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) -你是 groff 程序员的 5 个标志 +groff 程序员的 5 个标志 ====== -学习 groff,一款老派的文本处理软件,类似于学习骑自行车。 -![Typewriter in the grass][1] -我第一次发现 Unix 系统是在 90 年代早期,当时我还在大学读本科。我太喜欢这个系统了,所以我将家里电脑上的 MS-DOS 也换成了 Linux 系统。 +> 学习一款老派的文本处理软件 groff,就像是学习骑自行车。 -在 90 年代早期至中期,Linux 所缺失的一个东西是字处理软件word processor。在其他桌面操作系统上,这是一套标准的办公软件,其中的字处理软件能让你轻松地编辑文本。我经常在 DOS 上使用字处理软件来撰写课程论文。直到 90 年代末,我都没能找到一款 Linux 原生的字处理软件。也直到那时,文字处理是我在第一台电脑上保留双启动的个别原因之一,那样我可以偶尔切换到 DOS 系统写论文。 +![](https://img.linux.net.cn/data/attachment/album/202104/20/221218y34lew4gewqw2xg2.jpg) -后来,我发现 Linux 提供了一款文字处理软件。GNU troff,一般称为 [groff][2],是经典的文本处理系统 troff 的一个现代实现。troff 是 typesetter roff 的简称,是 nroff 系统的改进版本,而 nroff 又是最初的 roff 系统的新实现。roff 表示快速印出run off,比如“快速印出”一份文档。 +我第一次发现 Unix 系统是在 20 世纪 90 年代早期,当时我还在大学读本科。我太喜欢这个系统了,所以我将家里电脑上的 MS-DOS 也换成了 Linux 系统。 + +在 90 年代早期至中期,Linux 所缺失的一个东西是字处理软件word processor。作为其他桌面操作系统的标准办公程序,字处理软件能让你轻松地编辑文本。我经常在 DOS 上使用字处理软件来撰写课程论文。直到 90 年代末,我都没能找到一款 Linux 原生的字处理软件。直到那时,文字处理是我在第一台电脑上保留双启动的少有的原因之一,那样我可以偶尔切换到 DOS 系统写论文。 + +后来,我发现 Linux 提供了一款文字处理软件:GNU troff,它一般称为 [groff][2],是经典的文本处理系统 troff 的一个现代实现。troff 是 “排版工快印typesetter roff” 的简称,是 nroff 系统的改进版本,而 nroff 又是最初的 roff 系统的新实现。roff 表示快速印出run off,比如“快速印出”一份文档。 利用文本处理系统,你在纯文本编辑器里编辑内容,通过macro或其他处理命令来添加格式。然后将文件输入文本处理系统,比如 groff,来生成适合打印的格式化输出。另一个知名的文本处理系统是 LaTeX,但是 groff 已经满足我的需求,而且足够简单。 -经过一点实践,我发现在 Linux 上使用 groff 来撰写课程论文与使用字处理软件一样容易。尽管我现在不再使用 groff 来写文档了,我依然记得它的那些宏和命令。如果你也是这样并且在那么多年之前学会了使用 groff 写作,你可能会认出这 5 个你是 groff 程序员的标志。 +经过一点实践,我发现在 Linux 上使用 groff 来撰写课程论文与使用字处理软件一样容易。尽管我现在不再使用 groff 来写文档了,我依然记得它的那些宏和命令。如果你也是这样并且在那么多年之前学会了使用 groff 写作,你可能会认出这 5 个 groff 程序员的标志。 -### 1\. 你有一个最喜欢的宏集 +### 1、你有一个喜欢的宏集 -输入由宏点缀的纯文本,你便能在 groff 里对文档进行格式化。groff 里的宏是行首为单个句点的短命令。例如:如果你想在输出里插入几行,宏命令 `.sp 2` 会添加两个空行。groff 还具有其他一些基本的宏,支持各种各样的格式化。 +输入由宏点缀的纯文本,你便能在 groff 里对文档进行格式化。groff 里的宏是行首为单个句点(`.`)的短命令。例如:如果你想在输出里插入几行,宏命令 `.sp 2` 会添加两个空行。groff 还具有其他一些基本的宏,支持各种各样的格式化。 -为了能让作者更容易地格式化文档,groff 还提供了不同的 _宏集macro set_,即一组能够让你以自己的方式格式化文档的宏的集合。我学会的第一个宏集是 `-me` 宏集。这个宏集的名称其实是 `e`,而且你在处理文件时使用 `-me` 选项来指定这个 `e` 宏集。 +为了能让作者更容易地格式化文档,groff 还提供了不同的 宏集macro set,即一组能够让你以自己的方式格式化文档的宏的集合。我学会的第一个宏集是 `-me` 宏集。这个宏集的名称其实是 `e`,你在处理文件时使用 `-me` 选项来指定这个 `e` 宏集。 -groff 还包含其他宏集。例如,`-man` 宏集以前是用于格式化 Unix 系统内置 _手册页manual page_ 的标准宏集,`-ms` 宏集经常用于格式化其他一些技术文档。如果你学会了使用 groff 写作,你可能有一个最喜欢的宏集。 +groff 还包含其他宏集。例如,`-man` 宏集以前是用于格式化 Unix 系统内置的 手册页manual page 的标准宏集,`-ms` 宏集经常用于格式化其他一些技术文档。如果你学会了使用 groff 写作,你可能有一个喜欢的宏集。 -### 2\. 你想专注于内容而非格式 +### 2、你想专注于内容而非格式 -使用 groff 写作的一个很好的特点是你能专注于你的 _内容_,而不用太担心它看起来会怎么样。对于技术作者而言这是一个很实用的特点。对专业作家来说,groff 是一个很好的、“不会分心”的写作环境。至少,你不必在意使用 groff `-T` 选项所支持的任何格式来交付内容,包括 PDF、PostScript、HTML、以及纯文本。不过,你无法直接从 groff 生成 LibreOffice ODT 文件或者 Word DOC 文件。 +使用 groff 写作的一个很好的特点是,你能专注于你的 _内容_,而不用太担心它看起来会怎么样。对于技术作者而言这是一个很实用的特点。对专业作家来说,groff 是一个很好的、“不会分心”的写作环境。至少,使用 groff `-T` 选项所支持的任何格式来交付内容时你不用担心,这包括 PDF、PostScript、HTML、以及纯文本。不过,你无法直接从 groff 生成 LibreOffice ODT 文件或者 Word DOC 文件。 -一旦你使用 groff 写作变得有信心之后,宏便开始 _消失_。用于格式化的宏变成了背景,而你纯粹地专注于眼前的文本内容。我已经使用 groff 写了足够多,以至于我甚至不再看见那些宏。也许,这就像写代码,而你的大脑随意换档,于是你就像计算机一样思考,看到的代码就是一组指令。对我而言,使用 groff 写作就像那样:我仅仅看到文本,而我的大脑将宏自动地翻译成格式。 +一旦你使用 groff 写作变得有信心之后,宏便开始 _消失_。用于格式化的宏变成了背景的一部分,而你纯粹地专注于眼前的文本内容。我已经使用 groff 写了足够多内容,以至于我甚至不再看见那些宏。也许,这就像写代码,而你的大脑随意换档,于是你就像计算机一样思考,看到的代码就是一组指令。对我而言,使用 groff 写作就像那样:我仅仅看到文本,而我的大脑将宏自动地翻译成格式。 -### 3\. 你喜欢怀旧复古的感觉 +### 3、你喜欢怀旧复古的感觉 当然,使用一个更典型的字处理软件来写你的文档可能更 _简单_,比如 LibreOffice Writer、甚至 Google Docs 或 Microsoft Word。而且对于某些种类的文档,桌面型字处理软件才是正确的选择。但是,如果你想要这种怀旧复古的感觉,使用 groff 写作很难被打败。 -我会承认我大部分的写作是用 LibreOffice Writer 完成的,它的表现很出色。但是当我渴望以一种怀旧复古的方式去做时,我会打开编辑器用 groff 来写文档。 +我承认,我的大部分写作是用 LibreOffice Writer 完成的,它的表现很出色。但是当我渴望以一种怀旧复古的方式去做时,我会打开编辑器用 groff 来写文档。 -### 4\. 你希望能到处使用它 +### 4、你希望能到处使用它 -groff 及其同类软件在几乎所有的 Unix 系统上都是一个标准软件包。此外,groff 宏不会随系统而变化。比如,`-me` 宏集在不同系统上都应该相同。因此,一旦你在一个系统上学会使用宏,你能在下一个系统上同样地使用它们。 +groff 及其同类软件在几乎所有的 Unix 系统上都是标准软件包。此外,groff 宏不会随系统而变化。比如,`-me` 宏集在不同系统上都应该相同。因此,一旦你在一个系统上学会使用宏,你能在下一个系统上同样地使用它们。 -另外,因为 groff 文档就是纯文本,所以你能使用任何你喜欢的编辑器来编辑文档。我喜欢使用 GNU Emacs 来编辑我的 groff 文档,但是你可能使用 GNOME Gedit、Vim、其他你[最喜欢的文本编辑器][3]。大部分编辑器会支持这样一种模式,其中 groff 宏会以不同的颜色高亮显示,帮助你在处理文件之前便能发现错误。 +另外,因为 groff 文档就是纯文本文档,所以你能使用任何你喜欢的编辑器来编辑文档。我喜欢使用 GNU Emacs 来编辑我的 groff 文档,但是你可能使用 GNOME Gedit、Vim、其他你 [最喜欢的文本编辑器][3]。大部分编辑器会支持这样一种模式,其中 groff 宏会以不同的颜色高亮显示,帮助你在处理文件之前便能发现错误。 -### 5\. 你使用 -me 写了这篇文章 +### 5、你使用 -me 写了这篇文章 当我决定要写这篇文章时,我认为最佳的方式便是直接使用 groff。我想要演示 groff 在编写文档方面是多么的灵活。所以,虽然你正在网上读这篇文章,但是它最初是用 groff 写的。 -我希望这激发了你学习如何使用 groff 撰写文档的兴趣。如果你想学习 `-me` 宏集里更高级的函数,参考 Eric Allman 的《Writing papers with groff using -me》,你应该能在系统的 groff 文档找到,文件名为 **meintro.me**。这是一份很好的参考资料,还解释了使用 `-me` 宏集格式化论文的其他方式。 +我希望这激发了你学习如何使用 groff 撰写文档的兴趣。如果你想学习 `-me` 宏集里更高级的函数,参考 Eric Allman 的《Writing papers with groff using -me》,你应该能在系统的 groff 文档找到这本书,文件名为 `meintro.me`。这是一份很好的参考资料,还解释了使用 `-me` 宏集格式化论文的其他方式。 -我还提供了这篇文章的原始草稿,其中使用了 `-me` 宏集。下载这个文件并保存为 **five-signs-groff.me**,然后输入 groff 处理来查看。`-T` 选项设置输出类型,比如 `-Tps` 用于生成 PostScript 输出,`-Thtml` 用于生成 HTML 文件。比如: +我还提供了这篇文章的原始草稿,其中使用了 `-me` 宏集。下载这个文件并保存为 `five-signs-groff.me`,然后运行 groff 处理来查看它。`-T` 选项设置输出类型,比如 `-Tps` 用于生成 PostScript 输出,`-Thtml` 用于生成 HTML 文件。比如: -groff -me -Thtml five-signs-groff.me > five-signs-groff.html +``` +groff -me -Thtml five-signs-groff.me > five-signs-groff.html +``` -------------------------------------------------------------------------------- @@ -65,7 +69,7 @@ via: https://opensource.com/article/21/4/groff-programmer 作者:[Jim Hall][a] 选题:[lujun9972][b] 译者:[liweitianux](https://github.com/liweitianux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 43459616fd88cb0622c391ac624cbfcb350535be Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 20 Apr 2021 22:14:29 +0800 Subject: [PATCH 747/818] PUB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @liweitianux 本文首发地址:https://linux.cn/article-13316-1.html 您的 LCTT 专页:https://linux.cn/lctt/liweitianux --- .../20210410 5 signs you-re a groff programmer.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210410 5 signs you-re a groff programmer.md (99%) diff --git a/translated/tech/20210410 5 signs you-re a groff programmer.md b/published/20210410 5 signs you-re a groff programmer.md similarity index 99% rename from translated/tech/20210410 5 signs you-re a groff programmer.md rename to published/20210410 5 signs you-re a groff programmer.md index f63ca7fc8c..53e41c98fd 100644 --- a/translated/tech/20210410 5 signs you-re a groff programmer.md +++ b/published/20210410 5 signs you-re a groff programmer.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (liweitianux) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13316-1.html) groff 程序员的 5 个标志 ====== From f65a6aec51ca979911d1b19eaf00a1bac0487b57 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 21 Apr 2021 05:02:32 +0800 Subject: [PATCH 748/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210420=20?= =?UTF-8?q?In=20the=20trenches=20with=20Thomas=20Gleixner,=20real-time=20L?= =?UTF-8?q?inux=20kernel=20patch=20set?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210420 In the trenches with Thomas Gleixner, real-time Linux kernel patch set.md --- ...ixner, real-time Linux kernel patch set.md | 133 ++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 sources/tech/20210420 In the trenches with Thomas Gleixner, real-time Linux kernel patch set.md diff --git a/sources/tech/20210420 In the trenches with Thomas Gleixner, real-time Linux kernel patch set.md b/sources/tech/20210420 In the trenches with Thomas Gleixner, real-time Linux kernel patch set.md new file mode 100644 index 0000000000..d5a39bf6c5 --- /dev/null +++ b/sources/tech/20210420 In the trenches with Thomas Gleixner, real-time Linux kernel patch set.md @@ -0,0 +1,133 @@ +[#]: subject: (In the trenches with Thomas Gleixner, real-time Linux kernel patch set) +[#]: via: (https://www.linux.com/news/in-the-trenches-with-thomas-gleixner-real-time-linux-kernel-patch-set/) +[#]: author: (Linux.com Editorial Staff https://www.linux.com/author/linuxdotcom/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +In the trenches with Thomas Gleixner, real-time Linux kernel patch set +====== + +_![][1]_ + +_Jason Perlow, Editorial Director at the Linux Foundation interviews Thomas Gleixner, Linux Foundation Fellow, CTO of Linutronix GmbH, and project leader of the_ [_PREEMPT_RT_][2] _real-time kernel patch set._ + +**JP:** *Greetings, Thomas! It’s great to have you here this morning — although for you, it’s getting late in the afternoon in Germany. So **PREEMPT_RT**, the real-time patch set for the kernel is a fascinating project because it has some very important use-cases that most people who use Linux-based systems may not be aware of. First of all, can you tell me what “Real-Time” truly means? * + +**TG:** Real-Time in the context of operating systems means that the operating system provides mechanisms to guarantee that the associated real-time task processes an event within a specified period of time. Real-Time is often confused with “really fast.” The late Prof. Doug Niehaus explained it this way: “Real-Time is not as fast as possible; it is as fast as specified.” + +The specified time constraint is application-dependent. A control loop for a water treatment plant can have comparatively large time constraints measured in seconds or even minutes, while a robotics control loop has time constraints in the range of microseconds. But for both scenarios missing the deadline at which the computation has to be finished can result in malfunction. For some application scenarios, missing the deadline can have fatal consequences. + +In the strict sense of Real-Time, the guarantee which is provided by the operating system must be verifiable, e.g., by mathematical proof of the worst-case execution time. In some application areas, especially those related to functional safety (aerospace, medical, automation, automotive, just to name a few), this is a mandatory requirement. But for other scenarios or scenarios where there is a separate mechanism for providing the safety requirements, the proof of correctness can be more relaxed. But even in the more relaxed case, the malfunction of a real-time system can cause substantial damage, which obviously wants to be avoided. + +**JP:** _What is the history behind the project? How did it get started?_ + +**TG:** Real-Time Linux has a history that goes way beyond the actual **PREEMPT_RT** project. + +Linux became a research vehicle very early on. Real-Time researchers set out to transform Linux into a Real-Time Operating system and followed different approaches with more or less success. Still, none of them seriously attempted a fully integrated and perhaps upstream-able variant. In 2004 various parties started an uncoordinated effort to get some key technologies into the Linux kernel on which they wanted to build proper Real-Time support. None of them was complete, and there was a lack of an overall concept.  + +Ingo Molnar, working for RedHat, started to pick up pieces, reshape them and collect them in a patch series to build the grounds for the real-time preemption patch set **PREEMPT_RT**. At that time, I worked with [the late Dr. Doug Niehaus][3] to port a solution we had working based on the 2.4 Linux kernel forward to the 2.6 kernel. Our work was both conflicting and complimentary, so I teamed up with Ingo quickly to get this into a usable shape. Others like Steven Rostedt brought in ideas and experience from other Linux Real-Time research efforts. With a quickly forming loose team of interested developers, we were able to develop a halfway usable Real-Time solution that was fully integrated into the Linux kernel in a short period of time. That was far from a maintainable and production-ready solution. Still, we had laid the groundwork and proven that the concept of making the Linux Kernel real-time capable was feasible. The idea and intent of fully integrating this into the mainline Linux kernel over time were there from the very beginning. + +**JP:** _Why is it still a separate project from the Mainline kernel today?_ + +**TG:** To integrate the real-time patches into the Linux kernel, a lot of preparatory work, restructuring, and consolidation of the mainline codebase had to be done first. While many pieces that emerged from the real-time work found their way into the mainline kernel rather quickly due to their isolation, the more intrusive changes that change the Linux kernel’s fundamental behavior needed (and still need) a lot of polishing and careful integration work.  + +Naturally, this has to be coordinated with all the other ongoing efforts to adopt the Linux kernel to the different use cases ranging from tiny embedded systems to supercomputers.  + +This also requires carefully designing the integration so it does not get in the way of other interests and imposes roadblocks for further developing the Linux kernel, which is something the community and especially Linus Torvalds, cares about deeply.  + +As long as these remaining patches are out of the mainline kernel, this is not a problem because it does not put any burden or restriction on the mainline kernel. The responsibility is on the real-time project, but on the other side, in this context, there is no restriction to take shortcuts that would never be acceptable in the upstream kernel. + +The real-time patches are fundamentally different from something like a device driver that sits at some corner of the source tree. A device driver does not cause any larger damage when it goes unmaintained and can be easily removed when it reaches the final state bit-rot. Conversely, the **PREEMPT_RT** core technology is in the heart of the Linux kernel. Long-term maintainability is key as any problem in that area will affect the Linux user universe as a whole. In contrast, a bit-rotted driver only affects the few people who have a device depending on it. + +**JP:** *Traditionally, when I think about RTOS, I think of legacy solutions based on closed systems. Why is it essential we have an open-source alternative to them? * + +**TG:** The RTOS landscape is broad and, in many cases, very specialized. As I mentioned on the question of “what is real-time,” certain application scenarios require a fully validated RTOS, usually according to an application space-specific standard and often regulatory law. Aside from that, many RTOSes are limited to a specific class of CPU devices that fit into the targeted application space. Many of them come with specialized application programming interfaces which require special tooling and expertise. + +The Real-Time Linux project never aimed at these narrow and specialized application spaces. It always was meant to be the solution for 99% of the use cases and to be able to fully leverage the flexibility and scalability of the Linux kernel and the broader FOSS ecosystem so that integrated solutions with mixed-criticality workloads can be handled consistently.  + +Developing real-time applications on a real-time enabled Linux kernel is not much different from developing non-real-time applications on Linux, except for the careful selection of system interfaces that can be utilized and programming patterns that should be avoided, but that is true for real-time application programming in general independent of the RTOS.  + +The important difference is that the tools and concepts are all the same, and integration into and utilizing the larger FOSS ecosystem comes for free. + +The downside of **PREEMPT_RT** is that it can’t be fully validated, which excludes it from specific application spaces, but there are efforts underway, e.g., the LF ELISA project, to fill that gap. The reason behind this is, that large multiprocessor systems have become a commodity, and the need for more complex real-time systems in various application spaces, e.g., assisted / autonomous driving or robotics, requires a more flexible and scalable RTOS approach than what most of the specialized and validated RTOSes can provide.  + +That’s a long way down the road. Still, there are solutions out there today which utilize external mechanisms to achieve the safety requirements in some of the application spaces while leveraging the full potential of a real-time enabled Linux kernel along with the broad offerings of the wider FOSS ecosystem. + +**JP:** _What are examples of products and systems that use the real-time patch set that people depend on regularly?_ + +**TG:** It’s all over the place now. Industrial automation, control systems, robotics, medical devices, professional audio, automotive, rockets, and telecommunication, just to name a few prominent areas. + +**JP:** *Who are the major participants currently developing systems and toolsets with the real-time Linux kernel patch set?  * + +**TG:** Listing them all would be equivalent to reciting the “who’s who” in the industry. On the distribution side, there are offerings from, e.g., RedHat, SUSE, Mentor, and Wind River, which deliver RT to a broad range of customers in different application areas. There are firms like Concurrent, National Instruments, Boston Dynamics, SpaceX, and Tesla, just to name a few on the products side. + +RedHat and National Instruments are also members of the LF collaborative Real-Time project. + +**JP:** _What are the challenges in developing a real-time subsystem or specialized kernel for Linux? Is it any different than how other projects are run for the kernel?_ + +**TG:** Not really different; the same rules apply. Patches have to be posted, are reviewed, and discussed. The feedback is then incorporated. The loop starts over until everyone agrees on the solution, and the patches get merged into the relevant subsystem tree and finally end up in the mainline kernel. + +But as I explained before, it needs a lot of care and effort and, often enough, a large amount of extra work to restructure existing code first to get a particular piece of the patches integrated. The result is providing the desired functionality but is at the same time not in the way of other interests or, ideally, provides a benefit for everyone. + +The technology’s complexity that reaches into a broad range of the core kernel code is obviously challenging, especially combined with the mainline kernel’s rapid change rate. Even larger changes happening at the related core infrastructure level are not impacting ongoing development and integration work too much in areas like drivers or file systems. But any change on the core infrastructure can break a carefully thought-out integration of the real-time parts into that infrastructure and send us back to the drawing board for a while. + +**JP:**  *Which companies have been supporting the effort to get the **PREEMPT_RT** Linux kernel patches upstream? * + +**TG:** For the past five years, it has been supported by the members of the LF real-time Linux project, currently ARM, BMW, CIP, ELISA, Intel, National Instruments, OSADL, RedHat, and Texas Instruments. CIP, ELISA, and OSADL are projects or organizations on their own which have member companies all over the industry. Former supporters include Google, IBM, and NXP. + +I personally, my team and the broader Linux real-time community are extremely grateful for the support provided by these members.  + +However, as with other key open source projects heavily used in critical infrastructure, funding always was and still is a difficult challenge. Even if the amount of money required to keep such low-level plumbing but essential functionality sustained is comparatively small, these projects struggle with finding enough sponsors and often lack long-term commitment. + +The approach to funding these kinds of projects reminds me of the [Mikado Game][4], which is popular in Europe, where the first player who picks up the stick and disturbs the pile often is the one who loses. + +That’s puzzling to me, especially as many companies build key products depending on these technologies and seem to take the availability and sustainability for granted up to the point where such a project fails, or people stop working on it due to lack of funding. Such companies should seriously consider supporting the funding of the Real-Time project. + +It’s a lot like the [Jenga][5] game, where everyone pulls out as many pieces as they can up until the point where it collapses. We cannot keep taking; we have to give back to these communities putting in the hard work for technologies that companies heavily rely on. + +I gave up long ago trying to make sense of that, especially when looking at the insane amounts of money thrown at the over-hyped technology of the day. Even if critical for a large part of the industry, low-level infrastructure lacks the buzzword charm that attracts attention and makes headlines — but it still needs support. + +**JP:**  *One of the historical concerns was that Real-Time didn’t have a community associated with it; what has changed in the last five years?  * + +**TG:** There is a lively user community, and quite a bit of the activity comes from the LF project members. On the development side itself, we are slowly gaining more people who understand the intricacies of **PREEMPT_RT** and also people who look at it from other angles, e.g., analysis and instrumentation. Some fields could be improved, like documentation, but there is always something that can be improved. + +**JP:**  _What will the Real-Time Stable team be doing once the patches are accepted upstream?_ + +**TG:** The stable team is currently overseeing the RT variants of the supported mainline stable versions. Once everything is integrated, this will dry out to some extent once the older versions reach EOL. But their expertise will still be required to keep real-time in shape in mainline and in the supported mainline stable kernels. + +**JP:** _So once the upstreaming activity is complete, what happens afterward?_ + +**TG:** Once upstreaming is done, efforts have to be made to enable RT support for specific Linux features currently disabled on real-time enabled kernels. Also, for quite some time, there will be fallout when other things change in the kernel, and there has to be support for kernel developers who run into the constraints of RT, which they did not have to think about before.  + +The latter is a crucial point for this effort. Because there needs to be a clear longer-term commitment that the people who are deeply familiar with the matter and the concepts are not going to vanish once the mainlining is done. We can’t leave everybody else with the task of wrapping their brains around it in desperation; there cannot be institutional knowledge loss with a system as critical as this.  + +The lack of such a commitment would be a showstopper on the final step because we are now at the point where the notable changes are focused on the real-time only aspects rather than welcoming cleanups, improvements, and features of general value. This, in turn, circles back to the earlier question of funding and industry support — for this final step requires several years of commitment by companies using the real-time kernel. + +There’s not going to be a shortage of things to work on. It’s not going to be as much as the current upstreaming effort, but as the kernel never stops changing, this will be interesting for a long time. + +**JP:** _Thank you, Thomas, for your time this morning. It’s been an illuminating discussion._ + +_To get involved with the real-time kernel patch for Linux, please visit the_ [_PREEMPT_RT wiki_][2] _at The Linux Foundation or email [real-time-membership@linuxfoundation.org][6]_ + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/in-the-trenches-with-thomas-gleixner-real-time-linux-kernel-patch-set/ + +作者:[Linux.com Editorial Staff][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://www.linux.com/author/linuxdotcom/ +[b]: https://github.com/lujun9972 +[1]: https://www.linux.com/wp-content/uploads/2021/04/IntheTrenches_ThomasGleixner.png +[2]: https://wiki.linuxfoundation.org/realtime/start +[3]: https://lwn.net/Articles/514182/?fbclid=IwAR1mhNcOVlNdQ_QmwOhC1vG3vHzxsXRwa_g4GTo62u1sHbjOZBPPviT5bxc +[4]: https://en.wikipedia.org/wiki/Mikado_(game) +[5]: https://en.wikipedia.org/wiki/Jenga +[6]: mailto:real-time-membership@linuxfoundation.org From 61a864220d15f73cd58295afb327c5efbff4be91 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 21 Apr 2021 05:03:03 +0800 Subject: [PATCH 749/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210421=20?= =?UTF-8?q?How=20to=20Delete=20Partitions=20in=20Linux=20[Beginner?= =?UTF-8?q?=E2=80=99s=20Guide]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210421 How to Delete Partitions in Linux -Beginner-s Guide.md --- ...e Partitions in Linux -Beginner-s Guide.md | 134 ++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 sources/tech/20210421 How to Delete Partitions in Linux -Beginner-s Guide.md diff --git a/sources/tech/20210421 How to Delete Partitions in Linux -Beginner-s Guide.md b/sources/tech/20210421 How to Delete Partitions in Linux -Beginner-s Guide.md new file mode 100644 index 0000000000..1662169a52 --- /dev/null +++ b/sources/tech/20210421 How to Delete Partitions in Linux -Beginner-s Guide.md @@ -0,0 +1,134 @@ +[#]: subject: (How to Delete Partitions in Linux [Beginner’s Guide]) +[#]: via: (https://itsfoss.com/delete-partition-linux/) +[#]: author: (Chris Patrick Carias Stas https://itsfoss.com/author/chris/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +How to Delete Partitions in Linux [Beginner’s Guide] +====== + +Managing partitions is serious business, especially when you have to remove them. I find myself doing this frequently, especially after using thumb drives as live disks and Linux installers because they create several partitions that I won’t need afterwards. + +In this tutorial, I will show you how to remove partitions in Linux using both command line and GUI tools. + + * [Delete partition in Linux with GUI tool like GParted][1] + * [Delete partition using Linux commands][2] + + + +Warning! + +You delete the partition, you lose your data. Whenever you are playing with partitions, make sure backup your data. A slight typo or slip of finger could prove costly. Don’t say we didn’t warn you! + +### Remove disk partition using GParted [GUI Method] + +As a desktop Linux user, you probably will be more comfortable and perhaps safer with a GUI-based tool. + +There are [several tools that let you manage partitions on Linux][3]. Depending on your distribution you will have one or even more such tool already installed on your system. + +For this tutorial, I am going to use [GParted][4]. It is a popular open source tool and it’s very easy and intuitive to use. + +The first step is [installing GParted][5] if it isn’t already in your system. You should be able to find it in the software center of your distribution. + +![][6] + +Alternatively, you can use your distribution’s package manager for installing it. In Debian and Ubuntu-based Linux distributions, you can [use the apt install command][7]: + +``` +sudo apt install gparted +``` + +Once installed, let’s open **GParted**. Since you are dealing with disk partitions, you’ll be required to have root access. It will ask for authentication and once it opens you should see a window like this one: + +![][8] + +On the right-upper corner you can select the disk and in the lower screen the partition you want to remove. + +Next, select the option **Delete** from the Partition menu: + +![][9] + +The process is incomplete until you rewrite the partition table. This is a safety measure and it gives you the option to review the changes before confirming it. + +To do this just click on the **Apply All Operations** button located in the toolbar and then **Apply** when asked for confirmation. + +![][10] + +After hitting **Apply**, you will see a progress bar and a results message saying that all the operations were successful. You can close the message and the main window and consider your partition completely deleted from our disk. + +Now that you are aware of the GUI method, let’s move on to the command line. + +### Delete partitions using fdisk command + +Almost every Linux distribution comes with [fdisk][11] by default and we are going to use this tool today. The first thing you need to know is what device is assigned to the disk with the partitions you want to remove. To do that, type the following in the terminal: + +``` +sudo fdisk --list +``` + +This will print all the drives and partitions in our system as well as the assigned devices. You [need to have root access][12] in order for it work. + +In this example, I will work with a USB drive that contains two partitions as shown below: + +![][13] + +The device assigned in the system is /sdb and it has two partitions, sdb1 and sdb2. Now that you identified which device contains the partitions, you can start working on it by using `fdisk` and the path to the device: + +``` +sudo fdisk /dev/sdb +``` + +This will start `fdisk` in command mode. You can always press `m` to see a list of options. + +Next, type `p` and press `Enter` to view the partition information and confirm that you are using the right device. If the wrong device is in use you can use the `q` command to exit `fdisk` and start the procedure again. + +Now enter `d` to delete a partition and it will immediately ask for the partition number, that corresponds to the number listed in the Device column, which in this case are numbers 1 and 2 (as can be seen in the screen capture below) but can and will vary according to the current partition table. + +![][14] + +Let’s remove the second partition by typing `2` and pressing `Enter`. You should see a message saying **“Partition 2 has been deleted**“, but actually, it hasn’t been removed yet. `fdisk` needs one more step to rewrite the partition table and apply the changes. Safety net, you see. + +You need to type `w` and press `Enter` to make the changes permanent. No confirmation is asked. + +After this, you should receive some feedback like the one here: + +![][15] + +Now, use `sudo fdisk --list /dev/sdb` to view the current partition table of the device and you can see that the second partition is completely gone. You are done removing your partition using the terminal and `fdisk` command. Success! + +#### Wrapping up + +And so I end this tutorial on how to remove partitions in Linux using both the terminal and GUI tools. Remember, stay always on the safe side, backup your files before manipulating your partitions and double check that you are using the right device. Deleting a partition will delete everything in it with little to no chance of [recovering][16] it. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/delete-partition-linux/ + +作者:[Chris Patrick Carias Stas][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/chris/ +[b]: https://github.com/lujun9972 +[1]: tmp.Q615QYIwTl#gparted +[2]: tmp.Q615QYIwTl#fdisk +[3]: https://itsfoss.com/partition-managers-linux/ +[4]: https://gparted.org/index.php +[5]: https://itsfoss.com/gparted/ +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/gparted-ubuntu-software-center.png?resize=800%2C348&ssl=1 +[7]: https://itsfoss.com/apt-command-guide/ +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/removing-partitions-linux-004.png?resize=800%2C542&ssl=1 +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/removing-partitions-linux-005.png?resize=800%2C540&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/removing-partitions-linux-006.png?resize=800%2C543&ssl=1 +[11]: https://man7.org/linux/man-pages/man8/fdisk.8.html +[12]: https://itsfoss.com/root-user-ubuntu/ +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/removing-partitions-linux-001.png?resize=800%2C255&ssl=1 +[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/removing-partitions-linux-002.png?resize=800%2C362&ssl=1 +[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/removing-partitions-linux-003.png?resize=800%2C153&ssl=1 +[16]: https://itsfoss.com/recover-deleted-files-linux/ From 3986d8718f533da9082b42271e3830345971b2b0 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 21 Apr 2021 05:03:21 +0800 Subject: [PATCH 750/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210420=20?= =?UTF-8?q?5=20ways=20to=20protect=20your=20documents=20with=20open=20sour?= =?UTF-8?q?ce=20software?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210420 5 ways to protect your documents with open source software.md --- ...our documents with open source software.md | 147 ++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 sources/tech/20210420 5 ways to protect your documents with open source software.md diff --git a/sources/tech/20210420 5 ways to protect your documents with open source software.md b/sources/tech/20210420 5 ways to protect your documents with open source software.md new file mode 100644 index 0000000000..88de0c620e --- /dev/null +++ b/sources/tech/20210420 5 ways to protect your documents with open source software.md @@ -0,0 +1,147 @@ +[#]: subject: (5 ways to protect your documents with open source software) +[#]: via: (https://opensource.com/article/21/4/secure-documents-open-source) +[#]: author: (Ksenia Fedoruk https://opensource.com/users/ksenia-fedoruk) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +5 ways to protect your documents with open source software +====== +Control your own data so that unauthorized users can't access it. +![Filing papers and documents][1] + +Users have every right to be concerned about the safety and security of their data. When you create data on a computer, it's reasonable to want exclusive control over it. + +There are many ways to protect your documents. At the filesystem level, you can [encrypt your hard drive][2] or [just a file][3]. A good office suite affords you many more options, though, and I've gathered five of the methods I use to secure my documents with open source software. + +### 5 ways to secure your docs + +#### 1\. Keeping documents in secure cloud storage services + +Self-hosting an open source content management system (CMS) platform gives you complete control over your data. All your data stays on your server, and you control who has access to it. + +**Options:** [Nextcloud][4], [ownCloud][5], [Pydio][6], and [Seafile][7] + +All of these offer functionality for storing, syncing, and sharing documents and folders, managing content, file versioning, and so on. They can easily replace Dropbox, Google Drive, and other proprietary cloud storage that place your data on servers you don't own, maintain, or govern. + +The open source self-hosted options listed above are compliant with GDPR and other international regulations that protect user data. They offer backup and data recovery options, auditing and monitoring tools, permissions management, and data encryption. + +![Pydio audit control][8] + +Audit control in Pydio Cells. (Source: [Pydio.com][9]) + +#### 2\. Enabling encryption at rest, in transit, and end-to-end + +We often speak of data encryption in general terms, but there are several aspects to consider when encrypting files: + + * With **encryption at rest** (or disk encryption), you can protect data stored within your infrastructure or on your hard drive. + * **Encryption in transit** protects data as traffic when it's using protocols like HTTPS. It protects your data from being intercepted and transformed as it moves from one location to another. This is important when you upload documents to your cloud. + * **End-to-end encryption** (E2EE) protects data by encrypting it on one end and decrypting it on the other. No third party can read your documents, even if they interfere in the process and get access to the files unless they have the decryption key. + + + +**Options:** CryptPad, ownCloud, ONLYOFFICE Workspace, Nextcloud, and Seafile + +ownCloud, ONLYOFFICE Workspace, Nextcloud, and Seafile support all three layers of encryption. They differ in how they implement end-to-end encryption: + + * In ownCloud, there's an E2EE plugin that allows you to encrypt folder sharing. + * In Nextcloud, there's a folder-level option available in the desktop client. + * Seafile provides client-side E2EE by creating encrypted libraries. + * [ONLYOFFICE Workspace][10] not only allows you to encrypt your documents while storing and sharing them, but it also permits you to securely co-edit them in real time in Private Rooms. The encryption data is automatically generated and transferred and is encrypted itself—you don't have to keep or remember any passwords. + * [CryptPad][11], as its name suggests, is completely private. All content is encrypted and decrypted by your browser. This means documents, chats, and files are unreadable outside the session where you are logged in. Even the service administrators can't get your information. + + + +![Encrypted CryptPad storage][12] + +Encrypted CryptPad storage. (Source: [Cryptpad.fr][13]) + +#### 3\. Using digital signatures + +Digital signatures allow you to verify that you originated a document's content and no alterations have been made to it. + +**Options:** LibreOffice Writer, ONLYOFFICE Desktop Editors, OpenESignForms, and SignServer + +[LibreOffice][14] and [ONLYOFFICE][15] suites provide an integrated tool to digitally sign documents. You can add a signature line that is visible in the document text and allows you to request signatures from other users. + +Once you apply a digital signature, no one can edit the document. If someone changes the document, the signature becomes invalid, so you'll know the content was modified. + +In ONLYOFFICE, you can sign OOXML files (e.g., DOCX, XLSX, PPTX) in LibreOffice as ODFs and PDFs. If you try to sign an OOXML document in LibreOffice, the signature will be marked with "only parts of the document are signed." + +![Digital signature in ONLYOFFICE][16] + +Digital signature in ONLYOFFICE. (Source: [ONLYOFFICE Help Center][17]) + +[SignServer][18] and [Open eSignForms][19] are free electronic signature services that you can use if you don't need to sign a document right in the editor. Both tools allow you to work with documents, and SignServer also enables you to sign code, including Java, and apply time stamping. + +#### 4\. Watermarking + +Watermarks avoid unauthorized redistribution of your content and protect any confidential information your files might contain. + +**Options:** Collabora Online in Nextcloud or ONLYOFFICE Docs in Nextcloud + +[ONLYOFFICE Docs][20] and [Collabora][21], when integrated with Nextcloud, allow you to embed a watermark in your documents, spreadsheets, and presentations. To activate watermarking, you have to log into your Nextcloud instance as an admin and go to **Secure view settings** on the solution's Settings page. + +You can replace the default watermark with your own text using the placeholders. The watermark will be displayed individually for each user when opening a file. You can also define groups to differentiate users who will see the watermark and select the types of shares that must show the watermark. + +![Watermark][22] + +Watermarking (Ksenia Fedoruk, [CC BY-SA 4.0][23]) + +You can also insert watermarks in your docs in the LibreOffice and ONLYOFFICE desktop apps. However, in this case, it's just a text or an image placed under the main text layer, so anyone can remove it easily. + +#### 5\. Protecting documents with passwords + +Password protection allows you to store and exchange local files securely. If someone accesses your desktop or gets the protected file via email or another method, they won't be able to open it without knowing the password. + +**Options:** Apache OpenOffice, LibreOffice, and ONLYOFFICE Desktop Editors + +All three solutions offer you the ability to set a password for your sensitive documents. + +If a protected doc is important to you, it is strongly recommended you save the password using a password manager or memorize it because LibreOffice, ONLYOFFICE, and [OpenOffice][24] don't offer a password-recovery option. So, if you forget or lose the password, there is no ability to restore or reset it and open the file. + +### Your data belongs to you + +Protect your documents using one or more of these methods to stay safer online. It's the 21st century, and computing is too advanced to risk giving your data to a service outside your control. Use open source and take ownership of your digital life. + +What are your favorite tools for working securely with docs? Please share them in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/secure-documents-open-source + +作者:[Ksenia Fedoruk][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/ksenia-fedoruk +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/documents_papers_file_storage_work.png?itok=YlXpAqAJ (Filing papers and documents) +[2]: https://opensource.com/article/21/3/encryption-luks +[3]: https://opensource.com/article/21/3/luks-truecrypt +[4]: https://nextcloud.com/ +[5]: https://owncloud.com/ +[6]: https://pydio.com/ +[7]: https://www.seafile.com/en/home/ +[8]: https://opensource.com/sites/default/files/uploads/pydiocells.png (Pydio audit control) +[9]: http://pydio.com +[10]: https://www.onlyoffice.com/workspace.aspx +[11]: https://cryptpad.fr/ +[12]: https://opensource.com/sites/default/files/uploads/cryptdrive.png (Encrypted CryptPad storage) +[13]: http://cryptpad.fr +[14]: https://www.libreoffice.org/ +[15]: https://www.onlyoffice.com/desktop.aspx +[16]: https://opensource.com/sites/default/files/uploads/onlyoffice_digitalsig.png (Digital signature in ONLYOFFICE) +[17]: http://helpcenter.onlyoffice.com +[18]: https://www.signserver.org/ +[19]: https://github.com/OpenESignForms +[20]: https://www.onlyoffice.com/office-for-nextcloud.aspx +[21]: https://www.collaboraoffice.com/ +[22]: https://opensource.com/sites/default/files/uploads/onlyoffice_watermark.png (Watermark) +[23]: https://creativecommons.org/licenses/by-sa/4.0/ +[24]: https://www.openoffice.org/ From ca5aff38fc7ec48ec560a31a01c79df3c61b98de Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 21 Apr 2021 05:03:33 +0800 Subject: [PATCH 751/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210420=20?= =?UTF-8?q?A=20beginner's=20guide=20to=20network=20management?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210420 A beginner-s guide to network management.md --- ... beginner-s guide to network management.md | 218 ++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 sources/tech/20210420 A beginner-s guide to network management.md diff --git a/sources/tech/20210420 A beginner-s guide to network management.md b/sources/tech/20210420 A beginner-s guide to network management.md new file mode 100644 index 0000000000..9dc5f8b77f --- /dev/null +++ b/sources/tech/20210420 A beginner-s guide to network management.md @@ -0,0 +1,218 @@ +[#]: subject: (A beginner's guide to network management) +[#]: via: (https://opensource.com/article/21/4/network-management) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +A beginner's guide to network management +====== +Learn how networks work and some tricks to optimize network performance +with open source. +![Tips and gears turning][1] + +Most people connect to at least two networks every day. After you turn on a computer or mobile device, it connects to a local WiFi network, which in turn provides access to the interconnected network of networks that is "the internet" (a combination of the words _inter_connected _net_works). + +But how do networks actually work? How does your device know how to find the internet, a shared printer, or a file share? How do these things know how to respond to your device? What tricks do system administrators use to optimize the performance of a network? + +Open source is firmly embedded into networking technology, so resources on networking are freely available to anyone who wants to learn more. This article covers the basics of network management using open source. + +### What is a network? + +A network of computers is a collection of two or more computers that can communicate with one another. For networking to work, one machine on a network must be able to find another, and communication must be able to get from one machine to another. To resolve this requirement, two different systems were developed and defined: TCP and IP. + +#### TCP for transport + +For computers to communicate, there must be a means of transport for messages between them. When humans talk, the sounds of our voices are made possible by sound waves moving through air. Computers communicate with digital signals carried over Ethernet cables, radio waves, or microwaves. The specifications for this are formally defined as the [TCP protocol][2]. + +#### IP for addressing + +For computers to address one another, they must have some means for identification. When humans address one another, we use names and pronouns. When computers address each other, they use IP addresses, such as `192.168.0.1`, which can be mapped to names, such as Laptop and Desktop or Tux or Penguin. The specifications for this are formally defined as the [IP protocol][3]. + +### Set up a minimal configuration + +The simplest network is a two-computer network using a specially wired Ethernet cable called a **crossover cable**. A crossover cable connects and transmits signals coming from one computer to the appropriate receptors on another computer. There are also crossover adapters that convert a standard Ethernet into a crossover cable. + +![Crossover cable][4] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +With no router between the computers, all network management must be done manually on each machine, making this a good introductory exercise for networking basics. + +With a crossover cable, you can connect two computers together. Because the two computers are connected directly with no network controller to offer guidance, neither computer does anything to create or join a network. Normally, this task would be prompted by a switch and a DHCP server or a router, but in this simple network setup, you are the ultimate authority. + +To create a network, you first must assign an IP address to each computer. The block reserved for self-assigned IP addresses starts with `169.254`, and it's a useful convention for reminding yourself that this is a closed-loop system. + +#### Find a network interface + +First, you must know what network interfaces you're working with. The Ethernet port is usually designated with the term `eth` plus a number starting with `0`, but some devices are reported with different terms. You can discover the interfaces on a computer with the `ip` command: + + +``` +$ ip address show +1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 ... +    link/loopback 00:00:00:00:00:00 brd ... +    inet 127.0.0.1/8 scope host lo +       valid_lft forever preferred_lft forever +    inet6 ::1/128 scope host +       valid_lft forever preferred_lft forever +2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> ... +    link/ether dc:a6:32:be:a3:e1 brd ... +3: wlan0: <BROADCAST,MULTICAST> ... +    link/ether dc:a6:32:be:a3:e2 brd ... +``` + +In this case, `eth0` turns out to be the correct interface name. However, in some cases, you'll see `en0` or `enp0s1` or something similar, so it's important to always verify a device name before using it. + +#### Assign an IP address + +Normally, an IP address is obtained from a router, which broadcasts offers for addresses over the network. When a computer gets connected to a network, it requests an address. The router registers which device on the network, identified by its Media Access Control (MAC) address (this has nothing to do with Apple Mac computers) has been assigned which address. That's how computers know how to find one another across a network. + +In this simple network, however, there is no router handing out IP addresses or registering devices, so you must create an IP address. To assign an IP address to a computer, use the `ip` command: + + +``` +`$ sudo ip address add 169.254.0.1 dev eth0` +``` + +And again on the other computer, this time incrementing the IP address by 1: + + +``` +`$ sudo ip address add 169.254.0.2 dev eth0` +``` + +Now each computer has a means of transport (the crossover cable) and a way to be found on the network (a unique IP address). But this network still lacks one important element: The computers still don't know they're a member of a network. + +#### Set up a route + +Another task that's usually managed by a router is setting up the paths network traffic must take to get from one place to another. This is called a _routing table_, and you can think of it as a very basic city map for your network. + +Currently, no routing table exists on your network. You can view your non-existent routing table with the `route` command: + + +``` +$ route +Kernel IP routing table +Destination | Gateway | Genmask | Flags|Metric|Ref | Use | Iface +$ +``` + +Alternatively, you can view it with the `ip` command: + + +``` +$ ip route +$ +``` + +You can add a route with the `ip` command: + + +``` +$ sudo ip route \ +add 169.254.0.0/24 \ +dev eth0 \ +proto static +``` + +This command adds a route to the address range (starting from `169.254.0.0` and ending at `169.254.0.255`) to the `eth0` interface. It sets the routing protocol to `static` to indicate that you, the administrator, created the route as an intentional override for any dynamic routing. + +Verify your routing table with the `route` command: + + +``` +$ route +Kernel IP routing table +Destination | Gateway | Genmask       | ... | Iface +link-local  | 0.0.0.0 | 255.255.255.0 | ... | eth0 +``` + +Or use the `ip` command for a different view: + + +``` +$ ip route +169.254.0.0/24 dev eth0 proto static scope link +``` + +#### Ping your neighbor + +Now that your network has established a method of transport, a means of addressing, and a network route, you can reach hosts outside your computer. The simplest message to send another computer is a `ping`, which is conveniently also the name of the command that generates the message: + + +``` +$ ping -c1 169.254.0.2 +64 bytes from 169.254.0.2: icmp_seq=1 ttl=64 time=0.233 ms + +\--- 169.254.0.2 ping statistics --- +1 packets transmitted, 1 received, 0% packet loss, time 0ms +rtt min/avg/max/mdev = 0.244/0.244/0.244/0.000 ms +``` + +You can also view the neighbors you've interacted with: + + +``` +$ ip neighbour +169.254.0.2 dev eth0 lladdr e8:6a:64:ac:ef:7c STALE +``` + +### Grow your network with a switch + +There aren't many needs for two-node networks. Special hardware, called a network **switch**, was developed to solve this problem. A network switch allows you to attach several Ethernet cables to it, and it distributes messages indiscriminately from the computer sending it to all computers listening on the switch. All computers ignore the message except for the one with an IP address that matches the intended recipient. This makes for a relatively noisy network, but it's an easy way to physically connect a group of computers. + +A physical switch for physical cables isn't practical or desired on most modern home networks, so a WiFi access point is used instead. A WiFi access point serves the same function as a switch: it allows many computers to connect to it and pass messages between them. + +Access to the Internet is not just an expectation; it's usually the reason home networks exist at all. A switch or WiFi access point without access to the Internet isn't very useful, but to connect your network to another network, you need a router. + +### Add a router + +In practice, local networks connect many devices, and the number is growing as more devices become network-aware. Connect a network to the Internet (a network itself), and that number goes up by orders of magnitude. + +It's impractical to manually configure a network, so common tasks are assigned to specific nodes on the network, and each computer runs a **daemon** (a job that runs silently in the background) to populate network settings received from authoritative servers on the network. On a home network, these jobs are often consolidated into one small embedded device, often provided by your Internet service provider (ISP), called a **router** (people sometimes incorrectly call it a modem). In a large network, each task is usually assigned to a separate dedicated server to ensure focus and resiliency. These include: + + * DHCP server to assign and track IP addresses to devices joining the network + * [DNS server][6] to convert registered domain names like [redhat.com][7] to IP addresses like `209.132.183.105`) + * [Firewall][8] to protect your network from unwanted incoming traffic or forbidden outgoing traffic + * Router to efficiently direct traffic on the network, serve as a gateway to other networks (such as the Internet), and perform network address translation (NAT) + + + +You probably have a router on your network now, and it probably manages all these tasks and possibly more. You can run[ your own open source router][9], thanks to projects like VyOS. For such a project, you should use a dedicated computer with at least two network interface controllers (NICs): one to connect to your ISP and another to connect to a switch or, more likely, a WiFi access point. + +### Scale your knowledge + +Regardless of how many devices are on your network or how many other networks your network connects to, the principles remain the same as with your two-node network. You need a mode of transport, a scheme for addressing, and knowledge of how to reach the network. + +### Networking cheat sheet + +Understanding how a network operates is vital for managing a network. You can't troubleshoot issues unless you understand the results of your tests, and you can't run tests unless you know what commands interact with your network infrastructure. For an overview of important networking commands and what kind of information you can extract with them, [download our updated networking cheat sheet][10]. + +Learn more about software defined networking, network functions virtualization, OpenDaylight,... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/network-management + +作者:[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/gears_devops_learn_troubleshooting_lightbulb_tips_520.png?itok=HcN38NOk (Tips and gears turning) +[2]: https://tools.ietf.org/html/rfc793 +[3]: https://tools.ietf.org/html/rfc791 +[4]: https://opensource.com/sites/default/files/uploads/crossover.jpg (Crossover cable) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: https://opensource.com/article/17/4/build-your-own-name-server +[7]: http://redhat.com +[8]: https://www.redhat.com/sysadmin/secure-linux-network-firewall-cmd +[9]: https://opensource.com/article/20/1/open-source-networking +[10]: https://opensource.com/downloads/cheat-sheet-networking From f3ff5dcfced0423e49046dcb7139b8493b625562 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 21 Apr 2021 05:03:45 +0800 Subject: [PATCH 752/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210420=20?= =?UTF-8?q?Application=20observability=20with=20Apache=20Kafka=20and=20Sig?= =?UTF-8?q?Noz?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210420 Application observability with Apache Kafka and SigNoz.md --- ...ervability with Apache Kafka and SigNoz.md | 157 ++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100644 sources/tech/20210420 Application observability with Apache Kafka and SigNoz.md diff --git a/sources/tech/20210420 Application observability with Apache Kafka and SigNoz.md b/sources/tech/20210420 Application observability with Apache Kafka and SigNoz.md new file mode 100644 index 0000000000..be94aca606 --- /dev/null +++ b/sources/tech/20210420 Application observability with Apache Kafka and SigNoz.md @@ -0,0 +1,157 @@ +[#]: subject: (Application observability with Apache Kafka and SigNoz) +[#]: via: (https://opensource.com/article/21/4/observability-apache-kafka-signoz) +[#]: author: (Nitish Tiwari https://opensource.com/users/tiwarinitish86) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Application observability with Apache Kafka and SigNoz +====== +SigNoz helps developers start meeting their observability goals quickly +and with minimum effort. +![Ship captain sailing the Kubernetes seas][1] + +SigNoz is an open source application observability platform. Built in React and Go, SigNoz is written from the ground up to allow developers to get started with their observability goals as soon as possible and with minimum effort. + +This article looks at the software in detail, including the architecture, Kubernetes-based deployment, and some common SigNoz uses. + +### SigNoz architecture + +SigNoz ties several components together to create a scalable, loosely coupled system that is easy to get started with. Some of the most important components are: + + * OpenTelemetry Collector + * Apache Kafka + * Apache Druid + + + +[OpenTelemetry Collector][2] is the trace or metrics data collection engine. This enables SigNoz to ingest data in industry-standard formats, including Jaeger, Zipkin, and OpenConsensus. Then the collected data is forwarded to Apache Kafka. + +SigNoz uses Kafka and stream processors for real-time ingestion of high volumes of observability data. This data is then passed on to Apache Druid, which excels at storing such data for short- and long-term SQL analysis. + +Once the data is flattened and stored in Druid, SigNoz's query service can query and pass the data to the SigNoz React frontend. The front end then creates nice graphs for users to visualize the observability data. + +![SigNoz architecture][3] + +(Nitish Tiwari, [CC BY-SA 4.0][4]) + +### Install SigNoz + +SigNoz's components include Apache Kafka and Druid. These components are loosely coupled and work in tandem to ensure a seamless experience for the end user. Given all the components, it is best to run SigNoz as a combination of microservices on Kubernetes or Docker Compose (for local testing). + +This example uses a Kubernetes Helm chart-based deployment to install SigNoz on Kubernetes. As a prerequisite, you'll need a Kubernetes cluster. If you don't have a Kubernetes cluster available, you can use tools like [MiniKube][5] or [Kind][6] to create a test cluster on your local machine. Note that the machine should have at least 4GB available for this to work. + +Once you have the cluster available and kubectl configured to communicate with the cluster, run: + + +``` +$ git clone && cd signoz + +$ helm dependency update deploy/kubernetes/platform + +$ kubectl create ns platform + +$ helm -n platform install signoz deploy/kubernetes/platform + +$ kubectl -n platform apply -Rf deploy/kubernetes/jobs + +$ kubectl -n platform apply -f deploy/kubernetes/otel-collector +``` + +This installs SigNoz and related containers on the cluster. To access the user interface (UI), run the `kubectl port-forward` command; for example: + + +``` +`$ kubectl -n platform port-forward svc/signoz-frontend 3000:3000` +``` + +You should now be able to access your SigNoz dashboard using a local browser on the address `http://localhost:3000`. + +Now that your observability platform is up, you need an application that generates observability data to visualize and trace. For this example, you can use [HotROD][7], a sample application developed by the Jaegar team. + +To install it, run: + + +``` +$ kubectl create ns sample-application + +$ kubectl -n sample-application apply -Rf sample-apps/hotrod/ +``` + +### Explore the features + +You should now have a sample application with proper instrumentation up and running in the demo setup. Look at the SigNoz dashboard for metrics and trace data. As you land on the dashboard's home, you will see a list of all the configured applications that are sending instrumentation data to SigNoz. + +![SigNoz dashboard][8] + +(Nitish Tiwari, [CC BY-SA 4.0][4]) + +#### Metrics + +When you click on a specific application, you will land on the application's homepage. The Metrics page displays the last 15 minutes worth (this number is configurable) of information, like application latency, average throughput, error rate, and the top endpoints the application is accessing. This gives you a birds-eye view of the application's status. Any spikes in errors, latency, or load are immediately visible. + +![Metrics in SigNoz][9] + +(Nitish Tiwari, [CC BY-SA 4.0][4]) + +#### Tracing + +The Traces page lists every request in chronological order with high-level details. As soon as you identify a single request of interest (e.g., something taking longer than expected to complete), you can click the trace and look at individual spans for every action that happened inside that request. The drill-down mode offers thorough inspection for each request. + +![Tracing in SigNoz][10] + +(Nitish Tiwari, [CC BY-SA 4.0][4]) + +![Tracing in SigNoz][11] + +(Nitish Tiwari, [CC BY-SA 4.0][4]) + +#### Usage Explorer + +Most of the metrics and tracing data are very useful, but only for a certain period. As time passes, the data ceases to be useful in most cases. This means it is important to plan a proper retention duration for data; otherwise, you will pay more for the storage. The Usage Explorer provides an overview of ingested data per hour, day, and week. + +![SigNoz Usage Explorer][12] + +(Nitish Tiwari, [CC BY-SA 4.0][4]) + +### Add instrumentation + +So far, you've been looking at metrics and traces from the sample HotROD application. Ideally, you'll want to instrument your application so that it sends observability data to SigNoz. Do this by following the [Instrumentation Overview][13] on SigNoz's website. + +SigNoz supports a vendor-agnostic instrumentation library, OpenTelemetry, as the primary way to configure instrumentation. OpenTelemetry offers instrumentation libraries for various languages with support for both automatic and manual instrumentation. + +### Learn more + +SigNoz helps developers get started quickly with metrics and tracing applications. To learn more, you can consult the [documentation][14], join the [community][15], and access the source code on [GitHub][16]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/observability-apache-kafka-signoz + +作者:[Nitish Tiwari][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/tiwarinitish86 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/ship_captain_devops_kubernetes_steer.png?itok=LAHfIpek (Ship captain sailing the Kubernetes seas) +[2]: https://github.com/open-telemetry/opentelemetry-collector +[3]: https://opensource.com/sites/default/files/uploads/signoz_architecture.png (SigNoz architecture) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://minikube.sigs.k8s.io/docs/start/ +[6]: https://kind.sigs.k8s.io/docs/user/quick-start/ +[7]: https://github.com/jaegertracing/jaeger/tree/master/examples/hotrod +[8]: https://opensource.com/sites/default/files/uploads/signoz_dashboard.png (SigNoz dashboard) +[9]: https://opensource.com/sites/default/files/uploads/signoz_applicationmetrics.png (Metrics in SigNoz) +[10]: https://opensource.com/sites/default/files/uploads/signoz_tracing.png (Tracing in SigNoz) +[11]: https://opensource.com/sites/default/files/uploads/signoz_tracing2.png (Tracing in SigNoz) +[12]: https://opensource.com/sites/default/files/uploads/signoz_usageexplorer.png (SigNoz Usage Explorer) +[13]: https://signoz.io/docs/instrumentation/overview/ +[14]: https://signoz.io/docs/ +[15]: https://github.com/SigNoz/signoz#community +[16]: https://github.com/SigNoz/signoz From e0a9987b3cc5123ef00aaa1c70c318f01f590e70 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 21 Apr 2021 08:45:09 +0800 Subject: [PATCH 753/818] translated --- ...in Ubuntu and Other Linux Distributions.md | 101 ------------------ ...in Ubuntu and Other Linux Distributions.md | 101 ++++++++++++++++++ 2 files changed, 101 insertions(+), 101 deletions(-) delete mode 100644 sources/tech/20210210 How to Add Fingerprint Login in Ubuntu and Other Linux Distributions.md create mode 100644 translated/tech/20210210 How to Add Fingerprint Login in Ubuntu and Other Linux Distributions.md diff --git a/sources/tech/20210210 How to Add Fingerprint Login in Ubuntu and Other Linux Distributions.md b/sources/tech/20210210 How to Add Fingerprint Login in Ubuntu and Other Linux Distributions.md deleted file mode 100644 index 1fd15cf3ac..0000000000 --- a/sources/tech/20210210 How to Add Fingerprint Login in Ubuntu and Other Linux Distributions.md +++ /dev/null @@ -1,101 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Add Fingerprint Login in Ubuntu and Other Linux Distributions) -[#]: via: (https://itsfoss.com/fingerprint-login-ubuntu/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -How to Add Fingerprint Login in Ubuntu and Other Linux Distributions -====== - -Many high-end laptops come with fingerprint readers these days. Windows and macOS have been supporting fingerprint login for some time. In desktop Linux, the support for fingerprint login was more of geeky tweaks but [GNOME][1] and [KDE][2] have started supporting it through system settings. - -This means that on newer Linux distribution versions, you can easily use fingerprint reading. I am going to enable fingerprint login in Ubuntu here but you may use the steps on other distributions running GNOME 3.38. - -Prerequisite - -This is obvious, of course. Your computer must have a fingerprint reader. - -This method works for any Linux distribution running GNOME version 3.38 or higher. If you are not certain, you may [check which desktop environment version you are using][3]. - -KDE 5.21 also has a fingerprint manager. The screenshots will look different, of course. - -### Adding fingerprint login in Ubuntu and other Linux distributions - -Go to **Settings** and the click on **Users** from left sidebar. You should see all the user account on your system here. You’ll see several option including **Fingerprint Login**. - -Click on the Fingerprint Login option here. - -![Enable fingerprint login in Ubuntu][4] - -It will immediately ask you to scan a new fingerprint. When you click the + sign to add a fingerprint, it presents a few predefined options so that you can easily identify which finger or thumb it is. - -You may of course scan left thumb by clicking right index finger though I don’t see a good reason why you would want to do that. - -![Adding fingerprint][5] - -While adding the fingerprint, rotate your finger or thumb as directed. - -![Rotate your finger][6] - -Once the system registers the entire finger, it will give you a green signal that the fingerprint has been added. - -![Fingerprint successfully added][7] - -If you want to test it right away, lock the screen by pressing Super+L keyboard shortcut in Ubuntu and then using the fingerprint for login. - -![Login With Fingerprint in Ubuntu][8] - -#### Experience with fingerprint login on Ubuntu - -Fingerprint login is what its name suggests: login using your fingerprint. That’s it. You cannot use your finger when it asks for authentication for programs that need sudo access. It’s not a replacement of your password. - -One more thing. The fingerprint login allows you to log in but you cannot use your finger when your system asks for sudo password. The [keyring in Ubuntu][9] also remains locked. - -Another annoying thing is because of GNOME’s GDM login screen. When you login, you have to click on your account first to get to the password screen. This is where you can use your finger. It would have been nicer to not bothered about clicking the user account ID first. - -I also notice that fingerprint reading is not as smooth and quick as it is in Windows. It works, though. - -If you are somewhat disappointed with the fingerprint login on Linux, you may disable it. Let me show you the steps in the next section. - -### Disable fingerprint login - -Disabling fingerprint login is pretty much the same as enabling it in the first place. - -Go to **Settings→User** and then click on Fingerprint Login option. It will show a screen with options to add more fingerprints or delete the existing ones. You need to delete the existing fingerprints. - -![Disable Fingerprint Login][10] - -Fingerprint login does have some benefits, specially for lazy people like me. I don’t have to type my password every time I lock the screen and I am happy with the limited usage. - -Enabling sudo with fingerprint should not be entirely impossible with [PAM][11]. I remember that when I [set up face unlock in Ubuntu][12], it could be used with sudo as well. Let’s see if future versions add this feature. - -Do you have a laptop with fingerprint reader? Do you use it often or is it just one of things you don’t care about? - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/fingerprint-login-ubuntu/ - -作者:[Abhishek Prakash][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/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://www.gnome.org/ -[2]: https://kde.org/ -[3]: https://itsfoss.com/find-desktop-environment/ -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/enable-fingerprint-ubuntu.png?resize=800%2C607&ssl=1 -[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/adding-fingerprint-login-ubuntu.png?resize=800%2C496&ssl=1 -[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/adding-fingerprint-ubuntu-linux.png?resize=800%2C603&ssl=1 -[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/fingerprint-added-ubuntu.png?resize=797%2C510&ssl=1 -[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/login-with-fingerprint-ubuntu.jpg?resize=800%2C320&ssl=1 -[9]: https://itsfoss.com/ubuntu-keyring/ -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/disable-fingerprint-login.png?resize=798%2C524&ssl=1 -[11]: https://tldp.org/HOWTO/User-Authentication-HOWTO/x115.html -[12]: https://itsfoss.com/face-unlock-ubuntu/ diff --git a/translated/tech/20210210 How to Add Fingerprint Login in Ubuntu and Other Linux Distributions.md b/translated/tech/20210210 How to Add Fingerprint Login in Ubuntu and Other Linux Distributions.md new file mode 100644 index 0000000000..6a9000c8ba --- /dev/null +++ b/translated/tech/20210210 How to Add Fingerprint Login in Ubuntu and Other Linux Distributions.md @@ -0,0 +1,101 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Add Fingerprint Login in Ubuntu and Other Linux Distributions) +[#]: via: (https://itsfoss.com/fingerprint-login-ubuntu/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +如何在 Ubuntu 和其他 Linux 发行版中添加指纹登录 +====== + +现在很多高端笔记本都配备了指纹识别器。Windows 和 macOS 支持指纹登录已经有一段时间了。在桌面 Linux 中,对指纹登录的支持更多的是极客的调整,但 [GNOME][1] 和 [KDE][2] 已经开始通过系统设置来支持它。 + +这意味着在新的 Linux 发行版上,你可以轻松使用指纹识别。在这里我将在 Ubuntu 中启用指纹登录,但你也可以在其他运行 GNOME 3.38 的发行版上使用这些步骤。 + +前提条件 + +当然,这是显而易见的。你的电脑必须有一个指纹识别器。 + +这个方法适用于任何运行 GNOME 3.38 或更高版本的 Linux 发行版。如果你不确定,你可以[检查你使用的桌面环境版本][3]。 + +KDE 5.21 也有一个指纹管理器。当然,截图看起来会有所不同。 + +### 在 Ubuntu 和其他 Linux 发行版中添加指纹登录功能 + +进入 **Settings** ,然后点击左边栏的 **Users**。你应该可以看到系统中所有的用户账号。你会看到几个选项,包括 **Fingerprint Login**。 + +点击这里的指纹登录选项。 + +![Enable fingerprint login in Ubuntu][4] + +它将立即要求你扫描一个新的指纹。当你点击 “+” 号来添加指纹时,它会提供一些预定义的选项,这样你就可以很容易地识别出它是哪根手指或拇指。 + +当然,你可以点击右手食指但扫描左手拇指,不过我看不出你有什么好的理由要这么做。 + +![Adding fingerprint][5] + +在添加指纹时,请按照指示旋转你的手指或拇指。 + +![Rotate your finger][6] + +系统登记了整个手指后,就会给你一个绿色的信号,表示已经添加了指纹。 + +![Fingerprint successfully added][7] + +如果你想马上测试一下,在 Ubuntu 中按 Super+L 快捷键锁定屏幕,然后使用指纹进行登录。 + +![Login With Fingerprint in Ubuntu][8] + +#### 在 Ubuntu 上使用指纹登录的经验 + +指纹登录顾名思义就是用指纹登录。就是这样。当它要求对需要 sudo 访问的程序进行认证时,你不能使用手指。它不能代替你的密码。 + +还有一件事。指纹登录可以让你登录,但当系统要求输入 sudo 密码时,你不能用手指。Ubuntu 中的 [keyring][9] 也仍然是锁定的。 + +另一件烦人的事情是因为 GNOME 的 GDM 登录界面。当你登录时,你必须先点击你的账户才能进入密码界面。你在这可以使用手指。如果不用麻烦先点击用户帐户 ID 就更好了。 + +我还注意到,指纹识别没有 Windows 中那么流畅和快速。不过,它可以使用。 + +如果你对 Linux 上的指纹登录有些失望,你可以禁用它。让我在下一节告诉你步骤。 + +### 禁用指纹登录 + +禁用指纹登录和最初启用指纹登录差不多。 + +进入 **Settings→User**,然后点击指纹登录选项。它会显示一个有添加更多指纹或删除现有指纹的页面。你需要删除现有的指纹。 + +![Disable Fingerprint Login][10] + +指纹登录确实有一些好处,特别是对于我这种懒人来说。我不用每次锁屏时输入密码,我也对这段有限的使用感到满意。 + +用 [PAM][11] 启用指纹解锁 sudo 应该不是完全不可能。我记得我[在 Ubuntu 中设置脸部解锁][12]时,也可以用于 sudo。看看以后的版本是否会增加这个功能吧。 + +你有带指纹识别器的笔记本吗?你是否经常使用它,或者它只是你不关心的东西之一? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/fingerprint-login-ubuntu/ + +作者:[Abhishek Prakash][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://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://www.gnome.org/ +[2]: https://kde.org/ +[3]: https://itsfoss.com/find-desktop-environment/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/enable-fingerprint-ubuntu.png?resize=800%2C607&ssl=1 +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/adding-fingerprint-login-ubuntu.png?resize=800%2C496&ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/adding-fingerprint-ubuntu-linux.png?resize=800%2C603&ssl=1 +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/fingerprint-added-ubuntu.png?resize=797%2C510&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/login-with-fingerprint-ubuntu.jpg?resize=800%2C320&ssl=1 +[9]: https://itsfoss.com/ubuntu-keyring/ +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/disable-fingerprint-login.png?resize=798%2C524&ssl=1 +[11]: https://tldp.org/HOWTO/User-Authentication-HOWTO/x115.html +[12]: https://itsfoss.com/face-unlock-ubuntu/ From 9e0533b270ceed35506813d0d7c62b2a27a7df1d Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 21 Apr 2021 08:52:51 +0800 Subject: [PATCH 754/818] translating --- ... Ambient Noise App With Variety of Sounds to Stay Focused.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210420 Blanket- Ambient Noise App With Variety of Sounds to Stay Focused.md b/sources/tech/20210420 Blanket- Ambient Noise App With Variety of Sounds to Stay Focused.md index 27bfbe6d37..cce8abbd45 100644 --- a/sources/tech/20210420 Blanket- Ambient Noise App With Variety of Sounds to Stay Focused.md +++ b/sources/tech/20210420 Blanket- Ambient Noise App With Variety of Sounds to Stay Focused.md @@ -2,7 +2,7 @@ [#]: via: (https://itsfoss.com/blanket-ambient-noise-app/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From dd90c119d23fcabe1098838c0b710dbcec6cdeb9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 21 Apr 2021 18:49:15 +0800 Subject: [PATCH 755/818] PRF @tt67wq --- ...e dynamic and static libraries in Linux.md | 130 +++++++----------- 1 file changed, 51 insertions(+), 79 deletions(-) diff --git a/translated/tech/20200617 How to handle dynamic and static libraries in Linux.md b/translated/tech/20200617 How to handle dynamic and static libraries in Linux.md index bc951369bb..19454dbd89 100644 --- a/translated/tech/20200617 How to handle dynamic and static libraries in Linux.md +++ b/translated/tech/20200617 How to handle dynamic and static libraries in Linux.md @@ -1,24 +1,25 @@ [#]: collector: (lujun9972) [#]: translator: (tt67wq) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to handle dynamic and static libraries in Linux) [#]: via: (https://opensource.com/article/20/6/linux-libraries) [#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99) -怎样在 Linux 中处理动态和静态库 +怎样在 Linux 中使用动态和静态库 ====== -了解 Linux 如何使用库,包括静态库和动态库的差别,有助于你解决依赖问题。![Hand putting a Linux file folder into a drawer][1] + +> 了解 Linux 如何使用库,包括静态库和动态库的差别,有助于你解决依赖问题。 + +![](https://img.linux.net.cn/data/attachment/album/202104/21/184822euzoqsiwxxpiqqrr.jpg) Linux 从某种意义上来说就是一堆相互依赖的静态和动态库。对于 Linux 系统新手来说,库的整个处理过程简直是个迷。但对有经验的人来说,被构建进操作系统的大量共享代码对于编写新应用来说却是个优点。 - -为了让你熟悉这个话题,我准备了一个小巧的[应用例子 ][2] 来展示在常用 Linux 发行版(在其他操作系统上未验证)上最常用的可行方法。为了用这个例子来跟上这个需要动手的教程,打开命令行输入: - +为了让你熟悉这个话题,我准备了一个小巧的 [应用例子][2] 来展示在普通的 Linux 发行版(在其他操作系统上未验证)上是经常是如何处理库的。为了用这个例子来跟上这个需要动手的教程,请打开命令行输入: ``` -$ git clone +$ git clone https://github.com/hANSIc99/library_sample $ cd library_sample/ $ make cc -c main.c -Wall -Werror @@ -34,8 +35,7 @@ $ make clean rm *.o ``` -当执行完这些命令,这些文件应当被添加进目录下(执行 `ls` 来查看): - +当执行完这些命令,这些文件应当被添加进目录下(执行 `ls` 来查看): ``` my_app @@ -45,20 +45,18 @@ libmy_shared.so ### 关于静态链接 -当你的应用链接了一个静态库,这个库的代码就变成了可执行结果的一部分。这个动作只在链接过程中执行一次,这些静态库通常以 `.a` 扩展符结尾。 +当你的应用链接了一个静态库,这个库的代码就变成了可执行文件的一部分。这个动作只在链接过程中执行一次,这些静态库通常以 `.a` 扩展符结尾。 -静态库是多个对象文件的打包。这些目标文件通常是 ELF 格式的。ELF 是 [Executable and Linkable Format][4] 的简写,可以兼容多个操作系统。 - -`file` 命令的输出告诉你静态库 `libmy_static.a` 是 `ar` 格式的压缩文件类型。 +静态库是多个目标object文件的归档archive([ar][3])。这些目标文件通常是 ELF 格式的。ELF 是 [可执行可链接格式][4]Executable and Linkable Format 的简写,它与多个操作系统兼容。 +`file` 命令的输出可以告诉你静态库 `libmy_static.a` 是 `ar` 格式的归档文件类型。 ``` $ file libmy_static.a libmy_static.a: current ar archive ``` -使用 `ar -t`,你可以看到压缩包内部;它展示了两个目标文件: - +使用 `ar -t`,你可以看到归档文件的内部。它展示了两个目标文件: ``` $ ar -t libmy_static.a @@ -66,8 +64,7 @@ libmy_static_a.o libmy_static_b.o ``` -你可以用 `ax -x ` 命令来提取压缩包的文件。被提出的都是 ELF 格式的对象文件: - +你可以用 `ax -x ` 命令来提取归档文件的文件。被提出的都是 ELF 格式的目标文件: ``` $ ar -x libmy_static.a @@ -77,33 +74,31 @@ libmy_static_a.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stri ### 关于动态链接 -动态链接的指的是使用共享库。共享库通常以 `.so` 的扩展符结尾 ("shared object" 的简写)。 +动态链接指的是使用共享库。共享库通常以 `.so` 的扩展名结尾(“共享对象shared object” 的简写)。 -共享库是 Linux 系统中依赖管理最常用的方法。这些共享库在应用启动前被载入内存,当多个应用都需要同一个库时,这个库在系统中只会被加载一次。这个特点减少了应用的内存占用。 +共享库是 Linux 系统中依赖管理的最常用方法。这些共享库在应用启动前被载入内存,当多个应用都需要同一个库时,这个库在系统中只会被加载一次。这个特性减少了应用的内存占用。 -另外一个值得注意的点是,当一个共享库的 bug 被修复后,所有引用了这个库的应用都会受益。这也意味着,如果一个 bug 还没被发现,那所有相关的应用都会遭受这个 bug 影响(如果这个应用使用了受影响的部分)。 +另外一个值得注意的地方是,当一个共享库的 bug 被修复后,所有引用了这个库的应用都会受益。但这也意味着,如果一个 bug 还没被发现,那所有相关的应用都会遭受这个 bug 影响(如果这个应用使用了受影响的部分)。 -当一个应用需要某个特定版本的库,但是链接器只知道某个不兼容版本的位置,对于初学者来说这个问题非常棘手。在这个场景下,你必须帮助链接器找到正确版本的路径。 +当一个应用需要某个特定版本的库,但是链接器linker只知道某个不兼容版本的位置,对于初学者来说这个问题非常棘手。在这个场景下,你必须帮助链接器找到正确版本的路径。 -尽管这不是一个需要每天处理的问题,但是理解动态链接的原理总是有助于你修复类似的问题。 +尽管这不是一个每天都会遇到的问题,但是理解动态链接的原理总是有助于你修复类似的问题。 幸运的是,动态链接的机制其实非常简洁明了。 为了检查一个应用在启动时需要哪些库,你可以使用 `ldd` 命令,它会打印出给定文件所需的动态库: - ``` $ ldd my_app         linux-vdso.so.1 (0x00007ffd1299c000) -        libmy_shared.so => not found -        libc.so.6 => /lib64/libc.so.6 (0x00007f56b869b000) +        libmy_shared.so => not found +        libc.so.6 => /lib64/libc.so.6 (0x00007f56b869b000)         /lib64/ld-linux-x86-64.so.2 (0x00007f56b8881000) ``` -注意到 `libmy_shared.so` 库是代码仓库的一部分但是没有被找到。这是因为负责在应用启动之前将所有依赖加载进内存的动态链接器没有在它搜索的标准路径下找到这个库。 - -对新手来说,与常用库(例如 `bizp2`) 版本不兼容相关的问题往往十分令人困惑。一种方法是把该仓库的路径加入到环境变量 `LD_LIBRARY_PATH` 中来告诉链接器去哪里找到正确的版本。在本例中,正确的版本就在这个目录下,所以你可以导出它至环境变量: +可以注意到 `libmy_shared.so` 库是代码仓库的一部分,但是没有被找到。这是因为负责在应用启动之前将所有依赖加载进内存的动态链接器没有在它搜索的标准路径下找到这个库。 +对新手来说,与常用库(例如 `bizp2`)版本不兼容相关的问题往往十分令人困惑。一种方法是把该仓库的路径加入到环境变量 `LD_LIBRARY_PATH` 中来告诉链接器去哪里找到正确的版本。在本例中,正确的版本就在这个目录下,所以你可以导出它至环境变量: ``` $ LD_LIBRARY_PATH=$(pwd):$LD_LIBRARY_PATH @@ -112,19 +107,16 @@ $ export LD_LIBRARY_PATH 现在动态链接器知道去哪找库了,应用也可以执行了。你可以再次执行 `ldd` 去调用动态链接器,它会检查应用的依赖然后加载进内存。内存地址会在对象路径后展示: - ``` $ ldd my_app         linux-vdso.so.1 (0x00007ffd385f7000) -        libmy_shared.so => /home/stephan/library_sample/libmy_shared.so (0x00007f3fad401000) -        libc.so.6 => /lib64/libc.so.6 (0x00007f3fad21d000) +        libmy_shared.so => /home/stephan/library_sample/libmy_shared.so (0x00007f3fad401000) +        libc.so.6 => /lib64/libc.so.6 (0x00007f3fad21d000)         /lib64/ld-linux-x86-64.so.2 (0x00007f3fad408000) ``` 想知道哪个链接器被调用了,你可以用 `file` 命令: - - ``` $ file my_app my_app: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=26c677b771122b4c99f0fd9ee001e6c743550fa6, for GNU/Linux 3.2.0, not stripped @@ -132,68 +124,60 @@ my_app: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, 链接器 `/lib64/ld-linux-x86–64.so.2` 是一个指向 `ld-2.30.so` 的软链接,它也是我的 Linux 发行版的默认链接器: - ``` $ file /lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2: symbolic link to ld-2.31.so ``` -回头看看 `ldd` 命令的输出,你还可以看到(在 `libmy_shared.so` 边上)每个依赖都以一个数字结尾(例如 `/lib64/libc.so.6`)。共享对象的常见命名格式为: - +回头看看 `ldd` 命令的输出,你还可以看到(在 `libmy_shared.so` 边上)每个依赖都以一个数字结尾(例如 `/lib64/libc.so.6`)。共享对象的常见命名格式为: ``` -`**lib** XYZ.so **.** . ****` +libXYZ.so.. ``` -在我的系统中,`libc.so.6` 也是指向同一目录下的共享对象 `libc-2.30.so` 的软链接。 - +在我的系统中,`libc.so.6` 也是指向同一目录下的共享对象 `libc-2.31.so` 的软链接。 ``` $ file /lib64/libc.so.6 /lib64/libc.so.6: symbolic link to libc-2.31.so ``` -如果你正在面对一个应用因为加载库的版本不对导致无法启动的问题,有很大可能你可以通过检查整理这些软链接或者确定正确的搜索路径(查看下方"动态链接器:ld.so") 来解决这个问题。 +如果你正在面对一个应用因为加载库的版本不对导致无法启动的问题,有很大可能你可以通过检查整理这些软链接或者确定正确的搜索路径(查看下方“动态加载器:ld.so”一节)来解决这个问题。 -更为详细的信息请查看 [`ldd`man 手册 ][5] +更为详细的信息请查看 [ldd 手册页][5]。 #### 动态加载 -动态加载的意思是一个库(例如一个 `.so` 文件)在程序的运行时被加载。这是使用某种特定的编程方法实现的。 +动态加载的意思是一个库(例如一个 `.so` 文件)在程序的运行时被加载。这是使用某种特定的编程方法实现的。 -当一个应用使用运行时可编辑的插件时,动态加载会生效。 +当一个应用使用可以在运行时改变的插件时,就会使用动态加载。 -查看 [`dlopen`man 手册 ][6] 获取更多信息。 +查看 [dlopen 手册页][6] 获取更多信息。 #### 动态加载器:ld.so -在 Linux 系统中,你很大可能正在跟共享库打交道,所以必须有个机制来检测一个应用的依赖并将其加载进内存中。 - +在 Linux 系统中,你几乎总是正在跟共享库打交道,所以必须有个机制来检测一个应用的依赖并将其加载进内存中。 `ld.so` 按以下顺序在这些地方寻找共享对象: - 1。应用的绝对路径或相对路径下 (GCC 编译器用 `-rpath` 选项来硬编码) - 2。环境变量 `LD_LIBRARY_PATH` - 3。`/etc/ld.so.cache` 文件 - - -需要记住的是,将一个库加到系统归档 `/usr/lib64` 中需要管理员权限。你可以手动拷贝 `libmy_shared.so` 至库归档中来让应用可用而避免设置 `LD_LIBRARY_PATH`。 + 1. 应用的绝对路径或相对路径下(用 GCC 编译器的 `-rpath` 选项硬编码的) + 2. 环境变量 `LD_LIBRARY_PATH` + 3. `/etc/ld.so.cache` 文件 +需要记住的是,将一个库加到系统库归档 `/usr/lib64` 中需要管理员权限。你可以手动拷贝 `libmy_shared.so` 至库归档中来让应用可以运行,而避免设置 `LD_LIBRARY_PATH`。 ``` unset LD_LIBRARY_PATH sudo cp libmy_shared.so /usr/lib64/ ``` - 当你运行 `ldd` 时,你现在可以看到归档库的路径被展示出来: - ``` $ ldd my_app         linux-vdso.so.1 (0x00007ffe82fab000) -        libmy_shared.so => /lib64/libmy_shared.so (0x00007f0a963e0000) -        libc.so.6 => /lib64/libc.so.6 (0x00007f0a96216000) +        libmy_shared.so => /lib64/libmy_shared.so (0x00007f0a963e0000) +        libc.so.6 => /lib64/libc.so.6 (0x00007f0a96216000)         /lib64/ld-linux-x86-64.so.2 (0x00007f0a96401000) ``` @@ -201,44 +185,40 @@ $ ldd my_app 如果你想你的应用使用你的共享库,你可以在编译时指定一个绝对或相对路径。 -编辑 makefile( 第 10 行)然后通过 `make -B` 来重新编译程序。然后 `ldd` 输出显示 `libmy_shared.so` 和它的绝对路径一起被列出来了。 +编辑 `makefile`(第 10 行)然后通过 `make -B` 来重新编译程序。然后 `ldd` 输出显示 `libmy_shared.so` 和它的绝对路径一起被列出来了。 把这个: - ``` -`CFLAGS =-Wall -Werror -Wl,-rpath,$(shell pwd)` +CFLAGS =-Wall -Werror -Wl,-rpath,$(shell pwd) ``` -改成这个(记得修改用户名): - +改成这个(记得修改用户名): ``` -`CFLAGS =/home/stephan/library_sample/libmy_shared.so` +CFLAGS =/home/stephan/library_sample/libmy_shared.so ``` 然后重新编译: - ``` -`$ make` +$ make ``` 确认下它正在使用你设定的绝对路径,你可以在输出的第二行看到: - ``` $ ldd my_app     linux-vdso.so.1 (0x00007ffe143ed000) -        libmy_shared.so => /lib64/libmy_shared.so (0x00007fe50926d000) +        libmy_shared.so => /lib64/libmy_shared.so (0x00007fe50926d000)         /home/stephan/library_sample/libmy_shared.so (0x00007fe509268000) -        libc.so.6 => /lib64/libc.so.6 (0x00007fe50909e000) +        libc.so.6 => /lib64/libc.so.6 (0x00007fe50909e000)         /lib64/ld-linux-x86-64.so.2 (0x00007fe50928e000) ``` 这是个不错的例子,但是如果你在编写给其他人用的库,它是怎样工作的呢?新库的路径可以通过写入 `/etc/ld.so.conf` 或是在 `/etc/ld.so.conf.d/` 目录下创建一个包含路径的 `.conf` 文件来注册至系统。之后,你必须执行 `ldconfig` 命令来覆写 `ld.so.cache` 文件。这一步有时候在你装了携带特殊的共享库的程序来说是不可省略的。 -查看 [`ld.so` 的 man 手册 ][7] 获取更多详细信息。 +查看 [ld.so 的手册页][7] 获取更多详细信息。 ### 怎样处理多种架构 @@ -249,32 +229,24 @@ $ ldd my_app * 32 位:`/usr/lib` * 64 位:`/usr/lib64` - - **Debian 家族** * 32 位:`/usr/lib/i386-linux-gnu` * 64 位:`/usr/lib/x86_64-linux-gnu` - - **Arch Linux 家族** * 32 位:`/usr/lib32` * 64 位:`/usr/lib64` - - -[**FreeBSD**][8] (技术上来说不算 Linux 发行版) +[FreeBSD][8](技术上来说不算 Linux 发行版) * 32 位:`/usr/lib32` * 64 位:`/usr/lib` - - 知道去哪找这些关键库可以让库链接失效的问题成为历史。 -虽然刚开始会有点困惑,但是理解 Linux 库的依赖管理是一种对操作系统掌控感的表现。用其他应用按这些步骤执行下来增加常用库的熟练度,然后继续学习怎样解决任何你可能遇到的库的挑战。 +虽然刚开始会有点困惑,但是理解 Linux 库的依赖管理是一种对操作系统掌控感的表现。在其他应用程序中运行这些步骤,以熟悉常见的库,然后继续学习怎样解决任何你可能遇到的库的挑战。 -------------------------------------------------------------------------------- @@ -283,7 +255,7 @@ via: https://opensource.com/article/20/6/linux-libraries 作者:[Stephan Avenwedde][a] 选题:[lujun9972][b] 译者:[tt67wq](https://github.com/tt67wq) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 14d5e9677e716059430ddfa7979d720685f71480 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 21 Apr 2021 18:51:20 +0800 Subject: [PATCH 756/818] PUB @tt67wq https://linux.cn/article-13318-1.html --- ...617 How to handle dynamic and static libraries in Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200617 How to handle dynamic and static libraries in Linux.md (99%) diff --git a/translated/tech/20200617 How to handle dynamic and static libraries in Linux.md b/published/20200617 How to handle dynamic and static libraries in Linux.md similarity index 99% rename from translated/tech/20200617 How to handle dynamic and static libraries in Linux.md rename to published/20200617 How to handle dynamic and static libraries in Linux.md index 19454dbd89..d74b9a4b50 100644 --- a/translated/tech/20200617 How to handle dynamic and static libraries in Linux.md +++ b/published/20200617 How to handle dynamic and static libraries in Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (tt67wq) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13318-1.html) [#]: subject: (How to handle dynamic and static libraries in Linux) [#]: via: (https://opensource.com/article/20/6/linux-libraries) [#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99) From cc9e6b9c4b5116ecab41d848c5a36a071ae7ad4b Mon Sep 17 00:00:00 2001 From: Kevin3599 <69574926+Kevin3599@users.noreply.github.com> Date: Wed, 21 Apr 2021 20:20:48 +0800 Subject: [PATCH 757/818] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=BF=BB=E8=AF=91=20?= =?UTF-8?q?(#21672)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update 20200106 Open Source Supply Chain- A Matter of Trust.md * Create 20200106 Open Source Supply Chain- A Matter of Trust.md 申请译文 * Update 20200106 Open Source Supply Chain- A Matter of Trust.md 申请译文 * Update 20200106 Open Source Supply Chain- A Matter of Trust.md 申请译文 * Update 20200106 Open Source Supply Chain- A Matter of Trust.md 完成翻译 * Update 20200106 Open Source Supply Chain- A Matter of Trust.md * Rename sources/talk/20200106 Open Source Supply Chain- A Matter of Trust.md to translated/talk/20200106 Open Source Supply Chain- A Matter of Trust.md * Update 20200106 Open Source Supply Chain- A Matter of Trust.md * Update 20200106 Open Source Supply Chain- A Matter of Trust.md * Update 20200106 Open Source Supply Chain- A Matter of Trust.md --- ... Source Supply Chain- A Matter of Trust.md | 69 ------------------- ... Source Supply Chain- A Matter of Trust.md | 66 ++++++++++++++++++ 2 files changed, 66 insertions(+), 69 deletions(-) delete mode 100644 sources/talk/20200106 Open Source Supply Chain- A Matter of Trust.md create mode 100644 translated/talk/20200106 Open Source Supply Chain- A Matter of Trust.md diff --git a/sources/talk/20200106 Open Source Supply Chain- A Matter of Trust.md b/sources/talk/20200106 Open Source Supply Chain- A Matter of Trust.md deleted file mode 100644 index 3484c3ca55..0000000000 --- a/sources/talk/20200106 Open Source Supply Chain- A Matter of Trust.md +++ /dev/null @@ -1,69 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Open Source Supply Chain: A Matter of Trust) -[#]: via: (https://www.linux.com/articles/open-source-supply-chain-a-matter-of-trust/) -[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) - -Open Source Supply Chain: A Matter of Trust -====== - -[![][1]][2] - -_**Co-authored by Curtis Franklin, Jr**_ - -Open source software is often considered safer and more secure than proprietary software because users can, if they want, compile the software from the source code. They know the source of the code running in their environment.  Every component that they are running in their environment can be audited and the developer held accountable.   - -However, users and vendors are moving away from complexity that comes with total control and embracing convenience and ease of use. - -“I am often taken aback when I see a talk around security and privacy and then the presenter runs the ‘docker run’ command to install and run some random binary downloaded from the internet,” said [Dirk Hohndel, Vice-President and Chief Open Source Officer at VMware.][3] “Those two things seem to be a little bit at odds with each other.” - -The software supply chain — the process that takes an application from coding through packaging and distribution to its ultimate user — is complicated. If done wrong, it could be potentially risky, especially for open source software.  A malevolent player can get access to the backend and start inserting any random binary code onto a user’s system without that user’s knowledge or control. - -It’s not a problem specific to the cloud-native world. It can be seen in modern app development environments, including JavaScript, npm, PyPI, RubyGems, and so on.  Even Homebrew on Mac used to be provided through source code that a user would compile themselves.  - -“Today, you just download the binary and install it, hoping that it’s built from the same source code that you have access to,” said Hohndel. “As an industry, we need to pay more attention to our supply chain.  It’s something that is extremely important to me and that I’m trying to get more people interested in it.”  - -It’s not simply a binary versus source code equation, though. There are huge advantages to just running a binary instead of having to build everything from sources.   It allows developers to be more flexible and more responsive in their turnaround. They can cycle very quickly through new development and product releases by reusing some binaries. - -“It would be nice if there was a way to sign these binaries and have an ‘on-the-fly’ verification mechanism so users know they can trust these,” said Hohndel. - -Linux distributions have solved this problem as the distributions act as gatekeepers who check the integrity of packages that go into supported repositories.  - -“Packages offered through distributions like Debian are signed with a key. It takes a lot of work to ensure that this is really the software that should be in the distribution. They have solved the supply chain problem,” said Hohndel. - -But even on Linux distribution, people want to simplify things and trade correctness and security for speed. There are now projects like AppImage, Snap and Flatpack that have adopted the binary route, bringing the trust issue to Linux distributions. It’s the same problem of docker containers all over again. - -“The ideal solution would be to find a way for us as a community to devise a system of trust which ensures that if a binary was signed with a key that is in the network of trust, it can be trusted and provides us with the ability to reliably go back to the sources and do an audit,” suggested Hohndel. - -However, all this additional steps incur costs that most projects are either unwilling or unable to afford. Some projects are trying to find ways around the problem. NPM, for example, has begun to encourage those submitting packages to properly authenticate and secure their accounts to improve trustworthiness on the platform.  - -**Open Source Community Is Good At Solving Problems** - -Hohndel is involved with many efforts to solve the open source supply chain problem and is spreading awareness about it. Last year, [VMware acquired Bitnami,][4] which is a great place for curating open source applications that are signed by VMware.  - -“We are talking with upstream open source communities in various ecosystems to raise awareness about it. We are also discussing technical solutions that will make it easier for these communities to solve the underlying problems,” said Hohndel. - -The open source community has historically been diligent at ensuring software quality, including the mechanisms for security and privacy. Still, Hohndel says, “The biggest concern that I have is that, in the excitement about the next new thing, we often ignore the underlying engineering discipline that we really need.” - -Ultimately, Hohndel feels that answer will come from the open source community itself. “Open source is an engineering methodology and it’s a social experiment. Open source is all about people trusting each other, working with each other, collaborating across borders, between companies, amongst competitors in ways that we didn’t do before,” he explains. - --------------------------------------------------------------------------------- - -via: https://www.linux.com/articles/open-source-supply-chain-a-matter-of-trust/ - -作者:[Swapnil Bhartiya][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://www.linux.com/author/swapnil/ -[b]: https://github.com/lujun9972 -[1]: https://www.linux.com/wp-content/uploads/2020/01/hand-1137978_1920-1068x801.jpg (hand-1137978_1920) -[2]: https://www.linux.com/wp-content/uploads/2020/01/hand-1137978_1920.jpg -[3]: https://www.swapnilbhartiya.com/open-source-leaders-dirk-hohndel-brings-open-source-to-vmware/ -[4]: https://techcrunch.com/2019/05/15/vmware-acquires-bitnami-to-deliver-packaged-applications-anywhere/ diff --git a/translated/talk/20200106 Open Source Supply Chain- A Matter of Trust.md b/translated/talk/20200106 Open Source Supply Chain- A Matter of Trust.md new file mode 100644 index 0000000000..a0fe07a2f9 --- /dev/null +++ b/translated/talk/20200106 Open Source Supply Chain- A Matter of Trust.md @@ -0,0 +1,66 @@ +[#]: collector: (lujun9972) +[#]: translator: (Kevin3599) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Open Source Supply Chain: A Matter of Trust) +[#]: via: (https://www.linux.com/articles/open-source-supply-chain-a-matter-of-trust/) +[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) + +开源供应链:一个有关信任的问题 +====== + +[![][1]][2] + +_**Co-authored by Curtis Franklin, Jr**_ + + 开源软件相比于商业性软件,通常是被认为更加安全的,因为用户可以编译软件的源代码开发者们知道在他们的开发环境中运行的代码。在他们的环境中运行的代码每个部分都可以被审查,也可以追溯每段代码的开发者。 + + 然而,用户和开发商们正在逐渐远离这样对软件的完全控制带来的复杂性,而在转而追求软件的便捷和易用。 + + VMware副总裁兼首席开源官Dirk Hohndel表示:“当我看到一个有关网络安全和隐私的演讲,然后演讲者运行‘docker run’命令来安装和运行从互联网上随机下载的二进制文件时,我感到大吃一惊。”“这两件事似乎有点不协调。”他说到。 + + 软件供应链——应用程序从编码、打包、分发到最终用户的过程是相当复杂的。如果其中有一环出现错误,可能会导致软件存在潜在的风险,特别是对于开源软件。黑客可以访问后端并在用户不知情或不受控的情况下向其插入任何可能的恶意代码。 + + 这样的问题不单单存在于云计算领域。这样的问题在现代的app开发中很常见,包括JavaScript、npm、PyPI、RubyGems等等。甚至连Mac上的homebrew曾经依赖于用户自行编译的代码。 + + Hohndel说:“今天,你只需要下载二进制文件并安装它,并期望其源代码并没有被恶意修改过。”“作为一个行业,我们需要更加关注我们的开源代码供应。这对我来说非常重要,我正努力让更多的人意识到其重要性。” + + 然而,这不仅仅是一个二进制与源代码的等式。只运行一个二进制文件,而不必从源代码构建所有东西有着巨大的优势。当软件开发需求发生转变时候,这种运行方式允许开发人员在过程中更加灵活和响应更快。通过重用一些二进制文件,他们可以在新的开发和部署中快速地循环。 + + Hohndel 说:"如果有办法想这些软件添加签名,并建立一个'即时'验证机制,让用户知道他们可以信任此软件。会是很好的方案。 + + Linux的发行版解决了这个问题,因为发行版充当了看门人的角色,负责检查进入受支持存储库的软件包的完整性。 + + “像通过Debian等发行版提供的软件包都用密钥签名。要确保它确实是发行版中应包含的软件,需要进行大量工作。开发者们通过这种方式解决了开源供应链问题。”Hohndel说。 + + 但是,即使在Linux发行版上,人们也希望简化事情,并以正确性和安全性换取速度。现在,诸如AppImage,Snap和Flatpack之类的项目已经采用了二进制搜索路由,从而将开源供应链信任问题带入了Linux发行版。而Docker容器又一次遇到了同样的问题。 + + “理想的解决方案是为开源社区找到一种设计信任系统的方法,该系统可以确保如果二进制文件是用受信任网络中的密钥签名的,那么它就可以被信任,并允许我们可靠地返回源头并进行审核,” Hohndel建议。 + + 但是,所有这些附加步骤都会导致大多数项目产生开发者不愿或无法承担的费用。一些项目正在尝试寻找解决该问题的方法。例如,NPM已开始鼓励提交软件包的用户正确认证和保护其账户安全,以提高平台的可靠性。 + + Hohndel致力于解决开源供应链问题,并正试图让更多开发者意识到其重要性。去年,VMware收购了Bitnami,这为管理由VMware所签名的开源软件提供了一个良机。 + + “我们正在与各种上游开源社区进行交流,以提高对此的认识。我们还在讨论技术解决方案,这些方案将使这些社区更容易解决潜在的开源供应链问题。” Hohndel说。 + + 开源社区历来致力于确保软件质量,这其中也包括安全性和隐私性。不过,Hohndel说:“我最担心的是,在对下一个新事物感到兴奋时,我们经常忽略需要的技术。” + + 最终,Hohndel认为答案将来自开源社区本身。 “开源是一种工程方法论,是一种社会实验。开源就是人们之间相互信任,相互合作,跨国界,公司之间以及竞争对手之间以我们以前从未有过的方式合作。”他解释说。 +-------------------------------------------------------------------------------- + +via: https://www.linux.com/articles/open-source-supply-chain-a-matter-of-trust/ + +作者:[Swapnil Bhartiya][a] +选题:[lujun9972][b] +译者:[Kevin3599]() +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linux.com/author/swapnil/ +[b]: https://github.com/lujun9972 +[1]: https://www.linux.com/wp-content/uploads/2020/01/hand-1137978_1920-1068x801.jpg (hand-1137978_1920) +[2]: https://www.linux.com/wp-content/uploads/2020/01/hand-1137978_1920.jpg +[3]: https://www.swapnilbhartiya.com/open-source-leaders-dirk-hohndel-brings-open-source-to-vmware/ +[4]: https://techcrunch.com/2019/05/15/vmware-acquires-bitnami-to-deliver-packaged-applications-anywhere/ From e6b2a8840b890b44dac2cd9103daf8552efdf554 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Apr 2021 05:02:33 +0800 Subject: [PATCH 758/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210421=20?= =?UTF-8?q?Build=20smaller=20containers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210421 Build smaller containers.md --- .../tech/20210421 Build smaller containers.md | 352 ++++++++++++++++++ 1 file changed, 352 insertions(+) create mode 100644 sources/tech/20210421 Build smaller containers.md diff --git a/sources/tech/20210421 Build smaller containers.md b/sources/tech/20210421 Build smaller containers.md new file mode 100644 index 0000000000..a4e71cd974 --- /dev/null +++ b/sources/tech/20210421 Build smaller containers.md @@ -0,0 +1,352 @@ +[#]: subject: (Build smaller containers) +[#]: via: (https://fedoramagazine.org/build-smaller-containers/) +[#]: author: (Daniel Schier https://fedoramagazine.org/author/danielwtd/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Build smaller containers +====== + +![build smaller containers][1] + +Otter image excerpted from photo by [Dele Oluwayomi][2] on [Unsplash][3] + +Working with containers is a daily task for many users and developers. Container developers often need to (re)build container images frequently. If you develop containers, have you ever thought about reducing the image size? Smaller images have several benefits. They require less bandwidth to download and they save costs when run in cloud environments. Also, using smaller container images on Fedora [CoreOS][4], [IoT][5] and [Silverblue][6] improves overall system performance because those operating systems rely heavily on container workflows. This article will provide a few tips for reducing the size of container images. + +### The tools + +The host operating system in the following examples is Fedora Linux 33. The examples use [Podman][7] 3.1.0 and [Buildah][8] 1.2.0. Podman and Buildah are pre-installed in most Fedora Linux variants. If you don’t have Podman or Buildah installed, run the following command to install them. + +``` +$ sudo dnf install -y podman buildah +``` + +### The task + +Begin with a basic example. Build a web container meeting the following requirements. + + * The container must be based on Fedora Linux + * Use the Apache httpd web server + * Include a custom website + * The container should be relatively small + + + +The following steps will also work on more complex images. + +### The setup + +First, create a project directory. This directory will include your website and container file. + +``` +$ mkdir smallerContainer +$ cd smallerContainer +$ mkdir files +$ touch files/index.html +``` + +Make a simple landing page. For this demonstration, you may copy the below HTML into the _index.html_ file. + +``` + + + + + Container Page + + + +
+

Container Page

+
+
+

Fedora

+ +

Podman

+ +

Buildah

+ +

Skopeo

+ +

CRI-O

+ +
+ + + +``` + +Optionally, test the above _index.html_ file in your browser. + +``` +$ firefox files/index.html +``` + +Finally, create a container file. The file can be named either _Dockerfile_ or _Containerfile_. + +``` +$ touch Containerfile +``` + +You should now have a project directory with a file system layout similar to what is shown in the below diagram. + +``` +smallerContainer/ +|- files/ +| |- index.html +| +|- Containerfile +``` + +### The build + +Now make the image. Each of the below stages will add a layer of improvements to help reduce the size of the image. You will end up with a series of images, but only one _Containerfile_. + +#### Stage 0: a baseline container image + +Your new image will be very simple and it will only include the mandatory steps. Place the following text in _Containerfile_. + +``` +# Use Fedora 33 as base image +FROM registry.fedoraproject.org/fedora:33 + +# Install httpd +RUN dnf install -y httpd + +# Copy the website +COPY files/* /var/www/html/ + +# Expose Port 80/tcp +EXPOSE 80 + +# Start httpd +CMD ["httpd", "-DFOREGROUND"] +``` + +In the above file there are some comments to indicate what is being done. More verbosely, the steps are: + + 1. Create a build container with the base FROM registry.fedoraproject.org/fedora:33 + 2. RUN the command: _dnf install -y httpd_ + 3. COPY files relative to the _Containerfile_ to the container + 4. Set EXPOSE 80 to indicate which port is auto-publishable + 5. Set a CMD to indicate what should be run if one creates a container from this image + + + +Run the below command to create a new image from the project directory. + +``` +$ podman image build -f Containerfile -t localhost/web-base +``` + +Use the following command to examine your image’s attributes. Note in particular the size of your image (467 MB). + +``` +$ podman image ls +REPOSITORY TAG IMAGE ID CREATED SIZE +localhost/web-base latest ac8c5ed73bb5 5 minutes ago 467 MB +registry.fedoraproject.org/fedora 33 9f2a56037643 3 months ago 182 MB +``` + +The example image shown above is currently occupying 467 MB of storage. The remaining stages should reduce the size of the image significantly. But first, verify that the image works as intended. + +Enter the following command to start the container. + +``` +$ podman container run -d --name web-base -P localhost/web-base +``` + +Enter the following command to list your containers. + +``` +$ podman container ls +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +d24063487f9f localhost/web-base httpd -DFOREGROUN... 2 seconds ago Up 3 seconds ago 0.0.0.0:46191->80/tcp web-base +``` + +The container shown above is running and it is listening on port _46191_. Going to _localhost:46191_ from a web browser running on the host operating system should render your web page. + +``` +$ firefox localhost:46191 +``` + +#### Stage 1: clear caches and remove other leftovers from the container + +The first step one should always perform to optimize the size of their container image is “clean up”. This will ensure that leftovers from installations and packaging are removed. What exactly this process entails will vary depending on your container. For the above example you can just edit _Containerfile_ to include the following lines. + +``` +[...] +# Install httpd +RUN dnf install -y httpd && \ + dnf clean all -y +[...] +``` + +Build the modified _Containerfile_ to reduce the size of the image significantly (237 MB in this example). + +``` +$ podman image build -f Containerfile -t localhost/web-clean +$ podman image ls +REPOSITORY TAG IMAGE ID CREATED SIZE +localhost/web-clean latest f0f62aece028 6 seconds ago 237 MB +``` + +#### Stage 2: remove documentation and unneeded package dependencies + +Many packages will pull in recommendations, weak dependencies and documentation when they are installed. These are often not needed in a container and can be excluded. The _dnf_ command has options to indicate that it should not include weak dependencies or documentation. + +Edit _Containerfile_ again and add the options to exclude documentation and weak dependencies on the _dnf install_ line: + +``` +[...] +# Install httpd +RUN dnf install -y httpd --nodocs --setopt install_weak_deps=False && \ + dnf clean all -y +[...] +``` + +Build _Containerfile_ with the above modifications to achieve an even smaller image (231 MB). + +``` +$ podman image build -f Containerfile -t localhost/web-docs +$ podman image ls +REPOSITORY TAG IMAGE ID CREATED SIZE +localhost/web-docs latest 8a76820cec2f 8 seconds ago 231 MB +``` + +#### Stage 3: use a smaller container base image + +The prior stages, in combination, have reduced the size of the example image by half. But there is still one more thing that can be done to reduce the size of the image. The base image _registry.fedoraproject.org/fedora:33_ is meant for general purpose use. It provides a collection of packages that many people expect to be pre-installed in their Fedora Linux containers. The collection of packages provided in the general purpose Fedora Linux base image is often more extensive than needed, however. The Fedora Project also provides a _fedora-minimal_ base image for those who wish to start with only the essential packages and then add only what they need to achieve a smaller total image size. + +Use _podman image search_ to search for the _fedora-minimal_ image as shown below. + +``` +$ podman image search fedora-minimal +INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED +fedoraproject.org registry.fedoraproject.org/fedora-minimal 0 +``` + +The _fedora-minimal_ base image excludes [DNF][9] in favor of the smaller [microDNF][10] which does not require Python. When _registry.fedoraproject.org/fedora:33_ is replaced with _registry.fedoraproject.org/fedora-minimal:33_, _dnf_ needs to be replaced with _microdnf_. + +``` +# Use Fedora minimal 33 as base image +FROM registry.fedoraproject.org/fedora-minimal:33 + +# Install httpd +RUN microdnf install -y httpd --nodocs --setopt install_weak_deps=0 && \ + microdnf clean all -y +[...] +``` + +Rebuild the image to see how much storage space has been recovered by using _fedora-minimal_ (169 MB). + +``` +$ podman image build -f Containerfile -t localhost/web-docs +$ podman image ls +REPOSITORY TAG IMAGE ID CREATED SIZE +localhost/web-minimal latest e1603bbb1097 7 minutes ago 169 MB +``` + +The initial image size was **467 MB**. Combining the methods detailed in each of the above stages has resulted in a final image size of **169 MB**. The final _total_ image size is smaller than the original _base_ image size of 182 MB! + +### Building containers from scratch + +The previous section used a container file and Podman to build a new image. There is one last thing to demonstrate — building a container from scratch using Buildah. Podman uses the same libraries to build containers as Buildah. But Buildah is considered a pure build tool. Podman is designed to work as a replacement for Docker. + +When building from scratch using Buildah, the container is empty — there is _nothing_ in it. Everything needed must be installed or copied from outside the container. Fortunately, this is quite easy with Buildah. Below, a small Bash script is provided which will build the image from scratch. Instead of running the script, you can run each of the commands from the script individually in a terminal to better understand what is being done. + +``` +#!/usr/bin/env bash +set -o errexit + +# Create a container +CONTAINER=$(buildah from scratch) + +# Mount the container filesystem +MOUNTPOINT=$(buildah mount $CONTAINER) + +# Install a basic filesystem and minimal set of packages, and nginx +dnf install -y --installroot $MOUNTPOINT --releasever 33 glibc-minimal-langpack httpd --nodocs --setopt install_weak_deps=False + +dnf clean all -y --installroot $MOUNTPOINT --releasever 33 + +# Cleanup +buildah unmount $CONTAINER + +# Copy the website +buildah copy $CONTAINER 'files/*' '/var/www/html/' + +# Expose Port 80/tcp +buildah config --port 80 $CONTAINER + +# Start httpd +buildah config --cmd "httpd -DFOREGROUND" $CONTAINER + +# Save the container to an image +buildah commit --squash $CONTAINER web-scratch +``` + +Alternatively, the image can be built by passing the above script to Buildah. Notice that root privileges are not required. + +``` +$ buildah unshare bash web-scratch.sh +$ podman image ls +REPOSITORY TAG IMAGE ID CREATED SIZE +localhost/web-scratch latest acca45fc9118 9 seconds ago 155 MB +``` + +The final image is only **155 MB**! Also, the [attack surface][11] has been reduced. Not even DNF (or microDNF) is installed in the final image. + +### Conclusion + +Building smaller container images has many advantages. Reducing the needed bandwidth, the disk footprint and attack surface will lead to better images overall. It is easy to reduce the footprint with just a few small changes. Many of the changes can be done without altering the functionality of the resulting image. + +It is also possible to build very small images from scratch which will only hold the needed binaries and configuration files. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/build-smaller-containers/ + +作者:[Daniel Schier][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/danielwtd/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2021/04/podman-smaller-1-816x345.jpg +[2]: https://unsplash.com/@errbodysaycheese?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/otter?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://fedoramagazine.org/getting-started-with-fedora-coreos/ +[5]: https://getfedora.org/en/iot/ +[6]: https://fedoramagazine.org/what-is-silverblue/ +[7]: https://podman.io/ +[8]: https://buildah.io/ +[9]: https://github.com/rpm-software-management/dnf +[10]: https://github.com/rpm-software-management/microdnf +[11]: https://en.wikipedia.org/wiki/Attack_surface From 0b73099ceb0b554ea31129eee32ed28ba1e5d7af Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Apr 2021 05:03:21 +0800 Subject: [PATCH 759/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210421=20?= =?UTF-8?q?Optimize=20your=20Python=20code=20with=20C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210421 Optimize your Python code with C.md --- ...210421 Optimize your Python code with C.md | 208 ++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 sources/tech/20210421 Optimize your Python code with C.md diff --git a/sources/tech/20210421 Optimize your Python code with C.md b/sources/tech/20210421 Optimize your Python code with C.md new file mode 100644 index 0000000000..b21ec770ac --- /dev/null +++ b/sources/tech/20210421 Optimize your Python code with C.md @@ -0,0 +1,208 @@ +[#]: subject: (Optimize your Python code with C) +[#]: via: (https://opensource.com/article/21/4/cython) +[#]: author: (Alan Smithee https://opensource.com/users/alansmithee) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Optimize your Python code with C +====== +Cython creates C modules that speed up Python code execution, important +for complex applications where an interpreted language isn't efficient. +![Hands on a keyboard with a Python book ][1] + +Cython is a compiler for the Python programming language meant to optimize performance and form an extended Cython programming language. As an extension of Python, [Cython][2] is also a superset of the Python language, and it supports calling C functions and declaring C types on variables and class attributes. This makes it easy to wrap external C libraries, embed C into existing applications, or write C extensions for Python in syntax as easy as Python itself. + +Cython is commonly used to create C modules that speed up Python code execution. This is important in complex applications where an interpreted language isn't efficient. + +### Install Cython + +You can install Cython on Linux, BSD, Windows, or macOS using Python: + + +``` +`$ python -m pip install Cython` +``` + +Once installed, it's ready to use. + +### Transform Python into C + +A good way to start with Cython is with a simple "hello world" application. It's not the best demonstration of Cython's advantages, but it shows what happens when you're using Cython. + +First, create this simple Python script in a file called `hello.pyx` (the `.pyx` extension isn't magical and it could technically be anything, but it's Cython's default extension): + + +``` +`print("hello world")` +``` + +Next, create a Python setup script. A `setup.py` file is like Python's version of a makefile, and Cython can use it to process your Python code: + + +``` +from setuptools import setup +from Cython.Build import cythonize + +setup( +    ext_modules = cythonize("hello.pyx") +) +``` + +Finally, use Cython to transform your Python script into C code: + + +``` +`$ python setup.py build_ext --inplace` +``` + +You can see the results in your project directory. Cython's `cythonize` module transforms `hello.pyx` into a `hello.c` file and a `.so` library. The C code is 2,648 lines, so it's quite a lot more text than the single line of `hello.pyx` source. The `.so` library is also over 2,000 times larger than its source (54,000 compared to 20 bytes). Then again, Python is required to run a single Python script, so there's a lot of code propping up that single-line `hello.pyx` file. + +To use the C code version of your Python "hello world" script, open a Python prompt and import the new `hello` module you created: + + +``` +>>> import hello +hello world +``` + +### Integrate C code into Python + +A good generic test of computational power is calculating prime numbers. A prime number is a positive number greater than 1 that produces a positive integer only when divided by 1 or itself. It's simple in theory, but as numbers get larger, the calculation requirements also increase. In pure Python, it can be done in under 10 lines of code: + + +``` +import sys + +number = int(sys.argv[1]) +if not number <= 1: +    for i in range(2, number): +        if (number % i) == 0: +            print("Not prime") +            break +else: +    print("Integer must be greater than 1") +``` + +This script is silent upon success and returns a message if the number is not prime: + + +``` +$ ./prime.py 3 +$ ./prime.py 4 +Not prime. +``` + +Converting this to Cython requires a little work, partly to make the code appropriate for use as a library and partly for performance. + +#### Scripts and libraries + +Many users learn Python as a scripting language: you tell Python the steps you want it to perform, and it does the work. As you learn more about Python (and open source programming in general), you learn that much of the most powerful code out there is in the libraries that other applications can harness. The _less_ specific your code is, the more likely it can be repurposed by a programmer (you included) for other applications. It can be a little more work to decouple computation from workflow, but in the end, it's usually worth the effort. + +In the case of this simple prime number calculator, converting it to Cython begins with a setup script: + + +``` +from setuptools import setup +from Cython.Build import cythonize + +setup( +    ext_modules = cythonize("prime.py") +) +``` + +Transform your script into C: + + +``` +`$ python setup.py build_ext --inplace` +``` + +Everything appears to be working well so far, but when you attempt to import and use your new module, you get an error: + + +``` +>>> import prime +Traceback (most recent call last): +  File "<stdin>", line 1, in <module> +  File "prime.py", line 2, in init prime +    number = sys.argv[1] +IndexError: list index out of range +``` + +The problem is that a Python script expects to be run from a terminal, where arguments (in this case, an integer to test as a prime number) are common. You need to modify your script so that it can be used as a library instead. + +#### Write a library + +Libraries don't use system arguments and instead accept arguments from other code. Instead of using `sys.argv` to bring in user input, make your code a function that accepts an argument called `number` (or `num` or whatever variable name you prefer): + + +``` +def calculate(number): +    if not number <= 1: +        for i in range(2, number): +            if (number % i) == 0: +                print("Not prime") +                break +    else: +        print("Integer must be greater than 1") +``` + +This admittedly makes your script somewhat difficult to test because when you run the code in Python, the `calculate` function is never executed. However, Python programmers have devised a common, if not intuitive, workaround for this problem. When the Python interpreter executes a Python script, there's a special variable called `__name__` that gets set to `__main__`, but when it's imported as a module, `__name__` is set to the module's name. By leveraging this, you can write a library that is both a Python module and a valid Python script: + + +``` +import sys + +def calculate(number): +    if not number <= 1: +        for i in range(2, number): +            if (number % i) == 0: +                print("Not prime") +                break +    else: +        print("Integer must be greater than 1") + +if __name__ == "__main__": +    number = sys.argv[1]     +    calculate( int(number) ) +``` + +Now you can run the code as a command: + + +``` +$ python ./prime.py 4 +Not a prime +``` + +And you can convert it to Cython for use as a module: + + +``` +>>> import prime +>>> prime.calculate(4) +Not prime +``` + +### C Python + +Converting code from pure Python to C with Cython can be useful. This article demonstrates how to do that part, yet there are Cython features to help you optimize your code before conversion, options to analyze your code to find when Cython interacts with C, and much more. If you're using Python, but you're looking to enhance your code with C code or further your understanding of how libraries provide better extensibility than scripts, or if you're just curious about how Python and C can work together, then start experimenting with Cython. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/cython + +作者:[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/python-programming-code-keyboard.png?itok=fxiSpmnd (Hands on a keyboard with a Python book ) +[2]: https://cython.org/ From b15146269e1833b99852539795aef127a66ad178 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Apr 2021 05:03:33 +0800 Subject: [PATCH 760/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210421=20?= =?UTF-8?q?How=20to=20take=20your=20open=20source=20project=20to=20the=20n?= =?UTF-8?q?ext=20level?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210421 How to take your open source project to the next level.md --- ...r open source project to the next level.md | 116 ++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 sources/tech/20210421 How to take your open source project to the next level.md diff --git a/sources/tech/20210421 How to take your open source project to the next level.md b/sources/tech/20210421 How to take your open source project to the next level.md new file mode 100644 index 0000000000..2a56c4c9f7 --- /dev/null +++ b/sources/tech/20210421 How to take your open source project to the next level.md @@ -0,0 +1,116 @@ +[#]: subject: (How to take your open source project to the next level) +[#]: via: (https://opensource.com/article/21/4/open-source-saas) +[#]: author: (Stef Walter https://opensource.com/users/stefw) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +How to take your open source project to the next level +====== +Merely releasing your SaaS's source code is not enough to make it open +source. +![Green graph of measurements][1] + +Open sourcing the code to your software as a service (SaaS) is not sufficient to make it actually be open source. Does that sound contradictory to you? Let me explain. + +Most services that espouse "open source" do so by simply throwing the code over the wall. It's better than nothing but really misses the point that powers open source: enabling users to make a change to the software they're using. + +Some other popular services powered by Open Source software, do include the tools used to operate/deploy their service. Pause for applause. + +But that’s also insufficient to actually enable users to become contributors effectively. + +Much of a service's value comes from things other than the code. It comes from the infrastructure it runs on, the operational processes, the monitoring, the backups, the metrics, the high availability, the scalability. It comes from data, from the network effect—with other users, with other interconnected services, with integrated tools, from legal agreements, and so on. + +Any non-toy service is not reproducible. + +Launching a clone of the service to contribute effectively is a high barrier. Certain kinds of contributions clearly are possible. But contributors are essentially asked to "fork" the non-code aspects of the service to iterate on their changes against their real-world use cases. + +What's more, without true open source principles, we are missing a way to have a community develop with a center of gravity around the service itself. This leads to companies forking the service in a way that typical open source projects with a true community are resilient to. + +I believe that if we enable contributions to services _rather than just the software_, we reap the advantages of true open source. That means enabling users to make a change to a running service and experience that change themselves. + +You still with me? + +Yes, that means opening a pull request against a running service and experiencing that change before it's merged. + +This is not as insane as it sounds. + +It appears that every technique we need to enable such a capability is already in use in modern deployment and operations methodology. We just have to connect the dots. + +### Why should I care? + +I've been part of open source for over 20 years now. Although I'm just one contributor, together, we've changed something fundamental about the world. Our lives are too short, and software is too complex to have one company or one individual invent everything from scratch. So, we work together across humanity to accomplish what no individual team could. This is our legacy, and it has become commonplace. + +And yet, there's a very simple principle that drives open source: + +> Open source thrives when it converts some +> small percentage of users into contributors. + +If you interrupt that principle, you starve open source. SaaS does just that: When someone else runs your software for you, the intuitive mechanisms for you to change that software are not available. + +![How users become contributors][2] + +(Source: Stef Walter, [CC-BY-SA][3]) + +"But," you may say, "if the source code for that running service was _open_, then I could still change it." + +Sure, you could change the code in some components. Still, for any reasonably complex service, you wouldn't be able to run your changes or experience your changes against real-world workflows, much less iterate on them, until they're good enough to share with others. + +In reality, the threat here is far more fundamental: Users of services cannot readily change something in the service, not only because the processes are operated by someone else but because they have explicitly chosen not to be involved in operating the software. + +If the primary way to use Postgres was "as a service," then that (fabulous) project would be starved for contributors. This is because the number of contributors in such a project is a function of some small percentage of users deciding to try to make change. + +As this mechanism for using SaaS takes over the world, the pool of users who can contribute to open source shrinks dramatically. + +For a long time, I saw this as a fundamental threat that would starve open source. I was unable to reconcile SaaS with a healthy open source ecosystem. + +But recently, I've become convinced that if we enable an effective contribution model on a service, one that doesn't require that the users become operators of the service, then we can reconcile this threat, and open source will thrive on services instead of being starved by them. + +### You want me to do what?!? + +To enable contributions by users of a service, users that have explicitly chosen not to operate the software themselves, we have to set up a process by which they can make a change to a running service and experience that change before others do. + +For example, a user of such a hypothetical service should be able to: + + 1. Discover which component of a service to contribute to + 2. Make a nonsensical change (like adding a printf-style log statement) or change the spelling of a word + 3. Experience that change when they use the service or when it acts on their data + + + +After discussing this with others, I firmly believe we have all the techniques we need, whether they're canary deployments, load balancing, continuous delivery, infrastructure as code, and so on. It's been hard to find a single problem that an existing practice doesn't solve. + +It turns out that many experienced engineering teams have come to that same conclusion. Rapid deployment of changes to services is a powerful capability that's highly sought after. For example, [GitHub deploys changes before they're merged][4]. Whereas [Facebook rapidly deploys changes][5] to a few canary machines and scales each change up to production. Everyone has their own version of continuous delivery. It's hard to take an engineering team seriously if they haven't figured out how their team members can get a change rapidly deployed. + +Open source has all the ingredients to have a decisive advantage here. To effectively collaborate on _open source services_, with contributors working across all of humanity.  + +Let's try to craft a playbook to achieve this basic capability that drives open source software and apply it to open source services: That is, the ability to change code and interact with that change… on a service. + +_Note: [Thanks to the reviewers of this article!][6]_ + +* * * + +_This originally appeared on [stef.thewalter.net][7] and is republished with the author's permission._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/open-source-saas + +作者:[Stef Walter][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/stefw +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_lead-steps-measure.png?itok=DG7rFZPk (Green graph of measurements) +[2]: https://opensource.com/sites/default/files/uploads/funneling-open-source-service.png (How users become contributors) +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://github.blog/2015-06-02-deploying-branches-to-github-com/ +[5]: https://engineering.fb.com/2017/08/31/web/rapid-release-at-massive-scale/ +[6]: https://github.com/stefwalter/blog/pull/1 +[7]: http://stef.thewalter.net/open-source-services.html From 3a37fcedb35c91c3ec10d3f7581b7c4293363e7c Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 22 Apr 2021 08:33:30 +0800 Subject: [PATCH 761/818] translated --- ...c terminal theme with open source tools.md | 100 ------------------ ...c terminal theme with open source tools.md | 100 ++++++++++++++++++ 2 files changed, 100 insertions(+), 100 deletions(-) delete mode 100644 sources/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md create mode 100644 translated/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md diff --git a/sources/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md b/sources/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md deleted file mode 100644 index 60ac7ea7e6..0000000000 --- a/sources/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md +++ /dev/null @@ -1,100 +0,0 @@ -[#]: subject: (4 steps to customizing your Mac terminal theme with open source tools) -[#]: via: (https://opensource.com/article/21/4/zsh-mac) -[#]: author: (Bryant Son https://opensource.com/users/brson) -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -4 steps to customizing your Mac terminal theme with open source tools -====== -Make your terminal window pretty on your Mac with open source tools. -![4 different color terminal windows with code][1] - -Do you ever get bored with seeing the same old terminal window on your macOS computer? If so, add some bells and whistles to your view with the open source Oh My Zsh framework and Powerlevel10k theme. - -This basic step-by-step walkthrough (including a video tutorial at the end) will get you started customizing your macOS terminal. If you're a Linux user, check out Seth Kenlon's guide to [Adding themes and plugins to Zsh][2] for in-depth guidance. - -### Step 1: Install Oh My Zsh - -[Oh My Zsh][3] is an open source, community-driven framework for managing your Z shell (Zsh) configuration. - -![Oh My Zsh][4] - -(Bryant Son, [CC BY-SA 4.0][5]) - -Oh My Zsh is released under the MIT License. Install it with: - - -``` -`$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"` -``` - -### Step 2: Install Powerlevel10k fonts - -![Powerlevel10k][6] - -(Bryant Son, [CC BY-SA 4.0][5]) - -Powerlevel10k is an MIT-Licensed Zsh theme. Before installing Powerlevel10k, you will want to install custom fonts for your terminal. - -Go to the [Powerlevel10 GitHub][7] page, and search for "fonts" in the README. The steps for installing the custom fonts will vary depending on your operating system; the video at the bottom of this page explains how to do it on macOS. It should be just a simple click–download–install series of operations. - -![Powerlevel10k fonts][8] - -(Bryant Son, [CC BY-SA 4.0][5]) - -### Step 3: Install the Powerlevel10k theme - -Next, install Powerlevel10k by running: - - -``` -`git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k` -``` - -After you finish, open a `~/.zshrc` configuration file with a text editor, such as [Vim][9], set the line `ZSH_THEME="powerlevel10k/powerlevel10k`, then save the file. - -### Step 4: Finalize your Powerlevel10k setup - -Open a new terminal, and you should see the Powerlevel10k configuration wizard. If not, run `p10k configure` to bring up the configuration wizard. If you installed the custom fonts in Step 2, the icons and symbols should display correctly. Change the default font to **MeslowLG NF** (see the video below for instructions). - -![Powerlevel10k configuration][10] - -(Bryant Son, [CC BY-SA 4.0][5]) - -Once you complete the configuration, you should see a beautiful terminal. - -![Oh My Zsh/Powerlevel10k theme][11] - -(Bryant Son, [CC BY-SA 4.0][5]) - -If you want to see an interactive tutorial, please check out this video: - -That's it! You should be ready to enjoy your beautiful new terminal. Be sure to check out other Opensource.com articles for more tips and articles on using the shell, Linux administration, and more. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/zsh-mac - -作者:[Bryant Son][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/brson -[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/9/adding-plugins-zsh -[3]: https://ohmyz.sh/ -[4]: https://opensource.com/sites/default/files/uploads/1_ohmyzsh.jpg (Oh My Zsh) -[5]: https://creativecommons.org/licenses/by-sa/4.0/ -[6]: https://opensource.com/sites/default/files/uploads/2_powerlevel10k.jpg (Powerlevel10k) -[7]: https://github.com/romkatv/powerlevel10k -[8]: https://opensource.com/sites/default/files/uploads/3_downloadfonts.jpg (Powerlevel10k fonts) -[9]: https://opensource.com/resources/what-vim -[10]: https://opensource.com/sites/default/files/uploads/4_p10kconfiguration.jpg (Powerlevel10k configuration) -[11]: https://opensource.com/sites/default/files/uploads/5_finalresult.jpg (Oh My Zsh/Powerlevel10k theme) diff --git a/translated/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md b/translated/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md new file mode 100644 index 0000000000..c94d760cee --- /dev/null +++ b/translated/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md @@ -0,0 +1,100 @@ +[#]: subject: (4 steps to customizing your Mac terminal theme with open source tools) +[#]: via: (https://opensource.com/article/21/4/zsh-mac) +[#]: author: (Bryant Son https://opensource.com/users/brson) +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +用开源工具定制 Mac 终端主题的 4 个步骤 +====== +用开源工具让你的终端窗口在 Mac 上漂亮起来。 +![4 different color terminal windows with code][1] + +你是否曾经厌倦了在你的 macOS 电脑上看到同样老式的终端窗口?如果是这样,使用开源的 Oh My Zsh 框架和 Powerlevel10k 主题为你的视图添加一些点缀。 + +这个基本的逐步教程(包括最后的视频教程)将让你开始定制你的 macOS 终端。如果你是一个 Linux 用户,请查看 Seth Kenlon 的指南[为 Zsh 添加主题和插件][2]以获得深入指导。 + +### 步骤 1:安装 Oh My Zsh + +[Oh My Zsh][3] 是一个开源的、社区驱动的框架,用于管理你的 Z shell (Zsh) 配置。 + +![Oh My Zsh][4] + +(Bryant Son, [CC BY-SA 4.0][5]) + +Oh My Zsh 是在 MIT 许可下发布的。使用以下命令安装: + + +``` +`$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"` +``` + +### 步骤 2:安装 Powerlevel10k 字体 + +![Powerlevel10k][6] + +(Bryant Son, [CC BY-SA 4.0][5]) + +Powerlevel10k 是一个 MIT 许可的 Zsh 主题。在安装 Powerlevel10k 之前,你需要为你的终端安装自定义字体。 + +到 [Powerlevel10 GitHub][7] 页面,在 README中 搜索 “fonts”。安装自定义字体的步骤会根据你的操作系统而有所不同。本页底部的视频解释了如何在 macOS 上安装。这只需要简单地点击-下载-安装的系列操作。 + +![Powerlevel10k fonts][8] + +(Bryant Son, [CC BY-SA 4.0][5]) + +### 步骤 3:安装 Powerlevel10k 主题 + +接下来,运行以下命令安装 Powerlevel10k: + + +``` +`git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k` +``` + +完成后,用文本编辑器,比如 [Vim][9],打开 `~/.zshrc` 配置文件,设置行 `ZSH_THEME="powerlevel10k/powerlevel10k`,然后保存文件。 + +### 步骤 4:完成 Powerlevel10 的设置 + +打开一个新的终端,你应该看到 Powerlevel10k 配置向导。如果没有,运行 `p10k configure` 来调出配置向导。如果你在步骤 2 中安装了自定义字体,那么图标和符号应该正确显示。将默认字体更改为 **MeslowLG NF**(请看下面的视频说明)。 + +![Powerlevel10k configuration][10] + +(Bryant Son, [CC BY-SA 4.0][5]) + +当你完成配置后,你应该会看到一个漂亮的终端。 + +![Oh My Zsh/Powerlevel10k theme][11] + +(Bryant Son, [CC BY-SA 4.0][5]) + +如果你想看交互式教程,请看这个视频。 + +就是这些了!你应该可以享受你美丽的新终端了。请务必查看 Opensource.com 的其他文章,了解更多关于使用 shell、Linux 管理等方面的技巧和文章。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/zsh-mac + +作者:[Bryant Son][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/brson +[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/9/adding-plugins-zsh +[3]: https://ohmyz.sh/ +[4]: https://opensource.com/sites/default/files/uploads/1_ohmyzsh.jpg (Oh My Zsh) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: https://opensource.com/sites/default/files/uploads/2_powerlevel10k.jpg (Powerlevel10k) +[7]: https://github.com/romkatv/powerlevel10k +[8]: https://opensource.com/sites/default/files/uploads/3_downloadfonts.jpg (Powerlevel10k fonts) +[9]: https://opensource.com/resources/what-vim +[10]: https://opensource.com/sites/default/files/uploads/4_p10kconfiguration.jpg (Powerlevel10k configuration) +[11]: https://opensource.com/sites/default/files/uploads/5_finalresult.jpg (Oh My Zsh/Powerlevel10k theme) From 24f5917279c2d01dadfff1843296dc04e24f5bd0 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 22 Apr 2021 08:34:31 +0800 Subject: [PATCH 762/818] Rename sources/tech/20210421 How to take your open source project to the next level.md to sources/talk/20210421 How to take your open source project to the next level.md --- ...0421 How to take your open source project to the next level.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20210421 How to take your open source project to the next level.md (100%) diff --git a/sources/tech/20210421 How to take your open source project to the next level.md b/sources/talk/20210421 How to take your open source project to the next level.md similarity index 100% rename from sources/tech/20210421 How to take your open source project to the next level.md rename to sources/talk/20210421 How to take your open source project to the next level.md From c8838d0d0addaaa2aa94f6272ecfed3441aa813a Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 22 Apr 2021 08:39:38 +0800 Subject: [PATCH 763/818] translating --- ...10421 How to Delete Partitions in Linux -Beginner-s Guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210421 How to Delete Partitions in Linux -Beginner-s Guide.md b/sources/tech/20210421 How to Delete Partitions in Linux -Beginner-s Guide.md index 1662169a52..f38599901c 100644 --- a/sources/tech/20210421 How to Delete Partitions in Linux -Beginner-s Guide.md +++ b/sources/tech/20210421 How to Delete Partitions in Linux -Beginner-s Guide.md @@ -2,7 +2,7 @@ [#]: via: (https://itsfoss.com/delete-partition-linux/) [#]: author: (Chris Patrick Carias Stas https://itsfoss.com/author/chris/) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From cfe27b72e2bf559ca36b39411cf1441e22900831 Mon Sep 17 00:00:00 2001 From: stevenzdg988 <3442417@qq.com> Date: Thu, 22 Apr 2021 08:45:02 +0800 Subject: [PATCH 764/818] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=AF=91=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...at You Can Deploy on Your Linux Servers.md | 226 ------------------ ...at You Can Deploy on Your Linux Servers.md | 226 ++++++++++++++++++ 2 files changed, 226 insertions(+), 226 deletions(-) delete mode 100644 sources/tech/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md create mode 100644 translated/tech/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md diff --git a/sources/tech/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md b/sources/tech/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md deleted file mode 100644 index 431f3041e2..0000000000 --- a/sources/tech/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md +++ /dev/null @@ -1,226 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (stevenzdg988) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (9 Open Source Forum Software That You Can Deploy on Your Linux Servers) -[#]: via: (https://itsfoss.com/open-source-forum-software/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -9 Open Source Forum Software That You Can Deploy on Your Linux Servers -====== - -_**Looking to have a community forum or customer support portal? Here are some of the best open source forum software you can deploy on your servers.**_ - -Just like our [It’s FOSS Community][1] forum, it is important to always build a platform where like-minded people can discuss, interact, and seek support. - -A forum gives users (or customers) a space to reach out for something that they cannot easily find on the Internet for the most part. - -If you are an enterprise, you may hire a team of developers and build your own forum the way you want but that adds a lot of cost to your budget. - -Fortunately, there are several impressive open source forum software that you can deploy on your server and you’re good to go! You will save a lot of money in the process and still get what you need. - -Here, I have compiled a list of best open source forum software that you can install on your Linux server. - -### Best open source forum software to build a community portal - -![][2] - -In case you haven’t built a website yet, you might want to take a look at [some open-source website creation tools][3] before you deploy a forum. - -_**Note:** The list is in no particular order of ranking._ - -#### 1\. Discourse (modern and popular) - -![][4] - -Discourse is the most popular modern forum software that people deploy to set up their discussion platforms. In fact, our [It’s FOSS community][1] forum utilizes the Discourse platform. - -It offers most of the essential features that I’m aware of which includes email notifications, moderation tools, style customization options, third-part integrations like Slack/WordPress, and more. - -It is completely free to self-host and you can find the project on [GitHub][5] as well. If you do not need the hassle of deploying it on a self-managed server, you can always choose to opt for [managed services offered by Discourse][6] itself (which will be certainly expensive). - -[Discourse][7] - -#### 2\. Talkyard (inspired by Discourse and StackOverflow) - -![][8] - -Talkyard is completely free to use and an open-source project. It looks close to Discourse but there are distinctions if you inspect it. - -You get most of the key features from StackOverflow here along with all essential features that you would expect on a forum platform. It may not be a popular forum solution but if you want something similar to Discourse along with some interesting features, this is worth trying out. - -You can explore more about it in their [GitHub page][9]. - -[Talkyard][10] - -#### 3\. NodeBB (Modern and full of features) - -![][11] - -NodeBB is an open-source forum software based on [Node.js][12]. It aims to be simple, elegant, and fast as well. Primarily, it is geared towards organizations and enterprises with managed hosting plans available. But, you can choose to host it yourself as well. - -You get a real-time native analytics feature along with chat and notification support as well. It also offers an API, if you want to integrate it with any of your existing product. It also supports moderation tools and tools to fight spam. - -You get some 3rd party integration support out of the box like WordPress, Mailchimp, etc. - -Explore more about it in their [GitHub page][13] or the official website. - -[NodeBB][14] - -#### 4\. Vanilla Forums (enterprise focused) - -![][15] - -Vanilla Forums is primarily an enterprise focused forum software with essential features to brand your platform, offer a Q/A for customers, and also gives the ability to vote on posts. - -The user experience is geared with a modern look and is being used by the likes of EA, Adobe, and some other big shot companies. - -Of course, if you want to try the cloud-based Vanilla Forums (managed by a team of professionals) along with the access to some premium features, feel free to request a Demo. In either case, you can opt for the community edition, which is free to use with most of the latest features with the responsibility of hosting it yourself and managing it. - -You can explore more about it on their official website and [GitHub page][16]. - -[Vanilla Forums][17] - -**Recommended Read:** - -![][18] - -#### [Best Open Source eCommerce Platforms to Build Online Shopping Websites][19] - -Want to create an online shopping website? Here are some open source ecommerce platforms you can deploy on your own Linux server. - -#### 5\. bbPress (from WordPress) - -![][20] - -bbPress is a solid forum software built by the creators of WordPress. It aims to provide a simple and snappy forum experience. - -The user interface would seem old-school but it is easy to use and offers the basic functionalities that you would normally look for in a forum software. The moderation tools are simple and easy to set up. You can extend the functionality using plugins available and choose from several themes available to tweak the look and feel of your forum. - -If you just want a simple forum platform with no fancy features, bbPress should be perfect. You can also check out their [GitHub page][21] for more information. - -[bbPress][22] - -#### 6\. phpBB (classic forum software) - -![][23] - -If you want a traditional forum design and just want the basic functionalities, phpBB software is a good choice. Of course, you may not get the best user experience or the features, but it is functional and quite effective as a traditional-design forum plaform. - -Especially, for users comfortable with the traditional approach, it will be a simple and effective solution. - -Not just limited to the simplicity, but also it is way easier to set up with an average hosting provider. You get a 1-click installation feature on every shared hosting platform, so you do not need a lot of technical knowledge to set it up as well. - -You can explore more about it in their official website or the [GitHub page][24]. - -[phpBB][25] - -#### 7\. Simple Machines Forum (another classic) - -![][26] - -Similar to php BB, Simple Machines forum is yet another basic (or simple) implementation of a forum platform. You may not be able to customize the look and feel by a long extent (not easily at least) but the default look is clean and offers a good user experience. - -Personally, I like it better than php BB, but you can head to their [official website][27] to explore more about it. Also, you can easily install Simple Machines Forum on any shared hosting service using the 1-click installation method. - -[Simple Machines Forum][27] - -#### 8\. FluxBB (old school) - -![][28] - -FluxBB is yet another simple and lightweight open source forum. When compared to some others, it may not be super actively maintained but if you just want to deploy a basic forum with a few users, you can easily give this a try. - -You can explore more about it in their official website and the [GitHub page][29]. - -[FluxBB][30] - -#### 9\. MyBB (less popular but worth a look) - -![][31] - -MyBB is a unique open-source forum software that offers a wide range of styles and includes essential features you’ll need. - -Starting from plugin support and moderation tools, you get everything necessary needed to manage a big community. It also supports private messaging to individual users similar to Discourse and similar forum software. - -It may not be a popular option but it checks out for most of the use-cases and it completely free. You might want to support and explore the project on [GitHub][32] as well. - -[MyBB][33] - -#### Bonus: Flarum (in beta) - -![][34] - -If you want something simpler and unique, have a look at Flarum. It is a lightweight forum software which aims to be mobile-first while offering a fast experience. - -It supports some third-party integrations and you can extend the functionality using extensions as well. Personally, it looks beautiful to me. I haven’t got a chance to try it you can take a look at its [documentation][35] and it is safe to assume that it features all the necessary features for a forum. - -It is worth noting that Flarum is fairly new so it is still in beta. You might want to deploy it on your test server first before taking a leap of faith on your production environment. Do check out their [GitHub page][36] for more details. - -[Flarum][37] - -Can’t self-host? Let us help you - -Deploying open source applications and managing Linux servers takes some expertise and time. If you lack either but still want to have your own instance of open source software, we can help you out. -With our new project, [High on Cloud][38], you can leave the deployment and server management part to us while you work on growing your community forum. - -### Wrapping Up - -Most of the open source forum software offer pretty much the same features for basic use-case. If you are looking for something specific, you might want to explore their documentations. - -Personally, I recommend Discourse. It is popular, modern looking and has a significant user base. - -What do you think is the best open source forum software? Did I miss any of your favorites? Let me know in the comments below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/open-source-forum-software/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[stevenzdg988](https://github.com/stevenzdg988) -校对:[校对者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.community/ -[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/12/open-source-forum-software.png?resize=800%2C450&ssl=1 -[3]: https://itsfoss.com/open-source-cms/ -[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/itsfoss-community-discourse.jpg?resize=800%2C561&ssl=1 -[5]: https://github.com/discourse/discourse -[6]: https://discourse.org/buy -[7]: https://www.discourse.org/ -[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/talkyard-forum.jpg?resize=800%2C598&ssl=1 -[9]: https://github.com/debiki/talkyard -[10]: https://www.talkyard.io/ -[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/nodebb.jpg?resize=800%2C369&ssl=1 -[12]: https://nodejs.org/en/ -[13]: https://github.com/NodeBB/NodeBB -[14]: https://nodebb.org/ -[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/vanilla-forums.png?resize=800%2C433&ssl=1 -[16]: https://github.com/Vanilla -[17]: https://vanillaforums.com/en/ -[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/open-source-eCommerce.png?fit=800%2C450&ssl=1 -[19]: https://itsfoss.com/open-source-ecommerce/ -[20]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/bbpress.jpg?resize=800%2C552&ssl=1 -[21]: https://github.com/bbpress -[22]: https://bbpress.org/ -[23]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/phpBB.png?resize=798%2C600&ssl=1 -[24]: https://github.com/phpbb/phpbb -[25]: https://www.phpbb.com/ -[26]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/simplemachines.jpg?resize=800%2C343&ssl=1 -[27]: https://www.simplemachines.org/ -[28]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/FluxBB.jpg?resize=800%2C542&ssl=1 -[29]: https://github.com/fluxbb/fluxbb/ -[30]: https://fluxbb.org/ -[31]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/mybb-example.png?resize=800%2C461&ssl=1 -[32]: https://github.com/mybb/mybb -[33]: https://mybb.com/ -[34]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/flarum-screenshot.png?resize=800%2C503&ssl=1 -[35]: https://docs.flarum.org/ -[36]: https://github.com/flarum -[37]: https://flarum.org/ -[38]: https://highoncloud.com/ diff --git a/translated/tech/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md b/translated/tech/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md new file mode 100644 index 0000000000..8d397b2c9b --- /dev/null +++ b/translated/tech/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md @@ -0,0 +1,226 @@ +[#]: collector: (lujun9972) +[#]: translator: (stevenzdg988) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (9 Open Source Forum Software That You Can Deploy on Your Linux Servers) +[#]: via: (https://itsfoss.com/open-source-forum-software/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +9 个可以在 Linux 服务器上部署的开源论坛软件 +====== + +_**是否想要建立社区论坛或客户支持门户站点?以下是一些可以在服务器上部署的最佳开源论坛软件。**_ + +就像我们的 [FOSS 社区][1]论坛一样,重要的是随时建立一个让志趣相投的人可以讨论,互动和寻求支持的平台。 + +论坛为用户(或客户)提供了一个满足他们大部分在 Internet(互联网)上不容易找到的东西(软件)的空间。 + +如果您是一家企业,则可以聘请开发人员团队并按照自己的方式建立自己的论坛,但这会增加大量预算。 + +幸运的是,您可以在服务器上部署多种出色的开源论坛软件,而且一切顺利!在此过程中,您将节省很多钱,但仍能获得所需的东西(软件)。 + +在这里,我列出了可以在 Linux 服务器上安装的最佳开源论坛软件列表。 + +### 建立社区门户的最佳开源论坛软件 + +![][2] + +如果您尚未建立过网站,则在部署论坛之前,可能需要看一下[某些开源网站创建工具][3]。 + +_**注意:** 列表没有特定的排名顺序。_ + +#### 1\. Discourse (现代和流行) + +![][4] + +Discourse 是人们用来部署配置讨论平台的最流行的现代论坛软件。实际上,我们的[FOSS 社区][1]论坛使用了 Discourse 平台。 + +它提供了我所知道的大多数基本功能,包括电子邮件通知,审核工具,样式自定义选项,像 Slack/WordPress 的第三方集成,甚至更多。 + +它是完全免费的自我托管,您也可以在 [GitHub][5]上找到该项目。如果您要减少将其部署在自托管服务器上的麻烦,可以决定选择 [Discourse 提供的自托管服务][6](肯定会很昂贵)。 + +[Discourse][7] + +#### 2\. Talkyard (来自 Discourse 和 StackOverflow 的灵感) + +![][8] + +Talkyard 是完全免费使用的开源项目。它看起来很像“ Discourse ”,但是如果您对其进行检查,则会有区别。 + +您可以在这从 StackOverflow 获得大多数关键功能,以及在论坛平台上期望得到的所有基本功能。它可能不是一个流行的论坛解决方案,但是如果您想要类似于 Discourse 的功能以及一些有趣的功能,那么值得尝试一下。 + +您可以在他们的 [GitHub 页面][9] 中进一步了解它。 + +[Talkyard][10] + +#### 3\. NodeBB (现代且功能齐全) + +![][11] + +NodeBB 是基于[Node.js][12]的开源论坛软件。它的目标是简单,简洁和快速。首先,它面向可用的托管计划的组织和企业。但是,您也可以选择自己托管它。 + +您还可以获得具有聊天和通知支持的实时本地分析功能。它还提供一个 API 将其与现有产品中的任何一个集成。它还支持审核工具和打击垃圾邮件的工具。 + +您可以获得一些立即可用的第三方集成支持,例如 WordPress,Mailchimp 等。 + +请在它们的[GitHub页面][13]或官方网站上进一步了解它。 + +[NodeBB][14] + +#### 4\. Vanilla 论坛(企业版) + +![][15] + +Vanilla Forums 主要是一款企业版的论坛软件,具有标记平台的基本功能,为客户提供问答,还可以对帖子进行投票。 + +用户体验具有现代的外观,并且已被像 EA,Adobe 和其他一些大公司使用。 + +当然,如果您想尝试基于云的 Vanilla 论坛(由专业团队管理)以及对某些高级功能的访问权,请随时请求演示。无论哪种情况,您都可以选择社区版,该社区版可以免费使用大多数负责自托管和管理的最新功能。 + +您可以在他们的官方网站和[GitHub 页面][16]上进一步了解它。 + +[Vanilla 论坛][17] + +**推荐阅读:** + +![][18] + +#### [建立在线购物网站的最佳开源电子商务平台][19] + +想要创建一个在线购物网站吗?以下是一些可以在自己的 Linux 服务器上部署的开源电子商务平台。 + +#### 5\. bbPress (来自 WordPress) + +![][20] + +bbPress 是由 WordPress 的创建者构建的可靠论坛软件。旨在提供一个简单而活泼的论坛体验。 + +用户界面看起来很老旧,但易于使用,并提供了您通常在论坛软件中需要的基本功能。审核工具既简单又易于设置。您可以使用可用的插件扩展功能,并从几个可用的主题中进行选择以调整论坛的外观。 + +如果您只想要一个没有花哨功能的简单论坛平台,bbPress 应该是完美的。您也可以查看他们的[GitHub 页面][21]了解更多信息。 + +[bbPress][22] + +#### 6\. phpBB (经典论坛软件) + +![][23] + +如果您想要传统的论坛设计而只想要基本功能,则 phpBB 软件是一个不错的选择。当然,您可能无法获得最佳的用户体验或功能,但是作为传统设计论坛平台,它是实用的并且非常有效。 + +尤其是,对于习惯使用传统方法的用户而言,这将是一种简单而有效的解决方案。 + +不仅限于简单,而且与普通托管服务提供商一起设置起来更容易。您可以在每个共享主机平台上获得一键式安装功能,因此也不需要太多的技术知识来进行设置。 + +您可以在他们的官方网站或[GitHub 页面][24]上找到更多有关它的信息。 + +[phpBB][25] + +#### 7\. Simple Machines 论坛(另一个经典) + +![][26] + +与 phpBB 类似,Simple Machines (简单机器)论坛是论坛平台的另一种基本(或简单)实现。您可能无法长期(至少不容易)自定义外观,但是默认外观是干净的,并提供了良好的用户体验。 + +就个人而言,相比 php BB 我更喜欢它,但是您可以前往他们的[官方网站][27]进行进一步的探索。同样,您可以使用一键安装方法在任何共享的托管服务上轻松安装 Simple Machines 论坛。 + +[Simple Machines 论坛][27] + +#### 8\. FluxBB (old school) + +![][28] + +FluxBB 是另一个简单,轻量级的开源论坛。与其他的相比,它可能维护的不是非常活跃,但是如果您只想部署一个由几个用户组成的基本论坛,则可以轻松尝试一下。 + +您可以在他们的官方网站和 [GitHub 页面][29]上找到更多有关它的信息。 + +[FluxBB][30] + +#### 9\. MyBB (不太受欢迎,但值得一看) + +![][31] + +MyBB 是一款独特的开源论坛软件,它提供多种样式,并包含您需要的基本功能。 + +从插件支持和审核工具开始,您将获得管理大型社区所需的一切。它还支持类似于 Discourse 和类似论坛软件面向个人用户的私人消息传递。 + +它可能不是一个流行的选项,但是它可以检查大多数用例,并且完全免费。您可能获得支持并在 [GitHub][32]上探索该项目。 + +[MyBB][33] + +#### 额外收获: Flarum (测试版) + +![][34] + +如果您想要更简单和独特的(论坛),请看一下 Flarum。它是一款轻量级的论坛软件,旨在以移动为先,同时提供快速的体验。 + +它支持某些第三方集成,也可以使用扩展来扩展功能。就我个人而言,它看起来很漂亮。我没有机会尝试它,您可以看一下它的[文档][35],可以肯定地认为它具有论坛所需的所有必要功能的特征。 + +值得注意的是 Flarum 是相当新的,因此仍处于测试阶段。您可能需要先将其部署在测试服务器上测试后再应用到生产环境。请查看其 [GitHub 页面][36]了解更多详细信息。 + +[Flarum][37] + +无法自我托管?让我们来帮助您 + +部署开源应用程序和管理 Linux 服务器需要专业知识和花费一些时间。如果两者都不缺,但仍然希望拥有自己的开源软件实例,我们可以为您提供帮助。 +通过我们的新项目 [High on Cloud][38],您可以在发展社区论坛的过程中将部署和服务器管理部分留给我们。 + +### 总结 + +大多数开源论坛软件都为基本用例提供几乎相同的功能。如果您正在寻找特定的内容,则可能需要浏览其文档。 + +就个人而言,我推荐 Discourse。它很流行,外观现代,拥有大量的用户基础。 + +您认为最好的开源论坛软件是什么?我是否错过了你的偏爱?在下面的评论中让我知道。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/open-source-forum-software/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[stevenzdg988](https://github.com/stevenzdg988) +校对:[校对者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.community/ +[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/12/open-source-forum-software.png?resize=800%2C450&ssl=1 +[3]: https://itsfoss.com/open-source-cms/ +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/itsfoss-community-discourse.jpg?resize=800%2C561&ssl=1 +[5]: https://github.com/discourse/discourse +[6]: https://discourse.org/buy +[7]: https://www.discourse.org/ +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/talkyard-forum.jpg?resize=800%2C598&ssl=1 +[9]: https://github.com/debiki/talkyard +[10]: https://www.talkyard.io/ +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/nodebb.jpg?resize=800%2C369&ssl=1 +[12]: https://nodejs.org/en/ +[13]: https://github.com/NodeBB/NodeBB +[14]: https://nodebb.org/ +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/vanilla-forums.png?resize=800%2C433&ssl=1 +[16]: https://github.com/Vanilla +[17]: https://vanillaforums.com/en/ +[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/open-source-eCommerce.png?fit=800%2C450&ssl=1 +[19]: https://itsfoss.com/open-source-ecommerce/ +[20]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/bbpress.jpg?resize=800%2C552&ssl=1 +[21]: https://github.com/bbpress +[22]: https://bbpress.org/ +[23]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/phpBB.png?resize=798%2C600&ssl=1 +[24]: https://github.com/phpbb/phpbb +[25]: https://www.phpbb.com/ +[26]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/simplemachines.jpg?resize=800%2C343&ssl=1 +[27]: https://www.simplemachines.org/ +[28]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/FluxBB.jpg?resize=800%2C542&ssl=1 +[29]: https://github.com/fluxbb/fluxbb/ +[30]: https://fluxbb.org/ +[31]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/mybb-example.png?resize=800%2C461&ssl=1 +[32]: https://github.com/mybb/mybb +[33]: https://mybb.com/ +[34]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/flarum-screenshot.png?resize=800%2C503&ssl=1 +[35]: https://docs.flarum.org/ +[36]: https://github.com/flarum +[37]: https://flarum.org/ +[38]: https://highoncloud.com/ From 5a3952b211a6b6923355dea4250644b362b58910 Mon Sep 17 00:00:00 2001 From: RiaXu <1257021170@qq.com> Date: Thu, 22 Apr 2021 10:46:32 +0800 Subject: [PATCH 765/818] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E7=94=B3=E9=A2=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20210421 Optimize your Python code with C.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20210421 Optimize your Python code with C.md b/sources/tech/20210421 Optimize your Python code with C.md index b21ec770ac..772c385fe1 100644 --- a/sources/tech/20210421 Optimize your Python code with C.md +++ b/sources/tech/20210421 Optimize your Python code with C.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/4/cython) [#]: author: (Alan Smithee https://opensource.com/users/alansmithee) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (RiaXu) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -197,7 +197,7 @@ via: https://opensource.com/article/21/4/cython 作者:[Alan Smithee][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[译者ID](https://github.com/ShuyRoy) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From d7fbc36e2f15d9e777e06400b46f41d1d8a70e2c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Apr 2021 11:52:18 +0800 Subject: [PATCH 766/818] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020210420=20?= =?UTF-8?q?The=20Guided=20Installer=20in=20Arch=20is=20a=20Step=20in=20the?= =?UTF-8?q?=20Right=20Direction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md --- ...n Arch is a Step in the Right Direction.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sources/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md diff --git a/sources/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md b/sources/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md new file mode 100644 index 0000000000..d28fdd0fe3 --- /dev/null +++ b/sources/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md @@ -0,0 +1,99 @@ +[#]: subject: (The Guided Installer in Arch is a Step in the Right Direction) +[#]: via: (https://news.itsfoss.com/arch-new-guided-installer/) +[#]: author: (Jacob Crume https://news.itsfoss.com/author/jacob/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +The Guided Installer in Arch is a Step in the Right Direction +====== + +For 20 years, Arch Linux has provided users access to a completely custom and unique system. Over those years, it has built a reputation for customization, at the expense of user-friendliness. + +As a [rolling release distro][1], Arch doesn’t provide any set releases, instead they just update the image each month. However, if you have downloaded Arch in the last few weeks, you may have noticed a new addition: **archinstall**. It makes [installing Arch Linux way easier][2]. + +![][3] + +Today, I will be discussing what this change represents for the future of the Arch project, and what this could mean for future releases. + +### A New Direction for Arch? + +![][4] + +While many were surprised at this move, having an official installer included by default is actually a very sensible move. It signifies a change in direction for Arch, with a greater focus on accessibility, while still retaining the legendary customization it is known for. + +As the installer’s GitHub page says: + +> The guided installer will provide user-friendly options along the way, but the keyword here is options, they are optional and will never be forced upon anyone + +This means that the new installer doesn’t affect advanced users, yet also opens up the distro to a wider audience. Among the many benefits this change brings, one stands above the crowd: more users. + +More users mean more support for the project, whether that is through donations or development work. And with each of these contributions, the user experience continues to improve for both new and experienced users alike. + +### This was bound to happen + +Looking into the past, we can see many additions to the installation medium that have helped new users. Examples of these include [pacstrap][5] (a tool to install base system) and [reflector][6] (a tool to find the best pacman mirrors). + +Plus, users have been asking for a way to script their installation for years, which the new installer provides. Capable of being scripted in Python, it enables far easier deployment for administrators, making it a very attractive option. + +### More Customizability (Somehow?) + +While it may seem counter-intuitive, the inclusion of an installer actually may improve the customization options of Arch. Currently, the biggest bottleneck with Arch’s incredible customization options is the user’s skill level, an issue eliminated thanks to archinstall. + +With the new installer, you don’t need to have the skills to create your perfect environment, instead taking advantage of the installer to do it for you. This opens up a huge range of customization options that would otherwise be out of reach for the average user. + +### Closing Thoughts + +With this new addition, it seems that Arch Linux has started moving towards a more User-Friendly philosophy. The new installer provides a wide range of benefits to Newbies and advanced users alike. These include wider customization options and a larger community. + +All in all, the new installer will provide a positive impact on the community as a whole. + +_What do you think about the new Arch guided installer? Have you tried it out yet?_ + +![][7] + +I'm not interested + +#### _Related_ + + * [Installing Arch Linux is Now Easier With This Change in the Newest ISO Refresh][2] + * ![][8] ![][9] + + + * [EndeavourOS's First Release of 2021 Brings Linux Kernel 5.10 LTS, Xfce 4.16, and More][10] + * ![][8] ![][11] + + + * [Linux Kernel 5.9 Reached End of Life. Here's What You Should Do Now!][12] + * ![][8] ![Linux kernel 5.9 reached end of life][13] + + + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/arch-new-guided-installer/ + +作者:[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/rolling-release/ +[2]: https://news.itsfoss.com/arch-linux-easy-install/ +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzQxMScgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzM3MScgd2lkdGg9JzM3MScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[5]: https://man.archlinux.org/man/pacstrap.8 +[6]: https://wiki.archlinux.org/index.php/Reflector +[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzI1MCcgd2lkdGg9Jzc1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzIwMCcgd2lkdGg9JzM1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[9]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/04/arch-linux-easy-install-feat.png?fit=1200%2C675&ssl=1&resize=350%2C200 +[10]: https://news.itsfoss.com/endeavouros-2021-release/ +[11]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/02/endeavouros-2021-ft.jpg?fit=1200%2C675&ssl=1&resize=350%2C200 +[12]: https://news.itsfoss.com/kernel-5-9-end-of-life/ +[13]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2020/12/linux-kerne-5-9-eol.png?fit=1200%2C675&ssl=1&resize=350%2C200 From 1bb09eda56bc77e98748d7cc25a90c8106f82b76 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Apr 2021 11:52:31 +0800 Subject: [PATCH 767/818] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020210419=20?= =?UTF-8?q?Ubuntu=2021.04=20is=20Releasing=20This=20Week!=20Take=20a=20Loo?= =?UTF-8?q?k=20at=20the=20New=20Features?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20210419 Ubuntu 21.04 is Releasing This Week- Take a Look at the New Features.md --- ...s Week- Take a Look at the New Features.md | 176 ++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 sources/news/20210419 Ubuntu 21.04 is Releasing This Week- Take a Look at the New Features.md diff --git a/sources/news/20210419 Ubuntu 21.04 is Releasing This Week- Take a Look at the New Features.md b/sources/news/20210419 Ubuntu 21.04 is Releasing This Week- Take a Look at the New Features.md new file mode 100644 index 0000000000..30a313a024 --- /dev/null +++ b/sources/news/20210419 Ubuntu 21.04 is Releasing This Week- Take a Look at the New Features.md @@ -0,0 +1,176 @@ +[#]: subject: (Ubuntu 21.04 is Releasing This Week! Take a Look at the New Features) +[#]: via: (https://news.itsfoss.com/ubuntu-21-04-features/) +[#]: author: (Abhishek https://news.itsfoss.com/author/root/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Ubuntu 21.04 is Releasing This Week! Take a Look at the New Features +====== + +Ubuntu 21.04 is releasing this week on April 22. Some of you might already have [upgraded to Ubuntu 21.04 beta][1] to enjoy the latest and greatest (?) version of Ubuntu. + +For the rest, who are curious about what’s new in Ubuntu 21.04, I have curated a list here. + +### What’s new in Ubuntu 21.04 ‘Hiruste Hippo’? + +First of all, this is an interim release. Don’t expect groundbreaking changes here specially when you compare it to Ubuntu 20.10. There are subtle visual changes here and there, a bit of performance improvements, newer versions of popular software and libraries in the official repository along with the addition of a couple of new features. + +![][2] + +#### 1\. Wayland becomes the default display server + +After the failed experiment with Ubuntu 17.10, Canonical is once again going with Wayland as the default display server in Ubuntu 21.04. + +Wayland has been available as an alternate option for past several releases. It is just becoming the default in this release. + +What does it mean to you? Wayland has a tad bit better performance specially when it comes to [multiple monitors and HiDPI screen handling][3]. + +However, you’ll find that several applications do not work very well or do not work at all in Wayland. This is painful for screen capture and recording applications. + +The good thing is that [switching back to Xorg from Wayland][4] is a matter of a few clicks. You just have to figure out if you cannot function well without Xorg server. + +#### 2\. Darker dark theme + +Yaru dark theme in Ubuntu 21.04 has a bit darker shade than the one in Ubuntu 20.10. This actually gives a nice look to the operating system, in my opinion. + +You can move the slider to see the visual difference between the dark shade of the two versions. + +#### 3\. Dark shell theme by default + +Ubuntu 20.10 the standard Yaru theme by default and you had to opt for the dark mode. That remains as it is in 21.04 as well except the shell theme has been switched to Yaru Dark by default. + +This means that even though your system will have the light theme by default, the notifications, message tray and the system tray will use dark theme. + +![][2] + +#### 4\. Power mode option for laptops + +This is a minor change in the power settings. If you are using a laptop, you can now choose a power mode from the settings. + +![][5] + +You have the following options available: + + * Performance: Takes a lot of batter power but gives high performance (keeps bluetooth active, screen brightness high and more) + * Balanced power: Standard performance with decent batter usage + * Power saver: The focus is on saving battery power + + + +#### 5\. A hybrid mix of GNOME 3.38 and some GNOME 40 applications + +The much anticipated [GNOME 40 with the unorthodox horizontal layout is not available in Ubuntu 21.04][6]. Ubuntu team was not ready for the GTK 4 and the layout change. They are working to bring it to Ubuntu 21.10 in October this year. + +While some core components like Nautilus file manager remain at 3.38, some other GNOME apps like Epiphany browser, Disk Utility etc have the latest versions. + +#### 6\. Private home directories + +So far, the home directories had the permission of 755. Fresh installation of Ubuntu 21.04 will have this changed to 750 and thus making the [home directories private][7]. + +![][8] + +#### 7\. Recovery key option for encrypted installs + +While installing Ubuntu, if you opt for disk encryption, you can now also set a recovery key option directly in the installer. + +![Image Credit: OMG Ubuntu][9] + +#### 8\. Minor visual changes + +By no means these are groundbreaking changes. It’s just something I noticed in Ubuntu 21.04 so far. + +You’ll notice that the items on the right click context menu has been divided by more contrast colored lines. I believe this is for accessibility reasons. + +![][10] + +I also noticed that the mounted drives are displayed in the top-right corner of the desktop. If I recall correctly, it used to be under the Home and Trash icons in the previous versions. + +![][11] + +The default Yaru icons have been refreshed for a number of software. You can clearly notice it for the LibreOffice icons. + +![][12] + +#### 9\. Under the hood changes + +Some other changes you should be aware: + + * Support for [Smart Card][13] authentication via PAM + * Drag and Drop interaction support with software in the desktop view + * Pipewire support enabled to handle audio in sandboxed applications and screen recording + * nftables replaces iptables + + + +There are newer versions of software: + + * Linux kernel 5.11 + * Python 3.9 + * gEdit 3.38.1 + * LibreOffice 7.1.2 + * Firefox 87 + + + +By now you might have realized that there are not many changes in this new release of Ubuntu. There is support for newer hardware and improvements for HiDPI and fingerprint reader but that’s not for everyone. It includes the latest Linux kernel 5.11 if that’s any consolation. + +If you are using Ubuntu 20.10, you should upgrade to Ubuntu 21.04 anyway because 20.10 reaches end of life in July. + +What’s your overall feeling about Ubuntu 21.04? Were you expecting more new features? What are you missing the most here? + +![][14] + +I'm not interested + +#### _Related_ + + * [No GNOME 40 for Ubuntu 21.04 [And That's a Good Thing]][15] + * ![][16] ![No GNOME 40 in Ubuntu 21.04][17] + + + * [With 21.04, Ubuntu is Switching to Wayland by Default Again][18] + * ![][16] ![Ubuntu 21.04 to use Wayland by default][19] + + + * [Ubuntu 21.04 Beta is Now Available to Download][20] + * ![][16] ![][21] + + + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/ubuntu-21-04-features/ + +作者:[Abhishek][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/root/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/upgrade-ubuntu-beta/ +[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzQzOScgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[3]: https://news.itsfoss.com/ubuntu-21-04-multi-monitor-support/ +[4]: https://itsfoss.com/switch-xorg-wayland/ +[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzQxMScgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[6]: https://news.itsfoss.com/gnome-40-release/ +[7]: https://news.itsfoss.com/private-home-directory-ubuntu-21-04/ +[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzI2MScgd2lkdGg9Jzc3MScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzQ3OScgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[10]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzQ2OCcgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[11]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzQxOScgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[12]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzE2Nycgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[13]: https://en.wikipedia.org/wiki/Smart_card +[14]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzI1MCcgd2lkdGg9Jzc1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[15]: https://news.itsfoss.com/no-gnome-40-in-ubuntu-21-04/ +[16]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzIwMCcgd2lkdGg9JzM1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[17]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/01/gnome-40-ubuntu-21-04.png?fit=1200%2C675&ssl=1&resize=350%2C200 +[18]: https://news.itsfoss.com/ubuntu-21-04-wayland/ +[19]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/01/wayland-by-default-in-ubuntu-21-04.png?fit=1200%2C675&ssl=1&resize=350%2C200 +[20]: https://news.itsfoss.com/ubuntu-21-04-beta-release/ +[21]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/04/ubuntu-21-04-ft.png?fit=1200%2C675&ssl=1&resize=350%2C200 From b5ba8640f763fe579be2c6311edce89aa3919e8e Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Apr 2021 11:52:45 +0800 Subject: [PATCH 768/818] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020210418=20?= =?UTF-8?q?F(r)iction:=20Or=20How=20I=20Learnt=20to=20Stop=20Worrying=20an?= =?UTF-8?q?d=20Start=20Loving=20Vim?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20210418 F(r)iction- Or How I Learnt to Stop Worrying and Start Loving Vim.md --- ...t to Stop Worrying and Start Loving Vim.md | 179 ++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 sources/news/20210418 F(r)iction- Or How I Learnt to Stop Worrying and Start Loving Vim.md diff --git a/sources/news/20210418 F(r)iction- Or How I Learnt to Stop Worrying and Start Loving Vim.md b/sources/news/20210418 F(r)iction- Or How I Learnt to Stop Worrying and Start Loving Vim.md new file mode 100644 index 0000000000..7743b5f167 --- /dev/null +++ b/sources/news/20210418 F(r)iction- Or How I Learnt to Stop Worrying and Start Loving Vim.md @@ -0,0 +1,179 @@ +[#]: subject: (F(r)iction: Or How I Learnt to Stop Worrying and Start Loving Vim) +[#]: via: (https://news.itsfoss.com/how-i-started-loving-vim/) +[#]: author: (Theena https://news.itsfoss.com/author/theena/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +F(r)iction: Or How I Learnt to Stop Worrying and Start Loving Vim +====== + +It is Dec 2009, and I am ready to quit my job. + +I wanted to focus on writing my first book; neither my commitments at work nor the state of technology was helping. + +Writing is hard work. + +Few tasks in the modern world can be as singular – or as daunting – a pursuit as sitting down in front of a blank piece of paper, and asking your brain to vomit out words that communicate an idea to readers. I am not suggesting that writing can’t be collaborative of course, but merely illustrating how daunting it can be for writers to set off on a new piece by themselves. This is true for fiction +and non-fiction writing, but since I am a novelist I’d like to focus primarily on fiction in this article. + +![][1] + +Remember what 2009 was like? + +Smart phones were 3 years old – I still hadn’t gone away from feature phones. Laptops were big and bulky. Meanwhile, cloud-based web applications for productivity was in their infancy, and just not good. Technologically speaking, writers like me were using their Gmail accounts (and a very young cloud-based storage called Dropbox) as an always-available option to work on their drafts, even while away from my personal computer. While this was a nice change from what writers had to go through when working with typewriters (or god forbid, pen and paper), it wasn’t much. + +For one thing, version control of manuscripts was a nightmare. Further, the more tools I added to my tool kit to simplify the workflow, the more I had to switch context – both from a UI and a UX sense. + +I would start writing drafts on Windows Notepad, save it on a MS Word Document on my PC at home, email myself a copy, keep another copy on Dropbox (since Dropbox wasn’t accessible at work), work on the copy of that file at work, email it back to myself at the end of the day, download it on the home computer, saving it under a new name and the respective date so that I would recognize the changes in the file were made at work (as opposed to home)…well you get the picture. If you think this workflow involving Windows Notepad, MS Word, Gmail, and Dropbox is insane, well now you know why I quit my job. + +More soberingly, I still know writers, damn good writers too, who use variations of the workflow that I followed in 2009. + +Over the next three years, I worked on the manuscript, completing the first draft in 2012. During the three years much had changed with the state of technology. Smart phones were actually pretty great, and some of the complications I had in 2009 had disappeared. I could still work on the same file that I had been working from at home, on my phone (not necessarily fresh writing, but editing had become considerably easier thanks to Dropbox on the phone.) My main writing tool remained Microsoft’s Windows Notepad and Word, which is how I completed the first draft. + +The novel [**First Utterance**][2] was released in 2016 to critical and commercial acclaim. + +The end. + +Or so I thought. + +As soon as I completed the manuscript and sent it to my editor, I had begun working on the second novel. I was no longer quitting my job to work on writing, but I had taken a more pragmatic approach: I’d take two weeks off at the end of ever year so that I could go to a little cabin in the mountains to write. + +It took me half a day to realize that the things that annoyed me about my [writing tools][3] and workflow had not disappeared, but morphed into a more complex beast. As a writer, I wasn’t being productive or as efficient as I wanted. + +### Linux in the time of Corona + +![][4] + +It is 2020 and the world is on the verge of mass hysteria. + +What had started out as an isolated novel virus in China was morphing into the first global pandemic since 1911. On March 20th, Sri Lanka followed most of the rest of the world and shutdown. + +April in Sri Lanka is the height of the dry season. Temperatures in concrete jungles like Colombo can reach the mid 30s, with humidity in the high 90s. It can drive most people to distraction at the best of times, but stuck at home with no always-on air conditioning while a global pandemic is underway? That is a good recipe for madness. + +My madness was Linux or, as we in the open source community call it, ‘distro-hopping’. + +The more I played around with *nix distros, the more enamoured I came to be with the idea of control. When nothing seems to be within our control – not even the simple act of shaking hands with another person – then it is only natural we lean towards things where we feel more in control. + +Where better to get more control in my life than with my computing? Naturally, this extended to my writing tools and workflow too. + +### The path to Vim + +There’s a joke about [Vim][5] that describes perfectly my first experience with it. People are obsessive about Vim because they don’t know how to close it. + +I was attempting to edit a configuration file, and the [fresh install of Ubuntu Server][6] had only Vim pre-installed. First there was panic – so much so I restarted the machine thinking the OS wasn’t picking up my keyboard. Then when it happened again, the inevitable Google search: ‘[How do I close vim?][7]‘ + +_Oh. That’s interesting_, I thought. + +_But why?_ + +To understand why I was even remotely interested in a text editor that was too complex to close, you have to understand how much I adore Windows Notepad. + +As a writer, I loved writing on its no-nonsense, no buttons, white-abyss like canvas. It had no spell check. It had no formatting. But I didn’t care. + +For the writer in me, Notepad was the best writing scratch pad ever devised. Unfortunately, it isn’t powerful – so even if I start writing my drafts in Notepad, I would move it to MS Word once I had passed a 1000 words – Notepad wasn’t built for prose, and those limitations would be glaringly obvious when I passed that word limit. + +So the first thing I installed I moved all my computing away from Windows, was a good text editor. + +[Kate][8] was the first replacement where I felt more comfortable than I did on Windows Notepad – it was more powerful (it had spell-checker!), and hey, I could mess around with some hobbyist-type coding in the same environment. + +It was love. + +But then Vim happened. + +The more I learnt about Vim, the more I watched developers live coding on Vim, the more I found myself opening Vim for my text editing needs. I use the phrase ‘text editing’ in the traditional Unix sense: editing blocks of text in configuration files, or sometimes writing basic Bash scripts. + +I still hadn’t used Vim remotely for my prose writing needs. + +For that I had LibreOffice. + +Sort of. + +While it is an adequate [replacement for MS Office][9], I found myself underwhelmed. The UI is perhaps even more distracting than MS Word, and with each distro having different packages of LibreOffice, I found myself using a hellishly fragmented tool kit and workflow, to say nothing about how different the UI can look in various distros and desktop environments. + +Things had become even more complicated because I had also started my Masters. In this scenario, I was taking notes down on Kate, transferring them to LibreOffice, and then saving it on to my Dropbox. + +Context switching was staring at me in the face every day. + +Productivity dropped as I had to open and close a number of unrelated applications. I needed one writing tool to meet all my needs – as a novelist, as a student, and as a hobbyist coder. + +And that’s when I realized that the solution to my context switching nightmare was also staring at me in the face at the same time. + +By this point, I had used Vim often enough – even used it with Termux on my Android phone – to be pretty comfortable with the idea of moving everything to Vim. Since it supported markdown syntax, note-taking would also become even easier. + +This was just about two months ago. + +How am I doing? + +It is April 2021. + +I started this draft on my phone, [using Vim][10] via Termux (with the aid of a Bluetooth keyboard), while in a taxi. I pushed the file to a GitHub private repo for my writing, from which I pulled the file to my PC, wrote a few more lines, before heading out again. I pulled the new version of the file from GitHub to my phone, made changes, pushed it, repeat, until I emailed the final draft to the editor. + +The context switching is now no more. + +The distractions that come from writing in word processors is no more. + +Editing is infinitely easier, and faster. + +My wrists are no longer in pain because I hid my mouse from sight. + +It is April 2021. + +I am a novelist. + +And I write on Vim. + +How? I’ll discuss the specific of this workflow in the second part of this column series on how non-tech people are using free and open source technology. Stay tuned. + +![][11] + +I'm not interested + +#### _Related_ + + * [Going Against Google Analytics With Plausible's Co-Founder [Interview]][12] + * ![][13] ![Interview with Plausible founder Marco Saric][14] + + + * [The Progress Linux has Made in Terms of Gaming is Simply Incredible: Lutris Creator][15] + * ![][13] ![][16] + + + * [Multi Monitor and HiDPI Setup is Looking Better on Ubuntu 21.04 [My Experience So Far]][17] + * ![][13] ![Multimonitor setup with Ubuntu 21.04][18] + + + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/how-i-started-loving-vim/ + +作者:[Theena][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/theena/ +[b]: https://github.com/lujun9972 +[1]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzM5MCcgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[2]: https://www.goodreads.com/book/show/29616237-first-utterance +[3]: https://itsfoss.com/open-source-tools-writers/ +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzM5NScgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[5]: https://www.vim.org/ +[6]: https://itsfoss.com/install-ubuntu-server-raspberry-pi/ +[7]: https://itsfoss.com/how-to-exit-vim/ +[8]: https://kate-editor.org/ +[9]: https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ +[10]: https://linuxhandbook.com/basic-vim-commands/ +[11]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzI1MCcgd2lkdGg9Jzc1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[12]: https://news.itsfoss.com/marko-saric-plausible/ +[13]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzIwMCcgd2lkdGg9JzM1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[14]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/04/Interview-plausible.jpg?fit=1200%2C675&ssl=1&resize=350%2C200 +[15]: https://news.itsfoss.com/lutris-creator-interview/ +[16]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/03/lutris-interview-ft.png?fit=1200%2C675&ssl=1&resize=350%2C200 +[17]: https://news.itsfoss.com/ubuntu-21-04-multi-monitor-support/ +[18]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/03/multi-monitor-ubuntu-21-itsfoss.jpg?fit=1200%2C675&ssl=1&resize=350%2C200 From 491f33db9264e42fe140ea117a14f7a63d89f220 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Apr 2021 11:53:08 +0800 Subject: [PATCH 769/818] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020210416=20?= =?UTF-8?q?Kate=20Editor=20Set=20to=20Become=20KDE=E2=80=99s=20Answer=20to?= =?UTF-8?q?=20Microsoft=E2=80=99s=20Visual=20Studio=20Code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20210416 Kate Editor Set to Become KDE-s Answer to Microsoft-s Visual Studio Code.md --- ...nswer to Microsoft-s Visual Studio Code.md | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 sources/news/20210416 Kate Editor Set to Become KDE-s Answer to Microsoft-s Visual Studio Code.md diff --git a/sources/news/20210416 Kate Editor Set to Become KDE-s Answer to Microsoft-s Visual Studio Code.md b/sources/news/20210416 Kate Editor Set to Become KDE-s Answer to Microsoft-s Visual Studio Code.md new file mode 100644 index 0000000000..b881262e10 --- /dev/null +++ b/sources/news/20210416 Kate Editor Set to Become KDE-s Answer to Microsoft-s Visual Studio Code.md @@ -0,0 +1,128 @@ +[#]: subject: (Kate Editor Set to Become KDE’s Answer to Microsoft’s Visual Studio Code) +[#]: via: (https://news.itsfoss.com/kate/) +[#]: author: (Jacob Crume https://news.itsfoss.com/author/jacob/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Kate Editor Set to Become KDE’s Answer to Microsoft’s Visual Studio Code +====== + +KDE has revealed some details on the upcoming 21.04 release of their Kate text editor, or KDE Advanced Text Editor. With this release comes a huge range of new features, such as a new HUD style command palette and improved search in files. + +To the Visual Studio Code users out there, this may seem familiar. Microsoft VS Code has had a similar style command palette for a long time, which Kate users (until now) had to leave out of their workflow. + +Some of the features I will be looking at in this article include: + + * **Integrated Git support** + * HUD style command palette + * Quick open with fuzzy matching + * Improved Search In Files + * Improved Language Server Protocol (LSP) support + + + +### Integrated Git Support – Finally! + +![][1] + +One of the biggest features of this update is the integrated git support. Although it has been possible to load git repositories in Kate for a while now, the new integrated git support allows you to checkout and create branches, stash stuff, stage your files for commit or diff, and do the commit and push afterward, **all without touching the terminal!** + +This is a huge improvement over the old way of using Kate’s built-in terminal to manage your repositories. + +Additionally, it opens up the ability to use git on the Windows version of Kate, which still doesn’t have the ability to access a command line (most likely due to the locked-down nature of it). + +This is a a huge feature, and I suspect that it will be welcomed by developers everywhere. + +### HUD Style Command Palette + +![][2] + +One of the key components of the VS Code workflow is the Command Palette. After waiting for years, this huge feature has finally been added to Kate. + +The Command Palette is possibly one of the most commonly used features in VS Code, and it has been one of the few things that have kept me using the aforementioned text editor. Now with the integration into Kate, I can happily switch, without worrying about a huge disruption to my workflow. + +### Quick Open (With Fuzzy Matching) + +![][3] + +A longtime feature of Kate, Quick Open hasn’t been improved all that much over the past few years. Now with the new 21.04 release, it is receiving a major overhaul, with things such as Fuzzy Matching and a new UI that aims to be more consistent with the Command Palette. + +The new UI is the result of a move to a more consistent design throughout Kate. Although minor, this change definitely is more eye-pleasing and helps improve the layout for those with larger screens. + +The fuzzy matching is also a welcome improvement. The Quick Open dialog used to use a wildcard filter for its top result, with direct matches to the search term being listed beneath it. The 21.04 release uses a new fuzzy matching algorithm, providing the best results at the top, with less likely results located at the bottom. + +The result of this is far more reliable results, which when combined with the new UI, provides a huge improvement to the user experience. + +### Improved Search in Files + +![][3] + +With the new release comes yet another welcome improvement: Better search in files. + +The search plugin got a major overhaul with much better result representation in the proper editor font and colors. It has also been improved in terms of speed, with a very noticeable performance jump. + +One way they achieved this is through parallelizing the search engine, allowing it to attempt to utilize all the available cores on the CPU. No longer does Kate need to hide behind Atom/VS Code! + +### Improved LSP Support + +![][4] + +For those unfamiliar with the term, LSP stands for Language Server Protocol. This is what’s responsible for the detection of code errors and warnings, go to definition/declaration capabilities, and symbol outlines. + +If you happen to be coding in one of the supported languages, it should be enabled out of the box, enabling Kate to be used similarly to a lightweight IDE. + +### Wrapping Up + +With this [upcoming new release][5], you can expect heaps of cool new features, each providing a better experience to the end-user. After a long wait, it seems that Kate is finally catching up with other [modern code editors like VS Code][6] in terms of features, with the added benefit of better integration into KDE Plasma desktop. + +The new release should arrive in within the next two weeks. Keep an eye out for it. + +![][7] + +I'm not interested + +#### _Related_ + + * [KDE Plasma 5.22 To Include New Adaptive Panel Opacity and Other Exciting Improvements][8] + * ![][9] ![][10] + + + * [KDE Plasma 5.21 Brings in a New Application Launcher, Wayland Support, and Other Exciting Additions][11] + * ![][9] ![][12] + + + * [Linux Release Roundup #21.12: 7-Zip, Vivaldi Browser 3.7, Audacity 3.0 and More New Releases][13] + * ![][9] ![Linux Release Roundups][14] + + + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/kate/ + +作者:[Jacob Crume][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lujun9972 +[1]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzUwNycgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzUxMCcgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzQzNScgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzM3Nycgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[5]: https://kate-editor.org/post/2021/2021-03-29-kate-21.04-feature-preview/ +[6]: https://itsfoss.com/best-modern-open-source-code-editors-for-linux/ +[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzI1MCcgd2lkdGg9Jzc1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[8]: https://news.itsfoss.com/kde-plasma-5-22-dev/ +[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzIwMCcgd2lkdGg9JzM1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[10]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/03/kde-plasma-22-dev-ft.png?fit=1200%2C675&ssl=1&resize=350%2C200 +[11]: https://news.itsfoss.com/kde-plasma-5-21-release/ +[12]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/02/kde-plasma-5-21-feat.png?fit=1200%2C675&ssl=1&resize=350%2C200 +[13]: https://news.itsfoss.com/linux-release-roundup-2021-12/ +[14]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2020/12/Linux-release-roundups.png?fit=800%2C450&ssl=1&resize=350%2C200 From ece4654be3135cf24fca0971edba82c65c171955 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Apr 2021 11:53:21 +0800 Subject: [PATCH 770/818] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020210416=20?= =?UTF-8?q?Metro=20Exodus=20is=20Finally=20Here=20on=20Steam=20for=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20210416 Metro Exodus is Finally Here on Steam for Linux.md --- ...odus is Finally Here on Steam for Linux.md | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 sources/news/20210416 Metro Exodus is Finally Here on Steam for Linux.md diff --git a/sources/news/20210416 Metro Exodus is Finally Here on Steam for Linux.md b/sources/news/20210416 Metro Exodus is Finally Here on Steam for Linux.md new file mode 100644 index 0000000000..37aa353478 --- /dev/null +++ b/sources/news/20210416 Metro Exodus is Finally Here on Steam for Linux.md @@ -0,0 +1,84 @@ +[#]: subject: (Metro Exodus is Finally Here on Steam for Linux) +[#]: via: (https://news.itsfoss.com/metro-exodus-steam/) +[#]: author: (Asesh Basu https://news.itsfoss.com/author/asesh/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Metro Exodus is Finally Here on Steam for Linux +====== + +Metro Exodus, a long-time fan favorite, is finally here in Linux. After a long wait of over two years, Linux users can finally get their hands on the third installment of the Metro trilogy. Although a few unofficial ports of the game was available, this is an official release by 4A Games. + +It is a first-person shooter game with gorgeous ray tracing graphics and the story is set in Russian wilderness across vast lands. The brilliant story-line spans an entire year through spring, summer and autumn to the nuclear winter. The game is a combination of fast-paced combat and stealth with exploration and survival and is easily one of the most immersive games in Linux. + +### Can my PC Run it? + +Being a graphically intensive game means you need to have a decent hardware to get good frame rates. This game heavily depends on Ray Tracing to make the images look as good as they do. + +Just to run the game, you will need **Intel Core i5 4400** with **8 GB** of RAM and an **NVIDIA GTX670** or AMD Radeon R9 380, at least. The recommended specification is Intel Core i7 4770K with a GTX1070 or RX 5500XT. + +Here is the official list of specifications as mentioned by developers: + +![][1] + +It’s a paid game, and you need to shell out $39.99 USD to get your hands on the newest and greatest version of Metro Exodus. + +Check for your graphics drivers and Linux kernel version if you can’t play it due to constant crashes. Some have reported a few issues with it to start with, but not a widespread problem. + +### Where do I get the Game? + +The Linux version is available on [Steam][2] for Linux. If you already bought the game, it will appear in your Steam for Linux library automatically. + +[Metro Exodus (Steam)][2] + +If you don’t have it installed, you can follow our guide to [install Steam on Ubuntu][3] and [Fedora][4]. + +_Do you already have Metro Exodus in your Steam library? Planning to get it? Let me know in the comments below._ + +![][5] + +I'm not interested + +#### _Related_ + + * [Popular Game Titles Metro Exodus and Total War: Rome Remastered Releasing for Linux in April][6] + * ![][7] ![][8] + + + * [Don't Miss These Epic Deals & Free Games for Linux This Holiday Season][9] + * ![][7] ![][10] + + + * [The Progress Linux has Made in Terms of Gaming is Simply Incredible: Lutris Creator][11] + * ![][7] ![][12] + + + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/metro-exodus-steam/ + +作者:[Asesh Basu][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/asesh/ +[b]: https://github.com/lujun9972 +[1]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzM3Micgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[2]: https://store.steampowered.com/app/412020/Metro_Exodus/ +[3]: https://itsfoss.com/install-steam-ubuntu-linux/ +[4]: https://itsfoss.com/install-steam-fedora/ +[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzI1MCcgd2lkdGg9Jzc1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[6]: https://news.itsfoss.com/metro-exodus-total-war-rome-linux/ +[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzIwMCcgd2lkdGg9JzM1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[8]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/03/metro-total-war-ft.png?fit=1200%2C675&ssl=1&resize=350%2C200 +[9]: https://news.itsfoss.com/game-deals-holiday-2020/ +[10]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2020/12/Linux-Game-Deals.png?fit=800%2C450&ssl=1&resize=350%2C200 +[11]: https://news.itsfoss.com/lutris-creator-interview/ +[12]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/03/lutris-interview-ft.png?fit=1200%2C675&ssl=1&resize=350%2C200 From 4ab959cc15c08f8aa36edc5e617838ab44d8d9ea Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Apr 2021 11:53:32 +0800 Subject: [PATCH 771/818] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020210416=20?= =?UTF-8?q?Much-Anticipated=20Zorin=20OS=2016=20is=20Available=20for=20Bet?= =?UTF-8?q?a=20Testing=20With=20A=20Stunning=20New=20Look?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20210416 Much-Anticipated Zorin OS 16 is Available for Beta Testing With A Stunning New Look.md --- ...r Beta Testing With A Stunning New Look.md | 155 ++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 sources/news/20210416 Much-Anticipated Zorin OS 16 is Available for Beta Testing With A Stunning New Look.md diff --git a/sources/news/20210416 Much-Anticipated Zorin OS 16 is Available for Beta Testing With A Stunning New Look.md b/sources/news/20210416 Much-Anticipated Zorin OS 16 is Available for Beta Testing With A Stunning New Look.md new file mode 100644 index 0000000000..9687debad2 --- /dev/null +++ b/sources/news/20210416 Much-Anticipated Zorin OS 16 is Available for Beta Testing With A Stunning New Look.md @@ -0,0 +1,155 @@ +[#]: subject: (Much-Anticipated Zorin OS 16 is Available for Beta Testing With A Stunning New Look) +[#]: via: (https://news.itsfoss.com/zorin-os-16-beta/) +[#]: author: (Ankush Das https://news.itsfoss.com/author/ankush/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Much-Anticipated Zorin OS 16 is Available for Beta Testing With A Stunning New Look +====== + +Zorin OS 16 was one of my picks for [distributions to look out for in 2021][1]. They always do something interesting with every major upgrade, and it looks like Zorin OS 16 is going to be an exciting release to talk about. + +The Zorin team [announced][2] the availability of Zorin OS 16 (based on **Ubuntu 20.04 LTS**) beta along with all the new features that come with it. + +Here, I will mention the highlights of the new release along with a video tour (with the download link at the bottom). + +### Zorin OS 16 Beta: What’s New? + +Zorin OS always tries to make the UX cleaner and attractive while improving the performance, let us see what Zorin OS 16 is all about. Here’s a short video tour to see it in action: + +Now, let me highlight the key changes: + +#### User Interface Refresh + +![][3] + +The most exciting part of this release is the UI overhaul that gives it an impressive look. + +Zorin OS 15 was already a [gorgeous Linux distribution][4]. And with Zorin OS 16, they have refreshed the user interface to look nicer and cleaner. + +It looks like we might have a good-looking alternative to Deepin Linux after all. + +The animations and the theme have been polished to look cleaner. Especially, with the new default background, it blends in pretty nice. In fact, it is a dynamic wallpaper that changes based on the time of the day. + +Also, the lock screen now displays your wallpaper blurred. + +#### Flathub Included + +The adoption of [Flatpak][5] is increasing every day. Now, Zorin OS 16 enables the Flathub repository by default. + +So, you can easily find Flatpak apps right from the Software store. + +Of course, you also have Snap store enabled by default. Hence, the software store presents you a range of catalogs. + +#### Improved Welcome Tour + +![][6] + +This is quite common for every distribution to include. However, this time Zorin OS has updated the tour to guide the user through the basics along with customization options. + +This is definitely going to be very helpful for a newbie. + +#### New Touchpad Gestures + +Even though I stick to my desktop, for users with Laptops the new touchpad gestures should help you navigate quickly between workspaces and activity overview. + +#### Addition of a Sound Recorder App + +The new sound recorder app is a minimal and beautiful app to let you record audio/speech. + +Having an audio recorder out of the box is a plus, not many distributions offer it. + +#### Customization Improvements + +![][7] + +Zorin OS 15 was moderately customizable. With Zorin OS 16, you get enhanced customization options for the taskbar and the overall layout of the system. + +You can set the panel’s transparency, display it on multiple monitors, auto-hide, and more. For the appearance, you can now select an icon theme, change the app theme, fonts, and more. + +The options look much cleaner and easier to find. + +#### Windows 10X-like Desktop Layout Planned + +![][8] + +They plan to introduce a Windows 10X-like desktop layout for users with comfortable with touchpad, touchscreens, and mice. This isn’t included with the beta, but it is expected arrive before the final release. + +Zorin OS was already a good choice as a [Windows-like distribution][9]. + +#### Other Improvements + +There are several under-the-hood tweaks that would contribute to a better user experience. Some of them include: + + * A new jelly animation effect when moving windows and minimizing it + * Fractional scaling support for high-res displays + * Improved Fingerprint reader support + * Unread icons + * Refresh settings app + * Disabled built-in tracking and telemetry in Firefox + * Linux Kernel 5.8 + + + +### Try Zorin OS 16 (Beta) + +You get the Zorin OS 16 beta ISO from the download button below. It is worth noting that it may not be wise to use it on a production system while it is meant for beta testing. + +As mentioned in their announcement post, other editions of Zorin OS 16 – such as Lite, Education, and Ultimate – will be available over the coming months. + +[Zorin OS 16 Core Beta][10] + +If you are curious, you may take a look at the full changelog to know more about the release. + +![][11] + +I'm not interested + +#### _Related_ + + * [Linux Release Roundup #21.16: CopyQ 4.0, Zorin OS 16 Beta, Slackware 15 Beta, and More New Releases][12] + * ![][13] ![Linux Release Roundups][14] + + + * [7 Linux Distros to Look Forward to in 2021][1] + * ![][13] ![Best Linux Distributions in 2021][15] + + + * [Fedora 34 Beta Arrives With Awesome GNOME 40 (Unlike Ubuntu 21.04)][16] + * ![][13] ![][17] + + + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/zorin-os-16-beta/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/linux-distros-for-2021/ +[2]: https://blog.zorin.com/2021/04/15/introducing-zorin-os-16-test-the-beta-today/ +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzQ0MCcgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[4]: https://itsfoss.com/beautiful-linux-distributions/ +[5]: https://itsfoss.com/what-is-flatpak/ +[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzY0MCcgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzU3Micgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzQzOScgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[9]: https://itsfoss.com/windows-like-linux-distributions/ +[10]: https://zorinos.com/download/16/core/beta +[11]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzI1MCcgd2lkdGg9Jzc1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[12]: https://news.itsfoss.com/linux-release-roundup-2021-16/ +[13]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzIwMCcgd2lkdGg9JzM1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[14]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2020/12/Linux-release-roundups.png?fit=800%2C450&ssl=1&resize=350%2C200 +[15]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/01/best-distros-2021.png?fit=1200%2C675&ssl=1&resize=350%2C200 +[16]: https://news.itsfoss.com/fedora-34-beta-release/ +[17]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/03/fedora-34-beta-ft.png?fit=1200%2C675&ssl=1&resize=350%2C200 From f27fa786be799e1fb6b9c5bf57fadfa7a6e5ac30 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Apr 2021 11:53:45 +0800 Subject: [PATCH 772/818] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020210415=20?= =?UTF-8?q?ProtonMail=20Users=20can=20Now=20Access=20Proton=20Calendar=20(?= =?UTF-8?q?beta)=20for=20Free?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20210415 ProtonMail Users can Now Access Proton Calendar (beta) for Free.md --- ... Access Proton Calendar (beta) for Free.md | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 sources/news/20210415 ProtonMail Users can Now Access Proton Calendar (beta) for Free.md diff --git a/sources/news/20210415 ProtonMail Users can Now Access Proton Calendar (beta) for Free.md b/sources/news/20210415 ProtonMail Users can Now Access Proton Calendar (beta) for Free.md new file mode 100644 index 0000000000..e5f0496b16 --- /dev/null +++ b/sources/news/20210415 ProtonMail Users can Now Access Proton Calendar (beta) for Free.md @@ -0,0 +1,96 @@ +[#]: subject: (ProtonMail Users can Now Access Proton Calendar (beta) for Free) +[#]: via: (https://news.itsfoss.com/protoncalendar-beta-free/) +[#]: author: (Ankush Das https://news.itsfoss.com/author/ankush/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +ProtonMail Users can Now Access Proton Calendar (beta) for Free +====== + +[ProtonMail][1] is one of the [best secure email services][2] out there. While alternatives like [Tutanota][3] already offer a calendar feature, ProtonMail did not offer it for all the users. + +The calendar feature (in beta) was limited to paid users. Recently, in an [announcement][4], ProtonMail has made it accessible for all users for free. + +It is worth noting that it is still in beta but accessible to more users. + +### Try Proton Calendar beta + +Proton Calendar is a feature integrated with ProtonMail itself. However, you get a separate mobile app if you want to use it on Android. No signs of an iOS app yet. + +If you are already using the **[beta.protonmail.com][5]** portal when accessing through your web browser, you can navigate your way to Proton Calendar as shown below: + +![][6] + +In either case, you can simply head to [Proton Calendar page][7] (calendar.protonmail.com) and log in to access it. + +They should also add the selector menu to the main ProtonMail version, but unfortunately, it is only available on the beta portal for now. + +As per the announcement, the features available with Proton Calendar right now are: + + * Create, edit, and delete events across devices + * Set reminders + * Send and respond to event invitations (web only for now) + * Set up recurring events annually, monthly, weekly, daily, or on an interval of your choice + * Also available in dark mode + + + +You can also import events from your existing calendar if you are thinking to make a switch. Event invitations should work from both Google and Microsoft Calendars. + +Unlike other calendars, Proton Calendar utilizes end-to-end encryption to protect your events. So, only you know what events you have and the information regarding it. + +If you are curious to know the details behind how they protect your calendar data, you can refer to their [official blog post][8] about it. + +_Have you tried Proton Calendar yet? Is it as useful as Tutanota’s already existing calendar if you’ve tried it?_ + +![][9] + +I'm not interested + +#### _Related_ + + * [Gmail's Privacy Alternative ProtonMail Makes 'Undo Send' Feature Available for All Users][10] + * ![][11] ![ProtonMail undo send option][12] + + + * [Firefox Proton With Major Redesign Change is Coming Soon. Take a Look Before the Final Release][13] + * ![][11] ![][14] + + + * [ProtonVPN Adds 'NetShield' Feature to Block Malware, Scripts & Ads Online][15] + * ![][11] ![NetShield by ProtonVPN][16] + + + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/protoncalendar-beta-free/ + +作者:[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://itsfoss.com/secure-private-email-services/ +[3]: https://tutanota.com/ +[4]: https://protonmail.com/blog/calendar-free-web-android/ +[5]: https://beta.protonmail.co +[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzI1OScgd2lkdGg9JzI4NycgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[7]: https://calendar.protonmail.com +[8]: https://protonmail.com/blog/protoncalendar-security-model/ +[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzI1MCcgd2lkdGg9Jzc1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[10]: https://news.itsfoss.com/protonmail-undo-send/ +[11]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzIwMCcgd2lkdGg9JzM1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[12]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/01/protonmail-undo-send.png?fit=1200%2C675&ssl=1&resize=350%2C200 +[13]: https://news.itsfoss.com/firefox-proton-redesign/ +[14]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/04/firefox-proton-look-ft.png?fit=1200%2C675&ssl=1&resize=350%2C200 +[15]: https://news.itsfoss.com/protonvpn-netshield/ +[16]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/01/Netshield-by-ProtonVPN.png?fit=1200%2C675&ssl=1&resize=350%2C200 From b88d1833fa14457b645650ba117cd914ac6e2b08 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 22 Apr 2021 11:53:56 +0800 Subject: [PATCH 773/818] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020210415=20?= =?UTF-8?q?Microsoft=20Gets=20into=20the=20OpenJDK=20Business:=20What=20Do?= =?UTF-8?q?es=20it=20Mean=20for=20You=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20210415 Microsoft Gets into the OpenJDK Business- What Does it Mean for You.md --- ...JDK Business- What Does it Mean for You.md | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 sources/news/20210415 Microsoft Gets into the OpenJDK Business- What Does it Mean for You.md diff --git a/sources/news/20210415 Microsoft Gets into the OpenJDK Business- What Does it Mean for You.md b/sources/news/20210415 Microsoft Gets into the OpenJDK Business- What Does it Mean for You.md new file mode 100644 index 0000000000..48d663b1fc --- /dev/null +++ b/sources/news/20210415 Microsoft Gets into the OpenJDK Business- What Does it Mean for You.md @@ -0,0 +1,98 @@ +[#]: subject: (Microsoft Gets into the OpenJDK Business: What Does it Mean for You?) +[#]: via: (https://news.itsfoss.com/microsoft-openjdk/) +[#]: author: (John Paul Wohlscheid https://news.itsfoss.com/author/john/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Microsoft Gets into the OpenJDK Business: What Does it Mean for You? +====== + +Microsoft is getting into the Java business. The question is “What does this mean for the Open-Source community?” Has Microsoft learned anything from their past interactions with Java? Let’s see. + +### Introducing Microsoft Builds of OpenJDK + +Microsoft recently announced that they would be releasing builds of OpenJDK. According to [the announcement][1], these builds will be Long-Term Support (LTS). + +The builds will include Java 11 (based on OpenJDK 11.0.10+9) for “macOS, Linux, and Windows”. They will be available for both servers and desktop systems. They are also introducing Early Access builds of Java 16 for Windows on ARM (based on OpenJDK 16+36). “The Microsoft Build of OpenJDK is a simple drop-in replacement for any other OpenJDK distribution available in the Java ecosystem.” + +All of the binaries available are considered “Preview”. The announcement mentions that Java 11 was released in 2018. So what call it a “Preview”? Because Microsoft wants feedback from customers on “things like the packaging and installation experience” before they make them production ready. + +Since they are consider Long-Term Support, Java 11 will be supported until 2024. OpenJDK 17 will be made available when Java 17 “is finalized”. Microsoft will not be offering support for Java 8. + +For those interested in the recipes Microsoft is using to bake its Java cake, they are using the “same build scripts used by the Eclipse Adoptium project and tested against the Eclipse Adoptium Quality Assurance suite (including OpenJDK project tests)”. + +The binaries are licensed as “General Public License 2.0 with Classpath Exception (GPLv2+CE)”. + +### Not Microsoft’s First Java Rodeo + +![][2] + +What’s interesting is that this is not the first time that Microsoft got involved with Java. Back in 1996, Microsoft introduced the imaginatively named [J++][3]. Initially, J++ got a lot of [good press][4]. + +However, the honeymoon didn’t last. [In 2007][5], Sun Microsystems sued Microsoft. They said that Microsoft “breached its licensing agreement by adding extensions that weren’t Java-compatible”. The suit was settled in 2001. “Microsoft was required to pay Sun $20 million, as well as to permanently stop using “Java-compatible” trademarks.” J++ supported ended in 2004. + +This was just one of [many times][6] that Microsoft enacted their [Embrace, Extent, Extinguish mantra][7]. This time it was Microsoft plans that were extinguished. + +Sometimes, its hard to equate all of the underhanded tactics that Microsoft committed under Bill Gates and his philanthropy. + +### So What Does This All Mean? + +The burning question is why is Microsoft even bothering to create these binaries in the first place? There are at least half of a dozen organizations that offer OpenJDK binaries, including IBM, Amazon, and Eclipse. + +[Mike and Chris from Coder Radio][8] has repeatedly mentioned that Microsoft is transforming itself into a company that creates tools for programmers. They don’t care what platform programmers use, just that they use Microsoft tools. (In the OpenJDK announcement, Microsoft listed the available platforms as “macOS, Linux, and Windows”.) This newest announcement is the latest step in the transformation. + +What does it mean for open source? If Microsoft leaves the OpenJDK binaries unchanged, probably not much. At most, they will make the binaries work better on Windows and with Visual Studio Code. However, the big concern would be if they start changing the code. + +My advice: Keep your eggs out of Microsoft’s basket, so you don’t get locked into their tooling. At least, until they have proven that they are not evil. After all, there are plenty of alternative already. + +![][9] + +I'm not interested + +#### _Related_ + + * [Microsoft Makes 'Extensible Storage Engine' Open-Source, Used by Windows 10 & Microsoft Exchange][10] + * ![][11] ![][12] + + + * [Is Google Locking Down Chrome to Resist the Rise of Chromium Based Browsers?][13] + * ![][11] ![Google Chrome][14] + + + * [Good News! elementary OS is Coming to Raspberry Pi 4][15] + * ![][11] ![elementary OS Raspberry Pi Build][16] + + + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/microsoft-openjdk/ + +作者:[John Paul Wohlscheid][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/john/ +[b]: https://github.com/lujun9972 +[1]: https://devblogs.microsoft.com/java/announcing-preview-of-microsoft-build-of-openjdk/ +[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzM3NScgd2lkdGg9JzI5NScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[3]: https://en.wikipedia.org/wiki/Visual_J%2B%2B +[4]: https://www.drdobbs.com/microsofts-visual-j-10/184415556 +[5]: https://www.informit.com/articles/article.aspx?p=101152 +[6]: https://birdhouse.org/beos/byte/30-bootloader/ +[7]: https://en.wikipedia.org/wiki/Embrace,_extend,_and_extinguish +[8]: https://coder.show/ +[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzI1MCcgd2lkdGg9Jzc1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[10]: https://news.itsfoss.com/microsoft-ese-open-source/ +[11]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzIwMCcgd2lkdGg9JzM1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[12]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/02/ese-microsoft.jpg?fit=1200%2C675&ssl=1&resize=350%2C200 +[13]: https://news.itsfoss.com/is-google-locking-down-chrome/ +[14]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/02/google-chrome.jpg?fit=1200%2C675&ssl=1&resize=350%2C200 +[15]: https://news.itsfoss.com/elementary-os-raspberry-pi-release/ +[16]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2020/12/elementaryos-raspberry-pi-build.jpg?fit=800%2C450&ssl=1&resize=350%2C200 From 7d250e5b2734a9bbf90643ed302283e34cebfaee Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 22 Apr 2021 14:18:45 +0800 Subject: [PATCH 774/818] Rename sources/news/20210418 F(r)iction- Or How I Learnt to Stop Worrying and Start Loving Vim.md to sources/talk/20210418 F(r)iction- Or How I Learnt to Stop Worrying and Start Loving Vim.md --- ...tion- Or How I Learnt to Stop Worrying and Start Loving Vim.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{news => talk}/20210418 F(r)iction- Or How I Learnt to Stop Worrying and Start Loving Vim.md (100%) diff --git a/sources/news/20210418 F(r)iction- Or How I Learnt to Stop Worrying and Start Loving Vim.md b/sources/talk/20210418 F(r)iction- Or How I Learnt to Stop Worrying and Start Loving Vim.md similarity index 100% rename from sources/news/20210418 F(r)iction- Or How I Learnt to Stop Worrying and Start Loving Vim.md rename to sources/talk/20210418 F(r)iction- Or How I Learnt to Stop Worrying and Start Loving Vim.md From 6d97327a8fd50608c8446121a10db74cf954760a Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 22 Apr 2021 14:24:37 +0800 Subject: [PATCH 775/818] Rename sources/news/20210415 Microsoft Gets into the OpenJDK Business- What Does it Mean for You.md to sources/talk/20210415 Microsoft Gets into the OpenJDK Business- What Does it Mean for You.md --- ...t Gets into the OpenJDK Business- What Does it Mean for You.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{news => talk}/20210415 Microsoft Gets into the OpenJDK Business- What Does it Mean for You.md (100%) diff --git a/sources/news/20210415 Microsoft Gets into the OpenJDK Business- What Does it Mean for You.md b/sources/talk/20210415 Microsoft Gets into the OpenJDK Business- What Does it Mean for You.md similarity index 100% rename from sources/news/20210415 Microsoft Gets into the OpenJDK Business- What Does it Mean for You.md rename to sources/talk/20210415 Microsoft Gets into the OpenJDK Business- What Does it Mean for You.md From f0e48af4e544c4ef73dc67b613e56434fcb8a59a Mon Sep 17 00:00:00 2001 From: RiaXu <1257021170@qq.com> Date: Thu, 22 Apr 2021 14:46:01 +0800 Subject: [PATCH 776/818] Update 20210421 Optimize your Python code with C.md --- sources/tech/20210421 Optimize your Python code with C.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20210421 Optimize your Python code with C.md b/sources/tech/20210421 Optimize your Python code with C.md index 772c385fe1..e000b1fbf0 100644 --- a/sources/tech/20210421 Optimize your Python code with C.md +++ b/sources/tech/20210421 Optimize your Python code with C.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/4/cython) [#]: author: (Alan Smithee https://opensource.com/users/alansmithee) [#]: collector: (lujun9972) -[#]: translator: (RiaXu) +[#]: translator: (ShuyRoy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -197,7 +197,7 @@ via: https://opensource.com/article/21/4/cython 作者:[Alan Smithee][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/ShuyRoy) +译者:[ShuyRoy](https://github.com/ShuyRoy) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 2d8c846b02610f615abcdf6920cb00d3c74b9b45 Mon Sep 17 00:00:00 2001 From: "Qian.Sun" Date: Thu, 22 Apr 2021 15:51:20 +0800 Subject: [PATCH 777/818] translated by DCOLIVERSUN --- ...you in Fedora Linux- Let-s get it fixed.md | 70 ------------------- ...you in Fedora Linux- Let-s get it fixed.md | 70 +++++++++++++++++++ 2 files changed, 70 insertions(+), 70 deletions(-) delete mode 100644 sources/tech/20210419 Something bugging you in Fedora Linux- Let-s get it fixed.md create mode 100644 translated/tech/20210419 Something bugging you in Fedora Linux- Let-s get it fixed.md diff --git a/sources/tech/20210419 Something bugging you in Fedora Linux- Let-s get it fixed.md b/sources/tech/20210419 Something bugging you in Fedora Linux- Let-s get it fixed.md deleted file mode 100644 index bf3bc428bd..0000000000 --- a/sources/tech/20210419 Something bugging you in Fedora Linux- Let-s get it fixed.md +++ /dev/null @@ -1,70 +0,0 @@ -[#]: subject: (Something bugging you in Fedora Linux? Let’s get it fixed!) -[#]: via: (https://fedoramagazine.org/something-bugging-you-in-fedora-linux-lets-get-it-fixed/) -[#]: author: (Matthew Miller https://fedoramagazine.org/author/mattdm/) -[#]: collector: (lujun9972) -[#]: translator: (DCOLIVERSUN) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Something bugging you in Fedora Linux? Let’s get it fixed! -====== - -![][1] - -Software has bugs. Any complicated system is guaranteed to have at least some bits that don’t work as planned. Fedora Linux is a _very_ complicated system. It contains thousands of packages created by countless independent upstream projects around the world. There are also hundreds of updates every week. So, it’s inevitable that problems creep in. This article addresses the bug fixing process and how some bugs may be prioritized. - -### The release development process - -As a Linux distribution project, we want to deliver a polished, “everything just works” experience to our users. Our release process starts with “Rawhide”. This is our development area where we integrate new versions of all that updated free and open source software. We’re constantly improving our ongoing testing and continuous integration processes to make even Rawhide safe to use for the adventurous. By its nature, however, Rawhide will always be a little bit rough. - -Twice a year we take that rough operating system and branch it for a beta release, and then a final release. As we do that, we make a concerted effort to find problems. We run Test Days to check on specific areas and features. “Candidate builds” are made which are checked against our [release validation test plan][2]. We then enter a “freeze” state where only approved changes go into the candidates. This isolates the candidate from the constant development (which still goes into Rawhide!) so new problems are not introduced. - -Many bugs, big and small, are squashed as part of the release process. When all goes according to plan, we have a shiny new on-schedule Fedora Linux release for all of our users. (We’ve done this reliably and repeatedly for the last few years — thanks, everyone who works so hard to make it so!) If something is really wrong, we can mark it as a “release blocker”. That means we won’t ship until it’s fixed. This is often appropriate for big issues, and definitely turns up the heat and attention that bug gets. - -Sometimes, we have issues that are persistent. Perhaps something that’s been going on for a release or two, or where we don’t have an agreed solution. Some issues are really annoying and frustrating to many users, but individually don’t rise to the level we’d normally block a release for. We _can_ mark these things as blockers. But that is a really big sledgehammer. A blocker may cause the bug to get finally smashed, but it can also cause disruption all around. If the schedule slips, all the _other_ bug fixes and improvements, as well as features people have been working on, don’t get to users. - -### The Prioritized Bugs process - -So, we have another way to address annoying bugs! The [Prioritized Bugs process][3] is a different way to highlight issues that result in unpleasantness for a large number of users. There’s no hammer here, but something more like a spotlight. Unlike the release blocker process, the Prioritized Bugs process does not have a strictly-defined set of criteria. Each bug is evaluated based on the breadth and severity of impact. - -A team of interested contributors helps curate a short list of issues that need attention. We then work to connect those issues to people who can fix them. This helps take pressure off of the release process, by not tying the issues to any specific deadlines. Ideally, we find and fix things before we even get to the beta stage. We try to keep the list short, no more than a handful, so there truly is a focus. This helps the teams and individuals addressing problems because they know we’re respectful of their often-stretched-thin time and energy. - -Through this process, Fedora has resolved dozens of serious and annoying problems. This includes everything from keyboard input glitches to SELinux errors to that thing where gigabytes of old, obsolete package updates would gradually fill up your disk. But we can do a lot more — we actually aren’t getting as many nominations as we can handle. So, if there’s something _you_ know that’s causing long-term frustration or affecting a lot of people and yet which seems to not be reaching a resolution, follow the [Prioritized Bugs process][3] and let _us_ know. - -#### **You can help** - -All Fedora contributors are invited to participate in the Prioritized Bugs process. Evaluation meetings occur every two weeks on IRC. Anyone is welcome to join and help us evaluate the nominated bugs. See the [calendar][4] for meeting time and location. The Fedora Program Manager sends an agenda to the [triage][5] and [devel][6] mailing lists the day before meetings. - -### Bug reports welcome - -Big or small, when you find a bug, we really appreciate it if you report it. In many cases, the best place to do that is with the project that creates the software. For example, lets say there is a problem with the way the Darktable photography software renders images from your digital camera. It’s best to take that to the Darktable developers. For another example, say there’s a problem with the GNOME or KDE desktop environments or with the software that is part of them. Taking these issues to those projects will usually get you the best results. - -However, if it’s a Fedora-specific problem, like something with our build or configuration of the software, or a problem with how it’s integrated, don’t hesitate to [file a bug with us][7]. This is also true when there is a problem which you know has a fix that we just haven’t included yet. - -I know this is kind of complex… it’d be nice to have a one-stop place to handle all of the bugs. But remember that Fedora packagers — the people who do the work of taking upstream software and configuring it to build in our system — are largely volunteers. They are not always the deepest experts in the code for the software they’re working with. When in doubt, you can always file a [Fedora bug][7]. The folks in Fedora responsible for the corresponding package can help with their connections to the upstream software project. - -Remember, when you find a bug that’s gone through diagnosis and doesn’t yet have a good fix, when you see something that affects a lot of people, or when there’s a long-standing problem that just isn’t getting attention, please nominate it as a Prioritized Bug. We’ll take a look and see what can be done! - -_PS: The famous image in the header is, of course, from the logbook of the Mark II computer at Harvard where Rear Admiral Grace Murray Hopper worked. But contrary to popular belief about the story, this isn’t the first use of the term “bug” for a systems problem — it was already common in engineering, which is why it was funny to find a literal bug as the cause of an issue. #nowyouknow #jokeexplainer_ - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/something-bugging-you-in-fedora-linux-lets-get-it-fixed/ - -作者:[Matthew Miller][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/mattdm/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2021/04/bugging_you-816x345.jpg -[2]: https://fedoraproject.org/wiki/QA:Release_validation_test_plan -[3]: https://docs.fedoraproject.org/en-US/program_management/prioritized_bugs/ -[4]: https://calendar.fedoraproject.org/base/ -[5]: https://lists.fedoraproject.org/archives/list/triage%40lists.fedoraproject.org/ -[6]: https://lists.fedoraproject.org/archives/list/devel%40lists.fedoraproject.org/ -[7]: https://docs.fedoraproject.org/en-US/quick-docs/howto-file-a-bug/ diff --git a/translated/tech/20210419 Something bugging you in Fedora Linux- Let-s get it fixed.md b/translated/tech/20210419 Something bugging you in Fedora Linux- Let-s get it fixed.md new file mode 100644 index 0000000000..1696d834ff --- /dev/null +++ b/translated/tech/20210419 Something bugging you in Fedora Linux- Let-s get it fixed.md @@ -0,0 +1,70 @@ +[#]: subject: (Something bugging you in Fedora Linux? Let’s get it fixed!) +[#]: via: (https://fedoramagazine.org/something-bugging-you-in-fedora-linux-lets-get-it-fixed/) +[#]: author: (Matthew Miller https://fedoramagazine.org/author/mattdm/) +[#]: collector: (lujun9972) +[#]: translator: (DCOLIVERSUN) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Fedora Linux 中有 Bug 吗?一起来修复它! +====== + +![][1] + +软件有 bug。任何复杂系统都无法保证每个部分都能按计划工作。Fedora Linux是一个 _非常_ 复杂的系统,包含几千个包,这些包由全球无数独立上游项目创建。每周还有数百个更新。因此,问题是不可避免的。本文介绍了 bug 修复过程以及如何确定 bug 优先级。 + +### 发布开发过程 + +作为 Linux 发行项目,我们希望为用户提供完善的、一切正常的体验。我们的发布起始于 “Rawhide”。我们在 Rawhide 中集成了所有更新的免费、开源软件,这些软件都是新版本的。我们一直在不断改进正在进行的测试和持续集成Continuous Integration过程,为了让 Rawhide 可以安全地用来做任何冒险行为。可是,从本质来讲,Rawhide 始终有点粗糙。 + +一年内我们两次把这个粗糙的操作系统先后分支到测试版本、最终版本。当我们这么做时,我们齐心协力地寻找问题。我们在测试日Test Days检查特定的区域和功能。“Candidate builds” 是根据我们的[发布验证测试计划][2]进行检测的。然后我们进入冻结状态freeze state,只有批准的更改可以并入候选版本。这就把候选版本从不断发展的版本中隔离开来,不断发展的版本并入 Rawhide 中。所以,不会引入新的问题。 + +在发布过程中许多 bug 被压缩,这些 bug 有大有小。当一切按计划进行时,我们为所有用户提供了按计划发布的崭新的 Fedora Linux版本。(在过去几年里,我们已经可靠地重复这一动作——感谢每个人的努力,我们做到了!)如果确实有问题,我们可以将其标记为发布阻碍release blocker。这就意味着我们要等到修复后才能发布。发布阻碍通常代表重大问题,该表达一定会引发对 bug 的关注。 + +有时,我们遇到的问题是持续存在的。可能是一两个版本正在发布的内容,或者是我们没有达成共识的解决方案。有些问题确实困扰着许多用户,但个别问题并没有达到阻碍发布的程度。我们可以将这些东西标记为阻碍blocker。但这会像锤子一样砸下来。阻碍可能导致最终破坏该 bug ,但也可能导致周围的破坏。如果进度落后,用户不会对其他所有 bug 修复、改进感兴趣的,更不会对一直开发的特性感兴趣。 + +### 按优先顺序排列 bug 流程 + +所以,我们有另一种方法来解决烦人的 bug。[按优先顺序排列 bug 流程][3]与其他方式不同,可以标出导致大量用户不满意的问题。这里没有锤子,更像是聚光灯。与发布阻碍不同,按优先顺序排列 bug 流程没有一套严格定义的标准。每个 bug 都是根据影响范围和严重性来评估的。 + +一组有兴趣的贡献者帮助策划一个简短列表,上面罗列着需要注意的问题。然后,我们的工作是将问题匹配到能够解决它们的人。这有助于减轻发布过程中的压力,因为它没有给问题指定任何特定的截止时间。理论上,我们甚至在进入测试阶段之前就发现并解决问题。我们尽量保持列表简短,不会超过几个,这样才会真正有重点。这种做法有助于团队和个人解决问题,因为他们知道我们尊重他们捉襟见肘的时间与精力。 + +通过这个过程,Fedora 解决了几十个严重而恼人的问题,包括从键盘输入故障到 SELinux 错误,再到千兆字节大小的旧包更新会逐渐填满你的磁盘。但是我们可以做得更多——我们实际上没有收到处理能力上限数量的提案。因此,如果你知道有什么事情导致了长期挫折或影响了很多人,至今没有达成解决方案,遵循[按优先顺序排列 bug 流程][3],提交给我们。 + +### **你可以帮助** + +邀请所有 Fedora 贡献者参与按优化顺序排列 bug 流程。每两周评估会议在 IRC 上举办。欢迎任何人加入并帮助我们评估指定的 bug。请参阅[日历][4]了解会议时间和地点。Fedora 程序管理器在会议开始的前一天将议程发送到[分类][5]和[开发][6]邮件列表。 + +### 欢迎报告 bug + +当你发现 bug 时,无论大小,我们很感激你能报告 bug。在很多情况下,解决 bug 最好的方式是回到创建该软件的项目中。例如,假设渲染数据相机照片的暗室摄影软件出了问题,最好把它带给暗室摄影软件的开发人员。再举个例子,假设 GNOME 或 KDE 桌面环境或组成部分软件出了问题,将这些问题带到这些项目中通常会得到最好的结果。 + +然而, 如果这是一个特定的 Fedora 问题,比如我们的软件构建或配置或者它集成的问题,毫不犹豫地[向我们提交 bug][7]。当你知道我们还没有解决的问题时,也要提交给我们。 + +我知道这很复杂... 最好有一个一站式的地方来处理所有 bug。但是请记住,Fedora 包装者大部分是志愿者,他们负责获取上游软件并将其配置到我们系统中。即便是对我们正在使用的软件,他们也不总是最了解代码的专家。有疑问的时候,你可以随时提交一个 [Fedora bug][7]。Fedora 中负责相应包的人员可以协助把它们连接到上游软件项目中。 + +请记住,当你发现一个已通过但尚未得到良好修复的 bug 时,当你看到影响很多人的问题时,或者当有一个长期存在的问题没有得到关注时,请将其指定为高优先级 bug。我们来看看能做些什么! + +_附言:标题中的著名图片当然是来自哈佛大学马克 2 号计算机的日志,这里曾是格蕾丝·赫柏少将工作的地方。但是与这个故事的普遍看法相背,这并不是 “bug” 一词第一次用于系统问题——它在工程中已经很常见了,发现字面上的 bug 代表问题原因这一现象是很有趣的,这就是原因。 #nowyouknow #jokeexplainer_ + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/something-bugging-you-in-fedora-linux-lets-get-it-fixed/ + +作者:[Matthew Miller][a] +选题:[lujun9972][b] +译者:[DCOLIVERSUN](https://github.com/DCOLIVERSUN) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/mattdm/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2021/04/bugging_you-816x345.jpg +[2]: https://fedoraproject.org/wiki/QA:Release_validation_test_plan +[3]: https://docs.fedoraproject.org/en-US/program_management/prioritized_bugs/ +[4]: https://calendar.fedoraproject.org/base/ +[5]: https://lists.fedoraproject.org/archives/list/triage%40lists.fedoraproject.org/ +[6]: https://lists.fedoraproject.org/archives/list/devel%40lists.fedoraproject.org/ +[7]: https://docs.fedoraproject.org/en-US/quick-docs/howto-file-a-bug/ From 0cbe4ad12f9a0f9ea497f9e6c956f712d25710ec Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 22 Apr 2021 19:10:29 +0800 Subject: [PATCH 778/818] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @Kevin3599 感谢您,完成了第一篇翻译。 --- ... Source Supply Chain- A Matter of Trust.md | 55 ++++++++++--------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/translated/talk/20200106 Open Source Supply Chain- A Matter of Trust.md b/translated/talk/20200106 Open Source Supply Chain- A Matter of Trust.md index a0fe07a2f9..05b37a32fe 100644 --- a/translated/talk/20200106 Open Source Supply Chain- A Matter of Trust.md +++ b/translated/talk/20200106 Open Source Supply Chain- A Matter of Trust.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (Kevin3599) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Open Source Supply Chain: A Matter of Trust) @@ -12,49 +12,52 @@ [![][1]][2] -_**Co-authored by Curtis Franklin, Jr**_ +共同作者:Curtis Franklin, Jr + +开源软件通常被认为比专有软件更安全、更有保障,因为如果用户愿意,他们可以从源代码编译软件。他们知道在他们环境中运行的代码的来源。在他们的环境中运行的代码每个部分都可以被审查,也可以追溯每段代码的开发者。 - 开源软件相比于商业性软件,通常是被认为更加安全的,因为用户可以编译软件的源代码开发者们知道在他们的开发环境中运行的代码。在他们的环境中运行的代码每个部分都可以被审查,也可以追溯每段代码的开发者。 +然而,用户和提供者们正在逐渐远离完全控制软件所带来的复杂性,而在转而追求软件的便捷和易用。 + +VMware 副总裁兼首席开源官 Dirk Hohndel 说:“当我看到在一个有关网络安全和隐私的讲座中,演讲者运行 `docker run` 命令来安装和运行一些从互联网上下载的随机二进制文件时,我经常会大吃一惊。这两件事似乎有点相左。” - 然而,用户和开发商们正在逐渐远离这样对软件的完全控制带来的复杂性,而在转而追求软件的便捷和易用。 - - VMware副总裁兼首席开源官Dirk Hohndel表示:“当我看到一个有关网络安全和隐私的演讲,然后演讲者运行‘docker run’命令来安装和运行从互联网上随机下载的二进制文件时,我感到大吃一惊。”“这两件事似乎有点不协调。”他说到。 +软件供应链,即将应用程序从编码、打包、分发到最终用户的过程是相当复杂的。如果其中有一环出现错误,可能会导致软件存在潜在的风险,特别是对于开源软件。一个恶意行为者可以访问后端,并在用户不知情或不受控的情况下向其插入任何可能的恶意代码。 - 软件供应链——应用程序从编码、打包、分发到最终用户的过程是相当复杂的。如果其中有一环出现错误,可能会导致软件存在潜在的风险,特别是对于开源软件。黑客可以访问后端并在用户不知情或不受控的情况下向其插入任何可能的恶意代码。 +这样的问题不单单存在于云原生领域,在现代应用开发中很常见,这包括 JavaScript、NPM、PyPI、RubyGems 等等。甚至连 Mac 上的 Homebrew 过去也是通过源代码提供,由用户自己编译。 + +“如今,你只需要下载二进制文件并安装它,并期望其源代码并没有被恶意修改过。”Hohndel 说,“作为一个行业,我们需要更加关注我们的开源代码供应。这对我来说是非常重要的事,我正努力让更多的人意识到其重要性。” - 这样的问题不单单存在于云计算领域。这样的问题在现代的app开发中很常见,包括JavaScript、npm、PyPI、RubyGems等等。甚至连Mac上的homebrew曾经依赖于用户自行编译的代码。 +然而,这不仅仅是一个二进制与源代码的关系。只运行一个二进制文件,而不必从源代码构建所有东西有着巨大的优势。当软件开发需求发生转变时候,这种运行方式允许开发人员在过程中更加灵活和响应更快。通过重用一些二进制文件,他们可以在新的开发和部署中快速地循环。 - Hohndel说:“今天,你只需要下载二进制文件并安装它,并期望其源代码并没有被恶意修改过。”“作为一个行业,我们需要更加关注我们的开源代码供应。这对我来说非常重要,我正努力让更多的人意识到其重要性。” - - 然而,这不仅仅是一个二进制与源代码的等式。只运行一个二进制文件,而不必从源代码构建所有东西有着巨大的优势。当软件开发需求发生转变时候,这种运行方式允许开发人员在过程中更加灵活和响应更快。通过重用一些二进制文件,他们可以在新的开发和部署中快速地循环。 +Hohndel 说:“如果有办法向这些软件添加签名,并建立一个‘即时’验证机制,让用户知道他们可以信任此软件,那就更好了。” - Hohndel 说:"如果有办法想这些软件添加签名,并建立一个'即时'验证机制,让用户知道他们可以信任此软件。会是很好的方案。 +Linux 发行版解决了这个问题,因为发行版充当了看门人的角色,负责检查进入受支持的软件存储库的软件包的完整性。 - Linux的发行版解决了这个问题,因为发行版充当了看门人的角色,负责检查进入受支持存储库的软件包的完整性。 +“像通过 Debian 等发行版提供的软件包都使用了密钥签名。要确保它确实是发行版中应包含的软件,需要进行大量工作。开发者们通过这种方式解决了开源供应链问题。”Hohndel 说。 - “像通过Debian等发行版提供的软件包都用密钥签名。要确保它确实是发行版中应包含的软件,需要进行大量工作。开发者们通过这种方式解决了开源供应链问题。”Hohndel说。 +但是,即使在 Linux 发行版上,人们也希望简化事情,并以正确性和安全性换取速度。现在,诸如 AppImage、Snap 和 Flatpack 之类的项目已经采用了二进制方式,从而将开源供应链信任问题带入了 Linux 发行版。这和 Docker 容器的问题如出一辙。 + +“理想的解决方案是为开源社区找到一种设计信任系统的方法,该系统可以确保如果二进制文件是用受信任网络中的密钥签名的,那么它就可以被信任,并允许我们可靠地返回源头并进行审核,” Hohndel 建议。 - 但是,即使在Linux发行版上,人们也希望简化事情,并以正确性和安全性换取速度。现在,诸如AppImage,Snap和Flatpack之类的项目已经采用了二进制搜索路由,从而将开源供应链信任问题带入了Linux发行版。而Docker容器又一次遇到了同样的问题。 +但是,所有这些额外的步骤都会产生成本,大多数项目开发者要么不愿意,或无力承担。一些项目正在尝试寻找解决该问题的方法。例如,NPM 已开始鼓励提交软件包的用户正确认证和保护其账户安全,以提高平台的可信度。 + +### 开源社区善于解决问题 + +Hohndel 致力于解决开源供应链问题,并正试图让更多开发者意识到其重要性。去年,VMware 收购了 Bitnami,这为管理由 VMware 所签名的开源软件提供了一个良机。 - “理想的解决方案是为开源社区找到一种设计信任系统的方法,该系统可以确保如果二进制文件是用受信任网络中的密钥签名的,那么它就可以被信任,并允许我们可靠地返回源头并进行审核,” Hohndel建议。 +“我们正在与各种上游开源社区进行交流,以提高对此的认识。我们还在讨论技术解决方案,这些方案将使这些社区更容易解决潜在的开源供应链问题。” Hohndel 说。 - 但是,所有这些附加步骤都会导致大多数项目产生开发者不愿或无法承担的费用。一些项目正在尝试寻找解决该问题的方法。例如,NPM已开始鼓励提交软件包的用户正确认证和保护其账户安全,以提高平台的可靠性。 +开源社区历来致力于确保软件质量,这其中也包括安全性和隐私性。不过,Hohndel 说:“我最担心的是,在对下一个新事物感到兴奋时,我们经常忽略了需要的基础工程原则。” - Hohndel致力于解决开源供应链问题,并正试图让更多开发者意识到其重要性。去年,VMware收购了Bitnami,这为管理由VMware所签名的开源软件提供了一个良机。 - - “我们正在与各种上游开源社区进行交流,以提高对此的认识。我们还在讨论技术解决方案,这些方案将使这些社区更容易解决潜在的开源供应链问题。” Hohndel说。 - - 开源社区历来致力于确保软件质量,这其中也包括安全性和隐私性。不过,Hohndel说:“我最担心的是,在对下一个新事物感到兴奋时,我们经常忽略需要的技术。” - - 最终,Hohndel认为答案将来自开源社区本身。 “开源是一种工程方法论,是一种社会实验。开源就是人们之间相互信任,相互合作,跨国界,公司之间以及竞争对手之间以我们以前从未有过的方式合作。”他解释说。 +最终,Hohndel 认为答案将来自开源社区本身。 “开源是一种工程方法论,是一种社会实验。开源就是人们之间相互信任、相互合作、跨国界和公司之间以及竞争对手之间的合作,以我们以前从未有过的方式。”他解释说。 + -------------------------------------------------------------------------------- via: https://www.linux.com/articles/open-source-supply-chain-a-matter-of-trust/ 作者:[Swapnil Bhartiya][a] 选题:[lujun9972][b] -译者:[Kevin3599]() -校对:[校对者ID](https://github.com/校对者ID) +译者:[Kevin3599](https://github.com/kevin3599) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 76af4b8ef7c8eaa605984b9711c7e814fe287542 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 22 Apr 2021 19:11:39 +0800 Subject: [PATCH 779/818] PUB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @Kevin3599 本文首发地址:https://linux.cn/article-13321-1.html 您的 LCTT 专页:https://linux.cn/lctt/Kevin3599 --- .../20200106 Open Source Supply Chain- A Matter of Trust.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/talk => published}/20200106 Open Source Supply Chain- A Matter of Trust.md (98%) diff --git a/translated/talk/20200106 Open Source Supply Chain- A Matter of Trust.md b/published/20200106 Open Source Supply Chain- A Matter of Trust.md similarity index 98% rename from translated/talk/20200106 Open Source Supply Chain- A Matter of Trust.md rename to published/20200106 Open Source Supply Chain- A Matter of Trust.md index 05b37a32fe..60aa20fb4c 100644 --- a/translated/talk/20200106 Open Source Supply Chain- A Matter of Trust.md +++ b/published/20200106 Open Source Supply Chain- A Matter of Trust.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (Kevin3599) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13321-1.html) [#]: subject: (Open Source Supply Chain: A Matter of Trust) [#]: via: (https://www.linux.com/articles/open-source-supply-chain-a-matter-of-trust/) [#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) From 2c928f596d89923c20b16f5e396a24d4a59193fd Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 22 Apr 2021 19:46:26 +0800 Subject: [PATCH 780/818] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=B6=85=E9=95=BF?= =?UTF-8?q?=E6=96=87=E4=BB=B6=EF=BC=8C=E4=BB=A5=E5=85=BC=E5=AE=B9=20Window?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @stevenzdg988 我修复了这个问题 @lujun9972 看来我们需要将文件名做个截断,比如不超过 200 字符或更短一些。 --- ...mand Tutorial series 7--Uncommented Lines of a Config File.md} | 0 ...team up on the Linux desktop, docs for Nvidia GPUs open up.md} | 0 ...le opens Android speech transcription and gesture tracking.md} | 0 ... => 20200908 Tux the Linux Penguin in its first video game.md} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename published/201601/{20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md => 20151127 Linux or UNIX grep Command Tutorial series 7--Uncommented Lines of a Config File.md} (100%) rename published/201908/{20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md => 20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up.md} (100%) rename published/201909/{20190831 Google opens Android speech transcription and gesture tracking, Twitter-s telemetry tooling, Blender-s growing adoption, and more news.md => 20190831 Google opens Android speech transcription and gesture tracking.md} (100%) rename sources/tech/{20200908 Tux the Linux Penguin in its first video game, better DNS and firewall on Android, Gitops IDE goes open source, and more open source news.md => 20200908 Tux the Linux Penguin in its first video game.md} (100%) diff --git a/published/201601/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md b/published/201601/20151127 Linux or UNIX grep Command Tutorial series 7--Uncommented Lines of a Config File.md similarity index 100% rename from published/201601/20151127 Linux or UNIX grep Command Tutorial series 7--Linux or UNIX View Only Configuration File Directives Uncommented Lines of a Config File.md rename to published/201601/20151127 Linux or UNIX grep Command Tutorial series 7--Uncommented Lines of a Config File.md diff --git a/published/201908/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md b/published/201908/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up.md similarity index 100% rename from published/201908/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up, a powerful new way to scan for firmware vulnerabilities, and more news.md rename to published/201908/20190817 GNOME and KDE team up on the Linux desktop, docs for Nvidia GPUs open up.md diff --git a/published/201909/20190831 Google opens Android speech transcription and gesture tracking, Twitter-s telemetry tooling, Blender-s growing adoption, and more news.md b/published/201909/20190831 Google opens Android speech transcription and gesture tracking.md similarity index 100% rename from published/201909/20190831 Google opens Android speech transcription and gesture tracking, Twitter-s telemetry tooling, Blender-s growing adoption, and more news.md rename to published/201909/20190831 Google opens Android speech transcription and gesture tracking.md diff --git a/sources/tech/20200908 Tux the Linux Penguin in its first video game, better DNS and firewall on Android, Gitops IDE goes open source, and more open source news.md b/sources/tech/20200908 Tux the Linux Penguin in its first video game.md similarity index 100% rename from sources/tech/20200908 Tux the Linux Penguin in its first video game, better DNS and firewall on Android, Gitops IDE goes open source, and more open source news.md rename to sources/tech/20200908 Tux the Linux Penguin in its first video game.md From bd954ad605d191e01abe1a4ff08d32cdf9197b24 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 22 Apr 2021 23:46:03 +0800 Subject: [PATCH 781/818] PRF @geekpi --- ...c terminal theme with open source tools.md | 36 +++++++------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/translated/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md b/translated/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md index c94d760cee..abbd774626 100644 --- a/translated/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md +++ b/translated/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md @@ -3,18 +3,20 @@ [#]: author: (Bryant Son https://opensource.com/users/brson) [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) 用开源工具定制 Mac 终端主题的 4 个步骤 ====== -用开源工具让你的终端窗口在 Mac 上漂亮起来。 -![4 different color terminal windows with code][1] + +> 用开源工具让你的终端窗口在 Mac 上漂亮起来。 + +![](https://img.linux.net.cn/data/attachment/album/202104/22/234534t3t7ntpvdde3v892.jpg) 你是否曾经厌倦了在你的 macOS 电脑上看到同样老式的终端窗口?如果是这样,使用开源的 Oh My Zsh 框架和 Powerlevel10k 主题为你的视图添加一些点缀。 -这个基本的逐步教程(包括最后的视频教程)将让你开始定制你的 macOS 终端。如果你是一个 Linux 用户,请查看 Seth Kenlon 的指南[为 Zsh 添加主题和插件][2]以获得深入指导。 +这个基本的逐步教程将让你开始定制你的 macOS 终端。如果你是一个 Linux 用户,请查看 Seth Kenlon 的指南 [为 Zsh 添加主题和插件][2] 以获得深入指导。 ### 步骤 1:安装 Oh My Zsh @@ -22,57 +24,43 @@ ![Oh My Zsh][4] -(Bryant Son, [CC BY-SA 4.0][5]) - Oh My Zsh 是在 MIT 许可下发布的。使用以下命令安装: - ``` -`$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"` +$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" ``` ### 步骤 2:安装 Powerlevel10k 字体 ![Powerlevel10k][6] -(Bryant Son, [CC BY-SA 4.0][5]) - Powerlevel10k 是一个 MIT 许可的 Zsh 主题。在安装 Powerlevel10k 之前,你需要为你的终端安装自定义字体。 -到 [Powerlevel10 GitHub][7] 页面,在 README中 搜索 “fonts”。安装自定义字体的步骤会根据你的操作系统而有所不同。本页底部的视频解释了如何在 macOS 上安装。这只需要简单地点击-下载-安装的系列操作。 +到 [Powerlevel10 GitHub][7] 页面,在 `README` 中 搜索 “fonts”。安装自定义字体的步骤会根据你的操作系统而有所不同。这只需要简单地点击-下载-安装的系列操作。 ![Powerlevel10k fonts][8] -(Bryant Son, [CC BY-SA 4.0][5]) - ### 步骤 3:安装 Powerlevel10k 主题 接下来,运行以下命令安装 Powerlevel10k: - ``` -`git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k` +git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k ``` 完成后,用文本编辑器,比如 [Vim][9],打开 `~/.zshrc` 配置文件,设置行 `ZSH_THEME="powerlevel10k/powerlevel10k`,然后保存文件。 ### 步骤 4:完成 Powerlevel10 的设置 -打开一个新的终端,你应该看到 Powerlevel10k 配置向导。如果没有,运行 `p10k configure` 来调出配置向导。如果你在步骤 2 中安装了自定义字体,那么图标和符号应该正确显示。将默认字体更改为 **MeslowLG NF**(请看下面的视频说明)。 +打开一个新的终端,你应该看到 Powerlevel10k 配置向导。如果没有,运行 `p10k configure` 来调出配置向导。如果你在步骤 2 中安装了自定义字体,那么图标和符号应该正确显示。将默认字体更改为 `MeslowLG NF`。 ![Powerlevel10k configuration][10] -(Bryant Son, [CC BY-SA 4.0][5]) - 当你完成配置后,你应该会看到一个漂亮的终端。 ![Oh My Zsh/Powerlevel10k theme][11] -(Bryant Son, [CC BY-SA 4.0][5]) - -如果你想看交互式教程,请看这个视频。 - -就是这些了!你应该可以享受你美丽的新终端了。请务必查看 Opensource.com 的其他文章,了解更多关于使用 shell、Linux 管理等方面的技巧和文章。 +就是这些了!你应该可以享受你美丽的新终端了。 -------------------------------------------------------------------------------- @@ -81,7 +69,7 @@ via: https://opensource.com/article/21/4/zsh-mac 作者:[Bryant Son][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/) 荣誉推出 From 5e67deeac0c1ea102b663ff659b0b66f91eff6d8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 22 Apr 2021 23:46:42 +0800 Subject: [PATCH 782/818] PUB @geekpi https://linux.cn/article-13323-1.html --- ...tomizing your Mac terminal theme with open source tools.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210419 4 steps to customizing your Mac terminal theme with open source tools.md (98%) diff --git a/translated/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md b/published/20210419 4 steps to customizing your Mac terminal theme with open source tools.md similarity index 98% rename from translated/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md rename to published/20210419 4 steps to customizing your Mac terminal theme with open source tools.md index abbd774626..19237b5d7c 100644 --- a/translated/tech/20210419 4 steps to customizing your Mac terminal theme with open source tools.md +++ b/published/20210419 4 steps to customizing your Mac terminal theme with open source tools.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13323-1.html) 用开源工具定制 Mac 终端主题的 4 个步骤 ====== From a076c391886414e7d4d89ee76857056ffaeddae5 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 23 Apr 2021 05:02:42 +0800 Subject: [PATCH 783/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210422=20?= =?UTF-8?q?Restore=20an=20old=20MacBook=20with=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210422 Restore an old MacBook with Linux.md --- ...10422 Restore an old MacBook with Linux.md | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 sources/tech/20210422 Restore an old MacBook with Linux.md diff --git a/sources/tech/20210422 Restore an old MacBook with Linux.md b/sources/tech/20210422 Restore an old MacBook with Linux.md new file mode 100644 index 0000000000..e83554ad66 --- /dev/null +++ b/sources/tech/20210422 Restore an old MacBook with Linux.md @@ -0,0 +1,104 @@ +[#]: subject: (Restore an old MacBook with Linux) +[#]: via: (https://opensource.com/article/21/4/restore-macbook-linux) +[#]: author: (Don Watkins https://opensource.com/users/don-watkins) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Restore an old MacBook with Linux +====== +Don't throw your old, slow MacBook into the recycling bin; extend its +life with Linux Mint. +![Writing Hand][1] + +Last year, I wrote about how you can give [new life to an old MacBook][2] with Linux, specifically Elementary OS in that instance. Recently, I returned to that circa 2015 MacBook Air and discovered I had lost my login password. I downloaded the latest Elementary OS 5.1.7 Hera release and could not get the live boot to recognize my Broadcom 4360 wireless chipset. + +Lately, I have been using [Linux Mint][3] to refurbish older laptops, and I thought I would give it a try on this MacBook Air. I downloaded the Linux Mint 20.1 ISO and created a USB boot drive using the [Popsicle][4] software on my Linux desktop computer. + +![Popsicle ISO burner][5] + +(Don Watkins, [CC BY-SA 4.0][6]) + +Next, I connected the Thunderbolt Ethernet adapter to the MacBook and inserted the USB boot drive. I powered on the system and pressed the Option key on the MacBook to instruct it to start it from a USB drive. + +Linux Mint started up nicely in live-boot mode, but the operating system didn't recognize a wireless connection. + +### Where's my wireless? + +This is because Broadcom, the company that makes WiFi cards for Apple devices, doesn't release open source drivers. This is in contrast to Intel, Atheros, and many other chip manufacturers—but it's the chipset used by Apple, so it's a common problem on MacBooks. + +I had a hard-wired Ethernet connection to the internet through my Thunderbolt adapter, so I _was_ online. From prior research, I knew that to get the wireless adapter working on this MacBook, I would need to issue three separate commands in the Bash terminal. However, during the installation process, I learned that Linux Mint has a nice built-in Driver Manager that provides an easy graphical user interface to assist with installing the software. + +![Linux Mint Driver Manager][7] + +(Don Watkins, [CC BY-SA 4.0][6]) + +Once that operation completed, I rebooted and brought up my newly refurbished MacBook Air with Linux Mint 20.1 installed. The Broadcom wireless adapter was working properly, allowing me to connect to my wireless network easily. + +### Installing wireless the manual way + +You can accomplish the same task from a terminal. First, purge any vestige of the Broadcom kernel source: + + +``` +`$ sudo apt-get purge bcmwl-kernel-source` +``` + +Then add a firmware installer: + + +``` +`$ sudo apt install firmware-b43-installer` +``` + +Finally, install the new firmware for the system: + + +``` +`$ sudo apt install linux-firmware` +``` + +### Using Linux as your Mac + +I installed [Phoronix Test Suite][8] to get a good snapshot of the MacBook Air. + +![MacBook Phoronix Test Suite output][9] + +(Don Watkins, [CC BY-SA 4.0][6]) + +The system works very well. A recent update to kernel 5.4.0-64-generic revealed that the wireless connection survived, and I have an 866Mbps connection to my home network. The Broadcom FaceTime camera does not work, but everything else works fine. + +I really like the [Linux Mint Cinnamon 20.1][10] desktop on this MacBook. + +![Linux Mint Cinnamon][11] + +(Don Watkins, [CC BY-SA 4.0][6]) + +I recommend giving Linux Mint a try if you have an older MacBook that has been rendered slow and inoperable due to macOS updates. I am very impressed with the distribution, and especially how it works on my MacBook Air. It has definitely extended the life expectancy of this powerful little laptop. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/restore-macbook-linux + +作者:[Don Watkins][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/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/write-hand_0.jpg?itok=Uw5RJD03 (Writing Hand) +[2]: https://opensource.com/article/20/2/macbook-linux-elementary +[3]: https://linuxmint.com/ +[4]: https://github.com/pop-os/popsicle +[5]: https://opensource.com/sites/default/files/uploads/popsicle.png (Popsicle ISO burner) +[6]: https://creativecommons.org/licenses/by-sa/4.0/ +[7]: https://opensource.com/sites/default/files/uploads/mint_drivermanager.png (Linux Mint Driver Manager) +[8]: https://www.phoronix-test-suite.com/ +[9]: https://opensource.com/sites/default/files/uploads/macbook_specs.png (MacBook Phoronix Test Suite output) +[10]: https://www.linuxmint.com/edition.php?id=284 +[11]: https://opensource.com/sites/default/files/uploads/mintcinnamon.png (Linux Mint Cinnamon) From 6c51b21aad3f7dc060e76a38f9acaa1f23c7334f Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 23 Apr 2021 05:03:10 +0800 Subject: [PATCH 784/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210422=20?= =?UTF-8?q?Energy=20infrastructure=20platform=20uses=20open=20source=20to?= =?UTF-8?q?=20fight=20climate=20change?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210422 Energy infrastructure platform uses open source to fight climate change.md --- ...ses open source to fight climate change.md | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 sources/tech/20210422 Energy infrastructure platform uses open source to fight climate change.md diff --git a/sources/tech/20210422 Energy infrastructure platform uses open source to fight climate change.md b/sources/tech/20210422 Energy infrastructure platform uses open source to fight climate change.md new file mode 100644 index 0000000000..222722b89d --- /dev/null +++ b/sources/tech/20210422 Energy infrastructure platform uses open source to fight climate change.md @@ -0,0 +1,74 @@ +[#]: subject: (Energy infrastructure platform uses open source to fight climate change) +[#]: via: (https://opensource.com/article/21/4/seapath-open-energy-infrastructure) +[#]: author: (Dr. Shuli Goodman https://opensource.com/users/shuligoodman) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Energy infrastructure platform uses open source to fight climate change +====== +SEAPATH is a Linux Foundation project that aims to modernize the power +grid through an open energy infrastructure. +![Light bulb][1] + +LF Energy is a Linux Foundation project working to accelerate the energy transition of the world's grids and transportation systems through open source. In December, our project took a major step toward achieving its mission when we and our member organizations Alliander, RTE, and Savoir-faire Linux launched [SEAPATH][2], which stands for Software Enabled Automation Platform and Artifacts. + +SEAPATH is a reference design and a real-time, open source platform for grid operators to run virtualized automation and protection applications. It is the second project for LF Energy's [Digital Substation Automation Systems][3] initiative and a vital step toward adopting renewable energy on the power grid. It will accelerate the grid's decarbonization, helping lead the planet to [carbon neutrality by 2050][4]. Power system transformation [leads all efforts for decarbonization][5]; it's the _key_ enabler for fighting climate change. + +### Breaking down silos + +Coordinating power generation, distribution, and transmission systems is a critical component of a green grid. + +Currently, the grid's infrastructure operates on a centralized, point-to-point framework, requiring a source like a gas- or coal-fired power plant to distribute electricity. Essentially, the grid was built on a foundation of silos with different systems for energy generation, transmission, and distribution. However, due to the high variability of renewable energy—power can be produced only when the sun shines or the wind blows—it's difficult to integrate clean energy sources into siloed systems. The [increasing use of electric vehicles][6] is also causing power supply and demand fluctuations. + +These challenges make it difficult for grid operators to control and optimize renewable sources of energy. Furthermore, the grid's infrastructure isn't sustainable for a clean energy future. In fact, the grid of the future will not be a grid at all. Rather, power system networks will process tsunamis of data that enable the orchestration, choreography, and coordination of energy supply and demand. The future energy framework will operate like the internet, digitally connecting thousands of power systems and processing data from their substations to generate, transmit, and distribute electricity. + +### Interoperability through open source + +In working toward clean energy integration, grid operators use digital substations, which require a growing number of computational devices to support field sensors, applications, and automation technologies. + +Typically, these components are provided by multiple proprietary solutions, making interoperability difficult due to redundant hardware requirements. This challenge largely correlates with vendor lock-in throughout the energy industry. US regulators allow utility companies to sign [50-plus year contracts][7] that secure their place in specified regions. As a result, utilities use proprietary solutions for their portion of the grid, making interoperability between substations difficult. In March 2021, we launched [FledgePOWER][8], a new project that seeks to address this problem. + +Solutions do not always share the same specifications, but they often handle similar data. Implementing new solutions is costly, creates technical debt, and is time-consuming. To manage these heterogeneous environments, operators tend to run deprecated legacy systems for decades. With the speed of change increasing, network operations have become increasingly complex, less flexible, and more expensive to operate. Being able to abstract this complexity offers system and network operators new tools for interoperability in a rapidly transforming environment. + +SEAPATH's goal is similar to the Linux Foundation's [OpenDaylight project][9], an open source initiative that catapulted software virtualization for telecommunication networks and set the industry standard for software-defined network infrastructure. SEAPATH aims to apply the same technology OpenDaylight uses to consolidate multi-provider systems on the grid into one platform. This aims to enable operators to digitally implement electricity distribution and transmission through data from their substations. This consolidation also supports time- and cost-efficiency, scalability, flexibility, innovation, and novel technology implementations and merging utility practices. + +Through cross-industry collaboration with SEAPATH, the energy sector can build customer- and vendor-agnostic virtualization technologies required by a modern, climate-conscious grid. The more flexible and scalable the grid can be for greener energy, the faster we can reach decarbonization. + +### How to get involved with SEAPATH + +If you are interested in learning more about SEAPATH or joining the project, here's how you can get involved: + + * **Learn about SEAPATH:** Check out LF Energy's [SEAPATH project page][2] to learn more about the initiative. We have a technical steering committee (TSC), a mailing list, open meetings, a wiki feed, and a roadmap that can help answer any questions you may have about the project. + * **Use SEAPATH:** To access SEAPATH, you must be a member of LF Energy. Organizations can join by [becoming a member][10]. LF Energy is funded through membership dues and contributions of engineering resources. Once registered, you can access SEAPATH on its [GitHub page][11]. If you can't join as an LF Energy member, we still encourage you to contribute by participating in technical projects and discussion lists. + + + +Time is running out for the energy industry to come together and improve the grid for our future. By joining as partners, the entire energy industry—and the entire world—can benefit from a grid powered by green energy for a brighter future. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/seapath-open-energy-infrastructure + +作者:[Dr. Shuli Goodman][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/shuligoodman +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bulb-light-energy-power-idea.png?itok=zTEEmTZB (Light bulb) +[2]: https://www.lfenergy.org/projects/seapath/ +[3]: https://wiki.lfenergy.org/display/HOME/Digital+Substation+Automation+Systems+%28DSAS%29+Initiative +[4]: https://grist.org/climate/yes-the-u-s-can-go-carbon-neutral-by-2050-says-new-princeton-study/ +[5]: https://e360.yale.edu/features/deep-decarbonization-a-realistic-way-forward-on-climate-change +[6]: https://www.iea.org/reports/global-ev-outlook-2020 +[7]: https://apnews.com/article/7393a2dd5c69f590a8e7db3d19f1e240 +[8]: https://www.lfenergy.org/projects/fledgepower/ +[9]: https://opensource.com/business/14/10/opendaylight-helium-gets-out-gate +[10]: https://www.lfenergy.org/join/ +[11]: https://github.com/seapath From bccf95da2f739752da0a0e69fd9856805079c1f4 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 23 Apr 2021 05:03:31 +0800 Subject: [PATCH 785/818] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020210422=20?= =?UTF-8?q?Hurrah!=20Ubuntu=2021.04=20is=20Now=20Available=20to=20Download?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20210422 Hurrah- Ubuntu 21.04 is Now Available to Download.md --- ...untu 21.04 is Now Available to Download.md | 125 ++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 sources/news/20210422 Hurrah- Ubuntu 21.04 is Now Available to Download.md diff --git a/sources/news/20210422 Hurrah- Ubuntu 21.04 is Now Available to Download.md b/sources/news/20210422 Hurrah- Ubuntu 21.04 is Now Available to Download.md new file mode 100644 index 0000000000..825ad149af --- /dev/null +++ b/sources/news/20210422 Hurrah- Ubuntu 21.04 is Now Available to Download.md @@ -0,0 +1,125 @@ +[#]: subject: (Hurrah! Ubuntu 21.04 is Now Available to Download) +[#]: via: (https://news.itsfoss.com/ubuntu-21-04-release/) +[#]: author: (Ankush Das https://news.itsfoss.com/author/ankush/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Hurrah! Ubuntu 21.04 is Now Available to Download +====== + +It is time to make way for Ubuntu’s latest stable release 21.04 Hiruste Hippo. + +While we already know a great deal about the [features introduced with Ubuntu 21.04][1], it has been [officially announced][2]. + +Yes, there’s no GNOME 40, which is a bummer. But, here, let me briefly mention the key highlights of the release and how to get the latest ISO. + +### Ubuntu 21.04: Key Highlights + +Considering this as an interim release, there are no ground-breaking changes but still a few things to get excited about. + +#### Wayland Is The Default Display Server + +This could be one of the most significant changes that you may want to keep an eye on. + +Many applications fail to work with Wayland, but we’re slowly getting Wayland support on new application releases considering its performance and security benefits. + +So, this is probably a bold step to move away from Xorg. + +#### UI Enhancements + +![][3] + +Ranging from subtle improvements to the Dark Theme to the adoption of dark theme by default, you will be greeted with some UI enhancements for a good user experience. + +Also, [Google’s Flutter apps are coming to Ubuntu 21.04][4]. You will find them through the snap store, and it should potentially enable Linux desktop to have high quality cross-platform with improved user experience overall. + +In addition to that, you might observe a few things here and there that could look a bit different. + +#### GNOME 40 Applications & GNOME 3.38 + +Even though it does not come baked in with [GNOME 40][5], you will find the default applications updated to GNOME 40. + +So, the GNOME 40 apps have been made compatible with GNOME 3.38 for this release. The next release should make the transition to GNOME 40 without any hiccups. + +#### Private Home Directories + +![][6] + +The home directory was readable/writable by root and other users. However, with [Ubuntu 21.04, they are making it private][7]. + +#### Other Improvements + +There are plenty of other improvements that include under-the-hood changes for new hardware support, enhanced laptop support, and more. + +Of course, the packages have been updated to the latest as well along with the inclusion of [Linux Kernel 5.11][8]. + +### Things to Know Before You Upgrade + +If you are using Ubuntu 20.10, you can easily upgrade to Ubuntu 21.04 through the **Updates** section. + +In either case, if you are on Ubuntu 20.04 LTS, I would not recommend upgrading to Ubuntu 21.04 yet unless you want the latest and greatest at the expense of stability and potential issues. + +### Download Ubuntu 21.04 Now + +You can get the latest release from the official website, both torrent and a direct ISO file download should be available as options. + +At the time of publishing this, the official website still did not include a link to the latest images but it should be updated soon enough. + +[Ubuntu 21.04 Download][9] + +If you need a choice of desktop environment, you will have to wait for the official flavors of Ubuntu to release an upgrade, that will take a while. + +_What do you think about Ubuntu 21.04 release? Feel free to let me know your thoughts in the comments!_ + +#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! + +If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. + +I'm not interested + +#### _Related_ + + * [Ubuntu 21.04 is Releasing This Week! Take a Look at the New Features][1] + * ![][10] ![Ubuntu 21.04 New Features][11] + + + * [Ubuntu 21.04 Beta is Now Available to Download][12] + * ![][10] ![][13] + + + * [Ubuntu 21.04 To Offer GNOME 40 Apps with GNOME 3.38 Desktop][14] + * ![][10] ![][15] + + + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/ubuntu-21-04-release/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/ubuntu-21-04-features/ +[2]: https://ubuntu.com/blog/ubuntu-21-04-is-here +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzQzOScgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[4]: https://itsfoss.com/google-flutter-apps-linux/ +[5]: https://news.itsfoss.com/gnome-40-release/ +[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzI2MScgd2lkdGg9Jzc3MScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[7]: https://news.itsfoss.com/private-home-directory-ubuntu-21-04/ +[8]: https://news.itsfoss.com/linux-kernel-5-11-release/ +[9]: https://ubuntu.com/download +[10]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzIwMCcgd2lkdGg9JzM1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[11]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/04/ubuntu_21_04_features.png?fit=1200%2C675&ssl=1&resize=350%2C200 +[12]: https://news.itsfoss.com/ubuntu-21-04-beta-release/ +[13]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/04/ubuntu-21-04-ft.png?fit=1200%2C675&ssl=1&resize=350%2C200 +[14]: https://news.itsfoss.com/ubuntu-21-04-gnome-40-apps/ +[15]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/03/ubuntu-21-04-gnome-40-feat.png?fit=1200%2C675&ssl=1&resize=350%2C200 From a639bc19c6b313c316eaba873122657f173d053f Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 23 Apr 2021 05:03:43 +0800 Subject: [PATCH 786/818] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020210422=20?= =?UTF-8?q?Confusion=20Erupts=20Around=20Misleading=20News=20Surrounding?= =?UTF-8?q?=20Youtube-dl=20Takedown?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20210422 Confusion Erupts Around Misleading News Surrounding Youtube-dl Takedown.md --- ...ng News Surrounding Youtube-dl Takedown.md | 132 ++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 sources/news/20210422 Confusion Erupts Around Misleading News Surrounding Youtube-dl Takedown.md diff --git a/sources/news/20210422 Confusion Erupts Around Misleading News Surrounding Youtube-dl Takedown.md b/sources/news/20210422 Confusion Erupts Around Misleading News Surrounding Youtube-dl Takedown.md new file mode 100644 index 0000000000..0ec6db98bb --- /dev/null +++ b/sources/news/20210422 Confusion Erupts Around Misleading News Surrounding Youtube-dl Takedown.md @@ -0,0 +1,132 @@ +[#]: subject: (Confusion Erupts Around Misleading News Surrounding Youtube-dl Takedown) +[#]: via: (https://news.itsfoss.com/youtube-dl-repo-fork/) +[#]: author: (Jacob Crume https://news.itsfoss.com/author/jacob/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Confusion Erupts Around Misleading News Surrounding Youtube-dl Takedown +====== + +In November 2020, [GitHub took down the Youtube-dl repository][1] after a complaint from the [RIAA][2]. This action caused a huge backlash within the open-source community, with many developers boycotting GitHub altogether. + +The RIAA claimed that [Youtube-dl][3] was using copyright-protection avoidance technologies, which resulted in immense criticism from multiple open-source organizations. In a surprise move, GitHub reinstated the repository several weeks later. + +![][4] + +To complement this reinstatement, they created a 1 million dollar takedown defense fund, designed to prevent situations like this in the future. + +### False News Surrounding Youtube-dl’s Forks + +![][5] + +Among the confusion caused by this takedown, some recent reports have surfaced claiming that forks of the Youtube-dl repository are still disabled. **This is not true**. If we look at the [list of forks,][6] we can see a huge list of repositories, with each one working as normal. + +Multiple sources reference [this repository][7], which has been taken down and has still not been reinstated by GitHub. However, it is not actually forked from the [official Youtube-dl repository][8]. Instead, this repository is based on an unofficial version of Youtube-dl and is not actually a Youtube-dl fork. + +This isn’t to say that GitHub is without blame, as they have still ignored this developer’s counternotice. However, this warrants nowhere near the amount of criticism GitHub has received because of this. + +### GitHub Working on Preventing a Situation Like This In The Future + +GitHub reinstated the Youtube-dl repository back then (and its forks), many were pleased to hear that they had also started work on preventing a situation like this in the future. Some of these initiatives include: + + * A 1,000,000 USD fund aimed to help developers fight DMCA notices + * Giving the option to developers to dispute the notice + * Requiring additional proof for part 1201 takedown notices + + + +#### New Fund to Fight DMCA Notices + +As a result of the community backlash GitHub received, they have invested one million USD into a fund designed to help developers fight unfair DMCA notices. According to the official [GitHub post:][9] + +> Developers who want to push back against unwarranted takedowns may face the risk of taking on personal liability and legal defense costs. To help them, GitHub will establish and donate $1M to a developer defense fund to help protect open source developers on GitHub from unwarranted DMCA Section 1201 takedown claims. + +GitHub + +Although providing legal support for open-source developers is not a new idea, GitHub providing this support directly is worth appreciating. + +If you are interested in other ways to get support with legal disputes over open-source software, you may want to look at the [SFLC][10] and [EFF][11]. If possible, it would also be great if you could support them whether that’s through donations of time or money. + +#### New Way For Developers To Dispute DMCA Notices + +Another way GitHub is working to improve its relationship with developers is through a new way to dispute takedown notices. This will improve the transparency between developers and the notice issuers, reducing the likelihood of another situation like this. + +> Every single credible 1201 takedown claim will be reviewed by technical experts, including (when appropriate) independent specialists retained by GitHub, to ensure that the project actually circumvents a technical protection measure as described in the claim. +> +> The claim will also be carefully scrutinized by legal experts to ensure that unwarranted claims or claims that extend beyond the boundaries of the DMCA are rejected. +> +> In the case where the claim is ambiguous, we will err on the side of the developer, and leave up the repository unless there is clear evidence of illegal circumvention. + +Yet again, it seems that GitHub is putting in a lot of effort to improve its policies on DMCA takedown notices. These improvements will definitely help with the number of false claims that are currently being accepted. + +#### More Proof Required for Future Part 1201 Notices + +For those without a background in law, Part 1201 DMCA Takedown Notices are a special kind of takedown notice used in cases where the offending party is using code designed to circumvent technical measures to protect copyrighted content. According to GitHub: + +> Section 1201 dates back to the late 1990s and did not anticipate the various implications it has for software use today. As a result, Section 1201 makes it illegal to use or distribute technology (including source code) that bypasses technical measures that control access or copying of copyrighted works, even if that technology can be used in a way that would not be copyright infringement. + +GitHub has now changed its policies so that anyone issuing a part 1201 notice must include additional evidence. This is beneficial to all involved parties as it means that most of the illegitimate claims will be void anyway. + +### Wrapping Up + +With the huge mess, this situation has created, I believe GitHub handled this as well as they reasonably could have. Additionally, it brought to light many legal issues surrounding part 1201 notices, which are being remedied right now. + +Overall, the outcome of this has actually been positive, with a huge step in the right direction in developer rights. Amidst the rumors and fake news that has been circling lately, I think it is important to recognize the changes that have been made, and what they mean for the future of open-source software. + +_What are your thoughts on the removal of Youtube-dl and then reinstating it? Let me know in the comments below!_ + +#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! + +If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. + +I'm not interested + +#### _Related_ + + * [PHP Repository Moves to GitHub After its Git Server Was Hacked][12] + * ![][13] ![][14] + + + * [10 Biggest Linux Stories of the Year 2020 [That Made the Biggest Impact]][15] + * ![][13] ![Biggest Linux Stories][16] + + + * [After Rocky Linux, We Have Another RHEL Fork in Works to Replace CentOS][17] + * ![][13] ![CloudLinux][18] + + + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/youtube-dl-repo-fork/ + +作者:[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/youtube-dl-github-takedown/ +[2]: https://www.riaa.com/ +[3]: https://youtube-dl.org/ +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzQzOCcgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzM3NScgd2lkdGg9Jzc0MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[6]: https://github.com/ytdl-org/youtube-dl/network/members +[7]: https://github.com/spookyahell/youtube-dl +[8]: https://github.com/ytdl-org/youtube-dl +[9]: https://github.blog/2020-11-16-standing-up-for-developers-youtube-dl-is-back/ +[10]: https://softwarefreedom.org/donate/ +[11]: https://www.eff.org/ +[12]: https://news.itsfoss.com/php-repository-github/ +[13]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzIwMCcgd2lkdGg9JzM1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[14]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/03/php-github-ft.png?fit=1200%2C675&ssl=1&resize=350%2C200 +[15]: https://news.itsfoss.com/biggest-linux-stories-2020/ +[16]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/01/biggest-linux-stories-2020.jpg?fit=1200%2C675&ssl=1&resize=350%2C200 +[17]: https://news.itsfoss.com/rhel-fork-by-cloudlinux/ +[18]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2020/12/Untitled-design-2.png?fit=800%2C450&ssl=1&resize=350%2C200 From 2e468d24d7cee38778c6ff24d7f1dd38372beb21 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 23 Apr 2021 05:03:57 +0800 Subject: [PATCH 787/818] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020210422=20?= =?UTF-8?q?Running=20Linux=20Apps=20In=20Windows=20Is=20Now=20A=20Reality?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20210422 Running Linux Apps In Windows Is Now A Reality.md --- ... Linux Apps In Windows Is Now A Reality.md | 143 ++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 sources/news/20210422 Running Linux Apps In Windows Is Now A Reality.md diff --git a/sources/news/20210422 Running Linux Apps In Windows Is Now A Reality.md b/sources/news/20210422 Running Linux Apps In Windows Is Now A Reality.md new file mode 100644 index 0000000000..f37147f235 --- /dev/null +++ b/sources/news/20210422 Running Linux Apps In Windows Is Now A Reality.md @@ -0,0 +1,143 @@ +[#]: subject: (Running Linux Apps In Windows Is Now A Reality) +[#]: via: (https://news.itsfoss.com/linux-gui-apps-wsl/) +[#]: author: (Jacob Crume https://news.itsfoss.com/author/jacob/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Running Linux Apps In Windows Is Now A Reality +====== + +When Microsoft released [Windows Subsystem for Linux][1] (WSL) in 2016, the hype was unreal. People were dreaming of running their Windows and Linux apps side-by-side, without having to reboot. But alas, WSL could only run terminal applications. + +Last year, Microsoft set out again to try to revolutionize the Windows app ecosystem. This time, they replaced the old emulated kernel with a real Linux kernel. This change allowed you to run [Linux apps in Windows][2]. + +### Initial Preview of GUI Apps for WSL + +![][3] + +Technically, you did get the initial support for Linux GUI apps on WSL, but only when using a 3rd-party X server. These were often buggy, slow, hard to set up, and posed a privacy concern. + +The result of this was a small group of Linux enthusiasts (that happened to run Windows) that had the skills and knowledge to set up an X server. These people were then horribly disappointed at the fact there was no hardware acceleration at all. + +So, it was wise to stick to command line utilities on WSL. + +**But this all changes now.** Now that Microsoft is [officially supporting][4] GUI Linux apps, we will be receiving hardware acceleration, alongside a huge range of other improvements in WSL. + +### Linux GUI Apps For The Masses: WSLg + +![Image Credit: Microsoft Devblogs][5] + +With the new official support from Microsoft in WSL, there is a huge range of available improvements. These include: + + * GPU hardware acceleration + * Audio and microphone support out of the box + * Automatic starting of the X and PulseAudio servers + + + +And, they’ve given this feature a nickname “**WSLg**“. + +These features will make running Linux apps on WSL almost as easy as running native apps, with a minimal performance impact. + +So, you can try running your [favorite IDE][6], Linux-specific testing use-cases, and a variety of other applications like [CAD software][7]. + +#### GPU Hardware Acceleration In Linux Apps + +![Image Credit: Microsoft Devblogs][8] + +One of the biggest issues with running GUI Linux apps on Windows previously was that they couldn’t use hardware acceleration. This left us with a slow mess when trying to move windows around and doing anything that needed some GPU horsepower. + +According to the announcement post from Microsoft: + +> As part of this feature, we have also enabled support for GPU accelerated 3D graphics! Thanks to work that was completed in Mesa 21.0, any applications that are doing complex 3D rendering can leverage OpenGL to accelerate these using the GPU on your Windows 10 machine. + +This is a useful addition, and should help anyone wanting to run GPU intensive applications through WSL. + +#### Audio And Microphone Support Out Of The Box! + +One of the key elements to a good experience with Linux apps running alongside Windows apps is the audio. With the new WSL update, audio is supported out of the box. This is achieved with a PulseAudio server being started at the same time as the X server. + +Microsoft explains: + +> Linux GUI applications on WSL will also include out-of-the-box audio and microphone support. This exciting aspect will let your apps play audio cues and utilize the microphone, perfect for building, testing, or using movie players, telecommunication apps, and more. + +If we want Linux apps to become more widespread, this is a key feature. This will also allow developers of Windows apps to better support porting their apps to Linux. + +#### Automatic Starting Of All The Required Servers + +![Image Credit: Microsoft Devblogs][9] + +Previously, you had to start the [PulseAudio][10] and [X servers][11] manually before being able to actually run anything. Now, Microsoft has implemented a service that checks to see if a Linux app is running, and then starts the required servers automatically. + +This allows much easier launching and using of Linux apps on Windows. + +Microsoft claims this will improve the user experience significantly: + +> With this feature, we are automatically starting a companion system distro, containing a Wayland, X server, pulse audio server, and everything else needed to make Linux GUI apps communicate with Windows. After you’re finished using GUI applications and terminate your WSL distribution the system distro will automatically end its session as well. + +These components combine to make it super easy to run Linux GUI apps alongside regular Windows apps. + +### Wrapping Up + +With all these new features, it looks like Microsoft is giving it their best to get Linux apps working on Windows. And with more users running Linux apps on Windows, we may see more of them jump ship and move solely to Linux. Especially since the apps they’re used to would run anyway. + +If this takes off (and Microsoft doesn’t kill it in a few years), it will bring an end to a 5-year quest to bring Linux apps to Windows. If you are curious to learn more about it, you can look at the [release announcement][12]. + +_What are your thoughts on GUI Linux apps running on Windows? Share them in the comments below!_ + +#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! + +If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. + +I'm not interested + +#### _Related_ + + * [Linux Mint 20.1 is Available to Download Now, Here are 9 New Features in This Release][13] + * ![][14] ![Linux Mint 20.1][15] + + + * [The Progress Linux has Made in Terms of Gaming is Simply Incredible: Lutris Creator][16] + * ![][14] ![][17] + + + * [Nitrux 1.3.8 Release Packs in KDE Plasma 5.21, Linux 5.11, and More Changes][18] + * ![][14] ![][19] + + + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-gui-apps-wsl/ + +作者:[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://docs.microsoft.com/en-us/windows/wsl/ +[2]: https://itsfoss.com/run-linux-apps-windows-wsl/ +[3]: https://i0.wp.com/i.ytimg.com/vi/f8_nvJzuaSU/hqdefault.jpg?w=780&ssl=1 +[4]: https://devblogs.microsoft.com/commandline/the-initial-preview-of-gui-app-support-is-now-available-for-the-windows-subsystem-for-linux-2/ +[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzQ0MScgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[6]: https://itsfoss.com/best-modern-open-source-code-editors-for-linux/ +[7]: https://itsfoss.com/cad-software-linux/ +[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzQ0NScgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzQ0MCcgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[10]: https://www.freedesktop.org/wiki/Software/PulseAudio/ +[11]: https://x.org/wiki/ +[12]: https://blogs.windows.com/windows-insider/2021/04/21/announcing-windows-10-insider-preview-build-21364/ +[13]: https://news.itsfoss.com/linux-mint-20-1-release/ +[14]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzIwMCcgd2lkdGg9JzM1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[15]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/01/linux-mint-20-1.png?fit=1200%2C675&ssl=1&resize=350%2C200 +[16]: https://news.itsfoss.com/lutris-creator-interview/ +[17]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/03/lutris-interview-ft.png?fit=1200%2C675&ssl=1&resize=350%2C200 +[18]: https://news.itsfoss.com/nitrux-1-3-8-release/ +[19]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/03/nitrux-1-3-8.png?fit=1200%2C675&ssl=1&resize=350%2C200 From 7d1967fe1e18119922caa743867c66c6bdd9534a Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 23 Apr 2021 08:44:34 +0800 Subject: [PATCH 788/818] translating --- ... With Variety of Sounds to Stay Focused.md | 88 ------------------- ... With Variety of Sounds to Stay Focused.md | 78 ++++++++++++++++ 2 files changed, 78 insertions(+), 88 deletions(-) delete mode 100644 sources/tech/20210420 Blanket- Ambient Noise App With Variety of Sounds to Stay Focused.md create mode 100644 translated/tech/20210420 Blanket- Ambient Noise App With Variety of Sounds to Stay Focused.md diff --git a/sources/tech/20210420 Blanket- Ambient Noise App With Variety of Sounds to Stay Focused.md b/sources/tech/20210420 Blanket- Ambient Noise App With Variety of Sounds to Stay Focused.md deleted file mode 100644 index cce8abbd45..0000000000 --- a/sources/tech/20210420 Blanket- Ambient Noise App With Variety of Sounds to Stay Focused.md +++ /dev/null @@ -1,88 +0,0 @@ -[#]: subject: (Blanket: Ambient Noise App With Variety of Sounds to Stay Focused) -[#]: via: (https://itsfoss.com/blanket-ambient-noise-app/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Blanket: Ambient Noise App With Variety of Sounds to Stay Focused -====== - -_**Brief: An open-source ambient noise player offering a variety of sounds to help you focus or fall asleep.**_ - -With the increase in the number of activities around you, it is often tough to keep calm and stay focused. - -Sometimes music helps, but it also distracts in some cases. But, ambient noise? That is always soothing to hear. Who doesn’t want to hear birds chirping, rain falling and crowd chattering in a restaurant? Okay, may be not the last one but listening to natural sound could help in relaxing and focusing. This indirectly boots your productivity. - -Recently, I came across a dedicated player which includes different sounds that could help anyone focus. - -### Play Different Ambient Sounds Using Blanket - -Blanket is an impressive ambient noise player that features different sounds that can help you fall asleep or just regain focus by helping you forget about the surrounding distractions. - -It includes nature sounds like rain, waves, birds chirping, storm, wind, water stream, and summer night. - -![][1] - -Also, if you are a commuter or someone comfortable in a mildly busy environment, you can find sounds for trains, boat, city, coffee shop, or a fireplace. - -If you are fond of white noise or pink noise, which combines all sound frequencies that humans can hear, that is available here too. - -It also lets you autostart every time you boot, if that is what you prefer. - -![][2] - -### Install Blanket on Linux - -The best way to install Blanket is from [Flathub][3]. Considering that you have [Flatpak][4] enabled, all you have to type in the terminal to install it is: - -``` -flatpak install flathub com.rafaelmardojai.Blanket -``` - -In case you’re new to Flatpak, you might want to go through our [Flatpak guide][5]. - -If you do not prefer using Flatpaks, you can install it using a PPA maintained by a contributor in the project. For Arch Linux users, you can find it in [AUR][6] to easily install it. - -In addition, you can also find packages for Fedora and openSUSE. To explore all the available packages, you can head to its [GitHub page][7]. - -**Recommended Read:** - -![][8] - -#### [Relax With Natural Sounds By Using Ambient Noise Music Player In Ubuntu][9] - -Listen to natural white noise music with Ambient Noise Music Player application In Ubuntu. - -### Closing Thoughts - -The user experience for a simple ambient noise player is pretty good. I have a pair of HyperX Alpha S headphones and I must mention that the quality of the sounds is good to hear. - -In other words, it is soothing to hear, and I will recommend you to try it out if you wanted to experience Ambient sounds to focus, get rid of your anxiety or just fall asleep. - -Have you tried it yet? Feel free to share your thoughts below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/blanket-ambient-noise-app/ - -作者:[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://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/blanket-screenshot.png?resize=614%2C726&ssl=1 -[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/blanket-autostart-1.png?resize=514%2C214&ssl=1 -[3]: https://flathub.org/apps/details/com.rafaelmardojai.Blanket -[4]: https://itsfoss.com/what-is-flatpak/ -[5]: https://itsfoss.com/flatpak-guide/ -[6]: https://itsfoss.com/aur-arch-linux/ -[7]: https://github.com/rafaelmardojai/blanket -[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2015/04/Ambient_Noise_Ubuntu.jpeg?fit=700%2C350&ssl=1 -[9]: https://itsfoss.com/ambient-noise-music-player-ubuntu/ diff --git a/translated/tech/20210420 Blanket- Ambient Noise App With Variety of Sounds to Stay Focused.md b/translated/tech/20210420 Blanket- Ambient Noise App With Variety of Sounds to Stay Focused.md new file mode 100644 index 0000000000..146a292ad9 --- /dev/null +++ b/translated/tech/20210420 Blanket- Ambient Noise App With Variety of Sounds to Stay Focused.md @@ -0,0 +1,78 @@ +[#]: subject: (Blanket: Ambient Noise App With Variety of Sounds to Stay Focused) +[#]: via: (https://itsfoss.com/blanket-ambient-noise-app/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Blanket:拥有各种环境噪音的应用,帮助保持注意力集中 +====== + +_**简介:一个开源的环境噪音播放器,提供各种声音,帮助你集中注意力或入睡。**_ + +随着你周围活动的增加,要保持冷静和专注往往是很困难的。 + +有时,音乐会有所帮助,但在某些情况下也会分散注意力。但是,环境噪音如何?这总是让人听起来很舒心。谁不想在餐厅里听到鸟叫声、雨滴声和人群的交谈声?好吧,可能不是最后一个,但听自然的声音可以帮助放松和集中注意力。这间接地提高了你的工作效率。 + +最近,我发现了一个专门的播放器,其中包含了不同的声音,可以帮助任何人集中注意力。 + +### 使用 Blanket 播放不同的环境声音 + +Blanket 是一个令人印象深刻的环境噪音播放器,它具有不同的声音,可以帮助你入睡或只是通过帮助你忘记周围的干扰来重获注意力。 + +它包括自然界的声音,像雨声、海浪声、鸟鸣声、风暴声、风声、水流声、夏夜声。 + +![][1] + +此外,如果你是一个通勤者或在轻微繁忙的环境中感到舒适的人,你可以找到火车、船、城市、咖啡馆或壁炉的声音。 + +如果你喜欢白噪声或粉红噪声,它结合了人类能听到的所有声音频率,这里也可以找到。 + +它还可以让你在每次开机时自动启动,如果你喜欢这样的话。 + +![][2] + +### 在 Linux 上安装 Blanket + +安装 Blanket 的最好方法是来自 [Flathub][3]。考虑到你已经启用了 [Flatpak][4],你只需在终端键入以下命令就可以安装它: + +``` +flatpak install flathub com.rafaelmardojai.Blanket +``` + +如果你是 Flatpak 的新手,你可能想通过我们的 [Flatpak 指南][5]了解。 + +如果你不喜欢使用 Flatpaks,你可以使用该项目中的贡献者维护的 PPA 来安装它。对于 Arch Linux 用户,你可以在 [AUR][6] 中找到它,以方便安装。 + +此外,你还可以找到 Fedora 和 openSUSE 的软件包。要探索所有可用的软件包,你可以前往其 [GitHub 页面][7]。 + +### 结束语 + +对于一个简单的环境噪音播放器来说,用户体验是相当好的。我有一副 HyperX Alpha S 耳机,我必须要说声音的质量很好。 + +换句话说,它听起来很舒缓,如果你想体验环境声音来集中注意力,摆脱焦虑或只是睡着,我建议你试试。 + +你试过它了吗?欢迎在下面分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/blanket-ambient-noise-app/ + +作者:[Ankush Das][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://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/blanket-screenshot.png?resize=614%2C726&ssl=1 +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/blanket-autostart-1.png?resize=514%2C214&ssl=1 +[3]: https://flathub.org/apps/details/com.rafaelmardojai.Blanket +[4]: https://itsfoss.com/what-is-flatpak/ +[5]: https://itsfoss.com/flatpak-guide/ +[6]: https://itsfoss.com/aur-arch-linux/ +[7]: https://github.com/rafaelmardojai/blanket From 42423d29e602de3a1dd786fc046b01b29cbe1857 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 23 Apr 2021 08:59:15 +0800 Subject: [PATCH 789/818] translating --- ...20 Application observability with Apache Kafka and SigNoz.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210420 Application observability with Apache Kafka and SigNoz.md b/sources/tech/20210420 Application observability with Apache Kafka and SigNoz.md index be94aca606..36b52ad61c 100644 --- a/sources/tech/20210420 Application observability with Apache Kafka and SigNoz.md +++ b/sources/tech/20210420 Application observability with Apache Kafka and SigNoz.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/4/observability-apache-kafka-signoz) [#]: author: (Nitish Tiwari https://opensource.com/users/tiwarinitish86) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From f934e6a656d9d25775fd399979da72ea87031f00 Mon Sep 17 00:00:00 2001 From: Kevin3599 <69574926+Kevin3599@users.noreply.github.com> Date: Fri, 23 Apr 2021 18:11:48 +0800 Subject: [PATCH 790/818] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E7=94=B3=E8=AF=B7=20?= =?UTF-8?q?(#21707)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update 20200106 Open Source Supply Chain- A Matter of Trust.md * Create 20200106 Open Source Supply Chain- A Matter of Trust.md 申请译文 * Update 20200106 Open Source Supply Chain- A Matter of Trust.md 申请译文 * Update 20200106 Open Source Supply Chain- A Matter of Trust.md 申请译文 * Update 20200106 Open Source Supply Chain- A Matter of Trust.md 完成翻译 * Update 20200106 Open Source Supply Chain- A Matter of Trust.md * Rename sources/talk/20200106 Open Source Supply Chain- A Matter of Trust.md to translated/talk/20200106 Open Source Supply Chain- A Matter of Trust.md * Update 20200106 Open Source Supply Chain- A Matter of Trust.md * Update 20200106 Open Source Supply Chain- A Matter of Trust.md * Update 20200106 Open Source Supply Chain- A Matter of Trust.md * Update 20210420 The Guided Installer in Arch is a Step in the Right Direction.md * Update 20210420 The Guided Installer in Arch is a Step in the Right Direction.md * Update 20210420 The Guided Installer in Arch is a Step in the Right Direction.md --- ...Guided Installer in Arch is a Step in the Right Direction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md b/sources/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md index d28fdd0fe3..60263301ae 100644 --- a/sources/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md +++ b/sources/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md @@ -2,7 +2,7 @@ [#]: via: (https://news.itsfoss.com/arch-new-guided-installer/) [#]: author: (Jacob Crume https://news.itsfoss.com/author/jacob/) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (Kevin3599 ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 37075aa0314f853e305e01bf9584a9a899fd629d Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 23 Apr 2021 18:13:04 +0800 Subject: [PATCH 791/818] Rename sources/tech/20210422 Energy infrastructure platform uses open source to fight climate change.md to sources/talk/20210422 Energy infrastructure platform uses open source to fight climate change.md --- ...structure platform uses open source to fight climate change.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20210422 Energy infrastructure platform uses open source to fight climate change.md (100%) diff --git a/sources/tech/20210422 Energy infrastructure platform uses open source to fight climate change.md b/sources/talk/20210422 Energy infrastructure platform uses open source to fight climate change.md similarity index 100% rename from sources/tech/20210422 Energy infrastructure platform uses open source to fight climate change.md rename to sources/talk/20210422 Energy infrastructure platform uses open source to fight climate change.md From 263ac09e11b34482a2a41295c0b1ec6c9e9013ec Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 23 Apr 2021 18:45:18 +0800 Subject: [PATCH 792/818] PRF @geekpi --- ...and Edit EPUB Files on Linux With Sigil.md | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/translated/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md b/translated/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md index 1f0780b0ec..204b54915f 100644 --- a/translated/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md +++ b/translated/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md @@ -3,16 +3,18 @@ [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) 用 Sigil 在 Linux 上创建和编辑 EPUB 文件 ====== -Sigil 是一个开源的 Linux、Windows 和 MacOS 上的 EPUB 编辑器。你可以使用 Sigil 创建一个新的 EPUB 格式的电子书,或编辑现有的 EPUB 电子书(以 .epub 扩展结尾的文件)。 +![](https://img.linux.net.cn/data/attachment/album/202104/23/184455qn6u6oozmf6gmnec.jpg) -如果你感到好奇,EPUB 是一个标准的电子书格式,并被几个数字出版集团认可。它被许多设备和电子阅读器支持,除了 亚马逊的 Kindle。 +Sigil 是一个开源的 Linux、Windows 和 MacOS 上的 EPUB 编辑器。你可以使用 Sigil 创建一个新的 EPUB 格式的电子书,或编辑现有的 EPUB 电子书(以 `.epub` 扩展结尾的文件)。 + +如果你感到好奇,EPUB 是一个标准的电子书格式,并被几个数字出版集团认可。它被许多设备和电子阅读器支持,除了亚马逊的 Kindle。 ### Sigil 让你创建或编辑 EPUB 文件 @@ -20,15 +22,14 @@ Sigil 是一个开源的 Linux、Windows 和 MacOS 上的 EPUB 编辑器。你 ![][2] -很多人在[创建或编辑电子书时非常相信 Calibre][3]。它确实是一个完整的工具,它有很多的功能并支持不仅仅是 EPUB 格式。然而,Calibre 有时可能是沉重的资源。 - +很多人在 [创建或编辑电子书时非常相信 Calibre][3]。它确实是一个完整的工具,它有很多的功能,支持的格式不只是 EPUB 格式。然而,Calibre 有时可能需要过多的资源。 Sigil 只专注于 EPUB 书籍,它有以下功能: * 支持 EPUB 2 和 EPUB 3(有一定的限制) * 提供代码视图预览 * 编辑 EPUB 语法 - * 带有多级标题的内容表生成器 + * 带有多级标题的目录生成器 * 编辑元数据 * 拼写检查 * 支持正则查找和替换 @@ -37,9 +38,7 @@ Sigil 只专注于 EPUB 书籍,它有以下功能: * 多语言支持的接口 * 支持 Linux、Windows 和 MacOS - - -Sigil 不是你可以直接输入新书章节的 [WYSIWYG][4] 类型的编辑器。由于 EPUB 依赖于 XML,因此它专注于代码。 将其视为用于 EPUB 文件的[类似于 VS Code 的代码编辑器][5]。出于这个原因,你应该使用一些其他[开源写作工具][6],以 epub 格式导出你的文件(如果可能的话),然后在 Sigil 中编辑它。 +Sigil 不是你可以直接输入新书章节的 [所见即所得][4] 类型的编辑器。由于 EPUB 依赖于 XML,因此它专注于代码。可以将其视为用于 EPUB 文件的 [类似于 VS Code 的代码编辑器][5]。出于这个原因,你应该使用一些其他 [开源写作工具][6],以 epub 格式导出你的文件(如果可能的话),然后在 Sigil 中编辑它。 ![][7] @@ -51,7 +50,7 @@ Sigil 是一款跨平台应用,支持 Windows 和 macOS 以及 Linux。它是 ![Sigil in Ubuntu Software Center][9] -你可能需要事先启用 universe 仓库。你也可以在 Ubuntu发行版中使用 apt 命令: +你可能需要事先启用 universe 仓库。你也可以在 Ubuntu发行版中使用 `apt` 命令: ``` sudo apt install sigil @@ -65,15 +64,15 @@ Sigil 有很多对 Python 库和模块的依赖,因此它下载和安装了大 你的发行版提供的版本不一定是最新的。如果你想要 Sigil 的最新版本,你可以查看它的 GitHub 仓库。 -[Sigil on GitHub][11] +- [Sigil 的 GitHub 仓库][11] ### 并不适合所有人,当然也不适合用于阅读 ePUB 电子书 -我不建议使用 Sigil 阅读电子书。Linux 上有[其他专门的应用来阅读 .epub 文件][12]。 +我不建议使用 Sigil 阅读电子书。Linux 上有 [其他专门的应用来阅读 .epub 文件][12]。 如果你是一个必须处理 EPUB 书籍的作家,或者如果你在数字化旧书,并在各种格式间转换,Sigil 可能是值得一试。 -我还没有广泛使用 Sigil,所以我不提供对它的评论。我让你去探索它,并在这里与我们分享你的经验。 +我还没有大量使用 过 Sigil,所以我不提供对它的评论。我让你去探索它,并在这里与我们分享你的经验。 -------------------------------------------------------------------------------- @@ -82,7 +81,7 @@ via: https://itsfoss.com/sigile-epub-editor/ 作者:[Abhishek Prakash][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/) 荣誉推出 From 2d04669d8276e23d463e97c397468ede2cf52673 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 23 Apr 2021 18:45:53 +0800 Subject: [PATCH 793/818] PUB @geekpi https://linux.cn/article-13325-1.html --- ...20210413 Create and Edit EPUB Files on Linux With Sigil.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20210413 Create and Edit EPUB Files on Linux With Sigil.md (98%) diff --git a/translated/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md b/published/20210413 Create and Edit EPUB Files on Linux With Sigil.md similarity index 98% rename from translated/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md rename to published/20210413 Create and Edit EPUB Files on Linux With Sigil.md index 204b54915f..9a1a3e0397 100644 --- a/translated/tech/20210413 Create and Edit EPUB Files on Linux With Sigil.md +++ b/published/20210413 Create and Edit EPUB Files on Linux With Sigil.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13325-1.html) 用 Sigil 在 Linux 上创建和编辑 EPUB 文件 ====== From 2527a717dcc2dc8152cb05aaee3cb699552b6bd8 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 24 Apr 2021 05:02:51 +0800 Subject: [PATCH 794/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210424=20?= =?UTF-8?q?Getting=20Started=20With=20Markdown=20[Beginner=E2=80=99s=20Gui?= =?UTF-8?q?de]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210424 Getting Started With Markdown -Beginner-s Guide.md --- ...Started With Markdown -Beginner-s Guide.md | 303 ++++++++++++++++++ 1 file changed, 303 insertions(+) create mode 100644 sources/tech/20210424 Getting Started With Markdown -Beginner-s Guide.md diff --git a/sources/tech/20210424 Getting Started With Markdown -Beginner-s Guide.md b/sources/tech/20210424 Getting Started With Markdown -Beginner-s Guide.md new file mode 100644 index 0000000000..74b14bf09c --- /dev/null +++ b/sources/tech/20210424 Getting Started With Markdown -Beginner-s Guide.md @@ -0,0 +1,303 @@ +[#]: subject: (Getting Started With Markdown [Beginner’s Guide]) +[#]: via: (https://itsfoss.com/markdown-guide/) +[#]: author: (Bill Dyer https://itsfoss.com/author/bill/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Getting Started With Markdown [Beginner’s Guide] +====== + +In my work, I often have to write code, write the documentation that goes with that code, create Web pages, and work on text restoration projects, and have written several formal papers while I was in school. I can include class notes here, too; I needed to write them for nearly every class. + +I use Markdown for nearly all of my writing and it is a major time-saver for me. + +In this article, I am going to share my experience with Markdown. You’ll be learning the following: + + * What is Markdown? + * How does it work? + * Markdown basic syntax and how to use them + + + +### What is Markdown? + +If you are new to Markdown, it is a text-to-HTML conversion tool for web writers. Markdown files follow a specific syntax that is easy to read and just as easy to write. They are plain text files so they can be created using any text editor on any computer. These files can then be turned into Web pages – and Web pages are built using a markup called HTML. + +Markdown then, is just a way to create Web pages without the need (or even know how) to write HTML code. Actually, Markdown is an great way to format plain text even if you don’t have to convert to HTML. Someone once described Markdown to me this way: + +> “It isn’t _what you see is what you get_, but _what you see is what you mean_”. + +Markdown, however, is more than an easy formatting scheme, it is also a software tool that converts the plain text formatting to HTML. + +This is why the syntax is important. If you want a title on your Web page, Markdown will create one based on the character(s) you use in front of your title. A sampling of some of Markdown’s syntax is shown this screenshot: + +![Markdown to HTML conversion][1] + +### So how do I make this plain text to HTML conversion? + +John Gruber’s Markdown is a Perl script that is run on the command line. Basically, it reads the Markdown text that you create and builds a Web page from it. + +I will avoid the command line here since there are [many outstanding Markdown editors][2] that can do this conversion for you. Not only that, many of these editors will let you write your text and show you what the Web page will look like (called _rendering_) at the same time. + +Markdown editors are generally set up to show two frames. The left frame is where you write your text and the right frame shows you what the formatted text will look like in HTML: + +![Most Markdown editors have two panes to write and preview the text][3] + +When you are finished with your text and are happy with it, simply save the Markdown file. This way, you’ll always have it in case you need to edit or rewrite later. Once the file is saved, you can have the editor export the markdown file to HTML. + +The editor will create the Web page, using your Markdown as a reference. Your Markdown file will not be changed during an export – you will still have it – along with a separate, newly created HTML (Web page) file that you can put on a Web server. + +**Note**: Many Markdown editors can also export your Markdown files to other formats, such as `.doc`, `.docx`, and `.pdf`. You can learn about those advanced setups, and extra software you might need, later on. + +### Basic Markdown Syntax + +To get the new Markdown user up to speed quickly, I will limit this to cover the syntax I use most often. These, I believe will be the most helpful – you can be productive now while you learn more about what Markdown can do for you later on. + +#### Write Headings + +I normally use `#` characters to denote headings. There are six levels: + +``` +# Level 1 Heading +## Level 2 Heading +### Level 3 Heading +#### Level 4 Heading +##### Level 5 Heading +###### Level 6 Heading +``` + +There is another heading style that uses lines underneath the text. I rarely use this type of heading since I am limited to only two. A double line, which is made with the `=` character, makes a `H1` heading. A single line, made with the `-` character, makes a `H2` heading: + +``` +Level 1 Heading +=============== + +Level 2 Heading +--------------- +``` + +![][4] + +#### Paragraphs + +Paragraphs are separated by a blank line (make sure that there is a blank line between paragraphs). Do not indent the first line at all. Indenting with a `` or `` has a different purpose in Markdown. + +A paragraph is a block of text and should not be indented with spaces or tabs. It can have one line or many lines. To end a paragraph and start a new one, the `` key is hit twice; paragraphs are separated by a blank line. + +![][5] + +#### Line Breaks + +Remember that with paragraphs, a blank line has to separate them and this is done by pressing twice on the `` key. Markdown is strict about it. + +Markdown does not support “hard-wrapped” or “fixed-line-length” paragraphs. That is, hitting the `` key once will not force text to a new line. It may appear so in the editing window, but the HTML won’t show it. + +Yet, there will be times when you may need to break up paragraphs with some way to break up a line. Markdown does have a way to do this but it may seem a little strange at first: **a line break is made by ending a line with two or more spaces and then hitting the `` key once.** + +![][6] + +Here is a working example of a short verse. Each line has two spaces at the end. The last line, since it’s the end of the verse, doesn’t have the extra spaces. Since it’s the end of the verse (paragraph), I hit the `` key twice: + +Baa, baa black sheep, +Have you any wool?. +Yes, sir. Yes, sir. +Three bags full. + +Adding two spaces at the end of a line, to create a line break, can take some getting used to. + +![][7] + +#### Horizontal Rules + +Horizontal rules are great for splitting up text into sections. + +Use three or more dashes `-`, underscores `_`, or asterisks `*` for horizontal rules, like so: + +``` +`---` + +`***` + +`___` +``` + +You can even put spaces between the characters: + +``` +`- - -` +``` + +I do not use horizontal rules very often in articles or papers, but they come in handy for me in journal entries, system logs, and class notes. + +![][8] + +#### Emphasis on text with bold and italics + +When you want a word or phrase to stand out and be noticed, you can either make it bold or italicized. Italics and bold text can be made on one of two ways. The first is by surrounding the text with asterisks `*`, while the second is to use underscores `_`. + +To italicize a word or phrase, surround the text with one underscore or asterisk. To make a word or phrase bold, surround it with two underscores or asterisks: + +``` +This is *italics* made with asterisks. + +This is _italics_ made with underscores. + +This is **bold** made with asterisks. + +This is __bold__ made with underscores. +``` + +Remember to use the same character. An asterisk on one side of a word or phrase, and an underscore on the side, will not work. The same character has to be on both sides of the word or phrase. + +![][9] + +#### Block quotes + +Block quotes are used for direct quotes. If you were writing a blog entry and you wanted to repeat something that Benjamin Franklin said, you could use a block quote. + +A right angle bracket is used to specify a block quote: + +``` +> This is a block quote. + +>> Use two right angle brackets if you want a block quote that is further indented. +``` + +![][10] + +#### Adding links in Markdown + +Links are just plain cool. There are three ways to create links on basic Markdown, but I will only cover two here: Regular links and automatic links. + +The third type of link, called reference links, are supported in basic Markdown and more advanced flavors. I want to get to started quickly. You can look up reference links when you are ready for that. + +Regular links let you link to various websites. The name of the site, or a phrase you want to use, is placed in square brackets `[]`. The actual link is inside parentheses `()`. + +``` +Visit [It's FOSS](https://itsfoss.com) today! +``` + +Automatic links are made with angle brackets `<>` surrounding the link. The link is an actual address (either a Web or email address). The link is spelled out and, when it is converted to HTML, the spelled out link becomes a working link. + +``` + + +<[email protected]> +``` + +This is useful for when you want to spell out the address in your text: + +![][11] + +#### Adding images in Markdown + +Links to images are almost identical to links to Web sites. The small difference between site links and images, is that image links begin with a bang (exclamation point) `!` + +The name of the image, or a descriptive phrase of the image, is placed in square brackets `[]`. The actual link is inside parentheses `()`. + +You can embed images like so: + +``` +![alternate text](./images/image.jpg) +``` + +Here’s an example image link. It is a sample link, with no image, but it is a decent sample of how an actual link might look like: + +``` +![a picture of bill](./images/my_photo_of_me.jpg) +``` + +![][12] + +#### Lists + +Lists are made for many reasons. They can be used as ‘things to do’ items, topic elements in an outline, parts lists in an assembly project, and so on. There are two main types of lists: unordered and ordered. + +Unordered lists are not numbered; these are the ‘bullet items’ we see in many documents. Ordered lists are numbered. + +To create an ordered (numbered) list, just begin each line with a number, like so: + +``` +1. Item one. +2. Item two. +3. Item three. +``` + +Unordered lists are not numbered, but use either an asterisk `*`, a plus sign `+`, or a minus sign `-` at the beginning of each item on the list. I prefer to use either an asterisk or minus sign, but you get to choose: + +``` +* Item one. ++ Item two. +- Item three. +``` + +Sub-items can be added to both ordered and unordered lists by indenting, like so: + +``` +1. Item 1 + 1. Sub-item 1 + 2. Sub-item 2 +2. Item 2 +3. Item 3 +``` + +![][13] + +### Markdown syntax cheat sheet + +For your reference, here is a short listing of Markdown syntax that has been covered in this small introduction. + +If you decide to adopt it as a writing tool, you’ll find that Markdown has the means to simplify writing even more. + +![][14] + +[Download Markdown Cheat Sheet in PDF format][15] + +### Conclusion + +Markdown can do more than what I have described here. A huge percentage of my writing can be accomplished with the Markdown syntax I have covered here – and these are the items I use most often even in more complex projects. + +If all of this seems too simple, it really is that easy. Markdown was built to simply the writing task, but you don’t have to take my word for it. Try it out! There is no need to install a Markdown editor; you can do this online. There are several [good online Markdown editors][16]. Here are three that I prefer: + +John Gruber’s [Dingus][17], [Editor.md][18], and [Dillinger][19]. Editor.md and Dillinger will let you see your Markdown rendered as HTML in real time. Dingus doesn’t preview in real time, but there is a Markdown syntax cheat sheet on the page for reference. + +![][20] + +Try out some of the examples in this article on either of these online editors. Try out some of your own ideas, too. This will let you get used to Markdown before possibly committing to learn more about it. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/markdown-guide/ + +作者:[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://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/retext_window_showing_syntax_and_preview-2.png?resize=800%2C429&ssl=1 +[2]: https://itsfoss.com/best-markdown-editors-linux/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/ghostwriter_two_frames-1.png?resize=800%2C458&ssl=1 +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/1_md_headings_vscodium.png?resize=800%2C485&ssl=1 +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/2_md_paragraphs_example_vscodium.png?resize=800%2C593&ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/3_md_line_break_fail_vscodium.png?resize=800%2C593&ssl=1 +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/4_md_line_break_success_vscodium.png?resize=800%2C450&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/5_md_horizontal_rules_vscodium.png?resize=800%2C326&ssl=1 +[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/6_md_emphasis_vscodium.png?resize=800%2C393&ssl=1 +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/7_md_blockquotes_vscodium.png?resize=800%2C393&ssl=1 +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/8_md_links_vscodium.png?resize=800%2C678&ssl=1 +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/9_md_images_vscodium.png?resize=800%2C725&ssl=1 +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/10_md_lists_vscodium.png?resize=800%2C725&ssl=1 +[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/markdown-syntax-cheatsheet.png?resize=727%2C743&ssl=1 +[15]: https://drive.google.com/file/d/1y-Qz9PX_2HksEG5D_WwN-asNB-tpjZHV/view?usp=sharing +[16]: https://itsfoss.com/online-markdown-editors/ +[17]: https://daringfireball.net/projects/markdown/dingus +[18]: http://editor.md.ipandao.com/en.html +[19]: https://dillinger.io/ +[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/editor-md_page_in_browser-1.png?resize=800%2C505&ssl=1 From 845b504ffd09501fa2ab618c010cd9a54f086d42 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 24 Apr 2021 05:03:08 +0800 Subject: [PATCH 795/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210423=20?= =?UTF-8?q?How=20I=20use=20OBS=20Studio=20to=20record=20videos=20for=20my?= =?UTF-8?q?=20YouTube=20channel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210423 How I use OBS Studio to record videos for my YouTube channel.md --- ...to record videos for my YouTube channel.md | 141 ++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 sources/tech/20210423 How I use OBS Studio to record videos for my YouTube channel.md diff --git a/sources/tech/20210423 How I use OBS Studio to record videos for my YouTube channel.md b/sources/tech/20210423 How I use OBS Studio to record videos for my YouTube channel.md new file mode 100644 index 0000000000..79c429e0f3 --- /dev/null +++ b/sources/tech/20210423 How I use OBS Studio to record videos for my YouTube channel.md @@ -0,0 +1,141 @@ +[#]: subject: (How I use OBS Studio to record videos for my YouTube channel) +[#]: via: (https://opensource.com/article/21/4/obs-youtube) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +How I use OBS Studio to record videos for my YouTube channel +====== +Install, configure, and use Open Broadcaster Software to record how-to, +promotional, and other types of videos. +![Person using a laptop][1] + +I manage a [YouTube channel for the FreeDOS Project][2], where I record "how-to" videos with FreeDOS running inside the [QEMU][3] PC emulator software. When I started the channel in August 2019, I didn't know anything about recording videos. But with [Open Broadcaster Software][4], also called OBS Studio, I've found recording these videos to be pretty straightforward. Here's how you can do it, too. + +### Install OBS Studio + +I run Fedora Linux, which doesn't include the OBS Studio software by default. Fortunately, the OBS Studio website has an [installation guide][5] that walks you through the steps to install OBS Studio via the RPM Fusion alternative repository. + +If you don't already have RPM Fusion set up on your system, you can add the repository on Fedora using this one-line command: + + +``` +`$ sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm` +``` + +Once the RPM Fusion repo is set up, you can install OBS Studio with this command: + + +``` +`$ sudo dnf install obs-studio` +``` + +If you have an NVIDIA graphics card, there's an extra step in the installation guide to install hardware-accelerated video support. But my graphics card is from Intel, so I don't need to run the extra steps. + +However, OBS Studio does not support [Wayland][6], at least not in the Fedora build. That means when I want to record videos with OBS Studio, I need to log into my GNOME desktop [using an Xorg session][7]. On the login screen, enter your password, click on the gear-shaped icon in the lower-right corner, and select **GNOME on Xorg**. + +### Configure OBS Studio + +The first time you launch OBS Studio, the software runs an auto-configuration wizard to determine the best settings for recording videos. This makes setup a breeze. If you're recording videos on the desktop, like I am, then click the **Optimize just for recording** radio button and click **Next**. + +![OBS Studio configuration][8] + +(Jim Hall, [CC BY-SA 4.0][9]) + +OBS Studio will run through a series of automated tests before it confirms the best video settings for your system. On my system, that's 1920x1080 at 30 frames per second (fps), which is good enough for recording my videos. + +![OBS Studio configuration][10] + +(Jim Hall, [CC BY-SA 4.0][9]) + +#### My setup + +The default OBS Studio interface shows the video front and center and positions the controls at the bottom of the screen. While this is not a bad default arrangement, you can see in my early videos that I occasionally look away from the camera as I change from a full-screen webcam video to my QEMU screen. That's because the default OBS Studio configuration places the **Scene controls** in the lower-left corner. + +![OBS Studio configuration][11] + +(Jim Hall, [CC BY-SA 4.0][9]) + +Breaking virtual eye contact like this is distracting, so I wanted another way to change scenes without looking for the scene controls. I discovered that I could click and drag the OBS Studio controls to different areas on the screen. By positioning the scene controls at the top of the screen, near my computer's webcam, I don't need to look away from the camera to change scenes. + +![OBS Studio configuration][12] + +(Jim Hall, [CC BY-SA 4.0][9]) + +So, my first step whenever I set up OBS Studio is to drag the controls to the top of the screen. I like to place the **Scene selector panel** in the middle, so I don't have to look very far away from my camera to change scenes. I keep the recording controls to one side because I'm never on camera when I start or stop the video, so it doesn't matter if I look away to start or stop my video recording. + +![OBS Studio configuration][13] + +(Jim Hall, [CC BY-SA 4.0][9]) + +### Setting up scenes + +You can set up OBS Studio to support your preferred video style. When I started recording videos, I watched other how-to videos to see how they were organized. Most start with a brief introduction by the host, then switch to a hands-on demonstration, and end with a "thank you" screen to advertise the channel. I wanted to create my videos similarly, and you can do that with scenes. + +Each scene is a different arrangement of **sources**, or elements in the video. Each source is like a layer, so if you have multiple image or video sources, they will appear to stack on top of one another. + +How you define your scenes depends on the kind of video you want to make. I do a lot of hands-on demonstration videos, so I have one scene with a full-screen webcam video, another scene that's just a QEMU window, and yet another scene that's "picture-in-picture" with me over my QEMU screen. I can also set up separate scenes that show a "thank you" image and links to subscribe to my channel or to join the project on social media. + +With these scenes, I can record my videos as Live—meaning I don't need to edit them afterward. I can use the Scene controls in OBS Studio to switch from the **QEMU** scene to the **Full-screen webcam** screen and back to the **QEMU** screen before wrapping up with separate scenes that thank my supporters and share information about my channel. That may sound like a lot of work, but once you have the scenes set up, changing scenes is just clicking an item in the Scenes menu. That's why I like to center the Scene selector at the top of the screen, so I can easily select the scene I need. + +Here's what I use to record my videos and how I set up the sources in each: + + * **Full-screen webcam:** I set up a webcam source from my Vitade webcam as a **video capture device** (V4L) and use the **Transform** menu (right-click) to fit the webcam to the screen. This also uses my Yeti microphone for sound as an **audio input capture** (PulseAudio). + + * **QEMU:** This is where I spend most of my time in my videos. OBS Studio can use any window as a source, and I define my QEMU window as a **window capture** (Xcomposite) source. In case I need to reboot the virtual machine while I'm recording a video, I also set a Color Bars image as a background image on a layer that's "behind" the window. This also uses my Yeti microphone for sound as an **audio input capture** (PulseAudio). + + * **QEMU + webcam:** My viewers tell me they like to see me on camera while I'm showing things in my QEMU window, so I defined another scene that combines the **QEMU** and **Full-screen webcam** scenes. My webcam is a small rectangle in one corner of the screen. + + * **Patreon card:** At the end of my videos, I thank the people who support me on Patreon. I created a striped pattern in GIMP and set that as my background image. I then defined a **text** source where I entered a "thank you" message and a list of my patrons. As before, I set my Yeti microphone for sound as an **audio input capture** (PulseAudio). + + * **End card:** As I wrap up the video, I want to encourage viewers to visit our website or join us on social media. Similar to the Patreon card scene, I use a background pattern that already includes my text and icons. But to add a little visual flair, I created a blinking cursor after our URL, as though someone had typed it in. This cursor is not actually an animation but an **image slideshow** source that uses two images: a blank rectangle and a rectangle with a cursor. The image slideshow flips between these two images, creating the appearance of a blinking cursor. + + + + +![OBS Studio configuration][14] + +(Jim Hall, [CC BY-SA 4.0][9]) + +### And action! + +Once I create my scene collection, I'm ready to record my videos. I usually start by talking over my QEMU window, so I click on the **QEMU** scene and then click the **Start Recording** button. After I've said a few words to set the stage for my video, I click on the **Full-screen webcam** scene to fully introduce the topic. + +After sharing some information about whatever I'm talking about in the video, I click on the **QEMU** scene or the **QEMU + webcam** scene. Which scene I choose depends on whether I need to be seen during the video or if the "picture-in-picture" video will obscure important text on the screen. I spend most of the how-to video in this scene, usually while playing a game, demonstrating a program, or writing a sample program. + +When I'm ready to wrap up, I click on the **Patreon card** scene to thank everyone who supports me on Patreon. Some patrons support me at a higher level, and they get a specific mention and their name listed on the screen. Then, I click on the **End card** scene to encourage viewers to visit our website, join us on Facebook, follow us on Twitter, and consider supporting me on Patreon. Finally, I click the **Stop Recording** button, and OBS Studio stops the video. + +Using OBS Studio is a great way to record videos. I've used this same method to record other videos, including pre-recorded conference talks, welcome videos for a remote symposium, and virtual lecture videos when I teach an online class. + +The next time you need to record a video, try OBS Studio. I think you'll find it easy to learn and use. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/obs-youtube + +作者:[Jim Hall][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/jim-hall +[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://www.youtube.com/freedosproject +[3]: https://www.qemu.org/ +[4]: https://obsproject.com/ +[5]: https://obsproject.com/wiki/install-instructions#linux +[6]: https://wayland.freedesktop.org/ +[7]: https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/ +[8]: https://opensource.com/sites/default/files/uploads/obs-setup-02.png (OBS Studio configuration) +[9]: https://creativecommons.org/licenses/by-sa/4.0/ +[10]: https://opensource.com/sites/default/files/uploads/obs-setup-09.png (OBS Studio configuration) +[11]: https://opensource.com/sites/default/files/uploads/obs-setup-10.png (OBS Studio configuration) +[12]: https://opensource.com/sites/default/files/uploads/obs-setup-11.png (OBS Studio configuration) +[13]: https://opensource.com/sites/default/files/uploads/obs-setup-12.png (OBS Studio configuration) +[14]: https://opensource.com/sites/default/files/uploads/obs-setup-18.png (OBS Studio configuration) From d9635ddc015ff4b037ab3a673302df390ade58e4 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 24 Apr 2021 05:03:20 +0800 Subject: [PATCH 796/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210423=20?= =?UTF-8?q?Sustainable=20economic=20development=20begins=20with=20open=20t?= =?UTF-8?q?hinking?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210423 Sustainable economic development begins with open thinking.md --- ...c development begins with open thinking.md | 124 ++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 sources/tech/20210423 Sustainable economic development begins with open thinking.md diff --git a/sources/tech/20210423 Sustainable economic development begins with open thinking.md b/sources/tech/20210423 Sustainable economic development begins with open thinking.md new file mode 100644 index 0000000000..73e1154810 --- /dev/null +++ b/sources/tech/20210423 Sustainable economic development begins with open thinking.md @@ -0,0 +1,124 @@ +[#]: subject: (Sustainable economic development begins with open thinking) +[#]: via: (https://opensource.com/open-organization/21/3/sustainable-development-environment) +[#]: author: (Ron McFarland https://opensource.com/users/ron-mcfarland) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Sustainable economic development begins with open thinking +====== +Do our global development practices respect planetary boundaries? +Greater transparency could provide insight. +![2 cents penny money currency][1] + +To be successful, open organizations must have specific purposes, address achievable goals, perform clear tasks, effectively evaluate the results of their work, and introduce countermeasures or revisions to their operations. [Open organization principles][2] serve vital functions throughout this process. + +This is true no matter the scale of the problem an open organization confronts. In this three part review of [_The Age of Sustainable Development_][3] by Jeffrey Sachs, I'll examine an issue with global scope—sustainable economic development—to demonstrate how thinking openly can help us address global issues. + +Specifically, in this article I'll discuss the important role of _transparency_ in assessing environmental damage and destruction some economic development programs can cause, and I'll explain how the principle of transparency also helps us think about specific actions we can take to combat destructive forces. In the next article, I will discuss human suffering on a global scale—here again stressing transparency. And in the third and last article, I will bring both these concerns together and discuss global governance. That is where we'll recognize the importance of open organization principles for making progress on these issues. + +One more note: All these articles address extremely complex subjects. So at the end of each, I'll share a video presentation offering additional explanation. I'll start that discussion by introducing what I call the Open Organization Principles Loop, so you can visualize how these principles can be applied to sustainable global economic development issues. + +Simply put, letting [open principles][2] guide our work creating sustainable, global economic development will help: + + * Make global, environmental and human suffering problems **transparent** + * Form and unite organizations/**communities** at the local (not only global) level to tackle those problems + * Start **collaboration** within and between communities to find detailed, local solutions + * Recruit and **include** members globally to gain broad perspectives on how to achieve goals + * **Adapt** strategies to each region globally and in each local community + + + +All this starts with exposing specific problems and making them vividly transparent. Once exposed, these problems must be broadly presented and made _immediately personal_ to every individual. + +This is the discussion I hope to start in this article on global environmental issues. + +The earth has what we might call "planetary boundaries." Respecting these boundaries means being prosperous, socially inclusive, and environmentally responsible. + +### Stressing planetary boundaries + +In a previous article entitled "[Climate challenges call for open solutions][4]," I discussed only the issue of carbon-free power generation, particularly through fourth-generation nuclear power plants that are now being developed. But reading Sach's book, _The Age of Sustainable Development_, made me realize that energy generation through nuclear power plants is an approach _too narrow_ to address the massive climate challenges the world faces (the phrase "climate challenge" might _itself_ be too narrow). "Sustainable economic development" might be a better phrase to describe what should be our most pressing concern, of which climate change is only _one_ component issue. When we use the term "sustainable," we're referring to methods that effectively avoid driving something or some species to extinction—including humankind. It is the conservation of living and mineral resources in ways that continue to make life on earth economically viable. + +Sachs' book suggests a wide range of strategies on detailed concerns that could move the global society toward sustainable economic development. I will quickly review them and explain where open organization principles can play a role. + +The earth has what we might call "[planetary boundaries][5]": it can only support life to the extent that life forms respect these boundaries. They are the foundations of ecosystems like forests and fisheries, for example. Respecting these boundaries means being prosperous, socially inclusive, and environmentally responsible. + +We must monitor and manage our relationships with these planetary boundaries globally. Here are at least nine boundaries: + + 1. **Climate change**: This is directly related to [greenhouse gases][6] (GHGs). + 2. **Ocean acidification**: Rising acidity threatens various marine life. + 3. **Stratospheric ozone depletion**: Evidence suggests a direct link to skin cancers and other disorders. + 4. **Biogeochemical flow boundaries (Nitrogen Cycle/Phosphorus Cycle)**: Chemical fertilizers are required for high crop yield, but their runoff negatively impacts the surrounding environment. + 5. **Global freshwater use and water scarcity**: Groundwater is declining worldwide while demand is growing with population growth. + 6. **Land degradation**: Deforestation is a major problem, as forests withdraw CO2 in the atmosphere and are the habitat of many species. + 7. **Biodiversity loss**: We depend on biodiversity for our food supply, for our safety from many natural hazards like flooding, industry/construction material supply, freshwater and combating pests and pathogens. + 8. **Atmospheric aerosol loading**: Simply put, smog causes problems like life-threatening lung disease. + 9. **Chemical pollution**: Petrochemical production, steel production, and mining processes put deadly pollutants into their surrounding environments. + + + +Sachs indicates that humans have stressed these boundaries in major areas around the globe, and earth's natural system can't cope with that pressure. Sachs believes that during this century human beings will stress all nine boundaries in critically dangerous ways, unless dedicated organizations and communities are formed to establish projects that execute on reversing them. + +### Why can't we just save the world? + +It's difficult to convince people of environmental importance and to assemble organizations, communities, neighborhoods and resources to execute action plans. Sachs cites six primary reasons for this: + + 1. **Global problems.** No single actor can take charge to get things started and organizing on a global scale is extremely difficult. + 2. **Short-term special interests groups.** Many parties have competing goals, and no one is [speaking for the planet][7]. + 3. **Impact timeframe.** The greatest impact will be on those not born yet. + 4. **Current economic structure.** The solutions might be incompatible with the current economic structure. But, its damage to the environment must be exposed and a new sustainable economic structure technically developed to replace it. + 5. **Pace of change.** The impact is not visible on a daily, weekly, or even monthly basis. + 6. **Complexity.** Environmental issues are caused by many human activities, not just one. + + + +Reviewing these six characteristics, we see that getting solutions adopted globally requires a powerful sales job. But applying open organization principles can be significantly helpful, particularly making the problems as transparent as possible on a global scale. + +Both globally and locally, communities can't continue with their current modes of economic development—not if they want to respect planetary boundaries. Business as usual, Sachs stresses, will destroy us all. + +As I mentioned earlier, Sachs notes that generally addressing sustainable development directly is too vague and unhelpful. The challenge must be broken down into detailed projects and tasks for each region and community on the planet. Here are some specific examples of initiatives that are important but could vary by region: + + 1. Building/home energy use reduction + 2. Environmentally friendly transportation + 3. Secure food production to reach demand + 4. Clean/efficient electrical power generation, storage and distribution + 5. Environmentally friendly urban designing + 6. Ocean biodiversity protection + 7. Plant biodiversity protection + 8. Wildlife biodiversity protection + 9. Air pollution & the CO2 reduction + 10. Freshwater supply to satisfy future demand + + + +### The cost of doing nothing + +Both globally and locally, communities can't continue with their current modes of economic development—not if they want to respect planetary boundaries. Business as usual, Sachs stresses, will destroy us all. + +At the start of this discussion, I mentioned the importance of transparency and the need to expose the environmental damage that many human economic activities cause. Information and communication technology specialists will become increasingly central to these transparency efforts, as they can effectively and cost efficiently use automated data gathering, analytics, telecommunications, and other technologies to help increase transparency. (Wondering how you might do this? Why not [ask our community][8]?) + +In the next article, I will attempt to make vividly transparent the impact of unsustainable development practices on human inequality and suffering at a global level. Armed with a full understanding of both these challenges, in my last article in this series, I'll present global governance to tackle them. In that governance all open organization principles will play vital roles. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/open-organization/21/3/sustainable-development-environment + +作者:[Ron McFarland][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/ron-mcfarland +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/Medical%20Costs%20Transparency_1.jpg?itok=CkZ_J88m (2 cents penny money currency) +[2]: https://theopenorganization.org/definition/ +[3]: https://www.goodreads.com/book/show/23215948-the-age-of-sustainable-development +[4]: https://opensource.com/open-organization/19/10/global-energy-climate-challenges +[5]: http://www.igbp.net/news/features/features/aplanetontheedge.5.1b8ae20512db692f2a680003122.html +[6]: https://en.wikipedia.org/wiki/Greenhouse_gas#/media/File:Global_GHG_Emissions_by_Sector_2016.png +[7]: https://opensource.com/open-organization/19/10/open-platform-greenpeace +[8]: http://theopenorganization.community From 659cab69bd55bc9ee2595f2dde4dddb6da82367d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 24 Apr 2021 05:03:40 +0800 Subject: [PATCH 797/818] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020210423=20?= =?UTF-8?q?What=E2=80=99s=20New=20in=20Ubuntu=20MATE=2021.04?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20210423 What-s New in Ubuntu MATE 21.04.md --- ...0210423 What-s New in Ubuntu MATE 21.04.md | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 sources/news/20210423 What-s New in Ubuntu MATE 21.04.md diff --git a/sources/news/20210423 What-s New in Ubuntu MATE 21.04.md b/sources/news/20210423 What-s New in Ubuntu MATE 21.04.md new file mode 100644 index 0000000000..ff6ebd416a --- /dev/null +++ b/sources/news/20210423 What-s New in Ubuntu MATE 21.04.md @@ -0,0 +1,135 @@ +[#]: subject: (What’s New in Ubuntu MATE 21.04) +[#]: via: (https://news.itsfoss.com/ubuntu-mate-21-04-release/) +[#]: author: (Asesh Basu https://news.itsfoss.com/author/asesh/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +What’s New in Ubuntu MATE 21.04 +====== + +Since 18.10, Yaru has been the default user interface. This year, the Yaru team along with the Canonical Design and Ubuntu Desktop Teams joined forces to create a new visual look for Ubuntu MATE 21.04. + +### What’s New in Ubuntu MATE 21.04? + +Here are all the key changes that comes with this release. + +### MATE Desktop + +This time there are no new features but just bug fixes and translation updates. The MATE packaging in Debian has been updated to receive all the new bug fixes and updates. + +### Ayatana Indicators + +![][1] + +It is a system that controls the action, layout, behaviour of the panel indicator area that is also known as your system tray. You can now change settings of Ayatana Indicators from Control Center. + +A new printer indication has been added and RedShift has been removed to maintain stability. + +### Yaru MATE Theme + +Yaru MATE is now a derivative of the Yaru theme. Yaru MATE will now be provided with a light and dark theme, the light theme being the default one. This should ensure better application compatibility. + +Users will now have access to GTK 2.x, 3.x, 4.x light and dark themes collectively. You can also use Suru icons along with some new icons. + +LibreOffice will have a new Yaru MATE icon theming applied by default. Font contrast has been improved as well. As a result of this, you will find it easier to read tiny texts and/or reading from a distance. + +Websites will now maintain the Dark Mode, if selected, at an Operating System level. To get dark theme in websites along with the rest of your system, just enable the Yaru MATE Dark theme. + +Windows manager themes for Macro, Metacity, Compiz now have SVG icons. What this means is that if you have a large screen, the icons won’t look pixelated, that’s a subtle but useful addition! + +### Yaru MATE Snaps + +Although you can’t install Yaru MATE themes right now, you will soon be able to! The gtk-theme-yaru-mate and icon-theme-yaru-mate snaps are pre-installed and ready to be used when you need to connect the themes to compatible snaps. + +As per the announcement, snapd will automatically connect your theme to compatible snaps soon: + +> `snapd` will soon be able to automatically install snaps of themes that match your currently active theme. The snaps we’ve created are ready to integrate with that capability when it is available. + +### Mutiny Layout Changes + +![Mutiny Layout with dark Yaru theme applied.][2] + +Mutiny layout mimics the desktop layout of Unity. The MATE Dock Applet has been removed and the Mutiny Layout has been optimized to use Plank. Plank theming will be applied automatically. This will be done when switching to Mutiny Layout via Mate Tweak. Both dark and light Yaru themes of Plank are provided. + +Other tweaks and updates have made the Mutiny much more reliability while the look and feel remains the same. + +### Major Application Upgrades + + * Firefox 87 + * LibreOffice 7.1.2.2 + * Evolution 3.40 + * Celluloid 0.20 + + + +### Other Changes + + * Linux command line fans will appreciate commands like neofetch, htop and inxi being included in the default Ubuntu MATE install. + * A Raspberry Pi 21.04 version will be released soon. + * There are no offline upgrade options in Ubuntu MATE. + * New Plank themes introduced for side and bottom docks that matches with the color scheme of Yaru MATE. + * A clean edge styling is applied to Yaru MATE windows manager for side tiled windows. + * It is available in various colors in Ubuntu MATE Welcome. + * Yaru MATE theme snap and icon theme snap has been published in Snap Store + * Yaru MATE PPA published for users of Ubunut MATE 20.04 LTS. + + + +### Download Ubuntu MATE 21.04 + +You can download the ISO from the official website. + +[Ubuntu MATE 21.04][3] + +If you’re curious to learn more about it, [check out the release notes.][4] + +_Are you excited to try out the new Yaru MATE theme? What do you think? Let us know in the comments below._ + +#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! + +If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. + +I'm not interested + +#### _Related_ + + * [Ubuntu 21.04 is Releasing This Week! Take a Look at the New Features][5] + * ![][6] ![Ubuntu 21.04 New Features][7] + + + * [No GNOME 40 for Ubuntu 21.04 [And That's a Good Thing]][8] + * ![][6] ![No GNOME 40 in Ubuntu 21.04][9] + + + * [Ubuntu 21.04 Beta is Now Available to Download][10] + * ![][6] ![][11] + + + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/ubuntu-mate-21-04-release/ + +作者:[Asesh Basu][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/asesh/ +[b]: https://github.com/lujun9972 +[1]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzUxMCcgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzQzOScgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[3]: https://ubuntu-mate.org/download/ +[4]: https://discourse.ubuntu.com/t/hirsute-hippo-release-notes/19221 +[5]: https://news.itsfoss.com/ubuntu-21-04-features/ +[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzIwMCcgd2lkdGg9JzM1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[7]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/04/ubuntu_21_04_features.png?fit=1200%2C675&ssl=1&resize=350%2C200 +[8]: https://news.itsfoss.com/no-gnome-40-in-ubuntu-21-04/ +[9]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/01/gnome-40-ubuntu-21-04.png?fit=1200%2C675&ssl=1&resize=350%2C200 +[10]: https://news.itsfoss.com/ubuntu-21-04-beta-release/ +[11]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/04/ubuntu-21-04-ft.png?fit=1200%2C675&ssl=1&resize=350%2C200 From 466fe5d686f8fb753a632daae08836314a2d6ee2 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sat, 24 Apr 2021 10:18:24 +0800 Subject: [PATCH 798/818] Rename sources/tech/20210423 Sustainable economic development begins with open thinking.md to sources/talk/20210423 Sustainable economic development begins with open thinking.md --- ... Sustainable economic development begins with open thinking.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20210423 Sustainable economic development begins with open thinking.md (100%) diff --git a/sources/tech/20210423 Sustainable economic development begins with open thinking.md b/sources/talk/20210423 Sustainable economic development begins with open thinking.md similarity index 100% rename from sources/tech/20210423 Sustainable economic development begins with open thinking.md rename to sources/talk/20210423 Sustainable economic development begins with open thinking.md From 0be04e5a418c1c6df740e4ea1de5a25ab2f845ab Mon Sep 17 00:00:00 2001 From: Kevin3599 <69574926+Kevin3599@users.noreply.github.com> Date: Sat, 24 Apr 2021 10:48:42 +0800 Subject: [PATCH 799/818] Create 20210420 The Guided Installer in Arch is a Step in the Right Direction.md --- ...n Arch is a Step in the Right Direction.md | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 translated/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md diff --git a/translated/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md b/translated/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md new file mode 100644 index 0000000000..71fbbdea3a --- /dev/null +++ b/translated/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md @@ -0,0 +1,97 @@ +[#]: subject: (The Guided Installer in Arch is a Step in the Right Direction) +[#]: via: (https://news.itsfoss.com/arch-new-guided-installer/) +[#]: author: (Jacob Crume https://news.itsfoss.com/author/jacob/) +[#]: collector: (lujun9972) +[#]: translator: (Kevin3599 ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Arch Linux中的引导式安装程序是迈向正确的一步 +====== + +20年来,Arch Linux为用户提供了完全定制和独特的系统的权限。多年来,它以牺牲用户友好性为代价赢得了在定制方面独有的声誉。 + +作为滚动发行版本,Arch Linux不提供任何固定发行版本,而是每月更新一次。但是,如果您在最近几周下载了Arch Linux,那么您很可能已经注意到了一个新的附加功能:archinstall。它使Arch Linux更加易于安装。 + +![][3] + +今天,我将探讨archinstall 的发布对未来的Arch Linux项目和发行版意味着什么。 + +### Arch Linux新的发展方向? +![][4] + +尽管很多人对此感到惊讶,但默认情况下包含官方安装程序实际上是非常明智的举动。这意味着ArchLinux的发展方向发生变化,即在保留使其知名的定制性和用户独特性的同时更加侧重用户的易用性。 + +在该安装程式的GitHub页面上有这样的描述: + +> “引导性安装程式会给用户提供一个友好的安装方式,但是关键在于这个安装程式是选择性的,它是可选的并且永远不会强迫用户使用其进行安装。” + +这意味着新的安装程式不会影响高级的进阶用户,同时也使得其可以向更广泛的受众开放,在这一改动所带来的许多优点之中,一个显著的优点即是:更广泛的用户。 + +更多的用户意味着更多的项目,不管其是通过网络捐赠或在Arch Linux下的开发,通过这些项目贡献,不管是新用户还是有经验的用户的使用体验都会得到提升。 + +### “这必然要发生” + +回顾过去,我们可以看到安装介质的许多新增功能对新用户有所帮助。这些示例包括pacstrap(安装基本系统的工具)和反射器(查找最佳pacman镜像的工具)。 + +另外,多年来,用户一直在追求使用脚本安装的方法,新安装程序允许了用户使用安装脚本。同时能够使用Python编写脚本,这使管理员的部署更加容易,这使其成为非常有吸引力的选择。更多可定制性(以某种方式?) + +尽管这看上去可能有些反直觉,但是这个安装程式很可能能够增进Arch Linux的可定制性。当前,Arch定制性的最大瓶颈是用户的技术水平,而这一问题能够通过archinstall解决。 + +通过由ArchLinux提供的安装程序,用户不需要掌握创建完美开发环境的技巧,安装程序可以帮助用户完成这些工作,这提供了广泛的自定义选项,是普通用户难以实现的。 + +###思想总结 + +有了这一新功能,Arch Linux似乎正在向着“用户友好”这一软件设计哲学靠近,新安装程序为新手和高级用户提供了广泛的好处。其中包括更广泛的定制性和更大的用户社区。 + +总而言之,这个新变动对整个ArchLinux社区都会产生积极的影响。 + +你对这个Arch Linux安装程式怎么看?是否已经尝试过它了呢? + +### + +![][7] +我不感兴趣 + +#### 关联 + + * 通过最新的ISO刷新中的更改,现在更容易安装Arch Linux + * ![][8] ![][9] + + + * EndeavourOS的2021年第一个版本带来了Linux内核5.10 LTS,Xfce 4.16等[10] + * ![][8] ![][11] + + + * Linux Kernel 5.9终止了生命。这就是您现在应该做的! + * ![][8] ![Linux kernel 5.9 reached end of life][13] + + + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/arch-new-guided-installer/ + +作者:[Jacob Crume][a] +选题:[lujun9972][b] +译者:[Kevin3599](https://github.com/) +校对:[校对者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/rolling-release/ +[2]: https://news.itsfoss.com/arch-linux-easy-install/ +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzQxMScgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzM3MScgd2lkdGg9JzM3MScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[5]: https://man.archlinux.org/man/pacstrap.8 +[6]: https://wiki.archlinux.org/index.php/Reflector +[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzI1MCcgd2lkdGg9Jzc1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzIwMCcgd2lkdGg9JzM1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[9]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/04/arch-linux-easy-install-feat.png?fit=1200%2C675&ssl=1&resize=350%2C200 +[10]: https://news.itsfoss.com/endeavouros-2021-release/ +[11]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/02/endeavouros-2021-ft.jpg?fit=1200%2C675&ssl=1&resize=350%2C200 +[12]: https://news.itsfoss.com/kernel-5-9-end-of-life/ +[13]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2020/12/linux-kerne-5-9-eol.png?fit=1200%2C675&ssl=1&resize=350%2C200 From 15a7c077c70a9dafd85fe0dc4a6bd33f0f67b272 Mon Sep 17 00:00:00 2001 From: Kevin3599 <69574926+Kevin3599@users.noreply.github.com> Date: Sat, 24 Apr 2021 11:54:12 +0800 Subject: [PATCH 800/818] Delete 20210420 The Guided Installer in Arch is a Step in the Right Direction.md --- ...n Arch is a Step in the Right Direction.md | 99 ------------------- 1 file changed, 99 deletions(-) delete mode 100644 sources/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md diff --git a/sources/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md b/sources/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md deleted file mode 100644 index 60263301ae..0000000000 --- a/sources/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: subject: (The Guided Installer in Arch is a Step in the Right Direction) -[#]: via: (https://news.itsfoss.com/arch-new-guided-installer/) -[#]: author: (Jacob Crume https://news.itsfoss.com/author/jacob/) -[#]: collector: (lujun9972) -[#]: translator: (Kevin3599 ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -The Guided Installer in Arch is a Step in the Right Direction -====== - -For 20 years, Arch Linux has provided users access to a completely custom and unique system. Over those years, it has built a reputation for customization, at the expense of user-friendliness. - -As a [rolling release distro][1], Arch doesn’t provide any set releases, instead they just update the image each month. However, if you have downloaded Arch in the last few weeks, you may have noticed a new addition: **archinstall**. It makes [installing Arch Linux way easier][2]. - -![][3] - -Today, I will be discussing what this change represents for the future of the Arch project, and what this could mean for future releases. - -### A New Direction for Arch? - -![][4] - -While many were surprised at this move, having an official installer included by default is actually a very sensible move. It signifies a change in direction for Arch, with a greater focus on accessibility, while still retaining the legendary customization it is known for. - -As the installer’s GitHub page says: - -> The guided installer will provide user-friendly options along the way, but the keyword here is options, they are optional and will never be forced upon anyone - -This means that the new installer doesn’t affect advanced users, yet also opens up the distro to a wider audience. Among the many benefits this change brings, one stands above the crowd: more users. - -More users mean more support for the project, whether that is through donations or development work. And with each of these contributions, the user experience continues to improve for both new and experienced users alike. - -### This was bound to happen - -Looking into the past, we can see many additions to the installation medium that have helped new users. Examples of these include [pacstrap][5] (a tool to install base system) and [reflector][6] (a tool to find the best pacman mirrors). - -Plus, users have been asking for a way to script their installation for years, which the new installer provides. Capable of being scripted in Python, it enables far easier deployment for administrators, making it a very attractive option. - -### More Customizability (Somehow?) - -While it may seem counter-intuitive, the inclusion of an installer actually may improve the customization options of Arch. Currently, the biggest bottleneck with Arch’s incredible customization options is the user’s skill level, an issue eliminated thanks to archinstall. - -With the new installer, you don’t need to have the skills to create your perfect environment, instead taking advantage of the installer to do it for you. This opens up a huge range of customization options that would otherwise be out of reach for the average user. - -### Closing Thoughts - -With this new addition, it seems that Arch Linux has started moving towards a more User-Friendly philosophy. The new installer provides a wide range of benefits to Newbies and advanced users alike. These include wider customization options and a larger community. - -All in all, the new installer will provide a positive impact on the community as a whole. - -_What do you think about the new Arch guided installer? Have you tried it out yet?_ - -![][7] - -I'm not interested - -#### _Related_ - - * [Installing Arch Linux is Now Easier With This Change in the Newest ISO Refresh][2] - * ![][8] ![][9] - - - * [EndeavourOS's First Release of 2021 Brings Linux Kernel 5.10 LTS, Xfce 4.16, and More][10] - * ![][8] ![][11] - - - * [Linux Kernel 5.9 Reached End of Life. Here's What You Should Do Now!][12] - * ![][8] ![Linux kernel 5.9 reached end of life][13] - - - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/arch-new-guided-installer/ - -作者:[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/rolling-release/ -[2]: https://news.itsfoss.com/arch-linux-easy-install/ -[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzQxMScgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= -[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzM3MScgd2lkdGg9JzM3MScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= -[5]: https://man.archlinux.org/man/pacstrap.8 -[6]: https://wiki.archlinux.org/index.php/Reflector -[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzI1MCcgd2lkdGg9Jzc1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= -[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzIwMCcgd2lkdGg9JzM1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= -[9]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/04/arch-linux-easy-install-feat.png?fit=1200%2C675&ssl=1&resize=350%2C200 -[10]: https://news.itsfoss.com/endeavouros-2021-release/ -[11]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/02/endeavouros-2021-ft.jpg?fit=1200%2C675&ssl=1&resize=350%2C200 -[12]: https://news.itsfoss.com/kernel-5-9-end-of-life/ -[13]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2020/12/linux-kerne-5-9-eol.png?fit=1200%2C675&ssl=1&resize=350%2C200 From 16d460d18378a1d530821c254524bc72376125ac Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 24 Apr 2021 14:45:26 +0800 Subject: [PATCH 801/818] PRF @stevenzdg988 --- ...ely on for Your Ancient 32-bit Computer.md | 231 ++++++++++++------ 1 file changed, 162 insertions(+), 69 deletions(-) diff --git a/translated/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md b/translated/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md index 294f392832..5284ded94d 100644 --- a/translated/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md +++ b/translated/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md @@ -1,170 +1,255 @@ [#]: collector: (lujun9972) [#]: translator: (stevenzdg988) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer) [#]: via: (https://itsfoss.com/32-bit-linux-distributions/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) -可以在古老的 32 位计算机上使用的 11 种 Linux 发行版 +14 种可以在古老的 32 位计算机上使用的 Linux 发行版 ====== -如果您紧跟最新的[Linux 发行版][1],那么您一定已经注意到,[大多数流行的 Linux 发行版][2]已经终止了 32 位支持。Arch Linux,Ubuntu,Fedora,每一个都已经放弃了对这种较旧架构的支持。 +如果你一直关注最新的 [Linux 发行版][1],那么你一定已经注意到,[大多数流行的 Linux 发行版][2] 已经终止了 32 位支持。Arch Linux、Ubuntu、Fedora,每一个都已经放弃了对这种较旧架构的支持。 -但是,如果您拥有仍然需要再生的老式硬件,或者想将其用于某些用途,该怎么办?不用担心,还剩下一些 32 位系统选项可供选择。 +但是,如果你拥有仍然需要再利用的老式硬件,或者想将其用于某些用途,该怎么办?不用担心,你的 32 位系统还有一些选择。 -在本文中,我试图编译一些最好的 Linux 发行版,这些发行版将在未来几年继续支持 32 位平台。 +在本文中,我试图汇编一些最好的 Linux 发行版,这些发行版将在未来几年继续支持 32 位平台。 -### 仍提供 32 位支持的最优 Linux 发行版 +### 仍提供 32 位支持的最佳 Linux 发行版 ![][3] -此列表与[较早的支持旧笔记本电脑的 Linux 发行版列表][4]略有不同。如果 64 位计算机是在 2010 年之前发布的,那么甚至可以认为它们是过时的。这就是为什么其中列出的一些建议包括现在仅支持 64 位版本的发行版的原因。 +此列表与 [我们之前的支持旧笔记本电脑的 Linux 发行版列表][4] 略有不同。即使是 64 位计算机,如果是在 2010 年之前发布的,那么也可以认为它们是旧的。这就是为什么其中列出的一些建议包括现在仅支持 64 位版本的发行版的原因。 -根据我的知识和认知,此处提供的信息是正确的,但是如果您发现有误,请在评论部分让我知道。 +根据我的知识和认知,此处提供的信息是正确的,但是如果你发现有误,请在评论部分让我知道。 -在继续之前,我认为您知道[如何检查您拥有的是否是 32 位或 64 位计算机][5]。 +在继续之前,我认为你知道 [如何检查你拥有的是否是 32 位或 64 位计算机][5]。 -#### 1\. Debian +#### 1、Debian ![图片来源: mrneilypops / Deviantart][6] -对于 32 位系统,Debian 是一个绝佳的选择,因为他们仍通过最新的稳定版本支持它。在撰写本文时,最新的稳定发行版 **Debian 10“buster”** 提供了32位版本,并一直支持到2024年。 +对于 32 位系统,[Debian][11] 是一个绝佳的选择,因为他们的最新的稳定版本仍然支持它。在撰写本文时,最新的稳定发行版 **Debian 10 “buster”** 提供了 32 位版本,并一直支持到 2024 年。 -如果您是 Debian 的新手,值得一提的是,您可以在[官方Wiki][7]上获得有关其所有内容的可靠文档。因此,上手应该不是问题。 +如果你是 Debian 的新手,值得一提的是,你可以在 [官方 Wiki][7] 上获得有关其所有内容的可靠文档。因此,上手应该不是问题。 -您可以浏览[可用的安装程序][8]进行安装。但是,在开始之前,除了[安装手册][10]外,我建议您参考[安装 Debian 之前要记住的事情][9]列表。 +你可以浏览 [可用的安装程序][8] 进行安装。但是,在开始之前,除了 [安装手册][10] 外,我建议你参考 [安装 Debian 之前要记住的事情][9] 列表。 -[Debian][11] +最低系统要求: -#### 2\. Slax +- 512 MB 内存 +- 10 GB 磁盘空间 +- 1 GHz 处理器(奔腾 4 或同等水平) + +#### 2、Slax ![][12] -如果您只是想快速启动设备以进行一些临时工作,Slax是一个令人印象深刻的选择。 +如果你只是想快速启动设备以进行一些临时工作,[Slax][13] 是一个令人印象深刻的选择。 -它基于 Debian,但它旨在成为一种便携式且通过 USB 设备或 DVD 运行的快速选项。您可以从他们的网站免费下载 32 位 ISO 文件,或购买预装有 Slax 的可擦写 DVD /**(或)**加密的闪存盘。 +它基于 Debian,但它通过 USB 设备或 DVD 运行旨在成为一种便携且快速的选项。你可以从他们的网站免费下载 32 位 ISO 文件,或购买预装有 Slax 的可擦写 DVD 或加密的闪存盘。 -当然,这并不是要取代传统的桌面操作系统。但是,是的,您确实获得了以 Debian 为基础的 32 位支持。 +当然,这并不是要取代传统的桌面操作系统。但是,是的,你确实获得了以 Debian 为基础的 32 位支持。 -[Slax][13] +最低系统要求: -#### 3\. AntiX +- 内存:128MB(离线使用)/ 512MB(用于网页浏览器使用) +- CPU: i686 或更新版本 -![图片来源: Opensourcefeed(开源提供)][14] +#### 3、AntiX -另一个令人印象深刻的基于 Debian 的发行版。AntiX 通常被称为免系统发行版,该发行版在轻量级安装的同时侧重于性能。 +![图片来源: Opensourcefeed][14] -它完全适合几乎所有老式的 32 位系统。建议至少需要 256 MB 内存和 2.7 GB 存储空间。不仅易于安装,而且用户体验也针对新手和有经验的用户。 +[AntiX][15] 是另一个令人印象深刻的基于 Debian 的发行版。AntiX 是众所周知的无 systemd 发行版,该发行版侧重于性能,是一个轻量级的系统。 -您应该根据 Debian 的最新稳定可用分支获得最新版本。 +它完全适合于所有老式的 32 位系统。它只需要低至 256 MB 内存和 2.7 GB 存储空间。不仅易于安装,而且用户体验也是针对新手和有经验的用户的。 -[AntiX][15] +你应该可以得到基于 Debian 的最新稳定分支的最新版本。 -#### 4\. openSUSE +最低系统要求: + +- 内存:256 MB 的内存 +- CPU:奔腾 3 系统 +- 磁盘空间:5GB 的驱动器空间 + +#### 4、openSUSE ![][16] -openSUSE 是一个独立的 Linux 发行版,也支持 32 位系统。实际上最新的常规版本(Leap)不提供 32 位映像,但滚动发行版本(Tumbleweed)确实提供了 32 位映像。 +[openSUSE][18] 是一个独立的 Linux 发行版,也支持 32 位系统。实际上最新的常规版本(Leap)不提供 32 位镜像,但滚动发行版本(Tumbleweed)确实提供了 32 位镜像。 -如果您是新手,那将是完全不同的体验。但是,我建议您仔细阅读[为什么要使用 openSUSE 的原因。][17] +如果你是新手,那将是完全不同的体验。但是,我建议你仔细阅读 [为什么要使用 openSUSE 的原因][17]。 -它主要面向开发人员和系统管理员,但也可以将其用作普通桌面用户。值得注意的是,openSUSE 不意味在老式硬件上运行-因此必须确保至少有 2 GB 内存,40+ GB存储空间和双核处理器。 +它主要面向开发人员和系统管理员,但也可以将其用作普通桌面用户。值得注意的是,openSUSE 不意味在老式硬件上运行,因此必须确保至少有 2 GB 内存、40+ GB 存储空间和双核处理器。 -[openSUSE][18] +最低系统要求: +- 奔腾 4 1.6 GHz 或更高的处理器 +- 1GB 物理内存 +- 5 GB 硬盘 -#### 5\. Emmabuntüs +#### 5、Emmabuntüs ![][19] -Emmabuntus 是一个有趣的发行版,旨在通过 32 位支持来延长硬件的使用寿命,以减少原材料的浪费。作为一个小组,他们还参与向学校提供计算机和数字技术。 +[Emmanbuntus][20] 是一个有趣的发行版,旨在通过 32 位支持来延长硬件的使用寿命,以减少原材料的浪费。作为一个团体,他们还参与向学校提供计算机和数字技术的工作。 -它提供了两个不同的版本,一个基于 Ubuntu,另一个基于 Debian。如果您需要更长久的 32 位支持,则可能要使用 Debian 版本。它可能不是最好的选择,但是它具有许多预配置的软件来简化 Linux 学习体验并提供 32 位支持,如果您希望在此过程中支持他们的事业,那么这是一个相当不错的选择。 +它提供了两个不同的版本,一个基于 Ubuntu,另一个基于 Debian。如果你需要更长久的 32 位支持,则可能要使用 Debian 版本。它可能不是最好的选择,但是它具有许多预配置的软件来简化 Linux 学习体验,并提供 32 位支持,如果你希望在此过程中支持他们的事业,那么这是一个相当不错的选择。 -[Emmanbuntus][20] +最低系统要求: -#### 6\. NixOS +- 512MB 内存 +- 硬盘驱动器:2GB +- 奔腾处理器或同等配置 + +#### 6、NixOS ![Nixos KDE Edition \(图片来源: Distrowatch\)][21] -NixOS 是另一个独立的支持 32 位系统的 Linux 发行版。它着重于提供一个可靠的系统,其中程序包彼此隔离。 +[NixOS][23] 是另一个支持 32 位系统的独立 Linux 发行版。它着重于提供一个可靠的系统,其中程序包彼此隔离。 -这可能不直接面向普通用户,但它是 KDE 支持的可用发行版,具有独一无二的软件包管理方法。您可以从其官方网站上了解有关其[功能][22]的更多信息。 +这可能不是直接面向普通用户,但它是一个 KDE 支持的可用发行版,具有独特的软件包管理方式。你可以从其官方网站上了解有关其 [功能][22] 的更多信息。 -[NixOS][23] +最低系统要求: -#### 7\. Gentoo Linux +- 内存:768 MB +- 8GB 磁盘空间 +- 奔腾 4 或同等水平 + +#### 7、Gentoo Linux ![][24] -如果您是经验丰富的 Linux 用户,并且正在寻找 32 位 Linux 发行版,那么 Gentoo Linux 应该是一个不错的选择。 +如果你是经验丰富的 Linux 用户,并且正在寻找 32 位 Linux 发行版,那么 [Gentoo Linux][26] 应该是一个不错的选择。 -如果需要,您可以使用 Gentoo Linux 通过软件包管理器轻松配置,编译和安装内核。不仅限于众所周知的可配置性,您还可以在较旧的硬件上运行而不会出现任何问题。 +如果需要,你可以使用 Gentoo Linux 的软件包管理器轻松配置、编译和安装内核。不仅限于众所周知的可配置性,你还可以在较旧的硬件上运行而不会出现任何问题。 -即使您不是经验丰富的用户,也想尝试一下,只需阅读[安装说明][25],就可以大胆尝试了。 +即使你不是经验丰富的用户,也想尝试一下,只需阅读 [安装说明][25],就可以大胆尝试了。 -[Gentoo Linux][26] +最低系统要求: -#### 8\. Devuan +- 256MB 内存 +- 奔腾 4 或 AMD 的同类产品 +- 2.5 GB 磁盘空间 + +#### 8、Devuan ![][27] -[Devuan][28]是另一种免系统的发行版。从技术上讲,它是 Debian的一个分支,只是没有系统化和鼓励[开始自由][29]。 +[Devuan][30] 是另一种无 systemd 的发行版。从技术上讲,它是 Debian 的一个分支,只是没有 systemd ,并鼓励 [初始化系统自由][29]。 -对于普通用户来说,它可能不是一个非常流行的 Linux 发行版,但是如果您想要免系统发行版和 32 位支持,Devuan 应该是一个不错的选择。 +对于普通用户来说,它可能不是一个非常流行的 Linux 发行版,但是如果你想要一个无 systemd 的发行版和 32 位支持,Devuan 应该是一个不错的选择。 -[Devuan][30] +最低系统要求: -#### 9\. Void Linux +- 内存:1GB +- CPU:奔腾 1.0GHz + +#### 9、Void Linux ![][31] -Void Linux 是由志愿者独立开发的有趣发行版。它旨在成为一个通用的 OS(操作系统),同时提供稳定的滚动发布周期。它以 `runit`作为初始系统替代 `systemd`,并具有多个[桌面环境][32]的选项。 +[Void Linux][33] 是由志愿者独立开发的有趣发行版。它旨在成为一个通用的操作系统,同时提供稳定的滚动发布周期。它以 runit 作为初始化系统替代 systemd,并为你提供了多个 [桌面环境][32] 选择。 -它具有令人印象深刻的最低需求规格,只需 96 MB 的内存和 Pentium(奔腾) 4(或等效的)芯片配对。试试看吧! +它具有非常令人印象深刻的最低需求规格,只需 96 MB 的内存配以奔腾 4 或等同的芯片。试试看吧! -[Void Linux][33] +最低系统要求: -#### 10\. Q4OS +- 96MB 内存 +- 奔腾 4 或相当的 AMD 处理器 + +#### 10、Q4OS ![][34] -Q4OS 是另一个基于 Debian 的发行版,致力于提供最小和快速的桌面用户体验。它也恰好是我们列表中的[最佳轻量级 Linux 发行版][4]之一。它的 32 位版本具有[Trinity 桌面][35],您可以在 64 位版本上找到 KDE Plasma 支持。 +[Q4OS][37] 是另一个基于 Debian 的发行版,致力于提供极简和快速的桌面用户体验。它也恰好是我们的 [最佳轻量级 Linux 发行版][4] 列表中的一个。它的 32 位版本具有 [Trinity 桌面][35],你可以在 64 位版本上找到 KDE Plasma 支持。 -与 Void Linux 类似,Q4OS 也至少可以运行在至少 128 MB 的内存和 300 MHz 的 CPU 上,并需要 3 GB 的存储空间。对于任何老式硬件来说,它应该绰绰有余。因此,我想说,您绝对应该尝试一下! +与 Void Linux 类似,Q4OS 可以运行在至低 128 MB 的内存和 300 MHz 的 CPU 上,需要 3 GB 的存储空间。对于任何老式硬件来说,它应该绰绰有余。因此,我想说,你绝对应该尝试一下! -要了解更多信息,您还可以查看[我们对 Q4OS 的回顾][36]。 +要了解更多信息,你还可以查看 [我们对 Q4OS 的点评][36]。 -[Q$OS][37] +Q4OS 的最低要求: -#### 11: MX Linux +- 内存:128MB(Trinity 桌面)/ 1GB(Plasma 桌面) +- CPU:300 MHz(Trinity 桌面)/ 1 GHz(Plasma 桌面) +- 存储空间:5GB(Trinity 桌面)/3GB(Plasma 桌面) + +#### 11、MX Linux ![][38] -如果有一个稍微不错的配置(不完全是老式的,而是旧的),对于 32 位系统,我个人推荐 MX Linux。对于每种类型的用户,它也都会成为[最佳 Linux 发行版][2]之一。 +如果有一个稍微不错的配置(不完全是老式的,而是旧的),对于 32 位系统,我个人推荐 [MX Linux][39]。它也恰好是适合各种类型用户的 [最佳 Linux 发行版][2] 之一。 -通常,MX Linux 是基于 Debian 的出色的轻量级和可自定义发行版。您可以选择从 KDE,XFCE 或 Fluxbox(这是它们自己的用于较旧硬件的桌面环境)中进行选择。您可以在他们的官方网站上找到更多关于它的信息,然后尝试一下。 +通常,MX Linux 是基于 Debian 的出色的轻量级和可定制的发行版。你可以选择 KDE、XFce 或 Fluxbox(这是他们自己为旧硬件设计的桌面环境)。你可以在他们的官方网站上找到更多关于它的信息,并尝试一下。 -[MX Linux][39] +最低系统要求: -### 荣誉提名:Funtoo +- 1GB 内存(建议使用 2GB,以便舒适地使用) +- 15GB 的磁盘空间(建议 20GB) -Funtoo 是基于 Gentoo 社区开发的 Linux 发行版。它着重于为您提供 Gentoo Linux 的最佳性能以及一些额外的软件包,以使用户获得完整的体验。有趣的是,该开发实际上是由 Gentoo Linux 的创建者丹尼尔·罗宾斯(Daniel Robbins)领导的。 -当然,如果您不熟悉 Linux,那么这里可能没有最好的体验。但是,它确实支持 32 位系统,并且可以在许多较旧的 Intel/AMD 芯片组上很好地工作。 +#### 12、Linux Mint Debian Edtion -[Funtoo][40] +![][44] + +[基于 Debian 的 Linux Mint][45]?为什么不可以呢? + +你可以得到同样的 Cinnamon 桌面体验,只是不基于 Ubuntu。它和基于 Ubuntu 的 Linux Mint 一样容易使用,一样可靠。 + +不仅仅是基于 Debian,你还可以得到对 64 位和 32 位系统的支持。如果你不想在 32 位系统上使用一个你从未听说过的 Linux 发行版,这应该是一个不错的选择。 + +最低系统要求: + +- 1GB 内存(建议使用 2GB,以便舒适地使用) +- 15GB 的磁盘空间(建议 20GB) + +#### 13、Sparky Linux + +![][46] + +[Sparky Linux][47] 是 [为初学者定制的最好的轻量级 Linux 发行版][4] 之一。它很容易定制,而且资源占用很少。 + +它可以根据你的要求提供不同的版本,但它确实支持 32 位版本。考虑到你想为你的旧电脑买点东西,我建议你看看它的 MinimalGUI 版本,除非你真的需要像 Xfce 或 LXQt 这样成熟的桌面环境。 + +最低系统要求: + +- 内存:512 MB +- CPU:奔腾 4,或 AMD Athlon +- 磁盘空间:2GB(命令行版),10GB(家庭版),20GB(游戏版) + +#### Mageia + +![][48] + +作为 [Mandriva Linux][49] 的分支,[Mageia Linux][50] 是一个由社区推动的 Linux 发行版,支持 32 位系统。 + +通常情况下,你会注意到每年都有一个重大版本。他们的目的是贡献他们的工作,以提供一个自由的操作系统,这也是潜在的安全。对于 32 位系统来说,它可能不是一个流行的选择,但它支持很多桌面环境(如 KDE Plasma、GNOME),如果你需要,你只需要从它的软件库中安装它。 + +你应该可以从他们的官方网站上得到下载桌面环境特定镜像的选项。 + +最低系统要求: + +- 512MB 内存(推荐 2GB) +- 最小安装需 5GB 存储空间(常规安装 20GB) +- CPU:奔腾4,或 AMD Athlon + +### 荣誉提名:Funtoo & Puppy Linux + +[Funtoo][40] 是基于 Gentoo 的由社区开发的 Linux 发行版。它着重于为你提供 Gentoo Linux 的最佳性能以及一些额外的软件包,以使用户获得完整的体验。有趣的是,该开发实际上是由 Gentoo Linux 的创建者 Daniel Robbins 领导的。 + +[Puppy Linux][51] 是一个很小的 Linux 发行版,除了基本的工具,几乎没有捆绑的软件应用。如果其他选择都不行,而你又想要最轻量级的发行版,Puppy Linux 可能是一个选择。 + +当然,如果你不熟悉 Linux,这两个可能都不能提供最好的体验。但是,它们确实支持 32 位系统,并且可以在许多较旧的 Intel/AMD 芯片组上很好地工作。可以在它们的官方网站上探索更多的信息。 ### 总结 -我将列表集中在基于 Debian 的发行版和一些独立发行版上。但是,如果您不介意长期支持条款,而只想获得 32 位受支持的映像,也可以尝试使用任何基于 Ubuntu 18.04 的发行版(或任何官方版本)。 +我将列表重点放在基于 Debian 的发行版和一些独立发行版上。但是,如果你不介意长期支持条款,而只想获得一个支持 32 位的镜像,也可以尝试使用任何基于 Ubuntu 18.04 的发行版(或任何官方版本)。 -在撰写本文时,他们只剩下几个月的软件支持。因此,我避免将其作为主要选项提及。但是,如果您喜欢基于 Ubuntu 18.04 的发行版或其它任何版本,可以选择 [LXLE][41],[Linux Lite][42],[Zorin Lite 15][43]及其他官方版本。 +在撰写本文时,它们只剩下几个月的软件支持。因此,我避免将其作为主要选项提及。但是,如果你喜欢基于 Ubuntu 18.04 的发行版或其它任何版本,可以选择 [LXLE][41]、[Linux Lite][42]、[Zorin Lite 15][43] 及其他官方版本。 -即使大多数基于 Ubuntu 的现代桌面操作系统都放弃了对 32 位的支持。您仍然有很多选项可以选择。 +即使大多数基于 Ubuntu 的现代桌面操作系统都放弃了对 32 位的支持。你仍然有很多选项可以选择。 -在 32 位系统上更喜欢哪一个?在下面的评论中让我知道您的想法。 +在 32 位系统中更喜欢哪一个?在下面的评论中让我知道你的想法。 -------------------------------------------------------------------------------- @@ -173,7 +258,7 @@ via: https://itsfoss.com/32-bit-linux-distributions/ 作者:[Ankush Das][a] 选题:[lujun9972][b] 译者:[stevenzdg988](https://github.com/stevenzdg988) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -222,3 +307,11 @@ via: https://itsfoss.com/32-bit-linux-distributions/ [41]: https://www.lxle.net/ [42]: https://www.linuxliteos.com [43]: https://zorinos.com/download/15/lite/32/ +[44]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/cinnamon-debian-edition.jpg?w=800&ssl=1 +[45]: https://www.linuxmint.com/download_lmde.php +[46]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/sparky-linux.jpg?w=800&ssl=1 +[47]: https://sparkylinux.org/download/stable/ +[48]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/mageia.jpg?w=800&ssl=1 +[49]: https://en.wikipedia.org/wiki/Mandriva_Linux +[50]: https://www.mageia.org/en/ +[51]: http://puppylinux.com/ \ No newline at end of file From 97b2c897d7941a1a691ce648ab27f2a9b06d454c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 24 Apr 2021 14:45:58 +0800 Subject: [PATCH 802/818] PUB @stevenzdg988 https://linux.cn/article-13326-1.html --- ...utions You Can Rely on for Your Ancient 32-bit Computer.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md (99%) diff --git a/translated/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md b/published/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md similarity index 99% rename from translated/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md rename to published/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md index 5284ded94d..bbbf03bdcc 100644 --- a/translated/tech/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md +++ b/published/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (stevenzdg988) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13326-1.html) [#]: subject: (11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer) [#]: via: (https://itsfoss.com/32-bit-linux-distributions/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) From 995dd71e7277214f63d4bcf0e99e6763f5521b71 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 24 Apr 2021 14:50:17 +0800 Subject: [PATCH 803/818] PRF --- ...ibutions You Can Rely on for Your Ancient 32-bit Computer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md b/published/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md index bbbf03bdcc..6ab0eb1e6f 100644 --- a/published/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md +++ b/published/20201106 11 Linux Distributions You Can Rely on for Your Ancient 32-bit Computer.md @@ -217,7 +217,7 @@ Q4OS 的最低要求: - CPU:奔腾 4,或 AMD Athlon - 磁盘空间:2GB(命令行版),10GB(家庭版),20GB(游戏版) -#### Mageia +#### 14、Mageia ![][48] From 51def2df464b3af07a3a9d4d6d6a72896456a4fb Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 25 Apr 2021 05:03:01 +0800 Subject: [PATCH 804/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210424=20?= =?UTF-8?q?Making=20computers=20more=20accessible=20and=20sustainable=20wi?= =?UTF-8?q?th=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210424 Making computers more accessible and sustainable with Linux.md --- ...e accessible and sustainable with Linux.md | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sources/tech/20210424 Making computers more accessible and sustainable with Linux.md diff --git a/sources/tech/20210424 Making computers more accessible and sustainable with Linux.md b/sources/tech/20210424 Making computers more accessible and sustainable with Linux.md new file mode 100644 index 0000000000..9f1db397ff --- /dev/null +++ b/sources/tech/20210424 Making computers more accessible and sustainable with Linux.md @@ -0,0 +1,73 @@ +[#]: subject: (Making computers more accessible and sustainable with Linux) +[#]: via: (https://opensource.com/article/21/4/linux-free-geek) +[#]: author: (Don Watkins https://opensource.com/users/don-watkins) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Making computers more accessible and sustainable with Linux +====== +Free Geek is a nonprofit organization that helps decrease the digital +divide by providing Linux computers to people and groups in need. +![Working from home at a laptop][1] + +There are many reasons to choose Linux for your desktop operating system. In [_Why everyone should choose Linux_][2], Opensource.com's Seth Kenlon highlighted many of the best reasons to select Linux and provided lots of ways for people to get started with the operating system. + +This also got me thinking about how I usually introduce folks to Linux. The pandemic has increased the need for people to go online for shopping, doing remote education, and connecting with family and friends [over video conferencing][3]. + +I work with a lot of retirees who have fixed incomes and are not particularly tech-savvy. For most of these folks, buying a computer is a major investment fraught with concern. Some of my friends and clients are uncomfortable going to a retail store during a pandemic, and they're completely unfamiliar with what to look for in a computer, whether it's a desktop or laptop, even in non-pandemic times. They come to me with questions about where to buy one and what to look for. + +I'm always eager to see them get a Linux computer. Many of them cannot afford the Linux units sold by name-brand vendors. Until recently, I've been purchasing refurbished units for them and refitting them with Linux. + +But that all changed when I discovered [Free Geek][4], a nonprofit organization based in Portland, Ore., with the mission "to sustainably reuse technology, enable digital access, and provide education to create a community that empowers people to realize their potential." + +Free Geek has an eBay store where I have purchased several refurbished laptops at affordable prices. Their computers come with [Linux Mint][5] installed. The fact that a computer comes ready-to-use makes it easy to introduce [new users to Linux][6] and help them quickly experience the operating system's power. + +### Keeping computers in service and out of landfills + +Oso Martin launched Free Geek on Earth Day 2000. The organization provides classes and work programs to its volunteers, who are trained to refurbish and rebuild donated computers. Volunteers also receive a donated computer after 24 hours of service. + +The computers are sold in Free Geek's brick-and-mortar store in Portland and [online][7]. The organization also provides computers to people and entities in need through its programs [Plug Into Portland][8], [Gift a Geekbox][9], and [organizational][10] and [community grants][11]. + +The organization says it has "diverted over 2 million items from landfills, granted over 75,000 technology devices to nonprofits, schools, community change organizations, and individuals, and plugged over 5,000 classroom hours from Free Geek learners." + +### Get involved + +Since its inception, Free Geek has grown from a staff of three to almost 50 and has been recognized around the world. It is a member of the City of Portland's [Digital Inclusion Network][12]. + +You can connect with Free Geek on [Twitter][13], [Facebook][14], [LinkedIn][15], [YouTube][16], and [Instagram][17]. You can also subscribe to its [newsletter][18]. Purchasing items from Free Geek's [shop][19] directly supports its work and reduces the digital divide. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/linux-free-geek + +作者:[Don Watkins][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/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/wfh_work_home_laptop_work.png?itok=VFwToeMy (Working from home at a laptop) +[2]: https://opensource.com/article/21/2/try-linux +[3]: https://opensource.com/article/20/8/linux-laptop-video-conferencing +[4]: https://www.freegeek.org/ +[5]: https://opensource.com/article/21/4/restore-macbook-linux +[6]: https://opensource.com/article/18/12/help-non-techies +[7]: https://www.ebay.com/str/freegeekbasicsstore +[8]: https://www.freegeek.org/our-programs/plug-portland +[9]: https://www.freegeek.org/our-programs/gift-geekbox +[10]: https://www.freegeek.org/our-programs-grants/organizational-hardware-grants +[11]: https://www.freegeek.org/our-programs-grants/community-hardware-grants +[12]: https://www.portlandoregon.gov/oct/73860 +[13]: https://twitter.com/freegeekpdx +[14]: https://www.facebook.com/freegeekmothership +[15]: https://www.linkedin.com/company/free-geek/ +[16]: https://www.youtube.com/user/FreeGeekMothership +[17]: https://www.instagram.com/freegeekmothership/ +[18]: https://app.e2ma.net/app2/audience/signup/1766417/1738557/?v=a +[19]: https://www.freegeek.org/shop From becb88bca2eeeca29ca51f3f7aa9957d25d729c6 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 25 Apr 2021 05:03:21 +0800 Subject: [PATCH 805/818] =?UTF-8?q?=E9=80=89=E9=A2=98[news]:=2020210424=20?= =?UTF-8?q?Can=20We=20Recommend=20Linux=20for=20Gaming=20in=202021=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/news/20210424 Can We Recommend Linux for Gaming in 2021.md --- ...n We Recommend Linux for Gaming in 2021.md | 145 ++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 sources/news/20210424 Can We Recommend Linux for Gaming in 2021.md diff --git a/sources/news/20210424 Can We Recommend Linux for Gaming in 2021.md b/sources/news/20210424 Can We Recommend Linux for Gaming in 2021.md new file mode 100644 index 0000000000..665199a720 --- /dev/null +++ b/sources/news/20210424 Can We Recommend Linux for Gaming in 2021.md @@ -0,0 +1,145 @@ +[#]: subject: (Can We Recommend Linux for Gaming in 2021?) +[#]: via: (https://news.itsfoss.com/linux-for-gaming-opinion/) +[#]: author: (Ankush Das https://news.itsfoss.com/author/ankush/) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Can We Recommend Linux for Gaming in 2021? +====== + +You will often hear Linux enthusiasts praise about the improved gaming capabilities on Linux. Yes, we have come a long way considering the advancements made to support modern games on Linux desktop. + +Even Lutris’ creator mentions in our interview that the [progress Linux has made in terms of gaming is simply incredible][1]. + +But, is it something to be hyped about? Can we recommend Linux to a gamer? Is Linux suitable for gaming? + +In this article, I want to share a few things about gaming on a Linux system and share what I think about it. + +### You Can Play Games on Linux: Yes! + +If anyone’s ever told you that you cannot game on Linux, **that is not true**. + +You can play a variety of games on Linux without any major hiccups. And, for the most part, it is playable and totally a good experience. + +In fact, we have an ultimate guide for [Gaming on Linux][2] if you do not know where to start. + +### Do I Need a Specific Linux Distro to Play Games? + +Not really. It depends on how convenient you want the experience to be. + +For instance, if you want a Linux distribution to work well with your graphics driver and get the latest hardware support, there’s something for that. Similarly, if you just want to play native Linux indie games with an integrated GPU, any Linux distro can work. + +So, there are a few variables when choosing a Linux distribution for your gaming adventures. + +Fret not, to help you out, we have a useful list of the [best Linux gaming distributions][3]. + +### Virtual Reality Games on Linux: Uh-Oh! + +![][4] + +I’m sure VR gaming is not something widely adopted yet. But, if you want the exciting experience on a VR headset, **choosing Linux as your preferred platform might be a bad idea**. + +You do not have the necessary drivers or applications for a convenient experience on Linux. No distribution can help you solve this problem. + +If you are curious, you can go through the details shed on the **state of virtual reality** in a blog post on [Boiling Steam][5] and an interesting experience with Valve’s VR headset on [GamingOnLinux][6]. + +I’ve linked those blog posts for reference but long story short — avoid Linux if you want to experience VR games (feel free to experiment if you have the time though). + +### Can You Play Windows Exclusive Games on Linux? + +Yes and No. + +You can use [Steam Play to play Windows-only games][7], **but it has its share of issues**. Not every game works. + +For instance, I end up using Windows to play [Forza Horizon 4][8]. If you love car simulation or racing games, this is a masterpiece that you may not want to miss. + +Maybe we will see it working through Steam Play without issues in the near future, who knows? + +So, it is safe to assume that you will encounter many similar games that may not work at all. That’s the bitter truth. + +And, to know if the game works on Linux, head to [ProtonDB][9] and search for the game to see if it has a “**Gold**” status at the very least. + +### Multiplayer Gaming With Anti-Cheat Engines: Does It Work? + +![][10] + +A huge chunk of gamers prefer playing multiplayer games like [Apex Legends][11], [Rainbow Six Siege][12], and [Fortnite][13]. + +However, some of those popular titles that rely on anti-cheat engines do not work on Linux yet. It is still something a work in progress and can be made possible in future Linux Kernel releases — just not yet. + +Do note that multiplayer games like [CS:GO][14], Dota 2, Team Fortress 2, [Valheim][15], and several more offer native Linux support and works great! + +### Would I Recommend Linux for Gaming? + +![][4] + +Considering that you can play a lot of Windows-specific games, native indie games, and a variety of AAA games with native Linux support, I can recommend a first-time user to try gaming on Linux. + +But, that comes with a **caution** — I would suggest you to make a potential list of games that you want to play to make sure that it runs on Linux without any issues. In either case, you may end up wasting a lot of time troubleshooting with no results. + +Not to forget, a big no to VR gaming on Linux, I believe. + +And, if you want to explore all the latest and greatest titles, I will recommend you to stick to your Windows-powered gaming machine. + +**While I should encourage more users to adopt Linux as a gaming platform, but I won’t be ignoring the practical side of why common consumers still prefer a Windows-powered machine to game on.** + +_What do you think? Do you agree with my thoughts? Feel free to share what you feel in the comments below!_ + +#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! + +If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. + +I'm not interested + +#### _Related_ + + * [The Progress Linux has Made in Terms of Gaming is Simply Incredible: Lutris Creator][1] + * ![][16] ![][17] + + + * [Popular Game Titles Metro Exodus and Total War: Rome Remastered Releasing for Linux in April][18] + * ![][16] ![][19] + + + * [Good News for Linux Gamers! An Unofficial Epic Games Store Launcher for Linux is in Works][20] + * ![][16] ![Heroic Games Launcher][21] + + + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-for-gaming-opinion/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/lutris-creator-interview/ +[2]: https://itsfoss.com/linux-gaming-guide/ +[3]: https://itsfoss.com/linux-gaming-distributions/ +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzUyMScgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[5]: https://boilingsteam.com/the-state-of-virtual-reality-on-linux/ +[6]: https://www.gamingonlinux.com/2020/08/my-experiences-of-valves-vr-on-linux +[7]: https://itsfoss.com/steam-play/ +[8]: https://forzamotorsport.net/en-US/games/fh4 +[9]: https://www.protondb.com/ +[10]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzUyMCcgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[11]: https://www.ea.com/games/apex-legends +[12]: https://www.ubisoft.com/en-us/game/rainbow-six/siege +[13]: https://www.epicgames.com/fortnite/en-US/home +[14]: https://store.steampowered.com/app/730/CounterStrike_Global_Offensive/ +[15]: https://store.steampowered.com/app/892970/Valheim/ +[16]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzIwMCcgd2lkdGg9JzM1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[17]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/03/lutris-interview-ft.png?fit=1200%2C675&ssl=1&resize=350%2C200 +[18]: https://news.itsfoss.com/metro-exodus-total-war-rome-linux/ +[19]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/03/metro-total-war-ft.png?fit=1200%2C675&ssl=1&resize=350%2C200 +[20]: https://news.itsfoss.com/heroic-games-launcher/ +[21]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/01/heroic-games-launcher.jpg?fit=1200%2C675&ssl=1&resize=350%2C200 From ed020ee1d6b6392bcfa42a5a85878e5342275b35 Mon Sep 17 00:00:00 2001 From: stevenzdg988 <3442417@qq.com> Date: Sun, 25 Apr 2021 08:24:27 +0800 Subject: [PATCH 806/818] =?UTF-8?q?=E8=AF=91=E6=96=87=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...te open source project management tools.md | 194 ------------------ ...te open source project management tools.md | 181 ++++++++++++++++ 2 files changed, 181 insertions(+), 194 deletions(-) delete mode 100644 sources/tech/20210317 My favorite open source project management tools.md create mode 100644 translated/tech/20210317 My favorite open source project management tools.md diff --git a/sources/tech/20210317 My favorite open source project management tools.md b/sources/tech/20210317 My favorite open source project management tools.md deleted file mode 100644 index 5653804680..0000000000 --- a/sources/tech/20210317 My favorite open source project management tools.md +++ /dev/null @@ -1,194 +0,0 @@ -[#]: subject: (My favorite open source project management tools) -[#]: via: (https://opensource.com/article/21/3/open-source-project-management) -[#]: author: (Frank Bergmann https://opensource.com/users/fraber) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -My favorite open source project management tools -====== -If you're managing large and complex projects, try replacing Microsoft -Project with an open source option. -![Kanban-style organization action][1] - -Projects like building a satellite, developing a robot, or launching a new product are all expensive, involve different providers, and contain hard dependencies that must be tracked. - -The approach to project management in the world of large projects is quite simple (in theory at least). You create a project plan and split it into smaller pieces until you can reasonably assign costs, duration, resources, and dependencies to the various activities. Once the project plan is approved by the people in charge of the money, you use it to track the project's execution. Drawing all of the project's activities on a timeline produces a bar chart called a [Gantt chart][2]. - -Gantt charts have always been used in [waterfall project methodologies][3], but they can also be used with agile. For example, large projects may use a Gantt chart for a scrum sprint and ignore other details like user stories, thereby embedding agile phases. Other large projects may include multiple product releases (e.g., minimum viable product [MVP], second version, third version, etc.). In this case, the super-structure is kind of agile, with each phase planned as a Gantt chart to deal with budgets and complex dependencies. - -### Project management tools - -There are literally hundreds of tools available to manage large projects with Gantt charts, and Microsoft Project is probably the most popular. It is part of the Microsoft Office family, scales to hundreds of thousands of activities, and has an incredible number of features that support almost every conceivable way to manage a project schedule. With Project, it's not always clear what is more expensive: the software license or the training courses that teach you how to use the tool. - -Another drawback is that Microsoft Project is a standalone desktop application, and only one person can update a schedule. You would need to buy licenses for Microsoft Project Server, Project for the web, or Microsoft Planner if you want multiple users to collaborate. - -Fortunately, there are open source alternatives to the proprietary tools, including the applications in this article. All are open source and include a Gantt for scheduling hierarchical activities based on resources and dependencies. ProjectLibre, GanttProject, and TaskJuggler are desktop applications for a single project manager; ProjeQtOr and Redmine are web applications for project teams, and ]project-open[ is a web application for managing entire organizations. - -I evaluated the tools based on a single user planning and tracking a single large project. My evaluation criteria includes Gantt editor features, availability on Windows, Linux, and macOS, scalability, import/export, and reporting. (Full disclosure: I'm the founder of ]project-open[, and I've been active in several open source communities for many years. This list includes our product, so my views may be biased, but I tried to focus on each product's best features.) - -### Redmine 4.1.0 - -![Redmine][4] - -(Frank Bergmann, [CC BY-SA 4.0][5]) - -[Redmine][6] is a web-based project management tool with a focus on agile methodologies. - -The standard installation includes a Gantt timeline view, but it lacks fundamental features like scheduling, drag-and-drop, indent and outdent, and resource assignments. You have to edit task properties individually to change the task tree's structure. - -Redmine has Gantt editor plugins, but they are either outdated (e.g., [Plus Gantt][7]) or proprietary (e.g., [ANKO Gantt chart][8]). If you know of other open source Gantt editor plugins, please share them in the comments. - -Redmine is written in Ruby on Rails and available for Windows, Linux, and macOS. The core is available under a GPLv2 license. - - * **Best for:** IT teams working using agile methodologies - * **Unique selling proposition:** It's the original "upstream" parent project of OpenProject and EasyRedmine. - - - -### ]project-open[ 5.1 - -![\]project-open\[][9] - -(Frank Bergmann, [CC BY-SA 4.0][5]) - -[]project-open[][10] is a web-based project management system that takes the perspective of an entire organization, similar to an enterprise resource planning (ERP) system. It can also manage project portfolios, budgets, invoicing, sales, human resources, and other functional areas. Specific variants exist for professional services automation (PSA) for running a project company, project management office (PMO) for managing an enterprise's strategic projects, and enterprise project management (EPM) for managing a department's projects. - -The ]po[ Gantt editor includes hierarchical tasks, dependencies, and scheduling based on planned work and assigned resources. It does not support resource calendars and non-human resources. The ]po[ system is quite complex, and the GUI might need a refresh. - -]project-open[ is written in TCL and JavaScript and available for Windows and Linux. The ]po[ core is available under a GPLv2 license with proprietary extensions available for large companies. - - * **Best for:** Medium to large project organizations that need a lot of financial project reporting - * **Unique selling proposition:** ]po[ is an integrated system to run an entire project company or department. - - - -### ProjectLibre 1.9.3 - -![ProjectLibre][11] - -(Frank Bergmann, [CC BY-SA 4.0][5]) - -[ProjectLibre][12] is probably the closest you can get to Microsoft Project in the open source world. It is a desktop application that supports all-important project planning features, including resource calendars, baselines, and cost management. It also allows you to import and export schedules using MS-Project's file format. - -ProjectLibre is perfectly suitable for planning and executing small or midsized projects. However, it's missing some advanced features in MS-Project, and its GUI is not the prettiest. - -ProjectLibre is written in Java and available for Windows, Linux, and macOS and licensed under an open source Common Public Attribution (CPAL) license. The ProjectLibre team is currently working on a Web offering called ProjectLibre Cloud under a proprietary license. - - * **Best for:** An individual project manager running small to midsized projects or as a viewer for project members who don't have a full MS-Project license - * **Unique selling proposition:** It's the closest you can get to MS-Project with open source. - - - -### GanttProject 2.8.11 - -![GanttProject][13] - -(Frank Bergmann, [CC BY-SA 4.0][5]) - -[GanttProject][14] is similar to ProjectLibre as a desktop Gantt editor but with a more limited feature set. It doesn't support baselines nor non-human resources, and the reporting functionality is more limited. - -GanttProject is a desktop application written in Java and available for Windows, Linux, and macOS under the GPLv3 license. - - * **Best for:** Simple Gantt charts or learning Gantt-based project management techniques. - * **Unique selling proposition:** It supports program evaluation and review technique ([PERT][15]) charts and collaboration using WebDAV. - - - -### TaskJuggler 3.7.1 - -![TaskJuggler][16] - -(Frank Bergmann, [CC BY-SA 4.0][5]) - -[TaskJuggler][17] schedules multiple parallel projects in large organizations, focusing on automatically resolving resource assignment conflicts (i.e., resource leveling). - -It is not an interactive Gantt editor but a command-line tool that works similarly to a compiler: It reads a list of tasks from a text file and produces a series of reports with the optimum start and end times for each task depending on the assigned resources, dependencies, priorities, and many other parameters. It supports multiple projects, baselines, resource calendars, shifts, and time zones and has been designed to scale to enterprise scenarios with many projects and resources. - -Writing a TaskJuggler input file with its specific syntax may be beyond the average project manager's capabilities. However, you can use ]project-open[ as a graphical frontend for TaskJuggler to generate input, including absences, task progress, and logged hours. When used this way, TaskJuggler becomes a powerful what-if scenario planner. - -TaskJuggler is written in Ruby and available for Windows, Linux, and macOS under a GPLv2 license. - - * **Best for:** Medium to large departments managed by a true nerd - * **Unique selling proposition:** It excels in automatic resource-leveling. - - - -### ProjeQtOr 9.0.4 - -![ProjeQtOr][18] - -(Frank Bergmann, [CC BY-SA 4.0][5]) - -[ProjeQtOr][19] is a web-based project management application that's suitable for IT projects. It supports risks, budgets, deliverables, and financial documents in addition to projects, tickets, and activities to integrate many aspects of project management into a single system. - -ProjeQtOr provides a Gantt editor with a feature set similar to ProjectLibre, including hierarchical tasks, dependencies, and scheduling based on planned work and assigned resources. However, it doesn't support in-place editing of values (e.g., task name, estimated time, etc.); users must change values in an entry form below the Gantt view and save the values. - -ProjeQtOr is written in PHP and available for Windows, Linux, and macOS under the Affero GPL3 license. - - * **Best for:** IT departments tracking a list of projects - * **Unique selling proposition:** Lets you store a wealth of information for every project, keeping all information in one place. - - - -### Other tools - -The following systems may be valid options for specific use cases but were excluded from the main list for various reasons. - -![LIbrePlan][20] - -(Frank Bergmann, [CC BY-SA 4.0][5]) - - * [**LibrePlan**][21] is a web-based project management application focusing on Gantt charts. It would have figured prominently in the list above due to its feature set, but there is no installation available for recent Linux versions (CentOS 7 or 8). The authors say updated instructions will be available soon. - * [**dotProject**][22] is a web-based project management system written in PHP and available under the GPLv2.x license. It includes a Gantt timeline report, but it doesn't have options to edit it, and dependencies don't work yet (they're "only partially functional"). - * [**Leantime**][23] is a web-based project management system with a pretty GUI written in PHP and available under the GPLv2 license. It includes a Gantt timeline for milestones but without dependencies. - * [**Orangescrum**][24] is a web-based project-management tool. Gantt charts are available as a paid add-on or with a paid subscription. - * [**Talaia/OpenPPM**][25] is a web-based project portfolio management system. However, version 4.6.1 still says "Coming Soon: Interactive Gantt Charts." - * [**Odoo**][26] and [**OpenProject**][27] both restrict some important features to the paid enterprise edition. - - - -In this review, I aimed to include all open source project management systems that include a Gantt editor with dependency scheduling. If I missed a project or misrepresented something, please let me know in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/open-source-project-management - -作者:[Frank Bergmann][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/fraber -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/kanban_trello_organize_teams_520.png?itok=ObNjCpxt (Kanban-style organization action) -[2]: https://en.wikipedia.org/wiki/Gantt_chart -[3]: https://opensource.com/article/20/3/agiles-vs-waterfall -[4]: https://opensource.com/sites/default/files/uploads/redmine.png (Redmine) -[5]: https://creativecommons.org/licenses/by-sa/4.0/ -[6]: https://www.redmine.org/ -[7]: https://redmine.org/plugins/plus_gantt -[8]: https://www.redmine.org/plugins/anko_gantt_chart -[9]: https://opensource.com/sites/default/files/uploads/project-open.png (]project-open[) -[10]: https://www.project-open.com -[11]: https://opensource.com/sites/default/files/uploads/projectlibre.png (ProjectLibre) -[12]: http://www.projectlibre.org -[13]: https://opensource.com/sites/default/files/uploads/ganttproject.png (GanttProject) -[14]: https://www.ganttproject.biz -[15]: https://en.wikipedia.org/wiki/Program_evaluation_and_review_technique -[16]: https://opensource.com/sites/default/files/uploads/taskjuggler.png (TaskJuggler) -[17]: https://taskjuggler.org/ -[18]: https://opensource.com/sites/default/files/uploads/projeqtor.png (ProjeQtOr) -[19]: https://www.projeqtor.org -[20]: https://opensource.com/sites/default/files/uploads/libreplan.png (LIbrePlan) -[21]: https://www.libreplan.dev/ -[22]: https://dotproject.net/ -[23]: https://leantime.io -[24]: https://orangescrum.org/ -[25]: http://en.talaia-openppm.com/ -[26]: https://odoo.com -[27]: http://openproject.org diff --git a/translated/tech/20210317 My favorite open source project management tools.md b/translated/tech/20210317 My favorite open source project management tools.md new file mode 100644 index 0000000000..36f94cf09f --- /dev/null +++ b/translated/tech/20210317 My favorite open source project management tools.md @@ -0,0 +1,181 @@ +[#]: subject: (My favorite open source project management tools) +[#]: via: (https://opensource.com/article/21/3/open-source-project-management) +[#]: author: (Frank Bergmann https://opensource.com/users/fraber) +[#]: collector: (lujun9972) +[#]: translator: (stevenzdg988) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +我最喜欢的开源项目管理工具 +====== +如果您要管理大型复杂的项目,请尝试利用开源选项替换 Microsoft Project(微软项目管理软件)。 +![看板式组织活动][1] + +诸如建造卫星,开发机器人或推出新产品之类的项目都是昂贵的,涉及不同的提供商,并且包含必须跟踪的硬依赖性。 + +大型项目领域中的项目管理方法非常简单(至少在理论上如此)。您可以创建项目计划并将其拆分为较小的部分,直到您可以合理地将成本,持续时间,资源和依赖性分配给各种活动。一旦项目计划获得负责人的批准,您就可以使用它来跟踪项目的执行情况。在时间轴上绘制项目的所有活动将产生一个称为[Gantt chart(甘特图表)][2]的条形图。 + +Gantt(甘特)图一直用于[瀑布项目方法][3],也可以被灵活地使用。例如,大型项目可能将 Gantt chart (甘特图)用于 Scrum 冲刺,而忽略其他像用户需求这样的细节,从而嵌入灵活的阶段。其他大型项目可能包括多个产品版本(例如,最低可行产品 [MVP],第二版本,第三版本等)。在这种情况下,上层结构对灵活性友善,用每个阶段计划作为 Gantt chart (甘特图)处理预算和复杂的依赖关系。 + +### 项目管理工具 + +不夸张地说,有数百种可用工具使用 Gantt chart (甘特图)管理大型项目,Microsoft Project(微软项目管理软件)可能是最受欢迎的工具。它是 Microsoft Office(微软办公软件)系列(家族)的一部分,可扩展到成千上万的活动,并且具有众多(难以置信的数量)功能,可支持几乎所有可能的方式来管理项目进度表。对于 Project(微软项目管理软件)并不总是清楚什么更昂贵:软件许可或如何使用该工具的培训课程。 + +另一个缺点是 Microsoft Project 是一个独立的桌面应用程序,只有一个人可以更新进度表。如果要多个用户进行协作,则需要购买 Microsoft Project Server,Web 版的 Project(微软项目管理软件) 或 Microsoft Planner 的许可证。 + +幸运的是,专有工具还有开源的替代品,包括本文中的应用程序。所有这些都是开源的,并且包括用于安排基于资源和依赖项分层活动的 Gantt (甘特图)。 ProjectLibre,GanttProject 和 TaskJuggler 是单个项目管理的桌面应用程序。ProjeQtOr 和 Redmine 是用于项目团队的 Web 应用程序,而 ]project-open[ 是用于管理整个组织的 Web 应用程序。 + +我根据一个单用户计划并跟踪一个大型项目评估了这些工具。我的评估标准包括 Gantt 编辑器功能,Windows,Linux 和 macOS 上的可用性,可扩展性,导入/导出和报告。(完全披露:我是 ]project-open[ 的创始人,并且我在多个开源社区中活跃了很多年。此列表包括我们的产品,因此我的观点可能有偏见,但我尝试着眼于每个产品的最佳功能。) + +### Redmine 4.1.0 + +![Redmine][4] + +(Frank Bergmann, [CC BY-SA 4.0][5]) + +[Redmine][6]是一个基于 Web 的专注于灵活原则的项目管理工具。 + +标准安装包括 Gantt (甘特图)时间轴视图,但缺少诸如调度,拖放,缩进(缩排和凸排)以及资源分配之类的基本功能。您必须单独编辑任务属性才能更改任务树的结构。 + +Redmine 具有 Gantt (甘特图)编辑器插件,但是它们已经过时(例如 [Plus Gantt][7])或专有(例如 [ANKO Gantt 图表][8])。如果您知道其他开源 Gantt 编辑器插件,请在评论中分享它们。 + +Redmine 用 Ruby 的 Rails 框架编写,可用于 Windows,Linux 和 macOS。该内核已获得 GPLv2 许可。 + + * **最适合:** 使用灵活方法的 IT 团队 + * **独特的销售主张:** 这是 OpenProject 和 EasyRedmine 的最初“上游”父项目。 + +### ]project-open[ 5.1 + +![\]project-open\[][9] + +(Frank Bergmann, [CC BY-SA 4.0][5]) + +[]project-open[][10]是一个基于 Web 的项目管理系统,它具有整个组织的透视图,类似于企业资源计划(ERP)系统。它还可以管理项目档案,预算,发票,销售,人力资源和其他功能领域。存在用于运行项目公司的专业服务自动化(PSA),用于管理企业战略项目的项目管理办公室(PMO)和用于管理部门项目的企业项目管理(EPM)的特定变体。 + +Gantt 编辑器包括按等级划分的任务,依赖关系和基于计划的工作和分配资源的计划。它不支持资源日历和非人力资源。]po[ 系统非常复杂,GUI 可能需要刷新。 + +]project-open[ 用 TCL 和 JavaScript 编写,可用于 Windows 和 Linux。 ]po[ 核心已获得 GPLv2 许可,并具有适用于大公司的专有扩展。 + + * **最适合:** 需要大量财务项目报告的中大型项目组织 + * **独特的销售主张:** ]po[ 是运行整个项目公司或部门的集成系统。 + + +### ProjectLibre 1.9.3 + +![ProjectLibre][11] + +(Frank Bergmann, [CC BY-SA 4.0][5]) + +在开源世界中,[ProjectLibre][12] 可能是最接近 Microsoft Project 的产品。它是一个桌面应用程序,支持所有重要的项目计划功能,包括资源日历,基线和成本管理。它还允许您使用 MS-Project 的文件格式导入和导出计划。 + +ProjectLibre 非常适合计划和执行中小型项目。然而,它缺少 MS-Project 中的一些高级功能,并且它的 GUI 并不是最漂亮的。 + +ProjectLibre 用 Java 编写,可用于 Windows,Linux 和macOS,并已获得开放源代码通用公共属性(CPAL)许可证。ProjectLibre 团队目前正在专有许可下开发名为 ProjectLibre Cloud 的 Web 产品。 + + * **最适合:** 个人项目经理,负责中小型项目,或者作为没有完整的 MS-Project 许可证的项目成员的查看者 + * **独特的销售主张:** 这是使用开源软件可以最接近 MS-Project。 + +### GanttProject 2.8.11 + +![GanttProject][13] + +(Frank Bergmann, [CC BY-SA 4.0][5]) + +[GanttProject][14] 与 ProjectLibre 类似,但它是桌面 Gantt (甘特图)编辑器,但功能集更为有限。 它不支持基线,也不支持非人力资源,并且报告功能受到更多限制。 + +GanttProject 是一个用 Java 编写的桌面应用程序,可在 GPLv3 许可下用于 Windows,Linux 和 macOS。 + + * **最适合:** Simple Gantt (甘特图)或学习基于 Gantt 的项目管理技术。 + * **独特的销售主张:** 它支持程序评估和审阅技术([PERT][15])图表以及使用 WebDAV 的协作。 + +### TaskJuggler 3.7.1 + +![TaskJuggler][16] + +(Frank Bergmann, [CC BY-SA 4.0][5]) + +[TaskJuggler][17]在大型组织中安排多个并行项目,重点是自动解决资源分配冲突(即资源均衡)。 + +它不是交互式的 Gantt 编辑器,而是类似于编译器的命令行工具:它从文本文件中读取任务列表,并生成一系列报告,这些报告根据分配的资源,依赖项,优先级和许多其他参数为每个任务提供最佳的开始和结束时间。它支持多个项目,基线,资源日历,班次和时区,并且已设计为可扩展到具有许多项目和资源的企业方案。 + +使用特定语法编写 TaskJuggler 输入文件可能超出了普通项目经理的能力。但是,您可以使用 ]project-open[ 作为 TaskJuggler 的图形前端来生成输入,包括缺勤,任务进度和记录的工作时间。当以这种方式使用时,TaskJuggler 成为功能强大的假设情景规划师。 + +TaskJuggler 用 Ruby 编写,并且在 GPLv2 许可下可用于 Windows,Linux 和 macOS。 + + * **最适合:** 由真正的书呆子管理的中大型部门 + * **独特的销售主张:** 它在自动资源均衡方面表现出色。 + +### ProjeQtOr 9.0.4 + +![ProjeQtOr][18] + +(Frank Bergmann, [CC BY-SA 4.0][5]) + +[ProjeQtOr][19] 是适用于 IT 项目的基于 Web 的项目管理应用程序。除项目,工单和活动外,它还支持风险,预算,可交付成果和财务文件,以将项目管理的许多方面集成到单个系统中。 + +ProjeQtOr 为 Gantt 编辑器提供了与 ProjectLibre 类似的功能集,包括按等级划分的任务,依赖关系以及基于计划工作和分配资源。但是,它不支持值的就地编辑(例如,任务名称,估计时间等);用户必须在 Gantt 视图下方的输入表单中更改值,然后保存值。 + +ProjeQtOr 用 PHP 编写,并且在 Affero GPL3 许可下可用于 Windows,Linux 和 macOS。 + + * **最适合:** IT 部门跟踪项目列表 + * **独特的销售主张:** 让您为每个项目存储大量信息,将所有信息保存在一个地方。 + +### 其他工具 + +对于特定的用例,以下系统可能是有效的选项,但由于各种原因,它们被排除在主列表之外。 + +![LIbrePlan][20] + +(Frank Bergmann, [CC BY-SA 4.0][5]) + + * [**LibrePlan**][21] 是一个基于 Web 的项目管理应用程序,致力于 Gantt 图。由于其功能集,它在上面的列表中会占主导地位,但是没有可用于最新 Linux 版本(CentOS 7 或 8)的安装。作者说,更新的说明将很快推出。 + * [**dotProject**][22] 是一个用 PHP 编写的基于 Web 的项目管理系统,可在 GPLv2.x 许可下使用。它包含一个 Gantt 时间轴报告,但是没有编辑它的选项,并且依赖项还不起作用(它们“仅部分起作用”)。 + + * [**Leantime**][23] 是一个基于 Web 的项目管理系统,具有漂亮的用 PHP 编写的 GUI,并且可以在 GPLv2 许可下使用。它包括用于时间表的没有依赖关系 Gantt 时间线。 + * [**Orangescrum**][24] 是基于 Web 的项目管理工具。Gantt 图可以作为付费附件或付费订阅使用。 + * [**Talaia/OpenPPM**][25] 是一个基于 Web 的项目组合管理系统。但是,版本 4.6.1 仍显示“即将推出:交互式 Gantt 图”。 + * [**Odoo**][26] 和 [**OpenProject**][27]都将某些重要功能限制在付费企业版中。 + +在这篇评论中,目的是包括所有带有 Gantt 编辑器和依赖调度的开源项目管理系统。如果我错过了一个项目或歪曲了一些东西,请在评论中让我知道。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/open-source-project-management + +作者:[Frank Bergmann][a] +选题:[lujun9972][b] +译者:[stevenzdg988](https://github.com/stevenzdg988) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/fraber +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/kanban_trello_organize_teams_520.png?itok=ObNjCpxt (Kanban-style organization action) +[2]: https://en.wikipedia.org/wiki/Gantt_chart +[3]: https://opensource.com/article/20/3/agiles-vs-waterfall +[4]: https://opensource.com/sites/default/files/uploads/redmine.png (Redmine) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: https://www.redmine.org/ +[7]: https://redmine.org/plugins/plus_gantt +[8]: https://www.redmine.org/plugins/anko_gantt_chart +[9]: https://opensource.com/sites/default/files/uploads/project-open.png (]project-open[) +[10]: https://www.project-open.com +[11]: https://opensource.com/sites/default/files/uploads/projectlibre.png (ProjectLibre) +[12]: http://www.projectlibre.org +[13]: https://opensource.com/sites/default/files/uploads/ganttproject.png (GanttProject) +[14]: https://www.ganttproject.biz +[15]: https://en.wikipedia.org/wiki/Program_evaluation_and_review_technique +[16]: https://opensource.com/sites/default/files/uploads/taskjuggler.png (TaskJuggler) +[17]: https://taskjuggler.org/ +[18]: https://opensource.com/sites/default/files/uploads/projeqtor.png (ProjeQtOr) +[19]: https://www.projeqtor.org +[20]: https://opensource.com/sites/default/files/uploads/libreplan.png (LIbrePlan) +[21]: https://www.libreplan.dev/ +[22]: https://dotproject.net/ +[23]: https://leantime.io +[24]: https://orangescrum.org/ +[25]: http://en.talaia-openppm.com/ +[26]: https://odoo.com +[27]: http://openproject.org From ea27d0be0053ddeab624e2cd4a50d2745b3a7075 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 25 Apr 2021 08:46:30 +0800 Subject: [PATCH 807/818] translating --- ...e Partitions in Linux -Beginner-s Guide.md | 134 ------------------ ...e Partitions in Linux -Beginner-s Guide.md | 134 ++++++++++++++++++ 2 files changed, 134 insertions(+), 134 deletions(-) delete mode 100644 sources/tech/20210421 How to Delete Partitions in Linux -Beginner-s Guide.md create mode 100644 translated/tech/20210421 How to Delete Partitions in Linux -Beginner-s Guide.md diff --git a/sources/tech/20210421 How to Delete Partitions in Linux -Beginner-s Guide.md b/sources/tech/20210421 How to Delete Partitions in Linux -Beginner-s Guide.md deleted file mode 100644 index f38599901c..0000000000 --- a/sources/tech/20210421 How to Delete Partitions in Linux -Beginner-s Guide.md +++ /dev/null @@ -1,134 +0,0 @@ -[#]: subject: (How to Delete Partitions in Linux [Beginner’s Guide]) -[#]: via: (https://itsfoss.com/delete-partition-linux/) -[#]: author: (Chris Patrick Carias Stas https://itsfoss.com/author/chris/) -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -How to Delete Partitions in Linux [Beginner’s Guide] -====== - -Managing partitions is serious business, especially when you have to remove them. I find myself doing this frequently, especially after using thumb drives as live disks and Linux installers because they create several partitions that I won’t need afterwards. - -In this tutorial, I will show you how to remove partitions in Linux using both command line and GUI tools. - - * [Delete partition in Linux with GUI tool like GParted][1] - * [Delete partition using Linux commands][2] - - - -Warning! - -You delete the partition, you lose your data. Whenever you are playing with partitions, make sure backup your data. A slight typo or slip of finger could prove costly. Don’t say we didn’t warn you! - -### Remove disk partition using GParted [GUI Method] - -As a desktop Linux user, you probably will be more comfortable and perhaps safer with a GUI-based tool. - -There are [several tools that let you manage partitions on Linux][3]. Depending on your distribution you will have one or even more such tool already installed on your system. - -For this tutorial, I am going to use [GParted][4]. It is a popular open source tool and it’s very easy and intuitive to use. - -The first step is [installing GParted][5] if it isn’t already in your system. You should be able to find it in the software center of your distribution. - -![][6] - -Alternatively, you can use your distribution’s package manager for installing it. In Debian and Ubuntu-based Linux distributions, you can [use the apt install command][7]: - -``` -sudo apt install gparted -``` - -Once installed, let’s open **GParted**. Since you are dealing with disk partitions, you’ll be required to have root access. It will ask for authentication and once it opens you should see a window like this one: - -![][8] - -On the right-upper corner you can select the disk and in the lower screen the partition you want to remove. - -Next, select the option **Delete** from the Partition menu: - -![][9] - -The process is incomplete until you rewrite the partition table. This is a safety measure and it gives you the option to review the changes before confirming it. - -To do this just click on the **Apply All Operations** button located in the toolbar and then **Apply** when asked for confirmation. - -![][10] - -After hitting **Apply**, you will see a progress bar and a results message saying that all the operations were successful. You can close the message and the main window and consider your partition completely deleted from our disk. - -Now that you are aware of the GUI method, let’s move on to the command line. - -### Delete partitions using fdisk command - -Almost every Linux distribution comes with [fdisk][11] by default and we are going to use this tool today. The first thing you need to know is what device is assigned to the disk with the partitions you want to remove. To do that, type the following in the terminal: - -``` -sudo fdisk --list -``` - -This will print all the drives and partitions in our system as well as the assigned devices. You [need to have root access][12] in order for it work. - -In this example, I will work with a USB drive that contains two partitions as shown below: - -![][13] - -The device assigned in the system is /sdb and it has two partitions, sdb1 and sdb2. Now that you identified which device contains the partitions, you can start working on it by using `fdisk` and the path to the device: - -``` -sudo fdisk /dev/sdb -``` - -This will start `fdisk` in command mode. You can always press `m` to see a list of options. - -Next, type `p` and press `Enter` to view the partition information and confirm that you are using the right device. If the wrong device is in use you can use the `q` command to exit `fdisk` and start the procedure again. - -Now enter `d` to delete a partition and it will immediately ask for the partition number, that corresponds to the number listed in the Device column, which in this case are numbers 1 and 2 (as can be seen in the screen capture below) but can and will vary according to the current partition table. - -![][14] - -Let’s remove the second partition by typing `2` and pressing `Enter`. You should see a message saying **“Partition 2 has been deleted**“, but actually, it hasn’t been removed yet. `fdisk` needs one more step to rewrite the partition table and apply the changes. Safety net, you see. - -You need to type `w` and press `Enter` to make the changes permanent. No confirmation is asked. - -After this, you should receive some feedback like the one here: - -![][15] - -Now, use `sudo fdisk --list /dev/sdb` to view the current partition table of the device and you can see that the second partition is completely gone. You are done removing your partition using the terminal and `fdisk` command. Success! - -#### Wrapping up - -And so I end this tutorial on how to remove partitions in Linux using both the terminal and GUI tools. Remember, stay always on the safe side, backup your files before manipulating your partitions and double check that you are using the right device. Deleting a partition will delete everything in it with little to no chance of [recovering][16] it. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/delete-partition-linux/ - -作者:[Chris Patrick Carias Stas][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/chris/ -[b]: https://github.com/lujun9972 -[1]: tmp.Q615QYIwTl#gparted -[2]: tmp.Q615QYIwTl#fdisk -[3]: https://itsfoss.com/partition-managers-linux/ -[4]: https://gparted.org/index.php -[5]: https://itsfoss.com/gparted/ -[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/gparted-ubuntu-software-center.png?resize=800%2C348&ssl=1 -[7]: https://itsfoss.com/apt-command-guide/ -[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/removing-partitions-linux-004.png?resize=800%2C542&ssl=1 -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/removing-partitions-linux-005.png?resize=800%2C540&ssl=1 -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/removing-partitions-linux-006.png?resize=800%2C543&ssl=1 -[11]: https://man7.org/linux/man-pages/man8/fdisk.8.html -[12]: https://itsfoss.com/root-user-ubuntu/ -[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/removing-partitions-linux-001.png?resize=800%2C255&ssl=1 -[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/removing-partitions-linux-002.png?resize=800%2C362&ssl=1 -[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/removing-partitions-linux-003.png?resize=800%2C153&ssl=1 -[16]: https://itsfoss.com/recover-deleted-files-linux/ diff --git a/translated/tech/20210421 How to Delete Partitions in Linux -Beginner-s Guide.md b/translated/tech/20210421 How to Delete Partitions in Linux -Beginner-s Guide.md new file mode 100644 index 0000000000..a97eaefd87 --- /dev/null +++ b/translated/tech/20210421 How to Delete Partitions in Linux -Beginner-s Guide.md @@ -0,0 +1,134 @@ +[#]: subject: (How to Delete Partitions in Linux [Beginner’s Guide]) +[#]: via: (https://itsfoss.com/delete-partition-linux/) +[#]: author: (Chris Patrick Carias Stas https://itsfoss.com/author/chris/) +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +如何在 Linux 中删除分区(初学者指南) +====== + +管理分区是一件严肃的事情,尤其是当你不得不删除它们时。我发现自己经常这样做,特别是在使用 U 盘作为实时磁盘和 Linux 安装程序之后,因为它们创建了几个我以后不需要的分区。 + +在本教程中,我将告诉你如何使用命令行和 GUI 工具在 Linux 中删除分区。 + + * [用 GParted 等 GUI 工具删除 Linux 中的分区][1] + * [使用 Linux 命令删除分区][2] + + + +警告! + +你删除了分区,就会失去你的数据。无论何时,当你在操作分区时,一定要备份你的数据。一个轻微的打字错误或手滑都可能是昂贵的。不要说我们没有警告你! + +### 使用 GParted 删除磁盘分区 (GUI 方法) + +作为一个桌面 Linux 用户,你可能会对基于 GUI 的工具感到更舒服,也许更安全。 + +有[几个让你在 Linux 上管理分区的工具][3]。根据你的发行版,你的系统上已经安装了一个甚至多个这样的工具。 + +在本教程中,我将使用 [GParted][4]。它是一个流行的开源工具,使用起来非常简单和直观。 + +第一步是[安装 GParted][5],如果它还没有在你的系统中。你应该能够在你的发行版的软件中心找到它。 + +![][6] + +或者,你也可以使用你的发行版的软件包管理器来安装它。在基于 Debian 和 Ubuntu 的 Linux 发行版中,你可以[使用 apt install 命令][7]: + +``` +sudo apt install gparted +``` + +安装完毕后,让我们打开 **GParted**。由于你正在处理磁盘分区,你需要有 root 权限。它将要求进行认证,打开后,你应该看到一个类似这样的窗口: + +![][8] + +在右上角,你可以选择磁盘,在下面选择你想删除的分区。 + +接下来,从分区菜单中选择 **Delete** 选项: + +![][9] + +这个过程是不完整的,直到你重写分区表。这是一项安全措施,它让你在确认之前可以选择审查更改。 + +要完成它,只需点击位于工具栏中的 **Apply All Operations** 按钮,然后在要求确认时点击 **Apply**。 + +![][10] + +点击 **Apply** 后,你会看到一个进度条和一个结果消息说所有的操作都成功了。你可以关闭该信息和主窗口,并认为你的分区已从磁盘中完全删除。 + +现在你已经知道了 GUI 的方法,让我们继续使用命令行。 + +### 使用 fdisk 命令删除分区 + +几乎每个 Linux 发行版都默认带有 [fdisk][11],我们今天就来使用这个工具。你需要知道的第一件事是,你想删除的分区被分配到哪个设备上了。为此,在终端输入以下内容: + +``` +sudo fdisk --list +``` + +这将打印出我们系统中所有的驱动器和分区,以及分配的设备。你[需要有 root 权限][12],以便让它发挥作用。 + +在本例中,我将使用一个包含两个分区的 USB 驱动器,如下图所示: + +![][13] + +系统中分配的设备是 /sdb,它有两个分区,sdb1 和 sdb2。现在你已经确定了哪个设备包含这些分区,你可以通过使用 `fdisk` 和设备的路径开始操作: + +``` +sudo fdisk /dev/sdb +``` + +这将在命令模式下启动 `fdisk`。你可以随时按 `m` 来查看选项列表。 + +接下来,输入 `p`,然后按`回车`查看分区信息,并确认你正在使用正确的设备。如果使用了错误的设备,你可以使用 `q` 命令退出 `fdisk` 并重新开始。 + +现在输入 `d` 来删除一个分区,它将立即询问分区编号,这与 “Device” 列中列出的编号相对应,在这个例子中是 1 和 2(在下面的截图中可以看到),但是可以也会根据当前的分区表而有所不同。 + +![][14] + +让我们通过输入 `2` 并按下`回车`来删除第二个分区。你应该看到一条信息:**“Partition 2 has been deleted”**,但实际上,它还没有被删除。`fdisk` 还需要一个步骤来重写分区表并应用这些变化。你看,这就是完全网。 + +你需要输入 `w`,然后按`回车`来使这些改变成为永久性的。没有再要求确认。 + +在这之后,你应该看到下面这样的反馈: + +![][15] + +现在,使用 `sudo fdisk --list /dev/sdb` 查看该设备的当前分区表,你可以看到第二个分区已经完全消失。你已经完成了使用终端和 `fdisk` 命令来删除你的分区。成功了! + +#### 总结 + +这样,我结束了这个关于如何使用终端和 GUI 工具在 Linux 中删除分区的教程。记住,要始终保持安全,在操作分区之前备份你的文件,并仔细检查你是否使用了正确的设备。删除一个分区将删除其中的所有内容,而几乎没有[恢复][16]的机会。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/delete-partition-linux/ + +作者:[Chris Patrick Carias Stas][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://itsfoss.com/author/chris/ +[b]: https://github.com/lujun9972 +[1]: tmp.Q615QYIwTl#gparted +[2]: tmp.Q615QYIwTl#fdisk +[3]: https://itsfoss.com/partition-managers-linux/ +[4]: https://gparted.org/index.php +[5]: https://itsfoss.com/gparted/ +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/gparted-ubuntu-software-center.png?resize=800%2C348&ssl=1 +[7]: https://itsfoss.com/apt-command-guide/ +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/removing-partitions-linux-004.png?resize=800%2C542&ssl=1 +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/removing-partitions-linux-005.png?resize=800%2C540&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/removing-partitions-linux-006.png?resize=800%2C543&ssl=1 +[11]: https://man7.org/linux/man-pages/man8/fdisk.8.html +[12]: https://itsfoss.com/root-user-ubuntu/ +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/removing-partitions-linux-001.png?resize=800%2C255&ssl=1 +[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/removing-partitions-linux-002.png?resize=800%2C362&ssl=1 +[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/removing-partitions-linux-003.png?resize=800%2C153&ssl=1 +[16]: https://itsfoss.com/recover-deleted-files-linux/ From bd934840ee17e7fc37ea35345ef73db4ccd3c2a3 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 25 Apr 2021 08:58:49 +0800 Subject: [PATCH 808/818] translating --- sources/tech/20210422 Restore an old MacBook with Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210422 Restore an old MacBook with Linux.md b/sources/tech/20210422 Restore an old MacBook with Linux.md index e83554ad66..381613d79c 100644 --- a/sources/tech/20210422 Restore an old MacBook with Linux.md +++ b/sources/tech/20210422 Restore an old MacBook with Linux.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/4/restore-macbook-linux) [#]: author: (Don Watkins https://opensource.com/users/don-watkins) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 7c0425d94d9f9540b6675291329964129319773a Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 25 Apr 2021 10:07:49 +0800 Subject: [PATCH 809/818] Rename sources/news/20210424 Can We Recommend Linux for Gaming in 2021.md to sources/talk/20210424 Can We Recommend Linux for Gaming in 2021.md --- .../20210424 Can We Recommend Linux for Gaming in 2021.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{news => talk}/20210424 Can We Recommend Linux for Gaming in 2021.md (100%) diff --git a/sources/news/20210424 Can We Recommend Linux for Gaming in 2021.md b/sources/talk/20210424 Can We Recommend Linux for Gaming in 2021.md similarity index 100% rename from sources/news/20210424 Can We Recommend Linux for Gaming in 2021.md rename to sources/talk/20210424 Can We Recommend Linux for Gaming in 2021.md From 515a5630a37e937089706efe573f34bc205db7c8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 25 Apr 2021 10:34:13 +0800 Subject: [PATCH 810/818] PRF @Kevin3599 --- ...n Arch is a Step in the Right Direction.md | 83 +++++++------------ 1 file changed, 32 insertions(+), 51 deletions(-) diff --git a/translated/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md b/translated/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md index 71fbbdea3a..7bcbfa63f7 100644 --- a/translated/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md +++ b/translated/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md @@ -2,72 +2,59 @@ [#]: via: (https://news.itsfoss.com/arch-new-guided-installer/) [#]: author: (Jacob Crume https://news.itsfoss.com/author/jacob/) [#]: collector: (lujun9972) -[#]: translator: (Kevin3599 ) -[#]: reviewer: ( ) +[#]: translator: (Kevin3599) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) -Arch Linux中的引导式安装程序是迈向正确的一步 +Arch Linux 中的引导式安装程序是迈向正确的一步 ====== -20年来,Arch Linux为用户提供了完全定制和独特的系统的权限。多年来,它以牺牲用户友好性为代价赢得了在定制方面独有的声誉。 +> 在 Arch ISO 中加入一个可选的引导式安装程序,对新手和高级用户都有好处。 -作为滚动发行版本,Arch Linux不提供任何固定发行版本,而是每月更新一次。但是,如果您在最近几周下载了Arch Linux,那么您很可能已经注意到了一个新的附加功能:archinstall。它使Arch Linux更加易于安装。 +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/04/arch-linux-opinion.png?w=1200&ssl=1) + +20 年来,Arch Linux 为用户提供了一个完全定制、独特的系统。这些年来,它以牺牲用户友好性为代价,赢得了在定制方面独有的声誉。 + +作为滚动发行版本,Arch Linux 不提供任何固定发行版本,而是每月更新一次。但是,如果你在最近几周下载了 Arch Linux,那么你很可能已经注意到了一个新的附加功能:archinstall。它使 Arch Linux 更加易于安装。 ![][3] -今天,我将探讨archinstall 的发布对未来的Arch Linux项目和发行版意味着什么。 +今天,我将探讨 archinstall 的发布对未来的 Arch Linux 项目和发行版意味着什么。 + +### Arch Linux 新的发展方向? -### Arch Linux新的发展方向? ![][4] -尽管很多人对此感到惊讶,但默认情况下包含官方安装程序实际上是非常明智的举动。这意味着ArchLinux的发展方向发生变化,即在保留使其知名的定制性和用户独特性的同时更加侧重用户的易用性。 +尽管很多人对此感到惊讶,但默认情况下包含官方安装程序实际上是非常明智的举动。这意味着 Arch Linux 的发展方向发生变化,即在保留使其知名的定制性同时更加侧重用户的易用性。 -在该安装程式的GitHub页面上有这样的描述: +在该安装程序的 GitHub 页面上有这样的描述: -> “引导性安装程式会给用户提供一个友好的安装方式,但是关键在于这个安装程式是选择性的,它是可选的并且永远不会强迫用户使用其进行安装。” +> “引导性安装程序会给用户提供一个友好的逐步安装方式,但是关键在于这个安装程序是个选项,它是可选的,绝不会强迫用户使用其进行安装。” -这意味着新的安装程式不会影响高级的进阶用户,同时也使得其可以向更广泛的受众开放,在这一改动所带来的许多优点之中,一个显著的优点即是:更广泛的用户。 +这意味着新的安装程序不会影响高级用户,同时也使得其可以向更广泛的受众开放,在这一改动所带来的许多优点之中,一个显著的优点即是:更广泛的用户。 -更多的用户意味着更多的项目,不管其是通过网络捐赠或在Arch Linux下的开发,通过这些项目贡献,不管是新用户还是有经验的用户的使用体验都会得到提升。 +更多的用户意味着对项目的更多支持,不管其是通过网络捐赠或参与 Arch Linux 的开发,随着这些项目贡献的增加,不管是新用户还是有经验的用户的使用体验都会得到提升。 -### “这必然要发生” +### 这必然要发生 -回顾过去,我们可以看到安装介质的许多新增功能对新用户有所帮助。这些示例包括pacstrap(安装基本系统的工具)和反射器(查找最佳pacman镜像的工具)。 +回顾过去,我们可以看到安装介质增加了许多对新用户有所帮助的功能。这些示例包括 pacstrap(一个安装基本系统的工具)和 reflector(查找最佳 pacman 镜像的工具)。 -另外,多年来,用户一直在追求使用脚本安装的方法,新安装程序允许了用户使用安装脚本。同时能够使用Python编写脚本,这使管理员的部署更加容易,这使其成为非常有吸引力的选择。更多可定制性(以某种方式?) +另外,多年来,用户一直在追求使用脚本安装的方法,新安装程序允许了用户使用安装脚本。它能够使用 Python 编写脚本,这使得管理员的部署更加容易,成为一个非常有吸引力的选择。 -尽管这看上去可能有些反直觉,但是这个安装程式很可能能够增进Arch Linux的可定制性。当前,Arch定制性的最大瓶颈是用户的技术水平,而这一问题能够通过archinstall解决。 +### 更多可定制性(以某种方式?) -通过由ArchLinux提供的安装程序,用户不需要掌握创建完美开发环境的技巧,安装程序可以帮助用户完成这些工作,这提供了广泛的自定义选项,是普通用户难以实现的。 +尽管这看上去可能有些反直觉,但是这个安装程序实际上能够增进 Arch Linux 的可定制性。当前,Arch Linux 定制性的最大瓶颈是用户的技术水平,而这一问题能够通过 archinstall 解决。 -###思想总结 +有了新的安装程序,用户不需要掌握创建完美开发环境的技巧,安装程序可以帮助用户完成这些工作,这提供了广泛的自定义选项,是普通用户难以实现的。 -有了这一新功能,Arch Linux似乎正在向着“用户友好”这一软件设计哲学靠近,新安装程序为新手和高级用户提供了广泛的好处。其中包括更广泛的定制性和更大的用户社区。 +### 总结 -总而言之,这个新变动对整个ArchLinux社区都会产生积极的影响。 - -你对这个Arch Linux安装程式怎么看?是否已经尝试过它了呢? - -### - -![][7] -我不感兴趣 - -#### 关联 - - * 通过最新的ISO刷新中的更改,现在更容易安装Arch Linux - * ![][8] ![][9] - - - * EndeavourOS的2021年第一个版本带来了Linux内核5.10 LTS,Xfce 4.16等[10] - * ![][8] ![][11] - - - * Linux Kernel 5.9终止了生命。这就是您现在应该做的! - * ![][8] ![Linux kernel 5.9 reached end of life][13] +有了这一新功能,Arch Linux 似乎正在向着“用户友好”这一软件设计哲学靠近,新安装程序为新手和高级用户提供了广泛的好处。其中包括更广泛的定制性和更大的用户社区。 +总而言之,这个新变动对整个 Arch Linux 社区都会产生积极的影响。 +你对这个 Arch Linux 安装程序怎么看?是否已经尝试过它了呢? -------------------------------------------------------------------------------- @@ -75,8 +62,8 @@ via: https://news.itsfoss.com/arch-new-guided-installer/ 作者:[Jacob Crume][a] 选题:[lujun9972][b] -译者:[Kevin3599](https://github.com/) -校对:[校对者ID](https://github.com/校对者ID) +译者:[Kevin3599](https://github.com/Kevin3599) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -84,14 +71,8 @@ via: https://news.itsfoss.com/arch-new-guided-installer/ [b]: https://github.com/lujun9972 [1]: https://itsfoss.com/rolling-release/ [2]: https://news.itsfoss.com/arch-linux-easy-install/ -[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzQxMScgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= -[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzM3MScgd2lkdGg9JzM3MScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= +[3]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/04/arch-install-tool.png?resize=780%2C411&ssl=1 +[4]: https://i0.wp.com/github.com/archlinux/archinstall/raw/master/docs/logo.png?resize=371%2C371&ssl=1 [5]: https://man.archlinux.org/man/pacstrap.8 [6]: https://wiki.archlinux.org/index.php/Reflector -[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzI1MCcgd2lkdGg9Jzc1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= -[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzIwMCcgd2lkdGg9JzM1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= -[9]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/04/arch-linux-easy-install-feat.png?fit=1200%2C675&ssl=1&resize=350%2C200 -[10]: https://news.itsfoss.com/endeavouros-2021-release/ -[11]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/02/endeavouros-2021-ft.jpg?fit=1200%2C675&ssl=1&resize=350%2C200 -[12]: https://news.itsfoss.com/kernel-5-9-end-of-life/ -[13]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2020/12/linux-kerne-5-9-eol.png?fit=1200%2C675&ssl=1&resize=350%2C200 + From 05b4e8f769d25be4704a9fcc99f834b3a482c5d7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 25 Apr 2021 10:36:28 +0800 Subject: [PATCH 811/818] PUB @Kevin3599 https://linux.cn/article-13328-1.html --- ...ided Installer in Arch is a Step in the Right Direction.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/news => published}/20210420 The Guided Installer in Arch is a Step in the Right Direction.md (98%) diff --git a/translated/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md b/published/20210420 The Guided Installer in Arch is a Step in the Right Direction.md similarity index 98% rename from translated/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md rename to published/20210420 The Guided Installer in Arch is a Step in the Right Direction.md index 7bcbfa63f7..3a6cc82345 100644 --- a/translated/news/20210420 The Guided Installer in Arch is a Step in the Right Direction.md +++ b/published/20210420 The Guided Installer in Arch is a Step in the Right Direction.md @@ -4,8 +4,8 @@ [#]: collector: (lujun9972) [#]: translator: (Kevin3599) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13328-1.html) Arch Linux 中的引导式安装程序是迈向正确的一步 ====== From e20120adea439d58fcfda7797d9bcfaacc7a9f17 Mon Sep 17 00:00:00 2001 From: stevenzdg988 <3442417@qq.com> Date: Sun, 25 Apr 2021 14:31:57 +0800 Subject: [PATCH 812/818] =?UTF-8?q?=E7=94=B3=E9=A2=86=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...prove your productivity with this Linux automation tool.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20210203 Improve your productivity with this Linux automation tool.md b/sources/tech/20210203 Improve your productivity with this Linux automation tool.md index 9bd1ea3953..86457a2e54 100644 --- a/sources/tech/20210203 Improve your productivity with this Linux automation tool.md +++ b/sources/tech/20210203 Improve your productivity with this Linux automation tool.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (stevenzdg988) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -167,7 +167,7 @@ via: https://opensource.com/article/21/2/linux-autokey 作者:[Matt Bargenquast][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[stevenzdg988](https://github.com/stevenzdg988) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From b21dc4b3d13f1b1cfb49051c38cda0b4af5efed1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 25 Apr 2021 17:41:31 +0800 Subject: [PATCH 813/818] PRF @stevenzdg988 --- ...at You Can Deploy on Your Linux Servers.md | 151 ++++++++---------- 1 file changed, 69 insertions(+), 82 deletions(-) diff --git a/translated/tech/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md b/translated/tech/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md index 8d397b2c9b..1aadf08382 100644 --- a/translated/tech/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md +++ b/translated/tech/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md @@ -1,24 +1,24 @@ [#]: collector: (lujun9972) [#]: translator: (stevenzdg988) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (9 Open Source Forum Software That You Can Deploy on Your Linux Servers) [#]: via: (https://itsfoss.com/open-source-forum-software/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) -9 个可以在 Linux 服务器上部署的开源论坛软件 +11 个可以部署在 Linux 服务器上的开源论坛软件 ====== -_**是否想要建立社区论坛或客户支持门户站点?以下是一些可以在服务器上部署的最佳开源论坛软件。**_ +> 是否想要建立社区论坛或客户支持门户站点?以下是一些可以在服务器上部署的最佳开源论坛软件。 -就像我们的 [FOSS 社区][1]论坛一样,重要的是随时建立一个让志趣相投的人可以讨论,互动和寻求支持的平台。 +就像我们的论坛一样,重要的是建立一个让志趣相投的人可以讨论,互动和寻求支持的平台。 -论坛为用户(或客户)提供了一个满足他们大部分在 Internet(互联网)上不容易找到的东西(软件)的空间。 +论坛为用户(或客户)提供了一个空间,让他们可以接触到在互联网上大多数情况下不容易找到的东西。 -如果您是一家企业,则可以聘请开发人员团队并按照自己的方式建立自己的论坛,但这会增加大量预算。 +如果你是一家企业,则可以聘请开发人员团队并按照自己的方式建立自己的论坛,但这会增加大量预算。 -幸运的是,您可以在服务器上部署多种出色的开源论坛软件,而且一切顺利!在此过程中,您将节省很多钱,但仍能获得所需的东西(软件)。 +幸运的是,有几个令人印象深刻的开源论坛软件,你只需要将其部署在你的服务器上就万事大吉了!在此过程中,你将节省很多钱,但仍能获得所需的东西。 在这里,我列出了可以在 Linux 服务器上安装的最佳开源论坛软件列表。 @@ -26,152 +26,139 @@ _**是否想要建立社区论坛或客户支持门户站点?以下是一些 ![][2] -如果您尚未建立过网站,则在部署论坛之前,可能需要看一下[某些开源网站创建工具][3]。 +如果你尚未建立过网站,则在部署论坛之前,可能需要看一下 [某些开源网站创建工具][3]。 -_**注意:** 列表没有特定的排名顺序。_ +**注意:** 此列表没有特定的排名顺序。 -#### 1\. Discourse (现代和流行) +#### 1、Discourse(现代、流行) ![][4] -Discourse 是人们用来部署配置讨论平台的最流行的现代论坛软件。实际上,我们的[FOSS 社区][1]论坛使用了 Discourse 平台。 +[Discourse][7] 是人们用来部署配置讨论平台的最流行的现代论坛软件。实际上,[It's FOSS 社区][1] 论坛使用了 Discourse 平台。 -它提供了我所知道的大多数基本功能,包括电子邮件通知,审核工具,样式自定义选项,像 Slack/WordPress 的第三方集成,甚至更多。 +它提供了我所知道的大多数基本功能,包括电子邮件通知、审核工具、样式自定义选项,Slack/WordPress 等第三方集成等等。 -它是完全免费的自我托管,您也可以在 [GitHub][5]上找到该项目。如果您要减少将其部署在自托管服务器上的麻烦,可以决定选择 [Discourse 提供的自托管服务][6](肯定会很昂贵)。 +它的自托管是完全免费的,你也可以在 [GitHub][5] 上找到该项目。如果你要减少将其部署在自托管服务器上的麻烦,可以选择 [Discourse 提供的托管服务][6](肯定会很昂贵)。 -[Discourse][7] - -#### 2\. Talkyard (来自 Discourse 和 StackOverflow 的灵感) +#### 2、Talkyard(受 Discourse 和 StackOverflow 启发) ![][8] -Talkyard 是完全免费使用的开源项目。它看起来很像“ Discourse ”,但是如果您对其进行检查,则会有区别。 +[Talkyard][10] 是完全免费使用的,是一个开源项目。它看起来很像 Discourse,但是如果你深入了解一下,还是有区别的。 -您可以在这从 StackOverflow 获得大多数关键功能,以及在论坛平台上期望得到的所有基本功能。它可能不是一个流行的论坛解决方案,但是如果您想要类似于 Discourse 的功能以及一些有趣的功能,那么值得尝试一下。 +你可以在这里获得 StackOverflow 的大多数关键功能,以及在论坛平台上期望得到的所有基本功能。它可能不是一个流行的论坛解决方案,但是如果你想要类似于 Discourse 的功能以及一些有趣的功能,那么值得尝试一下。 -您可以在他们的 [GitHub 页面][9] 中进一步了解它。 +你可以在他们的 [GitHub 页面][9] 中进一步了解它。 -[Talkyard][10] +#### 3、Forem (一种独特的社区平台,正在测试中) -#### 3\. NodeBB (现代且功能齐全) +![](https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/12/dev-community-forem.png?w=800&ssl=1) + +你可能以前没有听说过 [Forem](https://www.forem.com/),但它支持了 [dev.to](https://dev.to/)(这是一个越来越受欢迎的开发者社区网站)。 + +它仍然处于测试阶段,所以你或许不会选择在生产服务器上实验。但是,你可以通过在他们的官方网站上填写一个表格并与他们取得联系,让他们为你托管。 + +尽管没有官方的功能列表来强调所有的东西,但如果我们以 [dev.to](https://dev.to/) 为例,你会得到许多基本的特性和功能,如社区列表、商店、帖子格式化等。你可以在他们的 [公告帖子](https://dev.to/devteam/for-empowering-community-2k6h) 中阅读更多关于它提供的内容,并在 [GitHub](https://github.com/forem/forem) 上探索该项目。 + +#### 4、NodeBB(现代化、功能齐全) ![][11] -NodeBB 是基于[Node.js][12]的开源论坛软件。它的目标是简单,简洁和快速。首先,它面向可用的托管计划的组织和企业。但是,您也可以选择自己托管它。 +[NodeBB][14] 是一个基于 [Node.js][12] 的开源论坛软件。它的目标是简单、优雅和快速。首先,它面向有托管计划的组织和企业。但是,你也可以选择自己托管它。 -您还可以获得具有聊天和通知支持的实时本地分析功能。它还提供一个 API 将其与现有产品中的任何一个集成。它还支持审核工具和打击垃圾邮件的工具。 +你还可以获得实时本地分析功能,以及聊天和通知支持。它还提供一个 API,可以将其与你的现有产品集成。它还支持审核工具和打击垃圾邮件的工具。 -您可以获得一些立即可用的第三方集成支持,例如 WordPress,Mailchimp 等。 +你可以获得一些开箱即用的第三方集成支持,例如 WordPress、Mailchimp 等。 -请在它们的[GitHub页面][13]或官方网站上进一步了解它。 +请在他们的 [GitHub 页面][13] 或官方网站上可以进一步了解它。 -[NodeBB][14] - -#### 4\. Vanilla 论坛(企业版) +#### 5、Vanilla 论坛(面向企业) ![][15] -Vanilla Forums 主要是一款企业版的论坛软件,具有标记平台的基本功能,为客户提供问答,还可以对帖子进行投票。 +[Vanilla 论坛][17] 主要是一款以企业为中心的论坛软件,它的基本功能是为你的平台打造品牌,为客户提供问答,还可以对帖子进行投票。 -用户体验具有现代的外观,并且已被像 EA,Adobe 和其他一些大公司使用。 +用户体验具有现代的外观,并且已被像 EA、Adobe 和其他一些大公司使用。 -当然,如果您想尝试基于云的 Vanilla 论坛(由专业团队管理)以及对某些高级功能的访问权,请随时请求演示。无论哪种情况,您都可以选择社区版,该社区版可以免费使用大多数负责自托管和管理的最新功能。 +当然,如果你想尝试基于云的 Vanilla 论坛(由专业团队管理)以及对某些高级功能的访问权,可以随时申请演示。无论哪种情况,你都可以选择社区版,该社区版可以免费使用大多数最新功能,但需要自己托管和管理。 -您可以在他们的官方网站和[GitHub 页面][16]上进一步了解它。 +你可以在他们的官方网站和 [GitHub 页面][16] 上进一步了解它。 -[Vanilla 论坛][17] - -**推荐阅读:** - -![][18] - -#### [建立在线购物网站的最佳开源电子商务平台][19] - -想要创建一个在线购物网站吗?以下是一些可以在自己的 Linux 服务器上部署的开源电子商务平台。 - -#### 5\. bbPress (来自 WordPress) +#### 6、bbPress (来自 WordPress) ![][20] -bbPress 是由 WordPress 的创建者构建的可靠论坛软件。旨在提供一个简单而活泼的论坛体验。 +[bbPress][22] 是一个可靠的论坛软件,由 WordPress 的创建者建立。旨在提供一个简单而迅速的论坛体验。 -用户界面看起来很老旧,但易于使用,并提供了您通常在论坛软件中需要的基本功能。审核工具既简单又易于设置。您可以使用可用的插件扩展功能,并从几个可用的主题中进行选择以调整论坛的外观。 +用户界面看起来很老旧,但易于使用,它提供了你通常在论坛软件中需要的基本功能。审核工具很好用,易于设置。你可以使用现有的插件扩展功能,并从几个可用的主题中进行选择以调整论坛的外观。 -如果您只想要一个没有花哨功能的简单论坛平台,bbPress 应该是完美的。您也可以查看他们的[GitHub 页面][21]了解更多信息。 +如果你只想要一个没有花哨功能的简单论坛平台,bbPress 应该是完美的。你也可以查看他们的 [GitHub 页面][21] 了解更多信息。 -[bbPress][22] - -#### 6\. phpBB (经典论坛软件) +#### 7、phpBB(经典论坛软件) ![][23] -如果您想要传统的论坛设计而只想要基本功能,则 phpBB 软件是一个不错的选择。当然,您可能无法获得最佳的用户体验或功能,但是作为传统设计论坛平台,它是实用的并且非常有效。 +如果你想要传统的论坛设计,只想要基本功能,则 [phpBB][25] 软件是一个不错的选择。当然,你可能无法获得最佳的用户体验或功能,但是作为按传统设计的论坛平台,它是实用的并且非常有效。 -尤其是,对于习惯使用传统方法的用户而言,这将是一种简单而有效的解决方案。 +尤其是,对于习惯使用传统方式的用户而言,这将是一种简单而有效的解决方案。 -不仅限于简单,而且与普通托管服务提供商一起设置起来更容易。您可以在每个共享主机平台上获得一键式安装功能,因此也不需要太多的技术知识来进行设置。 +不仅仅是简单,而且在一般的托管供应商那里,它的设置也是非常容易的。在任何共享主机平台上,你都能获得一键式安装功能,因此也不需要太多的技术知识来进行设置。 -您可以在他们的官方网站或[GitHub 页面][24]上找到更多有关它的信息。 +你可以在他们的官方网站或 [GitHub 页面][24] 上找到更多有关它的信息。 -[phpBB][25] - -#### 7\. Simple Machines 论坛(另一个经典) +#### 8、Simple Machines 论坛(另一个经典) ![][26] -与 phpBB 类似,Simple Machines (简单机器)论坛是论坛平台的另一种基本(或简单)实现。您可能无法长期(至少不容易)自定义外观,但是默认外观是干净的,并提供了良好的用户体验。 +与 phpBB 类似,[Simple Machines 论坛][27] 是另一种基本(或简单)的论坛。很大程度上你可能无法自定义外观(至少不容易),但是默认外观是干净整洁的,提供了良好的用户体验。 -就个人而言,相比 php BB 我更喜欢它,但是您可以前往他们的[官方网站][27]进行进一步的探索。同样,您可以使用一键安装方法在任何共享的托管服务上轻松安装 Simple Machines 论坛。 +就个人而言,相比 php BB 我更喜欢它,但是你可以前往他们的 [官方网站][27] 进行进一步的探索。同样,你可以使用一键安装方法在任何共享托管服务上轻松安装 Simple Machines 论坛。 -[Simple Machines 论坛][27] - -#### 8\. FluxBB (old school) +#### 9、FluxBB(古典) ![][28] -FluxBB 是另一个简单,轻量级的开源论坛。与其他的相比,它可能维护的不是非常活跃,但是如果您只想部署一个由几个用户组成的基本论坛,则可以轻松尝试一下。 +[FluxBB][30] 是另一个简单、轻量级的开源论坛。与其他的相比,它可能维护的不是非常积极,但是如果你只想部署一个只有很少几个用户的基本论坛,则可以轻松尝试一下。 -您可以在他们的官方网站和 [GitHub 页面][29]上找到更多有关它的信息。 +你可以在他们的官方网站和 [GitHub 页面][29] 上找到更多有关它的信息。 -[FluxBB][30] - -#### 9\. MyBB (不太受欢迎,但值得一看) +#### 10、MyBB(不太流行,但值得看看) ![][31] -MyBB 是一款独特的开源论坛软件,它提供多种样式,并包含您需要的基本功能。 +[MyBB][33] 是一款独特的开源论坛软件,它提供多种样式,并包含你需要的基本功能。 -从插件支持和审核工具开始,您将获得管理大型社区所需的一切。它还支持类似于 Discourse 和类似论坛软件面向个人用户的私人消息传递。 +从插件支持和审核工具开始,你将获得管理大型社区所需的一切。它还支持类似于 Discourse 和同类论坛软件面向个人用户的私人消息传递。 -它可能不是一个流行的选项,但是它可以检查大多数用例,并且完全免费。您可能获得支持并在 [GitHub][32]上探索该项目。 +它可能不是一个流行的选项,但是它可以满足大多数用例,并且完全免费。你可以在 [GitHub][32] 上得到支持和探索这个项目。 -[MyBB][33] - -#### 额外收获: Flarum (测试版) +#### 11、Flarum(测试版) ![][34] -如果您想要更简单和独特的(论坛),请看一下 Flarum。它是一款轻量级的论坛软件,旨在以移动为先,同时提供快速的体验。 +如果你想要更简单和独特的论坛,请看一下 [Flarum][37]。它是一款轻量级的论坛软件,旨在以移动为先,同时提供快速的体验。 -它支持某些第三方集成,也可以使用扩展来扩展功能。就我个人而言,它看起来很漂亮。我没有机会尝试它,您可以看一下它的[文档][35],可以肯定地认为它具有论坛所需的所有必要功能的特征。 +它支持某些第三方集成,也可以使用扩展来扩展功能。就我个人而言,它看起来很漂亮。我没有机会尝试它,你可以看一下它的 [文档][35],可以肯定它具有论坛所需的所有必要功能的特征。 -值得注意的是 Flarum 是相当新的,因此仍处于测试阶段。您可能需要先将其部署在测试服务器上测试后再应用到生产环境。请查看其 [GitHub 页面][36]了解更多详细信息。 +值得注意的是 Flarum 是相当新的,因此仍处于测试阶段。你可能需要先将其部署在测试服务器上测试后,再应用到生产环境。请查看其 [GitHub 页面][36] 了解更多详细信息。 -[Flarum][37] +#### 补充:Lemmy(更像是 Reddit 的替代品,但也是一个不错的选择) -无法自我托管?让我们来帮助您 +![](https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/12/lemmy-forum.png?w=800&ssl=1) -部署开源应用程序和管理 Linux 服务器需要专业知识和花费一些时间。如果两者都不缺,但仍然希望拥有自己的开源软件实例,我们可以为您提供帮助。 -通过我们的新项目 [High on Cloud][38],您可以在发展社区论坛的过程中将部署和服务器管理部分留给我们。 +一个用 [Rust](https://www.rust-lang.org/) 构建的 Reddit 的联盟式论坛的替代品。它的用户界面很简单,有些人可能觉得它不够直观,无法获得有吸引力的论坛体验。 + +其联盟网络仍在构建中,但如果你想要一个类似 Reddit 的社区平台,你可以很容易地将它部署在你的 Linux 服务器上,并制定好管理规则、版主,然后就可以开始了。它支持跨版发帖(参见 Reddit),以及其他基本功能,如标签、投票、用户头像等。 + +你可以通过其 [官方文档](https://lemmy.ml/docs/about.html) 和 [GitHub 页面](https://github.com/LemmyNet/lemmy) 探索更多信息。 ### 总结 -大多数开源论坛软件都为基本用例提供几乎相同的功能。如果您正在寻找特定的内容,则可能需要浏览其文档。 +大多数开源论坛软件都为基本用例提供了几乎相同的功能。如果你正在寻找特定的功能,则可能需要浏览其文档。 就个人而言,我推荐 Discourse。它很流行,外观现代,拥有大量的用户基础。 -您认为最好的开源论坛软件是什么?我是否错过了你的偏爱?在下面的评论中让我知道。 +你认为最好的开源论坛软件是什么?我是否错过了你的偏爱?在下面的评论中让我知道。 -------------------------------------------------------------------------------- @@ -180,7 +167,7 @@ via: https://itsfoss.com/open-source-forum-software/ 作者:[Ankush Das][a] 选题:[lujun9972][b] 译者:[stevenzdg988](https://github.com/stevenzdg988) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From c2cc61506fac47ce706fb6e5f13c99331ebfb4f0 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 25 Apr 2021 17:42:42 +0800 Subject: [PATCH 814/818] PUB @stevenzdg988 https://linux.cn/article-13329-1.html --- ...orum Software That You Can Deploy on Your Linux Servers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md (99%) diff --git a/translated/tech/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md b/published/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md similarity index 99% rename from translated/tech/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md rename to published/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md index 1aadf08382..74d7263544 100644 --- a/translated/tech/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md +++ b/published/20201204 9 Open Source Forum Software That You Can Deploy on Your Linux Servers.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (stevenzdg988) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13329-1.html) [#]: subject: (9 Open Source Forum Software That You Can Deploy on Your Linux Servers) [#]: via: (https://itsfoss.com/open-source-forum-software/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) From 920ce8ed57de2258d1d441dcb673f55830c16b65 Mon Sep 17 00:00:00 2001 From: RiaXu <1257021170@qq.com> Date: Sun, 25 Apr 2021 21:32:12 +0800 Subject: [PATCH 815/818] Update and rename sources/tech/20210421 Optimize your Python code with C.md to translated/tech/20210421 Optimize your Python code with C.md --- ...210421 Optimize your Python code with C.md | 208 ------------------ ...210421 Optimize your Python code with C.md | 207 +++++++++++++++++ 2 files changed, 207 insertions(+), 208 deletions(-) delete mode 100644 sources/tech/20210421 Optimize your Python code with C.md create mode 100644 translated/tech/20210421 Optimize your Python code with C.md diff --git a/sources/tech/20210421 Optimize your Python code with C.md b/sources/tech/20210421 Optimize your Python code with C.md deleted file mode 100644 index e000b1fbf0..0000000000 --- a/sources/tech/20210421 Optimize your Python code with C.md +++ /dev/null @@ -1,208 +0,0 @@ -[#]: subject: (Optimize your Python code with C) -[#]: via: (https://opensource.com/article/21/4/cython) -[#]: author: (Alan Smithee https://opensource.com/users/alansmithee) -[#]: collector: (lujun9972) -[#]: translator: (ShuyRoy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Optimize your Python code with C -====== -Cython creates C modules that speed up Python code execution, important -for complex applications where an interpreted language isn't efficient. -![Hands on a keyboard with a Python book ][1] - -Cython is a compiler for the Python programming language meant to optimize performance and form an extended Cython programming language. As an extension of Python, [Cython][2] is also a superset of the Python language, and it supports calling C functions and declaring C types on variables and class attributes. This makes it easy to wrap external C libraries, embed C into existing applications, or write C extensions for Python in syntax as easy as Python itself. - -Cython is commonly used to create C modules that speed up Python code execution. This is important in complex applications where an interpreted language isn't efficient. - -### Install Cython - -You can install Cython on Linux, BSD, Windows, or macOS using Python: - - -``` -`$ python -m pip install Cython` -``` - -Once installed, it's ready to use. - -### Transform Python into C - -A good way to start with Cython is with a simple "hello world" application. It's not the best demonstration of Cython's advantages, but it shows what happens when you're using Cython. - -First, create this simple Python script in a file called `hello.pyx` (the `.pyx` extension isn't magical and it could technically be anything, but it's Cython's default extension): - - -``` -`print("hello world")` -``` - -Next, create a Python setup script. A `setup.py` file is like Python's version of a makefile, and Cython can use it to process your Python code: - - -``` -from setuptools import setup -from Cython.Build import cythonize - -setup( -    ext_modules = cythonize("hello.pyx") -) -``` - -Finally, use Cython to transform your Python script into C code: - - -``` -`$ python setup.py build_ext --inplace` -``` - -You can see the results in your project directory. Cython's `cythonize` module transforms `hello.pyx` into a `hello.c` file and a `.so` library. The C code is 2,648 lines, so it's quite a lot more text than the single line of `hello.pyx` source. The `.so` library is also over 2,000 times larger than its source (54,000 compared to 20 bytes). Then again, Python is required to run a single Python script, so there's a lot of code propping up that single-line `hello.pyx` file. - -To use the C code version of your Python "hello world" script, open a Python prompt and import the new `hello` module you created: - - -``` ->>> import hello -hello world -``` - -### Integrate C code into Python - -A good generic test of computational power is calculating prime numbers. A prime number is a positive number greater than 1 that produces a positive integer only when divided by 1 or itself. It's simple in theory, but as numbers get larger, the calculation requirements also increase. In pure Python, it can be done in under 10 lines of code: - - -``` -import sys - -number = int(sys.argv[1]) -if not number <= 1: -    for i in range(2, number): -        if (number % i) == 0: -            print("Not prime") -            break -else: -    print("Integer must be greater than 1") -``` - -This script is silent upon success and returns a message if the number is not prime: - - -``` -$ ./prime.py 3 -$ ./prime.py 4 -Not prime. -``` - -Converting this to Cython requires a little work, partly to make the code appropriate for use as a library and partly for performance. - -#### Scripts and libraries - -Many users learn Python as a scripting language: you tell Python the steps you want it to perform, and it does the work. As you learn more about Python (and open source programming in general), you learn that much of the most powerful code out there is in the libraries that other applications can harness. The _less_ specific your code is, the more likely it can be repurposed by a programmer (you included) for other applications. It can be a little more work to decouple computation from workflow, but in the end, it's usually worth the effort. - -In the case of this simple prime number calculator, converting it to Cython begins with a setup script: - - -``` -from setuptools import setup -from Cython.Build import cythonize - -setup( -    ext_modules = cythonize("prime.py") -) -``` - -Transform your script into C: - - -``` -`$ python setup.py build_ext --inplace` -``` - -Everything appears to be working well so far, but when you attempt to import and use your new module, you get an error: - - -``` ->>> import prime -Traceback (most recent call last): -  File "<stdin>", line 1, in <module> -  File "prime.py", line 2, in init prime -    number = sys.argv[1] -IndexError: list index out of range -``` - -The problem is that a Python script expects to be run from a terminal, where arguments (in this case, an integer to test as a prime number) are common. You need to modify your script so that it can be used as a library instead. - -#### Write a library - -Libraries don't use system arguments and instead accept arguments from other code. Instead of using `sys.argv` to bring in user input, make your code a function that accepts an argument called `number` (or `num` or whatever variable name you prefer): - - -``` -def calculate(number): -    if not number <= 1: -        for i in range(2, number): -            if (number % i) == 0: -                print("Not prime") -                break -    else: -        print("Integer must be greater than 1") -``` - -This admittedly makes your script somewhat difficult to test because when you run the code in Python, the `calculate` function is never executed. However, Python programmers have devised a common, if not intuitive, workaround for this problem. When the Python interpreter executes a Python script, there's a special variable called `__name__` that gets set to `__main__`, but when it's imported as a module, `__name__` is set to the module's name. By leveraging this, you can write a library that is both a Python module and a valid Python script: - - -``` -import sys - -def calculate(number): -    if not number <= 1: -        for i in range(2, number): -            if (number % i) == 0: -                print("Not prime") -                break -    else: -        print("Integer must be greater than 1") - -if __name__ == "__main__": -    number = sys.argv[1]     -    calculate( int(number) ) -``` - -Now you can run the code as a command: - - -``` -$ python ./prime.py 4 -Not a prime -``` - -And you can convert it to Cython for use as a module: - - -``` ->>> import prime ->>> prime.calculate(4) -Not prime -``` - -### C Python - -Converting code from pure Python to C with Cython can be useful. This article demonstrates how to do that part, yet there are Cython features to help you optimize your code before conversion, options to analyze your code to find when Cython interacts with C, and much more. If you're using Python, but you're looking to enhance your code with C code or further your understanding of how libraries provide better extensibility than scripts, or if you're just curious about how Python and C can work together, then start experimenting with Cython. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/cython - -作者:[Alan Smithee][a] -选题:[lujun9972][b] -译者:[ShuyRoy](https://github.com/ShuyRoy) -校对:[校对者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/python-programming-code-keyboard.png?itok=fxiSpmnd (Hands on a keyboard with a Python book ) -[2]: https://cython.org/ diff --git a/translated/tech/20210421 Optimize your Python code with C.md b/translated/tech/20210421 Optimize your Python code with C.md new file mode 100644 index 0000000000..ded4e5abe0 --- /dev/null +++ b/translated/tech/20210421 Optimize your Python code with C.md @@ -0,0 +1,207 @@ +[#]: subject: (Optimize your Python code with C) +[#]: via: (https://opensource.com/article/21/4/cython) +[#]: author: (Alan Smithee https://opensource.com/users/alansmithee) +[#]: collector: (lujun9972) +[#]: translator: (ShuyRoy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +使用C优化你的Python代码 +====== +Cython创建了C模块来加速Python代码的执行,这对使用效率不高的解释型语言编写的复杂的应用是很重要的。 +![Hands on a keyboard with a Python book ][1] + +Cython是Python编程语言的编译器,旨在优化性能并形成一个扩展的Cython编程语言。作为Python的扩展,[Cython][2]也是Python语言的超集,它支持调用C函数和在变量和类属性上声明C类型。这使得包装外部C库、将C嵌入现有应用程序或者为Python编写C扩展语法像Python本身一样简单变得容易。 + +Cython一般用于创建C模块来加速Python代码的执行。这在使用解释型语言编写的效率不高的复杂应用中非常重要。 + +### 安装Cython + +你可以在Linux,BSD,Windows或macOS上安装Cython来使用Python + + +``` +`$ python -m pip install Cython` +``` + +安装好后,就可以使用它了。 + +### 将Python转换成C + +使用Cython的一个好的方式是从一个简单的“hello world”开始。这虽然不是Cython优点的最好的展现方式,但是它展示了使用Cython时发生的情况。 + +首先,创建一个简单的Python脚本,文件命名为`hello.pyx` (`.pyx`扩展名并不神奇,从技术上它可以是任何东西,但它是Cython的默认扩展名): + + +``` +`print("hello world")` +``` + +接下来,创建一个Python设置脚本。一个像Python的生成文件一样的`setup.py`,Cython可以使用它来处理你的Python代码: + + +``` +from setuptools import setup +from Cython.Build import cythonize + +setup( +    ext_modules = cythonize("hello.pyx") +) +``` + +最后,使用Cython将你的Python脚本转换为C代码: + + +``` +`$ python setup.py build_ext --inplace` +``` + +你可以在你的工程目录中看到结果。Cython的`cythonize`模块将`hello.pyx`转换成一个`hello.c`文件和一个`.so`库。该C代码有2648行,所以它比一个一行的`hello.pyx`源码的文本要多很多。`.so`库也比它的源码大2000倍(即54000字节和20字节相比)。然后,Python需要运行单个Python脚本,所以有很多代码支持这个只有一行的`hello.pyx`文件。 + +要使用Python的“hello world”脚本的C代码版本,请打开一个Python提示符并导入您创建的新`hello`模块: + + +``` +>>> import hello +hello world +``` + +### 将C代码集成到Python中 + +测试计算能力的一个很好的通用测试是计算质数。一个质数是一个比1大的正数,且它只有被1或它自己除后才会产生正整数。虽然理论很简单,但是随着数的变大,计算需求也会增加。在纯Python中,可以用10行以内的代码完成质数的计算。 + + +``` +import sys + +number = int(sys.argv[1]) +if not number <= 1: +    for i in range(2, number): +        if (number % i) == 0: +            print("Not prime") +            break +else: +    print("Integer must be greater than 1") +``` + +这个脚本在成功的时候是不会提醒的,如果这个数不是质数,则返回一条信息: + + +``` +$ ./prime.py 3 +$ ./prime.py 4 +Not prime. +``` + +将这些转换为Cython需要一些工作,一部分是为了使代码适合用作库,另一部分是为了提高性能。 + +#### 脚本和库 + +许多用户将Python当作一种脚本语言来学习:你告诉Python你想让它执行的步骤,然后它来做。随着你对Python(以及一般的开源编程)的了解越多,你可以了解到许多强大的代码都存在于其他应用程序可以利用的库中。你的代码越_不具有针对性_,程序员(包括你)就越可能将其重用于其他的应用程序。将计算和工作流解耦可能需要更多的工作,但最终这通常是值得的。 + + +在这个简单的质数计算的例子中,将Python转换成Cython从一个设置脚本开始: + +``` +from setuptools import setup +from Cython.Build import cythonize + +setup( +    ext_modules = cythonize("prime.py") +) +``` + +将你的脚本转换成C: + + +``` +`$ python setup.py build_ext --inplace` +``` + +到目前为止,一切似乎都工作的很好,但是当你试图导入并使用新模块时,你会看到一个错误: + + +``` +>>> import prime +Traceback (most recent call last): +  File "<stdin>", line 1, in <module> +  File "prime.py", line 2, in init prime +    number = sys.argv[1] +IndexError: list index out of range +``` + +这个问题是Python脚本希望从一个终端运行,其中参数(在这个例子中是要测试是否为质数的整数)是一样的。你需要修改你的脚本这样它就可以作为一个库来使用了。 + +#### 写一个库 + +库不使用系统参数,而是接受其他代码的参数。对于用户输入,不是使用`sys.argv`,而是将你的代码封装成一个函数来接收一个叫`number`(或者`num`,或者任何你喜欢的变量名)的参数: + + +``` +def calculate(number): +    if not number <= 1: +        for i in range(2, number): +            if (number % i) == 0: +                print("Not prime") +                break +    else: +        print("Integer must be greater than 1") +``` + +这确实使你的脚本有些难测试,因为当你在Python中运行代码时,`calculate`函数永远不会被执行。但是,Python编程人员已经为这个问题设计了一个通用但不是很直观的解决方案。当Python解释器执行一个Python脚本时,有一个叫`__name__`的特殊变量,这个变量被设置为`__main__`,但是当它被作为模块导入的时候,`__name__` 被设置为模块的名字。利用这点,你可以写一个既是Python模块又是有效Python脚本的库: + + +``` +import sys + +def calculate(number): +    if not number <= 1: +        for i in range(2, number): +            if (number % i) == 0: +                print("Not prime") +                break +    else: +        print("Integer must be greater than 1") + +if __name__ == "__main__": +    number = sys.argv[1]     +    calculate( int(number) ) +``` + +现在你可以用一个命令来运行代码了: + + +``` +$ python ./prime.py 4 +Not a prime +``` + +你可以将它转换为Cython来用作一个模块: + + +``` +>>> import prime +>>> prime.calculate(4) +Not prime +``` + +### C Python + +用Cython将纯Python的代码转换为C是有用的。这篇文章描述了如何做,但是Cython的特性可以帮助你在转换之前优化你的代码,分析你的代码来找到Cython什么时候与C进行交互,以及更多。如果你正在用Python,但是你希望用C代码改进你的代码,或者进一步理解库是如何提供比脚本更好的扩展性的,或者你只是好奇Python和C是如何协作的,那么就开始使用Cython吧。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/cython + +作者:[Alan Smithee][a] +选题:[lujun9972][b] +译者:[ShuyRoy](https://github.com/ShuyRoy) +校对:[校对者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/python-programming-code-keyboard.png?itok=fxiSpmnd (Hands on a keyboard with a Python book ) +[2]: https://cython.org/ From 1c66048ce0cac97ebe6fb9fc63d0199ff6165170 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 26 Apr 2021 05:02:38 +0800 Subject: [PATCH 816/818] =?UTF-8?q?=E9=80=89=E9=A2=98[tech]:=2020210425=20?= =?UTF-8?q?Play=20retro=20video=20games=20on=20Linux=20with=20this=20open?= =?UTF-8?q?=20source=20project?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20210425 Play retro video games on Linux with this open source project.md --- ... on Linux with this open source project.md | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 sources/tech/20210425 Play retro video games on Linux with this open source project.md diff --git a/sources/tech/20210425 Play retro video games on Linux with this open source project.md b/sources/tech/20210425 Play retro video games on Linux with this open source project.md new file mode 100644 index 0000000000..8bcf4a9514 --- /dev/null +++ b/sources/tech/20210425 Play retro video games on Linux with this open source project.md @@ -0,0 +1,129 @@ +[#]: subject: (Play retro video games on Linux with this open source project) +[#]: via: (https://opensource.com/article/21/4/scummvm-retro-gaming) +[#]: author: (Joshua Allen Holm https://opensource.com/users/holmja) +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +Play retro video games on Linux with this open source project +====== +ScummVM is one of the most straightforward ways to play old video games +on modern hardware. +![Gaming artifacts with joystick, GameBoy, paddle][1] + +Playing adventure games has always been a big part of my experience with computers. From the earliest text-based adventure games to 2D pixel art, full-motion video, and 3D games, the adventure game genre has provided me with a lot of fond memories. + +Sometimes I want to revisit those old games, but many were released before Linux was even a thing, so how do I go about replaying those games? I use [ScummVM][2], which is honestly one of my favorite open source projects. + +### What is ScummVM + +![ScummVM][3] + +(Joshua Allen Holm, [CC BY-SA 4.0][4]) + +ScummVM is a program designed to play old adventure games on modern hardware. Originally designed to run games developed using LucasArt's Script Creation Utility for Maniac Mansion (SCUMM), ScummVM now supports many different game engines. It can play almost all of the classic Sierra On-Line and LucasArts adventure games as well as a wide selection of adventure games from other publishers. ScummVM does not support _every_ adventure game (yet), but it can be used to play hundreds of them. ScummVM is available for multiple platforms, including Windows, macOS, Linux, Android, iOS, and several game consoles. + +### Why use ScummVM + +There are plenty of ways to play old games on modern hardware, but they tend to be more complicated than using ScummVM. [DOSBox][5] can be used to play DOS games, but it requires tweaking to get the settings right so that the game plays at the right speed. Windows games can be played using [WINE][6], but that requires both the game and the game's installer to be compatible with WINE. + +Even if a game runs under WINE, some games still do not work well on modern hardware because the hardware is too fast. One example of this is a puzzle in King's Quest VII that involves taking a lit firecracker somewhere. On modern hardware, the firecracker explodes way too quickly, which makes it impossible to get to the right location without the character dying multiple times. + +ScummVM eliminates many of the problems present in other methods for playing retro adventure games. If ScummVM supports a game, it is straightforward to configure and play. In most cases, copying the game files from the original game discs to a directory and adding that directory in ScummVM is all that is needed to play the game. For games that came on multiple discs, it might be necessary to rename some files to avoid file name conflicts. The instructions for what data files are needed and any renaming instructions are documented on the ScummVM Wiki page for [each supported game][7]. + +One of the wonderful things about ScummVM is how each new release adds support for more games. ScummVM 2.2.0 added support for a dozen interactive fiction interpreters, which means ScummVM can now play hundreds of text-based adventure games. The development branch of ScummVM, which should become version 2.3.0 soon, integrates [ResidualVM][8]'s support for 3D adventure games, so now ScummVM can be used to play Grim Fandango, Myst III: Exile, and The Longest Journey. The development branch also recently added support for games created using [Adventure Game Studio][9], which adds hundreds, possibly thousands, of games to ScummVM's repertoire. + +### How to install ScummVM + +If you want to install ScummVM from your Linux distribution's repositories, the process is very simple. You just need to run one command. However, your distribution might offer an older release of ScummVM that does not support as many games as the latest release, so do keep that in mind. + +**Install ScummVM on Debian/Ubuntu:** + + +``` +`sudo apt install scummvm` +``` + +**Install ScummVM on Fedora:** + + +``` +`sudo dnf install scummvm` +``` + +#### Install ScummVM using Flatpak or Snap + +ScummVM is also available as a Flatpak and as a Snap. If you use one of those options, you can use one of the following commands to install the relevant version, which should always be the latest release of ScummVM: + + +``` +`flatpak install flathub org.scummvm.ScummVM` +``` + +or + + +``` +`snap install scummvm` +``` + +#### Compile the development branch of ScummVM + +If you want to try the latest and greatest features in the not-yet-stable development branch of ScummVM, you can do so by compiling ScummVM from the source code. Do note that the development branch is constantly changing, so things might not always work correctly. If you are still interested in trying out the development branch, follow the instructions below. + +To start, you will need the required development tools and libraries for your distribution, which are listed on the [Compiling ScummVM/GCC page][10] on the ScummVM Wiki. + +Once you have the prerequisites installed, run the following commands: + + +``` +git clone + +cd scummvm + +./configure + +make + +sudo make install +``` + +### Add games to ScummVM + +Adding games to ScummVM is the last thing you need to do before playing. If you do not have any supported adventure games in your collection, you can download 11 wonderful games from the [ScummVM Games page][11]. You can also purchase many of the games supported by ScummVM from [GOG.com][12]. If you purchase a game from GOG.com and need to extract the game files from the GOG download, you can use the [innoextract][13] utility. + +Most games need to be in their own directory (the only exceptions to this are games that consist of a single data file), so it is best to begin by creating a directory to store your ScummVM games. You can do this using the command line or a graphical file manager. Where you store your games does not matter (except in the case of the ScummVM Flatpak, which is a sandbox and requires the games to be stored in the `~/Documents` directory). After creating this directory, place the data files for each game in their own subdirectories. + +Once the files are copied to where you want them, run ScummVM and add the game to the collection by clicking **Add Game…**, selecting the appropriate directory in the file-picker dialog box that opens, and clicking **Choose**. If ScummVM properly detects the game, it will open its settings options. You can select advanced configuration options from the various tabs if you want (which can also be changed later by using the **Edit Game…** button), or you can just click **OK** to add the game with the default options. If the game is not detected, check the [Supported Games pages][14] on the ScummVM Wiki for details about special instructions that might be needed for a particular game's data files. + +The only thing left to do now is select the game in ScummVM's list of games, click on **Start**, and enjoy replaying an old favorite or experiencing a classic adventure game for the first time. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/scummvm-retro-gaming + +作者:[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/open_gaming_games_roundup_news.png?itok=KM0ViL0f (Gaming artifacts with joystick, GameBoy, paddle) +[2]: https://www.scummvm.org/ +[3]: https://opensource.com/sites/default/files/uploads/scummvm.png (ScummVM) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://www.dosbox.com/ +[6]: https://www.winehq.org/ +[7]: https://wiki.scummvm.org/index.php?title=Category:Supported_Games +[8]: https://www.residualvm.org/ +[9]: https://www.adventuregamestudio.co.uk/ +[10]: https://wiki.scummvm.org/index.php/Compiling_ScummVM/GCC +[11]: https://www.scummvm.org/games/ +[12]: https://www.gog.com/ +[13]: https://constexpr.org/innoextract/ +[14]: https://wiki.scummvm.org/index.php/Category:Supported_Games From e5689eb7f37e87eb5204ae397e55d16cf237dcab Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 26 Apr 2021 08:39:02 +0800 Subject: [PATCH 817/818] translating --- ...ervability with Apache Kafka and SigNoz.md | 157 ------------------ ...ervability with Apache Kafka and SigNoz.md | 156 +++++++++++++++++ 2 files changed, 156 insertions(+), 157 deletions(-) delete mode 100644 sources/tech/20210420 Application observability with Apache Kafka and SigNoz.md create mode 100644 translated/tech/20210420 Application observability with Apache Kafka and SigNoz.md diff --git a/sources/tech/20210420 Application observability with Apache Kafka and SigNoz.md b/sources/tech/20210420 Application observability with Apache Kafka and SigNoz.md deleted file mode 100644 index 36b52ad61c..0000000000 --- a/sources/tech/20210420 Application observability with Apache Kafka and SigNoz.md +++ /dev/null @@ -1,157 +0,0 @@ -[#]: subject: (Application observability with Apache Kafka and SigNoz) -[#]: via: (https://opensource.com/article/21/4/observability-apache-kafka-signoz) -[#]: author: (Nitish Tiwari https://opensource.com/users/tiwarinitish86) -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Application observability with Apache Kafka and SigNoz -====== -SigNoz helps developers start meeting their observability goals quickly -and with minimum effort. -![Ship captain sailing the Kubernetes seas][1] - -SigNoz is an open source application observability platform. Built in React and Go, SigNoz is written from the ground up to allow developers to get started with their observability goals as soon as possible and with minimum effort. - -This article looks at the software in detail, including the architecture, Kubernetes-based deployment, and some common SigNoz uses. - -### SigNoz architecture - -SigNoz ties several components together to create a scalable, loosely coupled system that is easy to get started with. Some of the most important components are: - - * OpenTelemetry Collector - * Apache Kafka - * Apache Druid - - - -[OpenTelemetry Collector][2] is the trace or metrics data collection engine. This enables SigNoz to ingest data in industry-standard formats, including Jaeger, Zipkin, and OpenConsensus. Then the collected data is forwarded to Apache Kafka. - -SigNoz uses Kafka and stream processors for real-time ingestion of high volumes of observability data. This data is then passed on to Apache Druid, which excels at storing such data for short- and long-term SQL analysis. - -Once the data is flattened and stored in Druid, SigNoz's query service can query and pass the data to the SigNoz React frontend. The front end then creates nice graphs for users to visualize the observability data. - -![SigNoz architecture][3] - -(Nitish Tiwari, [CC BY-SA 4.0][4]) - -### Install SigNoz - -SigNoz's components include Apache Kafka and Druid. These components are loosely coupled and work in tandem to ensure a seamless experience for the end user. Given all the components, it is best to run SigNoz as a combination of microservices on Kubernetes or Docker Compose (for local testing). - -This example uses a Kubernetes Helm chart-based deployment to install SigNoz on Kubernetes. As a prerequisite, you'll need a Kubernetes cluster. If you don't have a Kubernetes cluster available, you can use tools like [MiniKube][5] or [Kind][6] to create a test cluster on your local machine. Note that the machine should have at least 4GB available for this to work. - -Once you have the cluster available and kubectl configured to communicate with the cluster, run: - - -``` -$ git clone && cd signoz - -$ helm dependency update deploy/kubernetes/platform - -$ kubectl create ns platform - -$ helm -n platform install signoz deploy/kubernetes/platform - -$ kubectl -n platform apply -Rf deploy/kubernetes/jobs - -$ kubectl -n platform apply -f deploy/kubernetes/otel-collector -``` - -This installs SigNoz and related containers on the cluster. To access the user interface (UI), run the `kubectl port-forward` command; for example: - - -``` -`$ kubectl -n platform port-forward svc/signoz-frontend 3000:3000` -``` - -You should now be able to access your SigNoz dashboard using a local browser on the address `http://localhost:3000`. - -Now that your observability platform is up, you need an application that generates observability data to visualize and trace. For this example, you can use [HotROD][7], a sample application developed by the Jaegar team. - -To install it, run: - - -``` -$ kubectl create ns sample-application - -$ kubectl -n sample-application apply -Rf sample-apps/hotrod/ -``` - -### Explore the features - -You should now have a sample application with proper instrumentation up and running in the demo setup. Look at the SigNoz dashboard for metrics and trace data. As you land on the dashboard's home, you will see a list of all the configured applications that are sending instrumentation data to SigNoz. - -![SigNoz dashboard][8] - -(Nitish Tiwari, [CC BY-SA 4.0][4]) - -#### Metrics - -When you click on a specific application, you will land on the application's homepage. The Metrics page displays the last 15 minutes worth (this number is configurable) of information, like application latency, average throughput, error rate, and the top endpoints the application is accessing. This gives you a birds-eye view of the application's status. Any spikes in errors, latency, or load are immediately visible. - -![Metrics in SigNoz][9] - -(Nitish Tiwari, [CC BY-SA 4.0][4]) - -#### Tracing - -The Traces page lists every request in chronological order with high-level details. As soon as you identify a single request of interest (e.g., something taking longer than expected to complete), you can click the trace and look at individual spans for every action that happened inside that request. The drill-down mode offers thorough inspection for each request. - -![Tracing in SigNoz][10] - -(Nitish Tiwari, [CC BY-SA 4.0][4]) - -![Tracing in SigNoz][11] - -(Nitish Tiwari, [CC BY-SA 4.0][4]) - -#### Usage Explorer - -Most of the metrics and tracing data are very useful, but only for a certain period. As time passes, the data ceases to be useful in most cases. This means it is important to plan a proper retention duration for data; otherwise, you will pay more for the storage. The Usage Explorer provides an overview of ingested data per hour, day, and week. - -![SigNoz Usage Explorer][12] - -(Nitish Tiwari, [CC BY-SA 4.0][4]) - -### Add instrumentation - -So far, you've been looking at metrics and traces from the sample HotROD application. Ideally, you'll want to instrument your application so that it sends observability data to SigNoz. Do this by following the [Instrumentation Overview][13] on SigNoz's website. - -SigNoz supports a vendor-agnostic instrumentation library, OpenTelemetry, as the primary way to configure instrumentation. OpenTelemetry offers instrumentation libraries for various languages with support for both automatic and manual instrumentation. - -### Learn more - -SigNoz helps developers get started quickly with metrics and tracing applications. To learn more, you can consult the [documentation][14], join the [community][15], and access the source code on [GitHub][16]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/observability-apache-kafka-signoz - -作者:[Nitish Tiwari][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/tiwarinitish86 -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/ship_captain_devops_kubernetes_steer.png?itok=LAHfIpek (Ship captain sailing the Kubernetes seas) -[2]: https://github.com/open-telemetry/opentelemetry-collector -[3]: https://opensource.com/sites/default/files/uploads/signoz_architecture.png (SigNoz architecture) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: https://minikube.sigs.k8s.io/docs/start/ -[6]: https://kind.sigs.k8s.io/docs/user/quick-start/ -[7]: https://github.com/jaegertracing/jaeger/tree/master/examples/hotrod -[8]: https://opensource.com/sites/default/files/uploads/signoz_dashboard.png (SigNoz dashboard) -[9]: https://opensource.com/sites/default/files/uploads/signoz_applicationmetrics.png (Metrics in SigNoz) -[10]: https://opensource.com/sites/default/files/uploads/signoz_tracing.png (Tracing in SigNoz) -[11]: https://opensource.com/sites/default/files/uploads/signoz_tracing2.png (Tracing in SigNoz) -[12]: https://opensource.com/sites/default/files/uploads/signoz_usageexplorer.png (SigNoz Usage Explorer) -[13]: https://signoz.io/docs/instrumentation/overview/ -[14]: https://signoz.io/docs/ -[15]: https://github.com/SigNoz/signoz#community -[16]: https://github.com/SigNoz/signoz diff --git a/translated/tech/20210420 Application observability with Apache Kafka and SigNoz.md b/translated/tech/20210420 Application observability with Apache Kafka and SigNoz.md new file mode 100644 index 0000000000..69088936f0 --- /dev/null +++ b/translated/tech/20210420 Application observability with Apache Kafka and SigNoz.md @@ -0,0 +1,156 @@ +[#]: subject: (Application observability with Apache Kafka and SigNoz) +[#]: via: (https://opensource.com/article/21/4/observability-apache-kafka-signoz) +[#]: author: (Nitish Tiwari https://opensource.com/users/tiwarinitish86) +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) + +使用 Apache Kafka 和 SigNoz 实现应用可观测性 +====== +SigNoz 帮助开发者使用最小的精力快速实现他们的可观测性目标。 +![Ship captain sailing the Kubernetes seas][1] + +SigNoz 是一个开源的应用可观察性平台。SigNoz 是用 React 和 Go 编写的,它从头到尾都是为了让开发者能够以最小的精力尽快实现他们的可观察性目标。 + +本文将详细介绍该软件,包括架构、基于 Kubernetes 的部署以及一些常见的 SigNoz 用途。 + +### SigNoz 架构 + +SigNoz 将几个组件捆绑在一起,创建了一个可扩展的、耦合松散的系统,很容易上手使用。其中一些最重要的组件有: + + * OpenTelemetry Collector + * Apache Kafka + * Apache Druid + + + +[OpenTelemetry Collector][2] 是跟踪或度量数据收集引擎。这使得 SigNoz 能够以行业标准格式获取数据,包括 Jaeger、Zipkin 和 OpenConsensus。之后,收集的数据被转发到 Apache Kafka。 + +SigNoz 使用 Kafka 和流处理器来实时获取大量的可观测数据。然后,这些数据被传递到 Apache Druid,它擅长于存储这些数据,用于短期和长期的 SQL 分析。 + +当数据被扁平化并存储在 Druid 中,SigNoz 的查询服务可以查询并将数据传递给 SigNoz React 前端。然后,前端为用户创建漂亮的图表,使可观察性数据可视化。 + +![SigNoz architecture][3] + +(Nitish Tiwari, [CC BY-SA 4.0][4]) + +### 安装 SigNoz + +SigNoz 的组件包括 Apache Kafka 和 Druid。这些组件是松散耦合的,并协同工作,以确保终端用户的无缝体验。鉴于这些组件,最好将 SigNoz 作为 Kubernetes 或 Docker Compose(用于本地测试)上的微服务组合来运行。 + +这个例子使用基于 Kubernetes Helm Chart 的部署在 Kubernetes 上安装 SigNoz。作为先决条件,你需要一个 Kubernetes 集群。如果你没有可用的 Kubernetes 集群,你可以使用 [MiniKube][5] 或 [Kind][6] 等工具,在你的本地机器上创建一个测试集群。注意,这台机器至少要有 4GB 的可用空间才能工作。 + +当你有了可用的集群,并配置了 kubectl 来与集群通信,运行: + + +``` +$ git clone && cd signoz + +$ helm dependency update deploy/kubernetes/platform + +$ kubectl create ns platform + +$ helm -n platform install signoz deploy/kubernetes/platform + +$ kubectl -n platform apply -Rf deploy/kubernetes/jobs + +$ kubectl -n platform apply -f deploy/kubernetes/otel-collector +``` + +这将在集群上安装 SigNoz 和相关容器。要访问用户界面 (UI),运行 `kubectl port-forward` 命令。例如: + + +``` +`$ kubectl -n platform port-forward svc/signoz-frontend 3000:3000` +``` + +现在你应该能够使用本地浏览器访问你的 SigNoz 仪表板,地址为 `http://localhost:3000`。 + +现在你的可观察性平台已经建立起来了,你需要一个能产生可观察性数据的应用来进行可视化和追踪。对于这个例子,你可以使用 [HotROD][7],一个由 Jaegar 团队开发的示例应用。 + +要安装它,请运行: + + +``` +$ kubectl create ns sample-application + +$ kubectl -n sample-application apply -Rf sample-apps/hotrod/ +``` + +### 探索功能 + +现在你应该有一个已经安装合适仪表的应用,并可在演示设置中运行。看看 SigNoz 仪表盘上的指标和跟踪数据。当你登录到仪表盘的主页时,你会看到一个所有已配置的应用列表,这些应用正在向 SigNoz 发送仪表数据。 + +![SigNoz dashboard][8] + +(Nitish Tiwari, [CC BY-SA 4.0][4]) + +#### 指标 + +当你点击一个特定的应用时,你会登录到该应用的主页上。指标页面显示最近 15 分钟的信息(这个数字是可配置的),如应用的延迟、平均吞吐量、错误率和应用目前访问最高的接口。这让你对应用的状态有一个大概了解。任何错误、延迟或负载的峰值都可以立即看到。 + +![Metrics in SigNoz][9] + +(Nitish Tiwari, [CC BY-SA 4.0][4]) + +#### 追踪 + +追踪页面按时间顺序列出了每个请求的高层细节。当你发现一个感兴趣的请求(例如,比预期时间长的东西),你可以点击追踪,查看该请求中发生的每个行为的单独时间跨度。下探模式提供了对每个请求的彻底检查。 + +![Tracing in SigNoz][10] + +(Nitish Tiwari, [CC BY-SA 4.0][4]) + +![Tracing in SigNoz][11] + +(Nitish Tiwari, [CC BY-SA 4.0][4]) + +#### 用量资源管理器 + +大多数指标和跟踪数据都非常有用,但只在一定时期内有用。随着时间的推移,数据在大多数情况下不再有用。这意味着为数据计划一个适当的保留时间是很重要的。否则,你将为存储支付更多的费用。用量资源管理器提供了每小时、每一天和每一周获取数据的概况。 + +![SigNoz Usage Explorer][12] + +(Nitish Tiwari, [CC BY-SA 4.0][4]) + +### 添加仪表 + +到目前为止,你一直在看 HotROD 应用的指标和追踪。理想情况下,你会希望对你的应用进行检测,以便它向 SigNoz 发送可观察数据。参考 SigNoz 网站上的[仪表概览][13]。 + +SigNoz 支持一个与供应商无关的仪表库,OpenTelemetry,作为配置仪表的主要方式。OpenTelemetry 提供了各种语言的仪表库,支持自动和手动仪表。 + +### 了解更多 + +SigNoz 帮助开发者快速开始度量和跟踪应用。要了解更多,你可以查阅 [文档][14],加入[社区][15],并访问 [GitHub][16] 上的源代码。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/observability-apache-kafka-signoz + +作者:[Nitish Tiwari][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/tiwarinitish86 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/ship_captain_devops_kubernetes_steer.png?itok=LAHfIpek (Ship captain sailing the Kubernetes seas) +[2]: https://github.com/open-telemetry/opentelemetry-collector +[3]: https://opensource.com/sites/default/files/uploads/signoz_architecture.png (SigNoz architecture) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://minikube.sigs.k8s.io/docs/start/ +[6]: https://kind.sigs.k8s.io/docs/user/quick-start/ +[7]: https://github.com/jaegertracing/jaeger/tree/master/examples/hotrod +[8]: https://opensource.com/sites/default/files/uploads/signoz_dashboard.png (SigNoz dashboard) +[9]: https://opensource.com/sites/default/files/uploads/signoz_applicationmetrics.png (Metrics in SigNoz) +[10]: https://opensource.com/sites/default/files/uploads/signoz_tracing.png (Tracing in SigNoz) +[11]: https://opensource.com/sites/default/files/uploads/signoz_tracing2.png (Tracing in SigNoz) +[12]: https://opensource.com/sites/default/files/uploads/signoz_usageexplorer.png (SigNoz Usage Explorer) +[13]: https://signoz.io/docs/instrumentation/overview/ +[14]: https://signoz.io/docs/ +[15]: https://github.com/SigNoz/signoz#community +[16]: https://github.com/SigNoz/signoz From e786053018fc9b8b5c9fd26277f2bf9b5a0157a1 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 26 Apr 2021 08:43:39 +0800 Subject: [PATCH 818/818] translating --- ...king computers more accessible and sustainable with Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20210424 Making computers more accessible and sustainable with Linux.md b/sources/tech/20210424 Making computers more accessible and sustainable with Linux.md index 9f1db397ff..0646d7b75c 100644 --- a/sources/tech/20210424 Making computers more accessible and sustainable with Linux.md +++ b/sources/tech/20210424 Making computers more accessible and sustainable with Linux.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/4/linux-free-geek) [#]: author: (Don Watkins https://opensource.com/users/don-watkins) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( )