2
0
mirror of https://github.com/LCTT/TranslateProject.git synced 2025-03-24 02:20:09 +08:00

Merge pull request from LCTT/master

update local from master
This commit is contained in:
SilentDawn 2020-07-30 17:06:01 +08:00 committed by GitHub
commit 663cf08844
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
73 changed files with 6388 additions and 2771 deletions
published
sources
talk
tech
20180730 50 Best Ubuntu Apps You Should Be Using Right Now.md20190204 Getting started with Git- Terminology 101.md20190213 How to build a WiFi picture frame with a Raspberry Pi.md20190808 Sending custom emails with Python.md20191031 4 Python tools for getting started with astronomy.md20200521 Easy DNS configuration with PowerDNS for nameservers.md20200528 4 Linux distributions for gaming.md20200611 Never forget your password with this Python encryption algorithm.md20200623 Jitsi Meet- A Free - Open Source Video Conferencing Solution That is Also Free to Use Without Any Set Up.md20200710 Use DNS over TLS.md20200713 Top 5 Open Source Video Conferencing Tools for Remote Working and Online Meetings.md20200715 An example of very lightweight RESTful web services in Java.md20200715 What-s the difference between DevSecOps and agile software development.md20200718 Ubuntu 19.10 Reaches End of Life. Upgrade to Ubuntu 20.04 As Soon As Possible.md20200720 Why People Are Crazy About Arch Linux- What-s so Special About it.md20200721 Manage network connections from the Linux command line with nmcli.md20200721 Video Trimmer- A No-nonsense, Simple Video Trimming Application for Linux Desktop.md20200722 6 ways to contribute to an open source alternative to Slack.md20200722 SCP user-s migration guide to rsync.md20200722 Tiny Yet Useful- 13 Raspberry Pi Zero Alternatives That Cost Less Than -20.md20200723 Automate testing for website errors with this Python tool.md20200723 Build your own open source alternative to Google Suite with Nextcloud.md20200726 Dreamweaver Alternatives- 5 Open Source HTML and CSS Editors for Web Developers and Designers.md20200727 5 open source IDE tools for Java.md20200727 Analyze your web server log files with this Python tool.md20200727 What does it mean for code to -work.md20200728 BigBlueButton- Open Source Software for Online Teaching.md20200728 Digging for DNS answers on Linux.md20200728 How to create a documentation site with Docsify and GitHub Pages.md20200728 Why now is the best time to use GNOME.md20200729 How to Install Discord Application in Ubuntu and Other Linux Distributions -3 Methods.md
translated

View File

@ -0,0 +1,501 @@
50 个绝佳的必备 Ubuntu 应用
======
> 摘要:这是一份详尽清单,给所有用户的优秀的 Ubuntu 应用。这些应用将帮助你获得更好的 Linux 桌面使用体验。
过去,我已经多次写过关于 [安装 Ubuntu 之后该做什么][1]。每次我都建议在 Ubuntu 上安装某些关键的应用程序。
那么问题来了,什么是关键的 Ubuntu 应用程序?没有绝对的答案。这取决于你的需要和你在 Ubuntu 上要做的工作。
然而还是有很多读者请我推荐一些优秀的 Ubuntu 应用。这就是为什么我创建了这个全面的Ubuntu应用程序列表你可以经常使用。
为了方便阅读和理解,清单划分为不同应用种类。
### 提供更好使用体验的优秀 Ubuntu 应用
![优秀 Ubuntu 应用][2]
当然,你不必使用以下全部应用。只须浏览这份 Ubuntu 关键应用清单,阅读描述并安装你需要或想要的应用。将这篇文章保存在你的浏览器收藏夹以备将来参考或者通过搜索引擎搜索即可。
这份 Ubuntu 优秀应用清单是准备给普通 Ubuntu 用户的,因此这些应用不全是开源的。我也标记了某些可能不适合新手的稍微复杂的应用。清单适用于 Ubuntu 16.04、18.04 和其他版本。
除非特别声明,所有列出的软件都可以在 Ubuntu 软件中心获得。
如果你没有在软件中心找到应用或者缺失安装说明,请告知我,我会补充安装步骤。
话不多说!让我们看看有哪些优秀 Ubuntu 应用。
#### 浏览器
Ubuntu 以 Firefox 为默认浏览器。自从 Quantum 版本发布以来Firefox 已有显著提升。就个人而言,我经常使用多个浏览器来应对不同的工作。
##### Google Chrome
![Google Chrome Logo][3]
由于某种原因Google Chrome 是最为广泛使用的浏览器。使用 Google 账号,你可以在不同设备无缝同步。大量拓展和应用进一步增强 Chrome 的能力。你可以 [点击此处在 Ubuntu 上安装 Chrome][4]。
##### Brave
![brave browser][5]
Google Chrome 可能是最广泛使用的浏览器,但也是隐私窥探者。一个 [替代浏览器][6] 是 [Brave][7],它可以默认拦截广告和追踪脚本。它为你提供了更快、更安全的浏览体验。
#### 音乐应用
![Ubuntu 优秀音乐应用][8]
Ubuntu 将 Rhythmbox 作为默认音乐播放器,这是个相当不坏的选择。不过,你当然可以安装更好的音乐播放器。
##### Sayonara
[Sayonara][9] 是一个小型、轻量并具备漂亮的深色用户界面的音乐播放器。它拥有所有你期望的标准音乐播放器应有的关键功能。它与 Ubuntu 桌面环境整合良好并且不会大量消耗你的内存。
##### Audacity
[Audacity][10] 与其说是音频播放器,不如说是音频编辑器。你可以使用这款自由且开源的工具录制和编辑音频。它支持 Linux、Windows 和 macOS。你可以从软件中心安装它。
##### MusicBrainz Picard
[Picard][11] 不是一个音乐播放器而是个音乐标签软件。如果你有大量本地音乐文件Picard 可以帮助你自动更新音乐文件的正确的曲目、专辑、艺人资料和专辑封面。
#### 流媒体音乐应用
![Streaming Music app Ubuntu][12]
在这个时代的互联网,听音乐的方式显然发生了改变。现在的人更依赖于流媒体音乐播放器而不是收藏上百首本地音乐文件。让我们看看你可以用于收听流媒体音乐的一些应用吧。
##### Spotify
[Spotify][13] 是流媒体音乐之王。好消息是它具有官方 Linux 版本。[Ubuntu 上的 Spotify 应用][14] 与媒体键和声音菜单以及桌面通知中心整合良好。请注意Spotify 服务可能在你的国家有,也可能没有。
##### Nuvola 音乐播放器
[Nuvola][15] 不是像 Spotify 那样的流媒体音乐服务。它是一款在单一应用内支持多个流媒体音乐服务的桌面音乐播放器。你可以使用 Spotify、Deezer、Google Play Music、Amazon Cloud Player 和更多类似服务。
#### 视频播放器
![Linux 视频播放器][16]
Ubuntu 有默认的 GNOME 视频播放器(从前名为 Totem表现尚可但不支持多种视频编码。当然有很多播放器比 GNOME 视频播放器更优秀。
##### VLC
自由开源的 [VLC][17] 摘得视频播放器桂冠。它几乎支持全部的视频编码。它还允许你将音量增至最高的 200%。它也支持从最后一个已知位置继续播放。有很多 [VLC 使用技巧][18] 供你参考以尽兴使用。
##### MPV
[MPV][19] 是款值得更多关注的视频播放器。别致轻量的界面和丰富的功能MPV 拥有你对一个好的视频播放器的一切期望。你甚至可以在命令行使用它。如果你对 VLC 不够满意,你完全可以尝试 MPV。
#### 云端存储服务
本地备份很好,但云端存储给你更多维度的自由。使用云存储,你再也不必总是随身携带 U 盘或担心硬盘故障。
##### Dropbox
![Dropbox logo][20]
[Dropbox][21] 是最流行的云存储提供商之一。你会获得 2GB 免费存储空间并通过推介给他人得到更多存储空间。Dropbox 提供了一个原生的 Linux 客户端,你可以从官网下载获得。它会在你的系统创建一个本地文件夹,以和云端服务器同步。
##### pCloud
![pCloud icon][22]
[pCloud][23] 是另一个优秀的 Linux 云存储提供商。它也拥有原生的 Linux 客户端,你可以从官网下载。你可以获得高达 20GB 的免费存储空间,如果你需要更多,价格也比 Dropbox 实惠。pCloud 总部位于瑞士,这个国家以严格的数据隐私法而闻名。
#### 图片编辑器
我相信你一定会在某个时间点上需要一个照片编辑器。这里有些优秀的 Ubuntu 图片编辑应用。
##### GIMP
![gimp icon][24]
[GIMP][25] 是一个自由开源的图片编辑器,它支持 Linux、Windows 和 macOS。它是 Adobe Photoshop 在 Linux 上最优秀的替代软件。你可以使用它执行任何图片编辑。网上有许多资源帮助你使用 GIMP。
##### Inkscape
![inkscape icon][26]
[Inkscape][27] 也是一个自由开源的图片编辑器,专用于矢量图形编辑。你可以在 Inkscape 上设计矢量图形和徽标。你可以把它比做 Adobe Illustrator。与 GIMP 一样,网上也有诸多 Inkscape 教程。
#### 绘图应用
![Painting apps for Ubuntu Linux][28]
绘图应用和图片编辑器不完全等同,尽管它们有时功能重叠。以下是你能在 Ubuntu 使用的一些绘图应用。
##### Krita
[Krita][29] 是一款自由开源的数字绘图应用。你可以用它创建数字绘画、漫画和动画。这是款专业软件,甚至被美术学校作为主要软件使用。
##### Pinta
[Pinta][30] 虽然不像 Krita 功能强大,但也可圈可点。你可以把它视为 Linux 端的微软画图软件。你可以绘制、画图、添加文字和执行绘图应用可行的其他诸如此类的小任务。
#### 摄影应用
摄影爱好者还是专家?你将随手获得大量 [摄影工具][31],以下是一些推荐应用。
##### digiKam
![digikam][32]
使用开源软件 [digKam][33]你可以专业地处理你的高品质摄影作品。digKam 提供用于查看、管理、编辑、增强、组织、标记和分享照片所需的所有工具。
##### Darktable
![Darktable icon][34]
[darktable][35] 是一款开源的摄影工作流应用程序,特别是专注于 raw 图像的开发。这会是你取代 Adobe Lightroom 的最佳替代品。它同样支持 Windows 和 macOS。
#### 视频编辑器
![Video editors Ubuntu][36]
[Linux 上的视频编辑器][37] 并不匮乏,毋庸赘述。看看 Ubuntu 中一些功能丰富但相对简单的视频编辑器。
##### Kdenlive
[Kdenlive][38] 是 Linux 端最好的全能型视频编辑器。它与 iMovie 或 Movie Maker 相比功能毫不逊色。
##### Shotcut
[Shotcut][39] 是视频编辑的另一个好选择。它是一款开源软件,拥有标准视频编辑器的所有功能。
#### 图片和视频格式转换器
如果你需要为你的图片和视频 [转换文件格式][40],这些是我的推荐。
##### Xnconvert
![xnconvert logo][41]
[Xnconvert][42] 是一款优秀的批量图像转换工具。你可以批量调整图片尺寸、转换文件类型并重命名。
##### Handbrake
![Handbrake Logo][43]
[HandBrake][44] 是一款易用的开源工具,用于将多种格式的视频转换为一些现代流行的格式。
#### 截图和录屏工具
![Screenshot and recorders Ubuntu][45]
以下是截图和录屏的优秀 Ubuntu 应用。
##### Shutter
[Shutter][46] 是我截图的常用工具。你也可以对这些截图进行一些快速编辑,比如添加箭头、文字或调整图片尺寸。你在我们网站看到的截图都是用 Shutter 编辑的。绝对是 Ubuntu 上最好的应用程序之一。
##### Kazam
[Kazam][47] 是我最喜欢的 [Linux 上的录屏工具][48]。这个是小巧的工具,可以让你录制全屏、某个应用程序窗口或选定区域。你也可以使用快捷键暂停或恢复录屏。[我们的 YouTube 频道][49] 上的教程都是用 Kazam 录制的。
#### 办公套件
我无法想象你在使用计算机时没有文档编辑器。又何必把自己局限在一个文档编辑器上呢?去寻找一个完整的办公套件吧。
##### LibreOffice
![LibreOffice logo][50]
Ubuntu 预装了 [LibreOffice][51],它无疑是 [最佳的开源办公软件][52]。它是个组件完整的办公软件,包括文档编辑器、电子表格工具、演示软件、数学工具和作图工具。你甚至可以用它编辑部分 PDF 文件。
##### WPS Office
![WPS Office logo][53]
[WPS Office][54] 因酷似微软 Office 而广受欢迎。它的界面与微软 Office 几乎一样并且号称与微软 Office 更加兼容。如果你正在寻找类似微软 Office 的办公软件WPS Office 是个好选择。
#### 下载工具
![Downloading software Ubuntu][55]
如果你经常从网上下载视频或其他大型文件,这些工具会帮助你。
##### youtube-dl
这是本清单少有的基于命令行的 Ubuntu 应用之一。如果你想从 YouTube、DailyMotion 或其他视频网站下载视频youtube-dl 是个绝好的选择。它提供了大量 [视频下载高级选项][56]。
##### uGet
[uGet][57] 是一款功能丰富的 [Linux 下载管理器][58]。它允许你暂停和恢复下载、定时下载、监控剪贴板上的可下载内容。如果你的网络速度很慢、不稳定,或者每天的流量有限,这是一个完美的应对工具。
#### 代码编辑器
![Coding apps for Ubuntu][59]
如果你喜欢编程,默认的 Gedit 文本编辑器可能无法满足你的编程需求。下面就为你介绍一些比较好用的代码编辑器。
##### Atom
[Atom][60] 是一款由 GitHub 推出的 [自由开源的代码编辑器][61]。早在它推出第一个稳定版之前,它就因其用户界面、功能和海量插件而成为程序员的至宠。
##### Visual Studio Code
[VS Code][62] 是一款微软出品的开源代码编辑器。别忌惮微软之名VS Code 是款很棒的 Web 开发编辑器,它还支持许多其他编程语言。
#### PDF 和电子书相关应用
![eBook Management tools in Ubuntu][63]
在这个数字时代,你不能只依靠真正的纸质书籍,特别是当有大量的免费电子书唾手可得。这里有一些 Ubuntu 应用以供管理 PDF 和电子书。
##### Calibre
如果你是个书虫,并收集电子书,你应该使用 [Calibre][64]。它是一个电子书管理器,拥有 [创建电子书][65]、转换电子书格式和管理电子书库的所有必要组件。
##### Okular
Okular 主要是一个 PDF 查看器,有编辑 PDF 文件的选项。你可以用 Okular 在 Linux 上做一些基本的 [PDF 编辑][66],如添加弹出式备注、内联式备注、手绘、荧光笔、印章等。
#### 通讯应用
![Messaging apps for Ubuntu][67]
我相信你在 Linux 上使用至少一款 [通讯应用][68]。以下是我的推荐。
##### Skype
[Skype][69] 是最流行的视频通讯应用。它也被许多公司和企业用于面试和会议。这使得 Skype 成为 Ubuntu 必备的应用程序之一。
##### Rambox
[Rambox][70] 本身不是一个通讯应用,但它允许你从单一窗口中使用 Skype、Viber、Facebook Messanger、WhatsApp、Slack 和其他一些通讯应用。
#### 笔记和待办事项应用
需要一个待办事项应用或简单的应用来做笔记吗?看看这些吧。
##### Simplenote
![Simplenote logo][71]
[Simplenote][72] 是 WordPress 创建者 [Automattic][73] 推出的一款自由开源的笔记应用。它适用于 Windows、Linux、macOS、iOS 和 Android。你的笔记会同步到云服务器上你可以在任何设备上访问它们。你可以从官网下载 DEB 文件。
##### Remember The Milk
![Remember The Milk logo][74]
[Remember The Milk][75] 是一款流行的待办事项应用。它适用于 Windows、Linux、macOS、iOS 和 Android。你可以在拥有的所有设备上访问你的待办事项。你也可以从浏览器访问它。它还有一个官方的 Linux 原生版本,你可以从官网下载。
#### 密码保护和加密
![Encryption software Ubuntu][76]
如果有其他人经常使用你的电脑,也许你会考虑通过密码保护文件和文件夹来增加额外的安全。
##### EncryptPad
[EncryptPad][77] 是一个开源文本编辑器,它允许你用密码锁定你的文件。你可以选择加密的类型。这个工具也有一个命令行版本。
##### Gnome Encfs Manager
Gnome Encfs Manager 允许你 [在 Linux 中用密码锁定文件夹][78]。你可以将任何你想要的文件保存在一个加密文件夹中,然后用密码锁定它。
#### 游戏
![Gaming on Ubuntu][79]
[Linux 上的游戏][80] 体验比几年前改进很多。你可以在 Linux 上畅玩大量游戏,而不用回到 Windows 了。
##### Steam
[Steam][81] 是一个数字发行平台允许你购买游戏如果需要的话。Steam 拥有超过 1500 款 [Linux 游戏][82]。你可以从软件中心下载 Steam 客户端。
##### PlayOnLinux
[PlayOnLinux][83] 允许你在 Linux 上通过 WINE 兼容层运行 Windows 游戏。不要对它抱有太高的期望,因为并不是每个游戏都能在 PlayOnLinux 下完美运行。
#### 软件包管理工具 [中高级用户]
![Package Management tools Ubuntu][84]
Ubuntu 软件中心满足普通 Ubuntu 用户的软件需求,但你可以使用以下应用程序对其进行更多的深入操作。
##### Gdebi
Gedbi 是一款小巧的软件包管理器,你可以用它来安装 DEB 文件。它比软件中心更快,而且还能处理依赖问题。
##### Synaptic
十年前Synaptic 是大多数 Linux 发行版的默认 GUI 软件包管理器。在一些 Linux 发行版中,它仍然是默认的软件包管理器。这个强大的软件包管理器在 [查找已安装的应用程序并删除它们][85] 方面特别有用。
#### 备份和恢复工具
![Backup and data recovery tools for Ubuntu][86]
任何操作系统都应该有备份和恢复工具。让我们来看看 Ubuntu 上有哪些软件是你必须拥有的。
##### Timeshift
Timeshift 是一个帮助你 [对系统进行快照][87] 的工具。这可以让你在系统配置混乱的情况下在发生不幸的事时将系统恢复到以前的状态。不过要注意的是它并不是你个人数据备份的最佳工具。对此你可以使用U buntu 默认的 Deja Dup也叫做“备份”
##### TestDisk [中级用户]
这是本清单里另一个命令行工具。[TestDisk][88] 可以让你 [恢复 Linux 上的数据][89]。如果你不小心删除了文件,使用 TestDisk 还有机会找回来。
#### 系统调整和管理工具
![System Maintenance apps Ubuntu][90]
##### GNOME/Unity Tweak Tool
这些调整工具是每个 Ubuntu 用户必备的。它们允许你访问一些高级系统设置。最重要的是,你可以使用这些调整工具 [改变 Ubuntu 的主题][91]。
##### UFW Firewall
[UFW][92] 意指“不复杂的防火墙”这一点是贴切的。UFW 为家庭、工作和公共网络预先定义了防火墙设置。
##### Stacer
如果你想释放 Ubuntu 的存储空间,可以试试 Stacer。这个图形化工具可以让你通过删除不必要的文件和完全卸载软件来 [优化你的 Ubuntu 系统][93]。可以从 [官网][94] 下载 Stacer。
#### 其他工具
![Utilities Ubuntu][95]
最后,我会列一些其他我很喜欢但无法归类的 Ubuntu 应用。
##### Neofetch
又多了一个命令行工具Neofetch 可以显示你的系统信息,如 [Ubuntu 版本][96]、桌面环境、主题、图标、内存和其他信息,并附有 [发行版的 ASCII 徽标][97]。使用以下命令安装 Neofetch。
```
sudo apt install neofetch
```
##### Etcher
Ubuntu 已经带有一个即用 USB 创建工具,但 Etcher 能更好地完成这项任务。它同样支持 Windows 和 macOS。你可以 [点击这里][98] 下载 Etcher。
##### gscan2pdf
我使用这个小工具的唯一目的是 [将图片转换为 PDF][99]。你也可以用它将多张图片合并成一个 PDF 文件。
##### 音频记录器
另一个小巧而又必不可少的 Ubuntu 应用,用于 [在 Ubuntu 上录制音频][100]。你可以用它来录制来自系统麦克风、音乐播放器或任何其他来源的声音。
### 你对 Ubuntu 关键应用的建议?
我想在这里结束我的优秀 Ubuntu 应用清单。我知道你可能不需要或使用所有的应用,但我确信你会喜欢这里列出的大部分应用。
你是否找到几款以前从未知道的应用呢?如果要你推荐最爱的 Ubuntu 应用,你会选择哪个呢?
最后,如果你觉得这篇文章有用,请把它分享到社交媒体或其他你常访问的社区或论坛。这样,你也帮助了我们的成长 :)
--------------------------------------------------------------------------------
via: https://itsfoss.com/best-ubuntu-apps/
作者:[Abhishek Prakash][a]
选题:[lujun9972](https://github.com/lujun9972)
译者:[LikChung](https://github.com/LikChung)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://itsfoss.com/author/abhishek/
[1]:https://linux.cn/article-12183-1.html
[2]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/best-ubuntu-apps-featured.jpeg
[3]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/google-chrome.jpeg
[4]:https://www.google.com/chrome/
[5]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/brave-browser-icon.jpeg
[6]:https://itsfoss.com/open-source-browsers-linux/
[7]:https://brave.com/
[8]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/music-apps-ubuntu.jpeg
[9]:https://itsfoss.com/sayonara-music-player/
[10]:https://www.audacityteam.org/
[11]:https://itsfoss.com/musicbrainz-picard/
[12]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/streaming-music-apps-ubuntu.jpeg
[13]:https://www.spotify.com//
[14]:https://linux.cn/article-9415-1.html
[15]:https://tiliado.eu/nuvolaplayer/
[16]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/Video-Players-linux.jpg
[17]:https://www.videolan.org/index.html
[18]:https://linux.cn/article-11776-1.html
[19]:https://mpv.io/
[20]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/dropbox-icon.jpeg
[21]:https://www.dropbox.com/
[22]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/pcloud-icon.jpeg
[23]:https://itsfoss.com/recommends/pcloud/
[24]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/gimp-icon.jpeg
[25]:https://www.gimp.org/
[26]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/inkscape-icon.jpeg
[27]:https://inkscape.org/en/
[28]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/paint-apps-ubuntu.jpeg
[29]:https://krita.org/en/
[30]:https://pinta-project.com/pintaproject/pinta/
[31]:https://itsfoss.com/image-applications-ubuntu-linux/
[32]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/digikam-icon.jpeg
[33]:https://www.digikam.org/
[34]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/darktable-icon.jpeg
[35]:https://www.darktable.org/
[36]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/video-editing-apps-ubuntu.jpeg
[37]:https://linux.cn/article-10185-1.html
[38]:https://kdenlive.org/en/
[39]:https://shotcut.org/
[40]:https://itsfoss.com/format-factory-alternative-linux/
[41]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/xnconvert-logo.jpeg
[42]:https://www.xnview.com/en/xnconvert/
[43]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/handbrake-logo.jpeg
[44]:https://handbrake.fr/
[45]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/screen-recording-ubuntu-apps.jpeg
[46]:http://shutter-project.org/
[47]:https://launchpad.net/kazam
[48]:https://itsfoss.com/best-linux-screen-recorders/
[49]:https://www.youtube.com/c/itsfoss?sub_confirmation=1
[50]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/libre-office-logo.jpeg
[51]:https://www.libreoffice.org/download/download/
[52]:https://linux.cn/article-9379-1.html
[53]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/wps-office-logo.jpeg
[54]:http://wps-community.org/
[55]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/download-apps-ubuntu.jpeg
[56]:https://linux.cn/article-9244-1.html
[57]:http://ugetdm.com/
[58]:https://itsfoss.com/4-best-download-managers-for-linux/
[59]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/coding-apps-ubuntu.jpeg
[60]:https://atom.io/
[61]:https://linux.cn/article-7468-1.html
[62]:https://itsfoss.com/install-visual-studio-code-ubuntu/
[63]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/pdf-management-apps-ubuntu.jpeg
[64]:https://calibre-ebook.com/
[65]:https://linux.cn/article-7977-1.html
[66]:https://itsfoss.com/pdf-editors-linux/
[67]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/messaging-apps-ubuntu.jpeg
[68]:https://itsfoss.com/best-messaging-apps-linux/
[69]:https://www.skype.com/en/
[70]:https://rambox.pro/
[71]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/simplenote-logo.jpeg
[72]:http://simplenote.com/
[73]:https://automattic.com/
[74]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/remember-the-milk-logo.jpeg
[75]:https://itsfoss.com/remember-the-milk-linux/
[76]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/encryption-apps-ubuntu.jpeg
[77]:https://linux.cn/article-9377-1.html
[78]:https://itsfoss.com/password-protect-folder-linux/
[79]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/gaming-ubuntu.jpeg
[80]:https://linux.cn/article-7316-1.html
[81]:https://store.steampowered.com/
[82]:https://itsfoss.com/free-linux-games/
[83]:https://www.playonlinux.com/en/
[84]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/package-management-apps-ubuntu.jpeg
[85]:https://itsfoss.com/how-to-add-remove-programs-in-ubuntu/
[86]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/backup-recovery-tools-ubuntu.jpeg
[87]:https://linux.cn/article-11619-1.html
[88]:https://www.cgsecurity.org/wiki/TestDisk
[89]:https://linux.cn/article-7974-1.html
[90]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/system-maintenance-apps-ubuntu.jpeg
[91]:https://itsfoss.com/install-themes-ubuntu/
[92]:https://wiki.ubuntu.com/UncomplicatedFirewall
[93]:https://itsfoss.com/optimize-ubuntu-stacer/
[94]:https://github.com/oguzhaninan/Stacer
[95]:https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/07/utilities-apps-ubuntu.jpeg
[96]:https://itsfoss.com/how-to-know-ubuntu-unity-version/
[97]:https://itsfoss.com/display-linux-logo-in-ascii/
[98]:https://etcher.io/
[99]:https://itsfoss.com/convert-multiple-images-pdf-ubuntu-1304/
[100]:https://itsfoss.com/record-streaming-audio/

View File

@ -0,0 +1,131 @@
[#]: collector: (lujun9972)
[#]: translator: (this-is-name-right)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12448-1.html)
[#]: subject: (How to build a WiFi picture frame with a Raspberry Pi)
[#]: via: (https://opensource.com/article/19/2/wifi-picture-frame-raspberry-pi)
[#]: author: (Manuel Dewald https://opensource.com/users/ntlx)
如何用树莓派制作 WiFi 相框
======
> DIY一个数码相框图片流来自云端。
![](https://img.linux.net.cn/data/attachment/album/202007/24/212836agkae2776gude1cb.jpg)
数码相框真的很好,因为它可以让你查看你自己的相片而不必打印出来。更棒的是,当你想要展示一张新的相片的时候,增加和删除数字图片要比打开传统的相框然后替换里面的相框更简单。不过,这还是需要一点手动的操作,比如从数字相框取出 SD 卡、U 盘或者其他的存储介质,然后把存储介质接入电脑,接着再复制图片进入存储介质。
一个更简单的选项是数字相框通过 WiFi 获得图片,例如从云端服务器获得。下面就是如何制作这样的一个数字相框。
### 需要使用的材料
* 老式 [TFT][1] 的 LCD 显示屏
* HDMI 到 DVI 的转接线(因为 TFT 屏幕支持 DVI
* 树莓派 3
* Micro SD 卡
* 树莓派的电源
* 键盘
* 鼠标(可选)
使用线缆连接树莓派到显示器,并连接电源。
### 安装 Raspbian
按照以下[指示][2]下载并将 Raspbian 烧录到 Micro SD 卡中。将 Micro SD 卡插入树莓派,启动它,并配置你的 WiFi。在安装完 Raspbian 后,我的第一个操作通常是运行 `sudo raspi-config`。在那里,我在网络选项中更改主机名(例如,改为 `picframe`),并在接口选项中启用 SSH 以远程连接到树莓派。使用(例如)`ssh pi@picframe` 连接到树莓派。
### 建立并安装云客户端
我使用 [Nextcloud][3] 来同步我的图片,但是你可以使用 NFS、[Dropbox][4],或者其他的适合你的需求的方式上传图片到相框。
如果你使用 Nextcloud请按照[以下说明][5]在 Raspbian 上安装客户端。这可以很方便的放图片到你的相框,并且你可能很熟悉安装在台式机的这个客户端应用。当连接客户端到 Nextcloud 服务器上的时候,请确保只选择存储你要在相框上显示的图片的文件夹。
### 设置幻灯片放映
我发现设置幻灯片放映最简单的方式是使用一个专门为这个目的建立的[轻量级的幻灯片项目][6]。还有一些备用方案,像是配置屏保,这个应用似乎是最最简单设置幻灯片放映的方式了。
在你的树莓派上下载最新的二进制程序,解包并移动到一个可执行的文件夹里:
```
wget https://github.com/NautiluX/slide/releases/download/v0.9.0/slide_pi_stretch_0.9.0.tar.gz
tar xf slide_pi_stretch_0.9.0.tar.gz
mv slide_0.9.0/slide /usr/local/bin/
```
安装依赖关系:
```
sudo apt install libexif12 qt5-default
```
通过执行下面的命令播放幻灯片(不要忘记修改图片的路径)。如果你通过 SSH 访问你树莓派,设置 `DISPLAY` 变量来在连接到树莓派显示屏上开始播放幻灯片。
```
DISPLAY=:0.0 slide -p /home/pi/nextcloud/picframe
```
### 自动播放幻灯片
为了在 Raspbian Stretch 上自动播放幻灯片,建立如下的文件夹并且添加一个 `autostart` 文件到里面:
```
mkdir -p /home/pi/.config/lxsession/LXDE/
vi /home/pi/.config/lxsession/LXDE/autostart
```
在文件中输入如下的命令来自动开启幻灯片。`slide` 命令可以调整到你需要的地方:
```
@xset s noblank
@xset s off
@xset -dpms
@slide -p -t 60 -o 200 -p /home/pi/nextcloud/picframe
```
禁止屏幕空白,树莓派通常会在 10 分钟后这样做,通过编辑下面的文件修改:
```
vi /etc/lightdm/lightdm.conf
```
添加这两行到文件末尾:
```
[SeatDefaults]
xserver-command=X -s 0 -dpms
```
### 配置上电时间
你可以安排你的相框什么时候打开和关闭通过使用两个简单的定时任务。例如,你想在上午 7 点自动打开,在晚上 11 点自动关闭。运行 `crontab -e` 并且输入下面的两行:
```
0 23 * * * /opt/vc/bin/tvservice -o
0 7 * * * /opt/vc/bin/tvservice -p && sudo systemctl restart display-manager
```
注意这不会打开或关闭树莓派的电源;这只会关闭 HDMI它会关闭屏幕。第一行命令将在晚上 11 点关闭 HDMI。第二行将在早上 7 点打开显示屏并重启显示器管理器。
### 附言
通过这些简单的步骤,你创建了你自己 WiFi 相框。如果你想要让它更好看,为显示屏做一个木质相框吧。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/2/wifi-picture-frame-raspberry-pi
作者:[Manuel Dewald][a]
选题:[lujun9972][b]
译者:[this-is-name-right](https://github.com/this-is-name-right)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/ntlx
[b]: https://github.com/lujun9972
[1]: https://en.wikipedia.org/wiki/Thin-film-transistor_liquid-crystal_display
[2]: https://www.raspberrypi.org/documentation/installation/installing-images/README.md
[3]: https://nextcloud.com/
[4]: http://dropbox.com/
[5]: https://github.com/nextcloud/client_theming#building-on-debian
[6]: https://github.com/NautiluX/slide/releases/tag/v0.9.0

View File

@ -0,0 +1,86 @@
[#]: collector: (lujun9972)
[#]: translator: (JonnieWayy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12441-1.html)
[#]: subject: (Book Review: A Byte of Vim)
[#]: via: (https://itsfoss.com/book-review-a-byte-of-vim/)
[#]: author: (John Paul https://itsfoss.com/author/john/)
《A Byte of Vim》书评
======
[Vim][1] 是一个简单而又强大的文本编辑工具。大多数新用户都会被它吓倒因为它不像常规的图形化文本编辑器那样“工作”。Vim “不寻常”的键盘快捷键让人不知道[如何保存并退出 Vim][2]。但一旦你掌握了 Vim就没有什么能比得上它了。
网上有大量的 [Vim 资源][3]。我们也在介绍了一些 Vim 技巧。除了线上资源,也有很多书致力于介绍这个编辑器。今天,我们要介绍的是一本旨在使大多数用户轻松理解 Vim 的书。我们将讨论的书是 [Swaroop C H][5] 撰写的《[A Byte of Vim][4]》。
本书作者 [Swaroop C H][5] 已经在计算机领域工作了十余年,他曾在 Yahoo 和 Adobe 工作过。大学毕业后,他卖过 Linux CD也曾多次创业也是一个创建了一个名为 ion 的 iPod 充电器的团队的联合创始人。他目前是 [Helpshift][7] AI 团队的工程经理。
### 《A Byte of Vim》
![][8]
像所有好书一样《A Byte of Vim》一开始就谈到了什么是 Vim“一个用于写各类文本的计算机程序。”他接着说“Vim 之所以与众不同,是因为它是为数不多的既简单又强大的软件之一。”
在深入讲解如何使用 Vim 之前Swaroop 先告诉读者如何在 Windows、Mac、Linux 和 BSD 上安装 Vim。安装完成后他进而指导读者完成如何启动 Vim以及如何创建第一个文件。
接着Swaroop 讨论了 Vim 的不同模式,以及如何通过 Vim 的键盘快捷键来浏览文档。接着是使用 Vim 编辑文档的基础知识,包括如何在 Vim 中剪切/复制/粘帖以及撤销/重做。
在介绍了编辑基础知识后Swaroop 介绍了如何使用 Vim 来编辑单个文档的多个部分。你也可以使用多个标签和窗口来同时编辑多个文档。
本书还涵盖了通过编写脚本和安装插件来扩展 Vim 的功能。在 Vim 中使用脚本有两种方法,一种是使用 Vim 的内置脚本语言,另一种是使用 Python 或 Perl 等编程语言来访问 Vim 的内核。可以编写或下载五种类型的 Vim 插件vimrc、全局插件、文件类型插件、语法高亮插件和编译器插件。
在一个单独的章节中Swaroop C H 介绍了使 Vim 更适合编程的特点。这些功能包括语法高亮、智能缩进、对 Shell 命令的支持、全局补全以及可用作 IDE 使用的功能。
#### 获取《A Byte of Vim》一书并为之贡献
《A Byte of Vim》按照 [共创协议 4.0][10]授权。读者可以在[作者的主页][4]上免费阅读其在线版本。你也可以免费下载其 [PDF][11]、[Epub][12] 或者 [Mobi][13] 版本。
- [免费获取《A Byte of Vim》][4]
如果你更喜欢阅读[纸质版本][14],你也可以选择该方式。
请注意,**《A Byte of Vim》的初始版本写于 2008**,并转换为 PDf。不幸的是Swaroop CH丢失了原始源文件。他正在努力将该书转换为 [Markdown][15]。如果你想提供帮助,请访问[该书的 GitHub 页面][16]。
#### 结语
当我初次对着 Vim 生气时我不知道该怎么办。我希望那时候我就知道《A Byte of Vim》这本书。对于任何学习 Linux 的人来说,这本书都是不错的资源,特别是当你开始学习命令行的时候。
你读过 Swaroop C H 的《[A Byte of Vim][4]》吗?如果读过,你是如何找到它的?如果不是,那么你最喜欢关于开源主题的是哪本书?请在下方评论区告诉我们。
--------------------------------------------------------------------------------
via: https://itsfoss.com/book-review-a-byte-of-vim/
作者:[John Paul][a]
选题:[lujun9972][b]
译者:[JonnieWayy](https://github.com/JonnieWayy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/john/
[b]: https://github.com/lujun9972
[1]: https://www.vim.org/
[2]: https://itsfoss.com/how-to-exit-vim/
[3]: https://linuxhandbook.com/basic-vim-commands/
[4]: https://vim.swaroopch.com/
[5]: https://swaroopch.com/
[6]: https://swaroopch.com/about/
[7]: https://www.helpshift.com/
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/06/Byte-of-vim-book.png?resize=800%2C450&ssl=1
[9]: https://itsfoss.com/4mlinux-review/
[10]: https://creativecommons.org/licenses/by/4.0/
[11]: https://www.gitbook.com/download/pdf/book/swaroopch/byte-of-vim
[12]: https://www.gitbook.com/download/epub/book/swaroopch/byte-of-vim
[13]: https://www.gitbook.com/download/mobi/book/swaroopch/byte-of-vim
[14]: https://swaroopch.com/buybook/
[15]: https://itsfoss.com/best-markdown-editors-linux/
[16]: https://github.com/swaroopch/byte-of-vim#status-incomplete
[17]: https://i2.wp.com/images-na.ssl-images-amazon.com/images/I/41itW8furUL._SL160_.jpg?ssl=1
[18]: https://www.amazon.com/Mastering-Vim-Quickly-WTF-time/dp/1983325740?SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=1983325740 (Mastering Vim Quickly: From WTF to OMG in no time)
[19]: https://www.amazon.com/gp/prime/?tag=chmod7mediate-20 (Amazon Prime)
[20]: https://www.amazon.com/Mastering-Vim-Quickly-WTF-time/dp/1983325740?SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=1983325740 (Buy on Amazon)
[21]: https://itsfoss.com/iridium-browser-review/
[22]: http://reddit.com/r/linuxusersgroup

View File

@ -0,0 +1,268 @@
[#]: collector: (lujun9972)
[#]: translator: (silentdawn-zz)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12452-1.html)
[#]: subject: (Sending custom emails with Python)
[#]: via: (https://opensource.com/article/19/8/sending-custom-emails-python)
[#]: author: (Brian "bex" Exelbierd https://opensource.com/users/bexelbie)
使用 Mailmerge 发送定制邮件
======
> Mailmerge 是一个可以定制群发邮件的命令行程序,它可以处理简单和复杂的邮件。
![](https://img.linux.net.cn/data/attachment/album/202007/25/233710lqkvko0jdbh1jzul.jpg)
电子邮件还是生活的一部分,尽管有种种不足,它仍然是大多数人发送信息的最佳方式,尤其是在按队列将邮件发送给收件人的自动化方式中。
作为 [Fedora 社区行动和影响协调员][2],我的工作之一就是给人们发送资助旅行相关的好消息,我经常通过电子邮件做这些事。这里,我将给你展示如何使用 [Mailmerge][3] 向一群人发送定制邮件的Mailmerge 是一个可以处理简单和复杂的邮件的命令行程序。
### 安装 Mailmerge
在 Fedora 中Mailmerge 已经打包可用,你可以通过在命令行中运行 `sudo dnf install python3-mailmerge` 来安装它。你还可以使用 `pip` 命令从 PyPi 中安装,具体可以参阅该项目的 [README][4]。
### 配置 Mailmerge
三个配置文件控制着 Mailmerge 的工作模式。运行 `mailmerge --sample`,将生成配置文件模板。这些文件包括:
* `mailmerge_server.conf:` 这里保存着 SMTP 服务端邮件发送相关详细配置,但你的密码 *不* 在这里保存。
* `mailmerge_database.csv:` 这里保存每封邮件的定制数据,包括收件人的电子邮件地址。
* `mailmerge_template.txt:` 这里保存电子邮件的文本,文本中包含占位符,这些占位符会使用 `mailmerge_database.csv` 中的数据替换。
#### Server.conf
配置模板文件 `mailmerge_server.conf` 包含几个大家应该很熟悉的例子。如果你曾经往手机上添加过电子邮件或者设置过桌面电子邮件客户端,那你就应该看到过这些数据。需要提醒的是要记得把你的用户名更新到这个文件中,尤其是在你使用模板所提供的配置时。
#### Database.csv
`mailmerge_database.csv` 这个配置文件稍微有点复杂。最起码要将邮件接收者的电子邮件地址保存在这里,其它在电子邮件中任何需要替换的定制信息也要保存在这里。推荐在创建本文件的占位符列表时,同步编辑 `mailmerge_template.txt` 文件。我发现一个有效的做法是,使用电子表格软件录入这些数据,完成后导出为 CSV 文件。使用下面的示例文件:
```
email,name,number
myself@mydomain.com,"Myself",17
bob@bobdomain.com,"Bob",42
```
可以你向这两个人发送电子邮件,使用他们的名字并告诉他们一个数字。这个示例文件虽然不是特别有趣,但应用了一个重要的原则,那就是:始终让自己处于邮件接收列表的首位。这样你可以在向列表全员发送邮件之前,先给自己发送一个测试邮件,以验证邮件的效果是否如你预期。
任何包含半角逗号的值,都 **必须** 以半角双引号(`"`)封闭。如果恰好在半角双引号封闭的区域需要有一个半角双引号,那就在同一行中连续使用两个半角双引号。引号的规则比较有趣,去 [Python 3 中关于 CSV 的内容中][7] 一探究竟吧。
#### Template.txt
我的工作之一,就是为我们 Fedora 贡献者会议 [Flock][8] 发送与旅行基金有关的信息。通过简单的邮件告诉有关的人,他被选中为旅行基金支持的幸运者,以及相应基金支持的详细信息。与接收者相关的具体信息之一就是我们可以为他的旅行提供多少资助。下面是一份我的节略后的模板文件(为了简洁,已经移除大量的文本):
```
$ cat mailmerge_template.txt
TO: {{Email}}
SUBJECT: Flock 2019 Funding Offer
FROM: Brian Exelbierd <bexelbie@redhat.com>
Hi {{Name}},
I am writing you on behalf of the Flock funding committee. You requested funding for your attendance at Flock. After careful consideration we are able to offer you the following funding:
Travel Budget: {{Travel_Budget}}
<<snip>>
```
模板的起头定义了邮件的接收者、发送者和主题。在空行之后,是邮件的内容。该邮件需要从 `database.csv` 文件中获取接收者的 `Email` 、`Name` 和 `Travel_Budget` 。注意,上述这些占位符是由双大括弧( `{{`、`}}` )封闭的。相应的 `mailmerge_database.csv` 如下:
```
$ cat mailmerge_database.csv
Name,Email,Travel_Budget
Brian,bexelbie@redhat.com,1000
PersonA,persona@fedoraproject.org,1500
PèrsonB,personb@fedoraproject.org,500
```
注意,我把自己的信息放在了首条,这是为了测试方便。除了我,还有另外两个人的信息在文档中。列表中的第二个人 PèrsonB他的名字中有一个包含变音符号的字母Mailmerge 会对这类字母自动编码。
以上包含了模板的全部知识点:写上你自己的电子邮件信息,并编写好以双大括弧封闭的占位符。接下来创建用来提供前述占位符具体值的数据文件。现在测试一下电子邮件的效果。
### 测试并发送简单邮件
#### 试运行
测试从邮件的试运行开始,试运行就是讲邮件内容显示出来,所有的占位符都会被具体值取代。默认情况下,如果你运行不带参数的命令 `mailmerge`,它将对收件列表中的第一个人进行试运行:
```
$ mailmerge
>>> encoding ascii
>>> message 0
TO: bexelbie@redhat.com
SUBJECT: Flock 2019 Funding Offer
FROM: Brian Exelbierd <bexelbie@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Sat, 20 Jul 2019 18:17:15 -0000
Hi Brian,
I am writing you on behalf of the Flock funding committee. You requested funding for your attendance at Flock. After careful consideration we are able to offer you the following funding:
Travel Budget: 1000
<<snip>>
>>> sent message 0 DRY RUN
>>> No attachments were sent with the emails.
>>> Limit was 1 messages. To remove the limit, use the --no-limit option.
>>> This was a dry run. To send messages, use the --no-dry-run option.
```
从试运行生成的邮件中(列表中的 `message 0` ,和计算机中很多计数场景一样,计数从 0 开始),可以看到我的名字及旅行预算是正确的。如果你想检视所有的邮件,运行 `mailmerge --no-limit`,告诉 Mailmerge 不要仅仅处理第一个收件人的信息。下面是第三个收件人邮件的试运行结果,用来测试特殊字符的编码:
```
>>> message 2
TO: personb@fedoraproject.org
SUBJECT: Flock 2019 Funding Offer
FROM: Brian Exelbierd <bexelbie@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Date: Sat, 20 Jul 2019 18:22:48 -0000
Hi P=E8rsonB,
```
没有问题,`P=E8rsonB` 是 `PèrsonB` 的编码形式。
#### 发送测试信息
现在,运行 `mailmerge --no-dry-run`Mailmerge 将向收件人列表中的第一个人发送电子邮件:
```
$ mailmerge --no-dry-run
>>> encoding ascii
>>> message 0
TO: bexelbie@redhat.com
SUBJECT: Flock 2019 Funding Offer
FROM: Brian Exelbierd <bexelbie@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Sat, 20 Jul 2019 18:25:45 -0000
Hi Brian,
I am writing you on behalf of the Flock funding committee. You requested funding for your attendance at Flock. After careful consideration we are able to offer you the following funding:
Travel Budget: 1000
<<snip>>
>>> Read SMTP server configuration from mailmerge_server.conf
>>> host = smtp.gmail.com
>>> port = 587
>>> username = bexelbie@redhat.com
>>> security = STARTTLS
>>> password for bexelbie@redhat.com on smtp.gmail.com:
>>> sent message 0
>>> No attachments were sent with the emails.
>>> Limit was 1 messages. To remove the limit, use the --no-limit option.
```
在倒数第 4 行,它将要求你输入你的密码。如果你使用的是双因素认证或者域控制登录,那就需要创建应用密码来绕过这些控制。如果你使用的是 Gmail 或者类似的系统,可以直接在界面上完成密码验证。如果不行的话,联系你的邮件系统管理员。上述这些操作不会影响邮件系统的安全性,但是仍然有必要采用复杂的安全性好的密码。
我在我的邮件收件箱中,看到了这封格式美观的测试邮件。如果测试邮件看起来没有问题,那就可以运行 `mailmerge --no-dry-run --no-limit` 发送所有的邮件了。
### 发送复杂邮件
只有充分了解了 [Jinja2 模板][12] ,你才可能充分领略 Mailmerge 真正的威力。在邮件模板中使用条件语句及附带附件,是很有用的。下面就是一个复杂邮件的模板及对应的数据文件:
```
$ cat mailmerge_template.txt
TO: {{Email}}
SUBJECT: Flock 2019 Funding Offer
FROM: Brian Exelbierd <bexelbie@redhat.com>
ATTACHMENT: attachments/{{File}}
Hi {{Name}},
I am writing you on behalf of the Flock funding committee. You requested funding for your attendance at Flock. After careful consideration we are able to offer you the following funding:
Travel Budget: {{Travel_Budget}}
{% if Hotel == "Yes" -%}
Lodging: Lodging in the hotel Wednesday-Sunday (4 nights)
{%- endif %}
<<snip>>
$ cat mailmerge_database.csv
Name,Email,Travel_Budget,Hotel,File
Brian,bexelbie@redhat.com,1000,Yes,visa_bex.pdf
PersonA,persona@fedoraproject.org,1500,No,visa_person_a.pdf
PèrsonB,personb@fedoraproject.org,500,Yes,visa_person_b.pdf
```
在这个邮件中有两项新内容。首先是附件,我需要向参加国际旅行的人发送签证邀请信,帮助他们来 Flock文件头的 `ATTACHMENT` 部分说明了要包含什么文件;为了保持我的文档目录清晰,我将所有需要作为附件的文档保存于附件子目录下。其次是包含了关于宾馆的条件信息,因为有些人的旅行资金包含了住宿费用,我需要对涉及住宿的人员诉及相关信息,而这是通过 `if` 判断实现的:
```
{% if Hotel == "Yes" -%}
Lodging: Lodging in the hotel Wednesday-Sunday (4 nights)
{%- endif %}
```
这和大多数编程语言中的 `if` 判断是一样的。Jinja2 实力非凡,可以实现多级判断。通过包含数据元素控制邮件内容,能大大简化相关的日常工作。空格的正确使用对邮件的易读性很重要。`if` 和 `endif` 语句中的短线( `-` )是 Jinja2 控制 [空白字符][13] 的一部分。这里面选项很多,所以还是要通过试验找到最适合自己的方式。
在上面的例子中,我在数据文件扩充了 `Hotel``File` 两个字段,这些字段的值控制着宾馆信息和附件文件名。另外,在上例中,我和 PèrsonB 有住宿资助,但 PersonA 没有。
对于简单邮件和复杂邮件而言,试运行及正式发送邮件的操作都是相同的。快去试试吧!
你还可以尝试在邮件头中使用条件判断( `if``endif` ),比如你可以使发送给在数据库中的某人的邮件包含附件,或者改变对部分人改变发送人的信息。
### Mailmerge 的优点
Mailmerge 是用来批量发送定制邮件的简洁而高效的工具。每个人只接受到他需要的信息,其它额外的操作和细节都是透明的。
我还发现,即使是在发送简单的集团邮件时,相对于使用 CC 或者 BCC 向一组受众发送一封邮件,采用 Mailmerge 也是非常高效的。很多人使用了邮件过滤,那些不是直接发给他们的邮件,他们一律不会立刻处理。使用 Mailmerge 保证了每名接收者收到的就是自己的邮件。所有的信息会对接收者进行正确过滤,再也不会有人无意间回复到整个邮件组。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/8/sending-custom-emails-python
作者:[Brian "bex" Exelbierd][a]
选题:[lujun9972][b]
译者:[silentdawn-zz](https://github.com/silentdawn-zz)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/bexelbie
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/email_chat_communication_message.png?itok=LKjiLnQu (Chat via email)
[2]: https://docs.fedoraproject.org/en-US/council/fcaic/
[3]: https://github.com/awdeorio/mailmerge
[4]: https://github.com/awdeorio/mailmerge#install
[5]: mailto:myself@mydomain.com
[6]: mailto:bob@bobdomain.com
[7]: https://docs.python.org/3/library/csv.html
[8]: https://flocktofedora.org/
[9]: mailto:bexelbie@redhat.com
[10]: mailto:persona@fedoraproject.org
[11]: mailto:personb@fedoraproject.org
[12]: http://jinja.pocoo.org/docs/latest/templates/
[13]: http://jinja.pocoo.org/docs/2.10/templates/#whitespace-control

View File

@ -0,0 +1,70 @@
[#]: collector: (lujun9972)
[#]: translator: (silentdawn-zz)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12459-1.html)
[#]: subject: (4 Python tools for getting started with astronomy)
[#]: via: (https://opensource.com/article/19/10/python-astronomy-open-data)
[#]: author: (Gina Helfrich, Ph.D. https://opensource.com/users/ginahelfrich)
开启天文之路的 4 个 Python 工具
======
> 使用 NumPy、SciPy、Scikit-Image 和 Astropy 探索宇宙
![](https://img.linux.net.cn/data/attachment/album/202007/27/223146sjfgbj9jfu9m1z2c.jpg)
### 天文学与 Python
对科学界而言尤其是对天文学界来说Python 是一种伟大的语言工具。各种软件包,如 [NumPy][5]、[SciPy][6]、[Scikit-Image][7] 和 [Astropy][8],(仅举几例) ,都充分证明了 Python 对天文学的适用性而且有很多用例。NumPy、Astropy 和 SciPy 是 NumFOCUS 提供资金支持的项目Scikit-Image 是个隶属项目。我在十几年前脱离天文研究领域成为了软件开发者之后对这些工具包的演进一直很感兴趣。我的很多前天文界同事在他们的研究中使用着前面提到的大部分甚至是全部工具包。以我为例我也曾为位于智利的超大口径望远镜VLT上的仪器编写过专业天文软件工具包。
最近令我吃惊的是Python 工具包竟然演进到如此好用,任何人都可以轻松编写 <ruby>[数据还原][9]<rt>data reduction</rt></ruby> 脚本,产生出高质量的数据产品。天文数据易于获取,而且大部分是可以公开使用的,你要做的只是去寻找相关数据。
比如,负责 VLT 运行的 ESO直接在他们的网站上提供数据下载服务只要访问 [www.eso.org/UserPortal][10] 并在首页创建用户就可以享有数据下载服务。如果你需要 SPHERE 数据,可以下载附近任何一个包含<ruby>系外行星<rt>exoplanet</rt></ruby>或者<ruby>原恒星盘<rt>proto-stellar discs</rt></ruby>的恒星的全部数据集。对任何 Python 高手而言,通过还原数据发现深藏于噪声中的行星或者原恒星盘,实在是件令人兴奋的事。
我鼓励你下载 ESO 或其它天文影像数据,开启你的探索历程。这里提供几条建议:
1. 首先要有一个高质量的数据集。看一些有关包含系外行星或者原恒星盘的较近恒星的论文,然后在 <http://archive.eso.org/wdb/wdb/eso/sphere/query> 之类的网站检索数据。需要注意的是,前述网站上的数据有的标注为红色,有的标注为绿色,标注为红色的数据是尚未公开的,在相应的“发布日期”处会注明数据将来公开的时间。
2. 了解一些用于获取你所用数据的仪器的信息。尽量对数据的获取有一个基本的理解,对标准的数据还原之后应该是什么样子做到心中有数。所有的望远镜和仪器都有这方面的文档供公开获取。
3. 必须考虑天文数据的标准问题,并予以校正:
1. 数据以 FITS 格式文件保存。需要使用 `pyfits` 或者 `astropy` (包含 `pyfits` )将其读入到 `NumPy` 数组。有些情况下,数据是三维的,需要沿 z 轴使用 `numpy.median` 将数据转换为二维数组。有些 SPHERE 数据在同一幅影像中包含了同一片天空的两份拷贝(各自使用了不同的滤波器),这时候需要使用 **索引****切片** 将它们分离出来。
2. <ruby>全黑图<rt>master dark</rt></ruby><ruby>坏点图<rt>bad pixel map</rt></ruby>。所有仪器都有快门全关(完全无光)状态拍摄的特殊图片,使用 **NumPy 掩膜数组** 从中分离出坏点图。坏点图非常重要,你在合成最终的清晰图像过程中,需要持续跟踪坏点。有些情况下,这还有助于你从原始科学数据中扣除暗背景的操作。
3. 一般情况下,天文仪器还要拍<ruby>标准响应图<rt>master flat frame</rt></ruby>。这是对均匀的单色标准光源拍摄的一张或者一组图片。你需要将所有的原始数据除以标准响应之后再做后续处理(同样,使用 Numpy 掩膜数组实现的话,这仅仅是一个简单的除法运算)。
4. 对行星影像,为了使行星在明亮恒星背景下变得可见,需要仰仗<ruby>日冕仪<rt>coronagraph</rt></ruby><ruby>角差分成像<rt>angular differential imaging</rt></ruby>技术。这一步需要识别影像的光学中心,这是比较棘手的环节之一,过程中要使用 `skimage.feature.blob_dog` 从原始影像中寻找一些人工辅助影像作为帮助。
4. 要有耐心。理解数据格式并弄清如何操作需要一些时间,绘出像素数据曲线图或者统计图有助于你的理解。贵在坚持,必有收获!你会从中学到很多关于图像数据及其处理的知识。
综合应用 NumPy、SciPy、Astropy、scikit-image 及其它工具,结合耐心和恒心,通过分析大量可用的天文数据分析实现重大的发现是非常有可能的。说不定,你会成为某个之前被忽略的系外行星的第一发现者呢。祝你好运!
---
NumFOCUS 是个非盈利组织,维护着一套科学计算与数据科学方面的杰出开源工具集。如果想了解我们的任务及代码,可以访问 [numfocus.org][3]。如果你有兴趣以个人身份加入 NumFOCUS 社区,可以关注你所在地区的 [PyData 活动][4]。
本文基于 Pivigo CTO [Ole Moeller-Nilsson][12] 的一次 [谈话][11],最初发布于 NumFOCUS 的博客,蒙允再次发布。如果你有意支持 NumFOCUS可以 [捐赠][13],也可以参与遍布全球的 [PyData 活动][4] 中你身边的那些。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/10/python-astronomy-open-data
作者:[Gina Helfrich, Ph.D.][a]
选题:[lujun9972][b]
译者:[silentdawn-zz](https://github.com/silentdawn-zz)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/ginahelfrich
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/space_stars_cosmos_person.jpg?itok=XUtz_LyY (Person looking up at the stars)
[2]: https://numfocus.org/blog
[3]: https://numfocus.org
[4]: https://pydata.org/
[5]: http://numpy.scipy.org/
[6]: http://www.scipy.org/
[7]: http://scikit-image.org/
[8]: http://www.astropy.org/
[9]: https://en.wikipedia.org/wiki/Data_reduction
[10]: http://www.eso.org/UserPortal
[11]: https://www.slideshare.net/OleMoellerNilsson/pydata-lonon-finding-planets-with-python
[12]: https://twitter.com/olly_mn
[13]: https://numfocus.org/donate

View File

@ -1,8 +1,8 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12462-1.html)
[#]: subject: (Foliate: A Modern eBook Reader App for Linux)
[#]: via: (https://itsfoss.com/foliate-ebook-viewer/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
@ -10,21 +10,23 @@
Foliate适用于 Linux 的现代电子书阅读器应用
======
_ **简介:Foliate 是一款简洁、优雅的开源电子书阅读器,可在 Linux 桌面上提供类似 Kindle 的阅读体验。** _
> Foliate 是一款简洁、优雅的开源电子书阅读器,可在 Linux 桌面上提供类似 Kindle 的阅读体验。
### Foliate 在 Linux 桌面上提供现代阅读体验
![](https://img.linux.net.cn/data/attachment/album/202007/28/230931vpsyu25yua8855u3.jpg)
虽然我们已经有了一个 [Linux 最佳电子书阅读器][2]的列表,但最近我遇到了另一个 Linux 电子书阅读器。它叫 [Foliate][3]。
![][1]
虽然我们已经有了 [Linux 最佳电子书阅读器][2]的列表,但最近我遇到了另一个 Linux 电子书阅读器。它叫 [Foliate][3]
Foliate 是一个现代的 GTK 电子书查看器,它有许多基本功能。如果你拥有亚马逊 Kindle 或其他电子书阅读器,那么你可能会想念那种在桌面上阅读的体验
Foliate 是一个现代的 GTK 电子书查看器,它有许多基本功能。如果你拥有 Amazon Kindle 或其他电子书阅读器,那么你可能会在桌面上想念这种阅读体验。
![](https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/foliate-library-view.jpg?w=800&ssl=1)
Foliate 解决了那些问题。Foliate 会显示书的估计剩余阅读时间和页数。你可以添加书签,高亮文本和添加注释。你可以导出数据或轻松同步它们。
Foliate 解决了那些抱怨。Foliate 会显示书的估计剩余阅读时间和页数。你可以添加书签、高亮文本和添加注释。你可以导出数据,也可以轻松同步它们。
![Foliate Ebook Viewer Features][4]
你也可以使用 Wiktionary 和 Wikipedia 查询单词。你可以在页面视图和滚动视图之间切换。它还有几个主题适合你的阅读偏好。
你也可以使用维基词典和维基百科查询单词。你可以在页面视图和滚动视图之间切换。它还有几个主题,以满足你的阅读偏好。
![][5]
@ -36,19 +38,19 @@ Foliate 解决了那些问题。Foliate 会显示书的估计剩余阅读时间
让我们来看看 Foliate 提供的所有功能:
* 支持 .epub、.mobi、.azw 和 .azw3 文件。它不支持 PDF 文件。
* 支持 .epub、.mobi、.azw、未打包的 EPUB 文件、文本文件、漫画存档cbr、.cbz、.cbt、.cb7小说书.fb2、.fb2.zip和 .azw3 文件。它不支持 PDF 文件。
* 它让你可以在双页浏览模式下阅读电子书,并提供滚动查看模式。
* 能够自定义字体、行距、边距和亮度
* 能够自定义字体、行距、边距和亮度。
* 图书馆视图,显示最近的书籍和阅读进度。
* 默认主题包括浅色、棕褐色、深色、Solarized 深色/浅色、Gruvbox 浅色/深色、灰色、Nord 和反转模式。
* 你还可以添加自定义主题调整 eBook 浏览器的外观
* 带有章节标记的阅读进度滑块
* 书签和注释支持
* 能够在书中查找文本
* 能够放大和缩小
* 启用/禁用侧边栏进行导航
* 使用 [Wiktionary][7] 和 [Wikipedia][8] 快速查找字典
* 使用 Google 翻译翻译文字
* 你还可以添加自定义主题调整电子书浏览器的外观。
* 带有章节标记的阅读进度滑块
* 书签和注释支持
* 能够在书中查找文本
* 能够放大和缩小
* 启用/禁用侧边栏进行导航
* 使用 [维基词典][7] 和 [维基百科][8] 快速查找字典
* 使用谷歌翻译翻译文字
* 触摸板手势,使用两指滑动即可翻页
* 使用 [eSpeak NG][9] 和 [Festival][10] 支持文字转语音
@ -60,11 +62,11 @@ Foliate 解决了那些问题。Foliate 会显示书的估计剩余阅读时间
如果需要,你可以浏览它的 [GitHub 页面][19]以从源代码开始构建。
[下载 Foliate 应用][20]
- [下载 Foliate 应用][20]
**总结**
### 总结
我使用 GitHub 上提供的最新 **.deb** 文件在 **Pop!_OS 19.10** 上进行了尝试,并且效果很好。我不喜欢在桌面上阅读很久,但我喜欢它的功能。
我使用 GitHub 上提供的最新 .deb 文件在 Pop!_OS 19.10 上进行了尝试,并且效果很好。我不喜欢在桌面上阅读很久,但我喜欢它的功能。
你是否尝试过 Foliate请随时分享你的经验。
@ -75,14 +77,14 @@ via: https://itsfoss.com/foliate-ebook-viewer/
作者:[Ankush Das][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/) 荣誉推出
[a]: https://itsfoss.com/author/ankush/
[b]: https://github.com/lujun9972
[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/foliate-app.jpg?ssl=1
[2]: https://itsfoss.com/best-ebook-readers-linux/
[2]: https://linux.cn/article-10383-1.html
[3]: https://johnfactotum.github.io/foliate/
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/foliate-ebook-viewer-features.jpg?ssl=1
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/foliate-screenshot.jpg?ssl=1

View File

@ -0,0 +1,67 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12450-1.html)
[#]: subject: (Customizing my Linux terminal with tmux and Git)
[#]: via: (https://opensource.com/article/20/7/tmux-git)
[#]: author: (Moshe Zadka https://opensource.com/users/moshez)
使用 tmux 和 Git 自定义我的 Linux 终端
======
> 设置你的控制台,以便你能知道身处哪个目录和该做什么
![](https://img.linux.net.cn/data/attachment/album/202007/25/102841u8u6ns4tp9z8bnha.jpg)
我使用 GNOME 终端,主要是因为它是我的发行版的默认设置。但是我终端内远非“默认值”。在我开始解释如何自定义它之前,它现在是这个样子:
![Moshe Zadka's terminal][2]
### 从底部开始
我使用终端多路复用技术 [tmux][4] 管理我的终端体验。
在上图的底部,你可以看到我的绿色 tmux 栏。底部的 `[3]` 表示它是第三个终端:每个终端都运行自己的 tmux 会话。(我创建了一个新会话来放大字体,这样可在截图中更容易看到;这是它与其他终端之间的唯一区别。)
提示符看起来也很有趣,对吧?在提示符中塞入了太多信息后,我喜欢插上一个换行符,这样一来,如果我想即兴进行 shell 编程或编写一个传递了五次的管道,也不会超出屏幕界限。这样做的代价是简单的命令序列(新建、复制、移动)会更快地滚动出我的屏幕。
行末是 <ruby>[阿列夫零][5]<rt>Aleph null</rt></ruby> 字符,它是最小的[无穷基数][6]。我希望内容行的结束很明显,并且当我意识到“阿列夫”和下标 0 都是 Unicode 字符时,我无法抗拒使用“阿列夫零”作为提示符的一部分的诱惑。(数学极客们,团结起来!)
在此之前是我的用户名。由于我在不同用户名的多台计算机上使用相同的[点文件][7](保存在 Git 中),因此这个还算有用。
在我的用户名之前,是我所在目录的最后一部分。完整路径通常太长且无用,而当前目录对于像我这样的经常忘记在做什么人来说是很有用的。在此之前是机器的名称。我所有的机器都以我喜欢的电视节目命名。我的旧笔记本是 `mcgyver`
提示符中的第一位是我最喜欢的:一个让我知道目录的 Git 状态的字母。如果目录为“不在 Git 中”,那么是 `G`。如果目录为“没有问题”OK且无需任何操作那么是 `K`。如果有 Git 未知的文件需要添加或忽略,那么是 `!`。如果需要提交,那么是 `C`。如果没有上游,那么是 `U`。如果存在上游,但我没有推送,那么是 `P`。该方案不是基于当前状态,而是描述了我要做的*下一个动作*。(要回顾 Git 术语,请阅读[本文][8]。)
终端功能是通过一个有趣的 Python 程序完成的。它运行 `python -m howsit`(在我把 [howsit][9] 安装在虚拟环境中之后)。
你可以在上图中看到渲染效果,但是为了完整起见,这是我的 `PS1`
```
[$(~/.virtualenvs/howsit/bin/python -m howsit)]\h:\W \u ℵ₀  
$
```
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/tmux-git
作者:[Moshe Zadka][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/moshez
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop)
[2]: https://opensource.com/sites/default/files/uploads/terminal-tmux-moshezadka.png (Moshe Zadka's terminal)
[3]: https://creativecommons.org/licenses/by-sa/4.0/
[4]: https://opensource.com/article/20/1/tmux-console
[5]: https://simple.wikipedia.org/wiki/Aleph_null
[6]: https://gizmodo.com/a-brief-introduction-to-infinity-5809689
[7]: https://opensource.com/article/19/3/move-your-dotfiles-version-control
[8]: https://opensource.com/article/19/2/git-terminology
[9]: https://pypi.org/project/howsit/

View File

@ -1,8 +1,8 @@
[#]: collector: (lujun9972)
[#]: translator: (Yufei-Yan)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12435-1.html)
[#]: subject: (Project OWL: IoT trying to hold connectivity together in disasters)
[#]: via: (https://www.networkworld.com/article/3564980/project-owl-iot-trying-to-hold-connectivity-together-in-disasters.html)
[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/)
@ -10,35 +10,28 @@
OWL 项目:物联网正尝试在灾难中让一切保持联络
======
当自然灾害破坏了传统的通信连接时,配置在<ruby>多跳网络<rt>mesh network</rt></ruby>的物联网设备可以迅速部署以提供基本的连接。[AK Badwolf][1] [(CC BY 2.0)][2]
> 当自然灾害破坏了传统的通信连接时,配置在<ruby>多跳网络<rt>mesh network</rt></ruby>的物联网设备可以迅速部署以提供基本的连接。
![](https://img.linux.net.cn/data/attachment/album/202007/21/135614mwr8rxr6lw5xefjs.jpg)
OWL 项目负责人在最近的开源峰会上说,一个以多跳网络、物联网和 LoRa 连接为中心的开源项目可以帮助急救和受灾人员在自然灾害之后保持联系。
OWL 项目的应用场景是当在自然灾害之后频繁发生的通信中断时。无论是蜂窝网络还是有线网络,大范围的中断会频繁阻碍急救服务、供应和在暴风雨或其他重大灾难后必须解决关键问题的信息流。
**学习 5G 和 WiFi 6**
* [如何判断 WiFi 6 是否适合你][4]
* [什么是 MU-MIMO为什么在你的无线路由器中需要它][5]
* [什么时候使用 5G什么时候使用 WiFi 6][6]
* [企业如何为 5G 网络做准备][7]
该项目通过一大群“<ruby>鸭子<rt>duck</rt></ruby>”(便宜、易于部署且不需要现有基础设施支持的小型无线模块)实现这个目的。一些“鸭子”是太阳能的,其它一些则用的是耐用电池。每只“鸭子”配备一个 LoRa 无线电,用于在网络上和其它“鸭子”进行通信,同时还配备有 Wi-Fi而且可能配备蓝牙和 GPS 来实现其他功能。
该项目通过一大群”鸭子“(便宜、易于部署且不需要现有基础设施支持的小型无线模块)实现这个目的。一些鸭子是太阳能的,其他一些则用的是耐用电池。每只鸭子配备一个 LoRa 无线电,用于在网络上和其他鸭子进行通信,同时还配备有 Wi-Fi而且可能配备蓝牙和 GPS 来实现其他功能
这个想法是这样的,当网络瘫痪时,用户可以使用他们的智能手机或者笔记本电脑与“鸭子”建立一个 Wi-Fi 连接,这个“鸭子”可以将小块的信息传递到网络的其他部分。信息向网络后端传递,直到到达“<ruby>鸭子爸爸<rt>papaduck</rt></ruby>”,“鸭子爸爸”装备了可以与云上的 OWL 数据管理系统连接的卫星系统OWL 代表 ”<ruby>组织<rt>organization</rt></ruby><ruby>位置<rt>whereabouts</rt></ruby><ruby>物流<rt>logistics</rt></ruby>”)。信息可以通过云在智能手机或者网页上进行可视化,甚至可以通过 API 插入到现有的系统中。
这个想法是这样的,当网络瘫痪时,用户可以使用他们的智能手机或者笔记本电脑与鸭子建立一个 Wi-Fi 连接这个鸭子可以将小块的信息传递到网络的其他部分。信息向网络后端传递直到到达”papaduck“”papaduck“装备了可以与云上的 OWL 数据管理系统连接的卫星系统。OWL 代表 ”<ruby>组织<rt>organization</rt></ruby><ruby>位置<rt>whereabouts</rt></ruby><ruby>物流<rt>logistics</rt></ruby>”。)信息可以通过云在智能手机或者网页上进行可视化,甚至可以通过 API 插入到现有的系统中。
秘密在于 ClusterDuck 协议,这是一个开源固件,即使在一些模块不能正常工作的网络中,它仍然能保持信息流通。它就是设计用来工作在大量便宜且容易获取的计算硬件上,类似树莓派的硬件,这样可以更容易且更快捷的建立一个 ClusterDuck 网络。
秘密在于“<ruby>鸭群<rt>ClusterDuck</rt></ruby>” 协议,这是一个开源固件,即使在一些模块不能正常工作的网络中,它仍然能保持信息流通。它就是设计用来工作在大量便宜且容易获取的计算硬件上,类似树莓派的硬件,这样可以更容易且更快捷的建立一个“鸭群”网络。
创始人 Bryan Knouse 表示,这个项目的创建,是因为在 2017 年和 2018 年的毁灭性飓风中,要与受影响社区进行有效的通信而采取救援措施,面临着巨大的困难。
“我们的一些创始成员经历了这些灾难,然后我们会问‘我们该做些什么?’”,他说道。
在马亚圭斯该项目有一批来自波多黎各大学的学生和教授大多数的系统测试都在那里进行。Knouse 说,校园中目前有 17 个太阳能鸭子,分布在屋顶和树上,并且计划增加数量。
在马亚圭斯该项目有一批来自波多黎各大学的学生和教授大多数的系统测试都在那里进行。Knouse 说,校园中目前有 17 个太阳能鸭子,分布在屋顶和树上,并且计划增加数量。
他说,“这种关系实际上创建了一个开源社区,这些学生和教授正在帮助我们开发这个项目。”
在 [Facebook][9] 和[领英][10]上加入网络世界社区,并对重要话题发表评论。
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3564980/project-owl-iot-trying-to-hold-connectivity-together-in-disasters.html
@ -46,13 +39,13 @@ via: https://www.networkworld.com/article/3564980/project-owl-iot-trying-to-hold
作者:[Jon Gold][a]
选题:[lujun9972][b]
译者:[Yufei-Yan](https://github.com/Yufei-Yan)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [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.flickr.com/photos/spiderkat/8487309555/in/photolist-dVZFrn-dDctnA-8WuLez-6RBSHn-bQa5F8-syyFcV-rvxKJT-5bSAh-2Xey4-3D4xww-4t1ZYv-dMgY7k-mHeMk1-xsPw6B-EiD3UR-k1rNkD-atorAv-f58MG9-g2QCe-Zr1wAC-ewx5Px-6vrwz7-8CCPSd-hAC5HZ-aHJC1B-9ovTST-Wqj4Sk-fiJjWG-28ATb9y-6tHHiR-8VZrmy-8iUVNB-DzSQV5-j6gpDL-2c2C5Re-kmbqae-Th4XGx-g325LW-cC1cp-26aa3aC-X7ruJo-jDkSKD-57695d-8Dz2hm-fPsDJr-gxcdoV-iSVsHR-dWWbct-ejvCrM-8ofaVz
[1]: https://images.idgesg.net/images/article/2019/01/owl-face-100785829-large.jpg
[2]: https://creativecommons.org/licenses/by/2.0/legalcode
[3]: https://www.networkworld.com/article/3207535/what-is-iot-the-internet-of-things-explained.html
[4]: https://www.networkworld.com/article/3356838/how-to-determine-if-wi-fi-6-is-right-for-you.html

View File

@ -1,64 +1,58 @@
[#]: collector: (lujun9972)
[#]: translator: (silentdawn-zz)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12463-1.html)
[#]: subject: (Program IoT systems using Python with this VSCode plugin for RTOS)
[#]: via: (https://opensource.com/article/20/7/python-rt-thread)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
使用 VSCode RTOS 插件为物联网系统编写 Python 程序
通过 VSCode RTOS 插件使用 Python 为物联网系统编写程序
======
RTOS 之类的实时嵌入式操作系统使嵌入式系统的编程更简单
![Parts, modules, containers for software][1]
> RTOS 之类的实时嵌入式操作系统使嵌入式系统的编程更简单
物联网( IoT )无处不在,它意味着几乎所有的产品,从冰箱到口袋手表,都可以连网。为了实现这个目标,每个产品都需要拥有一个嵌入式计算机来运行网络栈,有些产品几乎是小的不可思议。这就是嵌入式软件出现的场景:现代科技打造的非常小的计算机,硬编码到硬件芯片,不需要任何板外处理器、内存或者存储盘。
![](https://img.linux.net.cn/data/attachment/album/202007/29/001132c37u7u5qp284wef2.jpg)
物联网IoT无处不在它意味着几乎所有的产品从冰箱到口袋手表都可以连网。为了实现这个目标每个产品都需要拥有一个嵌入式计算机来运行网络栈有些产品几乎是小的不可思议。这就是嵌入式软件出现的场景现代科技打造的非常小的计算机硬编码到硬件芯片不需要任何板外处理器、内存或者存储盘。
就传统视角而言,这种场景意味着没有操作系统可用,但是因为种种 [原因][2],开发者发现,类似于 RTOS 之类的实时嵌入式操作系统能让嵌入式系统的编程变得非常简单。
虽然RT-Thread 嵌入式操作系统致力于鼓励程序员新手进入物联网领域,但并非所有的人都具备使用 C 语言硬编码微芯片的能力。幸运的是MicroPython 通过让开发者创建运行于嵌入式系统的 Python 代码的方式逐渐填补了这个鸿沟。为了让整个过程更简单RT-Thread 有一个可以用于 VSCode 和 [VSCodium][4] 的插件,为开发者提供了物联网方面的开发环境。其部分特性包括:
虽然 RT-Thread 嵌入式操作系统致力于鼓励程序员新手进入物联网领域,但并非所有的人都具备使用 C 语言硬编码微芯片的能力。幸运的是MicroPython 通过让开发者创建运行于嵌入式系统的 Python 代码的方式逐渐填补了这个鸿沟。为了让整个过程更简单RT-Thread 有一个可以用于 VSCode 和 [VSCodium][4] 的插件,为开发者提供了物联网方面的开发环境。其部分特性包括:
* 方便的连接方式,可以很容易的通过串口、网络或者 USB 连接到开发板(如果你使用过 Arduino肯定会很熟悉这个流程
* 支持上传文件或目录到开发板。
* 支持基于 MicroPython 的代码,而且具有智能的代码补、语法检查功能。
* 支持基于 MicroPython 的代码,而且具有智能的代码补、语法检查功能。
* 支持 MicroPython REPL 交互式环境。
* 丰富的示例代码和演示程序。
* 完整的工程同步功能。
* 快速运行内存中的程序代码。
* 函数运行的代码片段。
* 运行函数的代码片段。
* 支持主流的 MicroPython 开发板。
* 支持 Linux 和 Windows 操作系统,并经过充分测试。
### 准备
在开始之前,如果你使用的是 Windows 操作系统,那么必须保证 VSCode 的默认终端是 [PowerShell][5]。运行 VSCodium**Terminal** 菜单项启动一个终端. 在显示在 VSCodium 窗口底部的终端界面,从下拉菜单顶端选择 **PowerShell**
在开始之前,如果你使用的是 Windows 操作系统,那么必须保证 VSCode 的默认终端是 [PowerShell][5]。运行 VSCodium“Terminal” 菜单项启动一个终端. 在显示在 VSCodium 窗口底部的终端界面,从下拉菜单顶端选择 “PowerShell”
不论你是在 [Windows][6] 还是 Linux 系统下工作,必须保证安装了 Python 3在 Linux 上,它可能已经安装了,否则可以通过软件库安装它)。
还要安装的是微软提供的 VSCode Python插件。安装方法是点击 **File** 菜单,找到 **Preferences** 子菜单,从中打开 **Extensions** 面板。在 **Extensions** 中,搜索 Python,找到来自微软的 Python 插件。
还要安装的是微软提供的通用 VSCode Python 插件。安装方法是点击 “File” 菜单,找到 “Preferences” 子菜单,从中打开 “Extensions” 面板。在扩展中,搜索 “Python”,找到来自微软的 Python 插件。
![VSCodium Python plugin][7]
(Seth Kenlon, [CC BY-SA 4.0][8])
当软,在上述操作之前,你要先正确安装 [VSCodium][9] 或 [VSCode][10]。
当然,在上述操作之前,你要先正确安装 [VSCodium][9] 或 [VSCode][10]。
### 安装插件
安装 MicroPython 开发插件的方法与安装 Python 插件一样,点击 **File** 菜单,找到 **Preferences** 子菜单,选择 **Extensions**
安装 MicroPython 开发插件的方法与安装 Python 插件一样,点击 “File” 菜单,找到 “Preferences” 子菜单,选择 “Extensions”
**Extensions** 中,搜索 **MicroPython**,安装 RT-Thread 插件。
扩展中,搜索 “MicroPython”,安装 RT-Thread 插件。
![MicroPython plugin for RT-Thread][11]
(Seth Kenlon, [CC BY-SA 4.0][8])
### 使用插件
你的开发板必须能访问串口,这需要组策略的允许。你可能需要将自己的账户加入该组,通常在默认情况下你的账户可能并不在该组。首先,确认你的账户不在 “dialout”组
你的开发板必须能访问串口,这需要组策略的允许。你可能需要将自己的账户加入该组,通常在默认情况下你的账户可能并不在该组。首先,确认你的账户不在 “dialout” 组:
```
$ groups
@ -69,70 +63,62 @@ tux users
```
`$ sudo usermod --append --groups dialout tux`
$ sudo usermod --append --groups dialout tux
```
Log out or reboot to load your new group permissions.
退出登录或重启以载入你新的组权限。
### 创建 MicroPython 工程
MicroPython 开发的第一步是创建 MicroPython 工程用来编写和运行代码。使用 MicroPython 插件创建工程的方法是,点击左下方的 **Create MicroPython project** 按钮。
MicroPython 开发的第一步是创建 MicroPython 工程用来编写和运行代码。使用 MicroPython 插件创建工程的方法是,点击左下方的 “Create MicroPython project” 按钮。
![Create MicroPython project][12]
(Seth Kenlon, [CC BY-SA 4.0][8])
之后会有一些提示,让你选择创建空白工程还是包含例程的工程。
### 连接到开发板
点击 VSCodium 左下方的 **Connection** 按钮,进行 VSCodium 与开发板的连接,在弹出的列表中,选择要连接的物理设备。
点击 VSCodium 左下方的 “Connection” 按钮,进行 VSCodium 与开发板的连接,在弹出的列表中,选择要连接的物理设备。
### 查看例程
MicroPython 插件提供了许多例程和例库,供学习和调用。获取例程的过程是,激活 MicroPython 之后VSCodium 左侧按钮条会出现“新建”快捷图标,点击该图标就可以了。点击 **Document** 快捷图标,会显示例程文件列表,点击 **Folder** 快捷图标,会显示例库列表。
MicroPython 插件提供了许多例程和例库,供学习和调用。获取例程的过程是,激活 MicroPython 之后VSCodium 左侧按钮条会出现“新建”快捷图标,点击该图标就可以了。点击“文档”快捷图标,会显示例程文件列表;点击“文件夹”快捷图标,会显示例库列表。
![MicroPython examples][13]
(Seth Kenlon, [CC BY-SA 4.0][8])
### 直接在开发板上运行 MicroPython 文件
在 VSCodium 中可以通过在开发板上运行单个程序文件,很方便快捷的进行程序调试。快捷键 **Alt**+**Q** 会触发一个特定的插件,该插件会将当前的 Python 文件上传到开发板内存中。你还可以在当前 Python 文档界面点击右键,然后选择 **Run the MicroPython file directly on the device** 实现同样的功能。
在 VSCodium 中可以通过在开发板上运行单个程序文件,很方便快捷的进行程序调试。快捷键 `Alt+Q` 会触发一个特定的插件,该插件会将当前的 Python 文件上传到开发板内存中。你还可以在当前 Python 文档界面点击右键,然后选择 “Run the MicroPython file directly on the device” 实现同样的功能。
![Running code on your device][14]
(Seth Kenlon, [CC BY-SA 4.0][8])
如果你需要以不上传代码的方式检查一组代码,可以使用“代码片段”功能。要运行 MicroPython REPL 环境中的代码片段,在编辑器中选中要运行的片段,右键菜单中点击 **Execute the selected MicroPython code on the device** (也可以使用 **Alt**+**Q** 快捷键)。
如果你需要以不上传代码的方式检查一组代码,可以使用“代码片段”功能。要运行 MicroPython REPL 环境中的代码片段,在编辑器中选中要运行的片段,右键菜单中点击 “Execute the selected MicroPython code on the device” (也可以使用 `Alt+Q` 快捷键)。
### 加载文件和目录到开发板
如果需要加载文件或目录到开发板,有现成的方法可用:选中工程中要加载到开发板的文件或目录,在选中的对象上右键,点击右键菜单中的 **Download the file/folder to the device**
如果需要加载文件或目录到开发板,有现成的方法可用:选中工程中要加载到开发板的文件或目录,在选中的对象上右键,点击右键菜单中的 “Download the file/folder to the device”
注意,如果开发板中已有与要加载的文件或目录同名者,加载操作将导致开发板原有的内容被覆盖。
在 REPL 环境中运行“os.listdir()”命令,可以检查文件和目录是否成功加载。当然,也可以通过相应的命令删除 REPL 中的文件或目录。
在 REPL 环境中运行 `os.listdir()` 命令,可以检查文件和目录是否成功加载。当然,也可以通过相应的命令删除 REPL 中的文件或目录。
删除文件的命令如下:
```
`os.remove('file_to_delete')`
os.remove('file_to_delete')
```
删除目录的命令如下:
```
`os.rmdir('folder_to_delete')`
os.rmdir('folder_to_delete')
```
### 工程的同步
点击左下角 **Synchronization** 按钮可以启动工程同步,该操作将把本地工程中所有的文件和目录同步到开发板的文件系统。建议在完成程序调试之后进行该操作,调试过程中不需要频繁进行同步操作。
点击左下角“同步”按钮可以启动工程同步,该操作将把本地工程中所有的文件和目录同步到开发板的文件系统。建议在完成程序调试之后进行该操作,调试过程中不需要频繁进行同步操作。
工程的同步操作完成后,开发板上的文件列表可以在 **Device Files List** 列看到。
工程的同步操作完成后,开发板上的文件列表可以在 “Device Files List” 列看到。
### 放手尝试
@ -144,8 +130,8 @@ via: https://opensource.com/article/20/7/python-rt-thread
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[silentdawn-zz](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
译者:[silentdawn-zz](https://github.com/silentdawn-zz)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,24 +1,26 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12455-1.html)
[#]: subject: (Btrfs to be the Default Filesystem on Fedora? Fedora 33 Starts Testing Btrfs Switch)
[#]: via: (https://itsfoss.com/btrfs-default-fedora/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
Btrfs 将成为 Fedora 上的默认文件系统? Fedora 33 开始测试切换到 Btrfs
Fedora 33 开始测试切换到 Btrfs
======
尽管距离 Fedora 的下一个稳定版本([Fedora 33][1])还有几个月的距离,但仍有一些值得关注的变化。
在所有其他 [Fedora 33 接受的系统范围的更改][1]中,最有趣的提议是将 Btrfs 作为桌面的默认文件系统。
在所有其他 [Fedora 33 接受的系统范围的更改][1]中,最有趣的提议是将 Btrfs 作为桌面的默认文件系统,这个提议现在已经被批准了
这是 Fedora 对该提案的评价:
>对于 Fedora 的笔记本电脑和工作站安装我们希望以透明的方式向用户提供文件系统功能。我们希望添加新功能同时减少处理磁盘空间不足之类的情况所需的专业知识。Btrfs 它的设计理念非常适合这个角色,让我们将其设为默认设置。
> 对于安装 Fedora 的笔记本电脑和工作站我们希望以透明的方式向用户提供文件系统功能。我们希望添加新功能同时减少处理磁盘空间不足之类的情况所需的专业知识。Btrfs 它的设计理念非常适合这个角色,让我们将其设为默认设置。
值得注意的是,到目前为止,这不是系统范围内的更改,并且需要在[测试日][2]**2020 年 7 月 8 日**)进行测试。
值得注意的是,在测试的最终投票结果出来之前,这不是系统范围内的更改。
但是,现在测试已经成功完成,投票结果也是赞成的 —— Fedora 33 版本已经接受了这个改动。
那么,为什么 Fedora 提出这一更改?这会有什么用么?这是糟糕的举动吗?对 Fedora 的发行有何影响?让我们在这里谈论下。
@ -26,32 +28,30 @@ Btrfs 将成为 Fedora 上的默认文件系统? Fedora 33 开始测试切换
### 它会影响哪些 Fedora 版本?
根据提议,如果测试成功,那么Fedora 33、spins 和 labs 的所有桌面版本都可能发生此更改
根据提议,如果测试成功,那么 Fedora 33 的所有桌面版本、spins 和 labs 都受此影响
因此,你可以期望[工作站版本][4]将 Btrfs 作为 Fedora 33 上的默认文件系统。
### 实施此更改的潜在好处
为了改进笔记本和工作站用例的 FedoraBtrfs 文件系统提供了一些好处。
为了改进 Fedora 在笔记本和工作站的使用Btrfs 文件系统提供了一些好处。
即使 Fedora 33 尚未接受此更改,但我先说下使用 Btrfs 作为默认文件系统的优点
现在 Fedora 33 将成为默认文件系统 —— 让我来指出使用 Btrfs 作为默认文件系统的好处
* 延长存储硬件的使用寿命
* 提供一个简单的方案来解决用户耗尽根目录或主目录上的可用空间的情况
* 不易损坏数据,易于恢复
* 提供更好的文件系统大小调整功能
* 提供一个简单的方案来解决用户耗尽根目录或主目录上的可用空间的情况
* 不易造成数据损坏,易于恢复
* 提供更好的调整文件系统大小的功能
* 通过强制 I/O 限制来确保桌面在高内存压力下的响应能力
* 使复杂的存储设置易于管理
如果你感到好奇,你可能想更深入地了解 [Btrfs][5] 及其总体优点。
不要忘记Btrfs 已经是受支持的选项,它只是不是默认的文件系统而已。
如果你感到好奇,你可能想更深入地了解[ Btrfs][5] 及其总体优点
但是总的来说感觉在Fedora 33上引入Btrfs作为默认文件系统是一个有用的变化
不要忘记Btrf 已经是受支持的选项,但它不是默认的文件系统。
但是,总的来说,感觉是引入 Btrfs 作为 Fedora 33 上的默认文件系统,如果实施得当,这可能会是一个有用的更改。
### Red Hat Enterprise Linux 可以实现吗?
### Red Hat Enterprise Linux 会不会实现它?
很明显Fedora 被认为是 [Red Hat Enterprise Linux][6] 的前沿版本。
@ -59,7 +59,7 @@ Btrfs 将成为 Fedora 上的默认文件系统? Fedora 33 开始测试切换
为了让你更加清楚Fedora 对其进行了详细介绍:
> Red Hat 在许多方面都很好地支持 Fedora。但是 Fedora 已经与上游紧密合作,并依赖上游。这将是其中之一。这是该提案的重要考虑因素。社区有责任确保它得到支持。如果 Fedora 拒绝,那么 Red Hat 将永远不会支持 Btrfs。Fedora 必然需要是第一位的, 并提出令人信服的理由, 它解决的问题比替代方案多。功能所有者相信它, 这是毫无疑问的
> Red Hat 在许多方面都很好地支持 Fedora。但是 Fedora 已经与上游紧密合作,并依赖上游。这将是其中之一。这是该提案的重要考虑因素。社区有责任确保它得到支持。如果 Fedora 拒绝,那么 Red Hat 将永远不会支持 Btrfs。Fedora 必然需要成为第一个,并提出令人信服的理由,说明它比替代方案能解决更多的问题。它的负责人相信它确实如此,毫无疑问
另外,值得注意的是,如果你不想在 Fedora 中使用 btrfs你应该看看 [OpenSUSE][7] 和 [SUSE Linux Enterprise][8]。
@ -78,7 +78,7 @@ via: https://itsfoss.com/btrfs-default-fedora/
作者:[Ankush Das][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/) 荣誉推出

View File

@ -0,0 +1,84 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12458-1.html)
[#]: subject: (What you need to know about automation testing in CI/CD)
[#]: via: (https://opensource.com/article/20/7/automation-testing-cicd)
[#]: author: (Taz Brown https://opensource.com/users/heronthecli)
CI/CD 中的自动化测试的概要知识
======
> 持续集成和持续交付是由测试驱动的。以下是如何做到的。
![](https://img.linux.net.cn/data/attachment/album/202007/27/210026blobu65f77accbob.jpg)
> “如果一切似乎都在控制之中,那只是你走的不够快而已。” —Mario Andretti
测试自动化是指在软件开发过程中尽可能早、尽可能快地持续关注检测缺陷、错误和 bug。这是通过使用那些追求质量为最高价值的工具完成的它们旨在*确保*质量,而不仅仅是追求质量。
持续集成/持续交付CI/CD解决方案也称为 DevOps 管道)最引人注目的功能之一是可以更频繁地进行测试,而又不会给开发人员或操作人员增加更多的手动工作。让我们谈谈为什么这很重要。
### 为什么要在 CI/CD 中实现自动化测试?
敏捷团队要更快的迭代,以更高的速度交付软件和客户满意度,而这些压力可能会危及质量。全球竞争制造了对缺陷的*低容忍度*,同时也增加了敏捷团队的压力,要求软件交付的*迭代更快*。减轻这种压力的行业解决方案是什么?是 [DevOps][2]。
DevOps 是一个大概念,有很多定义,但是对 DevOps 成功至关重要的一项技术是 CI/CD。通过软件开发流程设计一个连续的改进循环可以为测试带来新的机会。
### 这对测试人员意味着什么?
对于测试人员,这通常意味着他们必须:
* 更早且更频繁地进行测试(使用自动化)
* 持续测试“真实世界”的工作流(自动和手动)
更具体地说,任何形式的测试,无论是由编写代码的开发人员运行还是由质量保证工程师团队设计,其作用都是利用 CI/CD 基础架构在快速推进的同时提高质量。
### 测试人员还需要做什么?
具体点说,测试人员负责:
* 测试新的和现有的软件应用
* 根据系统要求评估软件来验证和确认功能
* 利用自动化测试工具来开发和维护可重复使用的自动化测试
* 与 scrum 团队的所有成员合作,了解正在开发的功能以及实施的技术设计,以设计和开发准确、高质量的自动化测试
* 分析记录在案的用户需求,并针对中等到高度复杂的软件或 IT 系统制定或协助设计测试计划
* 开发自动化测试,并与功能团队一起审查和评估测试方案
* 与技术团队合作,确定在开发环境中自动化测试的正确方法
* 与团队合作,通过自动化测试来了解和解决软件问题,并回应有关修改或增强的建议
* 参与需求梳理、估算和其他敏捷 scrum 仪式
* 协助制定标准和流程,以支持测试活动和材料(例如脚本、配置、程序、工具、计划和结果)
测试是一项艰巨的工作,但这是有效构建软件的重要组成部分。
### 哪些持续测试很重要?
你可以使用多种测试。不同的类型并不是学科之间的牢固界限。相反,它们是表示如何测试的不同方式。比较测试类型不太重要,更重要的是对每一种测试类型都要有覆盖率。
* **功能测试:** 确保软件具有其要求的功能
* **单元测试:** 独立测试软件的较小单元/组件以检查其功能
* **负载测试:** 测试软件在重负载或使用期间的性能
* **压力测试:** 确定软件承受压力(最大负载)时的断点
* **集成测试:** 测试组合或集成的一组组件的输出
* **回归测试:** 当修改任意组件(无论多么小),测试整个应用的功能
### 总结
任何包含持续测试的软件开发过程都将朝着建立关键反馈环路的方向发展,以实现快速和构建有效的软件。最重要的是,该实践将质量内置到 CI/CD 管道中,并意味着了解在软件开发生命周期中提高速度同时减少风险和浪费之间的联系。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/automation-testing-cicd
作者:[Taz Brown][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/heronthecli
[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/resources/devops

View File

@ -1,43 +1,43 @@
[#]: collector: (lujun9972)
[#]: translator: (Yufei-Yan)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12438-1.html)
[#]: subject: (My Linux story: From Linux user to contributor)
[#]: via: (https://opensource.com/article/20/7/linux-user-contributor)
[#]: author: (Taz Brown https://opensource.com/users/heronthecli)
我的故事:从 Linux 用户到贡献者
我的 Linux 故事:从用户到贡献者
======
开源社区欢迎来自不同背景和技能的贡献者。
> 开源社区欢迎来自不同背景和技能的贡献者。
![Penguin, stylized, contributor spotlight][1]
![](https://img.linux.net.cn/data/attachment/album/202007/22/114140tfuubuvcfgujrcab.jpg)
我是一名有超过 15 年不同职位经验的 IT 从业者,包括系统管理员、高级 Linux 管理员、DevOps 工程师、自动化顾问和高级<ruby>敏捷专家<rt>scrum master</rt></ruby>。我开始是在 Ubuntu 上学习 Linux但是后来作为系统管理员转到 CentOS然后我又转到 Fedora 作为个人使用。但是我对技的喜爱比我使用第一个 Linux 发行版要早的多,而且是来自于一部电影。
我是一名 IT 专业人士,拥有超过 15 年经验,担任过不同职位 —— 包括系统管理员、高级 Linux 管理员、DevOps 工程师、自动化顾问和高级<ruby>敏捷专家<rt>scrum master</rt></ruby>。我开始是在 Ubuntu 上学习 Linux但是后来作为系统管理员转到 CentOS然后我又转到 Fedora 作为个人使用。但是我对技的喜爱要远比我使用第一个 Linux 发行版要早的多,而且是来自于一部电影。
我最喜欢的电影是《黑客》。最棒的一幕发生在电影的开头。电影一开始,一群特工冲进一所房子抓捕臭名昭著的黑客Zero Cool。我们马上发现 Zero Cool 其实是 11 岁的 Dade Murphy他在一天之内成功瘫痪了 1507 台电脑。他被指控犯罪,他的家人被处以重罚。而且,在他 18 岁之前,他都被禁止使用电脑或按键式电话。
我最喜欢的电影是《<ruby>黑客<rt>Hackers</rt></ruby>》。最精彩的一幕发生在电影的开头。电影一开始,一群特工冲进一所房子抓捕臭名昭著的黑客 Zero Cool。我们马上发现 Zero Cool 其实是 11 岁的 Dade Murphy他在一天之内成功瘫痪了 1507 台计算机系统。他被指控犯罪,他的家人被处以重罚。而且,在他 18 岁之前,他都被禁止使用电脑或按键式电话。
Paul Cook又名 Lord Nikon由 Laurence Mason 扮演,曾经是我最喜欢角色。一个主要原因是,我从没有看过一个黑客电影,里面的人物看起来像我,所以我被他的形象深深吸引了。他很神秘。这让我耳目一新,并且感到自豪,因为我对 IT 充满了热情,而且我也是一个和他很像的极客。
<ruby>劳伦斯·梅森<rt>Laurence Mason</rt></ruby>扮演的 Paul Cook又名 Nikon 勋爵,是我最喜欢角色。其中一个主要原因是,我从没有看过一个黑客电影里面的人物长的像我,所以我被他的形象深深吸引了。他很神秘。这让我耳目一新,并且感到自豪,我对 IT 充满了热情,我也是一个和他很像的极客。
![Taz with astronaut][2]
### 成为一个 Linux 贡献者
15 年前,我开始使用 Linux。当我成为一个 Linux 管理员的时候Linux 就成了我的情所在。我一直尝试找到某种方式能够为开源作出贡献,当时我还不知道该从哪开始。因为这个社区实在是太大了,我那时怀疑自己能否真的成为一个有影响力的人但当我发现一些人认可我的兴趣还对我进行指导我开始彻底打开心扉问各种问题并且从社区中学习。自从那以后Fedora 社区一直是我做贡献的最主要社区。
15 年前,我开始使用 Linux。当我成为一个 Linux 管理员的时候Linux 就成了我的情所在。我一直尝试找到某种方式能够为开源作出贡献,当时我还不知道该从哪开始。因为这个社区实在是太大了,我不知道自己能否真正成为一个有影响力的人但当我发现一些人认可我的兴趣还对我进行指导我开始彻底打开心扉问各种问题并且从社区中学习。自从那以后Fedora 社区一直是我做贡献的最主要社区。
我现在对于向开源做贡献还是有点稚嫩。当我意识到我可以贡献出代码以外的其他东西的时候,我对开源的想法发生了改变。我更喜欢通过文档做一些贡献,因为我本质上不是一个软件开发人员,而且社区里面最迫切的需求正是文档。请记住:用户的技能和开发人员的技能同样重要。
我现在对于向开源做贡献还是有点稚嫩。当我意识到我可以用代码以外的方式来贡献时,我对开源的想法发生了改变。我更喜欢通过文档做一些贡献,因为我本质上不是一个软件开发人员,而且社区里面最迫切的需求正是文档。请记住:用户的技能和开发人员的技能同样重要。
### 我的硬件是什么?
硬件也很重要,而且现在几乎所有东西都可以运行 Linux。现在,我家里的配置包括:
硬件也很重要,而且现在几乎所有东西都可以运行 Linux。现在我家里的配置包括
* 联想 Thinksever TS14064 GB 内存4 x 1 TB SSD 和 一个存储数据的 1 TB 机械硬盘
* 联想 Thinksever TS14064 GB 内存4 x 1 TB SSD 和一个存储数据的 1 TB 机械硬盘
* 使用 RAID 5 配置的 164 TB Synology NAS
* 输入输出使用罗技 MX Master 和 MX Master 2S
* 一个定制的并且是人体工程学的 Kinesis Advantage 2 键盘
* 两个 38 寸 LG 曲面宽屏显示器和一个 34 寸 LG 宽显示器
* 一台配备 i7 六核十二线程 CPU 和 16.1 寸 IPS 显示器的 System76 笔记本
* 一个定制的并且符合人体工学的 Kinesis Advantage 2 键盘
* 两个 38 寸 LG 超宽曲面显示器和一个 34 寸 LG 宽显示器
* 一台配备 i7 六核十二线程 CPU 和 16.1 寸 IPS 显示器的 System76 笔记本
我很喜欢 Fedora 处理外置设备的方式,比如说我的鼠标和键盘。一切都完美融合。即插即用工作正常,性能从来不受影响。
@ -53,7 +53,7 @@ Paul Cook又名 Lord Nikon由 Laurence Mason 扮演,曾经是我最喜
* Terminator 作为我日常使用的终端,因为它的网格布局以及丰富的键盘快捷键
* Neofetch 用来显示每次登录到终端时的系统信息
最后同样重要的是,我把 Powerline、Powerlevel9k 和 Vim-Powerline 显示到终端上来跟别人装X
最后同样重要的是,我把 Powerline、Powerlevel9k 和 Vim-Powerline 搞到我的终端上来跟别人装酷
![Multiple fedora screens][7]
@ -61,9 +61,7 @@ Paul Cook又名 Lord Nikon由 Laurence Mason 扮演,曾经是我最喜
美国是个大熔炉,我也是这么看待 Linux 和像 Fedora 项目这样的特定社区的。在每个 Linux 社区中,对于不同的贡献都有很大的空间。也有很多方式可以参与进来,而且对于新的想法,也总是有发挥的空间。通过分享我过去 15 年在开源方面的经验,我希望帮助更多在科技领域的少数族裔体会到来自开源社区对多样性和包容性的认同感。
\---
_编者注这篇文章改编自[“Taz Brown你怎么搞 Fedora”][8]并得到许可重新发布_
*编者注:这篇文章改编自[“Taz Brown你怎么搞 Fedora”][8],并得到许可重新发布*
--------------------------------------------------------------------------------
@ -72,7 +70,7 @@ via: https://opensource.com/article/20/7/linux-user-contributor
作者:[Taz Brown][a]
选题:[lujun9972][b]
译者:[Yufei-Yan](https://github.com/Yufei-Yan)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,83 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12439-1.html)
[#]: subject: (My feature-rich and minimal Linux terminal)
[#]: via: (https://opensource.com/article/20/7/minimal-linux-terminal)
[#]: author: (Sumantro Mukherjee https://opensource.com/users/sumantro)
我的功能丰富却又保持简约的 Linux 终端
======
> 这些应用和主题可以你真正拥有你的终端。
![](https://img.linux.net.cn/data/attachment/album/202007/22/123206g5t5mmz5ozdt5f5m.jpg)
每个人都喜欢以特定的方式设置他们的工作区:它可以帮助你提高效率,并使生活更容易以一种感觉有机的方式组织事物,并拥有一个对你来说感觉良好的环境。这也绝对适用于终端。这可能就是为什么有这么多可用终端的原因。
在使用新的计算机时,我做的第一件事就是设置我的终端,让它成为我自己的终端。
我最喜欢的终端应用是 [Terminator][2],因为它的设计简约,并且内置了窗口选项。但从这里开始变得更加复杂。我将自己喜欢的终端风格描述为“功能丰富却又保持简约”。这种平衡是我经常在微调的。
我使用 zsh 作为默认 shell并使用 Ohmyzsh 来提供额外的功能。可以下载它的安装脚本来安装 Ohmyzsh
```
$ curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh --output install-zsh.sh
```
查看一遍脚本了解它做什么,并确保你有信心在计算机上运行该脚本。完成后,运行脚本:
```
$ sh ./install-zsh.sh
```
我最喜欢的主题/提示符是 [Powerlevel 10k][3],它是一个非常详细的环境视图。它包含了从命令的颜色高亮到运行时间的时间戳等所有内容。所有细节都集成到一个优雅的、具有上下文感知的提示符中。
要安装 Powerlevel10k请先在 `.oh-my-zsh/` 自定义主题目录中下载源码。
```
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k
```
但是,为了让 Powerlevel10k 看起来如其存储库中所示,我们需要添加一些默认不包括的字体。它们是:
* [MesloLGS NF Regular.ttf][4]
* [MesloLGS NF Bold.ttf][5]
* [MesloLGS NF Italic.ttf][6]
* [MesloLGS NF Bold Italic.ttf][7]
这将产生一个美观且具有上下文感知的终端(如 [screenfetch][8] 所示):
![terminator terminal shot via screenFetch][9]
我已经习惯了这个特殊的设置,但是,把工作环境变成自己的环境固然重要,但这也并不是一个固执地尝试新事物的理由。新终端的出现,是为了满足新一代用户的需求和要求。这意味着,即使一开始不熟悉,但最近开发的一种终端可能比你的老旧备用机更适合当今的环境和职责。
我最近一直在考虑其他选择。我开始关注 [Starship][10] 的开发情况,它将自己描述为简约的、快速的、可无限定制的提示符,适用于任何 shell。它仍然有很多在视觉上可以身临其境的细节而不会像 Powerlevel10k 那样使人分心。
你最喜欢的终端是什么?为什么?请在评论栏分享!
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/minimal-linux-terminal
作者:[Sumantro Mukherjee][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/sumantro
[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://terminator-gtk3.readthedocs.io/en/latest/
[3]: https://github.com/romkatv/powerlevel10k
[4]: https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf
[5]: https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf
[6]: https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf
[7]: https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf
[8]: https://github.com/KittyKatt/screenFetch
[9]: https://opensource.com/sites/default/files/uploads/osdc00_edit.png (terminator terminal shot via screenFetch )
[10]: https://starship.rs/

View File

@ -0,0 +1,145 @@
[#]: collector: (lujun9972)
[#]: translator: (this-is-name-right)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12453-1.html)
[#]: subject: (Top 5 Open Source Video Conferencing Tools for Remote Working and Online Meetings)
[#]: via: (https://itsfoss.com/open-source-video-conferencing-tools/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
5 个流行的用于远程工作和在线会议的开源视频会议工具
======
你会发现网上有一些视频会议工具。一些是为专业用户量身定制的,另一些是为了日常闲聊的。
然而面对着成百上千的选择,当选择视频会议应用或服务时,安全和隐私是往往是一个重要的点。在众多选择中,哪些是最好最安全的?
所有这些(或大多数)都宣称要提供最好的安全和隐私。但是,你要知道这可不能只看表面。
幸运的是在这里,我们专注于开源和隐私友好的解决方案,所以,让我们看看你可以使用的开源视频会议工具列表。
### 顶级开源视频会议解决方案
![](https://img.linux.net.cn/data/attachment/album/202007/26/104947gyzs2eb5ybeneg5y.jpg)
如果你是商企用户,大多数视频会议解决方案可以被安装在你自己的服务器上。
对于不是系统管理员的普通人来说,其中一些解决方案还提供了现成的、免费的、基于 Web 的视频会议服务。我将在列表中每个项目的描述中提及此信息。
**备注:** 列表中的排名不分先后。
#### 1、Jitsi Meet
![][2]
Jitsi Meet 是一个令人印象深刻的开源视频会议服务。你可以在我们关于 [Jitsi Meet][3] 的单独报道中轻松找到更多信息。
为了给你一个好的开始Jitsi Meet 提供免费[官方公共实例][4]来测试它,只要你需要,就可以免费使用它。
如果你需要将其托管在你的服务器上,同时根据你的需求定制一些选项,你可以从它的[官网][5]下载到你的服务器。
尽管他们在 Linux 上提供了一个基于 Electron 的应用,其实你不必下载一个应用到你的桌面上来设置它。你只需要一个浏览器就足够了。在移动端,安卓和 iOS 都有应用。
- [Jitsi Meet][5]
#### 2、Jami
![][6]
Jami 是一个基于点对点的开源视频会议解决方案。很高兴看到分布式的服务,这意味着不依靠服务器,而只是点对点的连接。
当然了,分布式的服务有优点也有缺点。但是它是自由而开源的,那才是最重要的。
Jami 之前被称为 Ring messenger但它改了名字现在是一个 GNU 项目。
Jami 有 Linux、Windows、macOS、Android 和 iOS 的版本,所以它是一个完全跨平台的安全传送信息和视频会议的解决方案。你可以看看他们的 [GitLab 页面][7]浏览更多信息。
- [Jami][8]
#### 3、Nextcloud Talk
![][9]
[Nextcloud][10] 毫无疑问是开源远程办公工具的瑞士军刀。我们就在使用 Nextcloud。所以如果你已经配置了服务器[Nextcloud Talk][11] 显然是一个优秀的视频会议和聊天工具。
当然了,如果你还没有自己的 Nextcloud 服务器,你需要一些技术知识来进行设置它,然后才能开始使用 Nextcloud Talk。
- [Nextcloud Talk][11]
#### 4、Riot.im
![][12]
Riot.im不久会更名已经是 Slack [最好的开源替代品][13]之一。
它能让你可以创建社区、发送信息,并在一个小组/社区中开始视频会议。你可以通过任何可用的公共 [Matrix 服务器][14]来免费使用它。
如果你想要自己专用的去中心化的 Matrix 网络,你也可以在 [Modular.im][15] 上选择付费托管计划。
- [Riot.im][16]
#### 5、BigBlueButton
![][17]
BigBlueButton 是一个有趣的开源视频会议方案,专门为线上学习打造。
如果你是老师或者经营着一个学校,你也许会想试试。虽然你可以免费试用,但免费演示使用会有一定的限制。所以,最好将其托管到自己的服务器上,并且,如果你有其他的产品/服务的话,你也可以把它整合进其中。
它提供了一套很好的功能,能让你很轻松的教学生。你可以浏览它的 [GitHub 页面][18]以了解更多信息。
- [BigBlueButton][19]
#### 补充Wire
![][20]
Wire 是一个十分流行的开源的安全消息平台,为商企用户量身打造。它也提供视频电话或者网络会议选项。
如果你想要一个为你的企业或团队提供的商业开源方案,你可以试试 Wire并在试用 30 天后决定是否升级它。
就个人而言,我喜欢它的用户体验,但它是要付费的。所以我建议你决定之前,先试试看并浏览它的 [GitHub 页面][21]。
- [Wire][22]
### 总结
现在你知道一些流行开源网络视频会议方案了,你更喜欢使用哪一个?
我是否错过了任何你的最爱?请在下面的评论中告诉我你的想法!
--------------------------------------------------------------------------------
via: https://itsfoss.com/open-source-video-conferencing-tools/
作者:[Ankush Das][a]
选题:[lujun9972][b]
译者:[this-is-name-right](https://github.com/this-is-name-right)
校对:[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://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/open-source-video-conferencing-tools.jpg?ssl=1
[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/jitsi-meet-browser-screenshot.png?ssl=1
[3]: https://itsfoss.com/jitsi-meet/
[4]: https://meet.jit.si/
[5]: https://jitsi.org/jitsi-meet/
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/jami-screenshot.png?ssl=1
[7]: https://git.jami.net/savoirfairelinux/ring-project
[8]: https://jami.net/
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/nextcloud-talk.png?ssl=1
[10]: https://itsfoss.com/nextcloud/
[11]: https://nextcloud.com/talk/
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/riot-communication-video.png?ssl=1
[13]: https://itsfoss.com/open-source-slack-alternative/
[14]: https://matrix.org/
[15]: https://modular.im/
[16]: https://about.riot.im/
[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/big-blue-button.png?ssl=1
[18]: https://github.com/bigbluebutton/bigbluebutton
[19]: https://itsfoss.com/open-source-video-conferencing-tools/bigbluebutton.org/
[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/wire-video-conferencing.png?ssl=1
[21]: https://github.com/wireapp
[22]: https://wire.com/en/

View File

@ -0,0 +1,57 @@
[#]: collector: (lujun9972)
[#]: translator: (JonnieWayy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12466-1.html)
[#]: subject: (My Linux story: breaking language barriers with open source)
[#]: via: (https://opensource.com/article/20/7/linux-bengali)
[#]: author: (Dr Anirban Mitra https://opensource.com/users/mitradranirban)
我的 Linux 故事:用开源打破语言壁垒
======
> 开源项目可以通过消除语言和其他障碍来帮着改变世界。
![](https://img.linux.net.cn/data/attachment/album/202007/29/230730e4mb18km1nwn4ibm.jpg)
相较于我的许多同行和同事,我的开源之旅开始得着实很晚。
2000 年,我实现了我从高中开始的梦想 —— 买一台属于我自己的个人计算机,当时我正在攻读医学研究生学位。在那之前,我对计算机的唯一接触是偶尔在图书馆或网吧上网,当时这些地方电脑使用的收费都相当高昂。所以我省下了一部分研究生津贴,设法买了一台 Pentium III 550 Mhz、128MB 内存的电脑,并且像当时大多数印度电脑的标准配置一样,装着盗版的 Windows 98 系统。
我的宿舍房间上不了网。我不得不去附近的网吧,在那里下载软件,然后随身带着几十张软盘。
当我终于拥有了自己的计算机,我非常高兴,但有一点也让我感到困扰,那就是我无法用我的母语孟加拉语写东西。我碰到了 CDAC 提供的资源CDAC 是一个政府机构,它提供的印度语言工具是基于 ISCII 的ISCII 是一个较早的国家标准,而印度语的 Unicode 标准就是基于这个标准。很难学习它的键盘布局。
### 我的第一次贡献
不久后,我遇到了一款名叫 [Yudit][2] 的软件,它使用标准的 QWERTY 键盘布局来提供印地语的拼音输入。正是在通过 Yudit我第一次遇到了诸如开源和自由软件、GNU 和 Linux 之类的术语。Yudit 也允许我把 UI 组件翻译成孟加拉语,当我将翻译提交给开发人员时,他很高兴地将它们合并到了下一个版本中,并在软件的 README 文件中称赞了我的功劳。
第一次看到一款应用程序的用户元素以我的母语呈现,我感到十分兴奋。此外,尽管对写代码的知识几乎为零,我依然能够为软件开发做出贡献。我继续为 Yudit 创建了一个从 ISCII 到 Unicode 的转换器,这个转换器还可以用于各种印度语言之间的直译。我还买了本 Linux 杂志,随刊附赠了一张 Knoppix 的免费 live CD正是通过它我体验到了 Linux 桌面。
我面临的另一个问题是缺乏与 Unicode 兼容的 OpenType Bangla 字体。我使用的字体是共享软件,我需要为它支付许可费用。我在想,“为什么不尝试亲自开发呢?”在此过程中,我通过 bengalinux.org后来更名为 Ankur 小组)接触到了分散在世界各地的孟加拉语使用者,他们正试图在 Linux 操作系统中使用孟加拉语。
我加入了他们的邮件列表,我们在内部与当局之间讨论了孟加拉语的 Unicode 和 OpenType 规范中的各种缺陷,然后在适当的时候进行了纠正。我的贡献是将传统的孟加拉字体转换为兼容 Unicode 的 OpenType 字体,翻译 UI 等。这个小组还发行了世界上第一张带有孟加拉语 UI 的 Live Linux CD。
2003 年我搬家到了一个无法访问互联网的地方。我只有在周日去加尔各答时才能联系到小组。当时Linux 的孟加拉语本地化已经成为了主流。我们的一些志愿者加入了 Red Hat 从事翻译和字体开发工作。我也忙于我的医疗工作,几乎没时间去进行开源开发。
如今,我觉得使用 Linux 做日常工作比其他任何操作系统都要舒服。我也为能与一个能让人们用自己的语言交流的项目联系在一起而感到自豪。它也为长期以来由于不会说英语而被认为处于“<ruby>数字鸿沟<rt>digital divide</rt></ruby>”另一端的人们带来了计算能力。孟加拉语实际上是世界上使用最广泛的语言之一,这个项目消除了全球人口中很大一部分人接触数字科技的主要语言壁垒。
### 加入开源
加入到开源运动中来很容易。主动做一些对自己有用的事情,然后思索一下所做的事情如何能对他人也有帮助。关键在于使它免费可用,它可以给世界带来难以估量的价值。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/linux-bengali
作者:[Dr Anirban Mitra][a]
选题:[lujun9972][b]
译者:[JonnieWayy](https://github.com/JonnieWayy)
校对:[wxy](https://github.com/wxy )
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/mitradranirban
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/india-globe-map.jpg?itok=6sSEL5iO (India on the globe)
[2]: http://www.yudit.org/

View File

@ -0,0 +1,96 @@
[#]: collector: (lujun9972)
[#]: translator: (windgeek)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12449-1.html)
[#]: subject: (What's the difference between DevSecOps and agile software development)
[#]: via: (https://opensource.com/article/20/7/devsecops-vs-agile)
[#]: author: (Sam Bocetta https://opensource.com/users/sambocetta)
DevSecOps 和敏捷软件开发有什么不同?
======
> 你更专注于安全性还是软件交付,还是可以两者兼得?
![](https://img.linux.net.cn/data/attachment/album/202007/24/225337mb44xoe2byvz4x4o.jpg)
技术社区中存在一种趋势,经常互换地使用 DevSecOps 和敏捷软件开发这两个术语。尽管它们有一些相似性,例如都旨在更早地检测风险,但在改变团队的[工作方式层面有很大不同][2]。
DevSecOps 建立在敏捷开发建立的一些原则上。但是DevSecOps 特别专注于[集成安全功能][3],而敏捷开发则专注于交付软件。
知道如何保护你们的网站或应用程序免受勒索程序和其他威胁的侵害,实际上取决于你使用的软件和系统开发。这可能会影响你选择使用 DevSecOps、敏捷软件开发还是两者兼而有之。
### DevSecOps 和敏捷软件开发的不同之处
两者的主要区别可以归结为一个简单的概念:安全性。这取决于你的软件开发实践,你们公司的安全措施 —— 以及何时、何地以及由谁实施,都可能会有很大不同。
每个企业都[需要 IT 安全][4]来保护其重要数据。如果企业真正重视 IT 安全一般都会采取虚拟专用网VPN、数字证书、防火墙保护、多因子身份验证、安全的云存储包括向员工介绍基本的网络安全措施。
当你信任 DevSecOps 时,你就会把公司的安全问题,本质上使其等同于持续集成和交付。 DevSecOps 方法论在开发之初就强调安全性,并使其成为整体软件质量不可或缺的组成部分。
基于 DevSecOps 安全性的三大原则:
* 平衡用户访问难易程度及数据安全性
* 使用 VPN 和 SSL [加密数据][5]可防止数据在传输过程中受到入侵者的攻击
* 使用可以扫描新代码的安全漏洞并能通知开发人员该漏洞的工具来预测防范未来的风险
尽管 DevOps 一直打算包含安全性,但并非每个实践 DevOps 的组织都牢记这一点。DevSecOps 在 DevOps 的演进形式中,可以提供更加清晰的信息。尽管它们的名称相似,但这两个[不应混淆] [6]。在 DevSecOps 模型中,安全性是团队的主要驱动力。
同时,敏捷开发更专注于迭代开发周期,这意味着反馈意见会不断融入到持续的软件开发中。[敏捷的关键原则][7]是拥抱不断变化的环境,为客户和使用者提供竞争优势,让开发人员和利益相关者紧密合作,并在整个过程中始终保持关注技术卓越,以提升效率。换句话说,除非敏捷团队在其定义中包括安全性,否则安全性在敏捷软件开发中算是事后思考。
### 国防机构面临的挑战
如果要说专门致力于最大程度地提高安全性的组织美国国防部DoD就是其中之一。在 2018 年,美国国防部发布了针对软件开发中的“假敏捷”或“以敏捷为名”的[指南][8]。该指南旨在警告美国国防部高管注意不良编程的问题,并说明如何发现它以避免风险。
使用这些方法不仅可以使美国国防部受益。医疗保健和金融部门也[保存着][9]必须保证安全的大量敏感数据。
美国国防部通过其现代化战略(包括采用 DevSecOps来改变防范形式至关重要。尤其在这个连美国国防部容易受到黑客攻击和数据泄露的时代这一点在 2020 年 2 月的[大规模数据泄露][10]中已经得到了证明。
将网络安全最佳实践转化为现实生活中的开发仍然还存在固有的风险。事情不可能 100 完美地进行。最好的状况是稍微有点不舒服,最坏的情况下,它们可能会带来全新的风险。
开发人员,尤其是那些为军用软件编写代码的开发人员,可能对[所有应该采用 DevSecOps 的情境][11]没有透彻的了解。学习曲线会很陡峭,但是为了获得更大的安全性,必须承受这些必不可少的痛苦。
### 自动化时代的新模式
为了解决对先前安全措施日益增长的担忧,美国国防部承包商已开始评估 DevSecOps 模型。关键是将该方法论部署到持续的服务交付环境中。
应对这个问题,出现了三个方向。第一种涉及到自动化,自动化已在大多数隐私和安全工具中[广泛使用][12],包括 VPN 和增强隐私的移动操作系统。大型云基础架构中的自动化无需依赖于人为的检查和平衡,可以自动处理持续的维护和进行安全评估。
第二种专注于对于过渡到 DevSecOps 很重要的安全检查点。而传统上,系统设计初期对于数据在各个组件之间移动时依旧可以访问是不做期望的。
第三种也是最后一种涉及将企业方式用于军用软件开发。国防部的许多承包商和雇员来自商业领域,而不是军事领域。他们的背景为他们提供了为大型企业[提供网络安全][13]的知识和经验,他们可以将其带入政府部门职位中。
### 值得克服的挑战
转向基于 DevSecOps 的方法论也提出了一些挑战。在过去的十年中,许多组织已经完全重新设计了其开发生命周期,以适应敏捷开发实践,在不久之后进行再次转换看起来令人生畏。
企业应该安下心来,因为即使美国国防部也遇到了这种过渡带来的麻烦,他们在应对推出新流程使得商业技术和工具广泛可用的挑战上并不孤独。
展望一下未来,其实切换到 DevSecOps 不会比切换到敏捷软件开发更痛苦。而且通过将[创建安全性的价值][4]添加到开发工作流程中,以及利用现有敏捷开发的优势,企业可以获得很多收益。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/devsecops-vs-agile
作者:[Sam Bocetta][a]
选题:[lujun9972][b]
译者:[windgeek](https://github.com/windgeek)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/sambocetta
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/devops_confusion_wall_questions.png?itok=zLS7K2JG (Brick wall between two people, a developer and an operations manager)
[2]: https://tech.gsa.gov/guides/understanding_differences_agile_devsecops/
[3]: https://www.redhat.com/en/topics/devops/what-is-devsecops
[4]: https://www.redhat.com/en/topics/security
[5]: https://surfshark.com/blog/does-vpn-protect-you-from-hackers
[6]: https://www.infoq.com/articles/evolve-devops-devsecops/
[7]: https://enterprisersproject.com/article/2019/9/agile-project-management-explained
[8]: https://www.governmentciomedia.com/defense-innovation-board-issues-guide-detecting-agile-bs
[9]: https://www.redhat.com/en/solutions/financial-services
[10]: https://www.military.com/daily-news/2020/02/25/dod-agency-suffers-data-breach-potentially-compromising-ssns.html
[11]: https://fcw.com/articles/2020/01/23/dod-devsecops-guidance-williams.aspx
[12]: https://privacyaustralia.net/privacy-tools/
[13]: https://www.securitymagazine.com/articles/88301-cybersecurity-is-standard-business-practice-for-large-companies

View File

@ -0,0 +1,106 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12446-1.html)
[#]: subject: (Ubuntu 19.10 Reaches End of Life. Upgrade to Ubuntu 20.04 As Soon As Possible!)
[#]: via: (https://itsfoss.com/ubuntu-19-10-end-of-life/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
Ubuntu 19.10 产品寿命结束,尽快升级到 Ubuntu 20.04
======
> Ubuntu 19.10 Eoan Ermine 产品寿命结束。这意味着它不会获得任何安全或维护更新。继续使用 Ubuntu 19.10 将很危险,因为你的系统将来可能会因为缺少安全更新而变得脆弱。你应该升级到 Ubuntu 20.04。
[2019 年 10 月发布的 Ubuntu 19.10][1] 带来了一些为 [Ubuntu 20.04][2] 做准备的新功能。
作为非 LTS 版本,它有 9 个月的寿命。截至 2020 年 7 月 17 日,它的生命周期结束,并不会再收到任何更新。
### Ubuntu 19.10 生命周期结束
![][3]
我之前已经[详细解释了 Ubuntu 的发布周期和产品寿命结束][4]。如果此后继续使用 Ubuntu 19.10,我会重申这对你和你的系统意味着什么。
[软件通常有预定义的生命周期][5]一旦软件版本到达生命周期结束它将停止获取更新和支持。生命周期结束后Ubuntu 19.10 不再会从 Ubuntu 获得系统更新、安全更新或应用更新。
如果你继续使用它,你的系统可能会成为潜在的网络攻击的受害者,因为黑客往往会利用脆弱的系统。
之后,你可能无法使用 `apt` 命令安装新软件,因为 Ubuntu 将归档 19.10 的仓库。
### 如果你使用的是 Ubuntu 19.10,该怎么办?
首先,[检查你使用的 Ubuntu 版本][6]。这可以在终端中输入此命令完成:
```
lsb_release -a
```
```
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 19.10
Release: 19.10
Codename: Eoan
```
如果你看到 Ubuntu 19.10,你应该做以下两项工作之一:
* 如果你有良好、稳定的互联网连接,从 Ubuntu 19.10 升级到 20.04。你的个人文件和大多数软件保持不变。
* 如果你有着缓慢或不稳定的互联网连接,你应该[全新安装的 Ubuntu 20.04][7]。你的文件和磁盘上的所有内容将被擦除,因此你应该在外部磁盘上备份重要数据。
#### 如何从 19.10 升级到 20.04 (如果你有良好的互联网连接)
我之前已经详细讨论了 Ubuntu 版本升级。我会在这里快速说下步骤。
首先,请确保在“软件和更新”中已设置接收新版本通知。
进入“软件和更新”:
![][8]
进入“更新”选项卡,将“通知我新的 Ubuntu 版本”设置为“对于任何新版本”:
![][9]
现在,安装所有挂起的更新。
现在,再次运行更新管理器工具。你应该可以选择升级到 Ubuntu 20.04。点击升级按钮并按照说明操作。
它会安装大约 1.2GB 的软件包。这就是为什么你需要一个良好和稳定的互联网连接。
![][10]
这样的升级会保持你的家目录。不过,仍建议在外部磁盘进行备份。
### 你仍在使用 Ubuntu 19.10 吗?
如果你仍在使用 Ubuntu 19.10,那么必须为升级或全新安装做好准备。你不能忽视它。
如果你不喜欢这样的频繁版本升级,你应该使用支持五年的 LTS 版本。当前的 LTS 版本是 Ubuntu 20.04,你无论如何都应该升级到它。
你是否正在使用 Ubuntu 19.10?你是否已升级到 Ubuntu 20.04?如果你面临任何问题,或者如果你有任何问题,请让我知道。
--------------------------------------------------------------------------------
via: https://itsfoss.com/ubuntu-19-10-end-of-life/
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/ubuntu-19-10-released/
[2]: https://itsfoss.com/download-ubuntu-20-04/
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/ubuntu-19-10-end-of-life.jpg?ssl=1
[4]: https://itsfoss.com/end-of-life-ubuntu/
[5]: https://en.wikipedia.org/wiki/Systems_development_life_cycle
[6]: https://itsfoss.com/how-to-know-ubuntu-unity-version/
[7]: https://itsfoss.com/install-ubuntu/
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/03/upgrade-ubuntu-1.jpeg?ssl=1
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2017/11/software-update-any-new-version.jpeg?resize=800%2C378&ssl=1
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/software-updater-focal.jpg?ssl=1

View File

@ -0,0 +1,132 @@
[#]: collector: (lujun9972)
[#]: translator: (Mikedkmilk)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12445-1.html)
[#]: subject: (Why People Are Crazy About Arch Linux? Whats so Special About it?)
[#]: via: (https://itsfoss.com/why-arch-linux/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
为什么人们对 Arch Linux 如此着迷?它有什么特别之处?
======
顺便说一句(利益相关),我用 Arch
你或许已经在 Linux 论坛、朋友相互讨论或表情包里看到过这个术语。
你可能想知道为什么 Arch Linux 如此受欢迎,为什么人们这么喜欢它?因为有更容易使用,甚至更好的[基于 Arch 的发行版][1]。
在本文中,我将列出 Linux 用户喜欢使用 [Arch Linux][2] 的一些原因。
### 人们喜欢使用 Arch Linux 的六个原因
![][3]
这些只是我的看法,当然,为什么你应该使用 Arch Linux 并没有固定的原因。这是我在十多年里与 Linux 用户和社区打交道的经验中观察到的。
让我们一起看看为什么 Arch Linux 如此受欢迎。
#### 1、DIY 的方式可以让你掌控操作系统的各个方面
我一直认为 Arch Linux 是一个可以让你自己动手打造的操作系统。从安装到管理Arch Linux 放手让你处理一切。
你可以自己决定使用哪种桌面环境、安装哪些组件和服务。这种精细化的控制能够赋予你一个精简的操作系统,可以让你自由选择所需的组件来构建属于你自己的系统。
如果你是一个 DIY 爱好者,你会喜欢 Arch Linux 的。
#### 2、通过 Arch Linux可以更好地理解 Linux 的工作原理
![Installing Arch Linux by creating partition and making filesystem via command line][4]
如果你曾经尝试过安装 Arch Linux你就会知道它的复杂性。
但这种复杂性同时也意味着你将被迫学习一些在其他发行版中可能永远不会费心学习的东西。
比如说在安装 Arch Linux 过程中配置网络本身就是一个很好的学习课程。
如果开始你有感到有困惑不懂的时候Arch Linux 的[维基][5]可以帮助你。它是互联网上最广泛和最棒的由社区管理的文档。仅仅只是浏览 Arch Linux 的维基,就可以学到很多东西。
#### 3、滚动发行模式可以为你提供最新的内核和软件
![System update in Arch Linux][6]
Arch Linux 是一个滚动发行版,这意味着新的内核和应用程序版本一经发布,就会立即向你推送。
当大多数其他 [Linux 发行版还在提供旧的 Linux 内核版本][7]时Arch 会迅速向你提供最新的内核。
而软件也是如此。如果 Arch 资源库中的软件发布了新版本Arch 用户通常会比其他用户先获得新版本。
在滚动发行模式下,一切都是新鲜和前沿的。你不必把操作系统从一个版本升级到另一个版本,只要使用 [pacman 命令][8],你会始终保持最新的版本。
#### 4、Arch 用户资源库,即 AUR
![][9]
Arch Linux 的资源库中有大量的软件。AUR 扩展了 Arch Linux 的软件产品。在 Arch Linux 中,你可以通过 [AUR][10] 得到相当多的软件。
AUR 是采用社区驱动的方式来提供更新的应用程序。你可以在 [AUR 辅助工具][11]的帮助下搜索和安装应用程序。
#### 5、成就感
![][12]
正如 James Clear 在他的书《<ruby>原子习惯<rt>Atomic Habits</rt></ruby>》中提到的那样,**人类的大脑喜欢挑战,但前提是在一个最理想的困难区域**。
还记得你第一次安装成功 Linux 时的感觉吗?即便你安装的是 Linux Mint。这给了你一种成就感你成功安装了 Linux
如果你已经使用 Ubuntu、Fedora 或其他发行版一段时间了,现在开始感到舒适(或厌倦),你可以尝试安装一下 Arch Linux。
对于一个有一定经验的 Linux 用户来说,[成功安装 Arch Linux][13]本身就会给你一种成就感。
这是一个挑战,但却是可以实现的。如果你建议一个新的 Linux 用户尝试 Arch Linux 或者更复杂的 Linux 发行版比如 [Linux From ScratchLFS][14],这个挑战就太难实现了。
这种成功完成挑战的感觉也是人们使用 Arch Linux 的原因之一。
#### 6、没有企业的参与Arch 是由社区创建、支持和拥有的
Ubuntu 由 Canonical 支持Fedora 来自 Red Hat现在是 IBM 的一部分openSUSE 来自 SUSE。所有这些主流发行版都是企业支持的。
这本身并不是坏事或过错,但是有一些人不喜欢企业参与开源项目。
正如 Debian 一样Arch Linux 是为数不多的仅由社区参与的 Linux 发行项目之一。
你可能会指出,许多其他发行版如 Linux Mint 等不是由企业赞助的。好吧,这可能是真的,但 Linux Mint 本身就是基于 Ubuntu 的,并且使用 Ubuntu 的资源库。而 Arch Linux 不是另一个发行版的衍生物。
从这个意义上说,[Debian][15] 和 Arch Linux 是更纯粹的社区驱动项目。这对很多人来说可能无关紧要,但确实有一些人在意这些事情。
#### 对你来说,为什么 Arch Linux 如此受欢迎?
现在你可能不同意我提出的所有观点,那没关系。我想知道你是怎么看待 Arch Linux 在 Linux 用户中如此受欢迎,并具有崇拜的地位的?
当你写评论时,让我分享一下“我用 Arch”的表情包 :)
![](https://scontent-fml2-1.xx.fbcdn.net/v/t1.0-0/p526x296/109618601_1759578370849589_736435313539592753_o.jpg?_nc_cat=100&_nc_sid=8024bb&_nc_ohc=MYp_pidAMBMAX8z24Mc&_nc_ht=scontent-fml2-1.xx&_nc_tp=6&oh=9c2bf18b620cf90edb2dd32625b03b41&oe=5F3E8F39)
--------------------------------------------------------------------------------
via: https://itsfoss.com/why-arch-linux/
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[Mikedkmilk](https://github.com/Mikedkmilk)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/arch-based-linux-distros/
[2]: https://www.archlinux.org/
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/why-arch-linux.jpg?ssl=1
[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/01/efi_system_partition-1.png?ssl=1
[5]: https://wiki.archlinux.org/
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/sudo-pacman-Syu.png?ssl=1
[7]: https://itsfoss.com/why-distros-use-old-kernel/
[8]: https://itsfoss.com/pacman-command/
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/01/AUR.png?resize=800%2C451&ssl=1
[10]: https://itsfoss.com/aur-arch-linux/
[11]: https://itsfoss.com/best-aur-helpers/
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/installed-arch-linux.png?ssl=1
[13]: https://itsfoss.com/install-arch-linux/
[14]: http://www.linuxfromscratch.org/
[15]: https://www.debian.org/

View File

@ -0,0 +1,56 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12461-1.html)
[#]: subject: (Getting started as an open source builder and more industry trends)
[#]: via: (https://opensource.com/article/20/7/open-source-industry-trends)
[#]: author: (Tim Hildred https://opensource.com/users/thildred)
每周开源点评:开源建设者入门,以及更多的行业趋势
======
> 每周关注开源社区和行业趋势。
![](https://img.linux.net.cn/data/attachment/album/202007/28/175317mgsvgtvstvcggsch.jpg)
我在一家采用开源软件开发模型的企业软件公司任高级产品营销经理,我的一部分职责是为产品营销人员、经理和其他相关人定期发布有关开源社区、市场和业界发展趋势的更新。以下是该更新中我和他们最喜欢的五篇文章。
### 《[开放源码建设者:入门][2]》
> "最后,我发现自己想要自己修改代码,"Liz 说。她的第一个贡献是为 Django 框架做了一个授权扩展。她补充说:"我记得当时我很担心维护者可能不希望一个完全陌生的人做的改动,所以当它被接受时,我感到很兴奋,也很欣慰……得到认可,甚至感谢你的贡献,这种感觉总是很好。"
**分析:** 这一系列对开源维护者的采访(引自 [Liz Rice][3])交汇了跳入开源领域的动机和经验。这也是对天才独狼开发者神话的一个点赞,你可以自己走很远的路,但如果你知道如何与其他人很好地合作,你会走得更远,建立更好的东西。如果你知道如何说服和激励他们,你会走得更远。
### 《[Fluent Bit v1.5:轻量级和高性能日志处理器][4]》
> 本次主要版本的最大亮点之一是不同公司与 Fluent Bit 核心维护者的联合工作,为 Google、Amazon、LogDNA、New Relic 和 Sumo Logic 等公司内部提供的可观察性云服务带来了改进和新的连接器。
**分析:** “从不同来源收集数据/日志,统一并将其发送到多个目的地”是一项繁琐的任务,但这是超大规模企业及其客户共同的任务。证据 A一个开源工作完全如其预期的典型例子。祝贺 Fluent Bit 团队的这次发布!
### 《[Kubernetes 如何让 Nubank 工程师每周部署 700 次][5]》
> 因此,生产环境的部署时间从 90 分钟变成了 15 分钟。而 Nobre 说这是“最主要的好处因为它有助于开发人员的体验”。如今Nubank 的工程师每周部署 700 次。“对于一家银行来说你会说这太疯狂了”Capaverde 笑着说。“但这并不疯狂,因为有了 Kubernetes 和金丝雀部署,回滚变化更容易,因为部署速度也更快。人们的出货频率更高,更有信心。”
**分析:** 我觉得这是个赢家,也是个输家。当然,他们降低了做出改变的成本,以一种让人们更有信心去尝试的方式。但他们的开发人员不能再在等待部署完成的同时跑 10 公里,现在只能在一次 TED 演讲中凑合。
希望你喜欢这个列表,下周再见。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/open-source-industry-trends
作者:[Tim Hildred][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/thildred
[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://idk.dev/open-source-builders-getting-started/
[3]: https://twitter.com/lizrice
[4]: https://www.cncf.io/blog/2020/07/14/fluent-bit-v1-5-lightweight-and-high-performance-log-processor/
[5]: https://www.cncf.io/blog/2020/07/10/how-kubernetes-empowered-nubank-engineers-to-deploy-200-times-a-week/

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: ( jiangyaomin)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
@ -56,7 +56,7 @@ via: https://opensource.com/article/19/2/open-science-git
作者:[Jon Tennant][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
译者:[译者ID](https://github.com/jiangyaomin)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,73 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (What you need to know about Rust in 2020)
[#]: via: (https://opensource.com/article/20/1/rust-resources)
[#]: author: (Ryan Levick https://opensource.com/users/ryanlevick)
What you need to know about Rust in 2020
======
While many programmers have long used Rust for hobby projects, in 2019,
the language attracted support from major technology companies, as the
top Rust articles on Opensource.com explain.
![Person using a laptop][1]
[Rust][2] has drawn plenty of attention from programmers on sites like Hacker News for a while. While many have long [loved using the language][3] for hobby projects, it didn't start catching on in industry until 2019, when this really started to change.
Over the last year, many large companies, including [Microsoft][4], [Facebook][5], and [Intel][6], came out in support of Rust, and many [smaller ones][7] took notice. As the first emcee at [RustFest][8], the largest Rust conference in Europe, in 2016, I didn't meet a single person professionally using Rust who didn't work at Mozilla. Three years later, it seemed like every other person I talked to at RustFest 2019 was using Rust in their day job for another company, whether as a game developer, a backend engineer at a bank, a creator of developer tools, or something else.
In 2019, Opensource.com also played a role by reporting on the growing interest in Rust. In case you missed them, here are the top articles about Rust on Opensource.com over the last year.
### Building the virtualization stack of the future with rust-vmm
Amazon's [Firecracker][9] is the virtualization technology that powers AWS Lambda and Fargate, and it is written completely in Rust. One of the technology's authors, Andreea Florescu, offers insight into Firecracker and its related technologies in [_**Building the virtualization stack of the future with rust-vmm**_][10].
Firecracker started life as a fork of Google's [CrosVM][11] but quickly diverged due to the differing needs of the two projects. Despite this, there are many common pieces that are best shared across the project and in any other virtual machine manager (VMM) written in Rust. With that in mind, the [rust-vmm][12] project started as a way for Amazon and Google, as well as Intel and Red Hat, to share common Rust "crates" (i.e., packages) with each other and the rest of the open source community. These include interfaces to KVM (Linux virtualization APIs), Virtio device support, and a kernel loader.
It's truly amazing to see some of the titans of the software industry working together around a common technology stack written in Rust. Given this and other partnerships around [technology stacks written in Rust][13], I wouldn't be surprised to see more of this in 2020.
### Why to choose Rust as your next programming language
Adopting a new language, especially at a large company with a long-established technology stack, is no easy task. I had the pleasure of writing [_**Why to choose Rust as your next programming language**_][14] about how Microsoft is looking into adopting Rust when so many other interesting programming languages have not been considered.
Choosing a programming language involves many different criteria—from technical to organizational to even emotional. Some of these criteria are easier to measure than others. For instance, it's easier to understand the costs of technical changes, like adapting build systems and building new tooling, than it is to understand organizational or emotional issues like how productive or happy developers will be using this new language. What's more, the easy-to-measure criteria are often cost-related, while the hard-to-measure criteria are often benefits-oriented. This often leads to costs getting more weight in the decision-making process, even though it's not necessarily true that the costs outweigh the benefits—it's just that they're easier to measure. This makes it unlikely for a company to adopt a new language.
However, one of Rust's largest benefits is how easy it is to measure its ability to write secure yet performant systems software. Given that 70% of severe vulnerabilities at Microsoft are due to memory-safety issues that Rust is designed to prevent, and that these issues cost the company billions of dollars per year, it's easy to measure and understand the benefits of adopting the language.
Whether full-scale adoption of Rust at Microsoft will happen remains to be seen, but Rust's future is bright if only for the fact that is has a clear and measurable benefit over existing technologies.
### Rust in 2020
Rust is really starting to gain traction in industry. Although it still has a long way to go to reach the popularity of languages like C++. I expect more companies to start adopting Rust in 2020. The Rust community must now set its sights on welcoming people and companies into the community while ensuring that the things that have driven the language to this point remain in place.
Rust is more than just a compiler and a set of libraries. It's a group of people who care about making systems programming easy, safe, and fun. The coming year will be critical in Rust's journey from a hobbyist language to one of the main languages used in the software industry.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/1/rust-resources
作者:[Ryan Levick][a]
选题:[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/ryanlevick
[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://rust-lang.org/
[3]: https://insights.stackoverflow.com/survey/2019#technology-_-most-loved-dreaded-and-wanted-languages
[4]: https://youtu.be/o01QmYVluSw
[5]: https://youtu.be/kylqq8pEgRs
[6]: https://youtu.be/l9hM0h6IQDo
[7]: https://oxide.computer/blog/introducing-the-oxide-computer-company/
[8]: https://rustfest.eu
[9]: https://firecracker-microvm.github.io/
[10]: https://opensource.com/article/19/3/rust-virtual-machine
[11]: https://chromium.googlesource.com/chromiumos/platform/crosvm/
[12]: https://github.com/rust-vmm
[13]: https://bytecodealliance.org/
[14]: https://opensource.com/article/19/10/choose-rust-programming-language

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (JonnieWayy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (JunJie957)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -1,56 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (My Linux story: breaking language barriers with open source)
[#]: via: (https://opensource.com/article/20/7/linux-bengali)
[#]: author: (Dr Anirban Mitra https://opensource.com/users/mitradranirban)
My Linux story: breaking language barriers with open source
======
Open source projects can help change the world by removing barriers,
linguistic and otherwise.
![India on the globe][1]
My open source journey started rather late in comparison to many of my peers and colleagues.
I was pursuing a post-graduate degree in medicine in 2000 when I managed to fulfill a dream Id had since high school—to buy my own PC. Before that, my only exposure to computers was through occasional access in libraries or cyber cafés, which charged exorbitant prices for access at that time. So I saved up portions of my grad student stipend and managed to buy a Pentium III 550 Mhz with 128MB RAM, and as came standard in most computers in India at that time, a pirated version of Windows 98.
There was no Internet access in my hostel room. I had to go to the nearby cyber café, download software there, and then carry around dozens of floppy discs.
As happy as I was finally owning my own computer, it bothered me that I could not write in my mother tongue, Bangla. I came across resources provided by CDAC, a government agency that provided Indian language tools based on ISCII, an older national standard upon which the Unicode standard of Indic language was based. It was difficult to learn the keyboard layouts.
### My first contribution
Soon, I came across a software called [Yudit][2], which offered phonetic typing of Indic language using the standard QWERTY keyboard. It was with Yudit that I first came across terms like open source and free software, GNU, and Linux. Yudit allowed me to translate UI elements into Bengali too, and when I submitted the translations to the developer, he gladly incorporated them into the next version and credited me in the README of the software.
This was exciting for me, as I was seeing, for the very first time, an application user element in my mother tongue. Moreover, I had been able to contribute to the development of a software despite having almost zero knowledge of coding. I went on to create an ISCII-to-Unicode converter for Yudit, which can also be used for transliteration between various Indian languages. I also bought a Linux magazine that came with a free live CD of Knoppix, and thats how I got a feel for the Linux desktop.
Another issue I faced was the lack of availability of Unicode-compliant OpenType Bangla font. The font I used was shareware, and I was supposed to pay a license fee for it. I thought, “Why not try my hand at developing it myself?” In the process, I came in contact with Bangla speakers scattered worldwide who were trying to enable Bangla in the Linux operating system, via `bengalinux.org` (later renamed Ankur group).
I joined their mailing list, and we discussed among ourselves and the authorities the various flaws in the Unicode and OpenType specifications of Bangla, which were then corrected in due course. I contributed by converting legacy Bangla fonts into OpenType Unicode-compliant fonts, translating UI, and so on. That group also came out with the worlds first Live Linux CD with a Bangla user interface.
In 2003, I had moved to a place where I did not have access to the Internet; I could only connect to the group on Sundays when I came to Kolkata. By that time, Bangla localization of Linux had become a mainstream thing. Some of our volunteers joined Red Hat to work on translation and font development. I also became busy in my medical practice and had little time left for open source development.
Now, I feel more comfortable using Linux to do my daily work than any other operating system. I also feel proud to be associated with a project which allows people to communicate in their own language. It also brought computing power to a population who were for a long time considered to be on the other side of the “digital divide” because they did not speak English. Bangla is actually one of the most widely spoken languages in the world, and this project removed a major barrier to access for a large chunk of the global population.
### Joining open source
Joining in on the open source movement is easy. Take the initiative to do something that is useful to yourself, and then think about how it could be useful to others. The key is to keep it freely available, and it can add untold value to the world.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/linux-bengali
作者:[Dr Anirban Mitra][a]
选题:[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/mitradranirban
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/india-globe-map.jpg?itok=6sSEL5iO (India on the globe)
[2]: http://www.yudit.org/

View File

@ -0,0 +1,58 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Data-center survey: IT seeks faster switches, intelligent computing)
[#]: via: (https://www.networkworld.com/article/3566925/data-center-survey-it-seeks-faster-switches-intelligent-computing.html)
[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/)
Data-center survey: IT seeks faster switches, intelligent computing
======
As data use changes, so do technical needs of the data center operators, who want speed and intelligence.
monsitj / Getty Images
The growth in data use and consumption means the needs of IT managers are changing, and a survey from Omdia (formerly IHS Markit) found [data-center][1] operators are looking for intelligence of all sorts, not just the artificial kind.
Omdia analysts recently surveyed IT leaders from 140 North American enterprises with at least 101 employees working in North American offices and data centers and asked them what features they wanted the most in their networking technology.
The results say respondents expect to more than double their average number of data-center sites between 2019 and 2021, and the average number of servers deployed in data centers is expected to double over the same timeline.
“The on-premises enterprise data center continues to flourish,” the authors wrote in the report. “We are seeing a continuation of the enterprise DC growth phase signaled by the 2018 respondents and confirmed by the respondents of this study. The transformation of the on-premises DC to a cloud architecture continues, and the enterprise DC will be considered a first-class citizen as enterprises build their multi-clouds and shift compute to the edge.”
But the emphasis appears to be on networking and not necessarily server gear. From 2019 to 2021, more than 60% of respondents expect to increase their investments in Ethernet switches, Fibre Channel switches, network analytics, and network automation. The installed base of data-center Ethernet-switch ports will grow 27% between 2019 and 2021 with higher speeds (100/200/400GE) making up a larger portion of the deployed base.
High speeds (65% of respondents), openness and interoperability (65%), and application-awareness (65%) are the top features respondents seek when making data-center Ethernet-switching purchases. Increased port speeds are an obvious upgrade decision, and it remains top-of-mind for enterprises.
And not just any switches will do. The number of respondents using Open Compute Project (OCP)-certified switches has risen significantly since 2019: 76% of respondents adopted OCP switches in 2019 per the 2019 survey versus 60% of respondents in 2018. Bare-metal switches, like those offered by vendors of OCP-certified equipment, are available from several hardware vendors such as Edgecore, Delta Networks and Mellanox/Nvidia.
### Smarter software**
**
Application awareness and automated virtual machine (VM) movement are becoming more important as more data center traffic gets routed from central data centers to edge locations globally. Omdia says the results show that data-center networks can no longer operate in siloes, and respondents want solutions that are easy to integrate, allowing them to monitor their data across compute and storage, independent of physical data-center location.
And with all that data and virtual machines to move around, respondents seem to be keen on the benefits that AI promises to bring. Many vendors claim their high-throughput (100G-plus Ethernet) DC switches are designed for use in environments required to handle resource-intense applications like AI and ML. But Omdia says it remains to be seen how AI features will impact the DC networking market and what qualitative and quantitative outcomes will result.
Omdia also says data-center orchestration software will provide automated coordination and management of resource pools including network equipment, servers, and storage. “Enterprise IT teams are selecting orchestration software, and the choice for physical and virtual switching in the DC will depend on the orchestration software selected,” the report said.
It flags Red Hat Enterprise OpenStack Platform (celebrating its tenth anniversary this month), VMware vCloud, Cisco Intelligent Automation for Cloud [IAC], and Microsoft System Centerj among the leaders of data center orchestration.
Join the Network World communities on [Facebook][2] and [LinkedIn][3] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3566925/data-center-survey-it-seeks-faster-switches-intelligent-computing.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://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html
[2]: https://www.facebook.com/NetworkWorld/
[3]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,70 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Student Linux club refurbishes computers to support distance learning)
[#]: via: (https://opensource.com/article/20/7/donate-linux)
[#]: author: (Cam Citrowske https://opensource.com/users/camcitrowske)
Student Linux club refurbishes computers to support distance learning
======
Open source helps bridge the digital divide for families in need of
computers for distance learning during the pandemic.
![][1]
_This article is co-written by Cam Citrowske, a member of the Penguin Corps._
It was March 17, 2020, and I was in my classroom at Aspen Academy. The clock was ticking. This was to be the last day of school before we, along with every other public school in Minnesota, would close due to the outbreak of the new coronavirus. I had students in my room during lunch, advisory periods, and my elective classes all doing the same thing—installing Linux onto old computers so we could give them to students who would use them for school at home during the shelter in place order. I was only going to have the kids' help until dismissal time, but in the end, we had 17 computers ready to go. It was a start.
Hi, I'm Stu Keroff. I'm a social studies and technology teacher at Aspen Academy in Savage, MN. I am also the director of the Penguin Corps, our school's Linux club. When we started the club back in September of 2019, I wanted the kids at my new school to take on the same type of mission that the kids at my last school had: using Linux to close the "digital divide" (see this [article][2] about the Community School of Excellence Asian Penguins for more information). The Penguin Corps gave away a few computers during the year, but nothing had prepared us for what was coming.
It was in January that I first heard about COVID-19. At the time, it was making people sick in other countries, and while it was a topic of discussion in my social studies classes, I wasn't concerned because it wasn't in Minnesota.
![Linux club donating computers][3]
(Stu Keroff, [CC BY-SA 4.0][4])
By March, that had changed. Businesses were talking about how they would respond to the pandemic, and it raised the conversation about how it would affect schools. Fast forward to March 18, when all the schools in Minnesota were closed and converted to distance learning—teachers provide lessons online, and kids attend school in their homes over the internet. It was a huge change for all of us!
While it was tough for many of my students to go to school from their bedrooms or dining rooms, at least most of them had computers to use. But what about the kids at school who didn't have computers? Or the families who didn't have enough computers for all of the kids in the house? What were they supposed to do?
Our school's administrators reached out to me and the Penguin Corps to create a solution. We surveyed parents to find out how many families needed a computer and then got to work. We started by putting Linux on computers the school was no longer using, and then we gave those away. More responses started to pour in. We realized that the supply we had would not even be close to enough. This became a serious problem that was in need of a bigger solution.
Once we realized that, we started to ask for more. With help from the school, we reached out over social media and in the local newspaper, asking people to donate their old computers to us. A number of people and even some businesses like Caribou Coffee and St. Vincent de Paul of the Twin Cities responded. Laptops started to pour in. Most of them worked, but some needed minor repairs, such as new batteries, a charger, or a hard drive. All of the computers needed new software. Linux and open source apps were the solution. We got the computers up and running, tested them, and left them with the school to distribute.
The school continued to take referrals, and people came in to pick up laptops. The office receptionist eventually joined our team, walking parents through the software before they left with their laptops. Even though she had no previous experience with Linux, she was able to jump right in and contribute.
Prior to the shutdown, the Penguin Corps gave away six computers. Between March 16 and the first week of May, we gave away 60 computers. This effectively closed our school's digital divide.
And at what cost? Since we chose to go with used computers instead of buying new ones, the only thing we had to pay for were batteries, chargers, a couple of hard drives, and a keyboard. Total cost: approximately $900.00, or an average of $12.33 per computer, including the computers we had left over, which we're saving for the fall term.
The program even gave us the opportunity to help people outside of our school. Reverend Tim Christopher, a pastor in North Minneapolis, reached out to me and the Penguin Corps to ask for our help. A single mother in Minneapolis with two school-aged children needed computers for her kids to do distance learning from their home. Thanks to the Penguin Corps, both kids got one to use for school, for free.
Aspen Academy principal Melanie Jiskra said, "It was through this group of change agents that all Aspen Academy families had enough devices to continue their education through distance learning. Without the generosity of the people and companies who donated the laptops, the hard work and commitment of Mr. Keroff, and the talent, drive, and passion of the students to serve others, Aspen Academy would not have as successfully bridged the digital divide during this pandemic."
COVID-19 presented all schools with a challenge, and Aspen Academy's Penguin Corps demonstrated that open source software could be used to meet it. Our biggest challenge became our biggest victory.
Do you want to know more about how a Linux club can help your school or a school near you? You can email me at [studoeslinux@gmail.com][5]. You can also get ideas for starting your own program at [www.linuxclubguide.com][6].
The Asian Penguins Linux users group for middle school students is improving peoples lives through...
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/donate-linux
作者:[Cam Citrowske][a]
选题:[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/camcitrowske
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/penguin_corps_group_photo.jpg?itok=_uQlfxDa
[2]: https://opensource.com/education/15/3/asian-penguins-Linux-middle-school-club
[3]: https://opensource.com/sites/default/files/pictures/linux-club-donating-computers.jpg (Middle school Linux club donating computers)
[4]: https://creativecommons.org/licenses/by-sa/4.0/
[5]: mailto:studoeslinux@gmail.com
[6]: http://www.linuxclubguide.com

View File

@ -0,0 +1,82 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Globalization: A history of openness)
[#]: via: (https://opensource.com/open-organization/20/7/globalization-history-open)
[#]: author: (Ron McFarland https://opensource.com/users/ron-mcfarland)
Globalization: A history of openness
======
The history of our interconnected world is also a history of our
willingness to open up.
![India on the globe][1]
In my career conducting international business, I traveled to more than 80 countries worldwide. I was always struck by how strongly regions of the world are connected, and I began studying the forces of globalization as a result.
Several books on this subject were critical to this research. But the one I'd like to highlight here is [World 3.0: Global Prosperity and How to Achieve It][2] by Pankaj Ghemawat. This book first taught me how _little_ the global community is connected—but also how far it has come compared to the past. During Prof. Ghemawat's research, he worked with DHL and ultimately helped develop the [DHL Global Connectedness Index][3], which tracks how well the global community is interacting in four key measurements: trade, investment, telecommunication, and travel/migration. From that work, I developed and delivered a presentation on [global connectedness][4], which stressed that the world should increase its scores on those four measurements of globalization, as they are directly linked to food supply, health, security, pollution, jobs and other global benefits.
In this article series, I'll present my research from that period, then explain how we might think about the intersection of globalization and [open organization principles][5] around the world today. When people use terms like "globalization" and "global connectedness," in most cases what they _really_ mean is "building coordinated communities to provide goods/service globally and address global issues." Open organization principles are applicable here—but in this context, on a global scale.
But before I can explain that interconnection, I'll first need to outline Prof. Ghemawat's criteria. In this article, I'll do that, with a special emphasis on the way open organization principles are critical to all of them.
### Trade
By "trade," I'm referring to the imports and exports of goods and services between countries. It's a key dimension of a globally connected world. Trading extremely simple products and services might be possible via electronic transactions, perhaps over the internet. But on the other hand, highly complex products may require a company to build a distribution network in a wide range of countries worldwide. In this case, then, connectivity, collaboration, and leveraging other open organization principles would be extremely important. In my last job, for example, I set up product distributors throughout Europe and the United States and a production operation in China. Building a strong relationship was very important, difficult and took time and effort. I had to use open organization principles to their fullest.
### Investment
Global financial investments also have an impact on global connectedness. If an investor simply purchases shares of an overseas company or deposits funds in an overseas bank account, then more complex relationships are not as critical. But if a company wants to invest in a factory (or sales office for that matter) in a foreign country, then a great deal of interpersonal interaction is required. Economists define these two types of investments differently; they call the latter "foreign direct investment" or FDI. Projects focused on FDI get people working closely with each other across traditional geographic boundaries. Here again, open organization principles will play an important role.
### Communications
When considering global communications, think of two broad categories: verbal communications and written communications. The former may involve, for example, telephone communications—simply having the ability to get on a telephone and affordably talk to someone anywhere on the globe. Even today, in many parts of the world, this is not technically possible. On top of that, language becomes a problem internationally, as many people aren't communicating in a common language. These issues are being addressed, but according to the 2019 DHL Global Connectedness Index, this has been more difficult to measure than in the past. Today, there are simply too many communication methods to make tracking this dimension as easy as it was in the past, and those methods seem to be increasing at an exponential rate.
Thanks to proliferating internet access, written forms of communication are also increasing worldwide, but measuring, again, is more difficult to do. For this reason, I'd guess that the next real technological breakthrough will involve both foreign language electronic verbal communication (interpreting) and written communication (translating) software. This software is improving all the time, and could greatly contribute to global communications and information sharing between languages. This, then, will all lead to better integration and spread of open organization principles, as communications are sure to continue to increase worldwide. (Personally, I don't think this technology will replace person-to-person interaction, but could certainly support it.)
### Travel/migration
The last factor in the DHL Global Connectedness Index is the movement of people between countries. The first question to ask here is: "Why are people leaving a country and crossing borders? Why do people go from one country to another?" Reasons may include: for better education, for tourism purposes, for economic opportunities, and for safety (e.g., escaping war). Whatever the reason, it will determine how much people will interact with others in the host country. Wanting to go to a foreign country and being forced to leave one's home country are very different situations. The DHL Global Connectedness Index tries to measure factors like this. Open organization principles can be helpful here, particularly in community-building efforts, and in efforts to promote inclusivity.
Although these factors are always shifting, people of the world will continue to communicate, collaborate, interact, and influence each other on an ever-expanding scale.
And yet, if you study the DHL Global Connectedness Index, you will find that in all four measurements of trade, investment, communications and travel, the world is far less connected than it could be. More interaction still occurs within national borders than between countries. But as I will demonstrate in future articles of this series, global connectedness has a rather short history, relatively speaking, and we're still learning how best to collaborate and govern in a globally connected world. Understanding the role of open organization principles in this work will become even more important in the years ahead.
### Think global, act local
As we consider these issues and the impact open-style thinking can have on them, we'll naturally begin to ask: Where—and on what scale—should we begin addressing these problems? Are the issues _personal_, _local, national, or global_ in their scope and impact?
As we'll see in future articles in this series, issues like these are often too complex to be confined to just one of those scales. That's why it's important to think about "[glocalization][6]" to address these issues by respecting both local concerns and global impact.
Take the coronavirus for example. It impacts all humanity and requires [an open, global discussion applying open organization principles][7]. And global organizations, like the [World Health Organization (WHO)][8], will be involved in determining and communicating guidelines for combating the spread of COVID-19. But the issue is a personal one, too, as individuals learn new ways to take responsibility both for their health and the health of those around them.
So, as we continue exploring the dimensions of the DHL Global Connectedness Index, we should remember that many issues cut across all scales of human activity—and that our responses, based on open principles, should also operate at multiple levels. They should be [_adaptive_ to their contexts][9].
In the next article, I'll examine a short history of globalization. Interestingly enough, open organization principles have been at work since the beginning. I'll discuss globalization up to the Industrial Revolution (around the 1800s). In a later installment, I will discuss the evolution of globalization from the Industrial Revolution to the present day.
Armed with insight from the past, I want to offer proposals for moving forward on issues like pandemics, [climate change][10], global pollution, and others.
--------------------------------------------------------------------------------
via: https://opensource.com/open-organization/20/7/globalization-history-open
作者:[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/india-globe-map.jpg?itok=6sSEL5iO (India on the globe)
[2]: https://www.amazon.com/World-3-0-Global-Prosperity-Achieve/dp/142213864X
[3]: https://www.dhl.com/global-en/home/insights-and-innovation/thought-leadership/case-studies/global-connectedness-index.html
[4]: https://www.slideshare.net/RonMcFarland1/global-collaborating-create-prosperity?qid=ad57b725-174e-4cf2-8264-ac424a6ad814&v=&b=&from_search=22
[5]: https://opensource.com/open-organization/resources/open-org-definition
[6]: https://en.wikipedia.org/wiki/Glocalization
[7]: https://opensource.com/open-organization/20/6/covid-alliance
[8]: https://www.who.int/
[9]: https://opensource.com/open-organization/19/3/adaptive-leadership-review
[10]: https://opensource.com/open-organization/19/10/global-energy-climate-challenges

View File

@ -0,0 +1,72 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Are newer medical IoT devices less secure than old ones?)
[#]: via: (https://www.networkworld.com/article/3568608/are-newer-medical-iot-devices-less-secure-than-old-ones.html)
[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/)
Are newer medical IoT devices less secure than old ones?
======
Legacy medical IoT devices may lack security features, but newer ones built around commodity components can have a whole different set of vulnerabilities that are better understood by attackers.
Thinkstock
Experts differ on whether older connected medical devices or newer ones are more to blame for making healthcare networks more vulnerable to cyberattack.
The classic narrative of insecure [IoT][1] centers on the integration of older devices into the network. In some industries, those devices pre-date the [internet][2], sometimes by a considerable length of time, so its hardly surprising that businesses face a lot of challenges in securing them against remote compromise.
[[Get regularly scheduled insights by signing up for Network World newsletters.]][3]
Even if those devices arent quite that old, they often lack key capabilities in particular, remote software updates and configurable password protection that would help IT staff defend them against modern threats.
That might not be strictly true in regards to the medical field, according to Richard Staynings, chief security strategist for medical IoT security startup Cylera. There has, he argues, been an explosion in the number and variety of medical IoT devices in recent years, and many of those gadgets are at least as insecure as the true legacy equipment in the field.
In some cases, said Staynings, the older devices might actually be considerably more secure than those of more recent vintage. In particular, those based on dated technology like older versions of electrically erasable programmable read-only memory (EEPROM).
“The older systems were written in EEPROM you need an EEPROM reader to mess with them,” he said. “The codebase is not on the Internet for hackers to look at, and you need physical access to the EEPROM to rewrite it.”
In contrast, the newer devices frequently use software and hardware components that are much more familiar to potential attackers. “Theyre more ubiquitous in their design and construction they use [consumer off-the-shelf] operating systems, like Windows embedded, which is still being used believe it or not, and they are much more vulnerable to attack than a legacy system,” Staynings said.
Insecurity in the current generation of medical IoT hardware also carries the potential for ongoing problems, not just immediate ones. While IT assets get replaced rapidly, IoT devices often have much longer replacement cycles. “Medical devices have the half-life of plutonium,” said Staynings. “They just dont go away.”
Other experts are less sold on Staynings characterization of the threat to medical IoT, arguing that the idea that newer devices pose a greater threat than older ones flies in the face of recent efforts to make them safer. Keith Mularski directs an advisory cybersecurity practice at Ernst and Young, and described Staynings assertion as “surprising,” noting that the regulatory landscape for connected medical devices is quickly moving standards in a positive direction.
“The FDA has some pretty stringent guidelines that before devices can go to market, you need to put together threat modeling, so looking at security architecture, vectors, and so on ,and then in addition to that the FDA is getting ready to require third-party pen testing in premarket submissions,” said Mularski. “With legacy devices, those premarket submissions arent nearly as complete.”
Mularski does concede that some particularly vulnerable old devices are often more isolated on the network by design, in part because theyre more recognizable as vulnerable assets. Windows 95-vintage x-ray machines, for example, are easy to spot as a potential target for a bad actor.
“For the most part, I think most of the hospital environments, they do a good job at recognizing that they have these old deices, and the ones that are more vulnerable,” he said.
This underlines a topic most experts on simple awareness of the potential security flaws on a given network are central to securing healthcare networks. Greg Murphy is the CEO of Ordr, a network visibility and security startup based in Santa Clara. He said that both Mularski and Staynings have points in their favor.
“Anyone who minimizes the issue of legacy devices needs to walk a mile in the shoes of the biomedical engineering department at a hospital,” he said. “[But] on the flipside, new devices that are being connected to the network have huge vulnerabilities themselves. Many manufacturers themselves dont know what vulnerabilities their devices have.”
The only real way to address the issues, said Murphy, is at the network level trying to make everything secure at the device level might be a near-impossibility in many cases, and even getting an accurate picture of every device connected to a network often requires the use of an automated solution.
“This is not a problem of human scale anymore,” he said.
Both Mularski and Staynings concurred on this point, as well. Regardless of which devices on a particular network are the most vulnerable, its worth remembering that cybercriminals generally arent particular about what they compromise, as long as theyre able to gain access.
“There may be an attacker that comes across these devices, runs a scan and happens to see [a vulnerability], but we really havent seen specific targeting of medical devices,” said Mularski. “Its important to make sure that companies that have medical devices are enumerating their network, tracking their devices.”
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/3568608/are-newer-medical-iot-devices-less-secure-than-old-ones.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-the-internet-of-things-explained.html
[2]: https://www.networkworld.com/article/3410588/evolution-of-the-internet-celebrating-50-years-since-arpanet.html
[3]: https://www.networkworld.com/newsletters/signup.html
[4]: https://www.facebook.com/NetworkWorld/
[5]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,105 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Green Data Centers Scaling environmental sustainability for business and consumers collectively)
[#]: via: (https://www.networkworld.com/article/3568670/green-data-centers-scaling-environmental-sustainability-for-business-and-consumers-collectively.html)
[#]: author: (QTS https://www.networkworld.com/author/Andy-Patrizio/)
Green Data Centers Scaling environmental sustainability for business and consumers collectively
======
10 Tips for Choosing the Best Green Data Center
Regardless of how you identify politically, environmental sustainability has become an undeniable business directive. Global warming from carbon emissions, increasing sea levels and images of pollution are increasing public and shareholder pressure on corporations to take an active role in finding solutions and be accountable by setting goals and publicly documenting results.
In the IT industry, reducing electrical power generation from fossil fuels is priority #1, followed closely by water conservation and waste management.  
Multi-tenant data centers are one of the largest per capita consumers of electric power. Based on current estimates, data centers in the U.S. alone will consume approximately 73 thousand megawatts (MW) in 2020.
To put this in perspective, one megawatt is enough to power 700 households. A single data center can use power equivalent to a small city and typically requires a significant amount of water for cooling.
Worldwide, its estimated that data centers consume about three percent of the global electric supply and account for about two percent of total greenhouse gas (GHG) emissions.
Data center efficiency and sustainability now transcends companies, geographies, and workloads. There is no simple solution and the challenge is compounded as massive digitization of data globally is creating a parallel demand for energy.
IDC predicts the worlds data will grow from 33 zettabytes in 2017 to 175 zettabytes in 2025 and the amount of energy used by data centers continues to double every four years - meaning they have the fastest-growing carbon footprint of any area within the IT sector. 
Technological advancements are difficult to forecast, but several models predict data center energy usage could surpass more than 10% of the global electricity supply by 2030 if left unchecked.
For all of these reasons, the creation of green, sustainable, multi-tenant data centers has become essential in both an environmental and a business sense. Green data centers are built on pillars of commitments to innovative green and renewable strategies, water reclamation, recycling and waste management, and more. They do not contain obsolete systems (such as inactive or underused servers), and take advantage of newer, more efficient technologies.
Taking cues from the hyperscale data center operators, green data centers recognize the need to lead with modular energy efficient data center designs from the onset, adopt the latest in building technology and influence the overall supply chain for the actual sourcing of materials for these green data centers.
Benefits such as cost reduction, increased efficiency and knowledge that you are a better corporate citizen are obvious. What is not readily apparent is that by moving into a green multi-tenant data center, sustainability benefits are also passed on to the businesses and consumers who collectively benefit from the data centers green IT infrastructure.
The economies of scale are extremely significant. Instead of a business (such as a large online retailer) attempting to deploy its own green IT environment to power its service delivery, it outsources it to the green data center that can do it cheaper and better. The sustainability benefits are then passed along to all the consumers using its services and there could be hundreds of businesses like this in a single  green data center.
In addition, when you deal with a true green data center that is serious about sustainability, the benefits go far beyond the requirement that your power be renewable. There are environmental and philanthropic benefits that can be linked with your outsourced IT infrastructure.
The best green data center operators are starting to formally document and report their progress in Environmental, Social and Governance (ESG) reports made public annually. For conventional enterprises and data centers that do not have measurable sustainability as part of their governance, it is coming.
[QTS][1]  is one of a few data center companies holding themselves accountable as global citizens and committing to sustainability best practices that are impactful, achievable and will ultimately set the standard for the data center industry in the years to come.
QTS has committed to minimizing its data center carbon footprint utilizing as much renewable fuel, reclaimed water and recycled materials as possible by implementing a methodic sustainability approach featuring energy efficiency measures and renewable energy procurement, all backed by continuous innovation.
Knowing that transparency is fundamental to accountability, QTS is documenting and publicly reporting on sustainability goals, metrics and best practices one of only a few data center companies to do so.
To support this, QTS recently published its second Environmental, Social and Governance (ESG) Initiatives report ([accessed here][2]) that documents the industrys first formal commitment to provide 100% renewable energy across all of its data centers by 2025.
In 2019, QTS won numerous awards including the coveted GRESB benchmark ranking QTS as the #1 sustainable data center company among all data centers globally for its ESG initiatives.
Today QTS has seven data centers running on 100% renewable energy. Approximately 30% of its overall data center power requirements are now sourced from renewable energy sources, representing over 300 million kilowatt-hours (kWh) of renewable power. [According to the EPA][3], this makes QTS one of the largest users of green power among all data center companies and the 12th largest user among Top Tech &amp; Telecom companies. 
**10 Tips for Choosing a Green Data Center**
For those operating on-premises legacy data centers looking to move into green data centers, or for organizations already outsourcing to a less than green provider, following are 10 tips when evaluating green data center providers.
* Check the providers ESG scores and reviews from ranking organizations such as GRESB, The Carbon Disclosure Project (CDP), RE100, the EPA Green Power Partnership, Sustainalytics and look for documented commitments to 100% renewable energy.
* Look for innovation in power such as the use of AI to forecast power consumption, analyze data output, humidity, temperature, and other important statistics for improving efficiency, drive down costs, and reduce total power consumption.
* Check the EPA Green Power ranking to find the data centers leading in renewable power commitments.
* Look for industry-first zero water cooling solutions powered by 100% renewable wind and solar power.
* Renewable energy should impactful and cost effective. Look for data centers with innovative power procurement models that allow it purchase renewable energy on parity or below the price of conventionally produced power.
* Look for innovative companies that create an open dialogue with customers to gather feedback on sustainability initiatives and help the customers meet their ESG goals.
* Look for data center operators that work closely with utilities to develop tariffs and legislation that make it easier and more cost effective for everyone to procure renewable energy.
* Look for providers with innovative philanthropic programs such as the “Grow with QTS” program that plants more than 20,000 trees in the Sierra Mountains every year on behalf of its customers, or its HumanKind program that promotes clean water solutions in developing regions.
* Look for providers actively speaking and participating with leading organizations such as the EPAs Green Power Partnership, REBA, the Data Center Coalitions energy committee and RE100.
* Look for providers touting on-site physical features such as smart temperature and lighting controls, rainwater reclamation, recycling and waste initiatives, and EV charging stations.
No industry, nor individual company, is perfect. But, when necessary, it can align around a core set of principles that benefit themselves, their communities and generations to come. The threat of global climate change makes it impossible for data center providers to ignore their roles in the global concern. Committing to action today, as a unified industry, benefits all.
The fact that so many businesses are more environmentally aware means that contemplating what green, sustainable data centers can offer is becoming an increasingly important standard for choosing a data center provider.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3568670/green-data-centers-scaling-environmental-sustainability-for-business-and-consumers-collectively.html
作者:[QTS][a]
选题:[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://www.qtsdatacenters.com/
[2]: https://www.qtsdatacenters.com/resources/brochures/esg-initiatives-2019
[3]: https://www.epa.gov/greenpower/green-power-partnership-top-30-tech-telecom

View File

@ -0,0 +1,62 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Switch turns to Tesla for renewable energy storage)
[#]: via: (https://www.networkworld.com/article/3568358/switch-turns-to-tesla-for-renewable-energy-storage.html)
[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/)
Switch turns to Tesla for renewable energy storage
======
Switch will power its massive data centers with solar energy and use Tesla Megapacks for large-scale energy storage.
ipopba / Getty Images
Data center provider [Switch][1] has selected Tesla as the battery supplier for a massive solar project at its northern Nevada data center facilities.
It's a geographically easy alliance as Switch's campus is right near Tesla's [Gigafactory Nevada][2] manufacturing facility. While best known for its cars, Tesla has also made quite an entry in the battery space with products such as the Powerwall, Powerpack, and Megapack energy storage products.
Switch recently broke ground on Gigawatt 1, a huge project that will use solar panels from First Solar to generate a total of 555 megawatts (MWs) of power at three locations and Tesla Megapacks to store the energy.
**READ MORE:** [Data-center power consumption holds steady][3]
Data centers are frequently built close to renewable sources of energy, usually hydropower. That's why many Amazon, Google, Facebook and Microsoft data centers are sitting by rivers. Solar is the easiest form of power to collect, but it's also the most fickle. Solar-powered sites are at the mercy of darkness and cloudy days, and users don't care if it's overcast out.
Adam Kramer, executive vice president of strategy at Switch, says peak solar production is around 1 p.m. when the sun is overhead, but overall peak consumer demand is around 5 p.m. to 6 p.m., when the sun is either setting or has set, depending on the time of year.
In running a [data center][4], there are no peak hours. "The Internet is 24/7. If they aren't using it in New York, they are using it in L.A. We have a very flat power profile. Our load looks the same at 2 a.m. as it does at 2 p.m.," Kramer told me. **
**
With solar, and especially in Nevada, Switch had "an overabundance of solar generation but nowhere to store it. During the day we generate max power but [have] no need to use it."
Advances in Tesla battery storage are a key piece of the puzzle. Switch has been running on 100% solar power since 2016 but couldn't store it because "the technology just wasn't there for it," Kramer says.
Enter Tesla's Megapack. The Megapack is a beefed-up version of the Tesla PowerWall used for individual homes to store solar power and the PowerPack technology Tesla uses in its electric vehicles. Each Megapack can hold up to three megawatt hours (MWhs) of storage and 1.5 MW of inverter capacity.
So with enough Megapacks, sunlight energy captured at 1 p.m. can be powering the data center at 1 a.m.
Kramer says this benefits not only Switch but also its customers. "We are able to lock in extremely competitive pricing for switching our clients for the long-term and not be subject to market volatility. When we're able to reduce our cost, it provides cost savings for all our clients," he says.
So if Switch can power its massive data centers with solar energy even when the sun does not shine, why can't you?
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/3568358/switch-turns-to-tesla-for-renewable-energy-storage.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://www.switch.com/
[2]: https://www.tesla.com/gigafactory
[3]: https://www.networkworld.com/article/3531316/data-center-power-consumption-holds-steady.html
[4]: https://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html
[5]: https://www.facebook.com/NetworkWorld/
[6]: https://www.linkedin.com/company/network-world

View File

@ -1,499 +0,0 @@
50 Best Ubuntu Apps You Should Be Using Right Now
======
**Brief: A comprehensive list of best Ubuntu apps for all kind of users. These software will help you in getting a better experience with your Linux desktop.**
I have written about [things to do after installing Ubuntu][1] several times in the past. Each time I suggest installing the essential applications in Ubuntu.
But the question arises, what are the essential Ubuntu applications? There is no set answer here. It depends on your need and the kind of work you do on your Ubuntu desktop.
Still, I have been asked to suggest some good Ubuntu apps by a number of readers. This is the reason I have created this comprehensive list of Ubuntu applications you can use regularly.
The list has been divided into respective categories for ease of reading and ease of comprehension.
### Best Ubuntu apps for a better Ubuntu experience
![Best Ubuntu Apps][2]
Of course, you dont have to use all of these applications. Just go through this list of essential Ubuntu software, read the description and then install the ones you need or are inclined to use. Just keep this page bookmarked for future reference or simply search on Google with term best ubuntu apps itsfoss.
The best Ubuntu application list is intended for average Ubuntu user. Therefore not all the applications here are open source. I have also marked the slightly complicated applications that might not be suitable for a beginner. The list should be valid for Ubuntu 16.04,18.04 and other versions.
Unless exclusively mentioned, the software listed here are available in Ubuntu Software Center.
If you dont find any application in the software center or if it is missing installation instruction, let me know and Ill add the installation procedure.
Enough talk! Lets see what are the best apps for Ubuntu.
#### Web Browser
Ubuntu comes with Firefox as the default web browser. Since the Quantum release, Firefox has improved drastically. Personally, I always use more than one web browser for the sake of distinguishing between different type of works.
##### Google Chrome
![Google Chrome Logo][3]
Google Chrome is the most used web browser on the internet for a reason. With your Google account, it allows you seamless syncing across devices. Plenty of extensions and apps further enhance its capabilities. You can [download Chrome in Ubuntu from its website][4].
##### Brave
![brave browser][5]
Google Chrome might be the most used web browser but its a privacy invader. An [alternative browser][6] is [Brave][7] that blocks ads and tracking scripts by default. This provides you with a faster and secure web browsing experience.
#### Music applications
![best music apps ubuntu][8]
Ubuntu has Rhythmbox as the default music player which is not at all a bad choice for the default music player. However, you can definitely install a better music player.
##### Sayonara
[Sayonara][9] is a small, lightweight music player with a nice dark user interface. It comes with all the essential features you would expect in a standard music player. It integrates well with the Ubuntu desktop environment and doesnt eat up your RAM.
##### Audacity
[Audacity][10] is more of an audio editor than an audio player. You can record and edit audio with this free and open source tool. It is available for Linux, Windows and macOS. You can install it from the Software Center.
##### MusicBrainz Picard
[Picard][11] is not a music player, it is a music tagger. If you have tons of local music files, Picard allows you to automatically update the music files with correct tracks, album, artist info and album cover art.
#### Streaming Music Applications
![Streaming Music app Ubuntu][12]
In this age of the internet, music listening habit has surely changed. People these days rely more on streaming music players rather than storing hundreds of local music files. Lets see some apps you can use for streaming music.
##### Spotify
[Spotify][13] is the king of streaming music. And the good thing is that it has a native Linux app. The [Spotify app on Ubuntu][14] integrates well with the media key and sound menu along with the desktop notification. Do note that Spotify may or may not be available in your country.
##### Nuvola music player
[Nuvola][15] is not a streaming music service like Spotify. It is a desktop music player that allows you to use several streaming music services in one application. You can use Spotify, Deezer, Google Play Music, Amazon Cloud Player and many more such services.
#### Video Players
![Video players for Linux][16]
Ubuntu has the default GNOME video player (previously known as Totem) which is okay but it doesnt support various media codecs. There are certainly other video players better than the GNOME video player.
##### VLC
The free and open source software [VLC][17] is the king of video players. It supports almost all possible media codecs. It also allows you to increase the volume up to 200%. It can also resume playing from the last known position. There are so many [VLC tricks][18] you can use to get the most of it.
##### MPV
[MPV][19] is a video player that deserves more attention. A sleek minimalist GUI and plenty of features, MPV has everything you would expect from a good video player. You can even use it in the command line. If you are not happy with VLC, you should surely give MPV a try.
#### Cloud Storage Service
Local backups are fine but cloud storage gives an additional degree of freedom. You dont have to carry a USB key with you all the time or worry about a hard disk crash with cloud services.
##### Dropbox
![Dropbox logo][20]
[Dropbox][21] is one of the most popular Cloud service providers. You get 2GB of free storage with the option to get more by referring others. Dropbox provides a native Linux client and you can download it from its website. It creates a local folder on your system that is synced with the cloud servers.
##### pCloud
![pCloud icon][22]
[pCloud][23] is another good cloud storage service for Linux. It also has a native Linux client that you can download from its website. You get up to 20GB of free storage and if you need more, the pricing is better than Dropbox. pCloud is based in Switzerland, a country renowned for strict data privacy laws.
#### Image Editors
I am sure that you would need a photo editor at some point in time. Here are some of the best Ubuntu apps for editing images.
##### GIMP
![gimp icon][24]
[GIMP][25] is a free and open source image editor available for Linux, Windows and macOS. Its the best alternative for Adobe Photoshop in Linux. You can use it for all kind of image editing. There are plenty of resources available on the internet to help you with Gimp.
##### Inkscape
![inkscape icon][26]
[Inkscape][27] is also a free and open source image editor specifically focusing on vector graphics. You can design vector arts and logo on it. You can compare it to Adobe Illustrator. Like Gimp, Inkscape too has plenty of tutorials available online.
#### Paint applications
Painting applications are not the same as image editors though their functionalities overlap at times. Here are some paint apps you can use in Ubuntu.
![Painting apps for Ubuntu Linux][28]
##### Krita
[Krita][29] is a free and open source digital painting application. You can create digital art, comics and animation with it. Its a professional grade software and is even used as the primary software in art schools.
##### Pinta
[Pinta][30] might not be as feature rich as Krita but thats deliberate. You can think of Pinta as Microsoft Paint for Linux. You can draw, paint, add text and do other such small tasks you do in a paint application.
#### Photography applications
Amateur photographer or a professional? You have plenty of [photography tools][31] at your disposal. Here are some recommended applications.
##### digiKam
![digikam][32]
With open source software [digiKam][33], you can handle your high-end camera images in a professional manner. digiKam provides all the tools required for viewing, managing, editing, enhancing, organizing, tagging and sharing photographs.
##### Darktable
![Darktable icon][34]
[darktable][35] is an open source photography workflow application with a special focus on raw image development. This is the best alternative you can get for Adobe Lightroom. It is also available for Windows and macOS.
#### Video editors
![Video editors Ubuntu][36]
There is no dearth of [video editors for Linux][37] but I wont go in detail here. Take a look at some of the feature-rich yet relatively simple to use video editors for Ubuntu.
##### Kdenlive
[Kdenlive][38] is the best all-purpose video editor for Linux. It has enough features that compare it to iMovie or Movie Maker.
##### Shotcut
[Shotcut][39] is another good choice for a video editor. It is an open source software with all the features you can expect in a standard video editor.
#### Image and video converter
If you need to [convert the file format][40] of your images and videos, here are some of my recommendations.
##### Xnconvert
![xnconvert logo][41]
[Xnconvert][42] is an excellent batch image conversion tool. You can bulk resize images, convert the file type and rename them.
##### Handbrake
![Handbrake Logo][43]
[HandBrake][44] is an easy to use open source tool for converting videos from a number of formats to a few modern, popular formats.
#### Screenshot and screen recording tools
![Screenshot and recorders Ubuntu][45]
Here are the best Ubuntu apps for taking screenshots and recording your screen.
##### Shutter
[Shutter][46] is my go-to tool for taking screenshots. You can also do some quick editing to those screenshots such as adding arrows, text or resizing the images. The screenshots you see on Its FOSS have been edited with Shutter. Definitely one of the best apps for Ubuntu.
##### Kazam
[Kazam][47] is my favorite [screen recorder for Linux][48]. Its a tiny tool that allows you to record the entire window, an application window or a selected area. You can also use shortcuts to pause or resume recording. The tutorials on [Its FOSS YouTube channel][49] have been recorded with Kazam.
#### Office suites
I cannot imagine that you could use a computer without a document editor. And why restrict yourself to just one document editor? Go for a complete office suite.
##### LibreOffice
![LibreOffice logo][50]
[LibreOffice][51] comes preinstalled on Ubuntu and it is undoubtedly the [best open source office software][52]. Its a complete package comprising of a document editor, spreadsheet tool, presentation software, maths tool and a graphics tool. You can even edit some PDF files with LibreOffice.
##### WPS Office
![WPS Office logo][53]
[WPS Office][54] has gained popularity for being a Microsoft Office clone. It has an interface identical to Microsoft Office and it claims to be more compatible with MS Office. If you are looking for something similar to the Microsoft Office, WPS Office is a good choice.
#### Downloading tools
![Downloading software Ubuntu][55]
If you often download videos or other big files from the internet, these tools will help you.
##### youtube-dl
This is one of the rare Ubuntu application on the list that is command line based. If you want to download videos from YouTube, DailyMotion or other video websites, youtube-dl is an excellent choice. It provides plenty of [advanced option for video downloading][56].
##### uGet
[uGet][57] is a feature rich [download manager for Linux][58]. It allows you to pause and resume your downloads, schedule your downloads, monitor clipboard for downloadable content. A perfect tool if you have a slow, inconsistent internet or daily data limit.
#### Code Editors
![Coding apps for Ubuntu][59]
If you are into programming, the default Gedit text editor might not be sufficient for your coding needs. Here are some of the better code editors for you.
##### Atom
[Atom][60] is a free and [open source code editor][61] from GitHub. Even before it was launched its first stable version, it became a hot favorite among coders for its UI, features and vast range of plugins.
##### Visual Studio Code
[VS Code][62] is an open source code editor from Microsoft. Dont worry about Microsoft, VS Code is an awesome editor for web development. It also supports a number of other programming languages.
#### PDF and eBooks related applications
![eBook Management tools in Ubuntu][63]
In this digital age, you cannot only rely on the real paper books especially when there are plenty of free eBooks available. Here are some Ubuntu apps for managing PDFs and eBooks.
##### Calibre
If you are a bibliophile and collect eBooks, you should use [Calibre][64]. It is an eBook manager with all the necessary software for [creating eBooks][65], converting eBook formats and managing an eBook library.
##### Okular
Okular is mostly a PDF viewer with options for editing PDF files. You can do some basic [PDF editing on Linux][66] with Okular such as adding pop-ups notes, inline notes, freehand line drawing, highlighter, stamp etc.
#### Messaging applications
![Messaging apps for Ubuntu][67]
I believe you use at least one [messaging app on Linux][68]. Here are my recommendations.
##### Skype
[Skype][69] is the most popular video chatting application. It is also used by many companies and businesses for interviews and meetings. This makes Skype one of the must-have applications for Ubuntu.
##### Rambox
[Rambox][70] is not a messaging application on its own. But it allows you to use Skype, Viber, Facebook Messanger, WhatsApp, Slack and a number of other messaging applications from a single application window.
#### Notes and To-do List applications
Need a to-do list app or simple an app for taking notes? Have a look at these:
##### Simplenote
![Simplenote logo][71]
[Simplenote][72] is a free and open source note taking application from WordPress creators [Automattic][73]. It is available for Windows, Linux, macOS, iOS and Android. Your notes are synced to a cloud server and you can access them on any device. You can download the DEB file from its website.
##### Remember The Milk
![Remember The Milk logo][74]
[Remember The Milk][75] is a popular to-do list application. It is available for Windows, Linux, macOS, iOS and Android. Your to-do list is accessible on all the devices you own. You can also access it from a web browser. It also has an official native application for Linux that you can download from its website.
#### Password protection and encryption
![Encryption software Ubuntu][76]
If there are other people regularly using your computer perhaps you would like to add an extra layer of security by password protecting files and folders.
##### EncryptPad
[EncryptPad][77] is an open source text editor that allows you to lock your files with a password. You can choose the type of encryption. There is also a command line version of this tool.
##### Gnome Encfs Manager
Gnome Encfs Manager allows you to [lock folders with a password in Linux][78]. You can keep whatever files you want in a secret folder and then lock it with a password.
#### Gaming
![Gaming on Ubuntu][79]
[Gaming on Linux][80] is a lot better than what it used to be a few years ago. You can enjoy plenty of games on Linux without going back to Windows.
##### Steam
[Steam][81] is a digital distribution platform that allows you to purchase (if required) games. Steam has over 1500 [games for Linux][82]. You can download the Steam client from the Software Center.
##### PlayOnLinux
[PlayOnLinux][83] allows you to run Windows games on Linux over WINE compatibility layer. Dont expect too much out of it because not every game will run flawlessly with PlayOnLinux.
#### Package Managers [Intermediate to advanced users]
![Package Management tools Ubuntu][84]
Ubuntu Software Center is more than enough for an average Ubuntu users software needs but you can have more control on it using these applications.
##### Gdebi
Gedbi is a tiny packagae manager that you can use for installing DEB files. It is faster than the Software Center and it also handles dependency issues.
##### Synaptic
Synaptic was the default GUI package manager for most Linux distributions a decade ago. It still is in some Linux distributions. This powerful package manager is particularly helpful in [finding installed applications and removing them][85].
#### Backup and Recovery tools
![Backup and data recovery tools for Ubuntu][86]
Backup and recovery tools are must-have software for any system. Lets see what softwares you must have on Ubuntu.
##### Timeshift
Timeshift is a tool that allows you to [take a snapshot of your system][87]. This allows you to restore your system to a previous state in case of an unfortunate incident when your system configuration is messed up. Note that its not the best tool for your personal data backup though. For that, you can use Ubuntus default Deja Dup (also known as Backups) tool.
##### TestDisk [Intermediate Users]
This is another command line tool on this list of best Ubuntu application. [TestDisk][88] allows you to [recover data on Linux][89]. If you accidentally deleted files, there are still chances that you can get it back using TestDisk.
#### System Tweaking and Management Tools
![System Maintenance apps Ubuntu][90]
##### GNOME/Unity Tweak Tool
These Tweak tools are a must for every Ubuntu user. They allow you to access some advanced system settings. Best of all, you can [change themes in Ubuntu][91] using these tweak tools.
##### UFW Firewall
[UFW][92] stands for Uncomplicated Firewall and rightly so. UFW has predefined firewall settings for Home, Work and Public networks.
##### Stacer
If you want to free up space on Ubuntu, try Stacer. This graphical tool allows you to [optimize your Ubuntu system][93] by removing unnecessary files and completely uninstalling software. Download Stacer from [its website][94].
#### Other Utilities
![Utilities Ubuntu][95]
In the end, Ill list some of my other favorite Ubuntu apps that I could not put into a certain category.
##### Neofetch
One more command line tool! Neofetch displays your system information such as [Ubuntu version][96], desktop environment, theme, icons, RAM etc info along with [ASCII logo of the distribution][97]. Use this command for installing Neofetch.
```
sudo apt install neofetch
```
##### Etcher
Ubuntu has a live USB creator tool installed already but Etcher is a better application for this task. It is also available for Windows and macOS. You can download it [from its website][98].
##### gscan2pdf
I use this tiny tool for the sole purpose of [converting images into PDF][99]. You can use it for combining multiple images into one PDF file as well.
##### Audio Recorder
Another tiny yet essential Ubuntu application for [recording audio on Ubuntu][100]. You can use it to record sound from system microphone, from music player or from any other source.
### Your suggestions for essential Ubuntu applications?
I would like to conclude my list of best Ubuntu apps here. I know that you might not need or use all of them but I am certain that you would like most of the software listed here.
Did you find some useful applications that you didnt know about before? If you would have to suggest your favorite Ubuntu application, which one would it be?
In the end, if you find this article useful, please share it on social media, Reddit, Hacker News or other community or forums you visit regularly. This way you help us grow :)
--------------------------------------------------------------------------------
via: https://itsfoss.com/best-ubuntu-apps/
作者:[Abhishek Prakash][a]
选题:[lujun9972](https://github.com/lujun9972)
译者:[译者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/
[1]:https://itsfoss.com/things-to-do-after-installing-ubuntu-18-04/
[2]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/best-ubuntu-apps-featured.jpeg
[3]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/google-chrome.jpeg
[4]:https://www.google.com/chrome/
[5]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/brave-browser-icon.jpeg
[6]:https://itsfoss.com/open-source-browsers-linux/
[7]:https://brave.com/
[8]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/music-apps-ubuntu.jpeg
[9]:https://itsfoss.com/sayonara-music-player/
[10]:https://www.audacityteam.org/
[11]:https://itsfoss.com/musicbrainz-picard/
[12]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/streaming-music-apps-ubuntu.jpeg
[13]:https://www.spotify.com//
[14]:https://itsfoss.com/install-spotify-ubuntu-1404/
[15]:https://tiliado.eu/nuvolaplayer/
[16]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/Video-Players-linux.jpg
[17]:https://www.videolan.org/index.html
[18]:https://itsfoss.com/vlc-pro-tricks-linux/
[19]:https://mpv.io/
[20]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/dropbox-icon.jpeg
[21]:https://www.dropbox.com/
[22]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/pcloud-icon.jpeg
[23]:https://itsfoss.com/recommends/pcloud/
[24]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/gimp-icon.jpeg
[25]:https://www.gimp.org/
[26]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/inkscape-icon.jpeg
[27]:https://inkscape.org/en/
[28]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/paint-apps-ubuntu.jpeg
[29]:https://krita.org/en/
[30]:https://pinta-project.com/pintaproject/pinta/
[31]:https://itsfoss.com/image-applications-ubuntu-linux/
[32]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/digikam-icon.jpeg
[33]:https://www.digikam.org/
[34]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/darktable-icon.jpeg
[35]:https://www.darktable.org/
[36]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/video-editing-apps-ubuntu.jpeg
[37]:https://itsfoss.com/best-video-editing-software-linux/
[38]:https://kdenlive.org/en/
[39]:https://shotcut.org/
[40]:https://itsfoss.com/format-factory-alternative-linux/
[41]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/xnconvert-logo.jpeg
[42]:https://www.xnview.com/en/xnconvert/
[43]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/handbrake-logo.jpeg
[44]:https://handbrake.fr/
[45]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/screen-recording-ubuntu-apps.jpeg
[46]:http://shutter-project.org/
[47]:https://launchpad.net/kazam
[48]:https://itsfoss.com/best-linux-screen-recorders/
[49]:https://www.youtube.com/c/itsfoss?sub_confirmation=1
[50]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/libre-office-logo.jpeg
[51]:https://www.libreoffice.org/download/download/
[52]:https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/
[53]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/wps-office-logo.jpeg
[54]:http://wps-community.org/
[55]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/download-apps-ubuntu.jpeg
[56]:https://itsfoss.com/download-youtube-linux/
[57]:http://ugetdm.com/
[58]:https://itsfoss.com/4-best-download-managers-for-linux/
[59]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/coding-apps-ubuntu.jpeg
[60]:https://atom.io/
[61]:https://itsfoss.com/best-modern-open-source-code-editors-for-linux/
[62]:https://itsfoss.com/install-visual-studio-code-ubuntu/
[63]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/pdf-management-apps-ubuntu.jpeg
[64]:https://calibre-ebook.com/
[65]:https://itsfoss.com/create-ebook-calibre-linux/
[66]:https://itsfoss.com/pdf-editors-linux/
[67]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/messaging-apps-ubuntu.jpeg
[68]:https://itsfoss.com/best-messaging-apps-linux/
[69]:https://www.skype.com/en/
[70]:https://rambox.pro/
[71]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/simplenote-logo.jpeg
[72]:http://simplenote.com/
[73]:https://automattic.com/
[74]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/remember-the-milk-logo.jpeg
[75]:https://itsfoss.com/remember-the-milk-linux/
[76]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/encryption-apps-ubuntu.jpeg
[77]:https://itsfoss.com/encryptpad-encrypted-text-editor-linux/
[78]:https://itsfoss.com/password-protect-folder-linux/
[79]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/gaming-ubuntu.jpeg
[80]:https://itsfoss.com/linux-gaming-guide/
[81]:https://store.steampowered.com/
[82]:https://itsfoss.com/free-linux-games/
[83]:https://www.playonlinux.com/en/
[84]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/package-management-apps-ubuntu.jpeg
[85]:https://itsfoss.com/how-to-add-remove-programs-in-ubuntu/
[86]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/backup-recovery-tools-ubuntu.jpeg
[87]:https://itsfoss.com/backup-restore-linux-timeshift/
[88]:https://www.cgsecurity.org/wiki/TestDisk
[89]:https://itsfoss.com/recover-deleted-files-linux/
[90]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/system-maintenance-apps-ubuntu.jpeg
[91]:https://itsfoss.com/install-themes-ubuntu/
[92]:https://wiki.ubuntu.com/UncomplicatedFirewall
[93]:https://itsfoss.com/optimize-ubuntu-stacer/
[94]:https://github.com/oguzhaninan/Stacer
[95]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/utilities-apps-ubuntu.jpeg
[96]:https://itsfoss.com/how-to-know-ubuntu-unity-version/
[97]:https://itsfoss.com/display-linux-logo-in-ascii/
[98]:https://etcher.io/
[99]:https://itsfoss.com/convert-multiple-images-pdf-ubuntu-1304/
[100]:https://itsfoss.com/record-streaming-audio/

View File

@ -0,0 +1,157 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Getting started with Git: Terminology 101)
[#]: via: (https://opensource.com/article/19/2/git-terminology)
[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberg)
Getting started with Git: Terminology 101
======
Want to learn Git? Check out this quick summary of the most important
terms and commands.
![Digital hand surrounding by objects, bike, light bulb, graphs][1]
Version control is an important tool for anyone looking to track their changes these days. It's especially helpful for programmers, sysadmins, and site reliability engineers (SREs) alike. The promise of recovering from mistakes to a known good state is a huge win and a touch friendlier than the previous strategy of adding **`.old`** to a copied file.
But learning Git is often oversimplified by well-meaning peers telling everyone to "get into open source." Before you know it, someone asks for a _pull request_ or *merge request *where you _rebase_ from _upstream_ before they can merge from your _remote_—and be sure to remove _merge commits_. Whatever well-working contribution you want to give back to an open source project feels much further from being added when you look at all these words you don't know.
![Git Cheat Sheet cover image][2]
[Download][3] our
Git cheat sheet.
If you have a month or two and enough curiosity, [Git SCM][4] is the definitive source for all the terms you need to learn. If you're looking for a summary from the trenches, keep reading.
### Reminder: What's a commit?
The toughest part of Git for me to internalize was the simplest idea of Git: _a commit is a collection of content, a message about how you got there, and the commits that came before it_. There's no inherent code release strategy or even strong opinions built in. The content doesn't even have to be code—it is _anything_ you want to add to the repository. The commit message annotates that content.
I like to think of a commit message as a gift to your future self: it may mention the files you edited, but more importantly it reminds you of your intention for changing those files. Adding more about why you have edited what you have helps anyone who uses your repository, even when that person is you.
### There's no place like 'origin/master'
Knowing where you are in a Git project starts with thinking of a tree. All Git projects have a root, similar to the idea of a filesystem's root directory. All commits branch off from that root. In this way, a branch is only a pointer to a commit. By convention, **master** is the default name for the default branch in your root directory.
Since Git is a distributed version control system, where the same codebase is distributed to multiple locations, people often use the term "repository" as a way of talking about all copies of the same project. There is the _local repository_, where you edit your code (more on that in a minute), and the _remote repository_, the place where you want to send it after you're finished. Remotes can be anywhere, even on the same computer where your local repository is located, but they are often hosted on repository services like GitLab or GitHub.
### What's the pwd of Git commands?
While it's not an official selling point, being lost is part of the fun of a Git repository. You can find your way by running through this reliable set of commands:
* `git branch`—to find which branch you're on
* `git log`—to see what commit you're on
* `git status`—to see what edits you've made since the last commit
* `git remote`—to see what remote repository you're tracking
Orienting yourself using these commands will give you a sense of direction when you're stuck.
### Have I stashed or cached my commit?
The code local to your computer is colloquially called your _workspace_. What is not immediately obvious is that you have two (yes, two!) other locations local to you when you are in a Git repository: _index_ and _stash_. When you write some content and then **add** it, you are adding it to the index, which is the cached content that is ready to commit. There are times when you have files in the index that you are not ready to commit, but you want to view another branch. That's where the stash comes in handy. You can store indexed-but-not-yet-committed files to the stash using `git stash`. When you're ready to retrieve the file, run `git stash pop` to bring changes back into the index.
Here are some commands you'll need to use your stash and cache.
* `git diff ..origin/master`—to show the difference between the most recent local commit and the remote called "origin" and its branch called "master"
* `git diff --cached`—to show any differences between the most recent local commit and what has been added to the local index
* `git stash`—to place indexed (added but not committed) files in the stash stack
* `git stash list`—to show what changes are in the stash stack
* `git stash pop`—to take the most recent change off the stash stack
### HEADless horseman
Git is a collection of all kinds of metaphors. When I think of where the HEAD is, I think of train lines. If you end up in a _detached HEAD_ mode, it means you're off the metaphorical rails.
HEAD is a pointer to your most recent commit in the currently checked-out branch. The default "checkout" is when you create a Git repository and land on the **master** branch. Every time you create or change to another branch, you are on that branch line. If you `git checkout <commit>` somewhere in your current branch, HEAD will move to that commit. If there is no commit history connecting your current commit to the commit you checked out, then you'll be in a detached HEAD state. If you ever lose your head finding where HEAD is, you can always `git reset --hard origin/master` to delete changes and get back to a known state. _Warning: this will delete any changes you have made since you last pushed to master._
### Are you upstream or downstream?
The local copy of your project is considered your local repository. It may or may not have a remote repository—the place where you have a copy of your repository for collaboration or safekeeping. There may also be an _upstream_ repository where a third copy of the project is hosted and maintained by a different set of contributors.
For instance, let's say I want to contribute to Kubernetes. I would first fork the **kubernetes/kubernetes** project to my account, **mbbroberg/kubernetes**. I would then clone my project to my local workspace. In this scenario, my local clone is my local repository, **mbbroberg/kubernetes** is my remote repository, and **kubernetes/kubernetes** is the upstream.
### Merging the metaphors
The visual of a root system merges with the train tracks image when you get deeper into Git branches. Branches are often used as ways of developing a new feature that you eventually want to _merge_ into the master branch. When doing this, Git keeps the common history of commits in order then appends the new commits for your branch to the history. There are a ton of nuances to this process—whether to rebase or not, whether to add a merge commit or not—which [Brent Laster][5] explores in greater detail in "[How to reset, revert, and return to previous states in Git][6]."
### I think I Git it now
There is a ton of terminology and a lot to explore to master the world of Git commands. I hope this first-person exploration of how I use the terms day-to-day helps you acclimate to it all. If you ever feel stuck or frustrated, feel free to reach out to me on Twitter [@mbbroberg][7].
#### To review:
* **Commit**—stores the current contents of the index in a new commit along with a log message from the user describing the changes
* **Branch**—a pointer to a commit
* **Master**—the default name for the first branch
* **HEAD**—a pointer to the most recent commit on the current branch
* **Merge**—joining two or more commit histories
* **Workspace**—the colloquial name for your local copy of a Git repository
* **Working tree**—the current branch in your workspace; you see this in `git status` output all the time
* **Cache**—a space intended to temporarily store uncommitted changes
* **Index**—the cache where changes are stored before they are committed
* **Tracked and untracked files**—files either in the index cache or not yet added to it
* **Stash**—another cache, that acts as a stack, where changes can be stored without committing them
* **Origin**—the default name for a remote repository
* **Local repository**—another term for where you keep your copy of a Git repository on your workstation
* **Remote repository**—a secondary copy of a Git repository where you push changes for collaboration or backup
* **Upstream repository**—the colloquial term for a remote repository that you track
* **Pull request**—a GitHub-specific term to let others know about changes you've pushed to a branch in a repository
* **Merge request**—a GitLab-specific term to let others know about changes you've pushed to a branch in a repository
* **'origin/master'**—the default setting for a remote repository and its primary branch
Postscript: Puns are one of the best parts of Git. Have fun with them.
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/2/git-terminology
作者:[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://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003588_01_rd3os.combacktoschoolseriesk12_rh_021x_0.png?itok=fvorN0e- (Digital hand surrounding by objects, bike, light bulb, graphs)
[2]: https://opensource.com/sites/default/files/uploads/git_cheat_sheet_cover.jpg (Git Cheat Sheet cover image)
[3]: https://opensource.com/downloads/cheat-sheet-git
[4]: https://git-scm.com/about
[5]: https://opensource.com/users/bclaster
[6]: https://opensource.com/article/18/6/git-reset-revert-rebase-commands
[7]: https://twitter.com/mbbroberg

View File

@ -1,135 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to build a WiFi picture frame with a Raspberry Pi)
[#]: via: (https://opensource.com/article/19/2/wifi-picture-frame-raspberry-pi)
[#]: author: (Manuel Dewald https://opensource.com/users/ntlx)
How to build a WiFi picture frame with a Raspberry Pi
======
DIY a digital photo frame that streams photos from the cloud.
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/raspberrypi_board_vector_red.png?itok=yaqYjYqI)
Digital picture frames are really nice because they let you enjoy your photos without having to print them out. Plus, adding and removing digital files is a lot easier than opening a traditional frame and swapping the picture inside when you want to display a new photo. Even so, it's still a bit of overhead to remove your SD card, USB stick, or other storage from a digital picture frame, plug it into your computer, and copy new pictures onto it.
An easier option is a digital picture frame that gets its pictures over WiFi, for example from a cloud service. Here's how to make one.
### Gather your materials
* Old [TFT][1] LCD screen
* HDMI-to-DVI cable (as the TFT screen supports DVI)
* Raspberry Pi 3
* Micro SD card
* Raspberry Pi power supply
* Keyboard
* Mouse (optional)
Connect the Raspberry Pi to the display using the cable and attach the power supply.
### Install Raspbian
**sudo raspi-config**. There I change the hostname (e.g., to **picframe** ) in Network Options and enable SSH to work remotely on the Raspberry Pi in Interfacing Options. Connect to the Raspberry Pi using (for example) .
### Build and install the cloud client
Download and flash Raspbian to the Micro SD card by following these [directions][2] . Plug the Micro SD card into the Raspberry Pi, boot it up, and configure your WiFi. My first action after a new Raspbian installation is usually running. There I change the hostname (e.g., to) in Network Options and enable SSH to work remotely on the Raspberry Pi in Interfacing Options. Connect to the Raspberry Pi using (for example)
I use [Nextcloud][3] to synchronize my pictures, but you could use NFS, [Dropbox][4], or whatever else fits your needs to upload pictures to the frame.
If you use Nextcloud, get a client for Raspbian by following these [instructions][5]. This is handy for placing new pictures on your picture frame and will give you the client application you may be familiar with on a desktop PC. When connecting the client application to your Nextcloud server, make sure to select only the folder where you'll store the images you want to be displayed on the picture frame.
### Set up the slideshow
The easiest way I've found to set up the slideshow is with a [lightweight slideshow project][6] built for exactly this purpose. There are some alternatives, like configuring a screensaver, but this application appears to be the simplest to set up.
On your Raspberry Pi, download the binaries from the latest release, unpack them, and move them to an executable folder:
```
wget https://github.com/NautiluX/slide/releases/download/v0.9.0/slide_pi_stretch_0.9.0.tar.gz
tar xf slide_pi_stretch_0.9.0.tar.gz
mv slide_0.9.0/slide /usr/local/bin/
```
Install the dependencies:
```
sudo apt install libexif12 qt5-default
```
Run the slideshow by executing the command below (don't forget to modify the path to your images). If you access your Raspberry Pi via SSH, set the **DISPLAY** variable to start the slideshow on the display attached to the Raspberry Pi.
```
DISPLAY=:0.0 slide -p /home/pi/nextcloud/picframe
```
### Autostart the slideshow
To autostart the slideshow on Raspbian Stretch, create the following folder and add an **autostart** file to it:
```
mkdir -p /home/pi/.config/lxsession/LXDE/
vi /home/pi/.config/lxsession/LXDE/autostart
```
Insert the following commands to autostart your slideshow. The **slide** command can be adjusted to your needs:
```
@xset s noblank
@xset s off
@xset -dpms
@slide -p -t 60 -o 200 -p /home/pi/nextcloud/picframe
```
Disable screen blanking, which the Raspberry Pi normally does after 10 minutes, by editing the following file:
```
vi /etc/lightdm/lightdm.conf
```
and adding these two lines to the end:
```
[SeatDefaults]
xserver-command=X -s 0 -dpms
```
### Configure a power-on schedule
You can schedule your picture frame to turn on and off at specific times by using two simple cronjobs. For example, say you want it to turn on automatically at 7 am and turn off at 11 pm. Run **crontab -e** and insert the following two lines.
```
0 23 * * * /opt/vc/bin/tvservice -o
0 7 * * * /opt/vc/bin/tvservice -p && sudo systemctl restart display-manager
```
Note that this won't turn the Raspberry Pi power's on and off; it will just turn off HDMI, which will turn the screen off. The first line will power off HDMI at 11 pm. The second line will bring the display back up and restart the display manager at 7 am.
### Add a final touch
By following these simple steps, you can create your own WiFi picture frame. If you want to give it a nicer look, build a wooden frame for the display.
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/2/wifi-picture-frame-raspberry-pi
作者:[Manuel Dewald][a]
选题:[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/ntlx
[b]: https://github.com/lujun9972
[1]: https://en.wikipedia.org/wiki/Thin-film-transistor_liquid-crystal_display
[2]: https://www.raspberrypi.org/documentation/installation/installing-images/README.md
[3]: https://nextcloud.com/
[4]: http://dropbox.com/
[5]: https://github.com/nextcloud/client_theming#building-on-debian
[6]: https://github.com/NautiluX/slide/releases/tag/v0.9.0

View File

@ -1,257 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Sending custom emails with Python)
[#]: via: (https://opensource.com/article/19/8/sending-custom-emails-python)
[#]: author: (Brian "bex" Exelbierd https://opensource.com/users/bexelbie)
Sending custom emails with Python
======
Customize your group emails with Mailmerge, a command-line program that
can handle simple and complex emails.
![Chat via email][1]
Email remains a fact of life. Despite all its warts, it's still the best way to send information to most people, especially in automated ways that allow messages to queue for recipients.
One of the highlights of my work as the [Fedora Community Action and Impact Coordinator][2] is giving people good news about travel funding. I often send this information over email. Here, I'll show you how I send custom messages to groups of people using [Mailmerge][3], a command-line Python program that can handle simple and complex emails.
### Install Mailmerge
Mailmerge is packaged and available in Fedora, and you can install it from the command line with **sudo dnf install python3-mailmerge**. You can also install it from PyPI using **pip**, as the project's [README explains][4].
### Configure your Mailmerge files
Three files control how Mailmerge works. If you run **mailmerge --sample**, it will create template files for you. The files are:
* **mailmerge_server.conf:** This contains the configuration details for your SMTP host to send emails. Your password is _not_ stored in this file.
* **mailmerge_database.csv:** This holds the custom data for each email, including the recipients' email addresses.
* **mailmerge_template.txt:** This is your email's text with placeholder fields that will be replaced using the data from **mailmerge_database.csv**.
#### Server.conf
The sample **mailmerge_server.conf** file includes several examples that should be familiar. If you've ever added email to your phone or set up a desktop email client, you've seen this data before. The big thing to remember is to update your username in the file, especially if you are using one of the example configurations.
#### Database.csv
The **mailmerge_database.csv** file is a bit more complicated. It must contain (at minimum) the recipients' email addresses and any other custom details necessary to replace the fields in your email. It is a good idea to write the **mailmerge_template.txt** file at the same time you create the fields list for this file. I find it helpful to use a spreadsheet to capture this data and export it as a CSV file when I am done. This sample file:
```
email,name,number
[myself@mydomain.com][5],"Myself",17
[bob@bobdomain.com][6],"Bob",42
```
allows you to send emails to two people, using their first name and telling them a number. This file, while not terribly interesting, illustrates an important habit: Always make yourself the first recipient in the file. This enables you to send yourself a test email to verify everything works as expected before you email the entire list.
If any of your values contain commas, you _**must**_ enclose the entire value in double-quotes (**"**). If you need to include a double-quote in a double-quoted field, use two double-quotes in a row. Quoting rules are fun, so read about [CSVs in Python 3][7] for specifics.
#### Template.txt
As part of my work, I get to share news about travel-funding decisions for our Fedora contributor conference, [Flock][8]. A simple email tells people they've been selected for travel funding and their specific funding details. One user-specific detail is how much money we can allocate for their airfare. Here is an abbreviated version of my template file (I've snipped out a lot of the text for brevity):
```
$ cat mailmerge_template.txt
TO: {{Email}}
SUBJECT: Flock 2019 Funding Offer
FROM: Brian Exelbierd &lt;[bexelbie@redhat.com][9]&gt;
Hi {{Name}},
I am writing you on behalf of the Flock funding committee.  You requested funding for your attendance at Flock.  After careful consideration we are able to offer you the following funding:
Travel Budget: {{Travel_Budget}}
&lt;&lt;snip&gt;&gt;
```
The top of the template specifies the recipient, sender, and subject. After the blank line, there's the body of the email. This email needs the recipients' **Email**, **Name**, and **Travel_Budget** from the **database.csv** file. Notice that those fields are surrounded by double curly braces (**{{** and **}}**). The corresponding **mailmerge_database.csv** looks like this:
```
$ cat mailmerge_database.csv
Name,Email,Travel_Budget
Brian,[bexelbie@redhat.com][9],1000
PersonA,[persona@fedoraproject.org][10],1500
PèrsonB,[personb@fedoraproject.org][11],500
```
Notice that I listed myself first (for testing) and there are two other people in the file. The second person, PèrsonB, has an accented character in their name; Mailmerge will automatically encode it.
That's the whole template concept: Write your email and put placeholders in double curly braces. Then create a database that provides those values. Now let's test the email.
### Test and send simple email merges
#### Do a dry-run
Start by doing a dry-run that prints the emails, with the placeholder fields completed, to the screen. By default, if you run the command **mailmerge**, it will do a dry-run of the first email:
```
$ mailmerge
&gt;&gt;&gt; encoding ascii
&gt;&gt;&gt; message 0
TO: [bexelbie@redhat.com][9]
SUBJECT: Flock 2019 Funding Offer
FROM: Brian Exelbierd &lt;[bexelbie@redhat.com][9]&gt;
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Sat, 20 Jul 2019 18:17:15 -0000
Hi Brian,
I am writing you on behalf of the Flock funding committee.  You requested funding for your attendance at Flock.  After careful consideration we are able to offer you the following funding:
Travel Budget: 1000
&lt;&lt;snip&gt;&gt;
&gt;&gt;&gt; sent message 0 DRY RUN
&gt;&gt;&gt; No attachments were sent with the emails.
&gt;&gt;&gt; Limit was 1 messages.  To remove the limit, use the --no-limit option.
&gt;&gt;&gt; This was a dry run.  To send messages, use the --no-dry-run option.
```
Reviewing the first email (**message 0**, as counting starts from zero, like many things in computer science), you can see my name and travel budget are correct. If you want to review every email, enter **mailmerge --no-limit** to tell Mailmerge not to limit itself to the first email. Here's the dry-run of the third email, which shows the special character encoding:
```
&gt;&gt;&gt; message 2
TO: [personb@fedoraproject.org][11]
SUBJECT: Flock 2019 Funding Offer
FROM: Brian Exelbierd &lt;[bexelbie@redhat.com][9]&gt;
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Date: Sat, 20 Jul 2019 18:22:48 -0000
Hi P=E8rsonB,
```
That's not an error; **P=E8rsonB** is the encoded form of **PèrsonB**.
#### Send a test message
Now, send a test email with the command **mailmerge --no-dry-run**, which tells Mailmerge to send a message to the first email on the list:
```
$ mailmerge --no-dry-run
&gt;&gt;&gt; encoding ascii
&gt;&gt;&gt; message 0
TO: [bexelbie@redhat.com][9]
SUBJECT: Flock 2019 Funding Offer
FROM: Brian Exelbierd &lt;[bexelbie@redhat.com][9]&gt;
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Sat, 20 Jul 2019 18:25:45 -0000
Hi Brian,
I am writing you on behalf of the Flock funding committee.  You requested funding for your attendance at Flock.  After careful consideration we are able to offer you the following funding:
Travel Budget: 1000
&lt;&lt;snip&gt;&gt;
&gt;&gt;&gt; Read SMTP server configuration from mailmerge_server.conf
&gt;&gt;&gt;   host = smtp.gmail.com
&gt;&gt;&gt;   port = 587
&gt;&gt;&gt;   username = [bexelbie@redhat.com][9]
&gt;&gt;&gt;   security = STARTTLS
&gt;&gt;&gt; password for [bexelbie@redhat.com][9] on smtp.gmail.com:
&gt;&gt;&gt; sent message 0
&gt;&gt;&gt; No attachments were sent with the emails.
&gt;&gt;&gt; Limit was 1 messages.  To remove the limit, use the --no-limit option.
```
On the fourth to last line, you can see it prompts you for your password. If you're using two-factor authentication or domain-managed logins, you will need to create an application password that bypasses these controls. If you're using Gmail and similar systems, you can do it directly from the interface; otherwise, contact your email system administrator. This will not compromise the security of your email system, but you should still keep the password complex and secret.
When I checked my email account, I received a beautifully formatted test email. If your test email looks ready, send all the emails by entering **mailmerge --no-dry-run --no-limit**.
### Send complex emails
You can really see the power of Mailmerge when you take advantage of [Jinja2 templating][12]. I've found it useful for including conditional text and sending attachments. Here is a complex template and the corresponding database:
```
$ cat mailmerge_template.txt
TO: {{Email}}
SUBJECT: Flock 2019 Funding Offer
FROM: Brian Exelbierd &lt;[bexelbie@redhat.com][9]&gt;
ATTACHMENT: attachments/{{File}}
Hi {{Name}},
I am writing you on behalf of the Flock funding committee.  You requested funding for your attendance at Flock.  After careful consideration we are able to offer you the following funding:
Travel Budget: {{Travel_Budget}}
{% if Hotel == "Yes" -%}
Lodging: Lodging in the hotel Wednesday-Sunday (4 nights)
{%- endif %}
&lt;&lt;snip&gt;&gt;
$ cat mailmerge_database.csv
Name,Email,Travel_Budget,Hotel,File
Brian,[bexelbie@redhat.com][9],1000,Yes,visa_bex.pdf
PersonA,[persona@fedoraproject.org][10],1500,No,visa_person_a.pdf
PèrsonB,[personb@fedoraproject.org][11],500,Yes,visa_person_b.pdf
```
There are two new things in this email. First, there's an attachment. I have to send visa invitation letters to international travelers to help them come to Flock, and the **ATTACHMENT** part of the header specifies which file to attach. To keep my directory clean, I put all of them in my Attachments subdirectory. Second, it includes conditional information about a hotel, because some people receive funding for their hotel stay, and I need to include those details for those who do. This is done with the **if** construction:
```
{% if Hotel == "Yes" -%}
Lodging: Lodging in the hotel Wednesday-Sunday (4 nights)
{%- endif %}
```
This works just like an **if** in most programming languages. Jinja2 is very expressive and can do multi-level conditions. Experiment with making your life easier by including database elements that control the contents of the email. Using whitespace is important for email readability. The minus (**-**) symbols in **if** and **endif** are part of how Jinja2 controls [whitespace][13]. There are lots of options, so experiment to see what looks best for you.
Also note that I extended the database with two fields, **Hotel** and **File**. These are the values that control the inclusion of the hotel text and provide the name of the attachment. In my example, PèrsonB and I got hotel funding, while PersonA didn't.
Doing a dry-run and sending the emails is the same whether you're using a simple or a complex template. Give it a try!
You can also experiment with using conditionals (**if** … **endif**) in the header. You can, for example, have an attachment only if one is in the database, or maybe you need to change the sender's name for some emails but not others.
### Mailmerge's advantages
The Mailmerge program provides a powerful but simple method of sending lots of customized emails. Everyone gets only the information they need, and extraneous steps and details are omitted.
Even for simple group emails, I have found this method much more effective than sending one email to a bunch of people using CC or BCC. A lot of people filter their email and delay reading anything not sent directly to them. Using Mailmerge ensures that every person gets their own email. Messages will filter properly for the recipient and no one can accidentally "reply all" to the entire group.
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/8/sending-custom-emails-python
作者:[Brian "bex" Exelbierd][a]
选题:[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/bexelbie
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/email_chat_communication_message.png?itok=LKjiLnQu (Chat via email)
[2]: https://docs.fedoraproject.org/en-US/council/fcaic/
[3]: https://github.com/awdeorio/mailmerge
[4]: https://github.com/awdeorio/mailmerge#install
[5]: mailto:myself@mydomain.com
[6]: mailto:bob@bobdomain.com
[7]: https://docs.python.org/3/library/csv.html
[8]: https://flocktofedora.org/
[9]: mailto:bexelbie@redhat.com
[10]: mailto:persona@fedoraproject.org
[11]: mailto:personb@fedoraproject.org
[12]: http://jinja.pocoo.org/docs/latest/templates/
[13]: http://jinja.pocoo.org/docs/2.10/templates/#whitespace-control

View File

@ -1,69 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (4 Python tools for getting started with astronomy)
[#]: via: (https://opensource.com/article/19/10/python-astronomy-open-data)
[#]: author: (Gina Helfrich, Ph.D. https://opensource.com/users/ginahelfrich)
4 Python tools for getting started with astronomy
======
Explore the universe with NumPy, SciPy, Scikit-Image, and Astropy.
![Person looking up at the stars][1]
NumFOCUS is a nonprofit charity that supports amazing open source toolkits for scientific computing and data science. As part of the effort to connect Opensource.com readers with the NumFOCUS community, we are republishing some of the most popular articles from [our blog][2]. To learn more about our mission and programs, please visit [numfocus.org][3]. If you're interested in participating in the NumFOCUS community in person, check out a local [PyData event][4] happening near you.
* * *
### Astronomy with Python
Python is a great language for science, and specifically for astronomy. The various packages such as [NumPy][5], [SciPy][6], [Scikit-Image][7] and [Astropy][8] (to name but a few) are all a great testament to the suitability of Python for astronomy, and there are plenty of use cases. [NumPy, Astropy, and SciPy are NumFOCUS fiscally sponsored projects; Scikit-Image is an affiliated project.] Since leaving the field of astronomical research behind more than 10 years ago to start a second career as software developer, I have always been interested in the evolution of these packages. Many of my former colleagues in astronomy used most if not all of these packages for their research work. I have since worked on implementing professional astronomy software packages for instruments for the Very Large Telescope (VLT) in Chile, for example.
It struck me recently that the Python packages have evolved to such an extent that it is now fairly easy for anyone to build [data reduction][9] scripts that can provide high-quality data products. Astronomical data is ubiquitous, and what is more, it is almost all publicly available—you just need to look for it.
For example, ESO, which runs the VLT, offers the data for download on their site. Head over to [www.eso.org/UserPortal][10] and create a user name for their portal. If you look for data from the instrument SPHERE you can download a full dataset for any of the nearby stars that have exoplanet or proto-stellar discs. It is a fantastic and exciting project for any Pythonista to reduce that data and make the planets or discs that are deeply hidden in the noise visible.
I encourage you to download the ESO or any other astronomy imaging dataset and go on that adventure. Here are a few tips:
1. Start off with a good dataset. Have a look at papers about nearby stars with discs or exoplanets and then search, for example: <http://archive.eso.org/wdb/wdb/eso/sphere/query>. Notice that some data on this site is marked as red and some as green. The red data is not publicly available yet — it will say under “release date” when it will be available.
2. Read something about the instrument you are using the data from. Try and get a basic understanding of how the data is obtained and what the standard data reduction should look like. All telescopes and instruments have publicly available documents about this.
3. You will need to consider the standard problems with astronomical data and correct for them:
1. Data comes in FITS files. You will need **pyfits** or **astropy** (which contains pyfits) to read them into **NumPy** arrays. In some cases the data comes in a cube and you should to use **numpy.median **along the z-axis to turn them into 2-D arrays. For some SPHERE data you get two copies of the same piece of sky on the same image (each has a different filter) which you will need to extract using **indexing and slicing.**
2. The master dark and bad pixel map. All instruments will have specific images taken as “dark frames” that contain images with the shutter closed (no light at all). Use these to extract a mask of bad pixels using **NumPy masked arrays** for this. This mask of bad pixels will be very important — you need to keep track of it as you process the data to get a clean combined image in the end. In some cases it also helps to subtract this master dark from all scientific raw images.
3. Instruments will typically also have a master flat frame. This is an image or series of images taken with a flat uniform light source. You will need to divide all scientific raw images by this (again, using numpy masked array makes this an easy division operation).
4. For planet imaging, the fundamental technique to make planets visible against a bright star rely on using a coronagraph and a technique known as angular differential imaging. To that end, you need to identify the optical centre on the images. This is one of the most tricky steps and requires finding some artificial helper images embedded in the images using **skimage.feature.blob_dog**.
4. Be patient. It can take a while to understand the data format and how to handle it. Making some plots and histograms of the pixel data can help you to understand it. It is well worth it to be persistent! You will learn a lot about imaging data and processing.
Using the tools offered by NumPy, SciPy, Astropy, scikit-image and more in combination, with some patience and persistence, it is possible to analyse the vast amount of available astronomical data to produce some stunning results. And who knows, maybe you will be the first one to find a planet that was previously overlooked! Good luck!
_This article was originally published on the NumFOCUS blog and is republished with permission. It is based on [a talk][11] by [Ole Moeller-Nilsson][12], CTO at Pivigo. If you want to support NumFOCUS, you can donate [here][13] or find your local [PyData event][4] happening around the world._
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/10/python-astronomy-open-data
作者:[Gina Helfrich, Ph.D.][a]
选题:[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/ginahelfrich
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/space_stars_cosmos_person.jpg?itok=XUtz_LyY (Person looking up at the stars)
[2]: https://numfocus.org/blog
[3]: https://numfocus.org
[4]: https://pydata.org/
[5]: http://numpy.scipy.org/
[6]: http://www.scipy.org/
[7]: http://scikit-image.org/
[8]: http://www.astropy.org/
[9]: https://en.wikipedia.org/wiki/Data_reduction
[10]: http://www.eso.org/UserPortal
[11]: https://www.slideshare.net/OleMoellerNilsson/pydata-lonon-finding-planets-with-python
[12]: https://twitter.com/olly_mn
[13]: https://numfocus.org/donate

View File

@ -1,92 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Easy DNS configuration with PowerDNS for nameservers)
[#]: via: (https://opensource.com/article/20/5/powerdns)
[#]: author: (Jonathan Garrido https://opensource.com/users/jgarrido)
Easy DNS configuration with PowerDNS for nameservers
======
Use PDNS to provide a stable and reliable Domain Name System (DNS)
server for your project.
![Computer laptop in space][1]
A few months ago, we got a requirement to provide a stable and reliable Domain Name System ([DNS][2]) server for a new project. The project dealt with auto-deployment using containers and where each new environment would generate a unique, random URL. After a lot of research on possible solutions, we decided to give [PowerDNS][3] (PDNS) a try.
At the outset, we discovered that PowerDNS is supported in all major Linux distros, is available under the GPL license, and keeps its repositories up to date. We also found neat and well-organized [documentation][4] on the official site and tons of how-to's around the web from people who really like and use the product. After reading a few pages and learning some basic commands, PDNS was installed, up, and running, and our journey began.
### Database-driven
PowerDNS keeps its records in a SQL database. This was new for us, and not having to use flat files to keep records was a good change. We picked MariaDB as our power tool of choice, and since there is tons of advance information about the proper settings for installing the nameserver, we could set up and harden our database flawlessly.
### Easy configuration
The second thing that engaged us was all the features PDNS has in its config file. This file, pdns.conf, has a lot of options that you can enable or disable just by adding or removing the # sign. This was truly amazing because it gave us the chance to integrate this new service into our current infrastructure with only the values that we want, no more, no less, just the features that we need. A quick example:
Who can access your webserver?
```
`webserver-allow-from=172.10.0.1,172.10.1.2`
```
Can I forward requests based in a domain? Sure!
```
forward-zones=mylocal.io=127.0.0.1:5300
forward-zones+=example.com=172.10.0.5:53
forward-zones+=lucky.tech=172.10.1.5:53
```
### API included
We could activate using this config file, and this is when we started to meet PDNS's "power" by solving the first request from our development team, the API service. This feature gave us the ability to send requests to simply and cleanly create, modify, or remove records in our DNS server.
This API has some basic security parameters, so in just a few steps, you can control who has the right to interact with the nameserver based on a combination of an IP address and a pre-share key as a way of authentication. Here's what the configuration for this looks like:
```
api=yes
api-key=lkjdsfpoiernf
webserver-allow-from=172.10.7.13,172.10.7.5
```
### Logging
PDNS does an extraordinary job when it comes to logging. You can monitor your server and see how the machine is doing by using the log files and a simple built-in web server. Using a browser, you can see different types of statistics from the machine, like CPU usage and the DNS queries received. This is very valuable—for example, we were able to detect a few "not-so-healthy" PCs that were sending DNS requests to our server looking for sites that are related to malicious traffic. After digging into the logs, we could see where traffic was coming from and do a clean operation on those PCs.
### Other features
This is only a glimpse of all the things you can do with PowerDNS; there is much more to it. It is a complete nameserver with a lot of features and functionalities that make it worth giving it a try.
At this moment, we are not implementing [DNSSEC][5], but it appears that it can be put into production quickly with just one click. Also, PowerDNS has a nice approach when it comes to separating the recursor service from the nameserver. I read that it also supports [DNS RPZ][6] (Response Policy Zones), and there are also some very nice and well-designed frontends available that let you manage your server using a simple web browser, like the one in the image below.
![PowerDNS frontend][7]
([PowerDNS documentation][4], MIT License)
Believe it or not, you can boost your knowledge about DNS and IT ops a lot just by expending a few hours "playing" with PDNS.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/5/powerdns
作者:[Jonathan Garrido][a]
选题:[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/jgarrido
[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://en.wikipedia.org/wiki/Domain_Name_System
[3]: https://www.powerdns.com/opensource.html
[4]: https://doc.powerdns.com/
[5]: https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions
[6]: https://dnsrpz.info/
[7]: https://opensource.com/sites/default/files/uploads/pdns.jpg (PowerDNS frontend)

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (Sky0Master)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -1,263 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Never forget your password with this Python encryption algorithm)
[#]: via: (https://opensource.com/article/20/6/python-passwords)
[#]: author: (Moshe Zadka https://opensource.com/users/moshez)
Never forget your password with this Python encryption algorithm
======
This unique algorithm using Python and Shamir's Secret Sharing protects
your master password from hackers and your own forgetfulness.
![Searching for code][1]
Many of us use password managers to securely store our many unique passwords. A critical part of a password manager is the master password. This password protects all others, and in that way, it is a risk. Anyone who has it can pretend to be you… anywhere! Naturally, you keep your master password hard to guess, commit it to memory, and do all the other things you are [supposed to do][2].
But what if something happens and you forget it? Maybe you took a vacation to a lovely, far-away island with no technology for a month. After frolicking in the water daily and eating pineapples, you cannot quite remember your password. Maybe it was "long legs travel fast"? Or was it something like "sharp spoons eat quick"? It was definitely clever when you thought of it.
![XKCD comic on password strength][3]
([XKCD][4], [CC BY-NC 2.5][5])
Of course, you never told a single soul your password. Why, this is literally the first rule of password management. What could you have done differently?
Enter [Shamir's Secret Sharing][6]**,** an algorithm that allows users to divide a secret into parts that can be used only in combination with the other pieces.
Let's take a look at Shamir's Secret Sharing in action through a story of ancient times and modern times.
This story does assume some knowledge of cryptography. You can brush up on it with this [introduction to cryptography and public key infrastructure][7].
### A story of secrets in ancient times
In an ancient kingdom, it came to pass that the king had a secret. A terrible secret:
```
def int_from_bytes(s):
    acc = 0
    for b in s:
        acc = acc * 256
        acc += b
    return acc
secret = int_from_bytes("terrible secret".encode("utf-8"))
```
So terrible, the king could entrust it to none of his offspring. He had five of them but knew that there would be dangers on the road ahead. The king knew his children would need the secret to protect the kingdom after his death, but he could not bear the thought of the secret being known for two decades, while they were still mourning him.
So he used powerful magic to split the secret into five shards. He knew that it was possible that one child or even two would not respect his wishes, but he did not believe three of them would:
```
from mod import Mod
from os import urandom
```
The king was well-versed in the magical arts of [finite fields][8] and _randomness_. As a wise king, he used Python to split the secret.
The first thing he did was choose a large prime—the 13th [Mersenne Prime][9] (`2**521 - 1`)—and ordered it be written in letters 10 feet high, wrought of gold, above the palace:
```
`P = 2**521 - 1`
```
This was not part of the secret: it was _public data_.
The king knew that if `P` is a prime, numbers modulo `P` form a mathematical [field][10]: they can be added, multiplied, subtracted, and divided as long as the divisor is not zero.
As a busy king, he used the PyPI [package `mod`][11], which implements modulus arithmetic.
He made sure his terrible secret was less than `P`:
```
`secret < P`[/code] [code]`TRUE`
```
And he converted it to its modulus `mod P`:
```
`secret = mod.Mod(secret, P)`
```
In order to allow three offspring to reconstruct the secret, the king had to generate two more parts to mix together:
```
polynomial = [secret]
for i in range(2):
    polynomial.append(Mod(int_from_bytes(urandom(16)), P))
len(polynomial)
[/code] [code]`3`
```
The king next needed to evaluate this [polynomial][12] at random points. Evaluating a polynomial is calculating `polynomial[0] + polynomial[1]*x + polynomial[2]*x**2 ...`
While there are third-party modules to evaluate polynomials, they do not work with finite fields. The king needed to write the evaluation code himself:
```
def evaluate(coefficients, x):
    acc = 0
    power = 1
    for c in coefficients:
        acc += c * power
        power *= x
    return acc
```
Next, the king evaluated the polynomial at five different points, to give one piece to each offspring:
```
shards = {}
for i in range(5):
    x = Mod(int_from_bytes(urandom(16)), P)
    y = evaluate(polynomial, x)
    shards[i] = (x, y)
```
Sadly, as the king feared, not all his offspring were honest and true. Two of them, shortly after his death, tried to figure out the terrible secret from the parts they had. Try as they could, they did not succeed. However, when the others learned this, they exiled them from the kingdom forever:
```
del shards[2]
del shards[3]
```
Twenty years later, as the king had decreed, the oldest sibling and the two youngest came together to figure out their father's terrible secret. They put together their shards:
```
`retrieved = list(shards.values())`
```
For 40 days and 40 nights, they struggled with finding the king's secret. No easy task was it before them. Like the king, they knew Python, but none were as wise as he.
Finally, the answer came to them.
The retrieval code is based on a concept called [lagrange interpolation][13]. It evaluates a polynomial at `0` based on its values in `n` other places, where `n` is the degree of the polynomial. The way it works is that you can explicitly find a formula for a polynomial that is `1` at `t[0]` and `0` at `t[i]` for `i` different from `0`. Since evaluating a polynomial is a linear function, you evaluate each of _these_ polynomials and interpolate the results of the evaluations with the values the polynomial has:
```
from functools import reduce
from operator import mul
def retrieve_original(secrets):
    x_s = [s[0] for s in secrets]
    acc = Mod(0, P)
    for i in range(len(secrets)):
        others = list(x_s)
        cur = others.pop(i)
        factor = Mod(1, P)
        for el in others:
            factor *= el * (el - cur).inverse()
        acc += factor * secrets[i][1]
    return acc
```
It is no surprise this took them 40 days and 40 nights—this code is pretty complicated! But they ran it on the surviving shards, waiting with bated breath:
```
`retrieved_secret = retrieve_original(retrieved)`
```
Did the children get the correct secret?
```
`retrieved_secret == secret`[/code] [code]`TRUE`
```
The beauty of math's magic is that it works reliably every time! The children, now older and able to understand their father's choices, used the terrible secret to defend the kingdom. The kingdom prospered and grew. 
### A modern story of Shamir's Secret Sharing
In modern times, many of us are also burdened with a terrible secret: the master password to our password manager. While few people have one person they can trust completely with their deepest, darkest secrets, many can find a group of five where it is unlikely three will break their trust together.
Luckily, in these modern times, we do not need to split our secrets ourselves, as the king did. Through the modern technology of _open source_, we can use software that exists.
Let's say you have five people you trust—not absolutely, but quite a bit: Your best friend, your spouse, your mom, a close colleague, and your lawyer.
You can install and run the program `ssss` to split the key:
```
$ echo 'long legs travel fast' | ssss-split -t 3 -n 5
Generating shares using a (3,5) scheme with dynamic security level.
Enter the secret, at most 128 ASCII characters: Using a 168 bit security level.
1-797842b76d80771f04972feb31c66f3927e7183609
2-947925f2fbc23dc9bca950ef613da7a4e42dc1c296
3-14647bdfc4e6596e0dbb0aa6ab839b195c9d15906d
4-97c77a805cd3d3a30bff7841f3158ea841cd41a611
5-17da24ad63f7b704baed220839abb215f97d95f4f8
```
Ah, a strong, powerful, master password: `long legs travel fast`. Never can it be entrusted to a single soul, but you can send the five shards to your five guardians.
* You send `1` to your best friend, F.
* You send `2` to your spouse, S.
* You send `3` to your mom, M.
* You send `4` to your colleague, C.
* You send `5` to your lawyer, L.
Now, say you go on a family vacation. For a month, you frolic on the warm sands of the beach. While you frolic, you touch not one electronic device. Soon enough, your powerful master password is forgotten.
Your loving spouse and your dear mother were with you on vacation. They kept their shards safe in their password manager—and they have forgotten _their passwords_.
This is fine.
You contact your best friend, F, who gives you `1-797842b76d80771f04972feb31c66f3927e7183609`. Your colleague, who covered all your shifts, is glad to have you back and gives you `4-97c77a805cd3d3a30bff7841f3158ea841cd41a611`. Your lawyer charges you $150 per hour, goes into their password manager, and digs up `5-17da24ad63f7b704baed220839abb215f97d95f4f8`.
With those three pieces, you run:
```
$ ssss-combine -t 3
Enter 3 shares separated by newlines:
Share [1/3]: 1-797842b76d80771f04972feb31c66f3927e7183609
Share [2/3]: 4-97c77a805cd3d3a30bff7841f3158ea841cd41a611
Share [3/3]: 5-17da24ad63f7b704baed220839abb215f97d95f4f8
Resulting secret: long legs travel fast
```
And so, with the technology of _open source_, you too can live like a king!
### Share safely for your safety
Password management is an essential skill for today's online life. Create a complex password, of course, but don't stop there. Use the handy Shamir's Secret Sharing algorithm to safely share it with others.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/6/python-passwords
作者:[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/search_find_code_python_programming.png?itok=ynSL8XRV (Searching for code)
[2]: https://monitor.firefox.com/security-tips
[3]: https://opensource.com/sites/default/files/uploads/password_strength-xkcd.png (XKCD comic on password strength)
[4]: https://imgs.xkcd.com/comics/password_strength.png
[5]: https://creativecommons.org/licenses/by-nc/2.5/
[6]: https://en.wikipedia.org/wiki/Secret_sharing#Shamir's_scheme
[7]: https://opensource.com/article/18/5/cryptography-pki
[8]: https://en.wikipedia.org/wiki/Finite_field
[9]: https://en.wikipedia.org/wiki/Mersenne_prime
[10]: https://en.wikipedia.org/wiki/Field_(mathematics)
[11]: https://pypi.org/project/mod/
[12]: https://en.wikipedia.org/wiki/Polynomial
[13]: https://www.math.usm.edu/lambers/mat772/fall10/lecture5.pdf

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -1,175 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Use DNS over TLS)
[#]: via: (https://fedoramagazine.org/use-dns-over-tls/)
[#]: author: (Thomas Bianchi https://fedoramagazine.org/author/thobianchi/)
Use DNS over TLS
======
![][1]
The [Domain Name System (DNS)][2] that modern computers use to find resources on the internet was designed [35 years ago][3] without consideration for user privacy. It is exposed to security risks and attacks like [DNS Hijacking][4]. It also allows [ISPs][5] to intercept the queries.
Luckily, [DNS over TLS][6] and [DNSSEC][7] are available. DNS over TLS and DNSSEC allow safe and encrypted end-to-end tunnels to be created from a computer to its configured DNS servers. On Fedora, the steps to implement these technologies are easy and all the necessary tools are readily available.
This guide will demonstrate how to configure DNS over TLS on Fedora using systemd-resolved. Refer to the [documentation][8] for further information about the systemd-resolved service.
### Step 1 : Set-up systemd-resolved
Modify _/etc/systemd/resolved.conf_ so that it is similar to what is shown below. Be sure to enable DNS over TLS and to configure the IP addresses of the DNS servers you want to use.
```
$ cat /etc/systemd/resolved.conf
[Resolve]
DNS=1.1.1.1 9.9.9.9
DNSOverTLS=yes
DNSSEC=yes
FallbackDNS=8.8.8.8 1.0.0.1 8.8.4.4
#Domains=~.
#LLMNR=yes
#MulticastDNS=yes
#Cache=yes
#DNSStubListener=yes
#ReadEtcHosts=yes
```
A quick note about the options:
* **DNS**: A space-separated list of IPv4 and IPv6 addresses to use as system DNS servers
* **FallbackDNS**: A space-separated list of IPv4 and IPv6 addresses to use as the fallback DNS servers.
* **Domains**: These domains are used as search suffixes when resolving single-label host names, _~._ stand for use the system DNS server defined with DNS= preferably for all domains.
* **DNSOverTLS:** If true all connections to the server will be encrypted. Note that this mode requires a DNS server that supports DNS-over-TLS and has a valid certificate for its IP.
> _NOTE: The DNS servers listed in the above example are my personal choices. You should decide which DNS servers you want to use; being mindful of whom you are asking IPs for internet navigation_.
### Step 2 : Tell NetworkManager to push info to systemd-resolved
Create a file in _/etc/NetworkManager/conf.d_ named _10-dns-systemd-resolved.conf_.
```
$ cat /etc/NetworkManager/conf.d/10-dns-systemd-resolved.conf
[main]
dns=systemd-resolved
```
The setting shown above (_dns=systemd-resolved_) will cause NetworkManager to push DNS information acquired from DHCP to the systemd-resolved service. This will override the DNS settings configured in _Step 1_. This is fine on a trusted network, but feel free to set _dns=none_ instead to use the DNS servers configured in _/etc/systemd/resolved.conf_.
### Step 3 : start &amp; restart services
To make the settings configured in the previous steps take effect, start and enable _systemd-resolved_. Then restart _NetworkManager_.
**CAUTION**: This will lead to a loss of connection for a few seconds while NetworkManager is restarting.
```
$ sudo systemctl start systemd-resolved
$ sudo systemctl enable systemd-resolved
$ sudo systemctl restart NetworkManager
```
> _NOTE: Currently, the systemd-resolved service is disabled by default and its use is opt-in. [There are plans][9] to enable systemd-resolved by default in Fedora 33._
### Step 4 : Check if everything is fine
Now you should be using DNS over TLS. Confirm this by checking DNS resolution status with:
```
$ resolvectl status
MulticastDNS setting: yes
DNSOverTLS setting: yes
DNSSEC setting: yes
DNSSEC supported: yes
Current DNS Server: 1.1.1.1
DNS Servers: 1.1.1.1
9.9.9.9
Fallback DNS Servers: 8.8.8.8
1.0.0.1
8.8.4.4
```
/etc/resolv.conf should point to 127.0.0.53
```
$ cat /etc/resolv.conf
# Generated by NetworkManager
search lan
nameserver 127.0.0.53
```
To see the address and port that systemd-resolved is sending and receiving secure queries on, run:
```
$ sudo ss -lntp | grep '\(State\|:53 \)'
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=10410,fd=18))
```
To make a secure query, run:
```
$ resolvectl query fedoraproject.org
fedoraproject.org: 8.43.85.67 -- link: wlp58s0
8.43.85.73 -- link: wlp58s0
[..]
-- Information acquired via protocol DNS in 36.3ms.
-- Data is authenticated: yes
```
### BONUS Step 5 : Use Wireshark to verify the configuration
First, install and run [Wireshark][10]:
```
$ sudo dnf install wireshark
$ sudo wireshark
```
It will ask you which link device it have to begin capturing packets on. In my case, because I use a wireless interface, I will go ahead with _wlp58s0_. Set up a filter in Wireshark like _tcp.port == 853_ (853 is the DNS over TLS protocol port). You need to flush the local DNS caches before you can capture a DNS query:
```
$ sudo resolvectl flush-caches
```
Now run:
```
$ nslookup fedoramagazine.org
```
You should see a TLS-encryped exchange between your computer and your configured DNS server:
![][11]
_Poster in Cover Image Approved for Release by NSA on 04-17-2018, FOIA Case # 83661_
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/use-dns-over-tls/
作者:[Thomas Bianchi][a]
选题:[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/thobianchi/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2020/06/use-dns-over-tls-816x345.jpg
[2]: https://en.wikipedia.org/wiki/Domain_Name_System
[3]: https://tools.ietf.org/html/rfc1035
[4]: https://en.wikipedia.org/wiki/DNS_hijacking
[5]: https://en.wikipedia.org/wiki/Internet_service_provider
[6]: https://en.wikipedia.org/wiki/DNS_over_TLS
[7]: https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions
[8]: https://www.freedesktop.org/wiki/Software/systemd/resolved/
[9]: https://fedoraproject.org/wiki/Changes/systemd-resolved
[10]: https://www.wireshark.org/
[11]: https://fedoramagazine.org/wp-content/uploads/2020/06/1-1024x651.png

View File

@ -1,143 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Top 5 Open Source Video Conferencing Tools for Remote Working and Online Meetings)
[#]: via: (https://itsfoss.com/open-source-video-conferencing-tools/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
Top 5 Open Source Video Conferencing Tools for Remote Working and Online Meetings
======
You will find several video conferencing tools available online. Some are tailored for professional use and some for daily casual conversations.
However, with hundreds of options to choose from, security and privacy is often a concern when picking a video conferencing app or service. Among the list of options, whats usually the best and the most secure service?
Well, all (or most of them) claim to provide the best possible security and privacy. But you know that this cannot be taken at face value.
Fortunately, at Its FOSS, we focus on open-source solutions and privacy-friendly options. So, lets take a look at a list of open-source video conferencing tools that you can utilize.
### Top Open Source Video Conferencing Solutions
![][1]
Most of the video conferencing solutions can be installed on your own servers if you are a small business or enterprise.
For normal, non-sysadmins, some of these solutions also provide ready-to-use, free, web-based video conferencing service. Ill mention this information in the description of each item on the list.
**Note:** The list is in no particular order of ranking.
#### 1\. Jitsi Meet
![][2]
Jitsi Meet is an impressive open-source video conferencing service. You can easily find out more about it on our separate coverage on [Jitsi Meet][3].
To give you a head start, it offers you free [official public instance][4] to test it and use it for free as long as you need it.
If you need to host it on your server while customizing some options for your requirements, you can download it from its [official website][5] for your server.
Even though they offer an electron-based app on Linux, you dont need to download an app on your desktop to set it up. All you need is a browser and youre good to go. For mobile, you will find apps for both Android and iOS.
[Jitsi Meet][5]
#### 2\. Jami
![][6]
Jami is a peer-to-peer based open-source video conferencing solution. Its good to see a distributed service that does not rely on servers but peer-to-peer connections.
Of course, a distributed service has its pros and cons. But, its free and open-source, thats what matters.
Jami is available for Linux, Windows, macOS, Android, and iOS, So, its a pure cross-platform solution for secure messaging and video conferencing. You can take a look at their [GitLab page][7] to explore more about it.
[Jami][8]
#### 3\. Nextcloud Talk
![][9]
[Nextcloud][10] is undoubtedly the open-source Swiss army of remote working tools. We at Its FOSS utilize Nextcloud. So, if you already have your server set up, [Nextcloud Talk][11] can prove to be an excellent video conferencing and communication tool.
Of course, if you dont have your own Nextcloud instance, you will require some technical expertise to set it up and start using Nextcloud Talk.
[Nextcloud Talk][11]
#### 4\. Riot.im
![][12]
Riot.im (soon going to be rebranded) is already one of the [best open source alternatives to slack][13].
It gives you the ability to create communities, send text messages, and start video conferences in a group/community. You can use it for free by using any of the public [Matrix servers][14] available.
If you want your own dedicated decentralized Matrix network, you can also opt for paid hosting plans on [Modular.im][15].
[Riot.im][16]
#### 5\. BigBlueButton
![][17]
BigBlueButton is an interesting open-source video conferencing option tailored for online learning.
If you are a teacher or running a school, you might want to try this out. Even though you can try it for free, there will be limitations for the free demo usage. So, its best to host it on your own server and you can also integrate it with your other products/services, if any.
It offers a good set of features that let you easily teach the students. You can explore its [GitHub page][18] to know more about it.
[BigBlueButton][19]
#### Additional mention: Wire
![][20]
Wire is a quite popular open-source secure messaging platform tailored for business and enterprise users. It also offers video calls or web conferencing options.
If you wanted a premium open-source option dedicated for your business or your team, you can try Wire and decide to upgrade it after the 30-day trial expires.
Personally, I love the user experience, but it comes at a cost. So, Id recommend you to give it a try and explore its [GitHub page][21] before you decide
[Wire][22]
### Wrapping Up
Now that you know some popular open-source web conferencing options, which one do you prefer to use?
Did I miss any of your favorites? Let me know your thoughts in the comments below!
--------------------------------------------------------------------------------
via: https://itsfoss.com/open-source-video-conferencing-tools/
作者:[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://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/open-source-video-conferencing-tools.jpg?ssl=1
[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/jitsi-meet-browser-screenshot.png?ssl=1
[3]: https://itsfoss.com/jitsi-meet/
[4]: https://meet.jit.si/
[5]: https://jitsi.org/jitsi-meet/
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/jami-screenshot.png?ssl=1
[7]: https://git.jami.net/savoirfairelinux/ring-project
[8]: https://jami.net/
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/nextcloud-talk.png?ssl=1
[10]: https://itsfoss.com/nextcloud/
[11]: https://nextcloud.com/talk/
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/riot-communication-video.png?ssl=1
[13]: https://itsfoss.com/open-source-slack-alternative/
[14]: https://matrix.org/
[15]: https://modular.im/
[16]: https://about.riot.im/
[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/big-blue-button.png?ssl=1
[18]: https://github.com/bigbluebutton/bigbluebutton
[19]: https://itsfoss.com/open-source-video-conferencing-tools/bigbluebutton.org/
[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/wire-video-conferencing.png?ssl=1
[21]: https://github.com/wireapp
[22]: https://wire.com/en/

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (Yufei-Yan)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -1,97 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (What's the difference between DevSecOps and agile software development)
[#]: via: (https://opensource.com/article/20/7/devsecops-vs-agile)
[#]: author: (Sam Bocetta https://opensource.com/users/sambocetta)
What's the difference between DevSecOps and agile software development
======
Are you focused more on security or software delivery? Or can you have
both?
![Brick wall between two people, a developer and an operations manager][1]
There is a tendency in the tech community to use the terms DevSecOps and agile development interchangeably. While there are some similarities, such as that both aim to detect risks earlier, there are also distinctions that [drastically alter how each would work][2] in your organization.
DevSecOps built on some of the principles that agile development established. However, DevSecOps is [especially focused on integrating security features][3], while agile is focused on delivering software.
Knowing how to protect your website or application from ransomware and other threats really comes down to the software and systems development you use. Your needs may impact whether you choose to utilize DevSecOps, agile development, or both.
### Differences between DevSecOps and agile
The main distinction between these two systems comes down to one simple concept: security. Depending on your software development practices, your company's security measures—and when, where, and who implements them—may differ significantly.
Every business [needs IT security][4] to protect their vital data. Virtual private networks (VPNs), digital certificates, firewall protection, multi-factor authentication, secure cloud storage, and teaching employees about basic cybersecurity measures are all actions a business should take if it truly values IT security.
When you trust DevSecOps, you're taking your company's security and essentially making it tantamount to continuous integration and delivery. DevSecOps methodologies emphasize security at the very beginning of development and make it an integral component of overall software quality.
This is due to three major principles in DevSecOps security:
* Balancing user access with data security
* [Encrypting data][5] with VPN and SSL to protect it from intruders while it is in transit
* Anticipating future risks with tools that scan new code for security flaws and notifying developers about the flaws
While DevOps has always intended to include security, not every organization practicing DevOps has kept it in mind. That is where DevSecOps as an evolution of DevOps can offer clarity. Despite the similarity of their names, the two [should not be confused][6]. In a DevSecOps model, security is the primary driving force for the organization.
Meanwhile, agile development is more focused on iterative development cycles, which means feedback is constantly integrated into continuous software development. [Agile's key principles][7] are to embrace changing environments to provide customers and clients with competitive advantages, to collaborate closely with developers and stakeholders, and to maintain a consistent focus of technical excellence throughout the process to help boost efficiency. In other words, unless an agile team includes security in its definition of excellence, security _is_ an afterthought in agile.
### Challenges for defense agencies
If there's any organization dedicated to the utmost in security, it's the U.S. Department of Defense. In 2018, the DoD published a [guide to "fake agile"][8] or "agile in name only" in software development. The guide was designed to warn DoD executives about bad programming and explain how to spot it to avoid risks.
It's not only DoD that has something to gain by using these methodologies. The healthcare and financial sectors also [maintain massive quantities][9] of sensitive data that must remain secure.
DoD's changing of the guard with its modernization strategy, which includes the adoption of DevSecOps, is essential. This is particularly pertinent in an age when even the DoD is susceptible to hacker attacks and data breaches, as evidenced by its [massive data breach][10] in February 2020.
There are also risks inherent in transferring cybersecurity best practices into real-life development. Things won't go perfectly 100% of the time. At best, things will be uncomfortable, and at worst, they could create a whole new set of risks.
Developers, especially those working on code for military software, may not have a thorough [understanding of all contexts][11] where DevSecOps should be employed. There will be a steep learning curve, but for the greater good of security, these are necessary growing pains.
### New models in the age of automation
To address growing concerns about previous security measures, DoD contractors have begun to assess the DevSecOps model. The key is deploying the methodology into continuous service delivery contexts.
There are three ways this can happen. The first involves automation, which is [already being used][12] in most privacy and security tools, including VPNs and privacy-enhanced mobile operating systems. Instead of relying on human-based checks and balances, automation in large-scale cloud infrastructures can handle ongoing maintenance and security assessments.
The second element involves the transition to DevSecOps as the primary security checkpoint. Traditionally, systems were designed with zero expectation that data would be accessible as it moves between various components.
The third and final element involves bringing corporate approaches to military software development. Many DoD contractors and employees come from the commercial sector rather than the military. Their background gives them knowledge and experience in [providing cybersecurity][13] to large-scale businesses, which they can bring into government positions.
### Challenges worth overcoming
Switching to a DevSecOps-based methodology presents some challenges. In the last decade, many organizations have completely redesigned their development lifecycles to comply with agile development practices, and making another switch so soon may seem daunting.
Businesses should gain peace of mind knowing that even the DoD has had trouble with this transition, and they're not alone in the challenges of rolling out new processes to make commercial techniques and tools more widely accessible.
Looking into the future, the switch to DevSecOps will be no more painful than the switch to agile development was. Firms have a lot to gain by acknowledging the [value of building security][4] into development workflows, as well as building upon the advantages of existing agile networks.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/devsecops-vs-agile
作者:[Sam Bocetta][a]
选题:[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/sambocetta
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/devops_confusion_wall_questions.png?itok=zLS7K2JG (Brick wall between two people, a developer and an operations manager)
[2]: https://tech.gsa.gov/guides/understanding_differences_agile_devsecops/
[3]: https://www.redhat.com/en/topics/devops/what-is-devsecops
[4]: https://www.redhat.com/en/topics/security
[5]: https://surfshark.com/blog/does-vpn-protect-you-from-hackers
[6]: https://www.infoq.com/articles/evolve-devops-devsecops/
[7]: https://enterprisersproject.com/article/2019/9/agile-project-management-explained
[8]: https://www.governmentciomedia.com/defense-innovation-board-issues-guide-detecting-agile-bs
[9]: https://www.redhat.com/en/solutions/financial-services
[10]: https://www.military.com/daily-news/2020/02/25/dod-agency-suffers-data-breach-potentially-compromising-ssns.html
[11]: https://fcw.com/articles/2020/01/23/dod-devsecops-guidance-williams.aspx
[12]: https://privacyaustralia.net/privacy-tools/
[13]: https://www.securitymagazine.com/articles/88301-cybersecurity-is-standard-business-practice-for-large-companies

View File

@ -1,110 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Ubuntu 19.10 Reaches End of Life. Upgrade to Ubuntu 20.04 As Soon As Possible!)
[#]: via: (https://itsfoss.com/ubuntu-19-10-end-of-life/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
Ubuntu 19.10 Reaches End of Life. Upgrade to Ubuntu 20.04 As Soon As Possible!
======
_**Ubuntu 19.10 Eoan Ermine**_ _**has reached end of life. That it means it wont get any security or maintenance updates. Continue using Ubuntu 19.10 would be risky as your system may be vulnerable in future for the lack of security updates. You should upgrade to Ubuntu 20.04.**_
[Ubuntu 19.10 was released in October 2019][1] bringing some new features that prepared a base for [Ubuntu 20.04][2].
As a non-LTS release, it had a lifespan of nine months. It has completed its life cycle and as of 17th July 2020, it wont be getting any updates.
### End of life for Ubuntu 19.10
![][3]
I have [explained Ubuntu release cycle and end of life][4] in detail earlier. Ill reiterate what it means to you and your system if continue using Ubuntu 19.10 beyond this point.
[Software usually hav][5][e][5] [a predefined life cycle][5] and once a software version reaches end of life, it stops getting updates and support.
Beyond the end of life, Ubuntu 19.10 wont get system updates, security updates or application updates from Ubuntu anymore.
If you continue using it, your system may fell victim to potential cyberattacks as hackers tend to exploit vulnerable system.
Later, you might not be able to install new software using apt command as Ubuntu will archive the repository for 19.10.
### What to do if you are using Ubuntu 19.10?
First, [check which version of Ubuntu you are using][6]. This can be done quickly by entering this command in the terminal:
```
lsb_release -a
```
```
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 19.10
Release: 19.10
Codename: Eoan
```
If you see Ubuntu 19.10, you should do either of these two things:
* If you have a good speed, consistent internet connection, upgrade to Ubuntu 20.04 from within 19.10. Your personal files and most software remain untouched.
* If you have a slow or inconsistent internet connection, you should do a [fresh installation of Ubuntu 20.04][7]. Your files and everything else on the disk will be erased so you should make backup of your important data on an external disk.
#### How to upgrade to Ubuntu 20.04 from 19.10 (if you have good internet connection)
I have discussed the Ubuntu version upgrade in details previously. Ill quickly mention the steps here as well.
First, make sure that your system is set to be notified of new version in Software &amp; Updates.
Go to Software &amp; Updates:
![][8]
Go to Updates tab and set “Notify me of a new Ubuntu version” to “For any new version”:
![][9]
Now, install any pending updates.
Now, run Update Manager tool again. You should be given the option to upgrade to Ubuntu 20.04. Hit the upgrade button and follow the instructions.
It installs packages of around 1.2 GB. This is why you need a good and consistent internet connection.
![][10]
Upgrading this way keeps your home directory as it is. Having a backup on external disk is still suggested, though.
### Are you still using Ubuntu 19.10?
If you are still using Ubuntu 19.10, you must prepare for the upgrade or fresh installation. You must not ignore it.
If you dont like frequent version upgrades like this, you should stick with LTS versions that are supported for five years. The current LTS version is Ubuntu 20.04 which youll be upgrading to anyway.
Were/are you using Ubuntu 19.10? Have you already upgraded to Ubuntu 20.04? Let me know if you face any issue or if you have any questions.
--------------------------------------------------------------------------------
via: https://itsfoss.com/ubuntu-19-10-end-of-life/
作者:[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/ubuntu-19-10-released/
[2]: https://itsfoss.com/download-ubuntu-20-04/
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/ubuntu-19-10-end-of-life.jpg?ssl=1
[4]: https://itsfoss.com/end-of-life-ubuntu/
[5]: https://en.wikipedia.org/wiki/Systems_development_life_cycle
[6]: https://itsfoss.com/how-to-know-ubuntu-unity-version/
[7]: https://itsfoss.com/install-ubuntu/
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/03/upgrade-ubuntu-1.jpeg?ssl=1
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2017/11/software-update-any-new-version.jpeg?resize=800%2C378&ssl=1
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/software-updater-focal.jpg?ssl=1

View File

@ -1,130 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (Mikedkmilk)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Why People Are Crazy About Arch Linux? Whats so Special About it?)
[#]: via: (https://itsfoss.com/why-arch-linux/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
Why People Are Crazy About Arch Linux? Whats so Special About it?
======
BTW, I use Arch!
You may have come across this term in Linux forums, discussion or in memes.
You might wonder why Arch Linux is so popular? Why people like it so much when there are easier to use, if not better, [Arch-based distributions][1] available.
In this article, Ill list some of the reasons why Linux users like to use [Arch Linux][2].
### 6 reasons why people love to use Arch Linux
![][3]
Now, this is my perception. There is no set rule, of course, why you should be using Arch Linux. Its what I have observed in my over a decade of experience with Linux users and communities.
Lets see why Arch Linux is so popular.
#### 1\. The DIY approach gives you the control over every aspect of your operating system
I have always found Arch Linux as a DIY (Do It Yourself) operating system. From installing to managing, Arch Linux lets you handle everything.
You decide which desktop environment to use, which components and services to install. This granular control gives you a minimal operating system to build upon with elements of your choice.
If you are a DIY enthusiast, youll love Arch Linux.
#### 2\. Using Arch Linux gives you a better understanding of how Linux works
![Installing Arch Linux by creating partition and making filesystem via command line][4]
If you ever tried to install Arch Linux, you know the complexity that comes with it.
But that complexity also mean that youll be forced to learn things that you probably never bother to in other distributions.
For example, configuring network itself while installing Arch Linux is a good learning lesson.
If you start to get overwhelmed, [Arch Wiki][5] is there for you. It is the most extensive and awesome community-managed documentation on the internet. Just browsing through Arch Wiki will teach you plenty of things.
#### 3\. Rolling release gives you the latest kernel and software
![System update in Arch Linux][6]
Arch Linux is a rolling release distribution. That means new kernel and application versions are rolled out to you as soon as they are released.
While most other [Linux distributions serve you old Linux kernel versions][7], Arch is quick to provide you the latest kernel.
The same goes for software. If a software in the Arch repositories have a new version released, Arch users get the new versions before other users most of the time.
Everything is fresh and cutting edge in the rolling release model. You dont have to upgrade operating system from one version to another. Just use the [pacman command][8] and you always have the latest version.
#### 4\. Arch User Repository aka AUR
![][9]
Arch Linux has plenty of software in its repository. The AUR extends the software offering of Arch Linux. You get a huge number of software with [AUR in Arch Linux][10].
AUR is the community driven approach to provide newer applications. You can search and install applications with the help of an [AUR helper][11] tool.
#### 5\. Sense of accomplishment
![][12]
As James Clear mentions in his book Atomic Habits, _**human brain loves a challenge, but only if it is within an optimal zone of difficulty**_.
Remember the feeling when you first installed any Linux distribution even if it was installing Linux Mint? That gave you a sense of achievement. You successfully installed Linux!
If you have been using Ubuntu or Fedora or other distribution for some time and you start to get comfortable (or bored), try installing Arch Linux.
For a moderately experienced Linux user, [successfully installing Arch Linux][13] itself gives a sense of accomplishment.
It is a challenge but an achievable one. If you suggest a new Linux user to try Arch Linux or even more complicated one like [Linux From Scratch][14], the challenge would be too difficult to achieve.
This sense of successfully completing a challenge is also one of the reasons why people use Arch Linux.
#### 6\. No corporate involvement! Arch is created, supported and owned by community
Ubuntu is backed by Canonical, Fedora is from Red Hat (part of IBM now) and openSUSE is from SUSE. All these major distributions are corporate backed.
This is not bad or crime in itself. But a few people do not like corporate involvement in open source projects.
Like Debian, Arch Linux is one of the rare few community-only Linux distribution projects.
You may point out that many other distributions like Linux Mint etc are also not sponsored by corporate. Well, that might be true but Linux Mint itself is based on Ubuntu and uses Ubuntus repositories. Arch Linux is not derivative of another distribution.
In that sense, [Debian][15] and Arch Linux are more pure community-driven projects. It may not matter to many people but a few people do care about such things.
#### According to you, why Arch Linux is so popular?
Now, you may not agree with all the points I made and thats okay. I would like your views on why Arch Linux is so popular and has cult status among Linux users?
While you write the comments, let me share a BTW, I use Arch meme :)
--------------------------------------------------------------------------------
via: https://itsfoss.com/why-arch-linux/
作者:[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/arch-based-linux-distros/
[2]: https://www.archlinux.org/
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/why-arch-linux.jpg?ssl=1
[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/01/efi_system_partition-1.png?ssl=1
[5]: https://wiki.archlinux.org/
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/sudo-pacman-Syu.png?ssl=1
[7]: https://itsfoss.com/why-distros-use-old-kernel/
[8]: https://itsfoss.com/pacman-command/
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/01/AUR.png?resize=800%2C451&ssl=1
[10]: https://itsfoss.com/aur-arch-linux/
[11]: https://itsfoss.com/best-aur-helpers/
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/installed-arch-linux.png?ssl=1
[13]: https://itsfoss.com/install-arch-linux/
[14]: http://www.linuxfromscratch.org/
[15]: https://www.debian.org/

View File

@ -0,0 +1,325 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Manage network connections from the Linux command line with nmcli)
[#]: via: (https://opensource.com/article/20/7/nmcli)
[#]: author: (Dave McKay https://opensource.com/users/davemckay)
Manage network connections from the Linux command line with nmcli
======
Tap into the power of the NetworkManager tool directly from the Linux
command line with nmcli.
![Business woman on laptop sitting in front of window][1]
The [nmcli][2] command lets you tap into the power of the NetworkManager tool directly from the Linux command line. It's an integral part of the NetworkManager package that makes use of an [application programmer's interface][3] (API) to access NetworkManager's functionality.
nmcli was released in 2010 and replaces other modes of configuring network interfaces and connections, such as [ifconfig][4]. Because it is a [command-line interface][5] (CLI) tool designed to be used in terminal windows and scripts, it is ideal for system administrators working on systems without a [graphical user interface][6] (GUI).
### ncmli syntax
The nmcli command accepts _options_ that modify nmcli's behavior, _sections_ that tell nmcli which of its capabilities you want to use, and _actions_ that tell it what you want it to do:
```
`$ nmcli <options> <section> <action>`
```
There are eight sections, each related to a specific set of network actions:
* **Help** provides help about ncmcli's commands and usage.
* **General** retrieves NetworkManager's status and global configuration.
* **Networking** provides commands to query a network connection's status and enable or disable connections.
* **Radio** provides commands to query a WiFi network connection's status and enable or disable connections.
* **Monitor** provides commands to monitor NetworkManager activity and observe network connections' status changes.
* **Connection** provides commands to bring network interfaces up and down, to add new connections, and to delete existing connections.
* **Device** is mainly used to modify parameters associated with a device (e.g., the interface name) or to connect a device using an existing connection.
* **Secret** registers nmcli as a NetworkManager secret agent listening for secret messages. This is very rarely required because nmcli does this automatically when connecting to networks.
### Simple examples
As a first check, verify NetworkManager is running and nmcli can communicate with it:
```
$ nmcli general
STATE      CONNECTIVITY  WIFI-HW  WIFI     WWAN-HW  WWAN    
connected  full          enabled  enabled  enabled  enabled
```
Reconnaissance is often the first part of administering a system. To list all in-memory and on-disk network connection profiles:
```
$ nmcli connection show
NAME                UUID                                  TYPE      DEVICE
Wired connection 1  ac3241e4-b424-35d6-aaa7-07498561688d  ethernet  enp0s3
Wired connection 2  2279d917-fa02-390c-8603-3083ec5a1d3e  ethernet  enp0s8
Wired connection 3  52d89737-de92-35ec-b082-8cf2e5ac36e6  ethernet  enp0s9
```
This command uses the `show` action from the `connection` section.
The test machine used for this example is running Ubuntu 20.04. It has three network adaptors installed: `enp0s3`, `enp0s8`, and `enp0s9`.
### Connection management
It's important to understand nmcli's nomenclature. A network **connection** is something that holds all the information about a connection. You can think of it as a network **configuration**. A connection encapsulates all the information related to a connection, including the [data-link layer][7] and the [IP-addressing information][8]. That's layer 2 and layer 3 in the [OSI networking model][9].
When you are configuring networking on Linux, you're usually configuring connections that will eventually bind to networking devices, which are the network interfaces installed in a computer. When a connection is used by a device, the connection is said to be **active** or **up**. The opposite of active is **inactive** or **down**.
#### Adding network connections
The ncmli command allows you to quickly create network connections and specify elements of their configuration at the same time. To add a new connection using wired connection 2, `enp0s8`, you need to use `sudo`:
```
$ sudo nmcli connection add type ethernet ifname enp0s8
Connection 'ethernet-enp0s8' (09d26960-25a0-440f-8b20-c684d7adc2f5) successfully added.
```
The `type` option requests an [Ethernet][10] connection, and the `ifname` (interface name) option specifies the network interface device you want the connection to use.
Check what happened:
```
$ nmcli connection show
NAME                UUID                                  TYPE      DEVICE
Wired connection 1  ac3241e4-b424-35d6-aaa7-07498561688d  ethernet  enp0s3
Wired connection 2  2279d917-fa02-390c-8603-3083ec5a1d3e  ethernet  enp0s8
Wired connection 3  52d89737-de92-35ec-b082-8cf2e5ac36e6  ethernet  enp0s9
ethernet-enp0s8     09d26960-25a0-440f-8b20-c684d7adc2f5  ethernet  --  
```
Your new connection, `ethernet-enp0s8`, was created. Its [universally unique identifier][11] (UUID) was assigned, and the connection type is Ethernet. Make it active with the `up` command followed by the connection name (or the UUID):
```
$ nmcli connection up ethernet-enp0s8
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/4)
```
Check your active connections once more:
```
$ nmcli connection show --active
NAME                UUID                                  TYPE      DEVICE
Wired connection 1  ac3241e4-b424-35d6-aaa7-07498561688d  ethernet  enp0s3
ethernet-enp0s8     09d26960-25a0-440f-8b20-c684d7adc2f5  ethernet  enp0s8
Wired connection 3  52d89737-de92-35ec-b082-8cf2e5ac36e6  ethernet  enp0s9
```
Your new connection, `ethernet-enp0s8`, is now active and bound to the `enp0s8` network interface device.
#### Adjusting connections
The ncmli command makes it easy to adjust existing connections' parameters. Perhaps you want to switch one network interface from [Dynamic Host Configuration Protocol][12] (DHCP) to a static IP address.
Suppose you need a fixed IP address of `192.168.4.26` for your new connection. To achieve that, you need to issue two commands. One to set the IP address, and one to set the connection's method of obtaining an IP address to `manual`:
```
$ nmcli connection modify ethernet-enp0s8 ipv4.address 192.168.4.26/24
$ nmcli connection modify ethernet-enp0s8 ipv4.method manual
```
Remember to specify the [subnet mask][13]. On this test network, it is `255.255.255.0`, or `/24` in [Classless Inter-Domain Routing][14] (CIDR).
For your changes to take effect, you need to _bounce_ the connection by stopping it and bringing it back up again. The first command takes the connection down and the second brings it back up:
```
$ nmcli connection down ethernet-enp0s8
Connection 'ethernet-enp0s8' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/4)
$ nmcli connection up ethernet-enp0s8
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/6)
```
If you want to set the connection to use DHCP, use `auto` instead of `manual`:
```
`$ nmcli connection modify ethernet-enp0s8 ipv4.method auto`
```
### Device management
The commands in the `device` section of the nmcli command allow you to manage the network interfaces installed on your computer.
#### Checking device status
To quickly check the status of all the network interfaces:
```
$ nmcli device status
DEVICE  TYPE      STATE      CONNECTION        
enp0s3  ethernet  connected  Wired connection 1
enp0s8  ethernet  connected  ethernet-enp0s8    
enp0s9  ethernet  connected  Wired connection 3
lo      loopback  unmanaged  --  
```
#### Showing device details
To examine the details of a network interface, use the `show` action from the `device` section. If you do not provide a device name, the details of all devices are retrieved and displayed. You can scroll and page up and down to review them.
Take a look at `enp0s8`, the device your new connection is using. Verify that the IP address in use is the address that you previously requested:
```
$ nmcli device show enp0s8
GENERAL.DEVICE:                         enp0s8
GENERAL.TYPE:                           ethernet
GENERAL.HWADDR:                         08:00:27:81:16:20
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.CONNECTION:                     ethernet-enp0s8
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/6
WIRED-PROPERTIES.CARRIER:               on
IP4.ADDRESS[1]:                         192.168.4.26/24
IP4.GATEWAY:                            --
IP4.ROUTE[1]:                           dst = 192.168.4.0/24, nh = 0.0.0.0, mt = 103
IP6.ADDRESS[1]:                         fe80::6d70:90de:cb83:4491/64
IP6.GATEWAY:                            --
IP6.ROUTE[1]:                           dst = fe80::/64, nh = ::, mt = 103
IP6.ROUTE[2]:                           dst = ff00::/8, nh = ::, mt = 256, table=255
```
The response is quite detailed. Among other things, it shows:
* The **network interface name**, which in this case is `enp0s8`, which is assigned to it by [udev][15].
* The **network connection type**, which in this case is a physical Ethernet connection.
* The device's **[media access control][16] (MAC) address**, which identifies the device on the network.
* The [maximum transmission unit][17], which is the size of the largest protocol data unit that can be transmitted in a single transaction. Anything larger than this is split into several packets.
* This device is **currently connected**.
* The **name of the connection** using this device is `ethernet-enp0s8`.
* The **IP address of the connection** using this device. As requested, it is set to `192.168.4.26/24`.
The other information relates to the default routing and gateway settings that were applied to this connection, according to the network it is connected to.
#### nmcli's interactive editor
Although it is a command-line tool, nmcli includes an elementary interactive editor. The `edit` action will open the interactive editor on the connection you specify:
```
`$ nmcli connection edit ethernet-enp0s8`
```
It displays a small amount of help text, then the nmcli command prompt:
```
===| nmcli interactive connection editor |===
Editing existing '802-3-ethernet' connection: 'ethernet-enp0s8'
Type 'help' or '?' for available commands.
Type 'print' to show all the connection properties.
Type 'describe [&lt;setting&gt;.&lt;prop&gt;]' for detailed property description.
You may edit the following settings: connection, 802-3-ethernet (ethernet), 802-1x, dcb, sriov, ethtool, match, ipv4, ipv6, tc, proxy
nmcli&gt;
```
If you type `print` and hit **Enter**, nmcli will list all the properties associated with the connection. There are many properties. You can scroll up and down through the list:
```
===============================================================================
                 Connection profile details (ethernet-enp0s8)
===============================================================================
connection.id:                          ethernet-enp0s8
connection.uuid:                        09d26960-25a0-440f-8b20-c684d7adc2f5
connection.stable-id:                   --
connection.type:                        802-3-ethernet
connection.interface-name:              enp0s8
connection.autoconnect:                 yes
connection.autoconnect-priority:        0
connection.autoconnect-retries:         -1 (default)
connection.multi-connect:               0 (default)
connection.auth-retries:                -1
connection.timestamp:                   1593967212
connection.read-only:                   no
connection.permissions:                 --
connection.zone:                        --
connection.master:                      --
connection.slave-type:                  --
connection.autoconnect-slaves:          -1 (default)
connection.secondaries:                 --
```
Change your connection back to use DHCP. Type `goto ipv4` and hit **Enter**:
```
nmcli&gt; goto ipv4
You may edit the following properties: method, dns, dns-search, dns-options, dns-priority, addresses, gateway, routes, route-metric, route-table, routing-rules, ignore-auto-routes, ignore-auto-dns, dhcp-client-id, dhcp-iaid, dhcp-timeout, dhcp-send-hostname, dhcp-hostname, dhcp-fqdn, dhcp-hostname-flags, never-default, may-fail, dad-timeout
nmcli ipv4&gt;
```
The property you want to change is `method`. Type `set method auto` and hit **Enter**:
```
nmcli ipv4&gt; set method auto
Do you also want to clear 'ipv4.addresses'? [yes]:
```
If you want the connection to purge the static IP address, press **Enter**. To keep it, type `no` and hit **Enter**. You can keep it if you think you might use it again in the future. Even with a stored static IP address, if `method` is set to `auto`, it will use DHCP.
Type `save` to save your changes:
```
nmcli ipv4&gt; save
Connection 'ethernet-enp0s8' (09d26960-25a0-440f-8b20-c684d7adc2f5) successfully updated.
nmcli ipv4&gt;
```
Type `quit` to exit the nmcli interactive editor. If you don't want to quit, type `back` to go back to the main level, and carry on using the editor.
### There's much more to nmcli
Browse around the interactive editor and see just how many settings there are and how many properties each setting has. The interactive editor is a neat tool, but for nifty one-liners or to use nmcli in scripts, you'll need the regular command-line version.
Now that you have the basics in hand, check out the nmcli [man page][2] to see what else it can offer.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/nmcli
作者:[Dave McKay][a]
选题:[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/davemckay
[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://developer.gnome.org/NetworkManager/stable/nmcli.html
[3]: https://en.wikipedia.org/wiki/Application_programming_interface
[4]: https://man7.org/linux/man-pages/man8/ifconfig.8.html
[5]: https://en.wikipedia.org/wiki/Command-line_interface
[6]: https://en.wikipedia.org/wiki/Graphical_user_interface
[7]: https://en.wikipedia.org/wiki/Data_link_layer
[8]: https://en.wikipedia.org/wiki/IP_address
[9]: https://en.wikipedia.org/wiki/OSI_model
[10]: https://en.wikipedia.org/wiki/Ethernet
[11]: https://en.wikipedia.org/wiki/Universally_unique_identifier
[12]: https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol
[13]: https://en.wikipedia.org/wiki/Subnetwork
[14]: https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing
[15]: https://en.wikipedia.org/wiki/Udev
[16]: https://en.wikipedia.org/wiki/MAC_address
[17]: https://en.wikipedia.org/wiki/Maximum_transmission_unit

View File

@ -1,80 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Video Trimmer: A No-nonsense, Simple Video Trimming Application for Linux Desktop)
[#]: via: (https://itsfoss.com/video-trimmer/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
Video Trimmer: A No-nonsense, Simple Video Trimming Application for Linux Desktop
======
_**Brief: A dead simple tool to trim videos quickly without re-encoding it. Here, we take a look at what it offers.**_
You probably are already aware of some of the [best free video editors][1] for Linux but not everyone needs all the features offered.
Sometimes you just want to perform a single operation quickly, for instance — trimming a video.
Would you rather choose to explore a full-fledged video editor just to perform a simple trim operation or prefer a quick tool to help you trim the video?
Of course, it would depend on your personal preferences and what youd want to do with the video. But, for the majority of the users, a tool that makes it super easy to trim a video will be the preference.
Hence, Id like to highlight a dead simple open-source tool to trim videos quickly “[Video Trimmer][2]“.
![][3]
### Video Trimmer: A simple application to trim videos quickly
Video Trimmer is an open-source application that helps in trimming video clips without re-encoding them.
So, basically, youll be able to trim videos without losing the original quality.
All you have to do is just open the video file using Video Trimmer and then select the region to trim using the mouse.
You can manually set the time range to trim or just drag the region to trim using the mouse. Of course, it could take a while to manually set the timestamp if its a long video file and you dont know where to look at.
To give you an idea, take a look at the screenshot below to see the options available when using Video Trimmer:
![][4]
### Installing Video Trimmer on Linux
Video Trimmer is only available as a Flatpak package on [Flathub][5]. So, you should be able to install it on any Linux distribution with Flatpak support without any issues.
In case you didnt know about Flatpak, you might want to refer our guide on [using and installing Flatpak][6].
[Video Trimmer (Flathub)][5]
### Wrapping Up
Video Trimmer uses [ffmpeg][7] underneath it. What it does can be done easily [using ffmpeg commands][8] in the terminal. But then not everyone wants to use terminal for cutting part of a video. Tools like Video Trimmer help such people (like me).
For some reason, if you want to look for an alternative to this, you may try [VidCutter][9] as well. Of course, you can always rely on [top video editors available for Linux][10] (like [OpenShot][11]) to trim videos along with the ability to perform some advanced operations.
What do you think about using “**Video Trimmer**” on Linux? Do you already have another favorite video trimming tool? Let me know your thoughts in the comments below!
--------------------------------------------------------------------------------
via: https://itsfoss.com/video-trimmer/
作者:[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/open-source-video-editors/
[2]: https://gitlab.gnome.org/YaLTeR/video-trimmer
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/video-trimmer.jpg?ssl=1
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/video-trimmer-screenshot.jpg?ssl=1
[5]: https://flathub.org/apps/details/org.gnome.gitlab.YaLTeR.VideoTrimmer
[6]: https://itsfoss.com/flatpak-guide/
[7]: https://ffmpeg.org/
[8]: https://itsfoss.com/ffmpeg/
[9]: https://itsfoss.com/vidcutter-video-editor-linux/
[10]: https://itsfoss.com/best-video-editing-software-linux/
[11]: https://itsfoss.com/openshot-video-editor-release/

View File

@ -0,0 +1,190 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (6 ways to contribute to an open source alternative to Slack)
[#]: via: (https://opensource.com/article/20/7/mattermost)
[#]: author: (Jason Blais https://opensource.com/users/jasonblais)
6 ways to contribute to an open source alternative to Slack
======
Join thousands who have contributed code, translations, documentation,
and more to Mattermost, an open source messaging platform.
![Chat bubbles][1]
[Mattermost][2] is a messaging platform built in Go and React for DevOps teams. You can discuss topics in channels, private groups, or one-to-one with rich [Markdown][3] formatting and easily share code snippets with syntax highlighting in more than 50 programming languages. You can self-host or deploy on a private cloud to connect in-house systems with plugins, Slack-compatible integrations, and extensive API support. And you can collaborate with your team using the [Linux desktop application][4].
![Mattermost user interface on Linux Desktop App][5]
(Mattermost, [CC BY-SA 4.0][6])
The platform's open source nature offers three direct benefits over proprietary messaging platforms like Slack, Microsoft Teams, and Discord:
1. **No vendor lock-in:** With open source software, the code is available to everyone. Users, third-party vendors, and organizations have access to the code at all times, free of cost. Moreover, users get peace of mind with full control over their data, security, and infrastructure.
2. **Stronger security:** With a large community of developers, security flaws are detected, fixed, and communicated quickly to all users, often before a flaw ships in the product. As highlighted in Red Hat's report on [The State of Enterprise Open Source][7], high-quality software and better security are top benefits of enterprise open source software.
3. **Community-powered:** A growing community accelerates innovation by collaborating on problems, finding solutions, and creating new use cases, all leading to rapid feature development not possible with proprietary solutions. A thriving community is a force-multiplier for open source projects.
Mattermost is no different, and the community has been a major driving force behind the project. From the 100 most popular features to the 700,000-plus translations contributed to Mattermost, the open source community's impact on the project has been enormous. We've sent swag (such as a customized mug to all first-time contributors) to more than 1,000 contributors, and our [Contributor Wall of Fame][8] keeps growing every month.
If you are interested in contributing to open source, DevOps, or the Go and React technologies, consider joining the Mattermost community. We have [good first help-wanted issues][9] for new contributors, [contribution guidelines][10] to help get you started, and other resources at [developers.mattermost.com][11]. Moreover, you don't have to be a developer to contribute. You can help with translations, documentation, and more.
Interested in contributing to Mattermost? To make it easier to learn about all the ways to get involved with our community, we've gathered some information from our [Handbook][12], [Contribute page][13], [Security page][14], and more to help you get started.
### Platform
Build new features, improve existing ones, and fix bugs across the Mattermost platform. There are a variety of technologies and frameworks to choose from:
* **Server:** Written in Go, includes the API, data model, logging, and more
* **Webapp:** Written in React (JavaScript library), includes all components and actions of the Mattermost user interface 
* **Mobile apps:** Written in React Native (JavaScript library), includes all components and actions of the mobile apps on iOS and Android
* **Desktop apps:** Written on top of the Electron framework for Windows, macOS, and Linux clients
* **Redux:** Written in JavaScript and TypeScript, includes storage, web utilities, and logic for webapp and React Native mobile clients
Contribute in four steps:
1. Sign up to our Mattermost community site and join the Contributors channel for questions.
2. Set up your developer environment by following our instructions. If you're working on mobile apps, you'll also need a mobile dev environment.
3. Choose a [help-wanted ticket][15] and comment to let people know you're working on it. If there's no ticket for what you want to work on, follow the contributions without tickets process.
4. Start developing! Check out our [developer flow][16] for tips, and review our [checklist for pull requests][17] when your changes are ready. If it's your first contribution, there is a standard contributor license agreement ([CLA][18]) to sign.
### Integrations
Create a host of technologies to empower Mattermost to solve real-world problems. These include:
* **Self-hosted integration solutions:** Include connectivity and integration with third-party applications such as Jira, Jitsi, GitLab, Jenkins, and other tools
* **SaaS-based integration solutions:** Include connectivity and integration with services like Twitter, Zendesk, Salesforce, and hundreds of other extensions with services like Zapier
* **Federated experiences:** Include bridges with IRC, Slack, and other messaging applications through solutions like [Matterbridge][19]
* **Programming solutions:** Include language-specific drivers and connectors to simplify the work of other developers
* **Mattermost user-experience plugins:** Include server- and client-side plugins that enhance the native capabilities of a Mattermost server, such as voice, video, and screen sharing
* **Custom user experiences:** Include integrations into Terminal like [Matterhorn][20] and [Pidgin][21] built off the same core [Mattermost APIs][22]
Contribute in four steps:
1. Sign up to our Mattermost community site and join the [Developer Toolkit channel][23] for questions.
2. Visit the Mattermost Integrations Directory for a current list of open source integrations and projects to get ideas on how to get started.
3. Start developing! Read our [integrations guide][24] for tips on how to integrate with the Mattermost server.
4. Have you built something for Mattermost? We want to hear about it! [Let us know here][25].
### Localization
Today, Mattermost ships in 16 languages, and 26 other languages are in progress by hundreds of contributors. If you're interested in translating, here's how to get involved:
1. Sign up to our Mattermost community site and join the Localization channel for questions.
2. Sign up to our translations server.
3. Choose your language. If the language is already listed in the translations server, you can offer help by translating, reviewing, or making suggestions to existing strings. If it's not listed, ask in the Localization channel to set up your language.
4. Start translating! Read our Localization documentation for more information on the translation rules and maintenance process.
### Documentation
Write software and troubleshooting documentation used by thousands of people across the world. These include:
* **[Product documentation][26]:** Includes feature documentation for users and administrators, including troubleshooting notes and frequently asked questions
* **[Developer documentation][11]:** Includes documentation for contributor and developer workflows, integrations, and extensions
* **[API documentation][22]:** Includes documentation of the RESTful API used by the Mattermost platform
Contribute in three steps:
1. Sign up to our Mattermost community site and join the [Documentation channel][27] for questions.
2. Choose a [ticket][15] and comment to let people know you're working on it. See the [process][28] for contributing.
3. Review our [documentation guidelines][29] for tips on how to create effective docs. Note that if it is your first pull request, you will be asked to sign a standard [CLA][18].
### Peer-to-peer support and feedback
Not a developer but still want to contribute to open source? No problem! In addition to localization and documentation mentioned above, you can:
* **Report bugs:** Sign up to our Mattermost community site and join the [Bugs channel][30] for questions. Then, go to our [GitHub page][2] and open a new issue in the relevant repository. Read our docs on [steps for filing bugs][31].
* **Test and find issues:** Go to our [community test server][32] or any of Mattermost's open source codebases to test and find issues. If you find a bug, go to our GitHub page and open a new issue in the relevant repository. Read our docs on [steps for filing bugs][31].
* **Troubleshoot issues:** Sign up to our Mattermost community site and join the [Peer-to-Peer Help channel][33] to help answer questions. Follow questions in Mattermost [Forums][34] and GitHub Issues to help others.
* **Suggest new features:** Sign up to our Mattermost community site and join the [Feature Proposals channel][35] to ask questions. Then, go to [Uservoice][36] to propose new features. Read our docs on [contributing feature proposals][37].
* **Share feedback:** Sign up to our Mattermost community site and join the Peer-to-Peer Help channel to ask questions and share feedback about Mattermost.
### Security vulnerabilities
Safety and data security are top priorities for the Mattermost community. If you are a security researcher and discover a security vulnerability in our codebase, we appreciate your help in disclosing it to us in a responsible manner.
If the security bug you found is valid, the fix will be posted on our [Security Updates][38] page 30 days after its release, and you will be added to our [Security Research Hall of Fame][14]. If you'd like, we will publicly acknowledge your responsible disclosure. If not, you can remain anonymous.
Here's how to contribute through our [responsible disclosure policy][14]:
1. Contact us to report any security vulnerabilities found in any of Mattermost's open source codebases or any of our commercial offerings.
2. We will let you know if your report is reproducible as an exploit and results in a change to a Mattermost product's codebase or documentation.
After a fix is made, we ask security researchers to wait 30 days after a release before announcing the specific details of a vulnerability and to provide Mattermost with a link to any such announcements.
### Getting help
If you have any questions or need help getting started, join our [Mattermost Contributors channel][39]. You can reach me at @jason.blais. See you there!
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/mattermost
作者:[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/talk_chat_communication_team.png?itok=CYfZ_gE7 (Chat bubbles)
[2]: https://github.com/mattermost
[3]: https://opensource.com/downloads/cheat-sheet-markdown
[4]: https://mattermost.com/download/#mattermostApps
[5]: https://opensource.com/sites/default/files/uploads/mattermostui.png (Mattermost user interface on Linux Desktop App)
[6]: https://creativecommons.org/licenses/by-sa/4.0/
[7]: https://www.redhat.com/en/enterprise-open-source-report/2020
[8]: https://developers.mattermost.com/contribute/team_contributions/
[9]: https://github.com/mattermost/mattermost-server/issues?q=label%3A%22Help+Wanted%22+label%3A%22Good+First+Issue%22+label%3A%22Up+For+Grabs%22+is%3Aopen+is%3Aissue+
[10]: https://developers.mattermost.com/contribute/getting-started/
[11]: https://developers.mattermost.com/
[12]: https://handbook.mattermost.com/contributors/contributors/community
[13]: https://mattermost.com/contribute/
[14]: https://mattermost.com/security-vulnerability-report/
[15]: https://github.com/mattermost/mattermost-server/issues?q=is%3Aissue+is%3Aopen+label%3A%22Up+For+Grabs%22
[16]: https://developers.mattermost.com/contribute/server/developer-workflow/
[17]: https://developers.mattermost.com/contribute/getting-started/contribution-checklist/
[18]: https://www.mattermost.org/mattermost-contributor-agreement/
[19]: https://github.com/42wim/matterbridge
[20]: https://github.com/matterhorn-chat/matterhorn
[21]: https://github.com/EionRobb/purple-mattermost/
[22]: https://api.mattermost.com/
[23]: https://community.mattermost.com/core/channels/developer-toolkit
[24]: https://developers.mattermost.com/integrate/getting-started/
[25]: https://www.mattermost.org/share-your-mattermost-projects/
[26]: http://docs.mattermost.com/
[27]: https://community.mattermost.com/core/channels/documentation
[28]: https://github.com/mattermost/docs#contributing
[29]: https://handbook.mattermost.com/operations/operations/publishing/publishing-guidelines/voice-tone-and-writing-style-guidelines
[30]: https://community.mattermost.com/core/channels/bugs
[31]: https://www.mattermost.org/filing-issues/
[32]: https://rc.test.mattermost.com/
[33]: https://community.mattermost.com/core/channels/peer-to-peer-help
[34]: https://forum.mattermost.org/
[35]: https://community.mattermost.com/core/channels/feature-ideas
[36]: https://mattermost.uservoice.com/forums/306457-general
[37]: https://www.mattermost.org/feature-ideas/
[38]: https://mattermost.com/security-updates/
[39]: https://community-release.mattermost.com/core/channels/tickets

View File

@ -0,0 +1,182 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (SCP users migration guide to rsync)
[#]: via: (https://fedoramagazine.org/scp-users-migration-guide-to-rsync/)
[#]: author: (chasinglogic https://fedoramagazine.org/author/chasinglogic/)
SCP users migration guide to rsync
======
![][1]
As part of the [8.0 pre-release announcement,][2] the OpenSSH project stated that they consider the scp protocol outdated, inflexible, and not readily fixed. They then go on to recommend the use of sftp or rsync for file transfer instead.
Many users grew up on the _scp_ command, however, and so are not familiar with rsync. Additionally, rsync can do much more than just copy files, which can give a beginner the impression that its complicated and opaque. Especially when broadly the scp flags map directly to the cp flags while the rsync flags do not.
This article will provide an introduction and transition guide for anyone familiar with scp. Lets jump into the most common scenarios: Copying Files and Copying Directories.
### Copying files
For copying a single file, the scp and rsync commands are effectively equivalent. Lets say you need to ship _foo.txt_ to your home directory on a server named _server._
```
$ scp foo.txt me@server:/home/me/
```
The equivalent rsync command requires only that you type rsync instead of scp:
```
$ rsync foo.txt me@server:/home/me/
```
### Copying directories
For copying directories, things do diverge quite a bit and probably explains why rsync is seen as more complex than scp. If you want to copy the directory _bar_ to _server_ the corresponding scp command looks exactly like the cp command except for specifying ssh information:
```
$ scp -r bar/ me@server:/home/me/
```
With rsync, there are more considerations, as its a more powerful tool. First, lets look at the simplest form:
```
$ rsync -r bar/ me@server:/home/me/
```
Looks simple right? For the simple case of a directory that contains only directories and regular files, this will work. However, rsync cares a lot about sending files exactly as they are on the host system. Lets create a slightly more complex, but not uncommon, example.
```
# Create a multi-level directory structure
$ mkdir -p bar/baz
# Create a file at the root directory
$ touch bar/foo.txt
# Now create a symlink which points back up to this file
$ cd bar/baz
$ ln -s ../foo.txt link.txt
# Return to our original location
$ cd -
```
We now have a directory tree that looks like the following:
```
bar
├── baz
│ └── link.txt -> ../foo.txt
└── foo.txt
1 directory, 2 files
```
If we try the commands from above to copy bar, well notice very different (and surprising) results. First, lets give scp a go:
```
$ scp -r bar/ me@server:/home/me/
```
If you ssh into your server and look at the directory tree of bar youll notice an important and subtle difference from your host system:
```
bar
├── baz
│ └── link.txt
└── foo.txt
1 directory, 2 files
```
Note that _link.txt_ is no longer a symlink. It is now a full-blown copy of _foo.txt_. This might be surprising behavior if youre used to _cp_. If you did try to copy the _bar_ directory using _cp -r_, you would get a new directory with the exact symlinks that _bar_ had. Now if we try the same rsync command from before well get a warning:
```
$ rsync -r bar/ me@server:/home/me/
skipping non-regular file "bar/baz/link.txt"
```
Rsync has warned us that it found a non-regular file and is skipping it. Because you didnt tell it to copy symlinks, its ignoring them. Rsync has an extensive manual section titled “SYMBOLIC LINKS” that explains all of the possible behavior options available to you. For our example, we need to add the links flag.
```
$ rsync -r --links bar/ me@server:/home/me/
```
On the remote server we see that the symlink was copied over as a symlink. Note that this is different from how scp copied the symlink.
```
bar/
├── baz
│ └── link.txt -> ../foo.txt
└── foo.txt
1 directory, 2 files
```
To save some typing and take advantage of more file-preserving options, use the archive (-a for short) flag whenever copying a directory. The archive flag will do what most people expect as it enables recursive copy, symlink copy, and many other options.
```
$ rsync -a bar/ me@server:/home/me/
```
The rsync man page has in-depth explanations of what the archive flag enables if youre curious.
### Caveats
There is one caveat, however, to using rsync. Its much easier to specify a non-standard ssh port with scp than with rsync. If _server_ was using port 8022 SSH connections, for instance, then those commands would look like this:
```
$ scp -P 8022 foo.txt me@server:/home/me/
```
With rsync, you have to specify the “remote shell” command to use. This defaults to _ssh_. You do so using the **-e flag.
```
$ rsync -e 'ssh -p 8022' foo.txt me@server:/home/me/
```
Rsync does use your ssh config; however, so if you are connecting to this server frequently, you can add the following snippet to your _~/.ssh/config_ file. Then you no longer need to specify the port for the rsync or ssh commands!
```
Host server
Port 8022
```
Alternatively, if every server you connect to runs on the same non-standard port, you can configure the _RSYNC_RSH_ environment variable.
### Why else should you switch to rsync?
Now that weve covered the everyday use cases and caveats for switching from scp to rsync, lets take some time to explore why you probably want to use rsync on its own merits. Many people have made the switch to rsync long before now on these merits alone.
#### In-flight compression
If you have a slow or otherwise limited network connection between you and your server, rsync can spend more CPU cycles to save network bandwidth. It does this by compressing data before sending it. Compression can be enabled with the -z flag.
#### Delta transfers
Rsync also only copies a file if the target file is different than the source file. This works recursively through directories. For instance, if you took our final bar example above and re-ran that rsync command multiple times, it would do no work after the initial transfer. Using rsync even for local copies is worth it if you know you will repeat them, such as backing up to a USB drive, for this feature alone as it can save a lot of time with large data sets.
#### Syncing
As the name implies, rsync can do more than just copy data. So far, weve only demonstrated how to copy files with rsync. If you instead want rsync to make the target directory look like your source directory, you can add the delete flag to rsync. The delete flag makes it so rsync will copy files from the source directory which dont exist on the target directory. Then it will remove files on the target directory which do not exist in the source directory. The result is the target directory is identical to the source directory. By contrast, scp will only ever add files to the target directory.
### Conclusion
For simple use cases, rsync is not significantly more complicated than the venerable scp tool. The only significant difference being the use of -a instead of -r for recursive copying of directories. However, as we saw rsyncs -a flag behaves more like cps -r flag than scps -r flag does.
Hopefully, with these new commands, you can speed up your file transfer workflow!
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/scp-users-migration-guide-to-rsync/
作者:[chasinglogic][a]
选题:[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/chasinglogic/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2020/07/scp-rsync-816x345.png
[2]: https://lists.mindrot.org/pipermail/openssh-unix-dev/2019-March/037672.html

View File

@ -0,0 +1,391 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Tiny Yet Useful: 13 Raspberry Pi Zero Alternatives That Cost Less Than $20)
[#]: via: (https://itsfoss.com/raspberry-pi-zero-alternatives/)
[#]: author: (Chinmay https://itsfoss.com/author/chinmay/)
Tiny Yet Useful: 13 Raspberry Pi Zero Alternatives That Cost Less Than $20
======
The [Raspberry Pi Zero][1] and the [Raspberry Pi Zero W][2] were added to the line up of Raspberry Pis in the last few years. These ultra-small form-factor SBCs have been a big hit and continue to be a part of [Raspberry Pi projects][3] from the maker and DIY communities.
Due to the smaller form factor and the prices these boards are targeting, they have had to cut down on many features like a dedicated Ethernet port, slower processor (compared to their full-fledged cousins).
In an earlier article, we listed the [best alternatives to Raspberry Pi][4]. In this one, Ill list some alternatives to Raspberry Pi Zero and Zero W.
Preview | Product | Price |
---|---|---|---
![CanaKit Raspberry Pi Zero W \(Wireless\) Complete Starter Kit - 16 GB Edition][5] ![CanaKit Raspberry Pi Zero W \(Wireless\) Complete Starter Kit - 16 GB Edition][5] | [CanaKit Raspberry Pi Zero W (Wireless) Complete Starter Kit - 16 GB Edition][6] | $34.99[][7] | [Buy on Amazon][8]
### Alternative to Raspberry Pi Zero: Tiny single board computers for IoT and Embedded Projects
![][9]
We have great alternatives with variety of feature sets for different projects, thanks to open source designs and open source software stacks. All the boards in this round up run embedded Linux in various flavors.
Even though the Raspberry Pi Zero was released at $5 and the Zero W at $10, its often very hard to find them at those prices even in US. Outside US they usually cost around $12 $20 .
Keeping that in mind lets take a look at some of the alternatives for the Raspberry Pi Zero boards for under $20.
#### 1\. Banana Pi BPI M2 Zero
![][10]
The Banana Pi M2 Zero at **$18** is has the same layout as a Raspberry Pi Zero W. It looks like a clone of the Pi Zero W but other than the form factor it is anything but a clone. It has a faster Allwinner H2+ SOC at its heart and Ethernet can be added externally . It can also run a variety of Linux based operating systems.
**Key Specifications**
* Allwinner H2+ Quad-core Cortex-A7 H265/HEVC 1080P with Mali400MP2 for the GPU
* 512M DDR3(shared with GPU)
* 40 Pins Header,compatible with Raspberry Pi 3
* WiFi (AP6212) &amp; Bluetooth onboard. Extra antenna connector
* A CSI input connector Camera
* Power and Reset Button
* Mini HDMI Output
You can get more information from the [Banana Pi Wiki][11] and pick one up from [here][12].
#### 2\. Banana Pi BPI-M2 Magic (BPi-M2M)
![][13]
There are two variants of this board the one without the eMMC flash onboard costs **$20**. It is another tiny SBC with quite a lot of processing power for its size. Off the top of my head this board is a good fit for a touch control panel and dashboard for IoT and home automation. The on-board battery management system is quite attractive.
**Key Specifications**
* Allwinner A33/R16 Quad Core ARM Cortex-A7, MALI 400 MP2 GPU
* WiFi 802.11 b/g/n 2.4GHz (AP6212) &amp; BT v4.0 with BLE
* 512MB DDR3 (shared with GPU)
* MIPI Display Serial Interface (DSI) interface(4 data lanes)
* A CSI input connector Camera, video capture up-to 1080p at 30fps
* Onboard microphone and battery management
* No HDMI output
You can get more information from the [Banana Pi Wiki][14] and pick one up from [here][15].
#### 3\. Banana Pi BPI-P2 Maker
![][16]
This board at **$13** (**$19** with POE module) is one of the smallest SBCs with on board Ethernet and support for POE(power over ethernet). With the same Allwinner H2+ SOC as the M2 zero, this is quite an interesting board.It has an onboard eMMC storage of 8Gb and a camera interface, with POE you can convert this into a DIY security camera and also use the powerful processor for basic ML.
**Key Specifications**
* CPU: Allwinner H2+, Quad-core Cortex-A7
* 512MB DDR 3 SDRAM.
* WiFi (AP6212) &amp; Bluetooth onboard.
* 8G eMMC flash onboard
* 100M LAN
* Mini HDMI
* CSI Camera Interface
* IEEE 802.3af PoE standard PoE module support
You can get more information from the [Banana Pi Wiki][17] and pick one up from [here][18].
#### 4\. Orange Pi Zero LTS
![][19]
At **$11.49** (**$9.49** for the 256 MB version) this is the cheapest and the smallest board with onboard Ethernet and POE functionality. It has the ever common Alwinner H2+ at its heart and a solid expansion options via the GPIO and the 13 pin functional header.
**Key Specifications**
* Allwinner H2+ Quad-core Cortex-A7 H.265/HEVC 1080P
* Mali400MP2 GPU @600MHz
* 256MB/512MB DDR3 SDRAM(Share with GPU)(256MB version is Standard version)
* 10/100M Ethernet RJ45 POE is default off
* WiFi with XR819, IEEE 802.11 b/g/n
* 26 Pin GPIO Header
* 13 Pins Header, with 2x USB, IR pin, AUDIO(MIC, AV)
You can get more information from their [official page][20] and pick one up from Amazon.
Preview | Product | Price |
---|---|---|---
![Orange Pi Zero Single Board Computer Quad Core Open-Source Development Board 512MB with WiFi Antenna][21] ![Orange Pi Zero Single Board Computer Quad Core Open-Source Development Board 512MB with WiFi Antenna][21] | [Orange Pi Zero Single Board Computer Quad Core Open-Source Development Board 512MB with WiFi Antenna][22] | $11.99 | [Buy on Amazon][23]
#### 5\. Orange Pi i96
![][24]
At **$8.8** this board is smallest one yet at 6cm x 3cm. It uses the [RDA8810PL SOC][25] meant for a fairly advanced feature phone. The board is suited for camera applications(according to the manufacturer) can capture upto 1080p at 30fps. It has a fairy good IO for the price.
**Key Specifications**
* RDA8810PL ARM Cortex-A5 32bit single core processor
* Vivantes GC860 GPU
* Integrated 256MB LPDDR2 SDRAM
* WiFi + BT using the RDA5991
* CSI Camera Input
* 40 pin GPIO header
You can get more information from their [official page][26] and pick one up from [here][27].
#### 6\. Orange Pi PC
![][28]
This board packs in a lot of goodies for **$15**. Its one of the very few boards which offer 1GB of RAM at such a price point. It uses the Allwinner H3 SOC and can decode 4K HEVC/H.265 video. It has an HDMI port with support for HDCP , CEC as well. This SBC can make a good media box with the right software. It even has onboard IR Receiver and a Microphone.
**Key Specifications**
* Allwinner H3 Quad-core Cortex-A7 , 1.6GHz
* 1GB DDR3 (shared with GPU)
* HDMI with support for 4K video
* CSI Camera interface and onboard microphone
* SD Card slot
* IR Receiver
* 3.5mm Audio Jack
* Ethernet
* No WiFi/Bluetooth onboard
There is also a cut down version of the Orange Pi PC powered by the same SOC but with less RAM.
You can get more information from their [official page][29] and pick one up from [here][30].
#### 7\. Orange Pi One &amp; Orange Pi Lite
These two boards are also powered by the Alwinner H3 SoC used in the Orange Pi PC. But these come with 512MB of RAM instead of the 1GB offered by the Orange Pi PC.
**Key Specifications**
* Allwinner H3 Quad Core
* HDMI with 4K support
* SD Card slot
* 512 MB of DDR3 RAM
* CSI Camera Interface
![Orange Pi Lite][31]
![Orange Pi One][32]
The Orange Pi Lite comes in at **$12**, it does not feature an on-board Ethernet and offers WiFi instead. It also has onboard microphone and IR receiver. You can get more info from their [official page][33] and buy one from [here][34].
The Orange Pi One on comes in at **$11** and features on-board Ethernet for wired networking and does not offer any WiFi support. You can get more info from their [official page][35] and buy one from [here][36].
Before we finish up with the Orange Pi boards, I do want to quickly mention a couple more boards they offer for custom applications.
* Orange Pi R1 This is a tiny board with dual Ethernet ports, you can use it to build a network device.
* Orange Pi 2G IOT &amp; Orange Pi 3G IOT- These boards feature 2G &amp; 3G cellular connectivity for IoT Applications.
These boards also cost less than **$20** and you can check them out on their [official website][37].
#### 8\. NanoPi Neo LTS
![][38]
Starting at **$9**.**99**, this board is very simple and tiny(4cm x 4cm), a similar form factor as the Orange Pi Zero. Unlike the Orange Pi Zero it is powered by the more powerful Allwinner H3 SoC and upto 512MB of RAM. It does not feature any onboard WiFi/BT chipset but you can add one via the USB port. This is a really good board to run headless Linux servers, DNS filters like Pi-Hole and itll make a really good edge device for any IoT Applications. Using the GPIO you can expand the functionality to match your needs.
**Key Specifications**
* Allwinner H3 Quad Core Cortex A7 upto 1.2GHz
* Upto 512 MB of RAM
* Micro SD slot (upto 128GB)
* 10/100 Ethernet
* Additional interfaces via the abundant GPIO
You can get more information and also purchase them from their [official page][39] .
![][40]
There is a bare bones version of the NanoPi NEO called the NanoPi NEO Core LTS which adds eMMC for industrial applications and lets go of the onboard USB and Ethernet ports. All features are available via the GPIO expansion. You can check it out [here][41] .
![][42]
There is also a WiFi/BT version of the NanoPi NEO called the NanoPi NEO Air which also adds eMMC and camera input and lets go of the onboard USB and Ethernet ports. You can check it out [here][43].
#### 9\. Zero Pi
![][44]
This is one of my favorite boards from this round up, it costs **$9.99** and has a fast 1Gbps Ethernet onboard. With the Allwinner H3 at its heart, this can be a very powerful and tiny machine on your network. It supports OpenWRT which is great considering the 1Gbps Ethernet. You can easily run multiple instances of Pi-Hole along with a DNS Server.
**Key Specifications**
* Allwinner H3 Quad Core Cortex A7 at upto 1.2GHz
* 512MB of RAM
* USB 2.0 Port
* Support for OpenWRT
You can get more information and also purchase them from their [official page][45] .
#### 10\. NanoPi NEO 2
![][46]
At **$19.99** , the NanoPi NEO 2 costs twice the NEO. It retains the same form factor and brings in the Allwinner H5 SoC and 1Gbps Ethernet. This makes the board a tiny power house.
**Key Specifications**
* Allwinner H5, Quad-core 64-bit high-performance Cortex A53
* Hexacore Mali450 GPU
* 512MB RAM
* 1Gbps onboard Ethernet
* 24 pin GPIO
* Functional headers for Audio and other interfaces like IR
You can get more information and also purchase them from their [official page][47] .
Thats about all the boards in the NanoPi series, they also have a few more interesting boards with dual 1Gbps ports and a couple focused around camera.
#### 11\. La Frite
![][48]
From the makers of the [Le Potato][49] , this board at **$20** is mainly geared towards applications involving media consumption or media streaming. It supports 1080p video playback with HDR metadata via the HDMI 2.0 port. It supports the latest Android 9/TV, upstream Linux, u-boot, Kodi, and more.
**Key Specifications**
* Amlogic S805X SoC, Quad Core Cortex-A53 @ 1.2GHz
* Upto 1GB DDR4 SDRAM
* Amlogic Video Engine 10, support for H.264,H.265 and VP9 decoding upto 1080p 60fps
* 100Mbps Ethernet
* IR Receiver
* 40 pin GPIO
You can get more information from their [official page][50] .
#### 12\. Onion Omega2+
![][51]
If youre looking for an IoT application the [Onion Omega][52] 2+ can be a good alternative to the Raspberry Pi Zero. It is an IoT centric development platfrom and runs on LEDE (Linux Embedded Development Environment) Linux OS a distribution based on [OpenWRT][53].
**Key Specifications**
* MT7688 SoC
* 2.4 GHz IEEE 802.11 b/g/n WiFi
* 128 MB DDR2 RAM
* 32 MB on-board flash storage
* MicroSD slot
* USB 2.0
* 12 GPIO pins
You can pick one up as bare bones module for **$13** or various kits from their [website][54].
#### 13\. VoCore2
![][55]
The VoCore2 is definitely the smallest of the bunch, the bare-bones module is only 1″x1″ in size and costs **$17.99**. The tiny size makes it easy to embed in different applications and allows selective expansion of features based on the need. It is powered by the MediaTek MT7628 which was specially designed for low to mid-range routers. The manufacturer claims that theyll keep up the production till 2025 which is really good.
**Key Specifications**
* MediaTek MT7628, 580 MHz, MIPS 24K
* 128MB RAM, DDR2 166MHz
* Ethernet 1 port/5 ports, up to 100Mbps
* Wireless 802.11n, 2T2R, speed up to 300Mbps
* Storage 16M NOR on board, support SDXC up to 2TB
* One on board U.FL slot (Antenna Connector)
You can get more information about the board from [here][56] and pick one up from their [official website][57].
**W**r**apping up**
Its undeniable that there are all kinds of SBCs available in various form factors and feature sets for a wide variety of use cases. On top of that most of these are open source designs and run on open source software. An absolute wonderland for a hardcore tinkerer.
With COVID-19 hanging around it might be a little tough to get your hands on these boards. Lets hope things get better soon!
If you guys know of any other interesting alternatives for the Raspberry Pi Zero and Zero W put them in the comments below and well check them out.
--------------------------------------------------------------------------------
via: https://itsfoss.com/raspberry-pi-zero-alternatives/
作者:[Chinmay][a]
选题:[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/chinmay/
[b]: https://github.com/lujun9972
[1]: https://www.raspberrypi.org/products/raspberry-pi-zero/
[2]: https://itsfoss.com/raspberry-pi-zero-w/
[3]: https://itsfoss.com/raspberry-pi-projects/
[4]: https://itsfoss.com/raspberry-pi-alternatives/
[5]: https://i1.wp.com/m.media-amazon.com/images/I/517BwcAPmTL._SL160_.jpg?ssl=1
[6]: https://www.amazon.com/dp/B072N3X39J?tag=chmod7mediate-20&linkCode=ogi&th=1&psc=1 (CanaKit Raspberry Pi Zero W (Wireless) Complete Starter Kit - 16 GB Edition)
[7]: https://www.amazon.com/gp/prime/?tag=chmod7mediate-20 (Amazon Prime)
[8]: https://www.amazon.com/dp/B072N3X39J?tag=chmod7mediate-20&linkCode=ogi&th=1&psc=1 (Buy on Amazon)
[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/raspberry-pi-zero-alterantives.png?ssl=1
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/banana-pi-zero-1.png?ssl=1
[11]: http://wiki.banana-pi.org/Banana_Pi_BPI-M2_ZERO#Hardware_interfaces
[12]: https://www.aliexpress.com/item/32839074880.html?spm=2114.12010612.8148356.2.258c72dbKctWv3
[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/Banana-Pi-M2M-2-1.jpg?ssl=1
[14]: http://wiki.banana-pi.org/Banana_Pi_BPI-M2M
[15]: https://www.aliexpress.com/item/32836172813.html?spm=2114.12010612.8148356.2.25ac76c2BKPl43
[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/Banana-Pi-P2-Zero-1.png?ssl=1
[17]: http://wiki.banana-pi.org/Banana_Pi_BPI-P2_Zero
[18]: https://www.aliexpress.com/item/32953609399.html?spm=2114.12010612.8148356.6.6d4070a9ktu2qs
[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/Orange-Pi-Zero-LTS.png?ssl=1
[20]: http://www.orangepi.org/orangepizerolts/
[21]: https://i0.wp.com/m.media-amazon.com/images/I/51wOvNrzHkL._SL160_.jpg?ssl=1
[22]: https://www.amazon.com/dp/B07ZYJGPF8?tag=chmod7mediate-20&linkCode=ogi&th=1&psc=1 (Orange Pi Zero Single Board Computer Quad Core Open-Source Development Board 512MB with WiFi Antenna)
[23]: https://www.amazon.com/dp/B07ZYJGPF8?tag=chmod7mediate-20&linkCode=ogi&th=1&psc=1 (Buy on Amazon)
[24]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/Orange-Pi-i96.png?ssl=1
[25]: https://www.openhacks.com/uploadsproductos/2016030304473558.pdf
[26]: http://www.orangepi.org/OrangePii96/
[27]: https://www.aliexpress.com/item/32819068354.html?spm=2114.12010612.8148356.2.7cb16aa1JdhlzK
[28]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/opipc.png?ssl=1
[29]: http://www.orangepi.org/orangepipc/
[30]: https://www.aliexpress.com/item/32448079125.html
[31]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/Orange-Pi-Lite.png?ssl=1
[32]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/Orange-Pi-One.png?ssl=1
[33]: http://www.orangepi.org/orangepilite/
[34]: https://www.aliexpress.com/item/32662738571.html?spm=2114.12010612.8148356.16.222f4f44KYIA5v
[35]: http://www.orangepi.org/orangepione/
[36]: https://www.aliexpress.com/item/32603308880.html?spm=a2g0o.detail.1000060.1.4fb86a5eWkGEex&gps-id=pcDetailBottomMoreThisSeller&scm=1007.13339.146401.0&scm_id=1007.13339.146401.0&scm-url=1007.13339.146401.0&pvid=9042001e-bc4a-471b-a3a0-9f0d276d0c3f&_t=gps-id:pcDetailBottomMoreThisSeller,scm-url:1007.13339.146401.0,pvid:9042001e-bc4a-471b-a3a0-9f0d276d0c3f,tpp_buckets:668%230%23131923%2358_668%23808%237756%23236_668%23888%233325%232_668%232846%238111%23464_668%232717%237564%23664_
[37]: http://www.orangepi.org
[38]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/NanoPi-NEO_04-900x630-1.jpg?ssl=1
[39]: https://www.friendlyarm.com/index.php?route=product/product&path=69&product_id=132&sort=p.price&order=ASC
[40]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/Core_04-900x630-1.jpg?ssl=1
[41]: https://www.friendlyarm.com/index.php?route=product/product&path=69&product_id=212&sort=p.price&order=ASC
[42]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/air_03-900x630-1.jpg?ssl=1
[43]: https://www.friendlyarm.com/index.php?route=product/product&path=69&product_id=151&sort=p.price&order=ASC
[44]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/ZeroPi_03-900x630-1.jpg?ssl=1
[45]: https://www.friendlyarm.com/index.php?route=product/product&path=69&product_id=266&sort=p.price&order=ASC
[46]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/NEO2_04-900x630-1.jpg?ssl=1
[47]: https://www.friendlyarm.com/index.php?route=product/product&product_id=180
[48]: https://i0.wp.com/cdn.shopify.com/s/files/1/1098/4826/products/84988b14aa58054c0a4cbf8c03466fa9_original_1024x1024.jpg?resize=544%2C306&ssl=1
[49]: https://libre.computer/products/boards/aml-s905x-cc/
[50]: https://libre.computer/products/boards/aml-s805x-ac/
[51]: https://i0.wp.com/onion.io/wp-content/uploads/2019/08/OM-O2P.jpg?resize=424%2C424&ssl=1
[52]: https://itsfoss.com/onion-omega-2/
[53]: https://openwrt.org/
[54]: https://onion.io/
[55]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/VoCore2.png?resize=719%2C319&ssl=1
[56]: https://vocore.io/v2.html
[57]: https://vocore.io/

View File

@ -0,0 +1,150 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Automate testing for website errors with this Python tool)
[#]: via: (https://opensource.com/article/20/7/seodeploy)
[#]: author: (JR Oakes https://opensource.com/users/jroakes)
Automate testing for website errors with this Python tool
======
SEODeploy helps identify SEO problems in a website before they're
deployed.
![Computer screen with files or windows open][1]
As a technical search-engine optimizer, I'm often called in to coordinate website migrations, new site launches, analytics implementations, and other areas that affect sites' online visibility and measurement to limit risk. Many companies generate a substantial portion of monthly recurring revenue from users finding their products and services through search engines. Although search engines have gotten good at handling poorly formatted code, things can still go wrong in development that adversely affects how search engines index and display pages for users.
I've been part of manual processes attempting to mitigate this risk by reviewing staged changes for search engine optimization (SEO)-breaking problems. My team's findings determine whether the project gets the green light (or not) to launch. But this process is often inefficient, can be applied to only a limited number of pages, and has a high likelihood of human error.
The industry has long sought a usable and trustworthy way to automate this process while still giving developers and search-engine optimizers a meaningful say in what must be tested. This is important because these groups often have competing priorities in development sprints, with search-engine optimizers pushing for changes and developers needing to control regressions and unexpected experiences.
### Common SEO-breaking problems
Many websites I work with have tens of thousands of pages. Some have millions. It's daunting to understand how a development change might affect so many pages. In the world of SEO, you can see large, sitewide changes in how Google and other search engines show your pages from very minor and seemingly innocuous changes. It's imperative to have processes in place that catch these types of errors before they make it to production.
Below are a few examples of problems that I have seen in the last year.
#### Accidental noindex
A proprietary third-party SEO monitoring tool we use, [ContentKing][2], found this problem immediately after launch to production. This is a sneaky error because it's not visible in the HTML, rather it is hidden from view in the server response header, yet it can very quickly cause the loss of your search visibility.
```
HTTP/1.1 200 OK
Date: Tue May 25 2010 21:12:42 GMT
[...]
X-Robots-Tag: noindex
[...]
```
#### Canonical lower-casing
A change to production mistakenly lower-cased an entire website's [canonical link elements][3]. The change affected nearly 30,000 URLs. Before the update, the URLs were in title case (for instance, `/URL-Path/`). This is a problem because the canonical link element is a hint for Google about a webpage's true canonical URL version. This change caused many URLs to be removed from Google's index and re-indexed at the new uncased location (`/url-path/`). The impact was a loss of 1015% of traffic and corruption of page metric data over the next few weeks.
#### Origin server regression
One website with a complex and novel implementation of React had a mysterious issue with regression of `origin.domain.com` URLs displaying for its origin content-delivery network server. It would intermittently output the origin host instead of the edge host in the site metadata (such as the canonical link element, URLs, and Open Graph links). The problem was found in the raw HTML and the rendered HTML. This impacted search visibility and the quality of shares on social media.
### Introducing SEODeploy
SEOs often use diff-testing tools to look at changes between sets of rendered and raw HTML. Diff testing is ideal because it allows certainty that the eye does not. You want to look for differences in how Google renders your page, not how users do. You want to look at what the raw HTML looks like, not the rendered HTML, as these are two separate processing steps for Google.
This led my colleagues and me to create [SEODeploy][4], a "Python library for automating SEO testing in deployment pipelines." Our mission was:
> To develop a tool that allowed developers to provide a few to many URL paths, and which allowed those paths to be diff tested on production and staging hosts, looking specifically for unanticipated regressions in SEO-related data.
SEODeploy's mechanics are simple: Provide a text file containing a newline-delimited set of paths, and the tool runs a series of modules on those paths, comparing production and staging URLs and reporting on any errors or messages (changes) it finds.
![SEODeploy overview][5]
(SEODeploy, [CC BY-SA 4.0][6])
The configuration for the tool and modules is just one YAML file, which can be customized based on anticipated changes.
![SEODeploy output][7]
(SEODeploy, [CC BY-SA 4.0][6])
The initial release includes the following core features and concepts:
1. **Open source**: We believe deeply in sharing code that can be criticized, improved, extended, shared, and reused.
2. **Modular**: There are many different stacks and edge cases in development for the web. The SEODeploy tool is conceptually simple, so modularity is used to control the complexity. We provide two built modules and an example module that outline the basic structure.
3. **URL sampling:** Since it is not always feasible or efficient to test every URL, we included a method to randomly sample XML sitemap URLs or URLs monitored by ContentKing.
4. **Flexible diff checking**: Web data is messy. The diff checking functionality tries to do a good job of converting this data to messages (changes) no matter the data type it's checking, including ext, arrays (lists), JSON objects (dictionaries), integers, floats, etc.
5. **Automated**: A simple command-line interface is used to call the sampling and execution methods to make it easy to incorporate SEODeploy into existing pipelines.
### Modules
While the core functionality is simple, by design, modules are where SEODeploy gains features and complexity. The modules handle the harder task of getting, cleaning, and organizing the data collected from staging and production servers for comparison.
#### Headless module
The tool's [Headless module][8] is a nod to anyone who doesn't want to have to pay for a third-party service to get value from the library. It runs any version of Chrome and extracts rendered data from each comparison set of URLs.
The headless module extracts the following core data for comparison:
1. SEO content, e.g., titles, headings, links, etc.
2. Performance data from the Chrome Timings and Chrome DevTools Protocol (CDP) Performance APIs
3. Calculated performance metrics including the Cumulative Layout Shift (CLS), a recently popular [Web Vital][9] released by Google
4. Coverage data for CSS and JavaScript from the CDP Coverage API
The module includes functionality to handle authentication for staging, network speed presets (for better normalization of comparisons), as well as a method for handling staging-host replacement in staging comparative data. It should be fairly easy for developers to extend this module to collect any other data they want to compare per page.
#### Other modules
We created an [example module][10] for any developer who wants to use the framework to create a custom extraction module. Another module integrates with ContentKing. Note that the ContentKing module requires a subscription to ContentKing, while Headless can be run on any machine capable of running Chrome.
### Problems to solve
We have [plans][11] to extend and enhance the library but are looking for [feedback][12] from developers on what works and what doesn't meet their needs. A few of the issues and items on our list are:
1. Dynamic timestamps create false positives for some comparison elements, especially schema.
2. Saving test data to a database to enable reviewing historical deployment processes and testing changes against the last staging push.
3. Enhancing the scale and speed of the extraction with a cloud infrastructure for rendering.
4. Increasing testing coverage from the current 46% to 99%-plus.
5. Currently, we rely on [Poetry][13] for dependency management, but we want to publish a PyPl library so it can be installed easily with `pip install`.
6. We are looking for more issues and field data on usage.
### Get started
The project is [on GitHub][4], and we have [documentation][14] for most features.
We hope that you will clone SEODeploy and give it a go. Our goal is to support the open source community with a tool developed by technical search-engine optimizers and validated by developers and engineers. We've seen the time it takes to validate complex staging issues and the business impact minor changes can have across many URLs. We think this library can save time and de-risk the deployment process for development teams.
If you have questions, issues, or want to contribute, please see the project's [About page][15].
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/seodeploy
作者:[JR Oakes][a]
选题:[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/jroakes
[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.contentkingapp.com/
[3]: https://en.wikipedia.org/wiki/Canonical_link_element
[4]: https://github.com/locomotive-agency/SEODeploy
[5]: https://opensource.com/sites/default/files/uploads/seodeploy.png (SEODeploy overview)
[6]: https://creativecommons.org/licenses/by-sa/4.0/
[7]: https://opensource.com/sites/default/files/uploads/seodeploy_output.png (SEODeploy output)
[8]: https://locomotive-agency.github.io/SEODeploy/modules/headless/
[9]: https://web.dev/vitals/
[10]: https://locomotive-agency.github.io/SEODeploy/modules/creating/
[11]: https://locomotive-agency.github.io/SEODeploy/todo/
[12]: https://locomotive-agency.github.io/SEODeploy/about/#contact
[13]: https://python-poetry.org/
[14]: https://locomotive-agency.github.io/SEODeploy/
[15]: https://locomotive-agency.github.io/SEODeploy/about/

View File

@ -0,0 +1,127 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Build your own open source alternative to Google Suite with Nextcloud)
[#]: via: (https://opensource.com/article/20/7/nextcloud)
[#]: author: (Don Watkins https://opensource.com/users/don-watkins)
Build your own open source alternative to Google Suite with Nextcloud
======
The open source cloud collaboration suite has made major gains in recent
years. Take a look at what you've missed.
![Digital images of a computer desktop][1]
A few years ago, I installed [Nextcloud][2] for a local theatre and museum that was looking for an on-premises cloud solution. As an advocate for open source, I always seek out open source options first, and Nextcloud was the most-common open source cloud solution among my peers. I've also used it for some personal projects, but I hadn't looked at it in a while.
I recently revisited Nextcloud and was amazed by all the changes I saw. The project has evolved into a complete solution that can replace big-name solutions like Google Drive and Microsoft 365. Nextcloud's new feature set, especially [Nextcloud Hub][3], is outstanding, offering collaborative documentation editing, file version control, integrated chat and video calling, and more.
### Getting started with Nextcloud
There are many options for [setting up a Nextcloud server on Linux][4], but I decided to run the official [container image][5]. I pulled it down to my laptop, and soon I was up and running.
```
$ docker pull nextcloud
$ docker run -d -p 8080:80 nextcloud
```
Installation was quick on my MacBook Pro with 8GB RAM. In no time at all, I was logging into Nextcloud for the first time at `http://locahost:8080` with the default credentials of _admin_ and _password_.
![Nextcloud login interface][6]
(Don Watkins, [CC BY-SA 4.0][7])
After I entered my login credentials, it began downloading some applications, which took some time. I appreciated that Nextcloud's interface looked much the same as it did years ago, even with all the changes in the platform, because I like to feel familiar with a technology.
![Nextcloud's UI][8]
(Don Watkins, [CC BY-SA 4.0][7])
Nextcloud's controls are located in the upper-right corner. You can control settings, add apps, create and modify users, learn about Nextcloud, get help, and log out.
Nextcloud Hub is a central collaboration platform where you can access and collaborate on files, launch, enable, and disable applications, manage your calendar, and more.
I decided to start by exploring the apps available in Nextcloud. Some app integrations are included by default, and you can download others with a single click. For example, here is the display when I clicked the top-right icon, then selected Apps and Multimedia.
![Nextcloud multimedia apps][9]
(Don Watkins, [CC BY-SA 4.0][7])
There are hundreds of apps that can be downloaded and added to Nextcloud, and, like Nextcloud, all are licensed under the [AGPLv3][10]. Clicking on an app shows information about it, including its creator and license. I decided to look at [Audio Player][11].
![Nextcloud Audio Player][12]
(Don Watkins, [CC BY-SA 4.0][7])
Nextcloud also comes with the [Nextcloud Talk][13] app for videoconferencing with complete end-to-end encryption to keep communication within your control. As of Nextcloud Hub 19, you can work on documents synchronously during video calls with [Collabora Online][14], which will feel familiar to Google Docs users.
Nextcloud also has a number of important security features, including optional automatic logout, which is useful when using public computers. You can also set up passwordless authentication, automatic account locking after failed login attempts, and two-factor authentication (2FA) through mobile, email, or one-time password devices to verify users' identity before they can log in.
### Nextcloud's advances
Eager to learn more about Nextcloud and its new directions, I reached out to CEO [Frank Karlitschek][15] to ask him some questions by email.
During this time of social distancing, I was curious about how the growth of remote work is fueling Nextcloud's development. Frank says the fact that the world is [working from home][16] is accelerating the adoption of content collaboration software, and Nextcloud is "in the lucky situation that we heavily invested in this fast-growing product category." He specifically cites Nextcloud's abilities to sync, share, and collaboratively view and edit files, as well as its shared calendars, contacts, email, chats, video calls, project management, notes, and many more things as features that help people work together.
Frank adds, "Nextcloud Talk is our solution for chat and audio and video calls. It has the same benefits as the rest of Nextcloud. All data and communication stay under your control. It is fully open source; you can migrate your data and don't need to trust a third-party company."
Open source is a key part of Nextcloud's model, Frank says. "Everything server-side is licensed AGPL, and the desktop and mobile clients are licensed GPL. We are happy to not have any proprietary pieces. Everything at Nextcloud is fully free software and open source."
When I asked him why someone should choose Nextcloud over a proprietary cloud solution, Frank emphasizes the freedom to run where you want with 100% open source software. "Being open source has many benefits for users. It means you can keep your data under your own control. You can run Nextcloud wherever you want. Vendor lock-in is eliminated, so you can move your data around to where you need it. The open source code in Nextcloud ensures that there are no backdoors because the code can be audited. The open source angle has also empowered developers to extend Nextcloud with hundreds of apps, extensions, and plugins."
I was also curious about Nextcloud's security, including its support for [Nitrokey][17], a feature for passwordless authentication. Frank says, "Nextcloud supports authentication from many different protocols, including LDAP, Active Directory, SAML, OAuth, OpenID connect, WebAuthn, and many more. You can use second-factor authentication methods, including Time-based One-time Password (TOTP), SMS, push notification, SecSign, and email. With the new support for [WebAuthn][18], we also support the new passwordless authentication. Nitrokey already supports this, so you can just authenticate with a Nitrokey without a password. We expect that a lot more devices and software will support this new open standard in the future."
As I thought about all the changes in Nextcloud, I wondered about its install base. Being open source makes it impossible to know how many Nextcloud installations there are in the world. One of its [container images][19] has over 100 million downloads, and it has a strong following in its source repository on [GitHub][20]. Nextcloud estimates there are over 400,000 Nextcloud servers on the internet, and that number is growing.
Nextcloud doesn't provide hosting options itself, but it does list service [providers][21] that offer hosted Nextcloud. There are also many options for self-hosting Nextcloud, Frank says. "A Nextcloud server can be very small or very big. Actually, Nextcloud runs fine on a Raspberry Pi for just a few users. This includes chatting and video calling. The Nextcloud server needs a decent network connection if you handle big files or video calls with a lot of users."
### Open source to its core
Frank was eager to thank the open source community that comes together and builds great software. He said, "open source is all about the community; no single person or company could do this alone." Therefore, Nextcloud welcomes [contributions][22] to its development. Nextcloud's code is available on [GitHub][23]. To keep up with the latest information, you can follow Nextcloud on [Twitter][24], [Instagram][25], [Facebook][26], [LinkedIn][27], [Mastodon][28], and [YouTube][29].
Sandstorm's Jade Wang shares some of her favorite open source web apps that are self-hosted...
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/nextcloud
作者:[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/computer_desk_home_laptop_browser.png?itok=Y3UVpY0l (Digital images of a computer desktop)
[2]: https://nextcloud.com/
[3]: https://nextcloud.com/hub/
[4]: https://docs.nextcloud.com/server/19/admin_manual/installation/index.html
[5]: https://hub.docker.com/_/nextcloud/
[6]: https://opensource.com/sites/default/files/uploads/nextcloud_login.png (Nextcloud login interface)
[7]: https://creativecommons.org/licenses/by-sa/4.0/
[8]: https://opensource.com/sites/default/files/uploads/nextcloud_interface.png (Nextcloud's UI)
[9]: https://opensource.com/sites/default/files/uploads/nextcloud_multimedia-apps.png (Nextcloud multimedia apps)
[10]: https://www.gnu.org/licenses/agpl-3.0.en.html
[11]: https://apps.nextcloud.com/apps/audioplayer
[12]: https://opensource.com/sites/default/files/uploads/nextcloud_audio-player_0.png (Nextcloud Audio Player)
[13]: https://nextcloud.com/talk/
[14]: https://nextcloud.com/collaboraonline/
[15]: https://en.wikipedia.org/wiki/Frank_Karlitschek
[16]: https://opensource.com/tags/wfh
[17]: https://www.nitrokey.com/
[18]: https://en.wikipedia.org/wiki/WebAuthn
[19]: https://hub.docker.com/r/linuxserver/nextcloud/
[20]: https://github.com/nextcloud/server
[21]: https://nextcloud.com/providers/
[22]: https://nextcloud.com/contribute/
[23]: https://github.com/nextcloud
[24]: https://twitter.com/nextclouders
[25]: https://instagram.com/nextclouders
[26]: https://www.facebook.com/Nextclouders/
[27]: https://www.linkedin.com/company/10827569/
[28]: https://mastodon.xyz/@nextcloud
[29]: https://youtube.com/nextcloud

View File

@ -0,0 +1,203 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Dreamweaver Alternatives: 5 Open Source HTML and CSS Editors for Web Developers and Designers)
[#]: via: (https://itsfoss.com/open-source-html-editors/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
Dreamweaver Alternatives: 5 Open Source HTML and CSS Editors for Web Developers and Designers
======
Adobe Dreamweaver is a popular tool for professionals to design websites. Even though it enjoyed all its glory in the past decade, its no longer the most popular tool out there (at least, as far as Im aware of).
Its expensive subscription plans and the availability of free and open-source alternatives has left an impact to its popularity.
Moreover, with the growth of popular [open source CMS][1] options and drag-drop website builders, its really easy to build a website when compared to the previous decade.
Unless youre a professional with a specific set of requirements, theres no reason to use Dreamweaver. So, here, in this article, Im going to list some of the best free open-source Dreamweaver alternatives that lets you edit HTML/CSS.
### Open source HTML and CSS editors for web developers
![][2]
I understand that some web developers and designers prefer WYSIWYG (What You See Is What You Get) feature. Not all the editors mentioned here offer this feature but when they do, I have highlighted it explicitly.
I have used [this website template][3] for testing out the HTML editors. This _**list is in no particular order of ranking**_.
#### 1\. Bluefish Editor
![][4]
**Key Highlights:**
* Auto-completion
* Preview in browser
* Site upload/download options
* Code block folding
* Support for several programming languages
* Supports WordPress language definition files
* Cross-platform support
Bluefish is a feature-rich editor thats perfectly suitable for both beginners and experienced web designers.
Even though it does NOT offer [WYSIWYG][5], the browser preview feature lets you make changes to the coding and see it in action quickly without any special configuration. Its also a lightweight application so it isnt heavy on resources.
Try it out to explore more about it.
##### How to install it?
You may find it listed in your software center. If you dont, you can follow the [official installation instructions][6] to add the repository and install it on your Linux distribution.
Also, theres a [Flatpak package][7] available in case you prefer using it. Id suggest you to refer our [Flatpak guide][8] if you dont know about it.
[Bluefish][9]
#### 2\. BlueGriffon
![][10]
**Key** **Highlights:**
* **WYSIWYG** editor
* Black and light theme
* Responsive Design support
* EPUB 3.1 support
* Cross-platform support
BlueGriffon is an impressive WYSIWYG HTML/CSS editor. You can choose to edit the codes and check the design or simply edit it visually without needing to fiddle with the codes.
This is especially helpful for folks who arent comfortable with HTML/CSS and just starting out. It makes it easy to edit while offering all the necessary features for a web designer.
##### How to install it?
You can download the deb package from its [official website][11] or opt for other installers and source code depending on the Linux distribution youre using.
You may want to read the [different ways to install a DEB file][12] if youre on an Ubuntu-based distro.
[BlueGriffon][13]
#### 3\. SeaMonkey
![][14]
**Key Highlights:**
* WYSIWYG Editor
* Separate browser
* HTML editing
* Cross-platform support
SeaMonkey isnt your typical code editor — but its a collection of Internet applications like a browser, email, IRC chat, and HTML editor.
It does support editing the source code of a web page and the ability to edit visually without needing to know HTML.
You can explore more about it when you get it installed.
##### How to install it?
You can simply download the package for Linux available on their [official site][15] and run the executable SeaMonkey application file to get started.
[SeaMonkey][16]
#### 4\. Brackets
![][17]
**Key Highlights:**
* Live preview option
* Tailored for web design
* Auto-completion
* Cross-platform
Brackets is already one of the [best modern text editors for coding][18] in Linux. It was primarily built for web developers while also supporting other programming languages.
Surprisingly, its an open-source project by Adobe, which isnt super actively maintained — but its there.
##### How to install it?
You can simply grab the deb file from its [official website][19] for Ubuntu 19.10 or lower. For Ubuntu 20.04 or any other Linux distro, you will be better off using the [Flatpak package][20] or the [Snap][21].
You may also explore their [GitHub releases section][22] for other downloads.
[Brackets][19]
#### 5\. NetBeans
![][23]
**Key Highlights:**
* HTML Editor
* Cross-platform
NetBean isnt technically an out-of-the-box HTML-CSS editor. But, you can use it as an HTML editor when building an HTML5 application.
It isnt the go-to solution for HTML editing, but its an option out there for a specific group of programmers. You can give it a try to see if it does what you expect it to.
##### How to install it?
You can find it listed in your software center. In either case, you can just head to the [official download page][24] to get it installed.
[NetBeans][25]
**Which HTML editor do you use?**
There are a few more editors that you can use for editing HTML and CSS. There is [Aloha Editor Community Edition][26] preferred by some web developers.
You can surely use other [modern code editors][18] like Atom and VS Code or the good-old [Geany text editor][27] to edit HTML and CSS files.
If you regularly work on web design and development, which open source HTML editor do you use and recommend? We might add your recommendation to our list here. You may also mention non-open source WYSIWYG editors but that wont be added in the list for obvious reasons.
--------------------------------------------------------------------------------
via: https://itsfoss.com/open-source-html-editors/
作者:[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/open-source-cms/
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/Open-Source-html-editors.jpg?ssl=1
[3]: https://www.styleshout.com/free-templates/kards/
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/bluefish.png?ssl=1
[5]: https://en.wikipedia.org/wiki/WYSIWYG
[6]: https://bfwiki.tellefsen.net/index.php/Installing_Bluefish
[7]: https://www.flathub.org/apps/details/nl.openoffice.bluefish
[8]: https://itsfoss.com/flatpak-guide/
[9]: http://bluefish.openoffice.nl/index.html
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/bluegriffon.png?ssl=1
[11]: http://www.bluegriffon.org/#download
[12]: https://itsfoss.com/install-deb-files-ubuntu/
[13]: http://bluegriffon.org
[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/seamonkey.png?ssl=1
[15]: http://www.seamonkey-project.org/releases/
[16]: http://www.seamonkey-project.org
[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/brackets-dreamweaver-alternative.png?ssl=1
[18]: https://itsfoss.com/best-modern-open-source-code-editors-for-linux/
[19]: http://brackets.io/
[20]: https://flathub.org/apps/details/io.brackets.Brackets
[21]: https://snapcraft.io/brackets
[22]: https://github.com/adobe/brackets/releases
[23]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/netbeans.jpg?ssl=1
[24]: https://netbeans.apache.org/download/index.html
[25]: https://netbeans.apache.org/
[26]: https://www.alohaeditor.org/
[27]: https://www.geany.org/

View File

@ -0,0 +1,105 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (5 open source IDE tools for Java)
[#]: via: (https://opensource.com/article/20/7/ide-java)
[#]: author: (Daniel Oh https://opensource.com/users/daniel-oh)
5 open source IDE tools for Java
======
Java IDE tools offer plenty of ways to create a programming environment
based on your unique needs and preferences.
![woman on laptop sitting at the window][1]
[Java][2] frameworks make life easier for programmers by streamlining their work. These frameworks were designed and developed to run any application on any server environment; that includes dynamic behaviors in terms of parsing annotations, scanning descriptors, loading configurations, and launching the actual services on a Java virtual machine (JVM). Controlling this much scope requires more code, making it difficult to minimize memory footprint or speed up startup times for new applications. Regardless, Java consistently ranks in the top three of programming languages in use today with a community of seven to ten million developers in the [TIOBE Index][3].
With all that code written in Java, that means there are some great options for integrated development environments (IDE) to give developers all the tools needed to effectively write, lint, test, and run Java applications.
Below, I introduce—in alphabetical order—my five favorite open source IDE tools to write Java and how to configure their basics.
### BlueJ
[BlueJ][4] provides an integrated educational Java development environment for Java beginners. It also aids in developing small-scale software using the Java Development Kit (JDK). The installation options for a variety of versions and operating systems are available [here][5].
Once you install the BlueJ IDE on your laptop, start a new project. Click on New Project in the Project menu then begin writing Java codes from New Class. Sample methods and skeleton codes will be generated as below:
![BlueJ IDE screenshot][6]
BlueJ not only provides an interactive graphical user interface (GUI) for teaching Java programming courses in schools but also allows developers to invoke functions (i.e., objects, methods, parameters) without source code compilation.
### Eclipse
[Eclipse][7] is one of the most famous Java IDEs based on the desktop, and it supports a variety of programming languages such as C/C++, JavaScript, and PHP. It also allows developers to add unlimited extensions from the Eclipse Marketplace for more development conveniences. [Eclipse Foundation][8] provides a Web IDE called [Eclipse Che][9] for DevOps teams to spin up an agile software development environment with hosted workspaces on multiple cloud platforms.
[The download][10] is available here; then you can create a new project or import an existing project from the local directory. Find more Java development tips in [this article][11].
![Eclipse IDE screenshot][12]
### IntelliJ IDEA
[IntelliJ IDEA CE (Community Edition)][13] is the open source version of IntelliJ IDEA, providing an IDE for multiple programming languages (i.e., Java, Groovy, Kotlin, Rust, Scala). IntelliJ IDEA CE is also very popular for experienced developers to use for existing source refactoring, code inspections, building testing cases with JUnit or TestNG, and building codes using Maven or Ant. Downloadable binaries are available [here][14].
IntelliJ IDEA CE comes with some unique features; I particularly like the API tester. For example, if you implement a REST API with a Java framework, IntelliJ IDEA CE allows you to test the API's functionality via Swing GUI designer:
![IntelliJ IDEA screenshot][15]
IntelliJ IDEA CE is open source, but the company behind it has a commercial option. Find more differences between the Community Edition and the Ultimate [here][16].
### Netbeans IDE
[NetBeans IDE][17] is an integrated Java development environment that allows developers to craft modular applications for standalone, mobile, and web architecture with supported web technologies (i.e., HTML5, JavaScript, and CSS). NetBeans IDE allows developers to set up multiple views on how to manage projects, tools, and data efficiently and helps them collaborate on software development—using Git integration—when a new developer joins the project.
Download binaries are available [here][18] for multiple platforms (i.e., Windows, macOS, Linux). Once you install the IDE tool in your local environment, the New Project wizard helps you create a new project. For example, the wizard generates the skeleton codes (with sections to fill in like `// TODO code application logic here`) then you can add your own application codes.
### VSCodium
[VSCodium][19] is a lightweight, free source code editor that allows developers to install a variety of OS platforms (i.e., Windows, macOS, Linux) and is an open source alternative based on [Visual Studio Code][20]. It was also designed and developed to support a rich ecosystem for multiple programming languages (i.e., Java, C++, C#, PHP, Go, Python, .NET). For high code quality, Visual Studio Code provides debugging, intelligent code completion, syntax highlighting, and code refactoring by default.
There are many download options available in the [repository][21]. When you run the Visual Studio Code, you can add new features and themes by clicking on the Extensions icon in the activity bar on the left side or by pressing Ctrl+Shift+X in the keyboard. For example, the Quarkus Tools for Visual Studio Code comes up when you type "quarkus" in the search box. The extension allows you to use helpful tools for [writing Java with Quarkus in VS Code][22]:
![VSCodium IDE screenshot][23]
### Wrapping up
Java being one of the most widely used programming languages and environments, these five are just a fraction of the different open source IDE tools available for Java developers. It can be hard to know which is the right one to choose. As always, it depends on your specific needs and goals—what kinds of workloads (web, mobile, messaging, data transaction) you want to implement and what runtimes (local, cloud, Kubernetes, serverless) you will deploy using IDE extended features. While the wealth of options out there can be overwhelming, it does also mean that you can probably find one that suits your particular circumstances and preferences.
Do you have a favorite open source Java IDE? Share it in the comments!
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/ide-java
作者:[Daniel Oh][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/daniel-oh
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop)
[2]: https://opensource.com/resources/java
[3]: https://www.tiobe.com/tiobe-index/
[4]: https://www.bluej.org/about.html
[5]: https://www.bluej.org/versions.html
[6]: https://opensource.com/sites/default/files/uploads/5_open_source_ide_tools_to_write_java_and_how_you_begin_it.png (BlueJ IDE screenshot)
[7]: https://www.eclipse.org/ide/
[8]: https://www.eclipse.org/
[9]: https://opensource.com/article/19/10/cloud-ide-che
[10]: https://www.eclipse.org/downloads/
[11]: https://opensource.com/article/19/10/java-basics
[12]: https://opensource.com/sites/default/files/uploads/os_ide_2.png (Eclipse IDE screenshot)
[13]: https://www.jetbrains.com/idea/
[14]: https://www.jetbrains.org/display/IJOS/Download
[15]: https://opensource.com/sites/default/files/uploads/os_ide_3.png (IntelliJ IDEA screenshot)
[16]: https://www.jetbrains.com/idea/features/editions_comparison_matrix.html
[17]: https://netbeans.org/
[18]: https://netbeans.org/downloads/8.2/rc/
[19]: https://vscodium.com/
[20]: https://opensource.com/article/20/6/open-source-alternatives-vs-code
[21]: https://github.com/VSCodium/vscodium#downloadinstall
[22]: https://opensource.com/article/20/4/java-quarkus-vs-code
[23]: https://opensource.com/sites/default/files/uploads/os_ide_5.png (VSCodium IDE screenshot)

View File

@ -0,0 +1,143 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Analyze your web server log files with this Python tool)
[#]: via: (https://opensource.com/article/20/7/python-lars)
[#]: author: (Ben Nuttall https://opensource.com/users/bennuttall)
Analyze your web server log files with this Python tool
======
This Python module can collect website usage logs in multiple formats
and output well structured data for analysis.
![Person standing in front of a giant computer screen with numbers, data][1]
Ever wanted to know how many visitors you've had to your website? Or which pages, articles, or downloads are the most popular? If you're self-hosting your blog or website, whether you use Apache, Nginx, or even Microsoft IIS (yes, really), [lars][2] is here to help.
Lars is a web server-log toolkit for [Python][3]. That means you can use Python to parse log files retrospectively (or in real time) using simple code, and do whatever you want with the data—store it in a database, save it as a CSV file, or analyze it right away using more Python.
Lars is another hidden gem written by [Dave Jones][4]. I first saw Dave present lars at a local Python user group. Then a few years later, we started using it in the [piwheels][5] project to read in the Apache logs and insert rows into our Postgres database. In real time, as Raspberry Pi users download Python packages from [piwheels.org][6], we log the filename, timestamp, system architecture (Arm version), distro name/version, Python version, and so on. Since it's a relational database, we can join these results on other tables to get more contextual information about the file.
You can install lars with:
```
`$ pip install lars`
```
On some systems, the right route will be [ `sudo` ] `pip3 install lars`.
To get started, find a single web access log and make a copy of it. You'll want to download the log file onto your computer to play around with it. I'm using Apache logs in my examples, but with some small (and obvious) alterations, you can use Nginx or IIS. On a typical web server, you'll find Apache logs in `/var/log/apache2/` then usually `access.log` , `ssl_access.log` (for HTTPS), or gzipped rotated logfiles like `access-20200101.gz` or `ssl_access-20200101.gz` .
First of all, what does a log entry look like?
```
81.174.152.222 - - [30/Jun/2020:23:38:03 +0000] "GET / HTTP/1.1" 200 6763 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0"
```
This is a request showing the IP address of the origin of the request, the timestamp, the requested file path (in this case / , the homepage, the HTTP status code, the user agent (Firefox on Ubuntu), and so on.
Your log files will be full of entries like this, not just every single page hit, but every file and resource served—every CSS stylesheet, JavaScript file and image, every 404, every redirect, every bot crawl. To get any sensible data out of your logs, you need to parse, filter, and sort the entries. That's what lars is for. This example will open a single log file and print the contents of every row:
[code]
```
with open('ssl_access.log') as f:
    with ApacheSource(f) as source:
        for row in source:
            print(row)
```
```
Which will show results like this for every log entry:
```
```
Row(remote_host=IPv4Address('81.174.152.222'), ident=None, remote_user=None, time=DateTime(2020, 6, 30, 23, 38, 3), request=Request(method='GET', url=Url(scheme='', netloc='', path_str='/', params='', query_str='', fragment=''), protocol='HTTP/1.1'), status=200, size=6763)
```
It's parsed the log entry and put the data into a structured format. The entry has become a namedtuple with attributes relating to the entry data, so for example, you can access the status code with row.status and the path with row.request.url.path_str:
[code]
```
```
```
with open('ssl_access.log') as f:
    with ApacheSource(f) as source:
        for row in source:
            print(f'hit {row.request.url.path_str} with status code {row.status}')
```
```
If you wanted to show only the 404s, you could do:
[code]
```
with open('ssl_access.log') as f:
    with ApacheSource(f) as source:
        for row in source:
            if row.status == 404:
                print(row.request.url.path_str)
```
```
You might want to de-duplicate these and print the number of unique pages with 404s:
[code]
```
s = set()
with open('ssl_access.log') as f:
    with ApacheSource(f) as source:
        for row in source:
            if row.status == 404:
                s.add(row.request.url.path_str)
print(len(s))
```
```
Dave and I have been working on expanding piwheels' logger to include web-page hits, package searches, and more, and it's been a piece of cake, thanks to lars. It's not going to tell us any answers about our users—we still have to do the data analysis, but it's taken an awkward file format and put it into our database in a way we can make use of it.
Check out lars' documentation to see how to read Apache, Nginx, and IIS logs, and learn what else you can do with it. Thanks, yet again, to Dave for another great tool!
```
* * *
```
This originally appeared on Ben Nuttall's Tooling Blog and is republished with permission.
```
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/python-lars
作者:[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/data_metrics_analytics_desktop_laptop.png?itok=9QXd7AUr (Person standing in front of a giant computer screen with numbers, data)
[2]: https://lars.readthedocs.io/en/latest/
[3]: https://opensource.com/resources/python
[4]: https://twitter.com/waveform80/
[5]: https://opensource.com/article/18/10/piwheels-python-raspberrypi
[6]: http://piwheels.org

View File

@ -0,0 +1,91 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (What does it mean for code to "work"?)
[#]: via: (https://opensource.com/article/20/7/code-tdd)
[#]: author: (Alex Bunardzic https://opensource.com/users/alex-bunardzic)
What does it mean for code to "work"?
======
Test driven development (TDD) separates computing results from actions
to ensure your code does what you expect.
![Searching for code][1]
Extreme Programming co-founder [Ron Jeffries][2] famously wrote: "The trick is never to let the code not be working."
Jeffries' quote points at the fact that software engineering is a very sophisticated activity with plenty of uncertainty. Software engineering also deals with issues of incompleteness—at the outset, you never seem to have all information you need to formulate an optimal approach. There always comes a time, later in the project, when you learn something that shows that several things in your initial understanding were incorrect. In addition, even when you amass sufficient useful information to orient yourself properly, that information tends to contain ambiguity—communication is seldom, if ever, clear. Ambiguity seems to prevail in both verbal and written communication.
Because of these constraints, the only safe way to proceed when developing software is to rely on the working code. The running, working code is the final oracle. It will tell you if you're doing the right thing and going in the right direction.
### How do you know if the code is working?
It is impossible to know if your code is working as designed if the code isn't running. To have code that compiles without errors and always runs without exceptions doesn't mean that the code is working. It could be doing all these activities while doing nothing of use. Therefore, the definition of working code is that it runs without any problems while doing something you expect it to do.
The only way to find out if your code is working according to expectations is to focus on observable behavior. Merely reading and analyzing the source code is not sufficiently convincing; you need to see the code executing to judge whether its execution meets your expectations.
There are two ways to measure observable behavior:
1. Watch the computer that is running your code perform some actions
2. Test the running code for the computed values
The first type of observable behavior (observing some actions being performed) is not the best way to ensure that your code works according to expectations. For example, you may observe that your code performed an action, such as sending an email. But that alone is not sufficient to confirm the code works according to expectations. What if the email the code is sending contains incorrect information?
The only way to confirm that your code is working according to expectations is to observe the computed values. And that process (i.e., observing the computed values to see if they match the expected values) is where test-driven development (TDD) shines.
### How does it feel to write software if the code is not working?
Before I discovered TDD, I was spending long stretches of time writing code without worrying about whether the code was working or not. Every now and then, when I felt I had reached a milestone in coding, I would run the application I was working on. I'd log in as a fictitious user and manually trigger some actions to see if the program did what I told it to do.
This approach is similar to measuring an iceberg by just gauging its tip—the part of the iceberg visible above the water. Although my manual testing provided a clean bill of health for the app, naturally, once it went into production, all kinds of bugs and defects started showing up (caused by the "below-the-waterline" part of the iceberg).
Looking back, it is obvious that writing code without making it work all the time is similar to flying a kite. Flying a kite in a strong wind is exciting, even exhilarating. But the kite almost never touches the ground, and it is very challenging to control its direction in the strong wind. Also, it is almost impossible to land the kite at the exact spot you aim for.
### How does it feel to write software when doing TDD?
TDD is based on the idea that the way the code behaves should be independent from the way the code is structured. You are aiming at a desired behavior. While you're writing code, the desired behavior is not there (that's why it is called "desired"). You implement the desired behavior by first writing a test that describes it. Then you run that test, and it fails because the expected behavior is not implemented yet. The failure prompts you to fix it, which forces you to run the code again. If the changes you make to the code satisfy the expectations described in the test, you conclude that the code works according to your expectations.
If the changes you make to the code do not satisfy the expectations described in the test, the code does not work, and you need to make more changes to the code until it works as expected.
This process, when done consistently, feels like riding a galloping horse. Every now and then, a galloping horse touches the ground, which is equivalent to the moment when all tests pass in TDD. While the horse is "in flight," it is charging in a straight line. The horse is advancing, but there is no way to change its course. Only when the horse touches the ground does the horse rider get a chance to change the direction they're heading.
Similarly, when writing code, you are "in flight." While you're coding, you have no way of verifying if you're going in the right direction. It is only when you stop coding, save your changes, and run the code that you can observe if your code is doing what you expect it to do. You are touching the ground each time you run your code.
TDD is the discipline that guides you toward performing this reality check as often as possible. This minimizes your risk of shipping incorrect code.
### You are the first customer of your application code
Since you're writing a test that automates your expectations, you are the first customer of the application code. Actually, it's better to say that _your test_ is the first customer of your code. The test could be viewed as a customer who walks into a restaurant, and being hungry, orders a meal. When the customer orders, she has a specific meal in mind. The kitchen staff's job is to turn that customer's desire into reality.
If the waiter delivers the meal and, after tasting it, the customer disagrees that the meal meets her expectations, she returns it to the kitchen. The staff modifies the meal until the customer is satisfied. But kitchen staff will never know if the meal is good unless they collect feedback from the customer.
In a similar fashion, the only way to know if the code you're writing satisfies expectations is by collecting feedback from the test.
### Conclusion
The only way to know if the changes you are making to the code are advancing your app in the right direction is by making the code work. Mere review of the code, the act of reading the code, is never sufficient to reach a solid conclusion that the code is correct.
Most developers prefer writing code in long stretches. But spending hours writing code means you're wasting hours not making the code work (recall Ron Jeffries' advice "The trick is never to let the code not be working"). You're letting the code not be working if you indulge in long code-writing sessions.
TDD helps control that by focusing your attention on observable behavior. In TDD, you define expected values and continue interrogating your code to see if it computes those expected values. To confirm or refute the expectations, you must make the code work. The more often you do these "reality checks," the higher the probability that your efforts are going in the right direction.
The transition from a stable, steady state (being ready) to the next stable, steady state (being ready again), should be as short as possible. TDD strives to help you always travel in a ready-to-ready fashion.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/code-tdd
作者:[Alex Bunardzic][a]
选题:[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/alex-bunardzic
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/search_find_code_python_programming.png?itok=ynSL8XRV (Searching for code)
[2]: https://en.wikipedia.org/wiki/Ron_Jeffries

View File

@ -0,0 +1,94 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (BigBlueButton: Open Source Software for Online Teaching)
[#]: via: (https://itsfoss.com/bigbluebutton/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
BigBlueButton: Open Source Software for Online Teaching
======
_**Brief: BigBlueButton is an open-source tool for video conferencing tailored for online teaching. Lets take a look at what it offers.**_
In the year 2020, remote working from home is kind of the new normal. Of course, you cannot do everything remotely — but online teaching is something thats possible.
Even though a lot of teachers and school organizations arent familiar with all the amazing tools available out there, some of the [best open-source video conferencing tools][1] are filling in the requirements to some extent.
Among the ones I mentioned for video calls, [BigBlueButton][2] caught my attention. Here, Ill give you an overview of what it offers.
### BigBlueButton: An Open Source Web Conferencing System for Online Teaching
![][3]
BigBlueButton is an open-source web conferencing solution that aims to make online learning easy.
It is completely free to use but it requires you to set it up on your own server to use it as a full-fledged online learning solution.
BigBlueButton offers a really good set of features. You can easily try the [demo instance][4] and set it up on your server for your school.
Before you get started, take a look at the features:
### Features of BigBlueButton
BigBlueButton provides a bunch of useful features tailored for teachers and schools for online classes, heres what you get:
* Live whiteboard
* Public and private messaging options
* Webcam support
* Session recording support
* Emojis support
* Ability to group users for team collaboration
* Polling options available
* Screen sharing
* Multi-user support for whiteboard
* Ability to self-host it
* Provides an API for easy integration on web applications
In addition to the features offered, you will find an easy-to-use UI i.e. [Greenlight][5] (the front-end interface for BigBlueButton) to set up when you configure it on your server.
You can try using the demo instance for casual usage to teach your students for free. However, considering the limitations (60 minutes limit) of using the [demo instance][4] to try BigBlueButton, Id suggest you to host it on your server to explore all the functionality that it offers.
To get more clarity on how the features work, you might want to take a look at one of their official tutorials:
### Installing BigBlueButton On Your Server
They offer a [detailed documentation][6] which should come in handy for every developer. The easiest and quickest way of setting it up is by using the [bbb-install script][7] but you can also explore other options if that does not work out for you.
For starters, you need a server running Ubuntu 16.04 LTS at least. You should take a look at the [minimum requirements][8] before deploying a server for BigBlueButton.
You can explore more about the project in their [GitHub page][9].
[Try BigBlueButton][2]
If youre someone whos looking to set up a solution for online teaching, BigBlueButton is a great choice to explore.
It may not offer native smartphone apps — but you can surely access it using the web browser on your mobile. Of course, its better to find a laptop/computer to access an online teaching platform — but it works with mobile too.
What do you think about BigBlueButton for online teaching? Is there a better open-source project as an alternative to this? Let me know in the comments below!
--------------------------------------------------------------------------------
via: https://itsfoss.com/bigbluebutton/
作者:[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/open-source-video-conferencing-tools/
[2]: https://bigbluebutton.org/
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/big-blue-button.png?ssl=1
[4]: http://demo.bigbluebutton.org/
[5]: https://bigbluebutton.org/2018/07/09/greenlight-2-0/
[6]: https://docs.bigbluebutton.org/
[7]: https://github.com/bigbluebutton/bbb-install
[8]: https://docs.bigbluebutton.org/2.2/install.html#minimum-server-requirements
[9]: https://github.com/bigbluebutton

View File

@ -0,0 +1,235 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Digging for DNS answers on Linux)
[#]: via: (https://www.networkworld.com/article/3568488/digging-for-dns-answers-on-linux.html)
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
Digging for DNS answers on Linux
======
Dig is a powerful and flexible tool for interrogating domain name system (DNS) servers. In this post, well take a deep dive into how it works and what it can tell you.
[Laurie Avocado][1] [(CC BY 2.0)][2]
Dig is a powerful and flexible tool for interrogating DNS name servers. It performs DNS lookups and displays the answers that are returned from the name servers that were involved in the process along with details related to the search. System and [DNS][3] administrators often use **dig** to help troubleshoot DNS problems. In this post, well take a deep dive into how it works and see what it can tell us.
To get started, it's helpful to have a good mental image of how DNS or domain name system works. It's a critical part of the global Internet because it provides a way to look up and, thereby, connect with servers around the world. You can think of it as the Internet's address book and any system that is properly connected to the Internet should be able to use it to look up the IP address of any properly registered server.
### Getting started with dig
The **dig** tool is generally installed on Linux systems by default. Heres an example of a **dig** command with a little annotation:
```
$ dig www.networkworld.com
; <<>> DiG 9.16.1-Ubuntu <<>> www.networkworld.com <== version of dig youre using
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6034
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION: <== details on your query
;www.networkworld.com. IN A
;; ANSWER SECTION: <== results
www.networkworld.com. 3568 IN CNAME idg.map.fastly.net.
idg.map.fastly.net. 30 IN A 151.101.250.165
;; Query time: 36 msec <== query time
;; SERVER: 127.0.0.53#53(127.0.0.53) <== local caching resolver
;; WHEN: Fri Jul 24 19:11:42 EDT 2020 <== date and time of inquiry
;; MSG SIZE rcvd: 97 <== bytes returned
```
If you get a response like this, is it good news?  The short answer is “yes”. You got a reply in a timely manner. The status field (status: NOERROR) shows there were no problems. Youre connecting to a name server that is able to supply the requested information and getting a reply that tells you some important details about the system youre inquiring about. In short, youve verified that your system and the domain name system are getting along just fine.
Other possible status indicators include:
**SERVFAIL**  The name that was queried exists, but no data is available or available data is invalid.
**NXDOMAIN**  The name in question does not exist.
**REFUSED**  The zone does not exist at the requested authority and the infrastructure is not set up to provide responses when this is the case.
Here's an example of what you'd see if you were looking up a domain that doesn't exist:
```
$ dig cannotbe.org
; <<>> DiG 9.16.1-Ubuntu <<>> cannotbe.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 35348
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
```
In general, **dig** provides more details than **ping**, though **ping** will respond with "Name or service not known" if the domain doesn't exit. When you ask about a legitimate system, you get to see what the domain name system knows about the system, how those records are configured and how long it takes to retrieve that data.
In fact, sometimes **dig** can respond with information when **ping** cannot respond at all and that kind of information can be very helpful when you're trying to nail down a connection problem.
### DNS record types and flags
One thing we can see in the first query above is the presence of both **CNAME** and **A** records. The **CNAME** (canonical name) is like an alias that refers one domain name to another. Most systems that you dig for wont have a **CNAME** record, but only an **A** record. If you run a “dig localhost” command, you will see an **A** record that simply refers to 127.0.0.1 the "loopback" address that every system uses. An **A** record maps a name to an IP address.
The DNS record types include:
* A or AAAA - IPv4 and IPv6 addresses
* CNAME - alias
* MX - mail exchanger
* NS - name server
* PTR - a reversing entry that lets you find a system name when providing the IP address
* SOA - start of authority record
* TXT - some related text
We also see a series of “flags” on the fifth line of output. These are defined in [RFC 1035][4] which defines the flags included in the header of DNS messages and even shows the format of headers.
```
1 1 1 1 1 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| ID |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|QR| Opcode |AA|TC|RD|RA| Z | RCODE |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| QDCOUNT |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| ANCOUNT |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| NSCOUNT |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| ARCOUNT |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
```
The flags shown in the fifth line in the initial query above are:
* **qr** = query
* **rd** = recursion desired
* **ra** = recursion available
Other flags described in the RFC include:
* **aa** = authoritative answer
* **cd** = checking disabled
* **ad** = authentic data
* **opcode** = a 4-bit field
* **tc** = truncation
* **z** (unused)
### Adding the +trace option
You will get a LOT more output from **dig** if you add **+trace** as an option. It will add information that shows how your DNS query rooted through the hierarchy of name servers to locate the answer youre looking for.
All the **NS** records shown below reflect name servers and this is just the first section of data you will see as the query runs through the hierarchy of name servers to track down what you're looking for. 
```
$ dig +trace networkworld.com
; <<>> DiG 9.16.1-Ubuntu <<>> +trace networkworld.com
;; global options: +cmd
. 84895 IN NS k.root-servers.net.
. 84895 IN NS e.root-servers.net.
. 84895 IN NS m.root-servers.net.
. 84895 IN NS h.root-servers.net.
. 84895 IN NS c.root-servers.net.
. 84895 IN NS f.root-servers.net.
. 84895 IN NS a.root-servers.net.
. 84895 IN NS g.root-servers.net.
. 84895 IN NS l.root-servers.net.
. 84895 IN NS d.root-servers.net.
. 84895 IN NS b.root-servers.net.
. 84895 IN NS i.root-servers.net.
. 84895 IN NS j.root-servers.net.
;; Received 262 bytes from 127.0.0.53#53(127.0.0.53) in 28 ms
...
```
Eventually, you'll get information tied directly to your request.
```
networkworld.com. 300 IN A 151.101.2.165
networkworld.com. 300 IN A 151.101.66.165
networkworld.com. 300 IN A 151.101.130.165
networkworld.com. 300 IN A 151.101.194.165
networkworld.com. 14400 IN NS ns-d.pnap.net.
networkworld.com. 14400 IN NS ns-a.pnap.net.
networkworld.com. 14400 IN NS ns0.pcworld.com.
networkworld.com. 14400 IN NS ns1.pcworld.com.
networkworld.com. 14400 IN NS ns-b.pnap.net.
networkworld.com. 14400 IN NS ns-c.pnap.net.
;; Received 269 bytes from 70.42.185.30#53(ns0.pcworld.com) in 116 ms
```
### Picking your responder
You can use the **@** sign to specify a particular name server that you want to handle your query. Here were asking the primary name server for Google to respond to our query:
```
$ dig @8.8.8.8 networkworld.com
; <<>> DiG 9.16.1-Ubuntu <<>> @8.8.8.8 networkworld.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43640
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;networkworld.com. IN A
;; ANSWER SECTION:
networkworld.com. 299 IN A 151.101.66.165
networkworld.com. 299 IN A 151.101.194.165
networkworld.com. 299 IN A 151.101.130.165
networkworld.com. 299 IN A 151.101.2.165
;; Query time: 48 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sat Jul 25 11:21:19 EDT 2020
;; MSG SIZE rcvd: 109
```
The command shown below does a reverse lookup of the 8.8.8.8 IP address to show that it belongs to Google's DNS server.
```
$ nslookup 8.8.8.8
8.8.8.8.in-addr.arpa name = dns.google.
```
#### Wrap-Up
The dig command is an essential tool for both grasping how DNS works and troubleshooting connection problems when they arise.
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/3568488/digging-for-dns-answers-on-linux.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://www.flickr.com/photos/auntylaurie/15997799384
[2]: https://creativecommons.org/licenses/by/2.0/legalcode
[3]: https://www.networkworld.com/article/3268449/what-is-dns-and-how-does-it-work.html
[4]: https://tools.ietf.org/html/rfc1035
[5]: https://www.facebook.com/NetworkWorld/
[6]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,291 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to create a documentation site with Docsify and GitHub Pages)
[#]: via: (https://opensource.com/article/20/7/docsify-github-pages)
[#]: author: (Bryant Son https://opensource.com/users/brson)
How to create a documentation site with Docsify and GitHub Pages
======
Use Docsify to create documentation web pages to publish on GitHub
Pages.
![Digital creative of a browser on the internet][1]
Documentation is an essential part of making any open source project useful to users. But it's not always developers' top priority, as they may be more focused on making their application better than on helping people use it. This is why making it easier to publish documentation is so valuable to developers. In this tutorial, I'll show you one option for doing so: combining the [Docsify][2] documentation generator with [GitHub Pages][3]. 
If you prefer to learn by video, you can access the YouTube version of this how-to:
By default, GitHub Pages prompts users to use [Jekyll][4], a static site generator that supports HTML, CSS, and other web technologies. Jekyll generates a static website from documentation files encoded in Markdown format, which GitHub automatically recognizes due to their .md or .markdown extension. While this setup is nice, I wanted to try something else.
Fortunately, GitHub Pages' HTML file support means you can use other site-generation tools, including Docsify, to create a website on the platform. Docsify is an MIT-Licensed open source project with [features][5] that make it easy to create an attractive advanced documentation site on GitHub Pages.
![Docsify][6]
(Bryant Son, [CC BY-SA 4.0][7])
### Get started with Docsify
There are two ways to install Docsify:
1. Docsify's command-line interface (CLI) through NPM
2. Manually by writing your own `index.html`
Docsify recommends the NPM approach, but I will use the second option. If you want to use NPM, follow the instructions in the [quick-start guide][8].
### Download the sample content from GitHub
I've published this example's source code on the [project's GitHub page][9]. You can download the files individually or [clone the repo][10] with:
```
`git clone https://github.com/bryantson/OpensourceDotComDemos`
```
Then `cd` into the DocsifyDemo directory.
I will walk you through the cloned code from my sample repo below, so you can understand how to modify Docsify. If you prefer, you can start from scratch by creating a new `index.html` file, like in the [example][11] in Docsify's docs:
```
&lt;!-- index.html --&gt;
&lt;!DOCTYPE html&gt;
&lt;[html][12]&gt;
&lt;[head][13]&gt;
  &lt;[meta][14] http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"&gt;
  &lt;[meta][14] name="viewport" content="width=device-width,initial-scale=1"&gt;
  &lt;[meta][14] charset="UTF-8"&gt;
  &lt;[link][15] rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/themes/vue.css"&gt;
&lt;/[head][13]&gt;
&lt;[body][16]&gt;
  &lt;[div][17] id="app"&gt;&lt;/[div][17]&gt;
  &lt;[script][18]&gt;
    window.$docsify = {
      //...
    }
  &lt;/[script][18]&gt;
  &lt;[script][18] src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"&gt;&lt;/[script][18]&gt;
&lt;/[body][16]&gt;
&lt;/[html][12]&gt;
```
### Explore how Docsify works
If you cloned my [GitHub repo][10] and changed into the DocsifyDemo directory, you should see a file structure like this:
![File contents in the cloned GitHub][19]
(Bryant Son, [CC BY-SA 4.0][7])
File/Folder Name | What It Is
---|---
index.html | The main Docsify initiation file (and the most important file)
_sidebar.md | Renders the navigation
README.md | The default Markdown file at the root of your documentation
images | Contains a sample .jpg image from the README.md
Other directories and files | Contain navigatable Markdown files
`Index.html` is the only thing required for Docsify to work. Open the file, so you can explore the contents:
```
&lt;!-- index.html --&gt;
&lt;!DOCTYPE html&gt;
&lt;[html][12]&gt;
&lt;[head][13]&gt;
  &lt;[meta][14] http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"&gt;
  &lt;[meta][14] name="viewport" content="width=device-width,initial-scale=1"&gt;
  &lt;[meta][14] charset="UTF-8"&gt;
  &lt;[link][15] rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/themes/vue.css"&gt;
  &lt;[title][20]&gt;Docsify Demo&lt;/[title][20]&gt;
&lt;/[head][13]&gt;
&lt;[body][16]&gt;
  &lt;[div][17] id="app"&gt;&lt;/[div][17]&gt;
  &lt;[script][18]&gt;
    window.$docsify = {
      el: "#app",
      repo: '<https://github.com/bryantson/OpensourceDotComDemos/tree/master/DocsifyDemo>',
      loadSidebar: true,
    }
  &lt;/[script][18]&gt;
  &lt;[script][18] src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"&gt;&lt;/[script][18]&gt;
&lt;/[body][16]&gt;
&lt;/[html][12]&gt;
```
This is essentially just a plain HTML file, but take a look at these two lines:
```
&lt;[link][15] rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/themes/vue.css"&gt;
... SOME OTHER STUFFS ...
&lt;[script][18] src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"&gt;&lt;/[script][18]&gt;
```
These lines use content delivery network (CDN) URLs to serve the CSS and JavaScript scripts to transform the site into a Docsify site. As long as you include these lines, you can turn your regular GitHub page into a Docsify page.
The first line after the `body` tag specifies what to render:
```
`<div id="app"></div>`
```
Docsify is using the [single page application][21] (SPA) approach to render a requested page instead of refreshing an entirely new page.
Last, look at the lines inside the `script` block:
```
&lt;[script][18]&gt;
    window.$docsify = {
      el: "#app",
      repo: '<https://github.com/bryantson/OpensourceDotComDemos/tree/master/DocsifyDemo>',
      loadSidebar: true,
    }
&lt;/[script][18]&gt;
```
In this block:
* The `el` property basically says, "Hey, this is the `id` I am looking for, so locate the `id` and render it there."
* Changing the `repo` value identifies which page users will be redirected to when they click the GitHub icon in the top-right corner.
![GitHub icon][22]
(Bryant Son, [CC BY-SA 4.0][7])
* Setting `loadSideBar` to `true` will make Docsify look for the `_sidebar.md` file that contains your navigation links.
You can find all the options in the [Configuration][23] section of Docsify's docs.
Next, look at the `_sidebar.md` file. Because you set the `loadSidebar` property value to `true` in `index.html`, Docsify will look for the `_sidebar.md` file and generate the navigation file from its contents. The `_sidebar.md` contents in the sample repo are:
```
&lt;!-- docs/_sidebar.md --&gt;
* [HOME](./)
* [Tutorials](./tutorials/index)
  * [Tomcat](./tutorials/tomcat/index)
  * [Cloud](./tutorials/cloud/index)
  * [Java](./tutorials/java/index)
* [About](./about/index)
* [Contact](./contact/index)
```
This uses Markdown's link format to create the navigation. Note that the Tomcat, Cloud, and Java links are indented; this causes them to be rendered as sublinks under the parent link.
Files like `README.md` and `images` pertain to the repository's structure, but all the other Markdown files are related to your Docsify webpage.
Modify the files you downloaded however you want, based on your needs. In the next step, you will add these files to your GitHub repo, enable GitHub Pages, and finish the project.
### Enable GitHub Pages
Create a sample GitHub repo, then use the following GitHub commands to check, commit, and push your code:
```
$ git clone LOCATION_TO_YOUR_GITHUB_REPO
$ cd LOCATION_TO_YOUR_GITHUB_REPO
$ git add .
$ git commit -m "My first Docsify!"
$ git push
```
Set up your GitHub Pages page. From inside your new GitHub repo, click **Settings**:
![Settings link in GitHub][24]
(Bryant Son, [CC BY-SA 4.0][7])
Scroll down until you see **GitHub Pages**:
![GitHub Pages settings][25]
(Bryant Son, [CC BY-SA 4.0][7])
Look for the **Source** section:
![GitHub Pages settings][26]
(Bryant Son, [CC BY-SA 4.0][7])
Click the drop-down menu under **Source**. Usually, you will set this to the **master branch**, but you can use another branch, if you'd like:
![Setting Source to master branch][27]
(Bryant Son, [CC BY-SA 4.0][7])
That's it! You should now have a link to your GitHub Pages page. Clicking the link will take you there, and it should render with Docsify:
![Link to GitHub Pages docs site][28]
(Bryant Son, [CC BY-SA 4.0][7])
And it should look something like this:
![Example Docsify site on GitHub Pages][29]
(Bryant Son, [CC BY-SA 4.0][7])
### Conclusion
By editing a single HTML file and some Markdown text, you can create an awesome-looking documentation site with Docsify. What do you think? Please leave a comment and also share any other open source tools that can be used with GitHub Pages.
See how Jekyll, an open source generator of static HTML files, makes running a blog as easy as...
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/docsify-github-pages
作者:[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/browser_web_internet_website.png?itok=g5B_Bw62 (Digital creative of a browser on the internet)
[2]: https://docsify.js.org
[3]: https://pages.github.com/
[4]: https://docs.github.com/en/github/working-with-github-pages/about-github-pages-and-jekyll
[5]: https://docsify.js.org/#/?id=features
[6]: https://opensource.com/sites/default/files/uploads/docsify1_ui.jpg (Docsify)
[7]: https://creativecommons.org/licenses/by-sa/4.0/
[8]: https://docsify.js.org/#/quickstart?id=quick-start
[9]: https://github.com/bryantson/OpensourceDotComDemos/tree/master/DocsifyDemo
[10]: https://github.com/bryantson/OpensourceDotComDemos
[11]: https://docsify.js.org/#/quickstart?id=manual-initialization
[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/link.html
[16]: http://december.com/html/4/element/body.html
[17]: http://december.com/html/4/element/div.html
[18]: http://december.com/html/4/element/script.html
[19]: https://opensource.com/sites/default/files/uploads/docsify3_files.jpg (File contents in the cloned GitHub)
[20]: http://december.com/html/4/element/title.html
[21]: https://en.wikipedia.org/wiki/Single-page_application
[22]: https://opensource.com/sites/default/files/uploads/docsify4_github-icon_rev_0.jpg (GitHub icon)
[23]: https://docsify.js.org/#/configuration?id=configuration
[24]: https://opensource.com/sites/default/files/uploads/docsify5_githubsettings_0.jpg (Settings link in GitHub)
[25]: https://opensource.com/sites/default/files/uploads/docsify6_githubpageconfig_rev.jpg (GitHub Pages settings)
[26]: https://opensource.com/sites/default/files/uploads/docsify6_githubpageconfig_rev2.jpg (GitHub Pages settings)
[27]: https://opensource.com/sites/default/files/uploads/docsify8_setsource_rev.jpg (Setting Source to master branch)
[28]: https://opensource.com/sites/default/files/uploads/docsify9_link_rev.jpg (Link to GitHub Pages docs site)
[29]: https://opensource.com/sites/default/files/uploads/docsify2_examplesite.jpg (Example Docsify site on GitHub Pages)

View File

@ -0,0 +1,106 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Why now is the best time to use GNOME)
[#]: via: (https://opensource.com/article/20/7/new-gnome-features)
[#]: author: (Jim Hall https://opensource.com/users/jim-hall)
Why now is the best time to use GNOME
======
GNOME developer Emmanuele Bassi explains the user experience updates in
the GNOME desktop environment.
![Take a look at the latest from GNOME 3][1]
The GNOME desktop environment has been through many changes since its initial release in March 1999. For most of this time, the open source project has issued updates twice a year, which gives users predictability in when they can expect new features to land on their Linux and other Unix-like desktops. Its latest release, GNOME 3.36, came out in March, and the project is preparing to issue its next iteration in September. To learn about what's new in GNOME, I spoke with Emmanuele Bassi.
Emmanuele has been contributing to GNOME for more than 15 years. He started as the maintainer of language bindings that allow developers to use GNOME libraries in other programming languages, then moved on to contribute to GTK (a cross-platform widget for developing GNOME apps) and other parts of GNOME. In 2018, GNOME hired Emmanuele as a full-time GTK Core Developer, where he works on GTK and the GNOME application development platform.
**Jim Hall:** **GNOME 3.36 was released in March 2020. What are some of the major features people should know about?**
**Emmanuele Bassi:** GNOME has followed a release schedule for the last 18 or so years. GNOME doesn't release when a new feature is ready; we release when it's time. That simplifies the new releases. There isn't a "next big thing" in GNOME. Instead, it's just a new release every six months. We always fix bugs, add new features, and polish up what's there.
This release was really about making sure all the features were nice to use and pleasant to use. In GNOME 3.36, there's a lot that improves the user experience. One thing I like is the ability to turn off notifications. This is a feature that was available in a very old version of GNOME but was removed a while back because the mechanism underneath it wasn't very reliable. But we added it back because this feature is so useful and important to a lot of people.
You can toggle notifications on and off for everything or set them for each application you use. You can find this setting in the GNOME Settings app, under the Applications menu.
![GNOME "Do Not Disturb" feature][2]
Click "Do Not Disturb" to turn off notifications. (GNOME, [CC BY-SA 4.0][3])
![Notifications options in GNOME Settings][4]
You can turn off notifications for individual applications in the Settings app. (Jim Hall, [CC BY-SA 4.0][3])
We also added extra polish to the GNOME lock screen. This updated lock screen has been in the works for ages, and now it's ready. The new GNOME lock screen will blur the background of your current workspace but doesn't show your running applications. It's a great feature for the user experience. We've been working on that for the last three or four cycles, and we fixed a lot of things along the way to make that work well.
Another thing that's important for user experience is that [there is a new] place to put all the extensions. [It was in] GNOME Software Center, but no one knew to look there. Now there's a separate application to manage it.
![GNOME Extensions app][5]
The new Extensions app lets you change extension preferences or turn off those you don't want. (GNOME, [CC BY-SA 4.0][3])
And there's lots of little polish added to the GNOME Shell itself. For example, the application folders in the GNOME Shell application launcher are a great new feature. It's really easy to create your own application groups or folders in the launcher. A lot of people had asked for this for a long time. Application folders actually landed in an earlier GNOME release, but [the feature] needed extra work to make it really great, and that's what you see in GNOME 3.36.
**JH: What are some features of GNOME that more people should know about?**
**EB:** I don't know that there are other features that are really big in GNOME 3.36. If you're already using GNOME, the biggest thing you'll see is the improved user experience. If you aren't using GNOME, then the big thing is the consistent behavior in using GNOME. It's about a smooth experience with your computer, like your computer isn't going to be bothering you.
Password fields are easier. This used to be in a menu that you had to know existed if you wanted to use it, but now it's right there.
**JH: This is a great feature if you use long and complex passwords, like me. In any GNOME prompt where you would type in a password, you can click a little icon to expose your password to make sure you typed it correctly.**
![GNOME lock screen][6]
The lock screen includes the new "show your password" feature. (GNOME, [CC BY-SA 4.0][3])
**EB:** The new application folders in the GNOME application launcher is another [feature to know about]. The folders are easier to see, and they look great. GNOME will suggest a name for the application folder, but it's really easy to give that folder a different name.
And more applications in GNOME are now responsive to being resized. They changed that in the user interface. The Settings app is a good example of that. If you make it too narrow, it changes how it displays things. We've been working on this for a while because of companies like Purism that are putting GNOME on other display sizes like phones or anyone who is using GNOME on other form factors.
You don't notice some of the changes until you use them. There are lots of great features to see and that allow you to use GNOME in different ways.
**JH: As a GNOME developer and user, what GNOME features do you find most useful in your daily work?**
**EB:** I get a lot of use in the keyboard navigation. I use the keyboard all the time, so I live with my hands on the keyboard. When I use the mouse, I sometimes can get RSI (repetitive strain injury) by using it too much. Being able to use the keyboard for everything is great.
The keyboard shortcuts are part of the GNOME Accessibility. It's also part of a design direction to be able to count on keyboard shortcuts for things. Keyboard accessibility is a core part of the design language; it's not a side feature that will be dropped someday.
And having multiple windows on the screen and being able to tile them up, so I have two windows side by side. That, and multiple workspaces. I used to micromanage my workspaces back in the 1990s with different virtual desktops. But I'd always create more virtual desktops than I needed. But in GNOME, it's easy enough to create a new workspace if you need it, and when you don't need it, it's gone.
**JH: We're already in the GNOME 3.37 development cycle, with GNOME 3.38 planned for September 2020. What are some new features showing up that will interest people?**
**EB:** There are new changes all the time. One thing we're working on is the application grid and making that customizable. Right now, the applications are listed alphabetically, but you will be able to drag them around in any order you want. That will finish a massive change that's been in the works for five years or more. The goal is to be less automated and more user-driven.
Another thing happening is the GNOME Shell; developers want to do some tests on the Overview layout. Right now, you have a dashboard on the left and one on the right and windows in the center. We're trying to remove the dashboard because it's not helpful. If you want to configure it, you can. This is kind of being driven by the mobile effort. On the desktop, you're in Landscape mode and you have a lot of room to put things on the screen. But on mobile, you're probably in Portrait mode, and you have less space. So we're experimenting with new layouts and new ways to display the content. Some of that will land in GNOME 3.38, but it's been a really long project, so we'll see.
There are more features in GNOME Settings. A multi-tasking panel is planned in GNOME 3.38. Some of these settings exist already in the GNOME Tweaks app, and some of those will move from Tweaks into the main Settings app. Like being able to disable the hot corner—some people don't like that feature. Or letting you control the user interface when it comes to multiple screens—like if you want workspaces on multiple screens or just want workspaces on your main screen. Lots of these settings are not exposed right now unless you go into GNOME Tweaks, so we're moving those.
And I should mention that there's lots of work by everyone in GNOME to make things faster, even for people running on more limited systems like the Raspberry Pi. There's been a lot of work to get GNOME to perform better. That's a lot of work that people have been focusing on, because people really care about it.
* * *
You can download and learn more about GNOME, including its underlying technologies, getting involved, and more on its [website][7]. If you're curious to learn what else is new in GNOME, check out the [GNOME 3.36 release notes][8].
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/new-gnome-features
作者:[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/gnome-3-opensourcecom-lead.png?itok=FCw4KaGT (Take a look at the latest from GNOME 3)
[2]: https://opensource.com/sites/default/files/uploads/gnome-do-not-disturb.png (GNOME "Do Not Disturb" feature)
[3]: https://creativecommons.org/licenses/by-sa/4.0/
[4]: https://opensource.com/sites/default/files/uploads/gnome-settings-rhythmbox-notif.png (Notifications options in GNOME Settings)
[5]: https://opensource.com/sites/default/files/uploads/gnome-extensions.png (GNOME Extensions app)
[6]: https://opensource.com/sites/default/files/uploads/gnome-lock-screen.png (GNOME lock screen)
[7]: https://www.gnome.org/
[8]: https://help.gnome.org/misc/release-notes/3.36/

View File

@ -0,0 +1,207 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to Install Discord Application in Ubuntu and Other Linux Distributions [3 Methods])
[#]: via: (https://itsfoss.com/install-discord-linux/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
How to Install Discord Application in Ubuntu and Other Linux Distributions [3 Methods]
======
[Discord][1] is a popular messaging application. It was originally intended for gamers but these days, it is considered a [Slack alternative][2] even for team and community communication. You can use it for text, voice and video messaging.
Several open source project use it for communicating with project members and users.
Discord is available on various platforms including desktop Linux. In this tutorial, Ill show you various ways of installing Discord on Ubuntu, Debian and other Linux distributions.
* [Installing Discord via DEB file][3] (applicable to Debian, Ubuntu, Linux Mint and other Debian/Ubuntu based distributions)
* [Installing Discord via Snap or Flatpak][4] (applicable for distributions with Snap or Flatpak support)
* [Installing Discord in traditional way][5] (applicable for all distributions but need good knowledge of Linux commands)
Non-FOSS alert!
Discord application is not open source. But since they provide a Linux client and many Linux users rely on it, its been covered here.
### Method 1: Installing Discord in Ubuntu and Debian-based Linux Distributions
Go to the [download page of Discord][6] and download the deb file. Keep in mind that, Discord is only available for 64-bit systems.
![Download Discord for Linux][7]
[Installing deb file is easy][8]. Just double click on it to open it in the software manager and install it from there. You may also install and [use Gdebi tool][9] for this purpose.
It will take a few seconds for installing and you should see a log in screen like this:
![][10]
The problem with this approach is that though youll have the latest Discord version, it wont be updated to a newer version automatically in the future.
You can either uninstall it from the software center or use this command in the terminal:
```
sudo apt remove discord
```
### Method 2: Installing Discord on Ubuntu and other Linux distributions using Snap package
You can easily install Discord using Snap package in Ubuntu and various other Linux distributions with snap package support.
The advantage is that youll always have the latest version of Discord and your installed version gets automatically updated. The downside is that Snap packages take longer to start.
Ubuntu user can find [Discord snap package][11] in the Software Center and install from there:
![Discord snap package is available in Ubuntu Software Center][12]
If you have enabled Snap support on your Linux distribution, you can use the following command to install it:
```
sudo snap install discord
```
If you want to remove it, you can use the snap command to uninstall it:
```
sudo snap remove discord
```
Please note that [Discord is also available in Flatpak package format][13]. You can [use Flatpak][14] to install it in Fedora and other Linux distributions.
### Method 3: Installing Discord in other Linux Distributions (intermediate to advanced level)
Discord also provides a generic isntaller for using Discord on Linux. It comes in the traditional tar gz file.
If you go for this way of installing Discord on Linux, then you should have at least a moderate [understanding of Linux directory structure][15] and Linux commands. You must also be comfortable using the terminal because this method involves using the terminal all the way.
#### Step 1: Download Discord for Linux
First [download the tar.gz file from Discords website][6].
I am using Discord version 0.0.10 in the tutorial. Your file name may or may not be different. Pay attention to it.
#### Step 2: Extract the downloaded file to opt directory
Go to directory where you have downloaded the file. Use the tar command to extract the .tar.gz file in the /opt directory.
```
sudo tar -xvzf discord-0.0.10.tar.gz -C /opt
```
Traditionally, the /opt directory is used for installing/keeping files of optional or additional Linux software. Since you opted for the traditional way, it only makes sense to use the traditional convention.
#### Step 3: Create Discord command in bin directory
Now you should have /opt/Discord directory with files related to Discord. You should have two important files to tackle here. A binary file named Discord and a desktop file named discord.desktop.
Now, you should [create a symbolic link][16] to this binary file in /usr/bin directory.
```
sudo ln -sf /opt/Discord/Discord /usr/bin/Discord
```
The /usr/bin directory contains the binary executables for commands in your system. This way, any user can run the commands from anywhere in the system.
#### Step 4: Create desktop icon and menu entry
You have Discord available as a command for all users on the system. But you cannot find it in the system menu to launch it graphically.
For that, youll have to use the discord.desktop file located in the extracted folder in the opt directory.
You should pay attention to two lines here: Exec and Icon.
The exec is for executable file and you can set it to /usr/bin/Discord . The Icon is for the image of Discord that will be displayed when you search for Discord in the menu. You can set it to the /opt/Discord/discord.png. This image is present in the extracted folder.
You can [use nano editor][17] with sudo for editing this file or whichever [terminal-based text editor][18] you prefer. Your discord.desktop may look something like this:
![][19]
Your discord.desktop file is still in the /opt/Discord directory. You need to move it to /usr/share/applications directory so that your system can access this desktop entry.
```
sudo cp -r /opt/Discord/discord.desktop /usr/share/applications
```
Normally, you should see Discord added in the list of available applications in the menu immediately. If not, log out and log in again.
#### Step 5: Run Discord
You are done. Now if you search for Discord, you will find it in the menu and when you run it for the first time, it will do some configuration.
![Running Discord for the first time][20]
After that, it will bring you to the login screen. It automatically tried to log you in from your default browser.
![][10]
Enjoy Discord on Linux. If there is a new version of Discord in the future, youll have to remove the already installed version and then repeat the procedure with the new version.
#### Removing Discord installed in the traditional way
It would be unfair to just discuss how to install Discord. Let me give you some pointers about removing it as well.
When you install Discord on Linux, it saves config file in .config/discord folder in your home directory. Delete these files:
```
rm -r ~/.config/discord
```
Next, remove the Discord directory from the /opt directory:
```
sudo rm -rf /usr/bin/Discord
```
Also delete the symbolic link you had created:
```
sudo rm /usr/bin/Discord
```
As the last step, remove the desktop file:
```
sudo rm /usr/share/applications/discord.desktop
```
**Did you manage to install Discord on Linux? Which method did you use?**
I gave you various ways of installing Discord application on Linux. The traditional Linux way is somewhat complicated but at least this way you can install it on any Linux distribution.
Did you manage to install it? Which method did you use and prefer?
--------------------------------------------------------------------------------
via: https://itsfoss.com/install-discord-linux/
作者:[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://discord.com/
[2]: https://itsfoss.com/open-source-slack-alternative/
[3]: tmp.ehA52f5sBZ#via-deb
[4]: tmp.ehA52f5sBZ#via-snap
[5]: tmp.ehA52f5sBZ#traditional-method
[6]: https://discord.com/new/download
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/download-discord-linux.png?ssl=1
[8]: https://itsfoss.com/install-deb-files-ubuntu/
[9]: https://itsfoss.com/gdebi-default-ubuntu-software-center/
[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/discord-login-screen.jpg?ssl=1
[11]: https://snapcraft.io/discord
[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/install-discord-snap.jpg?ssl=1
[13]: https://flathub.org/apps/details/com.discordapp.Discord
[14]: https://itsfoss.com/flatpak-guide/
[15]: https://linuxhandbook.com/linux-directory-structure/
[16]: https://linuxhandbook.com/symbolic-link-linux/
[17]: https://itsfoss.com/nano-editor-guide/
[18]: https://itsfoss.com/command-line-text-editors-linux/
[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/installing-discord-in-linux-traditional-way.png?ssl=1
[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/discord-install.jpg?ssl=1

View File

@ -0,0 +1,71 @@
[#]: collector: (lujun9972)
[#]: translator: (JonnieWayy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (What you need to know about Rust in 2020)
[#]: via: (https://opensource.com/article/20/1/rust-resources)
[#]: author: (Ryan Levick https://opensource.com/users/ryanlevick)
2020 年关于 Rust 你所需要知道的
======
尽管许多程序员长期以来一直将 Rust 用于业余爱好项目,但正如 Opensource.com 上许多有关 Rust 的热门文章所解释的那样,该语言在 2019 年吸引了主要技术公司的支持。
![用笔记本电脑的人][1]
一段时间以来, [Rust][2] 在诸如 Hacker News 之类的网站上引起了程序员大量的关注。尽管许多人一直喜欢在业余爱好项目中[使用该语言][3],但直到 2019 年它才开始在工业界流行,直到那会儿情况才真正开始有所转变。
在过去的一年中,包括 [Microsoft][4]、 [Facebook][5] 和 [Intel][6] 在内的许多大公司都出来支持 Rust许多[较小的公司][7]也注意到了这一点。2016 年,作为欧洲最大的 Rust 大会 [RustFest][8] 的第一主持人,我没见到任何一个人工作中使用 Rust 但却不在 Mozilla 工作的。三年后,似乎我在 RustFest 2019 有所交流的每个人都将 Rust 用于izard其他公司的日常工作无论是作为游戏开发人员、银行的后端工程师、开发者工具的创造者或是其他的一些岗位。
在 2019 年, Opensource.com 也通过报道 Rust 日益增长的受欢迎程度而发挥了作用。万一您错过了它们,这里是过去一年里 Opensource.com 上关于 Rust 的热门文章。
### 使用 rust-vmm 构建未来的虚拟化堆栈
Amazon 的 [Firecracker][9] 是支持 AWS Lambda 和 Fargate 的虚拟化技术,完全使用 Rust 编写。这项技术的作者之一 Andreea Florescu 在 [**《使用 rust-vmm 构建未来的虚拟化堆栈》**][10]中提供了对 Firecracker 及其相关技术的深刻见解。
Firecracker 最初是 Google [CrosVM][11] 的一个分支,但是很快由于两个项目的不同需求而分化。尽管如此,在这个项目与其他用 Rust 所编写的虚拟机管理器VMM之间仍有许多得到了很好共享的通用片段。考虑到这一点 [rust-vmm][12] 起初是以一种让 Amazon 和 Google Intel 和 Red Hat 以及其余开源社区去相互共享通用 Rust “crates” (即程序包)的方式开始的。其中包括 KVM 接口Linux 虚拟化 API、 Virtio 设备支持以及内核加载程序。
看到软件行业的一些巨头围绕用 Rust 编写的通用技术栈协同工作,实在是很神奇。鉴于这种和其他[使用 Rust 编写的技术堆栈][13]之间的伙伴关系,到了 2020 年,看到更多这样的情况我不会感到惊讶。
### 为何选择 Rust 作为你的下一门编程语言
采用一门新语言,尤其是在有着建立已久技术栈的大公司,并非易事。我很高兴写了[《为何选择 Rust 作为你的下一门编程语言》][14],书中讲述了 Microsoft 是如何在没有考虑其他这么多有趣的编程语言的情况下选择了采用 Rust。
选择编程语言涉及许多不同的标准——从技术上到组织上,甚至是情感上。 其中一些标准比其他的更容易衡量。比方说,了解技术变更的成本(例如调整构建系统和构建新工具)要比理解组织或情感问题(例如高效或快乐的开发人员将如何使用这种新语言)容易得多。 此外,易于衡量的标准通常与成本相关,而难以衡量的标准通常以收益为导向。 这通常会导致成本在决策过程中变得越来越重要,即使这不一定就是说成本要比收益更重要——只是成本更容易衡量。 这使得公司不太可能采用新的语言。
然而Rust 最大的好处之一是很容易衡量其编写安全且高性能系统软件的能力。鉴于 Microsoft 70% 的安全漏洞是由于 Rust 旨在防止的内存安全问题导致的,而且这些问题每年都使公司付出了几十亿美元的代价,很容易衡量并理解采用这门语言的好处。
是否会在 Microsoft 全面采用 Rust 尚待观察,但是仅凭着相对于现有技术具有明显且可衡量的好处这一事实, Rust 的未来一片光明。
### 2020 年的 Rust
尽管要达到 C++ 等语言的流行度还有很长的路要走。Rust 实际上已经开始在工业界引起关注。我希望更多公司在 2020 年开始采用 Rust。 Rust 社区现在必须着眼于欢迎开发人员和公司加入社区,同时确保将推动该语言发展到现在的一切都保留下来。
Rust 不仅仅是一个编译器和一组库,而是一群想要使系统编程变得容易、安全而且有趣的人。即将到来的这一年,对于 Rust 从业余爱好语言到软件行业所使用的主要语言之一的转型至关重要。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/1/rust-resources
作者:[Ryan Levick][a]
选题:[lujun9972][b]
译者:[JonnieWayy](https://github.com/JonnieWayy)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/ryanlevick
[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://rust-lang.org/
[3]: https://insights.stackoverflow.com/survey/2019#technology-_-most-loved-dreaded-and-wanted-languages
[4]: https://youtu.be/o01QmYVluSw
[5]: https://youtu.be/kylqq8pEgRs
[6]: https://youtu.be/l9hM0h6IQDo
[7]: https://oxide.computer/blog/introducing-the-oxide-computer-company/
[8]: https://rustfest.eu
[9]: https://firecracker-microvm.github.io/
[10]: https://opensource.com/article/19/3/rust-virtual-machine
[11]: https://chromium.googlesource.com/chromiumos/platform/crosvm/
[12]: https://github.com/rust-vmm
[13]: https://bytecodealliance.org/
[14]: https://opensource.com/article/19/10/choose-rust-programming-language

View File

@ -1,100 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (JonnieWayy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Book Review: A Byte of Vim)
[#]: via: (https://itsfoss.com/book-review-a-byte-of-vim/)
[#]: author: (John Paul https://itsfoss.com/author/john/)
书评A Byte of Vim
======
[Vim][1]是一个简单而又强大的文本编辑工具。大多数新用户都会被它吓倒因为它不像常规的图形化文本编辑器那样“工作”。Vim“不寻常”的键盘快捷键让人很好奇[如何保存并退出Vim][2]. 但一旦你掌握了Vim就不会再产生这样的问题了。
网上有大量的[Vim资源][3]。我们也在It's FOSS上介绍了一些Vim技巧。除了线上资源也有很多书致力于介绍这个编辑器。今天我们要介绍的是一本旨在使Vim易于大多数用户理解的书。我们将讨论的书是[Swaroop C H][5]的[《A Byte of Vim》][4]。
本书作者[Swaroop C H]已经在计算机领域工作了十余年。他曾在Yahoo和Adobe工作过。大学毕业后他通过售卖Linux CD赚钱。他曾多次创业包括一个名为ion的iPod充电器。他目前是[Helpshift][7] AI团队的工程经理。
### A Byte of Vim
![][8]
和所有好书一样《A Byte of Vim》从谈论什么是Vim开始“一个用于写各类文本的电脑程序。”他继续说道“Vim之所以与众不同是因为它是为数不多的既简单又强大的软件之一。”
在深入讲解如何使用Vim之前Swaroop先告诉读者如何在Windows、Mac、Linux和BSD上安装Vim。安装完成后他将进而指导读者完成如何启动Vim以及如何创建第一个文件。
接着Swaroop讨论了Vim的不同模式以及如何通过Vim的键盘快捷键在文档中浏览。接着是使用Vim编辑文档的基础知识包括剪切/赋值/粘帖以及撤销/重做的Vim版本。
在涵盖了编辑基础知识后Swaroop讨论了使用Vim编辑单个文档的多个部分。读者也可以使用多个标签和窗口来同时编辑多个文档。
[][9]
推荐阅读  《Bring Your Old Computer Back to Life With 4MLinux》
本书还涵盖了通过编写脚本和安装插件来扩展Vim的功能。在Vim中使用脚本有两种方法一种是使用Vim的内置脚本语言另一种是使用Python或Perl等编程语言来访问Vim的内核。可以编写或下载五种类型的Vim插件vimrc全局插件文件类型插件语法突出显示插件和编译器插件。
在独立的部分中Swaroop C H涵盖了使Vim更适合编程的特点。这些功能包括语法高亮、智能缩进、对Shell命令的支持、全能补全以及可用作IDE的功能。
#### 获取《A Byte of Vim》一书并为之贡献
《A Byte of Vim》由[Creative Commons 4.0][10]许可。读者可以在[作者的主页][4]上免费阅读其在线版本。您也可以免费下载其[PDF][11]、[Epub][12]或者[Mobi][13]版本。
[免费获取《A Byte of Vim》][4]
如果您更喜欢阅读[纸质版本][14],你也可以选择该选项。
请注意,** Vim字节的原始版本写于2008**并转换为PDf。不幸的是Swaroop CH丢失了原始源文件。他正在努力将该书转换为[Markdown][15]。如果您想提供帮助,请访问[图书的GitHub页面][16]。
| 简介 | 产品 | 价格 |
| --- | --- | --- |
| ![快速掌握Vim立即从WTF到OMG][17] | [在Amazon上购买][21] | $34.00[][19] |
#### 结语
当我初次对着Vim生气时我不知道该怎么办。我希望那时候我就知道《A Byte of Vim》这本书。对于任何学习Linux的人来说这本书都是不错的资源特别是当您开始学习命令行的时候。
您读过Swaroop C H的[《A Byte of Vim》][4]吗?如果读过,您是如何找到它的?如果不是,那么您最喜欢关于开源主题的是哪本书?请在下方评论区告诉我们。
[][21]
推荐阅读 《Iridium Browser: A Browser for the Privacy Conscious》
如果您觉得这篇文章有意思请花上一分钟在社交媒体、Hacker News或[Reddit][22]上分享它。
--------------------------------------------------------------------------------
via: https://itsfoss.com/book-review-a-byte-of-vim/
作者:[John Paul][a]
选题:[lujun9972][b]
译者:[JonnieWayy](https://github.com/JonnieWayy)
校对:[校对者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://www.vim.org/
[2]: https://itsfoss.com/how-to-exit-vim/
[3]: https://linuxhandbook.com/basic-vim-commands/
[4]: https://vim.swaroopch.com/
[5]: https://swaroopch.com/
[6]: https://swaroopch.com/about/
[7]: https://www.helpshift.com/
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/06/Byte-of-vim-book.png?resize=800%2C450&ssl=1
[9]: https://itsfoss.com/4mlinux-review/
[10]: https://creativecommons.org/licenses/by/4.0/
[11]: https://www.gitbook.com/download/pdf/book/swaroopch/byte-of-vim
[12]: https://www.gitbook.com/download/epub/book/swaroopch/byte-of-vim
[13]: https://www.gitbook.com/download/mobi/book/swaroopch/byte-of-vim
[14]: https://swaroopch.com/buybook/
[15]: https://itsfoss.com/best-markdown-editors-linux/
[16]: https://github.com/swaroopch/byte-of-vim#status-incomplete
[17]: https://i2.wp.com/images-na.ssl-images-amazon.com/images/I/41itW8furUL._SL160_.jpg?ssl=1
[18]: https://www.amazon.com/Mastering-Vim-Quickly-WTF-time/dp/1983325740?SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=1983325740 (Mastering Vim Quickly: From WTF to OMG in no time)
[19]: https://www.amazon.com/gp/prime/?tag=chmod7mediate-20 (Amazon Prime)
[20]: https://www.amazon.com/Mastering-Vim-Quickly-WTF-time/dp/1983325740?SubscriptionId=AKIAJ3N3QBK3ZHDGU54Q&tag=chmod7mediate-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=1983325740 (Buy on Amazon)
[21]: https://itsfoss.com/iridium-browser-review/
[22]: http://reddit.com/r/linuxusersgroup

View File

@ -7,36 +7,36 @@
[#]: via: (https://www.2daygeek.com/bash-script-to-check-how-long-the-high-cpu-memory-consumption-processes-runs-on-linux/)
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
Bash Script to Check How Long the High CPU/Memory Consumption Processes Runs on Linux
在 Linux 中运行 Bash 脚本检查高 CPU/内存消耗进程
======
In the past, we have written three different articles to identify this using Linux commands.
过去,我们写了三篇不同的文章来使用 Linux 命令来识别。
You can access them immediately by going to the relevant URLs below.
你可以通过下面相关的 URL 立即访问。
* **[How to Find High CPU Consumption Processes in Linux][1]**
* **[How to Find Out Top Memory Consuming Processes in Linux][2]**
* **[Five Ways to Check How Long a Process Has Been Running in Linux][3]**
* **[如何在 Linux 中查找高 CPU 消耗进程][1]**
* **[如何找出 Linux 中的高内存消耗进程][2]**
* **[检查进程在 Linux 中运行了多长时间的五种方法][3]**
Two scripts are included in this tutorial, which helps you to identify how long the high CPU/memory consumption processes are running on Linux.
本教程中包含两个脚本,它们可以帮助你确定 Linux 上高 CPU/内存消耗进程的运行时间。
The script will show you the process ID, the owner of the process, the name of the process and how long the processes are running.
该脚本将显示进程 ID进程的所有者进程的名称以及进程的运行时间。
This will help you identify which jobs are running overtime (which must be completed beforehand).
这将帮助你确定哪些(必须事先完成)作业正在超时运行。
This can be achieved using the ps command.
在可以使用 ps 命令来实现。
### Whats ps Command
### 什么是 ps 命令
ps stands for processes status, it display the information about the active/running processes on the system.
ps 代表进程状态,它显示有关系统上活动/正在运行的进程的信息。
It provides a snapshot of the current processes along with detailed information like username, user id, cpu usage, memory usage, process start date and time command name etc.
它提供了当前进程的快照以及详细信息,例如用户名、用户 ID、CPU 使用率、内存使用率、进程开始日期和时间等。
### 1) Bash Script to Check How Long the High CPU Consumption Processes Runs on Linux
### 1Bash 脚本检查高 CPU 消耗进程在 Linux 上运行了多长时间
This script will help you to identify how long the high CPU consumption processes has been running on Linux.
该脚本将帮助你确定高 CPU 消耗进程在 Linux 上运行了多长时间。
```
# vi /opt/scripts/long-running-cpu-proc.sh
@ -56,13 +56,13 @@ done | column -t
echo "--------------------------------------------------"
```
Set an executable **[Linux file permission][4]** to **“long-running-cpu-proc.sh”** file.
**”long-running-cpu-proc.sh“** 设置可执行**[Linux 文件权限][4]**。
```
# chmod +x /opt/scripts/long-running-cpu-proc.sh
```
When you run this script, you will get an output like the one below.
运行此脚本时,你将获得类似以下的输出。
```
# sh /opt/scripts/long-running-cpu-proc.sh
@ -82,9 +82,9 @@ daygeek 6301 Web 57:40
----------------------------------------------------
```
### 2) Bash Script to Check How Long the High Memory Consumption Processes Runs on Linux
### 2Bash 脚本检查高内存消耗进程在 Linux 上运行了多长时间
This script will help you to identify how long the top memory consumption processes has been running on Linux.
该脚本将帮助你确定最大的内存消耗进程在 Linux 上运行了多长时间。
```
# sh /opt/scripts/long-running-memory-proc.sh
@ -104,13 +104,13 @@ done | column -t
echo "--------------------------------------------------"
```
Set an executable Linux file permission to **“long-running-memory-proc.sh”** file.
**”long-running-memory-proc.sh“** 设置可执行 Linux 文件权限。
```
# chmod +x /opt/scripts/long-running-memory-proc.sh
```
When you run this script, you will get an output like the one below.
运行此脚本时,你将获得类似以下的输出。
```
# sh /opt/scripts/long-running-memory-proc.sh
@ -136,7 +136,7 @@ via: https://www.2daygeek.com/bash-script-to-check-how-long-the-high-cpu-memory-
作者:[Magesh Maruthamuthu][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (silentdawn-zz)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
@ -7,64 +7,63 @@
[#]: via: (https://opensource.com/article/20/3/zeromq-c-python)
[#]: author: (Cristiano L. Fontana https://opensource.com/users/cristianofontana)
Share data between C and Python with this messaging library
使用 ZeroMQ 消息库在 C 和 Python 间共享数据
======
ZeroMQ makes for a fast and resilient messaging library to gather data
and share between multiple languages.
ZeroMQ 是一个快速灵活的消息库,用于数据收集和不同语言间的数据共享。
![Chat via email][1]
I've had moments as a software engineer when I'm asked to do a task that sends shivers down my spine. One such moment was when I had to write an interface between some new hardware infrastructure that requires C and a cloud infrastructure, which is primarily Python.
作为软件工程师,我有多次在要求完成指定任务时感到毛骨悚然的经历。其中一次是要写个接口,用于控制一些新的底层硬件间的对接,接口实现形式分别是 C 和 云底层组件,而后者主要是 Python。
One strategy could be to [write an extension in C][2], which Python supports by design. A quick glance at the documentation shows this would mean writing a good amount of C. That can be good in some cases, but it's not what I prefer to do. Another strategy is to put the two tasks in separate processes and exchange messages between the two with the [ZeroMQ messaging library][3].
实现的方式之一是 [用 C 写扩展模块][2]Python 支持 C 扩展的调用。快速浏览文档后发现,这需要编写大量的 C 代码。这样做的话,在有些情况下效果还不错,但不是我想要的方式。另一种方式就是将两个任务放在不同的进程中,以使用 [ZeroMQ 消息库][3] 在进程间交换信息的方式实现数据的共享。
When I experienced this type of scenario before discovering ZeroMQ, I went through the extension-writing path. It was not that bad, but it is very time-consuming and convoluted. Nowadays, to avoid that, I subdivide a system into independent processes that exchange information through messages sent over [communication sockets][4]. With this approach, several programming languages can coexist, and each process is simpler and thus easier to debug.
在引入 ZeroMQ 之前,我选择了编写扩展的方式,试图解决这个场景的需求。这种方式不算太差,但非常复杂和费时。现在为了避免那些问题,我细分出一个系统作为独立的进程运行,专门用于交换通过 [通信套接字][4] 发送的消息所承载的数据。这样,不同的编程语言可以共存,每个进程也变简单了,同时也容易调试。
ZeroMQ provides an even easier process:
ZeroMQ 提供了更简单的进程:
1. Write a small shim in C that reads data from the hardware and sends whatever it finds as a message.
2. Write a Python interface between the new and existing infrastructure.
1. 编写一小组 C 代码,从硬件读取数据,发送到它能作用到的消息中。
2. 使用 Python 编写接口,实现新旧基础组件的对接。
One of ZeroMQ's project's founders is [Pieter Hintjens][5], a remarkable person with [interesting views and writings][6].
[Pieter Hintjens][5] 是 ZeroMQ 项目发起者之一,他是个拥有 [有趣视角和作品][6] 的非凡人物。
### Prerequisites
### 准备
For this tutorial, you will need:
本教程中,需要:
* A C compiler (e.g., [GCC][7] or [Clang][8])
* The [**libzmq** library][9]
* 一个 C 编译器(例如 [GCC][7] 或 [Clang][8]
* [**libzmq** 库][9]
* [Python 3][10]
* [ZeroMQ bindings][11] for python
* [ZeroMQ 的 Python 封装][11]
Install them on Fedora with:
Fedora 系统上的安装方法:
```
`$ dnf install clang zeromq zeromq-devel python3 python3-zmq`
$ dnf install clang zeromq zeromq-devel python3 python3-zmq
```
For Debian or Ubuntu:
Debian 和 Ubuntu 系统上的安装方法:
```
`$ apt-get install clang libzmq5 libzmq3-dev python3 python3-zmq`
$ apt-get install clang libzmq5 libzmq3-dev python3 python3-zmq
```
If you run into any issues, refer to each project's installation instructions (which are linked above).
如果有问题,参考对应项目的安装指南(上面附有链接)。
### Writing the hardware-interfacing library
### 编写硬件接口库
Since this is a hypothetical scenario, this tutorial will write a fictitious library with two functions:
因为这里针对的是个设想的场景,本教程虚构了包含两个函数的操作库:
* **fancyhw_init()** to initiate the (hypothetical) hardware
* **fancyhw_read_val()** to return a value read from the hardware
* **fancyhw_init()** 用来初始化(设想的)硬件
* **fancyhw_read_val()** 用于返回从硬件读取的数据
Save the library's full source code to a file named **libfancyhw.h**:
将库的完整代码保存到文件 **libfancyhw.h**:
```
@ -89,15 +88,15 @@ int16_t fancyhw_read_val(void)
#endif
```
This library can simulate the data you want to pass between languages, thanks to the random number generator.
这个库可以模拟你要在不同语言实现的组件间交换的数据,中间有劳随机数发生器。
### Designing a C interface
### 设计 C 接口
The following will go step-by-step through writing the C interface—from including the libraries to managing the data transfer.
下面从包含管理数据传输的库开始,逐步实现 C 接口。
#### Libraries
#### 需要的库
Begin by loading the necessary libraries (the purpose of each library is in a comment in the code):
开始先加载必要的库(每个库的作用见代码注释):
```
@ -115,9 +114,9 @@ Begin by loading the necessary libraries (the purpose of each library is in a co
#include "libfancyhw.h"
```
#### Significant parameters
#### 必要的参数
Define the **main** function and the significant parameters needed for the rest of the program:
定义 **main** 函数和后续过程中必要的参数:
```
@ -131,16 +130,16 @@ int main(void)
    ...
```
#### Initialization
#### 初始化
Both libraries need some initialization. The fictitious one needs just one parameter:
所有的库都需要初始化。虚构的那个只需要一个参数:
```
`fancyhw_init(INIT_PARAM);`
fancyhw_init(INIT_PARAM);
```
The ZeroMQ library needs some real initialization. First, define a **context**—an object that manages all the sockets:
ZeroMQ 库需要实打实的初始化。首先,定义对象 **context**,它是用来管理全部的套接字的:
```
@ -154,14 +153,14 @@ if (!context)
}
```
Then define the socket used to deliver data. ZeroMQ supports several types of sockets, each with its application. Use a **publish** socket (also known as **PUB** socket), which can deliver copies of a message to multiple receivers. This approach enables you to attach several receivers that will all get the same messages. If there are no receivers, the messages will be discarded (i.e., they will not be queued). Do this with:
之后定义用来发送数据的套接字。ZeroMQ 支持若干种套接字,各有其用。使用 **publish** 套接字(也叫 **PUB** 套接字),可以复制消息并分发到多个接收端。这使得你可以让多个接收端接收同一个消息。没有接收者的消息将被丢弃(即不会入消息队列)。用法如下:
```
`void *data_socket = zmq_socket(context, ZMQ_PUB);`
void *data_socket = zmq_socket(context, ZMQ_PUB);
```
The socket must be bound to an address so that the clients know where to connect. In this case, use the [TCP transport layer][15] (there are [other options][16], but TCP is a good default choice):
套接字需要绑定到一个具体的地址,这样客户端就知道要连接哪里了。本例中,使用了 [TCP 传输层][15](当然也有 [其它选项][16],但 TCP 是不错的默认选择):
```
@ -175,7 +174,7 @@ if (rb != 0)
}
```
Next, calculate some useful values that you will need later. Note **TOPIC** in the code below; **PUB** sockets need a topic to be associated with the messages they send. Topics can be used by the receivers to filter messages:
下一步, 计算一些后续要用到的值。 注意下面代码中的 **TOPIC**,因为 **PUB** 套接字发送的消息需要绑定一个 topic。topic 用于供接收者过滤消息:
```
@ -185,9 +184,9 @@ const size_t envelope_size = topic_size + 1 + PACKET_SIZE * sizeof(int16_t);
[printf][14]("Topic: %s; topic size: %zu; Envelope size: %zu\n", TOPIC, topic_size, envelope_size);
```
#### Sending messages
#### 发送消息
Start a loop that sends **REPETITIONS** messages:
启动一个 **重复** 发送消息的循环:
```
@ -196,7 +195,7 @@ for (unsigned int i = 0; i &lt; REPETITIONS; i++)
    ...
```
Before sending a message, fill a buffer of **PACKET_SIZE** values. The library provides signed integers of 16 bits. Since the dimension of an **int** in C is not defined, use an **int** with a specific width:
发送消息前,先填充一个长度为 **PACKET_SIZE** 的缓冲区。本库提供的是 16 bits 有符号整数。因为 C 语言中 **int** 类型占用空间大小与平台相关,不是确定的值,所以要使用指定宽度的 **int** 变量:
```
@ -210,7 +209,7 @@ for (unsigned int j = 0; j &lt; PACKET_SIZE; j++)
[printf][14]("Read %u data values\n", PACKET_SIZE);
```
The first step in message preparation and delivery is creating a ZeroMQ message and allocating the memory necessary for your message. This empty message is an envelope to store the data you will ship:
消息的准备和发送中,第一步是创建 ZeroMQ 消息,为消息分配必要的内存空间。空白的消息是用于封装要发送的数据的:
```
@ -227,7 +226,7 @@ if (rmi != 0)
}
```
Now that the memory is allocated, store the data in the ZeroMQ message "envelope." The **zmq_msg_data()** function returns a pointer to the beginning of the buffer in the envelope. The first part is the topic, followed by a space, then the binary data. Add whitespace as a separator between the topic and the data. To move along the buffer, you have to play with casts and [pointer arithmetic][18]. (Thank you, C, for making things straightforward.) Do this with:
现在内存空间已分配,数据保存在 ZeroMQ 消息“envelope”中。函数 **zmq_msg_data()** 返回一个指向封装数据缓存区顶端的指针。第一部分是 topic之后是一个空格最后是二进制数。topic 和二进制数据之间的分隔符采用空格字符。需要遍历缓存区的话,使用 cast 和 [指针算法][18]。(感谢 C 语言,让事情变得直截了当。)做法如下:
```
@ -236,7 +235,7 @@ Now that the memory is allocated, store the data in the ZeroMQ message "envelope
[memcpy][19]((void*)((char*)zmq_msg_data(&amp;envelope) + 1 + topic_size), buffer, PACKET_SIZE * sizeof(int16_t));
```
Send the message through the **data_socket**:
通过 **data_socket** 发送消息:
```
@ -251,7 +250,7 @@ if (rs != envelope_size)
}
```
Make sure to dispose of the envelope after you use it:
使用数据之前要先解取封装:
```
@ -260,9 +259,9 @@ zmq_msg_close(&amp;envelope);
[printf][14]("Message sent; i: %u, topic: %s\n", i, TOPIC);
```
#### Clean it up
#### 清场
Because C does not provide [garbage collection][20], you have to tidy up. After you are done sending your messages, close the program with the clean-up needed to release the used memory:
C 语言不提供 [垃圾收集][20] 功能,用完之后记得要自己扫尾。发送消息之后结束程序之前,需要运行扫尾代码,释放分配的内存:
```
@ -287,9 +286,9 @@ if (rd != 0)
return EXIT_SUCCESS;
```
#### The entire C program
#### 完整 C 代码
Save the full interface library below to a local file called **hw_interface.c**:
保存下面完整的接口代码到本地名为 **hw_interface.c** 的文件:
```
@ -408,16 +407,16 @@ int main(void)
}
```
Compile using the command:
用如下命令编译:
```
`$ clang -std=c99 -I. hw_interface.c -lzmq -o hw_interface`
$ clang -std=c99 -I. hw_interface.c -lzmq -o hw_interface
```
If there are no compilation errors, you can run the interface. What's great is that ZeroMQ **PUB** sockets can run without any applications sending or retrieving data. That reduces complexity because there is no obligation in terms of which process needs to start first.
如果没有编译错误你就可以运行这个接口了。贴心的是ZeroMQ **PUB** 套接字可以在没有任何应用发送或接受数据的状态下运行,这简化了使用复杂度,因为这样不限制进程启动的次序。
Run the interface:
运行该接口:
```
@ -432,24 +431,24 @@ Read 16 data values
...
```
The output shows the data being sent through ZeroMQ. Now you need an application to read the data.
输出显示数据已经通过 ZeroMQ 完成发送,现在要做的是让一个程序去读数据。
### Write a Python data processor
### 编写 Python 数据处理器
You are now ready to pass the data from C to a Python application.
现在已经准备好从 C 程序向 Python 应用发送数据了。
#### Libraries
####
You need two libraries to help transfer data. First, you need ZeroMQ bindings in Python:
需要两个库帮助实现数据传输。首先是 ZeroMQ 的 Python 封装:
```
`$ python3 -m pip install zmq`
$ python3 -m pip install zmq
```
The other is the [**struct** library][21], which decodes binary data. It's commonly available with the Python standard library, so there's no need to **pip install** it.
另一个就是 [**struct** 库][21],用于解码二进制数据。这个库是 Python 标准库的一部分,所以不需要使用 **pip** 命令安装。
The first part of the Python program imports both of these libraries:
Python 程序的第一部分是导入这些库:
```
@ -457,9 +456,9 @@ import zmq
import struct
```
#### Significant parameters
#### 重要参数
To use ZeroMQ, you must subscribe to the same topic used in the constant **TOPIC** above:
使用 ZeroMQ 时,只能向常量 **TOPIC** 定义相同的接收端发送消息:
```
@ -468,9 +467,9 @@ topic = "fancyhw_data".encode('ascii')
print("Reading messages with topic: {}".format(topic))
```
#### Initialization
#### 初始化
Next, initialize the context and the socket. Use a **subscribe** socket (also known as a **SUB** socket), which is the natural partner of the **PUB** socket. The socket also needs to subscribe to the right topic:
下一步,初始化上下文和套接字。使用 **subscribe** 套接字(也称为 **SUB** 套接字),它是 **PUB** 套接字的天生好友。这个套接字发送时也需要匹配 topic。
```
@ -485,9 +484,9 @@ with zmq.Context() as context:
    ...
```
#### Receiving messages
#### 接收消息
Start an infinite loop that waits for new messages to be delivered to the SUB socket. The loop will be closed if you press **Ctrl+C** or if an error occurs:
启动一个无限循环,等待接收发送到 SUB 套接字的新消息。这个循环会在你按下 **Ctrl+C** 组合键或者内部发生错误时终止:
```
@ -503,16 +502,16 @@ Start an infinite loop that waits for new messages to be delivered to the SUB so
        socket.close()
```
The loop waits for new messages to arrive with the **recv()** method. Then it splits whatever is received at the first space to separate the topic from the content:
这个循环等待 **recv()** 方法获取的新消息,然后将接收到的内容从第一个空格字符处分割开,从而得到 topic
```
`binary_topic, data_buffer = socket.recv().split(b' ', 1)`
binary_topic, data_buffer = socket.recv().split(b' ', 1)
```
#### Decoding messages
#### 解码消息
Python does yet not know that the topic is a string, so decode it using the standard ASCII encoding:
Python 此时尚不知道 topic 是个字符串,使用标准 ASCII 编解码器进行解码:
```
@ -522,7 +521,7 @@ print("Message {:d}:".format(i))
print("\ttopic: '{}'".format(topic))
```
The next step is to read the binary data using the **struct** library, which can convert shapeless binary blobs to significant values. First, calculate the number of values stored in the packet. This example uses 16-bit signed integers that correspond to an "h" in the **struct** [format][22]:
下一步就是使用 **struct** 库读取二进制数据,它可以将二进制数据段转换为明确的数值。首先,计算数据包中数值的组数。本例中使用的 16 bit 有符号整数对应的是 **struct** [格式字符][22] 中的“h”
```
@ -531,14 +530,14 @@ packet_size = len(data_buffer) // struct.calcsize("h")
print("\tpacket size: {:d}".format(packet_size))
```
By knowing how many values are in the packet, you can define the format by preparing a string with the number of values and their types (e.g., "**16h**"):
知道数据包中有多少组数据后,就可以通过构建一个包含数据组数和数据类型的字符串,来定义格式了(比如“**16h**”):
```
`struct_format = "{:d}h".format(packet_size)`
struct_format = "{:d}h".format(packet_size)
```
Convert that binary blob to a series of numbers that you can immediately print:
将二进制数据串转换为可直接打印的一系列数字:
```
@ -547,9 +546,9 @@ data = struct.unpack(struct_format, data_buffer)
print("\tdata: {}".format(data))
```
#### The full Python program
#### 完整 Python 代码
Here is the complete data receiver in Python:
下面是 Python 实现的完整的接收器:
```
@ -598,9 +597,9 @@ with zmq.Context() as context:
        socket.close()
```
Save it to a file called **online_analysis.py**. Python does not need to be compiled, so you can run the program immediately.
将上面的内容保存到名为 **online_analysis.py** 的文件。Python 代码不需要编译,你可以直接运行它。
Here is the output:
运行输出如下:
```
@ -618,13 +617,13 @@ Message 1:
...
```
### Conclusion
### 小结
This tutorial describes an alternative way of gathering data from C-based hardware interfaces and providing it to Python-based infrastructures. You can take this data and analyze it or pass it off in any number of directions. It employs a messaging library to deliver data between a "gatherer" and an "analyzer" instead of having a monolithic piece of software that does everything.
本教程介绍了一种新方式,实现从基于 C 的硬件接口收集数据,并分发到基于 Python 的基础组件的功能。借此可以获取数据供后续分析,或者转送到任意数量的接收端去。它采用了一个消息库实现数据在发送者和处理者之间的传送,来取代同样功能规模庞大的软件。
This tutorial also increases what I call "software granularity." In other words, it subdivides the software into smaller units. One of the benefits of this strategy is the possibility of using different programming languages at the same time with minimal interfaces acting as shims between them.
本教程还引出了我称之为“软件粒度”的概念,换言之,就是将软件细分为更小的部分。这种做法的优点之一就是,使得同时采用不同的编程语言实现最简接口作为不同部分之间沟通的组件成为可能。
In practice, this design allows software engineers to work both more collaboratively and independently. Different teams may work on different steps of the analysis, choosing the tool they prefer. Another benefit is the parallelism that comes for free since all the processes can run in parallel. The [ZeroMQ messaging library][3] is a remarkable piece of software that makes all of this much easier.
实践中,这种设计使得软件工程师能以更独立、合作更高效的方式做事。不同的团队可以专注于数据分析的不同方面,可以选择自己中意的实现工具。这种做法的另一个优点是实现了零代价的并行,因为所有的进程都可以并行运行。[ZeroMQ 消息库][3] 是个令人赞叹的软件,使用它可以让工作大大简化。
--------------------------------------------------------------------------------
@ -632,7 +631,7 @@ via: https://opensource.com/article/20/3/zeromq-c-python
作者:[Cristiano L. Fontana][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
译者:[silentdawn-zz](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -0,0 +1,92 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Easy DNS configuration with PowerDNS for nameservers)
[#]: via: (https://opensource.com/article/20/5/powerdns)
[#]: author: (Jonathan Garrido https://opensource.com/users/jgarrido)
使用 PowerDNS 轻松配置 DNS nameserver
======
使用 PDNS 为你的项目提供稳定可靠的域名系统 DNS 服务器。
![Computer laptop in space][1]
几个月前,我们要求为新项目提供稳定可靠的域名系统 [DNS][2] 服务器。项目使用容器进行自动部署,每个新环境都会生成唯一的随机 URL。在对可能的方案进行了大量研究之后我们决定尝试 [PowerDNS][3]PDNS
一开始,我们发现 PowerDNS 在所有主流 Linux 发行版中都受支持,它是 GPL 许可,且仓库保持更新。我们还在官方网站上发现了整洁、组织良好的[文档][4],还有网上许多喜欢且在使用这个产品的人们许多的操作方法。看了一些并学习了一些基本命令之后,安装了 PDNS启动并运行我们的旅程开始了。
### 数据库驱动
PowerDNS 将记录保存在 SQL 数据库中。这对我们来说是新的,不必使用文本文件来保存记录是一个不错的更改。我们选择 MariaDB 作为首选的强大工具,由于有大量有关安装 nameserver 的正确设置信息,我们可以完美地设置和加固我们的数据库。
### 简单配置
使我们感兴趣的第二件事是 PDNS 的所有功能都在配置文件中。pdns.conf 有许多选项,你可以通过添加或删除#号来启用或禁用这些选项。这真是太神奇了,因为它使我们有机会将这项新服务集成到我们现有的基础架构中,并且只有我们想要的功能,不多也不少。一个简单的例子:
谁可以访问你的网络服务器?
```
`webserver-allow-from=172.10.0.1,172.10.1.2`
```
我可以转发基于域的请求吗?当然!
```
forward-zones=mylocal.io=127.0.0.1:5300
forward-zones+=example.com=172.10.0.5:53
forward-zones+=lucky.tech=172.10.1.5:53
```
### 包含 API
我们可以使用配置文件进行激活,通过解决我们开发团队的第一个请求 API 服务),我们见到了 PDNS 的强大。这个功能让我们通过发送请求,简单、干净地创建、修改或删除 DNS 服务器中的记录。
API 有一些基本的安全性参数,因此,只需几步,你就可以基于 IP 地址和预共享密钥验证的组合来控制谁有权与 nameserver 进行交互。这是配置文件的样子:
```
api=yes
api-key=lkjdsfpoiernf
webserver-allow-from=172.10.7.13,172.10.7.5
```
### 日志
在日志方面PDNS 做得非常出色。你可以使用日志文件和简单的内置 Web 服务器来监控服务器并查看计算机的运行状况。你可以使用浏览器查看服务器不同类型的统计信息,例如 CPU 使用率和收到的 DNS 查询。这非常有价值。例如,我们能够检测到一些“不太健康”的 PC它们正在向我们的服务器发送与恶意流量相关的站点的 DNS 请求。深入查看日志后,我们可以看到流量来自何处,并对这些 PC 进行清理操作。
### 其他功能
这只是你使用 PowerDNS 可以做的所有事情的一瞥。它还有更多的功能。它是一个拥有很多功能和特性的完整 nameserver因此值得一试。
目前,我们尚未部署 [DNSSEC][5],但似乎只需点击一下即可将其快速投入生产。另外,在将递归服务与 nameserver 分离时PowerDNS 有个不错的方法。我了解到它还支持 [DNS RPZ][6](响应策略区域),并且还提供了非常不错且设计良好的前端,可让你使用 Web 浏览器来管理服务器,如下图。
![PowerDNS frontend][7]
([PowerDNS 文档][4]MIT 许可)
信不信由你,你只需花费几个小时了解 PDNS就可以大大提高你对 DNS 和 IT 操作的了解。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/5/powerdns
作者:[Jonathan Garrido][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/jgarrido
[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://en.wikipedia.org/wiki/Domain_Name_System
[3]: https://www.powerdns.com/opensource.html
[4]: https://doc.powerdns.com/
[5]: https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions
[6]: https://dnsrpz.info/
[7]: https://opensource.com/sites/default/files/uploads/pdns.jpg (PowerDNS frontend)

View File

@ -0,0 +1,261 @@
[#]: collector: (lujun9972)
[#]: translator: (silentdawn-zz)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Never forget your password with this Python encryption algorithm)
[#]: via: (https://opensource.com/article/20/6/python-passwords)
[#]: author: (Moshe Zadka https://opensource.com/users/moshez)
有了这个 Python 加密算法,你再也不用担心忘记密码了
======
本密码保护算法使用 Python 实现,基于 Shamir 秘密共享算法,可以有效避免黑客窃取和自己不经意忘记引发的风险和不便。
![Searching for code][1]
很多人使用密码管理器来保密存储自己在用的各种密码。密码管理器的关键环节之一是主密码,主密码保护着所有其它密码。这种情况下,主密码本身就是风险所在。任何知道你的主密码的人,都可以视你的密码保护若无物,畅行无阻。自然而然,为了保证主密码的安全性,你会选用很难想到的密码,把它牢记在脑子里,甚至还有很多其它你能想到的 [各种方法][2]。
但是万一主密码泄露了或者忘记了,后果是什么?可能你要去个心仪的没有现代技术覆盖的岛上旅行上个把月,在开心戏水之后享用美味菠萝的时刻,突然记不清自己的密码是什么了。是“山尖一寺一壶酒”?还是“一去二三里,烟村四五家”?反正当时选密码的时候感觉浑身都是机灵,现在则后悔当初何必作茧自缚。
![XKCD comic on password strength][3]
([XKCD][4], [CC BY-NC 2.5][5])
当然,你不会把自己的主密码告诉其它任何人,因为这是密码管理的首要原则。有没有其它变通的办法,免除这种难以承受的密码之重?
试试 **[Shamir 秘密共享算法][6]**,一种可以将保密内容进行分块保存,且只能将片段拼合才能恢复保密内容的算法。
先分别通过一个古代的和一个现代的故事,看看 Shamir 秘密共享算法究竟是怎么回事吧。
这些故事的隐含前提是你对密码学有起码的了解,必要的话,你可以先温习一下 [密码学与公钥基础设施引论][7].
### 一个古代关于加解密的故事
古代某国,王有个大秘密,很大很大的秘密:
```
def int_from_bytes(s):
    acc = 0
    for b in s:
        acc = acc * 256
        acc += b
    return acc
secret = int_from_bytes("terrible secret".encode("utf-8"))
```
大到他自己的孩子都不能轻易信任。他有五个王子,但前程危机重重。他的孩子需要在他百年之后用这个秘密来保卫国家,而国王又不能忍受自己的孩子在他们还记得自己的时候就知道这些秘密,尤其是这种状态可能要持续几十年。
所以,国王动用大力魔术,将这个秘密分为了五个部分。他知道,可能有一两个孩子不会遵从他的遗嘱,但绝对不会同时有三个或三个以上这样:
```
from mod import Mod
from os import urandom
```
国王精通 [有限域][8] 和 _随机理论_,当然,对他来说,使用 Python 分割这个秘密也是小菜一碟。
第一步是选择一个大质数——第 13 个 [梅森质数][9] (`2**521 - 1`),他让人把这个数誊写到纸上,封之金匮,藏之后殿:
```
`P = 2**521 - 1`
```
但这不是要保守的秘密:这只是 _公钥_
国王知道,如果 `P` 是一个质数, 用 `P` 对数字取模,就形成了一个数学 [场][10]:在场中可以自由进行加、减、乘、除运算。当然,做除法运算时,除数不能为 0。
国王日理万机,方便起见,他在做模运算时使用了 PyPI 中的 [`mod`][11] 模块,这个模块实现了各种模运算算法。
他确认过,自己的秘密比 `P` 要短:
```
`secret < P`[/code] [code]`TRUE`
```
将秘密转换为 `P` 的模,`mod P`
```
`secret = mod.Mod(secret, P)`
```
为了使任意三个孩子掌握的片段就可以重建这个秘密,他还得生成另外两个部分,并混杂到一起:
```
polynomial = [secret]
for i in range(2):
    polynomial.append(Mod(int_from_bytes(urandom(16)), P))
len(polynomial)
[/code] [code]`3`
```
下一步就是在随机选择的点上计算某 [多项式][12] 的值,即计算 `polynomial[0] + polynomial[1]*x + polynomial[2]*x**2 ...`
虽然有第三方模块可以计算多项式的值,但那并不是针对有限域内的运算的,所以,国王还得亲自操刀,写出计算多项式的代码:
```
def evaluate(coefficients, x):
    acc = 0
    power = 1
    for c in coefficients:
        acc += c * power
        power *= x
    return acc
```
再下一步,国王选择五个不同的点,计算多项式的值,并分别交给五个孩子,让他们各自保存一份:
```
shards = {}
for i in range(5):
    x = Mod(int_from_bytes(urandom(16)), P)
    y = evaluate(polynomial, x)
    shards[i] = (x, y)
```
正如国王所虑,不是每个孩子都正直守信。其中有两个孩子,在他尸骨未寒的时候,就想从自己掌握的秘密片段中窥出些什么,但穷极所能,终无所获。另外三个孩子听说了这个事,合力将这两人永远驱逐:
```
del shards[2]
del shards[3]
```
二十年弹指一挥间,奉先王遗命,三个孩子将合力恢复出先王的大秘密。他们将各自的秘密片段拼合在一起:
```
`retrieved = list(shards.values())`
```
然后是 40 天没日没夜的苦干。这是个大工程,他们虽然都懂些 Python但都不如前国王精通。
最终,揭示秘密的时刻到了。
用于反算秘密的代码基于 [拉格朗日差值][13],它利用多项式在 `n` 个非 0 位置的值,来计算其在 `0` 处的值。前面的 `n` 指的是多项式的阶数。这个过程的原理是,可以为一个多项式找到一个显示方程,使其满足:其在 `t[0]` 处的值是 `1`,在 `i` 不为 `0` 的时候,其在 `t[i]` 处的值是 `0`。因多项式值的计算属于线性运算,需要计算 _这些_ 多项式各自的值,并使用多项式的值进行插值:
```
from functools import reduce
from operator import mul
def retrieve_original(secrets):
    x_s = [s[0] for s in secrets]
    acc = Mod(0, P)
    for i in range(len(secrets)):
        others = list(x_s)
        cur = others.pop(i)
        factor = Mod(1, P)
        for el in others:
            factor *= el * (el - cur).inverse()
        acc += factor * secrets[i][1]
    return acc
```
这代码是在太复杂了40 天能算出结果已经够快了。雪上加霜的是,他们只能利用五个秘密片段中的三个来完成这个运算,这让他们万分紧张:
```
`retrieved_secret = retrieve_original(retrieved)`
```
后事如何?
```
`retrieved_secret == secret`[/code] [code]`TRUE`
```
数学这个魔术的优美之处就在于它每一次都是那么靠谱,无一例外。国王的孩子们,曾经的孩童,而今已是壮年,足以理解先王的初衷,并以先王的锦囊妙计保卫了国家,并继之以繁荣昌盛!
### 关于 Shamir 秘密共享算法的现代故事
现代,很多人都对类似的大秘密苦不堪言:密码管理器的主密码!几乎没有谁能有足够信任的人去完全托付自己最深的秘密,好消息是,找到至少有三个不会串通起来搞鬼的五人组不是个太困难的事。
同样是在现代,比较幸运的是,我们不必再像国王那样自己动手分割要守护的秘密。拜现代 _开源_ 技术所赐,这都可以使用现成的软件完成。
假设你有五个不敢完全信任,但还可以有点信任的人:金、木、水、火、土。
安装并运行 `ssss` 分割密钥:
```
$ echo 'long legs travel fast' | ssss-split -t 3 -n 5
Generating shares using a (3,5) scheme with dynamic security level.
Enter the secret, at most 128 ASCII characters: Using a 168 bit security level.
1-797842b76d80771f04972feb31c66f3927e7183609
2-947925f2fbc23dc9bca950ef613da7a4e42dc1c296
3-14647bdfc4e6596e0dbb0aa6ab839b195c9d15906d
4-97c77a805cd3d3a30bff7841f3158ea841cd41a611
5-17da24ad63f7b704baed220839abb215f97d95f4f8
```
这确实是个非常牛的主密码:`long legs travel fast`,绝不能把它完整的托付给任何人!那就把五个片段分别交给还比较可靠的伙伴,金、木、水、火、土:
* 把 `1` 给金。
* 把 `2` 给木。
* 把 `3` 给水。
* 把 `4` 给火。
* 把 `5` 给土。
然后,你开启你的惬意之旅,整整一个月,流连于海边温暖的沙滩,整整一个月,未接触任何电子设备。没用多久,把自己的主密码忘到了九霄云外。
木和水也在旅行中,你托付给他们保管的密钥片段保存的好好的,在他们各自的密码管理器中,但不幸的是,他们和你一样,也忘了自己的 _主密码_
没关系。
联系金,他保管的密钥片段是 `1-797842b76d80771f04972feb31c66f3927e7183609`;火,一直替你的班,很高兴你能尽快重返岗位,把自己掌握的片段给了你,`4-97c77a805cd3d3a30bff7841f3158ea841cd41a611`;土,收到你给的跑腿费才将自己保管的片段翻出来发给你,`5-17da24ad63f7b704baed220839abb215f97d95f4f8`。
有了这三个密钥片段,运行:
```
$ ssss-combine -t 3
Enter 3 shares separated by newlines:
Share [1/3]: 1-797842b76d80771f04972feb31c66f3927e7183609
Share [2/3]: 4-97c77a805cd3d3a30bff7841f3158ea841cd41a611
Share [3/3]: 5-17da24ad63f7b704baed220839abb215f97d95f4f8
Resulting secret: long legs travel fast
```
就这么简单,有了 _开源_ 技术加持,你也可以活的像国王一样滋润!
### 自己的安全不是自己一个人的事
密码管理是当今网络生活必备技能,当然要选择复杂的密码,来保证安全性,但这不是全部。来用 Shamir 秘密共享算法,和他人共同安全的存储你的密码吧。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/6/python-passwords
作者:[Moshe Zadka][a]
选题:[lujun9972][b]
译者:[silentdawn-zz](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/search_find_code_python_programming.png?itok=ynSL8XRV (Searching for code)
[2]: https://monitor.firefox.com/security-tips
[3]: https://opensource.com/sites/default/files/uploads/password_strength-xkcd.png (XKCD comic on password strength)
[4]: https://imgs.xkcd.com/comics/password_strength.png
[5]: https://creativecommons.org/licenses/by-nc/2.5/
[6]: https://en.wikipedia.org/wiki/Secret_sharing#Shamir's_scheme
[7]: https://opensource.com/article/18/5/cryptography-pki
[8]: https://en.wikipedia.org/wiki/Finite_field
[9]: https://en.wikipedia.org/wiki/Mersenne_prime
[10]: https://en.wikipedia.org/wiki/Field_(mathematics)
[11]: https://pypi.org/project/mod/
[12]: https://en.wikipedia.org/wiki/Polynomial
[13]: https://www.math.usm.edu/lambers/mat772/fall10/lecture5.pdf

View File

@ -1,68 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Customizing my Linux terminal with tmux and Git)
[#]: via: (https://opensource.com/article/20/7/tmux-git)
[#]: author: (Moshe Zadka https://opensource.com/users/moshez)
使用 tmux 和 Git 自定义我的 Linux 终端
======
设置你的控制台,以便你能知道你在哪里和接下来该做什么
![woman on laptop sitting at the window][1]
我使用 GNOME Terminal主要是因为它是我的发行版的默认设置。但是我终端内远非“默认值”。在开始自定义它之前它是这个样子
![Moshe Zadka's terminal][2]
(Moshe Zadka, [CC BY-SA 4.0][3])
### 从底部开始
我使用终端多路复用技术 [tmux][4] 管理我的终端体验。
在上图的底部,你可以看到我的绿色 tmux 栏。底部的 `[3]` 表示它是第三个终端:每个终端都运行自己的 tmux 会话。 (我创建了一个新会话来放大字体,这样可在截图中更容易看到;这是它与其他终端之间的唯一区别。)
提示看起来也很有趣,对吧?在提示中塞入了太多信息后,我想插在换行符中,这样一来,如果我想即兴 shell 编程或编写五步流水线,就可以不会溢出而做到这点。折衷方案是简单的命令序列(新建、复制、移动),可以更快地滚动到我的屏幕之外。
一行的最后是 [Aleph null][5],它是最小的[无限基数][6]。我喜欢它在一行的最后很明显,并且当我意识到 Aleph 和下标 0 都是 Unicode 字符时,我忍不住要使用 Aleph null 作为提示的一部分的诱惑。(数学呆子,团结起来!)
在此之前是我的用户名。由于我在不同用户名的多台计算机上使用相同的 [dotfiles][7](保存在 Git 中),因此这个非常有用。
用户名之前是我所在目录的最后一部分。完整路径通常太长且无用,但是当前目录对于像我这样的经常忘记在做什么人来说是很有用的。在此之前是机器的名称。我所有的机器都以我喜欢的电视节目命名。我的旧笔记本是 `mcgyver`
提示中的第一位是我最喜欢的位:一个让我知道目录的 Git 状态的字母。如果目录为”不在 Git 中“,那么是 `G`。如果目录为“没有问题” OK且无需任何操作那么是 `K`。如果有 Git 未知的文件需要添加或忽略,那么是 `!`。如果需要提交,那么是 `C`。如果没有上游,那么是 `U`。如果存在上游,但我没有推送,那么是 `P`。该方案不是基于当前状态而是描述了我要做的_下一个动作_。 (要回顾 Git 术语,请阅读[本文][8]。)
终端功能是通过一个有趣的 Python 程序完成的。它运行 `python -m howsit`(在虚拟环境中安装 [howsit][9] 之后)。
你可以在上图中看到渲染,但是为了完整起见,这是我的 PS1
```
[$(~/.virtualenvs/howsit/bin/python -m howsit)]\h:\W \u ℵ₀  
$
```
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/tmux-git
作者:[Moshe Zadka][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/moshez
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop)
[2]: https://opensource.com/sites/default/files/uploads/terminal-tmux-moshezadka.png (Moshe Zadka's terminal)
[3]: https://creativecommons.org/licenses/by-sa/4.0/
[4]: https://opensource.com/article/20/1/tmux-console
[5]: https://simple.wikipedia.org/wiki/Aleph_null#:~:text=Aleph%20null%20(also%20Aleph%20naught,series%20of%20infinite%20cardinal%20numbers.
[6]: https://gizmodo.com/a-brief-introduction-to-infinity-5809689
[7]: https://opensource.com/article/19/3/move-your-dotfiles-version-control
[8]: https://opensource.com/article/19/2/git-terminology
[9]: https://pypi.org/project/howsit/

View File

@ -1,88 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (What you need to know about automation testing in CI/CD)
[#]: via: (https://opensource.com/article/20/7/automation-testing-cicd)
[#]: author: (Taz Brown https://opensource.com/users/heronthecli)
你需要了解有关 CI/CD 中的自动化测试的知识
======
持续集成和持续交付是由测试提供支持。以下是如何做的。
![Net catching 1s and 0s or data in the clouds][1]
>“如果一切似乎都在控制之中,那么你就不会足够快。” —Mario Andretti
测试自动化意味着持续专注于在软件开发过程中尽早地检测到缺陷,错误和 bug。这是使用那些追求质量为最高价值的工具完成的它们旨在_确保_质量而不仅仅是追求。
持续集成/持续交付CI / CD解决方案也称为 DevOps 管道)最引人注目的功能之一是可以更频繁地进行测试,而又不会给开发人员或操作人员增加更多的手动工作。让我们谈谈为什么这很重要。
### 为什么要在 CI/CD 中自动化测试?
敏捷团队迭代速度更快以更高的速度交付软件和客户满意度而这些压力可能会损害质量。全球竞争制造了对缺陷_低容忍度_同时对敏捷团队软件交付_更快迭代_增加了压力。减轻压力的行业解决方案是什么 是 [DevOps][2]。
DevOps 是一个有很多定义的大创意,但是对 DevOps 成功至关重要的一项技术是 CI/CD。通过软件开发流程设计一个连续的改进周期可以带来新的测试机会。
### 这对测试人员意味着什么?
对于测试人员,这通常意味着他们必须:
* 更早且更频繁地进行测试(使用自动化)
* 持续测试“真实世界”的工作流(自动和手动)
更具体地说,任何形式的测试(无论是由编写代码的开发人员运行还是由质量保证工程师团队设计)的作用是利用 CI/CD 基础架构在快速推进的同时提高质量。
### 测试人员还需要做什么?
具体点说,测试人员负责:
* 测试新的和现有的软件应用
* 通过根据系统要求评估软件来验证功能
* 利用自动化测试工具来开发和维护可重复使用的自动化测试
* 与 scrum 团队的所有成员合作,了解正在开发的功能以及实施的技术设计,以设计和开发准确、高质量的自动化测试
* 分析记录的用户需求,并创建或协助设计针对中度到高度复杂的软件或 IT 系统的测试计划
* 开发自动化测试,并与职能团队一起审查和评估测试方案
* 与技术团队合作,确定在开发环境中自动化测试的正确方法
* 与团队合作,通过自动化测试来理解和解决软件问题,并回应有关修改或增强的建议
* 参与需求梳理,估算和其他敏捷 scrum 仪式
* 协助定义标准和流程以支持测试活动和材料(例如脚本、配置、程序、工具、划和结果)
测试是一项艰巨的工作,但这是有效构建软件的重要组成部分。
### 哪些持续测试很重要?
你可以使用多种测试。不同的类型并不是学科之间的界限。相反,它们是表示测试的不同方式。比较测试类型不太重要,而覆盖每种测试类型更重要。
* **功能测试:**确保软件具有其要求的功能
* **单元测试:**独立测试软件的较小单元/组件以检查其功能
* **负载测试:**在重负载或使用期间测试软件的性能
* **压力测试:**确定承受压力(最大负载)时软件的断点
* **集成测试:**测试组合或集成的一组组件的输出
* **回归测试:**当修改任意组件(无论多么小),测试整个应用的功能
### 总结
任何包含持续测试的软件开发过程都将朝着建立关键反馈环路的方向发展,以快速发展并构建有效的软件。最重要的是,该实践将质量内置到 CI/CD 管道中,并意味着了解在软件开发生命周期中提高速度同时减少风险和浪费之间的联系。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/automation-testing-cicd
作者:[Taz Brown][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/heronthecli
[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/resources/devops

View File

@ -0,0 +1,175 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Use DNS over TLS)
[#]: via: (https://fedoramagazine.org/use-dns-over-tls/)
[#]: author: (Thomas Bianchi https://fedoramagazine.org/author/thobianchi/)
使用 DNS over TLS
======
![][1]
现代计算机用来在互联网种查找资源的[域名系统 DNS][2] 是在 [35 年前][3]设计的,而没有考虑用户隐私。它会面临安全风险和攻击,例如 [DNS 劫持][4]。它还能让 [ISP][5] 拦截查询。
幸运的是,现在有 [DNS over TLS][6] 和 [DNSSEC][7] 可用。DNS over TLS 和 DNSSEC 允许创建从计算机到它配置的 DNS 服务器的安全且加密的端到端隧道。在 Fedora 上,部署这些技术的步骤很容易,并且所有必要的工具也很容易获得。
本指南将演示如何使用 systemd-resolved 在 Fedora 上配置 DNS over TLS。有关 systemd-resolved 服务的更多信息,请参见[文档][8]。
### 步骤 1设置 Step 1 : Set-up systemd-resolved
修改 _/etc/systemd/resolved.conf_,类似于下面所示。确保启用 DNS over TLS 并配置要使用的 DNS 服务器的 IP 地址。
```
$ cat /etc/systemd/resolved.conf
[Resolve]
DNS=1.1.1.1 9.9.9.9
DNSOverTLS=yes
DNSSEC=yes
FallbackDNS=8.8.8.8 1.0.0.1 8.8.4.4
#Domains=~.
#LLMNR=yes
#MulticastDNS=yes
#Cache=yes
#DNSStubListener=yes
#ReadEtcHosts=yes
```
关于选项的简要说明:
* **DNS**:以空格分隔的 IPv4 和 IPv6 地址列表,用作系统 DNS 服务器
* **FallbackDNS**:以空格分隔的 IPv4 和 IPv6 地址列表,用作后备 DNS 服务器。
* **Domains**:在解析单标签主机名时,这些域名用于搜索后缀。 _~._ 代表对于所有域名,优先使用 DNS= 定义的系统 DNS 服务器。
* **DNSOverTLS**:如果启用,那么将加密与服务器的所有连接。请注意,此模式要求 DNS 服务器支持 DNS-over-TLS并具有其 IP 的有效证书。
> _注意上面示例中列出的 DNS 服务器是我个人的选择。你要确定要使用的 DNS 服务器。要注意你要向谁请求 IP_
### 步骤 2告诉 NetworkManager 将信息推给 systemd-resolved
_/etc/NetworkManager/conf.d_ 中创建一个名为 _10-dns-systemd-resolved.conf_ 的文件。
```
$ cat /etc/NetworkManager/conf.d/10-dns-systemd-resolved.conf
[main]
dns=systemd-resolved
```
上面的设置_dns=systemd-resolved_让 NetworkManager 将从 DHCP 获得的 DNS 信息推送到 systemd-resolved 服务。这将覆盖_步骤 1_ 中配置的 DNS 设置。这在受信任的网络中没问题,但是可以设置 _dns=none_ 从而使用 _/etc/systemd/resolved.conf_ 中配置的 DNS 服务器。
### 步骤 3 启动和重启服务
若要使上述步骤中的配置生效,请启动并启用 _systemd-resolved_。然后重启 _NetworkManager_
**注意**:在 NetworkManager 重启时,连接会中断几秒钟。
```
$ sudo systemctl start systemd-resolved
$ sudo systemctl enable systemd-resolved
$ sudo systemctl restart NetworkManager
```
> _注意目前systemd-resolved 服务默认处于禁用状态,并且是计划使用的。[这有个方案][33]可在 Fedora 33 中默认启用systemd-resolved。_
### 步骤 4检查是否一切正常
现在,你应该在使用 DNS over TLS。检查 DNS 解析状态来确认这一点:
```
$ resolvectl status
MulticastDNS setting: yes
DNSOverTLS setting: yes
DNSSEC setting: yes
DNSSEC supported: yes
Current DNS Server: 1.1.1.1
DNS Servers: 1.1.1.1
9.9.9.9
Fallback DNS Servers: 8.8.8.8
1.0.0.1
8.8.4.4
```
/etc/resolv.conf 应该指向 127.0.0.53
```
$ cat /etc/resolv.conf
# Generated by NetworkManager
search lan
nameserver 127.0.0.53
```
若要查看 systemd-resolved 发送和接收安全查询的地址和端口,请运行:
```
$ sudo ss -lntp | grep '\(State\|:53 \)'
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=10410,fd=18))
```
若要进行安全查询,请运行:
```
$ resolvectl query fedoraproject.org
fedoraproject.org: 8.43.85.67 -- link: wlp58s0
8.43.85.73 -- link: wlp58s0
[..]
-- Information acquired via protocol DNS in 36.3ms.
-- Data is authenticated: yes
```
### 额外步骤 5使用 Wireshark 验证配置
首先,安装并运行 [Wireshark][10]
```
$ sudo dnf install wireshark
$ sudo wireshark
```
它会询问你在哪个设备上捕获数据包。在我这里,因为我使用无线接口,我用的是 _wlp58s0_。在 Wireshark 中设置筛选器_tcp.port == 853_853 是 DNS over TLS 协议端口)。在捕获 DNS 查询之前,你需要刷新本地 DNS 缓存:
```
$ sudo resolvectl flush-caches
```
现在运行:
```
$ nslookup fedoramagazine.org
```
你应该会看到你的计算机和配置的 DNS 服务器之间的 TLS 加密交换:
![][11]
_Poster in Cover Image Approved for Release by NSA on 04-17-2018, FOIA Case # 83661_
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/use-dns-over-tls/
作者:[Thomas Bianchi][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://fedoramagazine.org/author/thobianchi/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2020/06/use-dns-over-tls-816x345.jpg
[2]: https://en.wikipedia.org/wiki/Domain_Name_System
[3]: https://tools.ietf.org/html/rfc1035
[4]: https://en.wikipedia.org/wiki/DNS_hijacking
[5]: https://en.wikipedia.org/wiki/Internet_service_provider
[6]: https://en.wikipedia.org/wiki/DNS_over_TLS
[7]: https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions
[8]: https://www.freedesktop.org/wiki/Software/systemd/resolved/
[9]: https://fedoraproject.org/wiki/Changes/systemd-resolved
[10]: https://www.wireshark.org/
[11]: https://fedoramagazine.org/wp-content/uploads/2020/06/1-1024x651.png

View File

@ -1,88 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (My feature-rich and minimal Linux terminal)
[#]: via: (https://opensource.com/article/20/7/minimal-linux-terminal)
[#]: author: (Sumantro Mukherjee https://opensource.com/users/sumantro)
我功能丰富又最小的 Linux 终端
======
这些应用和主题帮助我的终端变成自己的。
![Digital images of a computer desktop][1]
每个人都喜欢以特定的方式设置他们的工作区;它可以帮助你提高效率,并使生活变得更轻松,它以一种有机的方式组织事物,并有一个对你有利的环境。这也绝对适用于终端。这可能就是为什么有这么多可用终端的原因。
在使用新的计算机时,我要做的第一件事是将终端设置为我自己的。
我最喜欢的终端应用是 [terminator][2],因为它的设计极简,并且内置了窗口选项。但从这里开始变得更加复杂。我将自己喜欢的终端风格描述为“功能丰富,但保持最小化”。这种平衡是我经常要调整的。
我使用 zsh 作为默认 shell而 Ohmyzsh 提供了额外的功能。可以下载它的安装脚本来安装 Ohmyzsh
```
$ curl -fsSL \
<https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh> \
\--output install-zsh.sh
```
查看一遍脚本了解它做什么,并确保你有信心在计算机上运行该脚本。完成后,运行脚本:
```
`$ sh ./install-zsh.sh`
```
我最喜欢的主题/提示是 [Powerlevel 10k][3],它是我环境的极其详细的视图。它包括一切,从命令高亮到运行时的时间戳。所有细节都集成到一个优雅的、上下文感知的提示中。上下文感知这里有两个好处,这里和下面的,作者可以在这里提供更多的信息,以了解这意味着什么以及为什么在终端中这是一件好事吗?
要安装 Powerlevel10k请先在 `.oh-my-zsh/` 自定义主题目录中下载源码。
```
git clone --depth=1 <https://github.com/romkatv/powerlevel10k.git>
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k
```
但是,为了让 Powerlevel10k 看起来像仓库中所示,我们需要添加一些默认不包括的字体。它们是:
* [MesloLGS NF Regular.ttf][4]
* [MesloLGS NF Bold.ttf][5]
* [MesloLGS NF Italic.ttf][6]
* [MesloLGS NF Bold Italic.ttf][7]
这将产生一个美观且上下文感知的终端(如 [screenfetch][8] 所示)
![terminator terminal shot via screenFetch ][9]
我已经习惯了这个特殊的设置,但是,尽管重要的是让你的工作环境成为你自己的,但这也并不是一个固执地尝试新事物的理由。为了满足新一代用户的需求,出现了新的终端。这意味着,即使一开始不熟悉,与以前的备用终端相比,新开发的终端可能更适合于当今的环境和职责。
我最近一直在考虑其他选择。我开始观察 [Starship][10] 的开发情况,它将自己描述为对任何 shell 来说都是最小的、快速的、可无限自定义的提示。它仍然有许多沉浸式的视觉细节,而不会像 Powerlevel10k 那样使人分心。
你最喜欢的终端是什么?为什么?请在评论栏分享!
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/minimal-linux-terminal
作者:[Sumantro Mukherjee][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/sumantro
[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://terminator-gtk3.readthedocs.io/en/latest/
[3]: https://github.com/romkatv/powerlevel10k
[4]: https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf
[5]: https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf
[6]: https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf
[7]: https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf
[8]: https://github.com/KittyKatt/screenFetch
[9]: https://opensource.com/sites/default/files/uploads/osdc00_edit.png (terminator terminal shot via screenFetch )
[10]: https://starship.rs/

View File

@ -0,0 +1,80 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Video Trimmer: A No-nonsense, Simple Video Trimming Application for Linux Desktop)
[#]: via: (https://itsfoss.com/video-trimmer/)
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
Video TrimmerLinux 桌面中的简单实用视频修剪应用
======
_**简述:一个非常简单的工具,无需重新编码即可快速修剪视频。我们来看看它提供了什么。**_
你可能已经知道 Linux 的一些[最佳免费视频编辑器][1],但并不是每个人都需要它们提供的所有功能。
有时,你只想快速执行一项操作,例如修剪视频。
你是选择探索功能完善的视频编辑器但只是执行简单的修剪操作,还是希望使用便捷工具来修剪视频?
当然,这取决于你的个人喜好以及处理视频的方式。但是,对于大多数用户而言,首选是使用非常容易使用的修剪工具。
因此,我想重点介绍一个简单的开源工具,即 “[Video Trimmer][2]”,它可以快速修剪视频。
![][3]
### Video Trimmer一个用于快速修剪视频的简单应用
Video Trimmer 是一个开源应用,它可帮助你修剪视频片段而无需重新编码。
因此,基本上,你将能够修剪视频而不会失去原始质量。
你要做的就是使用 Video Trimmer 打开视频文件,然后使用鼠标选择要修剪的区域。
你可以手动设置时间范围进行修剪,也可以仅使用鼠标拖动区域进行修剪。当然,如果视频文件很长且你不知道在哪里查看,那么可能需要一段时间手动设置时间戳。
为了让你有个印象,请看下面的截图,看看在使用 Video Trimmer 时可用的选项:
![][4]
### 在 Linux 上安装 Video Trimmer
Video Trimmer 仅在 [Flathub][5] 上作为 Flatpak 软件包提供。因此,你应该能够在 Flatpak 支持的任何 Linux 发行版上安装它,而不会出现任何问题。
以防你不了解 Flatpak你可能想要参考我们的[使用和安装 Flatpak][6] 指南。
[Video Trimmer (Flathub)][5]
### 总结
Video Trimmer 底层使用 [ffmpeg][7]。它所做的可以在终端中轻松[使用 ffmpeg 命令][8]完成。但是并非所有人都希望使用终端来剪辑视频的一部分。Video Trimmer 之类的工具可以帮助像我这样的人。
由于某些原因,如果你想寻找一种替代方法,也可以尝试使用 [VidCutter][9]。当然,你始终可以依靠 [Linux 中的顶级视频编辑器][10](例如 [OpenShot][11] 来修剪视频以及执行一些高级操作的能力。
你认为在 Linux 中使用 ”**Video Trimmer**“ 如何?你是否有其他喜欢的视频修剪工具?在下面的评论中让我知道你的想法!
--------------------------------------------------------------------------------
via: https://itsfoss.com/video-trimmer/
作者:[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://itsfoss.com/open-source-video-editors/
[2]: https://gitlab.gnome.org/YaLTeR/video-trimmer
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/video-trimmer.jpg?ssl=1
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/video-trimmer-screenshot.jpg?ssl=1
[5]: https://flathub.org/apps/details/org.gnome.gitlab.YaLTeR.VideoTrimmer
[6]: https://itsfoss.com/flatpak-guide/
[7]: https://ffmpeg.org/
[8]: https://itsfoss.com/ffmpeg/
[9]: https://itsfoss.com/vidcutter-video-editor-linux/
[10]: https://itsfoss.com/best-video-editing-software-linux/
[11]: https://itsfoss.com/openshot-video-editor-release/

View File

@ -0,0 +1,155 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (The feature that makes D my favorite programming language)
[#]: via: (https://opensource.com/article/20/7/d-programming)
[#]: author: (Lawrence Aberba https://opensource.com/users/aberba)
让 D 语言成为我最喜欢的编程语言的功能
======
UFCS 能让你能够编写自然的可重用代码而不会牺牲便利性。
![Coding on a computer][1]
早在 2017 年,我就写了为什么 [D 语言是开发的绝佳选择][2]的文章。但是 D 语言中有一个杰出功能,我没有充分扩展:[通用函数调用语法][3]UFCS。UFCS 是 D 语言中的[语法糖][4],它可以在类型(字符串、数字、布尔值等)上链接任何常规函数,例如该类型的成员函数。
如果你尚未安装 D 语言,请[安装 D 语言编译器][5],以便你可以自己[运行 D 代码][6]。
考虑以下示例代码:
```
// file: ufcs_demo.d
module ufcs_demo;
import std.stdio : writeln;
int[] evenNumbers(int[] numbers)
{
    import std.array : array;
    import std.algorithm : filter;
    return numbers.filter!(n =&gt; n % 2 == 0).array;
}
void main()
{
    writeln(evenNumbers([1, 2, 3, 4]));
}
```
使用你喜欢的 D 语言编译器进行编译,查看这个简单示例应用做了什么:
```
$ dmd ufcs_demo.d
$ ./ufcs_demo
[2, 4]
```
但是,使用作为 D 语言的内置功能的 UFCS ,你还可以自然方式编写代码:
```
...
writeln([1, 2, 3, 4].evenNumbers());
...
```
或完全删除现在多余的括号,使 “evenNumbers” 看起来像是一个属性:
```
...
writeln([1, 2, 3, 4].evenNumbers); // prints 2, 4
...
```
因此,完整的代码现在变为:
```
// file: ufcs_demo.d
module ufcs_demo;
import std.stdio : writeln;
int[] evenNumbers(int[] numbers)
{
    import std.array : array;
    import std.algorithm : filter;
    return numbers.filter!(n =&gt; n % 2 == 0).array;
}
void main()
{
    writeln([1, 2, 3, 4].evenNumbers);
}
```
使用你最喜欢的 D 语言编译器进行编译,然后尝试一下。 如预期的那样,它产生相同的输出:
```
$ dmd ufcs_demo.d
$ ./ufcs_demo
[2, 4]
```
在编译过程中编译器_自动地_将数组作为函数的第一个参数。 这是一个常规模式,使得使用 D 语言成为一种乐趣,因此,它与你自然考虑代码的感觉非常相似。 结果就是函数式编程。
你可能会猜出打印:
```
//file: cool.d
import std.stdio : writeln;
import std.uni : asLowerCase, asCapitalized;
void main()
{
    string mySentence = "D IS COOL";
    writeln(mySentence.asLowerCase.asCapitalized);
}
```
确认一下:
```
$ dmd cool.d
$ ./cool
D is cool
```
结合[其他 D 语言的功能][7]UFCS 使你能够编写可重用的代码,并在不牺牲便利性的情况下自然地进行编写。
### 是时候尝试 D 语言了
就像我之前写的那样D 语言是一种很棒的开发语言。从 [D 语言的下载页面][8]可以很容易地进行安装,因此请下载编译器,查看示例,并亲自体验 D 语言。
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/7/d-programming
作者:[Lawrence Aberba][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/aberba
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_laptop_hack_work.png?itok=aSpcWkcl (Coding on a computer)
[2]: https://opensource.com/article/17/5/d-open-source-software-development
[3]: http://ddili.org/ders/d.en/ufcs.html
[4]: https://en.wikipedia.org/wiki/Syntactic_sugar
[5]: https://tour.dlang.org/tour/en/welcome/install-d-locally
[6]: https://tour.dlang.org/tour/en/welcome/run-d-program-locally
[7]: https://dlang.org/comparison.html
[8]: https://dlang.org/download.html